ccgo_linux_riscv64.go 543 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891
  1. // Code generated for linux/riscv64 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/riscv64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libfreetype/include/linux/riscv64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libX11/include/linux/riscv64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libXrender/include/linux/riscv64 -lfontconfig -lfreetype -lX11 -lXrender -o libxft.go --package-name libxft src/.libs/libXft.a', DO NOT EDIT.
  2. //go:build linux && riscv64
  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 = 13
  428. const m_FREETYPE_PATCH = 2
  429. const m_FT_AUTOHINTER_H = "FT_DRIVER_H"
  430. const m_FT_CACHE_CHARMAP_H = "FT_CACHE_H"
  431. const m_FT_CACHE_IMAGE_H = "FT_CACHE_H"
  432. const m_FT_CACHE_INTERNAL_CACHE_H = "FT_CACHE_H"
  433. const m_FT_CACHE_INTERNAL_GLYPH_H = "FT_CACHE_H"
  434. const m_FT_CACHE_INTERNAL_IMAGE_H = "FT_CACHE_H"
  435. const m_FT_CACHE_INTERNAL_MANAGER_H = "FT_CACHE_H"
  436. const m_FT_CACHE_INTERNAL_MRU_H = "FT_CACHE_H"
  437. const m_FT_CACHE_INTERNAL_SBITS_H = "FT_CACHE_H"
  438. const m_FT_CACHE_MANAGER_H = "FT_CACHE_H"
  439. const m_FT_CACHE_SMALL_BITMAPS_H = "FT_CACHE_H"
  440. const m_FT_CFF_DRIVER_H = "FT_DRIVER_H"
  441. const m_FT_CHAR_BIT = "CHAR_BIT"
  442. const m_FT_CURVE_TAG_CONIC = 0x00
  443. const m_FT_CURVE_TAG_CUBIC = 0x02
  444. const m_FT_CURVE_TAG_HAS_SCANMODE = 0x04
  445. const m_FT_CURVE_TAG_ON = 0x01
  446. const m_FT_CURVE_TAG_TOUCH_X = 0x08
  447. const m_FT_CURVE_TAG_TOUCH_Y = 0x10
  448. const m_FT_Curve_Tag_Conic = "FT_CURVE_TAG_CONIC"
  449. const m_FT_Curve_Tag_Cubic = "FT_CURVE_TAG_CUBIC"
  450. const m_FT_Curve_Tag_On = "FT_CURVE_TAG_ON"
  451. const m_FT_Curve_Tag_Touch_X = "FT_CURVE_TAG_TOUCH_X"
  452. const m_FT_Curve_Tag_Touch_Y = "FT_CURVE_TAG_TOUCH_Y"
  453. const m_FT_FILE = "FILE"
  454. const m_FT_FSTYPE_BITMAP_EMBEDDING_ONLY = 0x0200
  455. const m_FT_FSTYPE_EDITABLE_EMBEDDING = 0x0008
  456. const m_FT_FSTYPE_INSTALLABLE_EMBEDDING = 0x0000
  457. const m_FT_FSTYPE_NO_SUBSETTING = 0x0100
  458. const m_FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING = 0x0004
  459. const m_FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING = 0x0002
  460. const m_FT_INT64 = "long"
  461. const m_FT_INT_MAX = "INT_MAX"
  462. const m_FT_INT_MIN = "INT_MIN"
  463. const m_FT_LLONG_MAX = "LLONG_MAX"
  464. const m_FT_LLONG_MIN = "LLONG_MIN"
  465. const m_FT_LOAD_DEFAULT = 0x0
  466. const m_FT_LONG_MAX = "LONG_MAX"
  467. const m_FT_LONG_MIN = "LONG_MIN"
  468. const m_FT_MAX_MODULES = 32
  469. const m_FT_OPEN_DRIVER = 0x8
  470. const m_FT_OPEN_MEMORY = 0x1
  471. const m_FT_OPEN_PARAMS = 0x10
  472. const m_FT_OPEN_PATHNAME = 0x4
  473. const m_FT_OPEN_STREAM = 0x2
  474. const m_FT_OUTLINE_CONTOURS_MAX = "SHRT_MAX"
  475. const m_FT_OUTLINE_EVEN_ODD_FILL = 0x2
  476. const m_FT_OUTLINE_HIGH_PRECISION = 0x100
  477. const m_FT_OUTLINE_IGNORE_DROPOUTS = 0x8
  478. const m_FT_OUTLINE_INCLUDE_STUBS = 0x20
  479. const m_FT_OUTLINE_NONE = 0x0
  480. const m_FT_OUTLINE_OVERLAP = 0x40
  481. const m_FT_OUTLINE_OWNER = 0x1
  482. const m_FT_OUTLINE_POINTS_MAX = "SHRT_MAX"
  483. const m_FT_OUTLINE_REVERSE_FILL = 0x4
  484. const m_FT_OUTLINE_SINGLE_PASS = 0x200
  485. const m_FT_OUTLINE_SMART_DROPOUTS = 0x10
  486. const m_FT_Outline_ConicTo_Func = "FT_Outline_ConicToFunc"
  487. const m_FT_Outline_CubicTo_Func = "FT_Outline_CubicToFunc"
  488. const m_FT_Outline_LineTo_Func = "FT_Outline_LineToFunc"
  489. const m_FT_Outline_MoveTo_Func = "FT_Outline_MoveToFunc"
  490. const m_FT_PCF_DRIVER_H = "FT_DRIVER_H"
  491. const m_FT_RASTER_FLAG_AA = 0x1
  492. const m_FT_RASTER_FLAG_CLIP = 0x4
  493. const m_FT_RASTER_FLAG_DEFAULT = 0x0
  494. const m_FT_RASTER_FLAG_DIRECT = 0x2
  495. const m_FT_RASTER_FLAG_SDF = 0x8
  496. const m_FT_RENDER_POOL_SIZE = 16384
  497. const m_FT_Raster_Done_Func = "FT_Raster_DoneFunc"
  498. const m_FT_Raster_New_Func = "FT_Raster_NewFunc"
  499. const m_FT_Raster_Render_Func = "FT_Raster_RenderFunc"
  500. const m_FT_Raster_Reset_Func = "FT_Raster_ResetFunc"
  501. const m_FT_Raster_Set_Mode_Func = "FT_Raster_SetModeFunc"
  502. const m_FT_Raster_Span_Func = "FT_SpanFunc"
  503. const m_FT_SUBGLYPH_FLAG_2X2 = 0x80
  504. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS = 1
  505. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES = 2
  506. const m_FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID = 4
  507. const m_FT_SUBGLYPH_FLAG_SCALE = 8
  508. const m_FT_SUBGLYPH_FLAG_USE_MY_METRICS = 0x200
  509. const m_FT_SUBGLYPH_FLAG_XY_SCALE = 0x40
  510. const m_FT_TRUETYPE_DRIVER_H = "FT_DRIVER_H"
  511. const m_FT_UINT_MAX = "UINT_MAX"
  512. const m_FT_ULLONG_MAX = "ULLONG_MAX"
  513. const m_FT_ULONG_MAX = "ULONG_MAX"
  514. const m_FT_USHORT_MAX = "USHRT_MAX"
  515. const m_FT_XFREE86_H = "FT_FONT_FORMATS_H"
  516. const m_FUNCPROTO = 15
  517. const m_False = 0
  518. const m_FamilyChaos = 2
  519. const m_FamilyDECnet = 1
  520. const m_FamilyInternet = 0
  521. const m_FamilyInternet6 = 6
  522. const m_FamilyServerInterpreted = 5
  523. const m_FcConfigGetRescanInverval = "FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval"
  524. const m_FcConfigSetRescanInverval = "FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval"
  525. const m_FcDontCare = 2
  526. const m_FcFalse = 0
  527. const m_FcTrue = 1
  528. const m_FillOpaqueStippled = 3
  529. const m_FillSolid = 0
  530. const m_FillStippled = 2
  531. const m_FillTiled = 1
  532. const m_FilterBest = "best"
  533. const m_FilterBilinear = "bilinear"
  534. const m_FilterConvolution = "convolution"
  535. const m_FilterFast = "fast"
  536. const m_FilterGood = "good"
  537. const m_FilterNearest = "nearest"
  538. const m_FirstExtensionError = 128
  539. const m_FocusIn = 9
  540. const m_FocusOut = 10
  541. const m_FontChange = 255
  542. const m_FontLeftToRight = 0
  543. const m_FontRightToLeft = 1
  544. const m_ForgetGravity = 0
  545. const m_GCLastBit = 22
  546. const m_GXand = 0x1
  547. const m_GXandInverted = 0x4
  548. const m_GXandReverse = 0x2
  549. const m_GXclear = 0x0
  550. const m_GXcopy = 0x3
  551. const m_GXcopyInverted = 0xc
  552. const m_GXequiv = 0x9
  553. const m_GXinvert = 0xa
  554. const m_GXnand = 0xe
  555. const m_GXnoop = 0x5
  556. const m_GXnor = 0x8
  557. const m_GXor = 0x7
  558. const m_GXorInverted = 0xd
  559. const m_GXorReverse = 0xb
  560. const m_GXset = 0xf
  561. const m_GXxor = 0x6
  562. const m_GenericEvent = 35
  563. const m_GrabFrozen = 4
  564. const m_GrabInvalidTime = 2
  565. const m_GrabModeAsync = 1
  566. const m_GrabModeSync = 0
  567. const m_GrabNotViewable = 3
  568. const m_GrabSuccess = 0
  569. const m_GraphicsExpose = 13
  570. const m_GravityNotify = 24
  571. const m_GrayScale = 1
  572. const m_HAVE_CONFIG_H = 1
  573. const m_HAVE_DLFCN_H = 1
  574. const m_HAVE_INTTYPES_H = 1
  575. const m_HAVE_MEMORY_H = 1
  576. const m_HAVE_STDINT_H = 1
  577. const m_HAVE_STDLIB_H = 1
  578. const m_HAVE_STRINGS_H = 1
  579. const m_HAVE_STRING_H = 1
  580. const m_HAVE_SYS_STAT_H = 1
  581. const m_HAVE_SYS_TYPES_H = 1
  582. const m_HAVE_UNISTD_H = 1
  583. const m_HOST_NAME_MAX = 255
  584. const m_HeightValue = 0x0008
  585. const m_HostDelete = 1
  586. const m_HostInsert = 0
  587. const m_INT16_MAX = 0x7fff
  588. const m_INT32_MAX = 0x7fffffff
  589. const m_INT64_MAX = 0x7fffffffffffffff
  590. const m_INT8_MAX = 0x7f
  591. const m_INTMAX_MAX = "INT64_MAX"
  592. const m_INTMAX_MIN = "INT64_MIN"
  593. const m_INTPTR_MAX = "INT64_MAX"
  594. const m_INTPTR_MIN = "INT64_MIN"
  595. const m_INT_FAST16_MAX = "INT32_MAX"
  596. const m_INT_FAST16_MIN = "INT32_MIN"
  597. const m_INT_FAST32_MAX = "INT32_MAX"
  598. const m_INT_FAST32_MIN = "INT32_MIN"
  599. const m_INT_FAST64_MAX = "INT64_MAX"
  600. const m_INT_FAST64_MIN = "INT64_MIN"
  601. const m_INT_FAST8_MAX = "INT8_MAX"
  602. const m_INT_FAST8_MIN = "INT8_MIN"
  603. const m_INT_LEAST16_MAX = "INT16_MAX"
  604. const m_INT_LEAST16_MIN = "INT16_MIN"
  605. const m_INT_LEAST32_MAX = "INT32_MAX"
  606. const m_INT_LEAST32_MIN = "INT32_MIN"
  607. const m_INT_LEAST64_MAX = "INT64_MAX"
  608. const m_INT_LEAST64_MIN = "INT64_MIN"
  609. const m_INT_LEAST8_MAX = "INT8_MAX"
  610. const m_INT_LEAST8_MIN = "INT8_MIN"
  611. const m_INT_MAX = 2147483647
  612. const m_IOV_MAX = 1024
  613. const m_IconicState = 3
  614. const m_InactiveState = 4
  615. const m_IncludeInferiors = 1
  616. const m_InputFocus = 1
  617. const m_InputOnly = 2
  618. const m_InputOutput = 1
  619. const m_IsUnmapped = 0
  620. const m_IsUnviewable = 1
  621. const m_IsViewable = 2
  622. const m_JoinBevel = 2
  623. const m_JoinMiter = 0
  624. const m_JoinRound = 1
  625. const m_KeyPress = 2
  626. const m_KeyRelease = 3
  627. const m_KeymapNotify = 11
  628. const m_LASTEvent = 36
  629. const m_LINE_MAX = 4096
  630. const m_LITTLE_ENDIAN = "__LITTLE_ENDIAN"
  631. const m_LLONG_MAX = 0x7fffffffffffffff
  632. const m_LOCKED = 1
  633. const m_LOGIN_NAME_MAX = 256
  634. const m_LONG_BIT = 64
  635. const m_LONG_MAX = "__LONG_MAX"
  636. const m_LSBFirst = 0
  637. const m_LT_OBJDIR = ".libs/"
  638. const m_L_ctermid = 20
  639. const m_L_cuserid = 20
  640. const m_L_tmpnam = 20
  641. const m_LastExtensionError = 255
  642. const m_LeaveNotify = 8
  643. const m_LedModeOff = 0
  644. const m_LedModeOn = 1
  645. const m_LineDoubleDash = 2
  646. const m_LineOnOffDash = 1
  647. const m_LineSolid = 0
  648. const m_LockMapIndex = 1
  649. const m_LowerHighest = 1
  650. const m_MB_LEN_MAX = 4
  651. const m_MQ_PRIO_MAX = 32768
  652. const m_MSBFirst = 1
  653. const m_MapNotify = 19
  654. const m_MapRequest = 20
  655. const m_MappingBusy = 1
  656. const m_MappingFailed = 2
  657. const m_MappingKeyboard = 1
  658. const m_MappingModifier = 0
  659. const m_MappingNotify = 34
  660. const m_MappingPointer = 2
  661. const m_MappingSuccess = 0
  662. const m_Mod1MapIndex = 3
  663. const m_Mod2MapIndex = 4
  664. const m_Mod3MapIndex = 5
  665. const m_Mod4MapIndex = 6
  666. const m_Mod5MapIndex = 7
  667. const m_MotionNotify = 6
  668. const m_NAME_MAX = 255
  669. const m_NDEBUG = 1
  670. const m_NGROUPS_MAX = 32
  671. const m_NL_ARGMAX = 9
  672. const m_NL_LANGMAX = 32
  673. const m_NL_MSGMAX = 32767
  674. const m_NL_NMAX = 16
  675. const m_NL_SETMAX = 255
  676. const m_NL_TEXTMAX = 2048
  677. const m_NZERO = 20
  678. const m_NeedFunctionPrototypes = 1
  679. const m_NeedNestedPrototypes = 1
  680. const m_NeedVarargsPrototypes = 1
  681. const m_NeedWidePrototypes = 0
  682. const m_NoEventMask = 0
  683. const m_NoExpose = 14
  684. const m_NoSymbol = 0
  685. const m_NoValue = 0x0000
  686. const m_Nonconvex = 1
  687. const m_None = 0
  688. const m_NormalState = 1
  689. const m_NorthEastGravity = 3
  690. const m_NorthGravity = 2
  691. const m_NorthWestGravity = 1
  692. const m_NotUseful = 0
  693. const m_NotifyAncestor = 0
  694. const m_NotifyDetailNone = 7
  695. const m_NotifyGrab = 1
  696. const m_NotifyHint = 1
  697. const m_NotifyInferior = 2
  698. const m_NotifyNonlinear = 3
  699. const m_NotifyNonlinearVirtual = 4
  700. const m_NotifyNormal = 0
  701. const m_NotifyPointer = 5
  702. const m_NotifyPointerRoot = 6
  703. const m_NotifyUngrab = 2
  704. const m_NotifyVirtual = 1
  705. const m_NotifyWhileGrabbed = 3
  706. const m_Opposite = 4
  707. const m_PACKAGE = "libXft"
  708. const m_PACKAGE_BUGREPORT = "https://gitlab.freedesktop.org/xorg/lib/libXft/issues"
  709. const m_PACKAGE_NAME = "libXft"
  710. const m_PACKAGE_STRING = "libXft 2.3.6"
  711. const m_PACKAGE_TARNAME = "libXft"
  712. const m_PACKAGE_URL = ""
  713. const m_PACKAGE_VERSION = "2.3.6"
  714. const m_PACKAGE_VERSION_MAJOR = 2
  715. const m_PACKAGE_VERSION_MINOR = 3
  716. const m_PACKAGE_VERSION_PATCHLEVEL = 6
  717. const m_PATH_MAX = 4096
  718. const m_PDP_ENDIAN = "__PDP_ENDIAN"
  719. const m_PIPE_BUF = 4096
  720. const m_PTHREAD_CANCEL_ASYNCHRONOUS = 1
  721. const m_PTHREAD_CANCEL_DEFERRED = 0
  722. const m_PTHREAD_CANCEL_DISABLE = 1
  723. const m_PTHREAD_CANCEL_ENABLE = 0
  724. const m_PTHREAD_CANCEL_MASKED = 2
  725. const m_PTHREAD_CREATE_DETACHED = 1
  726. const m_PTHREAD_CREATE_JOINABLE = 0
  727. const m_PTHREAD_DESTRUCTOR_ITERATIONS = 4
  728. const m_PTHREAD_EXPLICIT_SCHED = 1
  729. const m_PTHREAD_INHERIT_SCHED = 0
  730. const m_PTHREAD_KEYS_MAX = 128
  731. const m_PTHREAD_MUTEX_DEFAULT = 0
  732. const m_PTHREAD_MUTEX_ERRORCHECK = 2
  733. const m_PTHREAD_MUTEX_NORMAL = 0
  734. const m_PTHREAD_MUTEX_RECURSIVE = 1
  735. const m_PTHREAD_MUTEX_ROBUST = 1
  736. const m_PTHREAD_MUTEX_STALLED = 0
  737. const m_PTHREAD_ONCE_INIT = 0
  738. const m_PTHREAD_PRIO_INHERIT = 1
  739. const m_PTHREAD_PRIO_NONE = 0
  740. const m_PTHREAD_PRIO_PROTECT = 2
  741. const m_PTHREAD_PROCESS_PRIVATE = 0
  742. const m_PTHREAD_PROCESS_SHARED = 1
  743. const m_PTHREAD_SCOPE_PROCESS = 1
  744. const m_PTHREAD_SCOPE_SYSTEM = 0
  745. const m_PTHREAD_STACK_MIN = 2048
  746. const m_PTRDIFF_MAX = "INT64_MAX"
  747. const m_PTRDIFF_MIN = "INT64_MIN"
  748. const m_PTSPERBATCH = 1024
  749. const m_P_tmpdir = "/tmp"
  750. const m_ParentRelative = 1
  751. const m_PictOpAdd = 12
  752. const m_PictOpAtop = 9
  753. const m_PictOpAtopReverse = 10
  754. const m_PictOpBlendMaximum = 0x3e
  755. const m_PictOpBlendMinimum = 0x30
  756. const m_PictOpClear = 0
  757. const m_PictOpColorBurn = 0x36
  758. const m_PictOpColorDodge = 0x35
  759. const m_PictOpConjointAtop = 0x29
  760. const m_PictOpConjointAtopReverse = 0x2a
  761. const m_PictOpConjointClear = 0x20
  762. const m_PictOpConjointDst = 0x22
  763. const m_PictOpConjointIn = 0x25
  764. const m_PictOpConjointInReverse = 0x26
  765. const m_PictOpConjointMaximum = 0x2b
  766. const m_PictOpConjointMinimum = 0x20
  767. const m_PictOpConjointOut = 0x27
  768. const m_PictOpConjointOutReverse = 0x28
  769. const m_PictOpConjointOver = 0x23
  770. const m_PictOpConjointOverReverse = 0x24
  771. const m_PictOpConjointSrc = 0x21
  772. const m_PictOpConjointXor = 0x2b
  773. const m_PictOpDarken = 0x33
  774. const m_PictOpDifference = 0x39
  775. const m_PictOpDisjointAtop = 0x19
  776. const m_PictOpDisjointAtopReverse = 0x1a
  777. const m_PictOpDisjointClear = 0x10
  778. const m_PictOpDisjointDst = 0x12
  779. const m_PictOpDisjointIn = 0x15
  780. const m_PictOpDisjointInReverse = 0x16
  781. const m_PictOpDisjointMaximum = 0x1b
  782. const m_PictOpDisjointMinimum = 0x10
  783. const m_PictOpDisjointOut = 0x17
  784. const m_PictOpDisjointOutReverse = 0x18
  785. const m_PictOpDisjointOver = 0x13
  786. const m_PictOpDisjointOverReverse = 0x14
  787. const m_PictOpDisjointSrc = 0x11
  788. const m_PictOpDisjointXor = 0x1b
  789. const m_PictOpDst = 2
  790. const m_PictOpExclusion = 0x3a
  791. const m_PictOpHSLColor = 0x3d
  792. const m_PictOpHSLHue = 0x3b
  793. const m_PictOpHSLLuminosity = 0x3e
  794. const m_PictOpHSLSaturation = 0x3c
  795. const m_PictOpHardLight = 0x37
  796. const m_PictOpIn = 5
  797. const m_PictOpInReverse = 6
  798. const m_PictOpLighten = 0x34
  799. const m_PictOpMaximum = 13
  800. const m_PictOpMinimum = 0
  801. const m_PictOpMultiply = 0x30
  802. const m_PictOpOut = 7
  803. const m_PictOpOutReverse = 8
  804. const m_PictOpOver = 3
  805. const m_PictOpOverReverse = 4
  806. const m_PictOpOverlay = 0x32
  807. const m_PictOpSaturate = 13
  808. const m_PictOpScreen = 0x31
  809. const m_PictOpSoftLight = 0x38
  810. const m_PictOpSrc = 1
  811. const m_PictOpXor = 11
  812. const m_PictStandardA1 = 4
  813. const m_PictStandardA4 = 3
  814. const m_PictStandardA8 = 2
  815. const m_PictStandardARGB32 = 0
  816. const m_PictStandardNUM = 5
  817. const m_PictStandardRGB24 = 1
  818. const m_PictTypeDirect = 1
  819. const m_PictTypeIndexed = 0
  820. const m_PlaceOnBottom = 1
  821. const m_PlaceOnTop = 0
  822. const m_PointerRoot = 1
  823. const m_PointerWindow = 0
  824. const m_PolyEdgeSharp = 0
  825. const m_PolyEdgeSmooth = 1
  826. const m_PolyModeImprecise = 1
  827. const m_PolyModePrecise = 0
  828. const m_PreferBlanking = 1
  829. const m_PropModeAppend = 2
  830. const m_PropModePrepend = 1
  831. const m_PropModeReplace = 0
  832. const m_PropertyDelete = 1
  833. const m_PropertyNewValue = 0
  834. const m_PropertyNotify = 28
  835. const m_PseudoColor = 3
  836. const m_QueuedAfterFlush = 2
  837. const m_QueuedAfterReading = 1
  838. const m_QueuedAlready = 0
  839. const m_RAND_MAX = 0x7fffffff
  840. const m_RENDER_MAJOR = 0
  841. const m_RENDER_MINOR = 11
  842. const m_RENDER_NAME = "RENDER"
  843. const m_RE_DUP_MAX = 255
  844. const m_RaiseLowest = 0
  845. const m_RectangleIn = 1
  846. const m_RectangleOut = 0
  847. const m_RectanglePart = 2
  848. const m_ReparentNotify = 21
  849. const m_RepeatNone = 0
  850. const m_RepeatNormal = 1
  851. const m_RepeatPad = 2
  852. const m_RepeatReflect = 3
  853. const m_ReplayKeyboard = 5
  854. const m_ReplayPointer = 2
  855. const m_ResizeRequest = 25
  856. const m_RetainPermanent = 1
  857. const m_RetainTemporary = 2
  858. const m_RevertToParent = 2
  859. const m_SCHAR_MAX = 127
  860. const m_SCHED_BATCH = 3
  861. const m_SCHED_DEADLINE = 6
  862. const m_SCHED_FIFO = 1
  863. const m_SCHED_IDLE = 5
  864. const m_SCHED_OTHER = 0
  865. const m_SCHED_RESET_ON_FORK = 0x40000000
  866. const m_SCHED_RR = 2
  867. const m_SEM_NSEMS_MAX = 256
  868. const m_SEM_VALUE_MAX = 0x7fffffff
  869. const m_SHRT_MAX = 0x7fff
  870. const m_SIG_ATOMIC_MAX = "INT32_MAX"
  871. const m_SIG_ATOMIC_MIN = "INT32_MIN"
  872. const m_SIZE_MAX = "UINT64_MAX"
  873. const m_SSIZE_MAX = "LONG_MAX"
  874. const m_STATX_ALL = 0xfff
  875. const m_STATX_ATIME = 0x20
  876. const m_STATX_BASIC_STATS = 0x7ff
  877. const m_STATX_BLOCKS = 0x400
  878. const m_STATX_BTIME = 0x800
  879. const m_STATX_CTIME = 0x80
  880. const m_STATX_GID = 0x10
  881. const m_STATX_INO = 0x100
  882. const m_STATX_MODE = 2
  883. const m_STATX_MTIME = 0x40
  884. const m_STATX_NLINK = 4
  885. const m_STATX_SIZE = 0x200
  886. const m_STATX_TYPE = 1
  887. const m_STATX_UID = 8
  888. const m_STDC_HEADERS = 1
  889. const m_SYMLOOP_MAX = 40
  890. const m_S_IEXEC = "S_IXUSR"
  891. const m_S_IFBLK = 0060000
  892. const m_S_IFCHR = 0020000
  893. const m_S_IFDIR = 0040000
  894. const m_S_IFIFO = 0010000
  895. const m_S_IFLNK = 0120000
  896. const m_S_IFMT = 0170000
  897. const m_S_IFREG = 0100000
  898. const m_S_IFSOCK = 0140000
  899. const m_S_IREAD = "S_IRUSR"
  900. const m_S_IRGRP = 0040
  901. const m_S_IROTH = 0004
  902. const m_S_IRUSR = 0400
  903. const m_S_IRWXG = 0070
  904. const m_S_IRWXO = 0007
  905. const m_S_IRWXU = 0700
  906. const m_S_ISGID = 02000
  907. const m_S_ISUID = 04000
  908. const m_S_ISVTX = 01000
  909. const m_S_IWGRP = 0020
  910. const m_S_IWOTH = 0002
  911. const m_S_IWRITE = "S_IWUSR"
  912. const m_S_IWUSR = 0200
  913. const m_S_IXGRP = 0010
  914. const m_S_IXOTH = 0001
  915. const m_S_IXUSR = 0100
  916. const m_ScreenSaverActive = 1
  917. const m_ScreenSaverReset = 0
  918. const m_SelectionClear = 29
  919. const m_SelectionNotify = 31
  920. const m_SelectionRequest = 30
  921. const m_SetModeDelete = 1
  922. const m_SetModeInsert = 0
  923. const m_ShiftMapIndex = 0
  924. const m_SouthEastGravity = 9
  925. const m_SouthGravity = 8
  926. const m_SouthWestGravity = 7
  927. const m_StaticColor = 2
  928. const m_StaticGravity = 10
  929. const m_StaticGray = 0
  930. const m_Status = "int"
  931. const m_StippleShape = 2
  932. const m_SubPixelHorizontalBGR = 2
  933. const m_SubPixelHorizontalRGB = 1
  934. const m_SubPixelNone = 5
  935. const m_SubPixelUnknown = 0
  936. const m_SubPixelVerticalBGR = 4
  937. const m_SubPixelVerticalRGB = 3
  938. const m_Success = 0
  939. const m_SyncBoth = 7
  940. const m_SyncKeyboard = 4
  941. const m_SyncPointer = 1
  942. const m_T1_MAX_CHARSTRINGS_OPERANDS = 256
  943. const m_T1_MAX_DICT_DEPTH = 5
  944. const m_T1_MAX_SUBRS_CALLS = 16
  945. const m_TIMER_ABSTIME = 1
  946. const m_TIME_UTC = 1
  947. const m_TMP_MAX = 10000
  948. const m_TTY_NAME_MAX = 32
  949. const m_TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES = 1000000
  950. const m_TZNAME_MAX = 6
  951. const m_TileShape = 1
  952. const m_TopIf = 2
  953. const m_True = 1
  954. const m_TrueColor = 4
  955. const m_UCHAR_MAX = 255
  956. const m_UINT16_MAX = 0xffff
  957. const m_UINT32_MAX = "0xffffffffu"
  958. const m_UINT64_MAX = "0xffffffffffffffffu"
  959. const m_UINT8_MAX = 0xff
  960. const m_UINTMAX_MAX = "UINT64_MAX"
  961. const m_UINTPTR_MAX = "UINT64_MAX"
  962. const m_UINT_FAST16_MAX = "UINT32_MAX"
  963. const m_UINT_FAST32_MAX = "UINT32_MAX"
  964. const m_UINT_FAST64_MAX = "UINT64_MAX"
  965. const m_UINT_FAST8_MAX = "UINT8_MAX"
  966. const m_UINT_LEAST16_MAX = "UINT16_MAX"
  967. const m_UINT_LEAST32_MAX = "UINT32_MAX"
  968. const m_UINT_LEAST64_MAX = "UINT64_MAX"
  969. const m_UINT_LEAST8_MAX = "UINT8_MAX"
  970. const m_UINT_MAX = 0xffffffff
  971. const m_UNLOCKED = 0
  972. const m_USHRT_MAX = 0xffff
  973. const m_UTIME_NOW = 0x3fffffff
  974. const m_UTIME_OMIT = 0x3ffffffe
  975. const m_UnmapGravity = 0
  976. const m_UnmapNotify = 18
  977. const m_Unsorted = 0
  978. const m_VERSION = "2.3.6"
  979. const m_VisibilityFullyObscured = 2
  980. const m_VisibilityNotify = 15
  981. const m_VisibilityPartiallyObscured = 1
  982. const m_VisibilityUnobscured = 0
  983. const m_VisualAllMask = 0x1FF
  984. const m_VisualBitsPerRGBMask = 0x100
  985. const m_VisualBlueMaskMask = 0x40
  986. const m_VisualClassMask = 0x8
  987. const m_VisualColormapSizeMask = 0x80
  988. const m_VisualDepthMask = 0x4
  989. const m_VisualGreenMaskMask = 0x20
  990. const m_VisualIDMask = 0x1
  991. const m_VisualNoMask = 0x0
  992. const m_VisualRedMaskMask = 0x10
  993. const m_VisualScreenMask = 0x2
  994. const m_WINT_MAX = "UINT32_MAX"
  995. const m_WINT_MIN = 0
  996. const m_WLNSPERBATCH = 50
  997. const m_WNOHANG = 1
  998. const m_WORD_BIT = 32
  999. const m_WRCTSPERBATCH = 10
  1000. const m_WUNTRACED = 2
  1001. const m_WestGravity = 4
  1002. const m_WhenMapped = 1
  1003. const m_WidthValue = 0x0004
  1004. const m_WindingRule = 1
  1005. const m_WithdrawnState = 0
  1006. const m_XCNOENT = 2
  1007. const m_XCNOMEM = 1
  1008. const m_XCSUCCESS = 0
  1009. const m_XFT_ASSUME_PIXMAP = 20
  1010. const m_XFT_CORE = "core"
  1011. const m_XFT_DBG_CACHE = 128
  1012. const m_XFT_DBG_CACHEV = 256
  1013. const m_XFT_DBG_DRAW = 8
  1014. const m_XFT_DBG_GLYPH = 32
  1015. const m_XFT_DBG_GLYPHV = 64
  1016. const m_XFT_DBG_MEMORY = 512
  1017. const m_XFT_DBG_OPEN = 1
  1018. const m_XFT_DBG_OPENV = 2
  1019. const m_XFT_DBG_REF = 16
  1020. const m_XFT_DBG_RENDER = 4
  1021. const m_XFT_DBG_USAGE = 1024
  1022. const m_XFT_DPY_MAX_UNREF_FONTS = 16
  1023. const m_XFT_MAJOR = 2
  1024. const m_XFT_MAX_GLYPH_MEMORY = "maxglyphmemory"
  1025. const m_XFT_MAX_UNREF_FONTS = "maxunreffonts"
  1026. const m_XFT_MINOR = 3
  1027. const m_XFT_NMISSING = 256
  1028. const m_XFT_NUM_FONT_HASH = 127
  1029. const m_XFT_NUM_SOLID_COLOR = 16
  1030. const m_XFT_RENDER = "render"
  1031. const m_XFT_REVISION = 6
  1032. const m_XFT_TRACK_MEM_USAGE = "trackmemusage"
  1033. const m_XFT_XLFD = "xlfd"
  1034. const m_XIMHotKeyStateOFF = 0x0002
  1035. const m_XIMHotKeyStateON = 0x0001
  1036. const m_XIMInitialState = 1
  1037. const m_XIMPreeditArea = 0x0001
  1038. const m_XIMPreeditCallbacks = 0x0002
  1039. const m_XIMPreeditEnable = 1
  1040. const m_XIMPreeditNone = 0x0010
  1041. const m_XIMPreeditNothing = 0x0008
  1042. const m_XIMPreeditPosition = 0x0004
  1043. const m_XIMPreeditUnKnown = 0
  1044. const m_XIMReverse = 1
  1045. const m_XIMStatusArea = 0x0100
  1046. const m_XIMStatusCallbacks = 0x0200
  1047. const m_XIMStatusNone = 0x0800
  1048. const m_XIMStatusNothing = 0x0400
  1049. const m_XIMStringConversionBottomEdge = 0x00000008
  1050. const m_XIMStringConversionBuffer = 0x0001
  1051. const m_XIMStringConversionChar = 0x0004
  1052. const m_XIMStringConversionConcealed = 0x00000010
  1053. const m_XIMStringConversionLeftEdge = 0x00000001
  1054. const m_XIMStringConversionLine = 0x0002
  1055. const m_XIMStringConversionRetrieval = 0x0002
  1056. const m_XIMStringConversionRightEdge = 0x00000002
  1057. const m_XIMStringConversionSubstitution = 0x0001
  1058. const m_XIMStringConversionTopEdge = 0x00000004
  1059. const m_XIMStringConversionWord = 0x0003
  1060. const m_XIMStringConversionWrapped = 0x00000020
  1061. const m_XK_0 = 0x0030
  1062. const m_XK_1 = 0x0031
  1063. const m_XK_2 = 0x0032
  1064. const m_XK_3 = 0x0033
  1065. const m_XK_4 = 0x0034
  1066. const m_XK_5 = 0x0035
  1067. const m_XK_6 = 0x0036
  1068. const m_XK_7 = 0x0037
  1069. const m_XK_8 = 0x0038
  1070. const m_XK_9 = 0x0039
  1071. const m_XK_A = 0x0041
  1072. const m_XK_AE = 0x00c6
  1073. const m_XK_Aacute = 0x00c1
  1074. const m_XK_Abelowdot = 0x1001ea0
  1075. const m_XK_Abreve = 0x01c3
  1076. const m_XK_Abreveacute = 0x1001eae
  1077. const m_XK_Abrevebelowdot = 0x1001eb6
  1078. const m_XK_Abrevegrave = 0x1001eb0
  1079. const m_XK_Abrevehook = 0x1001eb2
  1080. const m_XK_Abrevetilde = 0x1001eb4
  1081. const m_XK_AccessX_Enable = 0xfe70
  1082. const m_XK_AccessX_Feedback_Enable = 0xfe71
  1083. const m_XK_Acircumflex = 0x00c2
  1084. const m_XK_Acircumflexacute = 0x1001ea4
  1085. const m_XK_Acircumflexbelowdot = 0x1001eac
  1086. const m_XK_Acircumflexgrave = 0x1001ea6
  1087. const m_XK_Acircumflexhook = 0x1001ea8
  1088. const m_XK_Acircumflextilde = 0x1001eaa
  1089. const m_XK_Adiaeresis = 0x00c4
  1090. const m_XK_Agrave = 0x00c0
  1091. const m_XK_Ahook = 0x1001ea2
  1092. const m_XK_Alt_L = 0xffe9
  1093. const m_XK_Alt_R = 0xffea
  1094. const m_XK_Amacron = 0x03c0
  1095. const m_XK_Aogonek = 0x01a1
  1096. const m_XK_Arabic_0 = 0x1000660
  1097. const m_XK_Arabic_1 = 0x1000661
  1098. const m_XK_Arabic_2 = 0x1000662
  1099. const m_XK_Arabic_3 = 0x1000663
  1100. const m_XK_Arabic_4 = 0x1000664
  1101. const m_XK_Arabic_5 = 0x1000665
  1102. const m_XK_Arabic_6 = 0x1000666
  1103. const m_XK_Arabic_7 = 0x1000667
  1104. const m_XK_Arabic_8 = 0x1000668
  1105. const m_XK_Arabic_9 = 0x1000669
  1106. const m_XK_Arabic_ain = 0x05d9
  1107. const m_XK_Arabic_alef = 0x05c7
  1108. const m_XK_Arabic_alefmaksura = 0x05e9
  1109. const m_XK_Arabic_beh = 0x05c8
  1110. const m_XK_Arabic_comma = 0x05ac
  1111. const m_XK_Arabic_dad = 0x05d6
  1112. const m_XK_Arabic_dal = 0x05cf
  1113. const m_XK_Arabic_damma = 0x05ef
  1114. const m_XK_Arabic_dammatan = 0x05ec
  1115. const m_XK_Arabic_ddal = 0x1000688
  1116. const m_XK_Arabic_farsi_yeh = 0x10006cc
  1117. const m_XK_Arabic_fatha = 0x05ee
  1118. const m_XK_Arabic_fathatan = 0x05eb
  1119. const m_XK_Arabic_feh = 0x05e1
  1120. const m_XK_Arabic_fullstop = 0x10006d4
  1121. const m_XK_Arabic_gaf = 0x10006af
  1122. const m_XK_Arabic_ghain = 0x05da
  1123. const m_XK_Arabic_ha = 0x05e7
  1124. const m_XK_Arabic_hah = 0x05cd
  1125. const m_XK_Arabic_hamza = 0x05c1
  1126. const m_XK_Arabic_hamza_above = 0x1000654
  1127. const m_XK_Arabic_hamza_below = 0x1000655
  1128. const m_XK_Arabic_hamzaonalef = 0x05c3
  1129. const m_XK_Arabic_hamzaonwaw = 0x05c4
  1130. const m_XK_Arabic_hamzaonyeh = 0x05c6
  1131. const m_XK_Arabic_hamzaunderalef = 0x05c5
  1132. const m_XK_Arabic_heh = 0x05e7
  1133. const m_XK_Arabic_heh_doachashmee = 0x10006be
  1134. const m_XK_Arabic_heh_goal = 0x10006c1
  1135. const m_XK_Arabic_jeem = 0x05cc
  1136. const m_XK_Arabic_jeh = 0x1000698
  1137. const m_XK_Arabic_kaf = 0x05e3
  1138. const m_XK_Arabic_kasra = 0x05f0
  1139. const m_XK_Arabic_kasratan = 0x05ed
  1140. const m_XK_Arabic_keheh = 0x10006a9
  1141. const m_XK_Arabic_khah = 0x05ce
  1142. const m_XK_Arabic_lam = 0x05e4
  1143. const m_XK_Arabic_madda_above = 0x1000653
  1144. const m_XK_Arabic_maddaonalef = 0x05c2
  1145. const m_XK_Arabic_meem = 0x05e5
  1146. const m_XK_Arabic_noon = 0x05e6
  1147. const m_XK_Arabic_noon_ghunna = 0x10006ba
  1148. const m_XK_Arabic_peh = 0x100067e
  1149. const m_XK_Arabic_percent = 0x100066a
  1150. const m_XK_Arabic_qaf = 0x05e2
  1151. const m_XK_Arabic_question_mark = 0x05bf
  1152. const m_XK_Arabic_ra = 0x05d1
  1153. const m_XK_Arabic_rreh = 0x1000691
  1154. const m_XK_Arabic_sad = 0x05d5
  1155. const m_XK_Arabic_seen = 0x05d3
  1156. const m_XK_Arabic_semicolon = 0x05bb
  1157. const m_XK_Arabic_shadda = 0x05f1
  1158. const m_XK_Arabic_sheen = 0x05d4
  1159. const m_XK_Arabic_sukun = 0x05f2
  1160. const m_XK_Arabic_superscript_alef = 0x1000670
  1161. const m_XK_Arabic_switch = 0xff7e
  1162. const m_XK_Arabic_tah = 0x05d7
  1163. const m_XK_Arabic_tatweel = 0x05e0
  1164. const m_XK_Arabic_tcheh = 0x1000686
  1165. const m_XK_Arabic_teh = 0x05ca
  1166. const m_XK_Arabic_tehmarbuta = 0x05c9
  1167. const m_XK_Arabic_thal = 0x05d0
  1168. const m_XK_Arabic_theh = 0x05cb
  1169. const m_XK_Arabic_tteh = 0x1000679
  1170. const m_XK_Arabic_veh = 0x10006a4
  1171. const m_XK_Arabic_waw = 0x05e8
  1172. const m_XK_Arabic_yeh = 0x05ea
  1173. const m_XK_Arabic_yeh_baree = 0x10006d2
  1174. const m_XK_Arabic_zah = 0x05d8
  1175. const m_XK_Arabic_zain = 0x05d2
  1176. const m_XK_Aring = 0x00c5
  1177. const m_XK_Armenian_AT = 0x1000538
  1178. const m_XK_Armenian_AYB = 0x1000531
  1179. const m_XK_Armenian_BEN = 0x1000532
  1180. const m_XK_Armenian_CHA = 0x1000549
  1181. const m_XK_Armenian_DA = 0x1000534
  1182. const m_XK_Armenian_DZA = 0x1000541
  1183. const m_XK_Armenian_E = 0x1000537
  1184. const m_XK_Armenian_FE = 0x1000556
  1185. const m_XK_Armenian_GHAT = 0x1000542
  1186. const m_XK_Armenian_GIM = 0x1000533
  1187. const m_XK_Armenian_HI = 0x1000545
  1188. const m_XK_Armenian_HO = 0x1000540
  1189. const m_XK_Armenian_INI = 0x100053b
  1190. const m_XK_Armenian_JE = 0x100054b
  1191. const m_XK_Armenian_KE = 0x1000554
  1192. const m_XK_Armenian_KEN = 0x100053f
  1193. const m_XK_Armenian_KHE = 0x100053d
  1194. const m_XK_Armenian_LYUN = 0x100053c
  1195. const m_XK_Armenian_MEN = 0x1000544
  1196. const m_XK_Armenian_NU = 0x1000546
  1197. const m_XK_Armenian_O = 0x1000555
  1198. const m_XK_Armenian_PE = 0x100054a
  1199. const m_XK_Armenian_PYUR = 0x1000553
  1200. const m_XK_Armenian_RA = 0x100054c
  1201. const m_XK_Armenian_RE = 0x1000550
  1202. const m_XK_Armenian_SE = 0x100054d
  1203. const m_XK_Armenian_SHA = 0x1000547
  1204. const m_XK_Armenian_TCHE = 0x1000543
  1205. const m_XK_Armenian_TO = 0x1000539
  1206. const m_XK_Armenian_TSA = 0x100053e
  1207. const m_XK_Armenian_TSO = 0x1000551
  1208. const m_XK_Armenian_TYUN = 0x100054f
  1209. const m_XK_Armenian_VEV = 0x100054e
  1210. const m_XK_Armenian_VO = 0x1000548
  1211. const m_XK_Armenian_VYUN = 0x1000552
  1212. const m_XK_Armenian_YECH = 0x1000535
  1213. const m_XK_Armenian_ZA = 0x1000536
  1214. const m_XK_Armenian_ZHE = 0x100053a
  1215. const m_XK_Armenian_accent = 0x100055b
  1216. const m_XK_Armenian_amanak = 0x100055c
  1217. const m_XK_Armenian_apostrophe = 0x100055a
  1218. const m_XK_Armenian_at = 0x1000568
  1219. const m_XK_Armenian_ayb = 0x1000561
  1220. const m_XK_Armenian_ben = 0x1000562
  1221. const m_XK_Armenian_but = 0x100055d
  1222. const m_XK_Armenian_cha = 0x1000579
  1223. const m_XK_Armenian_da = 0x1000564
  1224. const m_XK_Armenian_dza = 0x1000571
  1225. const m_XK_Armenian_e = 0x1000567
  1226. const m_XK_Armenian_exclam = 0x100055c
  1227. const m_XK_Armenian_fe = 0x1000586
  1228. const m_XK_Armenian_full_stop = 0x1000589
  1229. const m_XK_Armenian_ghat = 0x1000572
  1230. const m_XK_Armenian_gim = 0x1000563
  1231. const m_XK_Armenian_hi = 0x1000575
  1232. const m_XK_Armenian_ho = 0x1000570
  1233. const m_XK_Armenian_hyphen = 0x100058a
  1234. const m_XK_Armenian_ini = 0x100056b
  1235. const m_XK_Armenian_je = 0x100057b
  1236. const m_XK_Armenian_ke = 0x1000584
  1237. const m_XK_Armenian_ken = 0x100056f
  1238. const m_XK_Armenian_khe = 0x100056d
  1239. const m_XK_Armenian_ligature_ew = 0x1000587
  1240. const m_XK_Armenian_lyun = 0x100056c
  1241. const m_XK_Armenian_men = 0x1000574
  1242. const m_XK_Armenian_nu = 0x1000576
  1243. const m_XK_Armenian_o = 0x1000585
  1244. const m_XK_Armenian_paruyk = 0x100055e
  1245. const m_XK_Armenian_pe = 0x100057a
  1246. const m_XK_Armenian_pyur = 0x1000583
  1247. const m_XK_Armenian_question = 0x100055e
  1248. const m_XK_Armenian_ra = 0x100057c
  1249. const m_XK_Armenian_re = 0x1000580
  1250. const m_XK_Armenian_se = 0x100057d
  1251. const m_XK_Armenian_separation_mark = 0x100055d
  1252. const m_XK_Armenian_sha = 0x1000577
  1253. const m_XK_Armenian_shesht = 0x100055b
  1254. const m_XK_Armenian_tche = 0x1000573
  1255. const m_XK_Armenian_to = 0x1000569
  1256. const m_XK_Armenian_tsa = 0x100056e
  1257. const m_XK_Armenian_tso = 0x1000581
  1258. const m_XK_Armenian_tyun = 0x100057f
  1259. const m_XK_Armenian_verjaket = 0x1000589
  1260. const m_XK_Armenian_vev = 0x100057e
  1261. const m_XK_Armenian_vo = 0x1000578
  1262. const m_XK_Armenian_vyun = 0x1000582
  1263. const m_XK_Armenian_yech = 0x1000565
  1264. const m_XK_Armenian_yentamna = 0x100058a
  1265. const m_XK_Armenian_za = 0x1000566
  1266. const m_XK_Armenian_zhe = 0x100056a
  1267. const m_XK_Atilde = 0x00c3
  1268. const m_XK_AudibleBell_Enable = 0xfe7a
  1269. const m_XK_B = 0x0042
  1270. const m_XK_Babovedot = 0x1001e02
  1271. const m_XK_BackSpace = 0xff08
  1272. const m_XK_Begin = 0xff58
  1273. const m_XK_BounceKeys_Enable = 0xfe74
  1274. const m_XK_Break = 0xff6b
  1275. const m_XK_Byelorussian_SHORTU = 0x06be
  1276. const m_XK_Byelorussian_shortu = 0x06ae
  1277. const m_XK_C = 0x0043
  1278. const m_XK_CH = 0xfea2
  1279. const m_XK_C_H = 0xfea5
  1280. const m_XK_C_h = 0xfea4
  1281. const m_XK_Cabovedot = 0x02c5
  1282. const m_XK_Cacute = 0x01c6
  1283. const m_XK_Cancel = 0xff69
  1284. const m_XK_Caps_Lock = 0xffe5
  1285. const m_XK_Ccaron = 0x01c8
  1286. const m_XK_Ccedilla = 0x00c7
  1287. const m_XK_Ccircumflex = 0x02c6
  1288. const m_XK_Ch = 0xfea1
  1289. const m_XK_Clear = 0xff0b
  1290. const m_XK_Codeinput = 0xff37
  1291. const m_XK_ColonSign = 0x10020a1
  1292. const m_XK_Control_L = 0xffe3
  1293. const m_XK_Control_R = 0xffe4
  1294. const m_XK_CruzeiroSign = 0x10020a2
  1295. const m_XK_Cyrillic_A = 0x06e1
  1296. const m_XK_Cyrillic_BE = 0x06e2
  1297. const m_XK_Cyrillic_CHE = 0x06fe
  1298. const m_XK_Cyrillic_CHE_descender = 0x10004b6
  1299. const m_XK_Cyrillic_CHE_vertstroke = 0x10004b8
  1300. const m_XK_Cyrillic_DE = 0x06e4
  1301. const m_XK_Cyrillic_DZHE = 0x06bf
  1302. const m_XK_Cyrillic_E = 0x06fc
  1303. const m_XK_Cyrillic_EF = 0x06e6
  1304. const m_XK_Cyrillic_EL = 0x06ec
  1305. const m_XK_Cyrillic_EM = 0x06ed
  1306. const m_XK_Cyrillic_EN = 0x06ee
  1307. const m_XK_Cyrillic_EN_descender = 0x10004a2
  1308. const m_XK_Cyrillic_ER = 0x06f2
  1309. const m_XK_Cyrillic_ES = 0x06f3
  1310. const m_XK_Cyrillic_GHE = 0x06e7
  1311. const m_XK_Cyrillic_GHE_bar = 0x1000492
  1312. const m_XK_Cyrillic_HA = 0x06e8
  1313. const m_XK_Cyrillic_HARDSIGN = 0x06ff
  1314. const m_XK_Cyrillic_HA_descender = 0x10004b2
  1315. const m_XK_Cyrillic_I = 0x06e9
  1316. const m_XK_Cyrillic_IE = 0x06e5
  1317. const m_XK_Cyrillic_IO = 0x06b3
  1318. const m_XK_Cyrillic_I_macron = 0x10004e2
  1319. const m_XK_Cyrillic_JE = 0x06b8
  1320. const m_XK_Cyrillic_KA = 0x06eb
  1321. const m_XK_Cyrillic_KA_descender = 0x100049a
  1322. const m_XK_Cyrillic_KA_vertstroke = 0x100049c
  1323. const m_XK_Cyrillic_LJE = 0x06b9
  1324. const m_XK_Cyrillic_NJE = 0x06ba
  1325. const m_XK_Cyrillic_O = 0x06ef
  1326. const m_XK_Cyrillic_O_bar = 0x10004e8
  1327. const m_XK_Cyrillic_PE = 0x06f0
  1328. const m_XK_Cyrillic_SCHWA = 0x10004d8
  1329. const m_XK_Cyrillic_SHA = 0x06fb
  1330. const m_XK_Cyrillic_SHCHA = 0x06fd
  1331. const m_XK_Cyrillic_SHHA = 0x10004ba
  1332. const m_XK_Cyrillic_SHORTI = 0x06ea
  1333. const m_XK_Cyrillic_SOFTSIGN = 0x06f8
  1334. const m_XK_Cyrillic_TE = 0x06f4
  1335. const m_XK_Cyrillic_TSE = 0x06e3
  1336. const m_XK_Cyrillic_U = 0x06f5
  1337. const m_XK_Cyrillic_U_macron = 0x10004ee
  1338. const m_XK_Cyrillic_U_straight = 0x10004ae
  1339. const m_XK_Cyrillic_U_straight_bar = 0x10004b0
  1340. const m_XK_Cyrillic_VE = 0x06f7
  1341. const m_XK_Cyrillic_YA = 0x06f1
  1342. const m_XK_Cyrillic_YERU = 0x06f9
  1343. const m_XK_Cyrillic_YU = 0x06e0
  1344. const m_XK_Cyrillic_ZE = 0x06fa
  1345. const m_XK_Cyrillic_ZHE = 0x06f6
  1346. const m_XK_Cyrillic_ZHE_descender = 0x1000496
  1347. const m_XK_Cyrillic_a = 0x06c1
  1348. const m_XK_Cyrillic_be = 0x06c2
  1349. const m_XK_Cyrillic_che = 0x06de
  1350. const m_XK_Cyrillic_che_descender = 0x10004b7
  1351. const m_XK_Cyrillic_che_vertstroke = 0x10004b9
  1352. const m_XK_Cyrillic_de = 0x06c4
  1353. const m_XK_Cyrillic_dzhe = 0x06af
  1354. const m_XK_Cyrillic_e = 0x06dc
  1355. const m_XK_Cyrillic_ef = 0x06c6
  1356. const m_XK_Cyrillic_el = 0x06cc
  1357. const m_XK_Cyrillic_em = 0x06cd
  1358. const m_XK_Cyrillic_en = 0x06ce
  1359. const m_XK_Cyrillic_en_descender = 0x10004a3
  1360. const m_XK_Cyrillic_er = 0x06d2
  1361. const m_XK_Cyrillic_es = 0x06d3
  1362. const m_XK_Cyrillic_ghe = 0x06c7
  1363. const m_XK_Cyrillic_ghe_bar = 0x1000493
  1364. const m_XK_Cyrillic_ha = 0x06c8
  1365. const m_XK_Cyrillic_ha_descender = 0x10004b3
  1366. const m_XK_Cyrillic_hardsign = 0x06df
  1367. const m_XK_Cyrillic_i = 0x06c9
  1368. const m_XK_Cyrillic_i_macron = 0x10004e3
  1369. const m_XK_Cyrillic_ie = 0x06c5
  1370. const m_XK_Cyrillic_io = 0x06a3
  1371. const m_XK_Cyrillic_je = 0x06a8
  1372. const m_XK_Cyrillic_ka = 0x06cb
  1373. const m_XK_Cyrillic_ka_descender = 0x100049b
  1374. const m_XK_Cyrillic_ka_vertstroke = 0x100049d
  1375. const m_XK_Cyrillic_lje = 0x06a9
  1376. const m_XK_Cyrillic_nje = 0x06aa
  1377. const m_XK_Cyrillic_o = 0x06cf
  1378. const m_XK_Cyrillic_o_bar = 0x10004e9
  1379. const m_XK_Cyrillic_pe = 0x06d0
  1380. const m_XK_Cyrillic_schwa = 0x10004d9
  1381. const m_XK_Cyrillic_sha = 0x06db
  1382. const m_XK_Cyrillic_shcha = 0x06dd
  1383. const m_XK_Cyrillic_shha = 0x10004bb
  1384. const m_XK_Cyrillic_shorti = 0x06ca
  1385. const m_XK_Cyrillic_softsign = 0x06d8
  1386. const m_XK_Cyrillic_te = 0x06d4
  1387. const m_XK_Cyrillic_tse = 0x06c3
  1388. const m_XK_Cyrillic_u = 0x06d5
  1389. const m_XK_Cyrillic_u_macron = 0x10004ef
  1390. const m_XK_Cyrillic_u_straight = 0x10004af
  1391. const m_XK_Cyrillic_u_straight_bar = 0x10004b1
  1392. const m_XK_Cyrillic_ve = 0x06d7
  1393. const m_XK_Cyrillic_ya = 0x06d1
  1394. const m_XK_Cyrillic_yeru = 0x06d9
  1395. const m_XK_Cyrillic_yu = 0x06c0
  1396. const m_XK_Cyrillic_ze = 0x06da
  1397. const m_XK_Cyrillic_zhe = 0x06d6
  1398. const m_XK_Cyrillic_zhe_descender = 0x1000497
  1399. const m_XK_D = 0x0044
  1400. const m_XK_Dabovedot = 0x1001e0a
  1401. const m_XK_Dcaron = 0x01cf
  1402. const m_XK_Delete = 0xffff
  1403. const m_XK_DongSign = 0x10020ab
  1404. const m_XK_Down = 0xff54
  1405. const m_XK_Dstroke = 0x01d0
  1406. const m_XK_E = 0x0045
  1407. const m_XK_ENG = 0x03bd
  1408. const m_XK_ETH = 0x00d0
  1409. const m_XK_EZH = 0x10001b7
  1410. const m_XK_Eabovedot = 0x03cc
  1411. const m_XK_Eacute = 0x00c9
  1412. const m_XK_Ebelowdot = 0x1001eb8
  1413. const m_XK_Ecaron = 0x01cc
  1414. const m_XK_Ecircumflex = 0x00ca
  1415. const m_XK_Ecircumflexacute = 0x1001ebe
  1416. const m_XK_Ecircumflexbelowdot = 0x1001ec6
  1417. const m_XK_Ecircumflexgrave = 0x1001ec0
  1418. const m_XK_Ecircumflexhook = 0x1001ec2
  1419. const m_XK_Ecircumflextilde = 0x1001ec4
  1420. const m_XK_EcuSign = 0x10020a0
  1421. const m_XK_Ediaeresis = 0x00cb
  1422. const m_XK_Egrave = 0x00c8
  1423. const m_XK_Ehook = 0x1001eba
  1424. const m_XK_Eisu_Shift = 0xff2f
  1425. const m_XK_Eisu_toggle = 0xff30
  1426. const m_XK_Emacron = 0x03aa
  1427. const m_XK_End = 0xff57
  1428. const m_XK_Eogonek = 0x01ca
  1429. const m_XK_Escape = 0xff1b
  1430. const m_XK_Eth = 0x00d0
  1431. const m_XK_Etilde = 0x1001ebc
  1432. const m_XK_EuroSign = 0x20ac
  1433. const m_XK_Execute = 0xff62
  1434. const m_XK_F = 0x0046
  1435. const m_XK_F1 = 0xffbe
  1436. const m_XK_F10 = 0xffc7
  1437. const m_XK_F11 = 0xffc8
  1438. const m_XK_F12 = 0xffc9
  1439. const m_XK_F13 = 0xffca
  1440. const m_XK_F14 = 0xffcb
  1441. const m_XK_F15 = 0xffcc
  1442. const m_XK_F16 = 0xffcd
  1443. const m_XK_F17 = 0xffce
  1444. const m_XK_F18 = 0xffcf
  1445. const m_XK_F19 = 0xffd0
  1446. const m_XK_F2 = 0xffbf
  1447. const m_XK_F20 = 0xffd1
  1448. const m_XK_F21 = 0xffd2
  1449. const m_XK_F22 = 0xffd3
  1450. const m_XK_F23 = 0xffd4
  1451. const m_XK_F24 = 0xffd5
  1452. const m_XK_F25 = 0xffd6
  1453. const m_XK_F26 = 0xffd7
  1454. const m_XK_F27 = 0xffd8
  1455. const m_XK_F28 = 0xffd9
  1456. const m_XK_F29 = 0xffda
  1457. const m_XK_F3 = 0xffc0
  1458. const m_XK_F30 = 0xffdb
  1459. const m_XK_F31 = 0xffdc
  1460. const m_XK_F32 = 0xffdd
  1461. const m_XK_F33 = 0xffde
  1462. const m_XK_F34 = 0xffdf
  1463. const m_XK_F35 = 0xffe0
  1464. const m_XK_F4 = 0xffc1
  1465. const m_XK_F5 = 0xffc2
  1466. const m_XK_F6 = 0xffc3
  1467. const m_XK_F7 = 0xffc4
  1468. const m_XK_F8 = 0xffc5
  1469. const m_XK_F9 = 0xffc6
  1470. const m_XK_FFrancSign = 0x10020a3
  1471. const m_XK_Fabovedot = 0x1001e1e
  1472. const m_XK_Farsi_0 = 0x10006f0
  1473. const m_XK_Farsi_1 = 0x10006f1
  1474. const m_XK_Farsi_2 = 0x10006f2
  1475. const m_XK_Farsi_3 = 0x10006f3
  1476. const m_XK_Farsi_4 = 0x10006f4
  1477. const m_XK_Farsi_5 = 0x10006f5
  1478. const m_XK_Farsi_6 = 0x10006f6
  1479. const m_XK_Farsi_7 = 0x10006f7
  1480. const m_XK_Farsi_8 = 0x10006f8
  1481. const m_XK_Farsi_9 = 0x10006f9
  1482. const m_XK_Farsi_yeh = 0x10006cc
  1483. const m_XK_Find = 0xff68
  1484. const m_XK_First_Virtual_Screen = 0xfed0
  1485. const m_XK_G = 0x0047
  1486. const m_XK_Gabovedot = 0x02d5
  1487. const m_XK_Gbreve = 0x02ab
  1488. const m_XK_Gcaron = 0x10001e6
  1489. const m_XK_Gcedilla = 0x03ab
  1490. const m_XK_Gcircumflex = 0x02d8
  1491. const m_XK_Georgian_an = 0x10010d0
  1492. const m_XK_Georgian_ban = 0x10010d1
  1493. const m_XK_Georgian_can = 0x10010ea
  1494. const m_XK_Georgian_char = 0x10010ed
  1495. const m_XK_Georgian_chin = 0x10010e9
  1496. const m_XK_Georgian_cil = 0x10010ec
  1497. const m_XK_Georgian_don = 0x10010d3
  1498. const m_XK_Georgian_en = 0x10010d4
  1499. const m_XK_Georgian_fi = 0x10010f6
  1500. const m_XK_Georgian_gan = 0x10010d2
  1501. const m_XK_Georgian_ghan = 0x10010e6
  1502. const m_XK_Georgian_hae = 0x10010f0
  1503. const m_XK_Georgian_har = 0x10010f4
  1504. const m_XK_Georgian_he = 0x10010f1
  1505. const m_XK_Georgian_hie = 0x10010f2
  1506. const m_XK_Georgian_hoe = 0x10010f5
  1507. const m_XK_Georgian_in = 0x10010d8
  1508. const m_XK_Georgian_jhan = 0x10010ef
  1509. const m_XK_Georgian_jil = 0x10010eb
  1510. const m_XK_Georgian_kan = 0x10010d9
  1511. const m_XK_Georgian_khar = 0x10010e5
  1512. const m_XK_Georgian_las = 0x10010da
  1513. const m_XK_Georgian_man = 0x10010db
  1514. const m_XK_Georgian_nar = 0x10010dc
  1515. const m_XK_Georgian_on = 0x10010dd
  1516. const m_XK_Georgian_par = 0x10010de
  1517. const m_XK_Georgian_phar = 0x10010e4
  1518. const m_XK_Georgian_qar = 0x10010e7
  1519. const m_XK_Georgian_rae = 0x10010e0
  1520. const m_XK_Georgian_san = 0x10010e1
  1521. const m_XK_Georgian_shin = 0x10010e8
  1522. const m_XK_Georgian_tan = 0x10010d7
  1523. const m_XK_Georgian_tar = 0x10010e2
  1524. const m_XK_Georgian_un = 0x10010e3
  1525. const m_XK_Georgian_vin = 0x10010d5
  1526. const m_XK_Georgian_we = 0x10010f3
  1527. const m_XK_Georgian_xan = 0x10010ee
  1528. const m_XK_Georgian_zen = 0x10010d6
  1529. const m_XK_Georgian_zhar = 0x10010df
  1530. const m_XK_Greek_ALPHA = 0x07c1
  1531. const m_XK_Greek_ALPHAaccent = 0x07a1
  1532. const m_XK_Greek_BETA = 0x07c2
  1533. const m_XK_Greek_CHI = 0x07d7
  1534. const m_XK_Greek_DELTA = 0x07c4
  1535. const m_XK_Greek_EPSILON = 0x07c5
  1536. const m_XK_Greek_EPSILONaccent = 0x07a2
  1537. const m_XK_Greek_ETA = 0x07c7
  1538. const m_XK_Greek_ETAaccent = 0x07a3
  1539. const m_XK_Greek_GAMMA = 0x07c3
  1540. const m_XK_Greek_IOTA = 0x07c9
  1541. const m_XK_Greek_IOTAaccent = 0x07a4
  1542. const m_XK_Greek_IOTAdiaeresis = 0x07a5
  1543. const m_XK_Greek_IOTAdieresis = 0x07a5
  1544. const m_XK_Greek_KAPPA = 0x07ca
  1545. const m_XK_Greek_LAMBDA = 0x07cb
  1546. const m_XK_Greek_LAMDA = 0x07cb
  1547. const m_XK_Greek_MU = 0x07cc
  1548. const m_XK_Greek_NU = 0x07cd
  1549. const m_XK_Greek_OMEGA = 0x07d9
  1550. const m_XK_Greek_OMEGAaccent = 0x07ab
  1551. const m_XK_Greek_OMICRON = 0x07cf
  1552. const m_XK_Greek_OMICRONaccent = 0x07a7
  1553. const m_XK_Greek_PHI = 0x07d6
  1554. const m_XK_Greek_PI = 0x07d0
  1555. const m_XK_Greek_PSI = 0x07d8
  1556. const m_XK_Greek_RHO = 0x07d1
  1557. const m_XK_Greek_SIGMA = 0x07d2
  1558. const m_XK_Greek_TAU = 0x07d4
  1559. const m_XK_Greek_THETA = 0x07c8
  1560. const m_XK_Greek_UPSILON = 0x07d5
  1561. const m_XK_Greek_UPSILONaccent = 0x07a8
  1562. const m_XK_Greek_UPSILONdieresis = 0x07a9
  1563. const m_XK_Greek_XI = 0x07ce
  1564. const m_XK_Greek_ZETA = 0x07c6
  1565. const m_XK_Greek_accentdieresis = 0x07ae
  1566. const m_XK_Greek_alpha = 0x07e1
  1567. const m_XK_Greek_alphaaccent = 0x07b1
  1568. const m_XK_Greek_beta = 0x07e2
  1569. const m_XK_Greek_chi = 0x07f7
  1570. const m_XK_Greek_delta = 0x07e4
  1571. const m_XK_Greek_epsilon = 0x07e5
  1572. const m_XK_Greek_epsilonaccent = 0x07b2
  1573. const m_XK_Greek_eta = 0x07e7
  1574. const m_XK_Greek_etaaccent = 0x07b3
  1575. const m_XK_Greek_finalsmallsigma = 0x07f3
  1576. const m_XK_Greek_gamma = 0x07e3
  1577. const m_XK_Greek_horizbar = 0x07af
  1578. const m_XK_Greek_iota = 0x07e9
  1579. const m_XK_Greek_iotaaccent = 0x07b4
  1580. const m_XK_Greek_iotaaccentdieresis = 0x07b6
  1581. const m_XK_Greek_iotadieresis = 0x07b5
  1582. const m_XK_Greek_kappa = 0x07ea
  1583. const m_XK_Greek_lambda = 0x07eb
  1584. const m_XK_Greek_lamda = 0x07eb
  1585. const m_XK_Greek_mu = 0x07ec
  1586. const m_XK_Greek_nu = 0x07ed
  1587. const m_XK_Greek_omega = 0x07f9
  1588. const m_XK_Greek_omegaaccent = 0x07bb
  1589. const m_XK_Greek_omicron = 0x07ef
  1590. const m_XK_Greek_omicronaccent = 0x07b7
  1591. const m_XK_Greek_phi = 0x07f6
  1592. const m_XK_Greek_pi = 0x07f0
  1593. const m_XK_Greek_psi = 0x07f8
  1594. const m_XK_Greek_rho = 0x07f1
  1595. const m_XK_Greek_sigma = 0x07f2
  1596. const m_XK_Greek_switch = 0xff7e
  1597. const m_XK_Greek_tau = 0x07f4
  1598. const m_XK_Greek_theta = 0x07e8
  1599. const m_XK_Greek_upsilon = 0x07f5
  1600. const m_XK_Greek_upsilonaccent = 0x07b8
  1601. const m_XK_Greek_upsilonaccentdieresis = 0x07ba
  1602. const m_XK_Greek_upsilondieresis = 0x07b9
  1603. const m_XK_Greek_xi = 0x07ee
  1604. const m_XK_Greek_zeta = 0x07e6
  1605. const m_XK_H = 0x0048
  1606. const m_XK_Hangul = 0xff31
  1607. const m_XK_Hangul_A = 0x0ebf
  1608. const m_XK_Hangul_AE = 0x0ec0
  1609. const m_XK_Hangul_AraeA = 0x0ef6
  1610. const m_XK_Hangul_AraeAE = 0x0ef7
  1611. const m_XK_Hangul_Banja = 0xff39
  1612. const m_XK_Hangul_Cieuc = 0x0eba
  1613. const m_XK_Hangul_Codeinput = 0xff37
  1614. const m_XK_Hangul_Dikeud = 0x0ea7
  1615. const m_XK_Hangul_E = 0x0ec4
  1616. const m_XK_Hangul_EO = 0x0ec3
  1617. const m_XK_Hangul_EU = 0x0ed1
  1618. const m_XK_Hangul_End = 0xff33
  1619. const m_XK_Hangul_Hanja = 0xff34
  1620. const m_XK_Hangul_Hieuh = 0x0ebe
  1621. const m_XK_Hangul_I = 0x0ed3
  1622. const m_XK_Hangul_Ieung = 0x0eb7
  1623. const m_XK_Hangul_J_Cieuc = 0x0eea
  1624. const m_XK_Hangul_J_Dikeud = 0x0eda
  1625. const m_XK_Hangul_J_Hieuh = 0x0eee
  1626. const m_XK_Hangul_J_Ieung = 0x0ee8
  1627. const m_XK_Hangul_J_Jieuj = 0x0ee9
  1628. const m_XK_Hangul_J_Khieuq = 0x0eeb
  1629. const m_XK_Hangul_J_Kiyeog = 0x0ed4
  1630. const m_XK_Hangul_J_KiyeogSios = 0x0ed6
  1631. const m_XK_Hangul_J_KkogjiDalrinIeung = 0x0ef9
  1632. const m_XK_Hangul_J_Mieum = 0x0ee3
  1633. const m_XK_Hangul_J_Nieun = 0x0ed7
  1634. const m_XK_Hangul_J_NieunHieuh = 0x0ed9
  1635. const m_XK_Hangul_J_NieunJieuj = 0x0ed8
  1636. const m_XK_Hangul_J_PanSios = 0x0ef8
  1637. const m_XK_Hangul_J_Phieuf = 0x0eed
  1638. const m_XK_Hangul_J_Pieub = 0x0ee4
  1639. const m_XK_Hangul_J_PieubSios = 0x0ee5
  1640. const m_XK_Hangul_J_Rieul = 0x0edb
  1641. const m_XK_Hangul_J_RieulHieuh = 0x0ee2
  1642. const m_XK_Hangul_J_RieulKiyeog = 0x0edc
  1643. const m_XK_Hangul_J_RieulMieum = 0x0edd
  1644. const m_XK_Hangul_J_RieulPhieuf = 0x0ee1
  1645. const m_XK_Hangul_J_RieulPieub = 0x0ede
  1646. const m_XK_Hangul_J_RieulSios = 0x0edf
  1647. const m_XK_Hangul_J_RieulTieut = 0x0ee0
  1648. const m_XK_Hangul_J_Sios = 0x0ee6
  1649. const m_XK_Hangul_J_SsangKiyeog = 0x0ed5
  1650. const m_XK_Hangul_J_SsangSios = 0x0ee7
  1651. const m_XK_Hangul_J_Tieut = 0x0eec
  1652. const m_XK_Hangul_J_YeorinHieuh = 0x0efa
  1653. const m_XK_Hangul_Jamo = 0xff35
  1654. const m_XK_Hangul_Jeonja = 0xff38
  1655. const m_XK_Hangul_Jieuj = 0x0eb8
  1656. const m_XK_Hangul_Khieuq = 0x0ebb
  1657. const m_XK_Hangul_Kiyeog = 0x0ea1
  1658. const m_XK_Hangul_KiyeogSios = 0x0ea3
  1659. const m_XK_Hangul_KkogjiDalrinIeung = 0x0ef3
  1660. const m_XK_Hangul_Mieum = 0x0eb1
  1661. const m_XK_Hangul_MultipleCandidate = 0xff3d
  1662. const m_XK_Hangul_Nieun = 0x0ea4
  1663. const m_XK_Hangul_NieunHieuh = 0x0ea6
  1664. const m_XK_Hangul_NieunJieuj = 0x0ea5
  1665. const m_XK_Hangul_O = 0x0ec7
  1666. const m_XK_Hangul_OE = 0x0eca
  1667. const m_XK_Hangul_PanSios = 0x0ef2
  1668. const m_XK_Hangul_Phieuf = 0x0ebd
  1669. const m_XK_Hangul_Pieub = 0x0eb2
  1670. const m_XK_Hangul_PieubSios = 0x0eb4
  1671. const m_XK_Hangul_PostHanja = 0xff3b
  1672. const m_XK_Hangul_PreHanja = 0xff3a
  1673. const m_XK_Hangul_PreviousCandidate = 0xff3e
  1674. const m_XK_Hangul_Rieul = 0x0ea9
  1675. const m_XK_Hangul_RieulHieuh = 0x0eb0
  1676. const m_XK_Hangul_RieulKiyeog = 0x0eaa
  1677. const m_XK_Hangul_RieulMieum = 0x0eab
  1678. const m_XK_Hangul_RieulPhieuf = 0x0eaf
  1679. const m_XK_Hangul_RieulPieub = 0x0eac
  1680. const m_XK_Hangul_RieulSios = 0x0ead
  1681. const m_XK_Hangul_RieulTieut = 0x0eae
  1682. const m_XK_Hangul_RieulYeorinHieuh = 0x0eef
  1683. const m_XK_Hangul_Romaja = 0xff36
  1684. const m_XK_Hangul_SingleCandidate = 0xff3c
  1685. const m_XK_Hangul_Sios = 0x0eb5
  1686. const m_XK_Hangul_Special = 0xff3f
  1687. const m_XK_Hangul_SsangDikeud = 0x0ea8
  1688. const m_XK_Hangul_SsangJieuj = 0x0eb9
  1689. const m_XK_Hangul_SsangKiyeog = 0x0ea2
  1690. const m_XK_Hangul_SsangPieub = 0x0eb3
  1691. const m_XK_Hangul_SsangSios = 0x0eb6
  1692. const m_XK_Hangul_Start = 0xff32
  1693. const m_XK_Hangul_SunkyeongeumMieum = 0x0ef0
  1694. const m_XK_Hangul_SunkyeongeumPhieuf = 0x0ef4
  1695. const m_XK_Hangul_SunkyeongeumPieub = 0x0ef1
  1696. const m_XK_Hangul_Tieut = 0x0ebc
  1697. const m_XK_Hangul_U = 0x0ecc
  1698. const m_XK_Hangul_WA = 0x0ec8
  1699. const m_XK_Hangul_WAE = 0x0ec9
  1700. const m_XK_Hangul_WE = 0x0ece
  1701. const m_XK_Hangul_WEO = 0x0ecd
  1702. const m_XK_Hangul_WI = 0x0ecf
  1703. const m_XK_Hangul_YA = 0x0ec1
  1704. const m_XK_Hangul_YAE = 0x0ec2
  1705. const m_XK_Hangul_YE = 0x0ec6
  1706. const m_XK_Hangul_YEO = 0x0ec5
  1707. const m_XK_Hangul_YI = 0x0ed2
  1708. const m_XK_Hangul_YO = 0x0ecb
  1709. const m_XK_Hangul_YU = 0x0ed0
  1710. const m_XK_Hangul_YeorinHieuh = 0x0ef5
  1711. const m_XK_Hangul_switch = 0xff7e
  1712. const m_XK_Hankaku = 0xff29
  1713. const m_XK_Hcircumflex = 0x02a6
  1714. const m_XK_Hebrew_switch = 0xff7e
  1715. const m_XK_Help = 0xff6a
  1716. const m_XK_Henkan = 0xff23
  1717. const m_XK_Henkan_Mode = 0xff23
  1718. const m_XK_Hiragana = 0xff25
  1719. const m_XK_Hiragana_Katakana = 0xff27
  1720. const m_XK_Home = 0xff50
  1721. const m_XK_Hstroke = 0x02a1
  1722. const m_XK_Hyper_L = 0xffed
  1723. const m_XK_Hyper_R = 0xffee
  1724. const m_XK_I = 0x0049
  1725. const m_XK_ISO_Center_Object = 0xfe33
  1726. const m_XK_ISO_Continuous_Underline = 0xfe30
  1727. const m_XK_ISO_Discontinuous_Underline = 0xfe31
  1728. const m_XK_ISO_Emphasize = 0xfe32
  1729. const m_XK_ISO_Enter = 0xfe34
  1730. const m_XK_ISO_Fast_Cursor_Down = 0xfe2f
  1731. const m_XK_ISO_Fast_Cursor_Left = 0xfe2c
  1732. const m_XK_ISO_Fast_Cursor_Right = 0xfe2d
  1733. const m_XK_ISO_Fast_Cursor_Up = 0xfe2e
  1734. const m_XK_ISO_First_Group = 0xfe0c
  1735. const m_XK_ISO_First_Group_Lock = 0xfe0d
  1736. const m_XK_ISO_Group_Latch = 0xfe06
  1737. const m_XK_ISO_Group_Lock = 0xfe07
  1738. const m_XK_ISO_Group_Shift = 0xff7e
  1739. const m_XK_ISO_Last_Group = 0xfe0e
  1740. const m_XK_ISO_Last_Group_Lock = 0xfe0f
  1741. const m_XK_ISO_Left_Tab = 0xfe20
  1742. const m_XK_ISO_Level2_Latch = 0xfe02
  1743. const m_XK_ISO_Level3_Latch = 0xfe04
  1744. const m_XK_ISO_Level3_Lock = 0xfe05
  1745. const m_XK_ISO_Level3_Shift = 0xfe03
  1746. const m_XK_ISO_Level5_Latch = 0xfe12
  1747. const m_XK_ISO_Level5_Lock = 0xfe13
  1748. const m_XK_ISO_Level5_Shift = 0xfe11
  1749. const m_XK_ISO_Lock = 0xfe01
  1750. const m_XK_ISO_Move_Line_Down = 0xfe22
  1751. const m_XK_ISO_Move_Line_Up = 0xfe21
  1752. const m_XK_ISO_Next_Group = 0xfe08
  1753. const m_XK_ISO_Next_Group_Lock = 0xfe09
  1754. const m_XK_ISO_Partial_Line_Down = 0xfe24
  1755. const m_XK_ISO_Partial_Line_Up = 0xfe23
  1756. const m_XK_ISO_Partial_Space_Left = 0xfe25
  1757. const m_XK_ISO_Partial_Space_Right = 0xfe26
  1758. const m_XK_ISO_Prev_Group = 0xfe0a
  1759. const m_XK_ISO_Prev_Group_Lock = 0xfe0b
  1760. const m_XK_ISO_Release_Both_Margins = 0xfe2b
  1761. const m_XK_ISO_Release_Margin_Left = 0xfe29
  1762. const m_XK_ISO_Release_Margin_Right = 0xfe2a
  1763. const m_XK_ISO_Set_Margin_Left = 0xfe27
  1764. const m_XK_ISO_Set_Margin_Right = 0xfe28
  1765. const m_XK_Iabovedot = 0x02a9
  1766. const m_XK_Iacute = 0x00cd
  1767. const m_XK_Ibelowdot = 0x1001eca
  1768. const m_XK_Ibreve = 0x100012c
  1769. const m_XK_Icircumflex = 0x00ce
  1770. const m_XK_Idiaeresis = 0x00cf
  1771. const m_XK_Igrave = 0x00cc
  1772. const m_XK_Ihook = 0x1001ec8
  1773. const m_XK_Imacron = 0x03cf
  1774. const m_XK_Insert = 0xff63
  1775. const m_XK_Iogonek = 0x03c7
  1776. const m_XK_Itilde = 0x03a5
  1777. const m_XK_J = 0x004a
  1778. const m_XK_Jcircumflex = 0x02ac
  1779. const m_XK_K = 0x004b
  1780. const m_XK_KP_0 = 0xffb0
  1781. const m_XK_KP_1 = 0xffb1
  1782. const m_XK_KP_2 = 0xffb2
  1783. const m_XK_KP_3 = 0xffb3
  1784. const m_XK_KP_4 = 0xffb4
  1785. const m_XK_KP_5 = 0xffb5
  1786. const m_XK_KP_6 = 0xffb6
  1787. const m_XK_KP_7 = 0xffb7
  1788. const m_XK_KP_8 = 0xffb8
  1789. const m_XK_KP_9 = 0xffb9
  1790. const m_XK_KP_Add = 0xffab
  1791. const m_XK_KP_Begin = 0xff9d
  1792. const m_XK_KP_Decimal = 0xffae
  1793. const m_XK_KP_Delete = 0xff9f
  1794. const m_XK_KP_Divide = 0xffaf
  1795. const m_XK_KP_Down = 0xff99
  1796. const m_XK_KP_End = 0xff9c
  1797. const m_XK_KP_Enter = 0xff8d
  1798. const m_XK_KP_Equal = 0xffbd
  1799. const m_XK_KP_F1 = 0xff91
  1800. const m_XK_KP_F2 = 0xff92
  1801. const m_XK_KP_F3 = 0xff93
  1802. const m_XK_KP_F4 = 0xff94
  1803. const m_XK_KP_Home = 0xff95
  1804. const m_XK_KP_Insert = 0xff9e
  1805. const m_XK_KP_Left = 0xff96
  1806. const m_XK_KP_Multiply = 0xffaa
  1807. const m_XK_KP_Next = 0xff9b
  1808. const m_XK_KP_Page_Down = 0xff9b
  1809. const m_XK_KP_Page_Up = 0xff9a
  1810. const m_XK_KP_Prior = 0xff9a
  1811. const m_XK_KP_Right = 0xff98
  1812. const m_XK_KP_Separator = 0xffac
  1813. const m_XK_KP_Space = 0xff80
  1814. const m_XK_KP_Subtract = 0xffad
  1815. const m_XK_KP_Tab = 0xff89
  1816. const m_XK_KP_Up = 0xff97
  1817. const m_XK_Kana_Lock = 0xff2d
  1818. const m_XK_Kana_Shift = 0xff2e
  1819. const m_XK_Kanji = 0xff21
  1820. const m_XK_Kanji_Bangou = 0xff37
  1821. const m_XK_Katakana = 0xff26
  1822. const m_XK_Kcedilla = 0x03d3
  1823. const m_XK_Korean_Won = 0x0eff
  1824. const m_XK_L = 0x004c
  1825. const m_XK_L1 = 0xffc8
  1826. const m_XK_L10 = 0xffd1
  1827. const m_XK_L2 = 0xffc9
  1828. const m_XK_L3 = 0xffca
  1829. const m_XK_L4 = 0xffcb
  1830. const m_XK_L5 = 0xffcc
  1831. const m_XK_L6 = 0xffcd
  1832. const m_XK_L7 = 0xffce
  1833. const m_XK_L8 = 0xffcf
  1834. const m_XK_L9 = 0xffd0
  1835. const m_XK_Lacute = 0x01c5
  1836. const m_XK_Last_Virtual_Screen = 0xfed4
  1837. const m_XK_Lbelowdot = 0x1001e36
  1838. const m_XK_Lcaron = 0x01a5
  1839. const m_XK_Lcedilla = 0x03a6
  1840. const m_XK_Left = 0xff51
  1841. const m_XK_Linefeed = 0xff0a
  1842. const m_XK_LiraSign = 0x10020a4
  1843. const m_XK_Lstroke = 0x01a3
  1844. const m_XK_M = 0x004d
  1845. const m_XK_Mabovedot = 0x1001e40
  1846. const m_XK_Macedonia_DSE = 0x06b5
  1847. const m_XK_Macedonia_GJE = 0x06b2
  1848. const m_XK_Macedonia_KJE = 0x06bc
  1849. const m_XK_Macedonia_dse = 0x06a5
  1850. const m_XK_Macedonia_gje = 0x06a2
  1851. const m_XK_Macedonia_kje = 0x06ac
  1852. const m_XK_Mae_Koho = 0xff3e
  1853. const m_XK_Massyo = 0xff2c
  1854. const m_XK_Menu = 0xff67
  1855. const m_XK_Meta_L = 0xffe7
  1856. const m_XK_Meta_R = 0xffe8
  1857. const m_XK_MillSign = 0x10020a5
  1858. const m_XK_Mode_switch = 0xff7e
  1859. const m_XK_MouseKeys_Accel_Enable = 0xfe77
  1860. const m_XK_MouseKeys_Enable = 0xfe76
  1861. const m_XK_Muhenkan = 0xff22
  1862. const m_XK_Multi_key = 0xff20
  1863. const m_XK_MultipleCandidate = 0xff3d
  1864. const m_XK_N = 0x004e
  1865. const m_XK_Nacute = 0x01d1
  1866. const m_XK_NairaSign = 0x10020a6
  1867. const m_XK_Ncaron = 0x01d2
  1868. const m_XK_Ncedilla = 0x03d1
  1869. const m_XK_NewSheqelSign = 0x10020aa
  1870. const m_XK_Next = 0xff56
  1871. const m_XK_Next_Virtual_Screen = 0xfed2
  1872. const m_XK_Ntilde = 0x00d1
  1873. const m_XK_Num_Lock = 0xff7f
  1874. const m_XK_O = 0x004f
  1875. const m_XK_OE = 0x13bc
  1876. const m_XK_Oacute = 0x00d3
  1877. const m_XK_Obarred = 0x100019f
  1878. const m_XK_Obelowdot = 0x1001ecc
  1879. const m_XK_Ocaron = 0x10001d1
  1880. const m_XK_Ocircumflex = 0x00d4
  1881. const m_XK_Ocircumflexacute = 0x1001ed0
  1882. const m_XK_Ocircumflexbelowdot = 0x1001ed8
  1883. const m_XK_Ocircumflexgrave = 0x1001ed2
  1884. const m_XK_Ocircumflexhook = 0x1001ed4
  1885. const m_XK_Ocircumflextilde = 0x1001ed6
  1886. const m_XK_Odiaeresis = 0x00d6
  1887. const m_XK_Odoubleacute = 0x01d5
  1888. const m_XK_Ograve = 0x00d2
  1889. const m_XK_Ohook = 0x1001ece
  1890. const m_XK_Ohorn = 0x10001a0
  1891. const m_XK_Ohornacute = 0x1001eda
  1892. const m_XK_Ohornbelowdot = 0x1001ee2
  1893. const m_XK_Ohorngrave = 0x1001edc
  1894. const m_XK_Ohornhook = 0x1001ede
  1895. const m_XK_Ohorntilde = 0x1001ee0
  1896. const m_XK_Omacron = 0x03d2
  1897. const m_XK_Ooblique = 0x00d8
  1898. const m_XK_Oslash = 0x00d8
  1899. const m_XK_Otilde = 0x00d5
  1900. const m_XK_Overlay1_Enable = 0xfe78
  1901. const m_XK_Overlay2_Enable = 0xfe79
  1902. const m_XK_P = 0x0050
  1903. const m_XK_Pabovedot = 0x1001e56
  1904. const m_XK_Page_Down = 0xff56
  1905. const m_XK_Page_Up = 0xff55
  1906. const m_XK_Pause = 0xff13
  1907. const m_XK_PesetaSign = 0x10020a7
  1908. const m_XK_Pointer_Accelerate = 0xfefa
  1909. const m_XK_Pointer_Button1 = 0xfee9
  1910. const m_XK_Pointer_Button2 = 0xfeea
  1911. const m_XK_Pointer_Button3 = 0xfeeb
  1912. const m_XK_Pointer_Button4 = 0xfeec
  1913. const m_XK_Pointer_Button5 = 0xfeed
  1914. const m_XK_Pointer_Button_Dflt = 0xfee8
  1915. const m_XK_Pointer_DblClick1 = 0xfeef
  1916. const m_XK_Pointer_DblClick2 = 0xfef0
  1917. const m_XK_Pointer_DblClick3 = 0xfef1
  1918. const m_XK_Pointer_DblClick4 = 0xfef2
  1919. const m_XK_Pointer_DblClick5 = 0xfef3
  1920. const m_XK_Pointer_DblClick_Dflt = 0xfeee
  1921. const m_XK_Pointer_DfltBtnNext = 0xfefb
  1922. const m_XK_Pointer_DfltBtnPrev = 0xfefc
  1923. const m_XK_Pointer_Down = 0xfee3
  1924. const m_XK_Pointer_DownLeft = 0xfee6
  1925. const m_XK_Pointer_DownRight = 0xfee7
  1926. const m_XK_Pointer_Drag1 = 0xfef5
  1927. const m_XK_Pointer_Drag2 = 0xfef6
  1928. const m_XK_Pointer_Drag3 = 0xfef7
  1929. const m_XK_Pointer_Drag4 = 0xfef8
  1930. const m_XK_Pointer_Drag5 = 0xfefd
  1931. const m_XK_Pointer_Drag_Dflt = 0xfef4
  1932. const m_XK_Pointer_EnableKeys = 0xfef9
  1933. const m_XK_Pointer_Left = 0xfee0
  1934. const m_XK_Pointer_Right = 0xfee1
  1935. const m_XK_Pointer_Up = 0xfee2
  1936. const m_XK_Pointer_UpLeft = 0xfee4
  1937. const m_XK_Pointer_UpRight = 0xfee5
  1938. const m_XK_Prev_Virtual_Screen = 0xfed1
  1939. const m_XK_PreviousCandidate = 0xff3e
  1940. const m_XK_Print = 0xff61
  1941. const m_XK_Prior = 0xff55
  1942. const m_XK_Q = 0x0051
  1943. const m_XK_R = 0x0052
  1944. const m_XK_R1 = 0xffd2
  1945. const m_XK_R10 = 0xffdb
  1946. const m_XK_R11 = 0xffdc
  1947. const m_XK_R12 = 0xffdd
  1948. const m_XK_R13 = 0xffde
  1949. const m_XK_R14 = 0xffdf
  1950. const m_XK_R15 = 0xffe0
  1951. const m_XK_R2 = 0xffd3
  1952. const m_XK_R3 = 0xffd4
  1953. const m_XK_R4 = 0xffd5
  1954. const m_XK_R5 = 0xffd6
  1955. const m_XK_R6 = 0xffd7
  1956. const m_XK_R7 = 0xffd8
  1957. const m_XK_R8 = 0xffd9
  1958. const m_XK_R9 = 0xffda
  1959. const m_XK_Racute = 0x01c0
  1960. const m_XK_Rcaron = 0x01d8
  1961. const m_XK_Rcedilla = 0x03a3
  1962. const m_XK_Redo = 0xff66
  1963. const m_XK_RepeatKeys_Enable = 0xfe72
  1964. const m_XK_Return = 0xff0d
  1965. const m_XK_Right = 0xff53
  1966. const m_XK_Romaji = 0xff24
  1967. const m_XK_RupeeSign = 0x10020a8
  1968. const m_XK_S = 0x0053
  1969. const m_XK_SCHWA = 0x100018f
  1970. const m_XK_Sabovedot = 0x1001e60
  1971. const m_XK_Sacute = 0x01a6
  1972. const m_XK_Scaron = 0x01a9
  1973. const m_XK_Scedilla = 0x01aa
  1974. const m_XK_Scircumflex = 0x02de
  1975. const m_XK_Scroll_Lock = 0xff14
  1976. const m_XK_Select = 0xff60
  1977. const m_XK_Serbian_DJE = 0x06b1
  1978. const m_XK_Serbian_DZE = 0x06bf
  1979. const m_XK_Serbian_JE = 0x06b8
  1980. const m_XK_Serbian_LJE = 0x06b9
  1981. const m_XK_Serbian_NJE = 0x06ba
  1982. const m_XK_Serbian_TSHE = 0x06bb
  1983. const m_XK_Serbian_dje = 0x06a1
  1984. const m_XK_Serbian_dze = 0x06af
  1985. const m_XK_Serbian_je = 0x06a8
  1986. const m_XK_Serbian_lje = 0x06a9
  1987. const m_XK_Serbian_nje = 0x06aa
  1988. const m_XK_Serbian_tshe = 0x06ab
  1989. const m_XK_Shift_L = 0xffe1
  1990. const m_XK_Shift_Lock = 0xffe6
  1991. const m_XK_Shift_R = 0xffe2
  1992. const m_XK_SingleCandidate = 0xff3c
  1993. const m_XK_Sinh_a = 0x1000d85
  1994. const m_XK_Sinh_aa = 0x1000d86
  1995. const m_XK_Sinh_aa2 = 0x1000dcf
  1996. const m_XK_Sinh_ae = 0x1000d87
  1997. const m_XK_Sinh_ae2 = 0x1000dd0
  1998. const m_XK_Sinh_aee = 0x1000d88
  1999. const m_XK_Sinh_aee2 = 0x1000dd1
  2000. const m_XK_Sinh_ai = 0x1000d93
  2001. const m_XK_Sinh_ai2 = 0x1000ddb
  2002. const m_XK_Sinh_al = 0x1000dca
  2003. const m_XK_Sinh_au = 0x1000d96
  2004. const m_XK_Sinh_au2 = 0x1000dde
  2005. const m_XK_Sinh_ba = 0x1000db6
  2006. const m_XK_Sinh_bha = 0x1000db7
  2007. const m_XK_Sinh_ca = 0x1000da0
  2008. const m_XK_Sinh_cha = 0x1000da1
  2009. const m_XK_Sinh_dda = 0x1000da9
  2010. const m_XK_Sinh_ddha = 0x1000daa
  2011. const m_XK_Sinh_dha = 0x1000daf
  2012. const m_XK_Sinh_dhha = 0x1000db0
  2013. const m_XK_Sinh_e = 0x1000d91
  2014. const m_XK_Sinh_e2 = 0x1000dd9
  2015. const m_XK_Sinh_ee = 0x1000d92
  2016. const m_XK_Sinh_ee2 = 0x1000dda
  2017. const m_XK_Sinh_fa = 0x1000dc6
  2018. const m_XK_Sinh_ga = 0x1000d9c
  2019. const m_XK_Sinh_gha = 0x1000d9d
  2020. const m_XK_Sinh_h2 = 0x1000d83
  2021. const m_XK_Sinh_ha = 0x1000dc4
  2022. const m_XK_Sinh_i = 0x1000d89
  2023. const m_XK_Sinh_i2 = 0x1000dd2
  2024. const m_XK_Sinh_ii = 0x1000d8a
  2025. const m_XK_Sinh_ii2 = 0x1000dd3
  2026. const m_XK_Sinh_ja = 0x1000da2
  2027. const m_XK_Sinh_jha = 0x1000da3
  2028. const m_XK_Sinh_jnya = 0x1000da5
  2029. const m_XK_Sinh_ka = 0x1000d9a
  2030. const m_XK_Sinh_kha = 0x1000d9b
  2031. const m_XK_Sinh_kunddaliya = 0x1000df4
  2032. const m_XK_Sinh_la = 0x1000dbd
  2033. const m_XK_Sinh_lla = 0x1000dc5
  2034. const m_XK_Sinh_lu = 0x1000d8f
  2035. const m_XK_Sinh_lu2 = 0x1000ddf
  2036. const m_XK_Sinh_luu = 0x1000d90
  2037. const m_XK_Sinh_luu2 = 0x1000df3
  2038. const m_XK_Sinh_ma = 0x1000db8
  2039. const m_XK_Sinh_mba = 0x1000db9
  2040. const m_XK_Sinh_na = 0x1000db1
  2041. const m_XK_Sinh_ndda = 0x1000dac
  2042. const m_XK_Sinh_ndha = 0x1000db3
  2043. const m_XK_Sinh_ng = 0x1000d82
  2044. const m_XK_Sinh_ng2 = 0x1000d9e
  2045. const m_XK_Sinh_nga = 0x1000d9f
  2046. const m_XK_Sinh_nja = 0x1000da6
  2047. const m_XK_Sinh_nna = 0x1000dab
  2048. const m_XK_Sinh_nya = 0x1000da4
  2049. const m_XK_Sinh_o = 0x1000d94
  2050. const m_XK_Sinh_o2 = 0x1000ddc
  2051. const m_XK_Sinh_oo = 0x1000d95
  2052. const m_XK_Sinh_oo2 = 0x1000ddd
  2053. const m_XK_Sinh_pa = 0x1000db4
  2054. const m_XK_Sinh_pha = 0x1000db5
  2055. const m_XK_Sinh_ra = 0x1000dbb
  2056. const m_XK_Sinh_ri = 0x1000d8d
  2057. const m_XK_Sinh_rii = 0x1000d8e
  2058. const m_XK_Sinh_ru2 = 0x1000dd8
  2059. const m_XK_Sinh_ruu2 = 0x1000df2
  2060. const m_XK_Sinh_sa = 0x1000dc3
  2061. const m_XK_Sinh_sha = 0x1000dc1
  2062. const m_XK_Sinh_ssha = 0x1000dc2
  2063. const m_XK_Sinh_tha = 0x1000dad
  2064. const m_XK_Sinh_thha = 0x1000dae
  2065. const m_XK_Sinh_tta = 0x1000da7
  2066. const m_XK_Sinh_ttha = 0x1000da8
  2067. const m_XK_Sinh_u = 0x1000d8b
  2068. const m_XK_Sinh_u2 = 0x1000dd4
  2069. const m_XK_Sinh_uu = 0x1000d8c
  2070. const m_XK_Sinh_uu2 = 0x1000dd6
  2071. const m_XK_Sinh_va = 0x1000dc0
  2072. const m_XK_Sinh_ya = 0x1000dba
  2073. const m_XK_SlowKeys_Enable = 0xfe73
  2074. const m_XK_StickyKeys_Enable = 0xfe75
  2075. const m_XK_Super_L = 0xffeb
  2076. const m_XK_Super_R = 0xffec
  2077. const m_XK_Sys_Req = 0xff15
  2078. const m_XK_T = 0x0054
  2079. const m_XK_THORN = 0x00de
  2080. const m_XK_Tab = 0xff09
  2081. const m_XK_Tabovedot = 0x1001e6a
  2082. const m_XK_Tcaron = 0x01ab
  2083. const m_XK_Tcedilla = 0x01de
  2084. const m_XK_Terminate_Server = 0xfed5
  2085. const m_XK_Thai_baht = 0x0ddf
  2086. const m_XK_Thai_bobaimai = 0x0dba
  2087. const m_XK_Thai_chochan = 0x0da8
  2088. const m_XK_Thai_chochang = 0x0daa
  2089. const m_XK_Thai_choching = 0x0da9
  2090. const m_XK_Thai_chochoe = 0x0dac
  2091. const m_XK_Thai_dochada = 0x0dae
  2092. const m_XK_Thai_dodek = 0x0db4
  2093. const m_XK_Thai_fofa = 0x0dbd
  2094. const m_XK_Thai_fofan = 0x0dbf
  2095. const m_XK_Thai_hohip = 0x0dcb
  2096. const m_XK_Thai_honokhuk = 0x0dce
  2097. const m_XK_Thai_khokhai = 0x0da2
  2098. const m_XK_Thai_khokhon = 0x0da5
  2099. const m_XK_Thai_khokhuat = 0x0da3
  2100. const m_XK_Thai_khokhwai = 0x0da4
  2101. const m_XK_Thai_khorakhang = 0x0da6
  2102. const m_XK_Thai_kokai = 0x0da1
  2103. const m_XK_Thai_lakkhangyao = 0x0de5
  2104. const m_XK_Thai_lekchet = 0x0df7
  2105. const m_XK_Thai_lekha = 0x0df5
  2106. const m_XK_Thai_lekhok = 0x0df6
  2107. const m_XK_Thai_lekkao = 0x0df9
  2108. const m_XK_Thai_leknung = 0x0df1
  2109. const m_XK_Thai_lekpaet = 0x0df8
  2110. const m_XK_Thai_leksam = 0x0df3
  2111. const m_XK_Thai_leksi = 0x0df4
  2112. const m_XK_Thai_leksong = 0x0df2
  2113. const m_XK_Thai_leksun = 0x0df0
  2114. const m_XK_Thai_lochula = 0x0dcc
  2115. const m_XK_Thai_loling = 0x0dc5
  2116. const m_XK_Thai_lu = 0x0dc6
  2117. const m_XK_Thai_maichattawa = 0x0deb
  2118. const m_XK_Thai_maiek = 0x0de8
  2119. const m_XK_Thai_maihanakat = 0x0dd1
  2120. const m_XK_Thai_maihanakat_maitho = 0x0dde
  2121. const m_XK_Thai_maitaikhu = 0x0de7
  2122. const m_XK_Thai_maitho = 0x0de9
  2123. const m_XK_Thai_maitri = 0x0dea
  2124. const m_XK_Thai_maiyamok = 0x0de6
  2125. const m_XK_Thai_moma = 0x0dc1
  2126. const m_XK_Thai_ngongu = 0x0da7
  2127. const m_XK_Thai_nikhahit = 0x0ded
  2128. const m_XK_Thai_nonen = 0x0db3
  2129. const m_XK_Thai_nonu = 0x0db9
  2130. const m_XK_Thai_oang = 0x0dcd
  2131. const m_XK_Thai_paiyannoi = 0x0dcf
  2132. const m_XK_Thai_phinthu = 0x0dda
  2133. const m_XK_Thai_phophan = 0x0dbe
  2134. const m_XK_Thai_phophung = 0x0dbc
  2135. const m_XK_Thai_phosamphao = 0x0dc0
  2136. const m_XK_Thai_popla = 0x0dbb
  2137. const m_XK_Thai_rorua = 0x0dc3
  2138. const m_XK_Thai_ru = 0x0dc4
  2139. const m_XK_Thai_saraa = 0x0dd0
  2140. const m_XK_Thai_saraaa = 0x0dd2
  2141. const m_XK_Thai_saraae = 0x0de1
  2142. const m_XK_Thai_saraaimaimalai = 0x0de4
  2143. const m_XK_Thai_saraaimaimuan = 0x0de3
  2144. const m_XK_Thai_saraam = 0x0dd3
  2145. const m_XK_Thai_sarae = 0x0de0
  2146. const m_XK_Thai_sarai = 0x0dd4
  2147. const m_XK_Thai_saraii = 0x0dd5
  2148. const m_XK_Thai_sarao = 0x0de2
  2149. const m_XK_Thai_sarau = 0x0dd8
  2150. const m_XK_Thai_saraue = 0x0dd6
  2151. const m_XK_Thai_sarauee = 0x0dd7
  2152. const m_XK_Thai_sarauu = 0x0dd9
  2153. const m_XK_Thai_sorusi = 0x0dc9
  2154. const m_XK_Thai_sosala = 0x0dc8
  2155. const m_XK_Thai_soso = 0x0dab
  2156. const m_XK_Thai_sosua = 0x0dca
  2157. const m_XK_Thai_thanthakhat = 0x0dec
  2158. const m_XK_Thai_thonangmontho = 0x0db1
  2159. const m_XK_Thai_thophuthao = 0x0db2
  2160. const m_XK_Thai_thothahan = 0x0db7
  2161. const m_XK_Thai_thothan = 0x0db0
  2162. const m_XK_Thai_thothong = 0x0db8
  2163. const m_XK_Thai_thothung = 0x0db6
  2164. const m_XK_Thai_topatak = 0x0daf
  2165. const m_XK_Thai_totao = 0x0db5
  2166. const m_XK_Thai_wowaen = 0x0dc7
  2167. const m_XK_Thai_yoyak = 0x0dc2
  2168. const m_XK_Thai_yoying = 0x0dad
  2169. const m_XK_Thorn = 0x00de
  2170. const m_XK_Touroku = 0xff2b
  2171. const m_XK_Tslash = 0x03ac
  2172. const m_XK_U = 0x0055
  2173. const m_XK_Uacute = 0x00da
  2174. const m_XK_Ubelowdot = 0x1001ee4
  2175. const m_XK_Ubreve = 0x02dd
  2176. const m_XK_Ucircumflex = 0x00db
  2177. const m_XK_Udiaeresis = 0x00dc
  2178. const m_XK_Udoubleacute = 0x01db
  2179. const m_XK_Ugrave = 0x00d9
  2180. const m_XK_Uhook = 0x1001ee6
  2181. const m_XK_Uhorn = 0x10001af
  2182. const m_XK_Uhornacute = 0x1001ee8
  2183. const m_XK_Uhornbelowdot = 0x1001ef0
  2184. const m_XK_Uhorngrave = 0x1001eea
  2185. const m_XK_Uhornhook = 0x1001eec
  2186. const m_XK_Uhorntilde = 0x1001eee
  2187. const m_XK_Ukrainian_GHE_WITH_UPTURN = 0x06bd
  2188. const m_XK_Ukrainian_I = 0x06b6
  2189. const m_XK_Ukrainian_IE = 0x06b4
  2190. const m_XK_Ukrainian_YI = 0x06b7
  2191. const m_XK_Ukrainian_ghe_with_upturn = 0x06ad
  2192. const m_XK_Ukrainian_i = 0x06a6
  2193. const m_XK_Ukrainian_ie = 0x06a4
  2194. const m_XK_Ukrainian_yi = 0x06a7
  2195. const m_XK_Ukranian_I = 0x06b6
  2196. const m_XK_Ukranian_JE = 0x06b4
  2197. const m_XK_Ukranian_YI = 0x06b7
  2198. const m_XK_Ukranian_i = 0x06a6
  2199. const m_XK_Ukranian_je = 0x06a4
  2200. const m_XK_Ukranian_yi = 0x06a7
  2201. const m_XK_Umacron = 0x03de
  2202. const m_XK_Undo = 0xff65
  2203. const m_XK_Uogonek = 0x03d9
  2204. const m_XK_Up = 0xff52
  2205. const m_XK_Uring = 0x01d9
  2206. const m_XK_Utilde = 0x03dd
  2207. const m_XK_V = 0x0056
  2208. const m_XK_VoidSymbol = 0xffffff
  2209. const m_XK_W = 0x0057
  2210. const m_XK_Wacute = 0x1001e82
  2211. const m_XK_Wcircumflex = 0x1000174
  2212. const m_XK_Wdiaeresis = 0x1001e84
  2213. const m_XK_Wgrave = 0x1001e80
  2214. const m_XK_WonSign = 0x10020a9
  2215. const m_XK_X = 0x0058
  2216. const m_XK_Xabovedot = 0x1001e8a
  2217. const m_XK_Y = 0x0059
  2218. const m_XK_Yacute = 0x00dd
  2219. const m_XK_Ybelowdot = 0x1001ef4
  2220. const m_XK_Ycircumflex = 0x1000176
  2221. const m_XK_Ydiaeresis = 0x13be
  2222. const m_XK_Ygrave = 0x1001ef2
  2223. const m_XK_Yhook = 0x1001ef6
  2224. const m_XK_Ytilde = 0x1001ef8
  2225. const m_XK_Z = 0x005a
  2226. const m_XK_Zabovedot = 0x01af
  2227. const m_XK_Zacute = 0x01ac
  2228. const m_XK_Zcaron = 0x01ae
  2229. const m_XK_Zen_Koho = 0xff3d
  2230. const m_XK_Zenkaku = 0xff28
  2231. const m_XK_Zenkaku_Hankaku = 0xff2a
  2232. const m_XK_Zstroke = 0x10001b5
  2233. const m_XK_a = 0x0061
  2234. const m_XK_aacute = 0x00e1
  2235. const m_XK_abelowdot = 0x1001ea1
  2236. const m_XK_abovedot = 0x01ff
  2237. const m_XK_abreve = 0x01e3
  2238. const m_XK_abreveacute = 0x1001eaf
  2239. const m_XK_abrevebelowdot = 0x1001eb7
  2240. const m_XK_abrevegrave = 0x1001eb1
  2241. const m_XK_abrevehook = 0x1001eb3
  2242. const m_XK_abrevetilde = 0x1001eb5
  2243. const m_XK_acircumflex = 0x00e2
  2244. const m_XK_acircumflexacute = 0x1001ea5
  2245. const m_XK_acircumflexbelowdot = 0x1001ead
  2246. const m_XK_acircumflexgrave = 0x1001ea7
  2247. const m_XK_acircumflexhook = 0x1001ea9
  2248. const m_XK_acircumflextilde = 0x1001eab
  2249. const m_XK_acute = 0x00b4
  2250. const m_XK_adiaeresis = 0x00e4
  2251. const m_XK_ae = 0x00e6
  2252. const m_XK_agrave = 0x00e0
  2253. const m_XK_ahook = 0x1001ea3
  2254. const m_XK_amacron = 0x03e0
  2255. const m_XK_ampersand = 0x0026
  2256. const m_XK_aogonek = 0x01b1
  2257. const m_XK_apostrophe = 0x0027
  2258. const m_XK_approxeq = 0x1002248
  2259. const m_XK_aring = 0x00e5
  2260. const m_XK_asciicircum = 0x005e
  2261. const m_XK_asciitilde = 0x007e
  2262. const m_XK_asterisk = 0x002a
  2263. const m_XK_at = 0x0040
  2264. const m_XK_atilde = 0x00e3
  2265. const m_XK_b = 0x0062
  2266. const m_XK_babovedot = 0x1001e03
  2267. const m_XK_backslash = 0x005c
  2268. const m_XK_bar = 0x007c
  2269. const m_XK_because = 0x1002235
  2270. const m_XK_braceleft = 0x007b
  2271. const m_XK_braceright = 0x007d
  2272. const m_XK_bracketleft = 0x005b
  2273. const m_XK_bracketright = 0x005d
  2274. const m_XK_braille_blank = 0x1002800
  2275. const m_XK_braille_dot_1 = 0xfff1
  2276. const m_XK_braille_dot_10 = 0xfffa
  2277. const m_XK_braille_dot_2 = 0xfff2
  2278. const m_XK_braille_dot_3 = 0xfff3
  2279. const m_XK_braille_dot_4 = 0xfff4
  2280. const m_XK_braille_dot_5 = 0xfff5
  2281. const m_XK_braille_dot_6 = 0xfff6
  2282. const m_XK_braille_dot_7 = 0xfff7
  2283. const m_XK_braille_dot_8 = 0xfff8
  2284. const m_XK_braille_dot_9 = 0xfff9
  2285. const m_XK_braille_dots_1 = 0x1002801
  2286. const m_XK_braille_dots_12 = 0x1002803
  2287. const m_XK_braille_dots_123 = 0x1002807
  2288. const m_XK_braille_dots_1234 = 0x100280f
  2289. const m_XK_braille_dots_12345 = 0x100281f
  2290. const m_XK_braille_dots_123456 = 0x100283f
  2291. const m_XK_braille_dots_1234567 = 0x100287f
  2292. const m_XK_braille_dots_12345678 = 0x10028ff
  2293. const m_XK_braille_dots_1234568 = 0x10028bf
  2294. const m_XK_braille_dots_123457 = 0x100285f
  2295. const m_XK_braille_dots_1234578 = 0x10028df
  2296. const m_XK_braille_dots_123458 = 0x100289f
  2297. const m_XK_braille_dots_12346 = 0x100282f
  2298. const m_XK_braille_dots_123467 = 0x100286f
  2299. const m_XK_braille_dots_1234678 = 0x10028ef
  2300. const m_XK_braille_dots_123468 = 0x10028af
  2301. const m_XK_braille_dots_12347 = 0x100284f
  2302. const m_XK_braille_dots_123478 = 0x10028cf
  2303. const m_XK_braille_dots_12348 = 0x100288f
  2304. const m_XK_braille_dots_1235 = 0x1002817
  2305. const m_XK_braille_dots_12356 = 0x1002837
  2306. const m_XK_braille_dots_123567 = 0x1002877
  2307. const m_XK_braille_dots_1235678 = 0x10028f7
  2308. const m_XK_braille_dots_123568 = 0x10028b7
  2309. const m_XK_braille_dots_12357 = 0x1002857
  2310. const m_XK_braille_dots_123578 = 0x10028d7
  2311. const m_XK_braille_dots_12358 = 0x1002897
  2312. const m_XK_braille_dots_1236 = 0x1002827
  2313. const m_XK_braille_dots_12367 = 0x1002867
  2314. const m_XK_braille_dots_123678 = 0x10028e7
  2315. const m_XK_braille_dots_12368 = 0x10028a7
  2316. const m_XK_braille_dots_1237 = 0x1002847
  2317. const m_XK_braille_dots_12378 = 0x10028c7
  2318. const m_XK_braille_dots_1238 = 0x1002887
  2319. const m_XK_braille_dots_124 = 0x100280b
  2320. const m_XK_braille_dots_1245 = 0x100281b
  2321. const m_XK_braille_dots_12456 = 0x100283b
  2322. const m_XK_braille_dots_124567 = 0x100287b
  2323. const m_XK_braille_dots_1245678 = 0x10028fb
  2324. const m_XK_braille_dots_124568 = 0x10028bb
  2325. const m_XK_braille_dots_12457 = 0x100285b
  2326. const m_XK_braille_dots_124578 = 0x10028db
  2327. const m_XK_braille_dots_12458 = 0x100289b
  2328. const m_XK_braille_dots_1246 = 0x100282b
  2329. const m_XK_braille_dots_12467 = 0x100286b
  2330. const m_XK_braille_dots_124678 = 0x10028eb
  2331. const m_XK_braille_dots_12468 = 0x10028ab
  2332. const m_XK_braille_dots_1247 = 0x100284b
  2333. const m_XK_braille_dots_12478 = 0x10028cb
  2334. const m_XK_braille_dots_1248 = 0x100288b
  2335. const m_XK_braille_dots_125 = 0x1002813
  2336. const m_XK_braille_dots_1256 = 0x1002833
  2337. const m_XK_braille_dots_12567 = 0x1002873
  2338. const m_XK_braille_dots_125678 = 0x10028f3
  2339. const m_XK_braille_dots_12568 = 0x10028b3
  2340. const m_XK_braille_dots_1257 = 0x1002853
  2341. const m_XK_braille_dots_12578 = 0x10028d3
  2342. const m_XK_braille_dots_1258 = 0x1002893
  2343. const m_XK_braille_dots_126 = 0x1002823
  2344. const m_XK_braille_dots_1267 = 0x1002863
  2345. const m_XK_braille_dots_12678 = 0x10028e3
  2346. const m_XK_braille_dots_1268 = 0x10028a3
  2347. const m_XK_braille_dots_127 = 0x1002843
  2348. const m_XK_braille_dots_1278 = 0x10028c3
  2349. const m_XK_braille_dots_128 = 0x1002883
  2350. const m_XK_braille_dots_13 = 0x1002805
  2351. const m_XK_braille_dots_134 = 0x100280d
  2352. const m_XK_braille_dots_1345 = 0x100281d
  2353. const m_XK_braille_dots_13456 = 0x100283d
  2354. const m_XK_braille_dots_134567 = 0x100287d
  2355. const m_XK_braille_dots_1345678 = 0x10028fd
  2356. const m_XK_braille_dots_134568 = 0x10028bd
  2357. const m_XK_braille_dots_13457 = 0x100285d
  2358. const m_XK_braille_dots_134578 = 0x10028dd
  2359. const m_XK_braille_dots_13458 = 0x100289d
  2360. const m_XK_braille_dots_1346 = 0x100282d
  2361. const m_XK_braille_dots_13467 = 0x100286d
  2362. const m_XK_braille_dots_134678 = 0x10028ed
  2363. const m_XK_braille_dots_13468 = 0x10028ad
  2364. const m_XK_braille_dots_1347 = 0x100284d
  2365. const m_XK_braille_dots_13478 = 0x10028cd
  2366. const m_XK_braille_dots_1348 = 0x100288d
  2367. const m_XK_braille_dots_135 = 0x1002815
  2368. const m_XK_braille_dots_1356 = 0x1002835
  2369. const m_XK_braille_dots_13567 = 0x1002875
  2370. const m_XK_braille_dots_135678 = 0x10028f5
  2371. const m_XK_braille_dots_13568 = 0x10028b5
  2372. const m_XK_braille_dots_1357 = 0x1002855
  2373. const m_XK_braille_dots_13578 = 0x10028d5
  2374. const m_XK_braille_dots_1358 = 0x1002895
  2375. const m_XK_braille_dots_136 = 0x1002825
  2376. const m_XK_braille_dots_1367 = 0x1002865
  2377. const m_XK_braille_dots_13678 = 0x10028e5
  2378. const m_XK_braille_dots_1368 = 0x10028a5
  2379. const m_XK_braille_dots_137 = 0x1002845
  2380. const m_XK_braille_dots_1378 = 0x10028c5
  2381. const m_XK_braille_dots_138 = 0x1002885
  2382. const m_XK_braille_dots_14 = 0x1002809
  2383. const m_XK_braille_dots_145 = 0x1002819
  2384. const m_XK_braille_dots_1456 = 0x1002839
  2385. const m_XK_braille_dots_14567 = 0x1002879
  2386. const m_XK_braille_dots_145678 = 0x10028f9
  2387. const m_XK_braille_dots_14568 = 0x10028b9
  2388. const m_XK_braille_dots_1457 = 0x1002859
  2389. const m_XK_braille_dots_14578 = 0x10028d9
  2390. const m_XK_braille_dots_1458 = 0x1002899
  2391. const m_XK_braille_dots_146 = 0x1002829
  2392. const m_XK_braille_dots_1467 = 0x1002869
  2393. const m_XK_braille_dots_14678 = 0x10028e9
  2394. const m_XK_braille_dots_1468 = 0x10028a9
  2395. const m_XK_braille_dots_147 = 0x1002849
  2396. const m_XK_braille_dots_1478 = 0x10028c9
  2397. const m_XK_braille_dots_148 = 0x1002889
  2398. const m_XK_braille_dots_15 = 0x1002811
  2399. const m_XK_braille_dots_156 = 0x1002831
  2400. const m_XK_braille_dots_1567 = 0x1002871
  2401. const m_XK_braille_dots_15678 = 0x10028f1
  2402. const m_XK_braille_dots_1568 = 0x10028b1
  2403. const m_XK_braille_dots_157 = 0x1002851
  2404. const m_XK_braille_dots_1578 = 0x10028d1
  2405. const m_XK_braille_dots_158 = 0x1002891
  2406. const m_XK_braille_dots_16 = 0x1002821
  2407. const m_XK_braille_dots_167 = 0x1002861
  2408. const m_XK_braille_dots_1678 = 0x10028e1
  2409. const m_XK_braille_dots_168 = 0x10028a1
  2410. const m_XK_braille_dots_17 = 0x1002841
  2411. const m_XK_braille_dots_178 = 0x10028c1
  2412. const m_XK_braille_dots_18 = 0x1002881
  2413. const m_XK_braille_dots_2 = 0x1002802
  2414. const m_XK_braille_dots_23 = 0x1002806
  2415. const m_XK_braille_dots_234 = 0x100280e
  2416. const m_XK_braille_dots_2345 = 0x100281e
  2417. const m_XK_braille_dots_23456 = 0x100283e
  2418. const m_XK_braille_dots_234567 = 0x100287e
  2419. const m_XK_braille_dots_2345678 = 0x10028fe
  2420. const m_XK_braille_dots_234568 = 0x10028be
  2421. const m_XK_braille_dots_23457 = 0x100285e
  2422. const m_XK_braille_dots_234578 = 0x10028de
  2423. const m_XK_braille_dots_23458 = 0x100289e
  2424. const m_XK_braille_dots_2346 = 0x100282e
  2425. const m_XK_braille_dots_23467 = 0x100286e
  2426. const m_XK_braille_dots_234678 = 0x10028ee
  2427. const m_XK_braille_dots_23468 = 0x10028ae
  2428. const m_XK_braille_dots_2347 = 0x100284e
  2429. const m_XK_braille_dots_23478 = 0x10028ce
  2430. const m_XK_braille_dots_2348 = 0x100288e
  2431. const m_XK_braille_dots_235 = 0x1002816
  2432. const m_XK_braille_dots_2356 = 0x1002836
  2433. const m_XK_braille_dots_23567 = 0x1002876
  2434. const m_XK_braille_dots_235678 = 0x10028f6
  2435. const m_XK_braille_dots_23568 = 0x10028b6
  2436. const m_XK_braille_dots_2357 = 0x1002856
  2437. const m_XK_braille_dots_23578 = 0x10028d6
  2438. const m_XK_braille_dots_2358 = 0x1002896
  2439. const m_XK_braille_dots_236 = 0x1002826
  2440. const m_XK_braille_dots_2367 = 0x1002866
  2441. const m_XK_braille_dots_23678 = 0x10028e6
  2442. const m_XK_braille_dots_2368 = 0x10028a6
  2443. const m_XK_braille_dots_237 = 0x1002846
  2444. const m_XK_braille_dots_2378 = 0x10028c6
  2445. const m_XK_braille_dots_238 = 0x1002886
  2446. const m_XK_braille_dots_24 = 0x100280a
  2447. const m_XK_braille_dots_245 = 0x100281a
  2448. const m_XK_braille_dots_2456 = 0x100283a
  2449. const m_XK_braille_dots_24567 = 0x100287a
  2450. const m_XK_braille_dots_245678 = 0x10028fa
  2451. const m_XK_braille_dots_24568 = 0x10028ba
  2452. const m_XK_braille_dots_2457 = 0x100285a
  2453. const m_XK_braille_dots_24578 = 0x10028da
  2454. const m_XK_braille_dots_2458 = 0x100289a
  2455. const m_XK_braille_dots_246 = 0x100282a
  2456. const m_XK_braille_dots_2467 = 0x100286a
  2457. const m_XK_braille_dots_24678 = 0x10028ea
  2458. const m_XK_braille_dots_2468 = 0x10028aa
  2459. const m_XK_braille_dots_247 = 0x100284a
  2460. const m_XK_braille_dots_2478 = 0x10028ca
  2461. const m_XK_braille_dots_248 = 0x100288a
  2462. const m_XK_braille_dots_25 = 0x1002812
  2463. const m_XK_braille_dots_256 = 0x1002832
  2464. const m_XK_braille_dots_2567 = 0x1002872
  2465. const m_XK_braille_dots_25678 = 0x10028f2
  2466. const m_XK_braille_dots_2568 = 0x10028b2
  2467. const m_XK_braille_dots_257 = 0x1002852
  2468. const m_XK_braille_dots_2578 = 0x10028d2
  2469. const m_XK_braille_dots_258 = 0x1002892
  2470. const m_XK_braille_dots_26 = 0x1002822
  2471. const m_XK_braille_dots_267 = 0x1002862
  2472. const m_XK_braille_dots_2678 = 0x10028e2
  2473. const m_XK_braille_dots_268 = 0x10028a2
  2474. const m_XK_braille_dots_27 = 0x1002842
  2475. const m_XK_braille_dots_278 = 0x10028c2
  2476. const m_XK_braille_dots_28 = 0x1002882
  2477. const m_XK_braille_dots_3 = 0x1002804
  2478. const m_XK_braille_dots_34 = 0x100280c
  2479. const m_XK_braille_dots_345 = 0x100281c
  2480. const m_XK_braille_dots_3456 = 0x100283c
  2481. const m_XK_braille_dots_34567 = 0x100287c
  2482. const m_XK_braille_dots_345678 = 0x10028fc
  2483. const m_XK_braille_dots_34568 = 0x10028bc
  2484. const m_XK_braille_dots_3457 = 0x100285c
  2485. const m_XK_braille_dots_34578 = 0x10028dc
  2486. const m_XK_braille_dots_3458 = 0x100289c
  2487. const m_XK_braille_dots_346 = 0x100282c
  2488. const m_XK_braille_dots_3467 = 0x100286c
  2489. const m_XK_braille_dots_34678 = 0x10028ec
  2490. const m_XK_braille_dots_3468 = 0x10028ac
  2491. const m_XK_braille_dots_347 = 0x100284c
  2492. const m_XK_braille_dots_3478 = 0x10028cc
  2493. const m_XK_braille_dots_348 = 0x100288c
  2494. const m_XK_braille_dots_35 = 0x1002814
  2495. const m_XK_braille_dots_356 = 0x1002834
  2496. const m_XK_braille_dots_3567 = 0x1002874
  2497. const m_XK_braille_dots_35678 = 0x10028f4
  2498. const m_XK_braille_dots_3568 = 0x10028b4
  2499. const m_XK_braille_dots_357 = 0x1002854
  2500. const m_XK_braille_dots_3578 = 0x10028d4
  2501. const m_XK_braille_dots_358 = 0x1002894
  2502. const m_XK_braille_dots_36 = 0x1002824
  2503. const m_XK_braille_dots_367 = 0x1002864
  2504. const m_XK_braille_dots_3678 = 0x10028e4
  2505. const m_XK_braille_dots_368 = 0x10028a4
  2506. const m_XK_braille_dots_37 = 0x1002844
  2507. const m_XK_braille_dots_378 = 0x10028c4
  2508. const m_XK_braille_dots_38 = 0x1002884
  2509. const m_XK_braille_dots_4 = 0x1002808
  2510. const m_XK_braille_dots_45 = 0x1002818
  2511. const m_XK_braille_dots_456 = 0x1002838
  2512. const m_XK_braille_dots_4567 = 0x1002878
  2513. const m_XK_braille_dots_45678 = 0x10028f8
  2514. const m_XK_braille_dots_4568 = 0x10028b8
  2515. const m_XK_braille_dots_457 = 0x1002858
  2516. const m_XK_braille_dots_4578 = 0x10028d8
  2517. const m_XK_braille_dots_458 = 0x1002898
  2518. const m_XK_braille_dots_46 = 0x1002828
  2519. const m_XK_braille_dots_467 = 0x1002868
  2520. const m_XK_braille_dots_4678 = 0x10028e8
  2521. const m_XK_braille_dots_468 = 0x10028a8
  2522. const m_XK_braille_dots_47 = 0x1002848
  2523. const m_XK_braille_dots_478 = 0x10028c8
  2524. const m_XK_braille_dots_48 = 0x1002888
  2525. const m_XK_braille_dots_5 = 0x1002810
  2526. const m_XK_braille_dots_56 = 0x1002830
  2527. const m_XK_braille_dots_567 = 0x1002870
  2528. const m_XK_braille_dots_5678 = 0x10028f0
  2529. const m_XK_braille_dots_568 = 0x10028b0
  2530. const m_XK_braille_dots_57 = 0x1002850
  2531. const m_XK_braille_dots_578 = 0x10028d0
  2532. const m_XK_braille_dots_58 = 0x1002890
  2533. const m_XK_braille_dots_6 = 0x1002820
  2534. const m_XK_braille_dots_67 = 0x1002860
  2535. const m_XK_braille_dots_678 = 0x10028e0
  2536. const m_XK_braille_dots_68 = 0x10028a0
  2537. const m_XK_braille_dots_7 = 0x1002840
  2538. const m_XK_braille_dots_78 = 0x10028c0
  2539. const m_XK_braille_dots_8 = 0x1002880
  2540. const m_XK_breve = 0x01a2
  2541. const m_XK_brokenbar = 0x00a6
  2542. const m_XK_c = 0x0063
  2543. const m_XK_c_h = 0xfea3
  2544. const m_XK_cabovedot = 0x02e5
  2545. const m_XK_cacute = 0x01e6
  2546. const m_XK_caron = 0x01b7
  2547. const m_XK_ccaron = 0x01e8
  2548. const m_XK_ccedilla = 0x00e7
  2549. const m_XK_ccircumflex = 0x02e6
  2550. const m_XK_cedilla = 0x00b8
  2551. const m_XK_cent = 0x00a2
  2552. const m_XK_ch = 0xfea0
  2553. const m_XK_colon = 0x003a
  2554. const m_XK_combining_acute = 0x1000301
  2555. const m_XK_combining_belowdot = 0x1000323
  2556. const m_XK_combining_grave = 0x1000300
  2557. const m_XK_combining_hook = 0x1000309
  2558. const m_XK_combining_tilde = 0x1000303
  2559. const m_XK_comma = 0x002c
  2560. const m_XK_containsas = 0x100220b
  2561. const m_XK_copyright = 0x00a9
  2562. const m_XK_cuberoot = 0x100221b
  2563. const m_XK_currency = 0x00a4
  2564. const m_XK_d = 0x0064
  2565. const m_XK_dabovedot = 0x1001e0b
  2566. const m_XK_dcaron = 0x01ef
  2567. const m_XK_dead_A = 0xfe81
  2568. const m_XK_dead_E = 0xfe83
  2569. const m_XK_dead_I = 0xfe85
  2570. const m_XK_dead_O = 0xfe87
  2571. const m_XK_dead_SCHWA = 0xfe8b
  2572. const m_XK_dead_U = 0xfe89
  2573. const m_XK_dead_a = 0xfe80
  2574. const m_XK_dead_abovecomma = 0xfe64
  2575. const m_XK_dead_abovedot = 0xfe56
  2576. const m_XK_dead_abovereversedcomma = 0xfe65
  2577. const m_XK_dead_abovering = 0xfe58
  2578. const m_XK_dead_aboveverticalline = 0xfe91
  2579. const m_XK_dead_acute = 0xfe51
  2580. const m_XK_dead_belowbreve = 0xfe6b
  2581. const m_XK_dead_belowcircumflex = 0xfe69
  2582. const m_XK_dead_belowcomma = 0xfe6e
  2583. const m_XK_dead_belowdiaeresis = 0xfe6c
  2584. const m_XK_dead_belowdot = 0xfe60
  2585. const m_XK_dead_belowmacron = 0xfe68
  2586. const m_XK_dead_belowring = 0xfe67
  2587. const m_XK_dead_belowtilde = 0xfe6a
  2588. const m_XK_dead_belowverticalline = 0xfe92
  2589. const m_XK_dead_breve = 0xfe55
  2590. const m_XK_dead_capital_schwa = 0xfe8b
  2591. const m_XK_dead_caron = 0xfe5a
  2592. const m_XK_dead_cedilla = 0xfe5b
  2593. const m_XK_dead_circumflex = 0xfe52
  2594. const m_XK_dead_currency = 0xfe6f
  2595. const m_XK_dead_dasia = 0xfe65
  2596. const m_XK_dead_diaeresis = 0xfe57
  2597. const m_XK_dead_doubleacute = 0xfe59
  2598. const m_XK_dead_doublegrave = 0xfe66
  2599. const m_XK_dead_e = 0xfe82
  2600. const m_XK_dead_grave = 0xfe50
  2601. const m_XK_dead_greek = 0xfe8c
  2602. const m_XK_dead_hamza = 0xfe8d
  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_schwa = 0xfe8a
  2616. const m_XK_dead_semivoiced_sound = 0xfe5f
  2617. const m_XK_dead_small_schwa = 0xfe8a
  2618. const m_XK_dead_stroke = 0xfe63
  2619. const m_XK_dead_tilde = 0xfe53
  2620. const m_XK_dead_u = 0xfe88
  2621. const m_XK_dead_voiced_sound = 0xfe5e
  2622. const m_XK_degree = 0x00b0
  2623. const m_XK_diaeresis = 0x00a8
  2624. const m_XK_dintegral = 0x100222c
  2625. const m_XK_division = 0x00f7
  2626. const m_XK_dollar = 0x0024
  2627. const m_XK_doubleacute = 0x01bd
  2628. const m_XK_dstroke = 0x01f0
  2629. const m_XK_e = 0x0065
  2630. const m_XK_eabovedot = 0x03ec
  2631. const m_XK_eacute = 0x00e9
  2632. const m_XK_ebelowdot = 0x1001eb9
  2633. const m_XK_ecaron = 0x01ec
  2634. const m_XK_ecircumflex = 0x00ea
  2635. const m_XK_ecircumflexacute = 0x1001ebf
  2636. const m_XK_ecircumflexbelowdot = 0x1001ec7
  2637. const m_XK_ecircumflexgrave = 0x1001ec1
  2638. const m_XK_ecircumflexhook = 0x1001ec3
  2639. const m_XK_ecircumflextilde = 0x1001ec5
  2640. const m_XK_ediaeresis = 0x00eb
  2641. const m_XK_egrave = 0x00e8
  2642. const m_XK_ehook = 0x1001ebb
  2643. const m_XK_eightsubscript = 0x1002088
  2644. const m_XK_eightsuperior = 0x1002078
  2645. const m_XK_elementof = 0x1002208
  2646. const m_XK_emacron = 0x03ba
  2647. const m_XK_emptyset = 0x1002205
  2648. const m_XK_eng = 0x03bf
  2649. const m_XK_eogonek = 0x01ea
  2650. const m_XK_equal = 0x003d
  2651. const m_XK_eth = 0x00f0
  2652. const m_XK_etilde = 0x1001ebd
  2653. const m_XK_exclam = 0x0021
  2654. const m_XK_exclamdown = 0x00a1
  2655. const m_XK_ezh = 0x1000292
  2656. const m_XK_f = 0x0066
  2657. const m_XK_fabovedot = 0x1001e1f
  2658. const m_XK_fivesubscript = 0x1002085
  2659. const m_XK_fivesuperior = 0x1002075
  2660. const m_XK_foursubscript = 0x1002084
  2661. const m_XK_foursuperior = 0x1002074
  2662. const m_XK_fourthroot = 0x100221c
  2663. const m_XK_g = 0x0067
  2664. const m_XK_gabovedot = 0x02f5
  2665. const m_XK_gbreve = 0x02bb
  2666. const m_XK_gcaron = 0x10001e7
  2667. const m_XK_gcedilla = 0x03bb
  2668. const m_XK_gcircumflex = 0x02f8
  2669. const m_XK_grave = 0x0060
  2670. const m_XK_greater = 0x003e
  2671. const m_XK_guillemetleft = 0x00ab
  2672. const m_XK_guillemetright = 0x00bb
  2673. const m_XK_guillemotleft = 0x00ab
  2674. const m_XK_guillemotright = 0x00bb
  2675. const m_XK_h = 0x0068
  2676. const m_XK_hcircumflex = 0x02b6
  2677. const m_XK_hebrew_aleph = 0x0ce0
  2678. const m_XK_hebrew_ayin = 0x0cf2
  2679. const m_XK_hebrew_bet = 0x0ce1
  2680. const m_XK_hebrew_beth = 0x0ce1
  2681. const m_XK_hebrew_chet = 0x0ce7
  2682. const m_XK_hebrew_dalet = 0x0ce3
  2683. const m_XK_hebrew_daleth = 0x0ce3
  2684. const m_XK_hebrew_doublelowline = 0x0cdf
  2685. const m_XK_hebrew_finalkaph = 0x0cea
  2686. const m_XK_hebrew_finalmem = 0x0ced
  2687. const m_XK_hebrew_finalnun = 0x0cef
  2688. const m_XK_hebrew_finalpe = 0x0cf3
  2689. const m_XK_hebrew_finalzade = 0x0cf5
  2690. const m_XK_hebrew_finalzadi = 0x0cf5
  2691. const m_XK_hebrew_gimel = 0x0ce2
  2692. const m_XK_hebrew_gimmel = 0x0ce2
  2693. const m_XK_hebrew_he = 0x0ce4
  2694. const m_XK_hebrew_het = 0x0ce7
  2695. const m_XK_hebrew_kaph = 0x0ceb
  2696. const m_XK_hebrew_kuf = 0x0cf7
  2697. const m_XK_hebrew_lamed = 0x0cec
  2698. const m_XK_hebrew_mem = 0x0cee
  2699. const m_XK_hebrew_nun = 0x0cf0
  2700. const m_XK_hebrew_pe = 0x0cf4
  2701. const m_XK_hebrew_qoph = 0x0cf7
  2702. const m_XK_hebrew_resh = 0x0cf8
  2703. const m_XK_hebrew_samech = 0x0cf1
  2704. const m_XK_hebrew_samekh = 0x0cf1
  2705. const m_XK_hebrew_shin = 0x0cf9
  2706. const m_XK_hebrew_taf = 0x0cfa
  2707. const m_XK_hebrew_taw = 0x0cfa
  2708. const m_XK_hebrew_tet = 0x0ce8
  2709. const m_XK_hebrew_teth = 0x0ce8
  2710. const m_XK_hebrew_waw = 0x0ce5
  2711. const m_XK_hebrew_yod = 0x0ce9
  2712. const m_XK_hebrew_zade = 0x0cf6
  2713. const m_XK_hebrew_zadi = 0x0cf6
  2714. const m_XK_hebrew_zain = 0x0ce6
  2715. const m_XK_hebrew_zayin = 0x0ce6
  2716. const m_XK_hstroke = 0x02b1
  2717. const m_XK_hyphen = 0x00ad
  2718. const m_XK_i = 0x0069
  2719. const m_XK_iacute = 0x00ed
  2720. const m_XK_ibelowdot = 0x1001ecb
  2721. const m_XK_ibreve = 0x100012d
  2722. const m_XK_icircumflex = 0x00ee
  2723. const m_XK_idiaeresis = 0x00ef
  2724. const m_XK_idotless = 0x02b9
  2725. const m_XK_igrave = 0x00ec
  2726. const m_XK_ihook = 0x1001ec9
  2727. const m_XK_imacron = 0x03ef
  2728. const m_XK_iogonek = 0x03e7
  2729. const m_XK_itilde = 0x03b5
  2730. const m_XK_j = 0x006a
  2731. const m_XK_jcircumflex = 0x02bc
  2732. const m_XK_k = 0x006b
  2733. const m_XK_kana_A = 0x04b1
  2734. const m_XK_kana_CHI = 0x04c1
  2735. const m_XK_kana_E = 0x04b4
  2736. const m_XK_kana_FU = 0x04cc
  2737. const m_XK_kana_HA = 0x04ca
  2738. const m_XK_kana_HE = 0x04cd
  2739. const m_XK_kana_HI = 0x04cb
  2740. const m_XK_kana_HO = 0x04ce
  2741. const m_XK_kana_HU = 0x04cc
  2742. const m_XK_kana_I = 0x04b2
  2743. const m_XK_kana_KA = 0x04b6
  2744. const m_XK_kana_KE = 0x04b9
  2745. const m_XK_kana_KI = 0x04b7
  2746. const m_XK_kana_KO = 0x04ba
  2747. const m_XK_kana_KU = 0x04b8
  2748. const m_XK_kana_MA = 0x04cf
  2749. const m_XK_kana_ME = 0x04d2
  2750. const m_XK_kana_MI = 0x04d0
  2751. const m_XK_kana_MO = 0x04d3
  2752. const m_XK_kana_MU = 0x04d1
  2753. const m_XK_kana_N = 0x04dd
  2754. const m_XK_kana_NA = 0x04c5
  2755. const m_XK_kana_NE = 0x04c8
  2756. const m_XK_kana_NI = 0x04c6
  2757. const m_XK_kana_NO = 0x04c9
  2758. const m_XK_kana_NU = 0x04c7
  2759. const m_XK_kana_O = 0x04b5
  2760. const m_XK_kana_RA = 0x04d7
  2761. const m_XK_kana_RE = 0x04da
  2762. const m_XK_kana_RI = 0x04d8
  2763. const m_XK_kana_RO = 0x04db
  2764. const m_XK_kana_RU = 0x04d9
  2765. const m_XK_kana_SA = 0x04bb
  2766. const m_XK_kana_SE = 0x04be
  2767. const m_XK_kana_SHI = 0x04bc
  2768. const m_XK_kana_SO = 0x04bf
  2769. const m_XK_kana_SU = 0x04bd
  2770. const m_XK_kana_TA = 0x04c0
  2771. const m_XK_kana_TE = 0x04c3
  2772. const m_XK_kana_TI = 0x04c1
  2773. const m_XK_kana_TO = 0x04c4
  2774. const m_XK_kana_TSU = 0x04c2
  2775. const m_XK_kana_TU = 0x04c2
  2776. const m_XK_kana_U = 0x04b3
  2777. const m_XK_kana_WA = 0x04dc
  2778. const m_XK_kana_WO = 0x04a6
  2779. const m_XK_kana_YA = 0x04d4
  2780. const m_XK_kana_YO = 0x04d6
  2781. const m_XK_kana_YU = 0x04d5
  2782. const m_XK_kana_a = 0x04a7
  2783. const m_XK_kana_closingbracket = 0x04a3
  2784. const m_XK_kana_comma = 0x04a4
  2785. const m_XK_kana_conjunctive = 0x04a5
  2786. const m_XK_kana_e = 0x04aa
  2787. const m_XK_kana_fullstop = 0x04a1
  2788. const m_XK_kana_i = 0x04a8
  2789. const m_XK_kana_middledot = 0x04a5
  2790. const m_XK_kana_o = 0x04ab
  2791. const m_XK_kana_openingbracket = 0x04a2
  2792. const m_XK_kana_switch = 0xff7e
  2793. const m_XK_kana_tsu = 0x04af
  2794. const m_XK_kana_tu = 0x04af
  2795. const m_XK_kana_u = 0x04a9
  2796. const m_XK_kana_ya = 0x04ac
  2797. const m_XK_kana_yo = 0x04ae
  2798. const m_XK_kana_yu = 0x04ad
  2799. const m_XK_kappa = 0x03a2
  2800. const m_XK_kcedilla = 0x03f3
  2801. const m_XK_kra = 0x03a2
  2802. const m_XK_l = 0x006c
  2803. const m_XK_lacute = 0x01e5
  2804. const m_XK_lbelowdot = 0x1001e37
  2805. const m_XK_lcaron = 0x01b5
  2806. const m_XK_lcedilla = 0x03b6
  2807. const m_XK_less = 0x003c
  2808. const m_XK_lstroke = 0x01b3
  2809. const m_XK_m = 0x006d
  2810. const m_XK_mabovedot = 0x1001e41
  2811. const m_XK_macron = 0x00af
  2812. const m_XK_masculine = 0x00ba
  2813. const m_XK_minus = 0x002d
  2814. const m_XK_mu = 0x00b5
  2815. const m_XK_multiply = 0x00d7
  2816. const m_XK_n = 0x006e
  2817. const m_XK_nacute = 0x01f1
  2818. const m_XK_ncaron = 0x01f2
  2819. const m_XK_ncedilla = 0x03f1
  2820. const m_XK_ninesubscript = 0x1002089
  2821. const m_XK_ninesuperior = 0x1002079
  2822. const m_XK_nobreakspace = 0x00a0
  2823. const m_XK_notapproxeq = 0x1002247
  2824. const m_XK_notelementof = 0x1002209
  2825. const m_XK_notidentical = 0x1002262
  2826. const m_XK_notsign = 0x00ac
  2827. const m_XK_ntilde = 0x00f1
  2828. const m_XK_numbersign = 0x0023
  2829. const m_XK_numerosign = 0x06b0
  2830. const m_XK_o = 0x006f
  2831. const m_XK_oacute = 0x00f3
  2832. const m_XK_obarred = 0x1000275
  2833. const m_XK_obelowdot = 0x1001ecd
  2834. const m_XK_ocaron = 0x10001d2
  2835. const m_XK_ocircumflex = 0x00f4
  2836. const m_XK_ocircumflexacute = 0x1001ed1
  2837. const m_XK_ocircumflexbelowdot = 0x1001ed9
  2838. const m_XK_ocircumflexgrave = 0x1001ed3
  2839. const m_XK_ocircumflexhook = 0x1001ed5
  2840. const m_XK_ocircumflextilde = 0x1001ed7
  2841. const m_XK_odiaeresis = 0x00f6
  2842. const m_XK_odoubleacute = 0x01f5
  2843. const m_XK_oe = 0x13bd
  2844. const m_XK_ogonek = 0x01b2
  2845. const m_XK_ograve = 0x00f2
  2846. const m_XK_ohook = 0x1001ecf
  2847. const m_XK_ohorn = 0x10001a1
  2848. const m_XK_ohornacute = 0x1001edb
  2849. const m_XK_ohornbelowdot = 0x1001ee3
  2850. const m_XK_ohorngrave = 0x1001edd
  2851. const m_XK_ohornhook = 0x1001edf
  2852. const m_XK_ohorntilde = 0x1001ee1
  2853. const m_XK_omacron = 0x03f2
  2854. const m_XK_onehalf = 0x00bd
  2855. const m_XK_onequarter = 0x00bc
  2856. const m_XK_onesubscript = 0x1002081
  2857. const m_XK_onesuperior = 0x00b9
  2858. const m_XK_ooblique = 0x00f8
  2859. const m_XK_ordfeminine = 0x00aa
  2860. const m_XK_ordmasculine = 0x00ba
  2861. const m_XK_oslash = 0x00f8
  2862. const m_XK_otilde = 0x00f5
  2863. const m_XK_overline = 0x047e
  2864. const m_XK_p = 0x0070
  2865. const m_XK_pabovedot = 0x1001e57
  2866. const m_XK_paragraph = 0x00b6
  2867. const m_XK_parenleft = 0x0028
  2868. const m_XK_parenright = 0x0029
  2869. const m_XK_partdifferential = 0x1002202
  2870. const m_XK_percent = 0x0025
  2871. const m_XK_period = 0x002e
  2872. const m_XK_periodcentered = 0x00b7
  2873. const m_XK_plus = 0x002b
  2874. const m_XK_plusminus = 0x00b1
  2875. const m_XK_prolongedsound = 0x04b0
  2876. const m_XK_q = 0x0071
  2877. const m_XK_question = 0x003f
  2878. const m_XK_questiondown = 0x00bf
  2879. const m_XK_quotedbl = 0x0022
  2880. const m_XK_quoteleft = 0x0060
  2881. const m_XK_quoteright = 0x0027
  2882. const m_XK_r = 0x0072
  2883. const m_XK_racute = 0x01e0
  2884. const m_XK_rcaron = 0x01f8
  2885. const m_XK_rcedilla = 0x03b3
  2886. const m_XK_registered = 0x00ae
  2887. const m_XK_s = 0x0073
  2888. const m_XK_sabovedot = 0x1001e61
  2889. const m_XK_sacute = 0x01b6
  2890. const m_XK_scaron = 0x01b9
  2891. const m_XK_scedilla = 0x01ba
  2892. const m_XK_schwa = 0x1000259
  2893. const m_XK_scircumflex = 0x02fe
  2894. const m_XK_script_switch = 0xff7e
  2895. const m_XK_section = 0x00a7
  2896. const m_XK_semicolon = 0x003b
  2897. const m_XK_semivoicedsound = 0x04df
  2898. const m_XK_sevensubscript = 0x1002087
  2899. const m_XK_sevensuperior = 0x1002077
  2900. const m_XK_sixsubscript = 0x1002086
  2901. const m_XK_sixsuperior = 0x1002076
  2902. const m_XK_slash = 0x002f
  2903. const m_XK_space = 0x0020
  2904. const m_XK_squareroot = 0x100221a
  2905. const m_XK_ssharp = 0x00df
  2906. const m_XK_sterling = 0x00a3
  2907. const m_XK_stricteq = 0x1002263
  2908. const m_XK_t = 0x0074
  2909. const m_XK_tabovedot = 0x1001e6b
  2910. const m_XK_tcaron = 0x01bb
  2911. const m_XK_tcedilla = 0x01fe
  2912. const m_XK_thorn = 0x00fe
  2913. const m_XK_threequarters = 0x00be
  2914. const m_XK_threesubscript = 0x1002083
  2915. const m_XK_threesuperior = 0x00b3
  2916. const m_XK_tintegral = 0x100222d
  2917. const m_XK_tslash = 0x03bc
  2918. const m_XK_twosubscript = 0x1002082
  2919. const m_XK_twosuperior = 0x00b2
  2920. const m_XK_u = 0x0075
  2921. const m_XK_uacute = 0x00fa
  2922. const m_XK_ubelowdot = 0x1001ee5
  2923. const m_XK_ubreve = 0x02fd
  2924. const m_XK_ucircumflex = 0x00fb
  2925. const m_XK_udiaeresis = 0x00fc
  2926. const m_XK_udoubleacute = 0x01fb
  2927. const m_XK_ugrave = 0x00f9
  2928. const m_XK_uhook = 0x1001ee7
  2929. const m_XK_uhorn = 0x10001b0
  2930. const m_XK_uhornacute = 0x1001ee9
  2931. const m_XK_uhornbelowdot = 0x1001ef1
  2932. const m_XK_uhorngrave = 0x1001eeb
  2933. const m_XK_uhornhook = 0x1001eed
  2934. const m_XK_uhorntilde = 0x1001eef
  2935. const m_XK_umacron = 0x03fe
  2936. const m_XK_underscore = 0x005f
  2937. const m_XK_uogonek = 0x03f9
  2938. const m_XK_uring = 0x01f9
  2939. const m_XK_utilde = 0x03fd
  2940. const m_XK_v = 0x0076
  2941. const m_XK_voicedsound = 0x04de
  2942. const m_XK_w = 0x0077
  2943. const m_XK_wacute = 0x1001e83
  2944. const m_XK_wcircumflex = 0x1000175
  2945. const m_XK_wdiaeresis = 0x1001e85
  2946. const m_XK_wgrave = 0x1001e81
  2947. const m_XK_x = 0x0078
  2948. const m_XK_xabovedot = 0x1001e8b
  2949. const m_XK_y = 0x0079
  2950. const m_XK_yacute = 0x00fd
  2951. const m_XK_ybelowdot = 0x1001ef5
  2952. const m_XK_ycircumflex = 0x1000177
  2953. const m_XK_ydiaeresis = 0x00ff
  2954. const m_XK_yen = 0x00a5
  2955. const m_XK_ygrave = 0x1001ef3
  2956. const m_XK_yhook = 0x1001ef7
  2957. const m_XK_ytilde = 0x1001ef9
  2958. const m_XK_z = 0x007a
  2959. const m_XK_zabovedot = 0x01bf
  2960. const m_XK_zacute = 0x01bc
  2961. const m_XK_zcaron = 0x01be
  2962. const m_XK_zerosubscript = 0x1002080
  2963. const m_XK_zerosuperior = 0x1002070
  2964. const m_XK_zstroke = 0x10001b6
  2965. const m_XLookupBoth = 4
  2966. const m_XLookupChars = 2
  2967. const m_XLookupKeySym = 3
  2968. const m_XLookupNone = 1
  2969. const m_XMD_H = 1
  2970. const m_XMUTEX_INITIALIZER = "PTHREAD_MUTEX_INITIALIZER"
  2971. const m_XNArea = "area"
  2972. const m_XNAreaNeeded = "areaNeeded"
  2973. const m_XNBackground = "background"
  2974. const m_XNBackgroundPixmap = "backgroundPixmap"
  2975. const m_XNBaseFontName = "baseFontName"
  2976. const m_XNClientWindow = "clientWindow"
  2977. const m_XNColormap = "colorMap"
  2978. const m_XNContextualDrawing = "contextualDrawing"
  2979. const m_XNCursor = "cursor"
  2980. const m_XNDefaultString = "defaultString"
  2981. const m_XNDestroyCallback = "destroyCallback"
  2982. const m_XNDirectionalDependentDrawing = "directionalDependentDrawing"
  2983. const m_XNFilterEvents = "filterEvents"
  2984. const m_XNFocusWindow = "focusWindow"
  2985. const m_XNFontInfo = "fontInfo"
  2986. const m_XNFontSet = "fontSet"
  2987. const m_XNForeground = "foreground"
  2988. const m_XNGeometryCallback = "geometryCallback"
  2989. const m_XNHotKey = "hotKey"
  2990. const m_XNHotKeyState = "hotKeyState"
  2991. const m_XNInputStyle = "inputStyle"
  2992. const m_XNLineSpace = "lineSpace"
  2993. const m_XNMissingCharSet = "missingCharSet"
  2994. const m_XNOMAutomatic = "omAutomatic"
  2995. const m_XNOrientation = "orientation"
  2996. const m_XNPreeditAttributes = "preeditAttributes"
  2997. const m_XNPreeditCaretCallback = "preeditCaretCallback"
  2998. const m_XNPreeditDoneCallback = "preeditDoneCallback"
  2999. const m_XNPreeditDrawCallback = "preeditDrawCallback"
  3000. const m_XNPreeditStartCallback = "preeditStartCallback"
  3001. const m_XNPreeditState = "preeditState"
  3002. const m_XNPreeditStateNotifyCallback = "preeditStateNotifyCallback"
  3003. const m_XNQueryICValuesList = "queryICValuesList"
  3004. const m_XNQueryIMValuesList = "queryIMValuesList"
  3005. const m_XNQueryInputStyle = "queryInputStyle"
  3006. const m_XNQueryOrientation = "queryOrientation"
  3007. const m_XNR6PreeditCallback = "r6PreeditCallback"
  3008. const m_XNRequiredCharSet = "requiredCharSet"
  3009. const m_XNResetState = "resetState"
  3010. const m_XNResourceClass = "resourceClass"
  3011. const m_XNResourceName = "resourceName"
  3012. const m_XNSeparatorofNestedList = "separatorofNestedList"
  3013. const m_XNSpotLocation = "spotLocation"
  3014. const m_XNStatusAttributes = "statusAttributes"
  3015. const m_XNStatusDoneCallback = "statusDoneCallback"
  3016. const m_XNStatusDrawCallback = "statusDrawCallback"
  3017. const m_XNStatusStartCallback = "statusStartCallback"
  3018. const m_XNStdColormap = "stdColorMap"
  3019. const m_XNStringConversion = "stringConversion"
  3020. const m_XNStringConversionCallback = "stringConversionCallback"
  3021. const m_XNVaNestedList = "XNVaNestedList"
  3022. const m_XNVisiblePosition = "visiblePosition"
  3023. const m_XNegative = 0x0010
  3024. const m_XTHREADS = 1
  3025. const m_XUSE_MTSAFE_API = 1
  3026. const m_XValue = 0x0001
  3027. const m_XYBitmap = 0
  3028. const m_XYPixmap = 1
  3029. const m_X_AllocColor = 84
  3030. const m_X_AllocColorCells = 86
  3031. const m_X_AllocColorPlanes = 87
  3032. const m_X_AllocNamedColor = 85
  3033. const m_X_AllowEvents = 35
  3034. const m_X_Bell = 104
  3035. const m_X_ChangeActivePointerGrab = 30
  3036. const m_X_ChangeGC = 56
  3037. const m_X_ChangeHosts = 109
  3038. const m_X_ChangeKeyboardControl = 102
  3039. const m_X_ChangeKeyboardMapping = 100
  3040. const m_X_ChangePointerControl = 105
  3041. const m_X_ChangeProperty = 18
  3042. const m_X_ChangeSaveSet = 6
  3043. const m_X_ChangeWindowAttributes = 2
  3044. const m_X_CirculateWindow = 13
  3045. const m_X_ClearArea = 61
  3046. const m_X_CloseFont = 46
  3047. const m_X_ConfigureWindow = 12
  3048. const m_X_ConvertSelection = 24
  3049. const m_X_CopyArea = 62
  3050. const m_X_CopyColormapAndFree = 80
  3051. const m_X_CopyGC = 57
  3052. const m_X_CopyPlane = 63
  3053. const m_X_CreateColormap = 78
  3054. const m_X_CreateCursor = 93
  3055. const m_X_CreateGC = 55
  3056. const m_X_CreateGlyphCursor = 94
  3057. const m_X_CreatePixmap = 53
  3058. const m_X_CreateWindow = 1
  3059. const m_X_DeleteProperty = 19
  3060. const m_X_DestroySubwindows = 5
  3061. const m_X_DestroyWindow = 4
  3062. const m_X_Error = 0
  3063. const m_X_FillPoly = 69
  3064. const m_X_ForceScreenSaver = 115
  3065. const m_X_FreeColormap = 79
  3066. const m_X_FreeColors = 88
  3067. const m_X_FreeCursor = 95
  3068. const m_X_FreeGC = 60
  3069. const m_X_FreePixmap = 54
  3070. const m_X_GetAtomName = 17
  3071. const m_X_GetFontPath = 52
  3072. const m_X_GetGeometry = 14
  3073. const m_X_GetImage = 73
  3074. const m_X_GetInputFocus = 43
  3075. const m_X_GetKeyboardControl = 103
  3076. const m_X_GetKeyboardMapping = 101
  3077. const m_X_GetModifierMapping = 119
  3078. const m_X_GetMotionEvents = 39
  3079. const m_X_GetPointerControl = 106
  3080. const m_X_GetPointerMapping = 117
  3081. const m_X_GetProperty = 20
  3082. const m_X_GetScreenSaver = 108
  3083. const m_X_GetSelectionOwner = 23
  3084. const m_X_GetWindowAttributes = 3
  3085. const m_X_GrabButton = 28
  3086. const m_X_GrabKey = 33
  3087. const m_X_GrabKeyboard = 31
  3088. const m_X_GrabPointer = 26
  3089. const m_X_GrabServer = 36
  3090. const m_X_HAVE_UTF8_STRING = 1
  3091. const m_X_ImageText16 = 77
  3092. const m_X_ImageText8 = 76
  3093. const m_X_InstallColormap = 81
  3094. const m_X_InternAtom = 16
  3095. const m_X_KillClient = 113
  3096. const m_X_ListExtensions = 99
  3097. const m_X_ListFonts = 49
  3098. const m_X_ListFontsWithInfo = 50
  3099. const m_X_ListHosts = 110
  3100. const m_X_ListInstalledColormaps = 83
  3101. const m_X_ListProperties = 21
  3102. const m_X_LookupColor = 92
  3103. const m_X_MapSubwindows = 9
  3104. const m_X_MapWindow = 8
  3105. const m_X_NoOperation = 127
  3106. const m_X_OpenFont = 45
  3107. const m_X_PROTOCOL = 11
  3108. const m_X_PROTOCOL_REVISION = 0
  3109. const m_X_PolyArc = 68
  3110. const m_X_PolyFillArc = 71
  3111. const m_X_PolyFillRectangle = 70
  3112. const m_X_PolyLine = 65
  3113. const m_X_PolyPoint = 64
  3114. const m_X_PolyRectangle = 67
  3115. const m_X_PolySegment = 66
  3116. const m_X_PolyText16 = 75
  3117. const m_X_PolyText8 = 74
  3118. const m_X_PutImage = 72
  3119. const m_X_QueryBestSize = 97
  3120. const m_X_QueryColors = 91
  3121. const m_X_QueryExtension = 98
  3122. const m_X_QueryFont = 47
  3123. const m_X_QueryKeymap = 44
  3124. const m_X_QueryPointer = 38
  3125. const m_X_QueryTextExtents = 48
  3126. const m_X_QueryTree = 15
  3127. const m_X_RecolorCursor = 96
  3128. const m_X_RenderAddGlyphs = 20
  3129. const m_X_RenderAddGlyphsFromPicture = 21
  3130. const m_X_RenderAddTraps = 32
  3131. const m_X_RenderChangePicture = 5
  3132. const m_X_RenderColorTrapezoids = 14
  3133. const m_X_RenderColorTriangles = 15
  3134. const m_X_RenderComposite = 8
  3135. const m_X_RenderCompositeGlyphs16 = 24
  3136. const m_X_RenderCompositeGlyphs32 = 25
  3137. const m_X_RenderCompositeGlyphs8 = 23
  3138. const m_X_RenderCreateAnimCursor = 31
  3139. const m_X_RenderCreateConicalGradient = 36
  3140. const m_X_RenderCreateCursor = 27
  3141. const m_X_RenderCreateGlyphSet = 17
  3142. const m_X_RenderCreateLinearGradient = 34
  3143. const m_X_RenderCreatePicture = 4
  3144. const m_X_RenderCreateRadialGradient = 35
  3145. const m_X_RenderCreateSolidFill = 33
  3146. const m_X_RenderFillRectangles = 26
  3147. const m_X_RenderFreeGlyphSet = 19
  3148. const m_X_RenderFreeGlyphs = 22
  3149. const m_X_RenderFreePicture = 7
  3150. const m_X_RenderQueryDithers = 3
  3151. const m_X_RenderQueryFilters = 29
  3152. const m_X_RenderQueryPictFormats = 1
  3153. const m_X_RenderQueryPictIndexValues = 2
  3154. const m_X_RenderQueryVersion = 0
  3155. const m_X_RenderReferenceGlyphSet = 18
  3156. const m_X_RenderScale = 9
  3157. const m_X_RenderSetPictureClipRectangles = 6
  3158. const m_X_RenderSetPictureFilter = 30
  3159. const m_X_RenderSetPictureTransform = 28
  3160. const m_X_RenderTrapezoids = 10
  3161. const m_X_RenderTriFan = 13
  3162. const m_X_RenderTriStrip = 12
  3163. const m_X_RenderTriangles = 11
  3164. const m_X_ReparentWindow = 7
  3165. const m_X_Reply = 1
  3166. const m_X_RotateProperties = 114
  3167. const m_X_SendEvent = 25
  3168. const m_X_SetAccessControl = 111
  3169. const m_X_SetClipRectangles = 59
  3170. const m_X_SetCloseDownMode = 112
  3171. const m_X_SetDashes = 58
  3172. const m_X_SetFontPath = 51
  3173. const m_X_SetInputFocus = 42
  3174. const m_X_SetModifierMapping = 118
  3175. const m_X_SetPointerMapping = 116
  3176. const m_X_SetScreenSaver = 107
  3177. const m_X_SetSelectionOwner = 22
  3178. const m_X_StoreColors = 89
  3179. const m_X_StoreNamedColor = 90
  3180. const m_X_TCP_PORT = 6000
  3181. const m_X_TranslateCoords = 40
  3182. const m_X_UngrabButton = 29
  3183. const m_X_UngrabKey = 34
  3184. const m_X_UngrabKeyboard = 32
  3185. const m_X_UngrabPointer = 27
  3186. const m_X_UngrabServer = 37
  3187. const m_X_UninstallColormap = 82
  3188. const m_X_UnmapSubwindows = 11
  3189. const m_X_UnmapWindow = 10
  3190. const m_X_WarpPointer = 41
  3191. const m_XftVersion = "XFT_VERSION"
  3192. const m_XlibSpecificationRelease = 6
  3193. const m_YNegative = 0x0020
  3194. const m_YSorted = 1
  3195. const m_YValue = 0x0002
  3196. const m_YXBanded = 3
  3197. const m_YXSorted = 2
  3198. const m_ZLNSPERBATCH = 1024
  3199. const m_ZPixmap = 2
  3200. const m_ZRCTSPERBATCH = 256
  3201. const m_ZoomState = 2
  3202. const m__GNU_SOURCE = 1
  3203. const m__IOFBF = 0
  3204. const m__IOLBF = 1
  3205. const m__IONBF = 2
  3206. const m__LP64 = 1
  3207. const m__POSIX2_BC_BASE_MAX = 99
  3208. const m__POSIX2_BC_DIM_MAX = 2048
  3209. const m__POSIX2_BC_SCALE_MAX = 99
  3210. const m__POSIX2_BC_STRING_MAX = 1000
  3211. const m__POSIX2_CHARCLASS_NAME_MAX = 14
  3212. const m__POSIX2_COLL_WEIGHTS_MAX = 2
  3213. const m__POSIX2_EXPR_NEST_MAX = 32
  3214. const m__POSIX2_LINE_MAX = 2048
  3215. const m__POSIX2_RE_DUP_MAX = 255
  3216. const m__POSIX_AIO_LISTIO_MAX = 2
  3217. const m__POSIX_AIO_MAX = 1
  3218. const m__POSIX_ARG_MAX = 4096
  3219. const m__POSIX_CHILD_MAX = 25
  3220. const m__POSIX_CLOCKRES_MIN = 20000000
  3221. const m__POSIX_DELAYTIMER_MAX = 32
  3222. const m__POSIX_HOST_NAME_MAX = 255
  3223. const m__POSIX_LINK_MAX = 8
  3224. const m__POSIX_LOGIN_NAME_MAX = 9
  3225. const m__POSIX_MAX_CANON = 255
  3226. const m__POSIX_MAX_INPUT = 255
  3227. const m__POSIX_MQ_OPEN_MAX = 8
  3228. const m__POSIX_MQ_PRIO_MAX = 32
  3229. const m__POSIX_NAME_MAX = 14
  3230. const m__POSIX_NGROUPS_MAX = 8
  3231. const m__POSIX_OPEN_MAX = 20
  3232. const m__POSIX_PATH_MAX = 256
  3233. const m__POSIX_PIPE_BUF = 512
  3234. const m__POSIX_RE_DUP_MAX = 255
  3235. const m__POSIX_RTSIG_MAX = 8
  3236. const m__POSIX_SEM_NSEMS_MAX = 256
  3237. const m__POSIX_SEM_VALUE_MAX = 32767
  3238. const m__POSIX_SIGQUEUE_MAX = 32
  3239. const m__POSIX_SSIZE_MAX = 32767
  3240. const m__POSIX_SS_REPL_MAX = 4
  3241. const m__POSIX_STREAM_MAX = 8
  3242. const m__POSIX_SYMLINK_MAX = 255
  3243. const m__POSIX_SYMLOOP_MAX = 8
  3244. const m__POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
  3245. const m__POSIX_THREAD_KEYS_MAX = 128
  3246. const m__POSIX_THREAD_THREADS_MAX = 64
  3247. const m__POSIX_TIMER_MAX = 32
  3248. const m__POSIX_TRACE_EVENT_NAME_MAX = 30
  3249. const m__POSIX_TRACE_NAME_MAX = 8
  3250. const m__POSIX_TRACE_SYS_MAX = 8
  3251. const m__POSIX_TRACE_USER_EVENT_MAX = 32
  3252. const m__POSIX_TTY_NAME_MAX = 9
  3253. const m__POSIX_TZNAME_MAX = 6
  3254. const m__STDC_PREDEF_H = 1
  3255. const m__X11_XLIBINT_H_ = 1
  3256. const m__XBCOPYFUNC = "_Xbcopy"
  3257. const m__XOPEN_IOV_MAX = 16
  3258. const m__XOPEN_NAME_MAX = 255
  3259. const m__XOPEN_PATH_MAX = 1024
  3260. const m__X_INLINE = "inline"
  3261. const m__X_RESTRICT_KYWD = "restrict"
  3262. const m__Xconst = "const"
  3263. const m___ATOMIC_ACQUIRE = 2
  3264. const m___ATOMIC_ACQ_REL = 4
  3265. const m___ATOMIC_CONSUME = 1
  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___CHAR_UNSIGNED__ = 1
  3276. const m___DBL_DECIMAL_DIG__ = 17
  3277. const m___DBL_DIG__ = 15
  3278. const m___DBL_HAS_DENORM__ = 1
  3279. const m___DBL_HAS_INFINITY__ = 1
  3280. const m___DBL_HAS_QUIET_NAN__ = 1
  3281. const m___DBL_IS_IEC_60559__ = 1
  3282. const m___DBL_MANT_DIG__ = 53
  3283. const m___DBL_MAX_10_EXP__ = 308
  3284. const m___DBL_MAX_EXP__ = 1024
  3285. const m___DECIMAL_DIG__ = 36
  3286. const m___DEC_EVAL_METHOD__ = 2
  3287. const m___ELF__ = 1
  3288. const m___FINITE_MATH_ONLY__ = 0
  3289. const m___FLOAT_WORD_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3290. const m___FLT128_DECIMAL_DIG__ = 36
  3291. const m___FLT128_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3292. const m___FLT128_DIG__ = 33
  3293. const m___FLT128_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3294. const m___FLT128_HAS_DENORM__ = 1
  3295. const m___FLT128_HAS_INFINITY__ = 1
  3296. const m___FLT128_HAS_QUIET_NAN__ = 1
  3297. const m___FLT128_IS_IEC_60559__ = 1
  3298. const m___FLT128_MANT_DIG__ = 113
  3299. const m___FLT128_MAX_10_EXP__ = 4932
  3300. const m___FLT128_MAX_EXP__ = 16384
  3301. const m___FLT128_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3302. const m___FLT128_MIN__ = 3.36210314311209350626267781732175260e-4932
  3303. const m___FLT128_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3304. const m___FLT16_DECIMAL_DIG__ = 5
  3305. const m___FLT16_DENORM_MIN__ = 5.96046447753906250000000000000000000e-8
  3306. const m___FLT16_DIG__ = 3
  3307. const m___FLT16_EPSILON__ = 9.76562500000000000000000000000000000e-4
  3308. const m___FLT16_HAS_DENORM__ = 1
  3309. const m___FLT16_HAS_INFINITY__ = 1
  3310. const m___FLT16_HAS_QUIET_NAN__ = 1
  3311. const m___FLT16_IS_IEC_60559__ = 1
  3312. const m___FLT16_MANT_DIG__ = 11
  3313. const m___FLT16_MAX_10_EXP__ = 4
  3314. const m___FLT16_MAX_EXP__ = 16
  3315. const m___FLT16_MAX__ = 6.55040000000000000000000000000000000e+4
  3316. const m___FLT16_MIN__ = 6.10351562500000000000000000000000000e-5
  3317. const m___FLT16_NORM_MAX__ = 6.55040000000000000000000000000000000e+4
  3318. const m___FLT32X_DECIMAL_DIG__ = 17
  3319. const m___FLT32X_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3320. const m___FLT32X_DIG__ = 15
  3321. const m___FLT32X_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3322. const m___FLT32X_HAS_DENORM__ = 1
  3323. const m___FLT32X_HAS_INFINITY__ = 1
  3324. const m___FLT32X_HAS_QUIET_NAN__ = 1
  3325. const m___FLT32X_IS_IEC_60559__ = 1
  3326. const m___FLT32X_MANT_DIG__ = 53
  3327. const m___FLT32X_MAX_10_EXP__ = 308
  3328. const m___FLT32X_MAX_EXP__ = 1024
  3329. const m___FLT32X_MAX__ = 1.79769313486231570814527423731704357e+308
  3330. const m___FLT32X_MIN__ = 2.22507385850720138309023271733240406e-308
  3331. const m___FLT32X_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3332. const m___FLT32_DECIMAL_DIG__ = 9
  3333. const m___FLT32_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3334. const m___FLT32_DIG__ = 6
  3335. const m___FLT32_EPSILON__ = 1.19209289550781250000000000000000000e-7
  3336. const m___FLT32_HAS_DENORM__ = 1
  3337. const m___FLT32_HAS_INFINITY__ = 1
  3338. const m___FLT32_HAS_QUIET_NAN__ = 1
  3339. const m___FLT32_IS_IEC_60559__ = 1
  3340. const m___FLT32_MANT_DIG__ = 24
  3341. const m___FLT32_MAX_10_EXP__ = 38
  3342. const m___FLT32_MAX_EXP__ = 128
  3343. const m___FLT32_MAX__ = 3.40282346638528859811704183484516925e+38
  3344. const m___FLT32_MIN__ = 1.17549435082228750796873653722224568e-38
  3345. const m___FLT32_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  3346. const m___FLT64X_DECIMAL_DIG__ = 36
  3347. const m___FLT64X_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3348. const m___FLT64X_DIG__ = 33
  3349. const m___FLT64X_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3350. const m___FLT64X_HAS_DENORM__ = 1
  3351. const m___FLT64X_HAS_INFINITY__ = 1
  3352. const m___FLT64X_HAS_QUIET_NAN__ = 1
  3353. const m___FLT64X_IS_IEC_60559__ = 1
  3354. const m___FLT64X_MANT_DIG__ = 113
  3355. const m___FLT64X_MAX_10_EXP__ = 4932
  3356. const m___FLT64X_MAX_EXP__ = 16384
  3357. const m___FLT64X_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3358. const m___FLT64X_MIN__ = 3.36210314311209350626267781732175260e-4932
  3359. const m___FLT64X_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3360. const m___FLT64_DECIMAL_DIG__ = 17
  3361. const m___FLT64_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3362. const m___FLT64_DIG__ = 15
  3363. const m___FLT64_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3364. const m___FLT64_HAS_DENORM__ = 1
  3365. const m___FLT64_HAS_INFINITY__ = 1
  3366. const m___FLT64_HAS_QUIET_NAN__ = 1
  3367. const m___FLT64_IS_IEC_60559__ = 1
  3368. const m___FLT64_MANT_DIG__ = 53
  3369. const m___FLT64_MAX_10_EXP__ = 308
  3370. const m___FLT64_MAX_EXP__ = 1024
  3371. const m___FLT64_MAX__ = 1.79769313486231570814527423731704357e+308
  3372. const m___FLT64_MIN__ = 2.22507385850720138309023271733240406e-308
  3373. const m___FLT64_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3374. const m___FLT_DECIMAL_DIG__ = 9
  3375. const m___FLT_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3376. const m___FLT_DIG__ = 6
  3377. const m___FLT_EPSILON__ = 1.19209289550781250000000000000000000e-7
  3378. const m___FLT_EVAL_METHOD_TS_18661_3__ = 0
  3379. const m___FLT_EVAL_METHOD__ = 0
  3380. const m___FLT_HAS_DENORM__ = 1
  3381. const m___FLT_HAS_INFINITY__ = 1
  3382. const m___FLT_HAS_QUIET_NAN__ = 1
  3383. const m___FLT_IS_IEC_60559__ = 1
  3384. const m___FLT_MANT_DIG__ = 24
  3385. const m___FLT_MAX_10_EXP__ = 38
  3386. const m___FLT_MAX_EXP__ = 128
  3387. const m___FLT_MAX__ = 3.40282346638528859811704183484516925e+38
  3388. const m___FLT_MIN__ = 1.17549435082228750796873653722224568e-38
  3389. const m___FLT_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  3390. const m___FLT_RADIX__ = 2
  3391. const m___FP_FAST_FMA = 1
  3392. const m___FP_FAST_FMAF = 1
  3393. const m___FP_FAST_FMAF32 = 1
  3394. const m___FP_FAST_FMAF32x = 1
  3395. const m___FP_FAST_FMAF64 = 1
  3396. const m___FUNCTION__ = "__func__"
  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_HAVE_DWARF2_CFI_ASM = 1
  3409. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1
  3410. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1
  3411. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1
  3412. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1
  3413. const m___GCC_IEC_559 = 2
  3414. const m___GCC_IEC_559_COMPLEX = 2
  3415. const m___GNUC_EXECUTION_CHARSET_NAME = "UTF-8"
  3416. const m___GNUC_MINOR__ = 2
  3417. const m___GNUC_PATCHLEVEL__ = 0
  3418. const m___GNUC_STDC_INLINE__ = 1
  3419. const m___GNUC_WIDE_EXECUTION_CHARSET_NAME = "UTF-32LE"
  3420. const m___GNUC__ = 14
  3421. const m___GXX_ABI_VERSION = 1019
  3422. const m___INT16_MAX__ = 0x7fff
  3423. const m___INT32_MAX__ = 0x7fffffff
  3424. const m___INT32_TYPE__ = "int"
  3425. const m___INT64_MAX__ = 0x7fffffffffffffff
  3426. const m___INT8_MAX__ = 0x7f
  3427. const m___INTMAX_MAX__ = 0x7fffffffffffffff
  3428. const m___INTMAX_WIDTH__ = 64
  3429. const m___INTPTR_MAX__ = 0x7fffffffffffffff
  3430. const m___INTPTR_WIDTH__ = 64
  3431. const m___INT_FAST16_MAX__ = 0x7fffffffffffffff
  3432. const m___INT_FAST16_WIDTH__ = 64
  3433. const m___INT_FAST32_MAX__ = 0x7fffffffffffffff
  3434. const m___INT_FAST32_WIDTH__ = 64
  3435. const m___INT_FAST64_MAX__ = 0x7fffffffffffffff
  3436. const m___INT_FAST64_WIDTH__ = 64
  3437. const m___INT_FAST8_MAX__ = 0x7f
  3438. const m___INT_FAST8_WIDTH__ = 8
  3439. const m___INT_LEAST16_MAX__ = 0x7fff
  3440. const m___INT_LEAST16_WIDTH__ = 16
  3441. const m___INT_LEAST32_MAX__ = 0x7fffffff
  3442. const m___INT_LEAST32_TYPE__ = "int"
  3443. const m___INT_LEAST32_WIDTH__ = 32
  3444. const m___INT_LEAST64_MAX__ = 0x7fffffffffffffff
  3445. const m___INT_LEAST64_WIDTH__ = 64
  3446. const m___INT_LEAST8_MAX__ = 0x7f
  3447. const m___INT_LEAST8_WIDTH__ = 8
  3448. const m___INT_MAX__ = 0x7fffffff
  3449. const m___INT_WIDTH__ = 32
  3450. const m___LDBL_DECIMAL_DIG__ = 36
  3451. const m___LDBL_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3452. const m___LDBL_DIG__ = 33
  3453. const m___LDBL_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3454. const m___LDBL_HAS_DENORM__ = 1
  3455. const m___LDBL_HAS_INFINITY__ = 1
  3456. const m___LDBL_HAS_QUIET_NAN__ = 1
  3457. const m___LDBL_IS_IEC_60559__ = 1
  3458. const m___LDBL_MANT_DIG__ = 113
  3459. const m___LDBL_MAX_10_EXP__ = 4932
  3460. const m___LDBL_MAX_EXP__ = 16384
  3461. const m___LDBL_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3462. const m___LDBL_MIN__ = 3.36210314311209350626267781732175260e-4932
  3463. const m___LDBL_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3464. const m___LITTLE_ENDIAN = 1234
  3465. const m___LONG_LONG_MAX__ = 0x7fffffffffffffff
  3466. const m___LONG_LONG_WIDTH__ = 64
  3467. const m___LONG_MAX = 0x7fffffffffffffff
  3468. const m___LONG_MAX__ = 0x7fffffffffffffff
  3469. const m___LONG_WIDTH__ = 64
  3470. const m___LP64__ = 1
  3471. const m___NO_INLINE__ = 1
  3472. const m___ORDER_BIG_ENDIAN__ = 4321
  3473. const m___ORDER_LITTLE_ENDIAN__ = 1234
  3474. const m___ORDER_PDP_ENDIAN__ = 3412
  3475. const m___PDP_ENDIAN = 3412
  3476. const m___PIC__ = 2
  3477. const m___PIE__ = 2
  3478. const m___PRAGMA_REDEFINE_EXTNAME = 1
  3479. const m___PRETTY_FUNCTION__ = "__func__"
  3480. const m___PTRDIFF_MAX__ = 0x7fffffffffffffff
  3481. const m___PTRDIFF_WIDTH__ = 64
  3482. const m___SCHAR_MAX__ = 0x7f
  3483. const m___SCHAR_WIDTH__ = 8
  3484. const m___SHRT_MAX__ = 0x7fff
  3485. const m___SHRT_WIDTH__ = 16
  3486. const m___SIG_ATOMIC_MAX__ = 0x7fffffff
  3487. const m___SIG_ATOMIC_TYPE__ = "int"
  3488. const m___SIG_ATOMIC_WIDTH__ = 32
  3489. const m___SIZEOF_DOUBLE__ = 8
  3490. const m___SIZEOF_FLOAT__ = 4
  3491. const m___SIZEOF_INT128__ = 16
  3492. const m___SIZEOF_INT__ = 4
  3493. const m___SIZEOF_LONG_DOUBLE__ = 8
  3494. const m___SIZEOF_LONG_LONG__ = 8
  3495. const m___SIZEOF_LONG__ = 8
  3496. const m___SIZEOF_POINTER__ = 8
  3497. const m___SIZEOF_PTRDIFF_T__ = 8
  3498. const m___SIZEOF_SHORT__ = 2
  3499. const m___SIZEOF_SIZE_T__ = 8
  3500. const m___SIZEOF_WCHAR_T__ = 4
  3501. const m___SIZEOF_WINT_T__ = 4
  3502. const m___SIZE_MAX__ = 0xffffffffffffffff
  3503. const m___SIZE_WIDTH__ = 64
  3504. const m___STDC_HOSTED__ = 1
  3505. const m___STDC_IEC_559_COMPLEX__ = 1
  3506. const m___STDC_IEC_559__ = 1
  3507. const m___STDC_IEC_60559_BFP__ = 201404
  3508. const m___STDC_IEC_60559_COMPLEX__ = 201404
  3509. const m___STDC_ISO_10646__ = 201706
  3510. const m___STDC_UTF_16__ = 1
  3511. const m___STDC_UTF_32__ = 1
  3512. const m___STDC_VERSION__ = 201710
  3513. const m___STDC__ = 1
  3514. const m___UINT16_MAX__ = 0xffff
  3515. const m___UINT32_MAX__ = 0xffffffff
  3516. const m___UINT64_MAX__ = 0xffffffffffffffff
  3517. const m___UINT8_MAX__ = 0xff
  3518. const m___UINTMAX_MAX__ = 0xffffffffffffffff
  3519. const m___UINTPTR_MAX__ = 0xffffffffffffffff
  3520. const m___UINT_FAST16_MAX__ = 0xffffffffffffffff
  3521. const m___UINT_FAST32_MAX__ = 0xffffffffffffffff
  3522. const m___UINT_FAST64_MAX__ = 0xffffffffffffffff
  3523. const m___UINT_FAST8_MAX__ = 0xff
  3524. const m___UINT_LEAST16_MAX__ = 0xffff
  3525. const m___UINT_LEAST32_MAX__ = 0xffffffff
  3526. const m___UINT_LEAST64_MAX__ = 0xffffffffffffffff
  3527. const m___UINT_LEAST8_MAX__ = 0xff
  3528. const m___USE_TIME_BITS64 = 1
  3529. const m___VERSION__ = "14.2.0"
  3530. const m___WCHAR_MAX__ = 0x7fffffff
  3531. const m___WCHAR_TYPE__ = "int"
  3532. const m___WCHAR_WIDTH__ = 32
  3533. const m___WINT_MAX__ = 0xffffffff
  3534. const m___WINT_MIN__ = 0
  3535. const m___WINT_WIDTH__ = 32
  3536. const m___gnu_linux__ = 1
  3537. const m___inline = "inline"
  3538. const m___linux = 1
  3539. const m___linux__ = 1
  3540. const m___pic__ = 2
  3541. const m___pie__ = 2
  3542. const m___restrict = "restrict"
  3543. const m___restrict_arr = "restrict"
  3544. const m___riscv = 1
  3545. const m___riscv_a = 2001000
  3546. const m___riscv_arch_test = 1
  3547. const m___riscv_atomic = 1
  3548. const m___riscv_c = 2000000
  3549. const m___riscv_cmodel_medany = 1
  3550. const m___riscv_compressed = 1
  3551. const m___riscv_d = 2002000
  3552. const m___riscv_div = 1
  3553. const m___riscv_f = 2002000
  3554. const m___riscv_fdiv = 1
  3555. const m___riscv_flen = 64
  3556. const m___riscv_float_abi_double = 1
  3557. const m___riscv_fsqrt = 1
  3558. const m___riscv_i = 2001000
  3559. const m___riscv_m = 2000000
  3560. const m___riscv_misaligned_slow = 1
  3561. const m___riscv_mul = 1
  3562. const m___riscv_muldiv = 1
  3563. const m___riscv_xlen = 64
  3564. const m___riscv_zicsr = 2000000
  3565. const m___riscv_zifencei = 2000000
  3566. const m___tm_gmtoff = "tm_gmtoff"
  3567. const m___tm_zone = "tm_zone"
  3568. const m___unix = 1
  3569. const m___unix__ = 1
  3570. const m_alloca = "__builtin_alloca"
  3571. const m_ft_encoding_adobe_custom = "FT_ENCODING_ADOBE_CUSTOM"
  3572. const m_ft_encoding_adobe_expert = "FT_ENCODING_ADOBE_EXPERT"
  3573. const m_ft_encoding_adobe_standard = "FT_ENCODING_ADOBE_STANDARD"
  3574. const m_ft_encoding_apple_roman = "FT_ENCODING_APPLE_ROMAN"
  3575. const m_ft_encoding_big5 = "FT_ENCODING_BIG5"
  3576. const m_ft_encoding_gb2312 = "FT_ENCODING_PRC"
  3577. const m_ft_encoding_johab = "FT_ENCODING_JOHAB"
  3578. const m_ft_encoding_latin_1 = "FT_ENCODING_ADOBE_LATIN_1"
  3579. const m_ft_encoding_latin_2 = "FT_ENCODING_OLD_LATIN_2"
  3580. const m_ft_encoding_none = "FT_ENCODING_NONE"
  3581. const m_ft_encoding_sjis = "FT_ENCODING_SJIS"
  3582. const m_ft_encoding_symbol = "FT_ENCODING_MS_SYMBOL"
  3583. const m_ft_encoding_unicode = "FT_ENCODING_UNICODE"
  3584. const m_ft_encoding_wansung = "FT_ENCODING_WANSUNG"
  3585. const m_ft_fclose = "fclose"
  3586. const m_ft_fopen = "fopen"
  3587. const m_ft_fread = "fread"
  3588. const m_ft_fseek = "fseek"
  3589. const m_ft_ftell = "ftell"
  3590. const m_ft_getenv = "getenv"
  3591. const m_ft_glyph_format_bitmap = "FT_GLYPH_FORMAT_BITMAP"
  3592. const m_ft_glyph_format_composite = "FT_GLYPH_FORMAT_COMPOSITE"
  3593. const m_ft_glyph_format_none = "FT_GLYPH_FORMAT_NONE"
  3594. const m_ft_glyph_format_outline = "FT_GLYPH_FORMAT_OUTLINE"
  3595. const m_ft_glyph_format_plotter = "FT_GLYPH_FORMAT_PLOTTER"
  3596. const m_ft_jmp_buf = "jmp_buf"
  3597. const m_ft_kerning_default = "FT_KERNING_DEFAULT"
  3598. const m_ft_kerning_unfitted = "FT_KERNING_UNFITTED"
  3599. const m_ft_kerning_unscaled = "FT_KERNING_UNSCALED"
  3600. const m_ft_longjmp = "longjmp"
  3601. const m_ft_memchr = "memchr"
  3602. const m_ft_memcmp = "memcmp"
  3603. const m_ft_memcpy = "memcpy"
  3604. const m_ft_memmove = "memmove"
  3605. const m_ft_memset = "memset"
  3606. const m_ft_open_driver = "FT_OPEN_DRIVER"
  3607. const m_ft_open_memory = "FT_OPEN_MEMORY"
  3608. const m_ft_open_params = "FT_OPEN_PARAMS"
  3609. const m_ft_open_pathname = "FT_OPEN_PATHNAME"
  3610. const m_ft_open_stream = "FT_OPEN_STREAM"
  3611. const m_ft_outline_even_odd_fill = "FT_OUTLINE_EVEN_ODD_FILL"
  3612. const m_ft_outline_high_precision = "FT_OUTLINE_HIGH_PRECISION"
  3613. const m_ft_outline_ignore_dropouts = "FT_OUTLINE_IGNORE_DROPOUTS"
  3614. const m_ft_outline_none = "FT_OUTLINE_NONE"
  3615. const m_ft_outline_owner = "FT_OUTLINE_OWNER"
  3616. const m_ft_outline_reverse_fill = "FT_OUTLINE_REVERSE_FILL"
  3617. const m_ft_outline_single_pass = "FT_OUTLINE_SINGLE_PASS"
  3618. const m_ft_pixel_mode_grays = "FT_PIXEL_MODE_GRAY"
  3619. const m_ft_pixel_mode_mono = "FT_PIXEL_MODE_MONO"
  3620. const m_ft_pixel_mode_none = "FT_PIXEL_MODE_NONE"
  3621. const m_ft_pixel_mode_pal2 = "FT_PIXEL_MODE_GRAY2"
  3622. const m_ft_pixel_mode_pal4 = "FT_PIXEL_MODE_GRAY4"
  3623. const m_ft_ptrdiff_t = "ptrdiff_t"
  3624. const m_ft_qsort = "qsort"
  3625. const m_ft_raster_flag_aa = "FT_RASTER_FLAG_AA"
  3626. const m_ft_raster_flag_clip = "FT_RASTER_FLAG_CLIP"
  3627. const m_ft_raster_flag_default = "FT_RASTER_FLAG_DEFAULT"
  3628. const m_ft_raster_flag_direct = "FT_RASTER_FLAG_DIRECT"
  3629. const m_ft_render_mode_mono = "FT_RENDER_MODE_MONO"
  3630. const m_ft_render_mode_normal = "FT_RENDER_MODE_NORMAL"
  3631. const m_ft_scalloc = "calloc"
  3632. const m_ft_sfree = "free"
  3633. const m_ft_smalloc = "malloc"
  3634. const m_ft_snprintf = "snprintf"
  3635. const m_ft_srealloc = "realloc"
  3636. const m_ft_strcat = "strcat"
  3637. const m_ft_strcmp = "strcmp"
  3638. const m_ft_strcpy = "strcpy"
  3639. const m_ft_strlen = "strlen"
  3640. const m_ft_strncmp = "strncmp"
  3641. const m_ft_strncpy = "strncpy"
  3642. const m_ft_strrchr = "strrchr"
  3643. const m_ft_strstr = "strstr"
  3644. const m_ft_strtol = "strtol"
  3645. const m_linux = 1
  3646. const m_static_assert = "_Static_assert"
  3647. const m_sz_xAllocColorCellsReply = 32
  3648. const m_sz_xAllocColorCellsReq = 12
  3649. const m_sz_xAllocColorPlanesReply = 32
  3650. const m_sz_xAllocColorPlanesReq = 16
  3651. const m_sz_xAllocColorReply = 32
  3652. const m_sz_xAllocColorReq = 16
  3653. const m_sz_xAllocNamedColorReply = 32
  3654. const m_sz_xAllocNamedColorReq = 12
  3655. const m_sz_xAllowEventsReq = 8
  3656. const m_sz_xArc = 12
  3657. const m_sz_xBellReq = 4
  3658. const m_sz_xChangeActivePointerGrabReq = 16
  3659. const m_sz_xChangeGCReq = 12
  3660. const m_sz_xChangeHostsReq = 8
  3661. const m_sz_xChangeKeyboardControlReq = 8
  3662. const m_sz_xChangeKeyboardMappingReq = 8
  3663. const m_sz_xChangeModeReq = 4
  3664. const m_sz_xChangePointerControlReq = 12
  3665. const m_sz_xChangePropertyReq = 24
  3666. const m_sz_xChangeSaveSetReq = 8
  3667. const m_sz_xChangeWindowAttributesReq = 12
  3668. const m_sz_xCharInfo = 12
  3669. const m_sz_xCirculateWindowReq = 8
  3670. const m_sz_xClearAreaReq = 16
  3671. const m_sz_xColorItem = 12
  3672. const m_sz_xConfigureWindowReq = 12
  3673. const m_sz_xConnClientPrefix = 12
  3674. const m_sz_xConnSetup = 32
  3675. const m_sz_xConnSetupPrefix = 8
  3676. const m_sz_xConvertSelectionReq = 24
  3677. const m_sz_xCopyAreaReq = 28
  3678. const m_sz_xCopyColormapAndFreeReq = 12
  3679. const m_sz_xCopyGCReq = 16
  3680. const m_sz_xCopyPlaneReq = 32
  3681. const m_sz_xCreateColormapReq = 16
  3682. const m_sz_xCreateCursorReq = 32
  3683. const m_sz_xCreateGCReq = 16
  3684. const m_sz_xCreateGlyphCursorReq = 32
  3685. const m_sz_xCreatePixmapReq = 16
  3686. const m_sz_xCreateWindowReq = 32
  3687. const m_sz_xDeletePropertyReq = 12
  3688. const m_sz_xDepth = 8
  3689. const m_sz_xError = 32
  3690. const m_sz_xEvent = 32
  3691. const m_sz_xFillPolyReq = 16
  3692. const m_sz_xFontProp = 8
  3693. const m_sz_xForceScreenSaverReq = 4
  3694. const m_sz_xFreeColorsReq = 12
  3695. const m_sz_xGenericReply = 32
  3696. const m_sz_xGetAtomNameReply = 32
  3697. const m_sz_xGetFontPathReply = 32
  3698. const m_sz_xGetGeometryReply = 32
  3699. const m_sz_xGetImageReply = 32
  3700. const m_sz_xGetImageReq = 20
  3701. const m_sz_xGetInputFocusReply = 32
  3702. const m_sz_xGetKeyboardControlReply = 52
  3703. const m_sz_xGetKeyboardMappingReply = 32
  3704. const m_sz_xGetKeyboardMappingReq = 8
  3705. const m_sz_xGetModifierMappingReply = 32
  3706. const m_sz_xGetMotionEventsReply = 32
  3707. const m_sz_xGetMotionEventsReq = 16
  3708. const m_sz_xGetPointerControlReply = 32
  3709. const m_sz_xGetPointerMappingReply = 32
  3710. const m_sz_xGetPropertyReply = 32
  3711. const m_sz_xGetPropertyReq = 24
  3712. const m_sz_xGetScreenSaverReply = 32
  3713. const m_sz_xGetSelectionOwnerReply = 32
  3714. const m_sz_xGetWindowAttributesReply = 44
  3715. const m_sz_xGrabButtonReq = 24
  3716. const m_sz_xGrabKeyReq = 16
  3717. const m_sz_xGrabKeyboardReply = 32
  3718. const m_sz_xGrabKeyboardReq = 16
  3719. const m_sz_xGrabPointerReply = 32
  3720. const m_sz_xGrabPointerReq = 24
  3721. const m_sz_xHostEntry = 4
  3722. const m_sz_xImageText16Req = 16
  3723. const m_sz_xImageText8Req = 16
  3724. const m_sz_xImageTextReq = 16
  3725. const m_sz_xInternAtomReply = 32
  3726. const m_sz_xInternAtomReq = 8
  3727. const m_sz_xKeymapEvent = 32
  3728. const m_sz_xListExtensionsReply = 32
  3729. const m_sz_xListFontsReply = 32
  3730. const m_sz_xListFontsReq = 8
  3731. const m_sz_xListFontsWithInfoReply = 60
  3732. const m_sz_xListFontsWithInfoReq = 8
  3733. const m_sz_xListHostsReply = 32
  3734. const m_sz_xListHostsReq = 4
  3735. const m_sz_xListInstalledColormapsReply = 32
  3736. const m_sz_xListPropertiesReply = 32
  3737. const m_sz_xLookupColorReply = 32
  3738. const m_sz_xLookupColorReq = 12
  3739. const m_sz_xOpenFontReq = 12
  3740. const m_sz_xPixmapFormat = 8
  3741. const m_sz_xPoint = 4
  3742. const m_sz_xPolyArcReq = 12
  3743. const m_sz_xPolyFillArcReq = 12
  3744. const m_sz_xPolyFillRectangleReq = 12
  3745. const m_sz_xPolyLineReq = 12
  3746. const m_sz_xPolyPointReq = 12
  3747. const m_sz_xPolyRectangleReq = 12
  3748. const m_sz_xPolySegmentReq = 12
  3749. const m_sz_xPolyText16Req = 16
  3750. const m_sz_xPolyText8Req = 16
  3751. const m_sz_xPolyTextReq = 16
  3752. const m_sz_xPropIconSize = 24
  3753. const m_sz_xPutImageReq = 24
  3754. const m_sz_xQueryBestSizeReply = 32
  3755. const m_sz_xQueryBestSizeReq = 12
  3756. const m_sz_xQueryColorsReply = 32
  3757. const m_sz_xQueryColorsReq = 8
  3758. const m_sz_xQueryExtensionReply = 32
  3759. const m_sz_xQueryExtensionReq = 8
  3760. const m_sz_xQueryFontReply = 60
  3761. const m_sz_xQueryKeymapReply = 40
  3762. const m_sz_xQueryPointerReply = 32
  3763. const m_sz_xQueryTextExtentsReply = 32
  3764. const m_sz_xQueryTextExtentsReq = 8
  3765. const m_sz_xQueryTreeReply = 32
  3766. const m_sz_xRecolorCursorReq = 20
  3767. const m_sz_xRectangle = 8
  3768. const m_sz_xReparentWindowReq = 16
  3769. const m_sz_xReply = 32
  3770. const m_sz_xReq = 4
  3771. const m_sz_xResourceReq = 8
  3772. const m_sz_xRotatePropertiesReq = 12
  3773. const m_sz_xSegment = 8
  3774. const m_sz_xSendEventReq = 44
  3775. const m_sz_xSetAccessControlReq = 4
  3776. const m_sz_xSetClipRectanglesReq = 12
  3777. const m_sz_xSetCloseDownModeReq = 4
  3778. const m_sz_xSetDashesReq = 12
  3779. const m_sz_xSetFontPathReq = 8
  3780. const m_sz_xSetInputFocusReq = 12
  3781. const m_sz_xSetMappingReply = 32
  3782. const m_sz_xSetModifierMappingReply = 32
  3783. const m_sz_xSetModifierMappingReq = 4
  3784. const m_sz_xSetPointerMappingReply = 32
  3785. const m_sz_xSetPointerMappingReq = 4
  3786. const m_sz_xSetScreenSaverReq = 12
  3787. const m_sz_xSetSelectionOwnerReq = 16
  3788. const m_sz_xStoreColorsReq = 8
  3789. const m_sz_xStoreNamedColorReq = 16
  3790. const m_sz_xTextElt = 2
  3791. const m_sz_xTimecoord = 8
  3792. const m_sz_xTranslateCoordsReply = 32
  3793. const m_sz_xTranslateCoordsReq = 16
  3794. const m_sz_xUngrabButtonReq = 12
  3795. const m_sz_xUngrabKeyReq = 12
  3796. const m_sz_xVisualType = 24
  3797. const m_sz_xWarpPointerReq = 24
  3798. const m_sz_xWindowRoot = 40
  3799. const m_sz_xrgb = 8
  3800. const m_unix = 1
  3801. const m_xFalse = 0
  3802. const m_xTrue = 1
  3803. const m_xfree = "free"
  3804. const m_xmalloc = "malloc"
  3805. const m_xthread_self = "pthread_self"
  3806. type t__builtin_va_list = uintptr
  3807. type t__predefined_size_t = uint64
  3808. type t__predefined_wchar_t = int32
  3809. type t__predefined_ptrdiff_t = int64
  3810. type Tsize_t = uint64
  3811. type Tssize_t = int64
  3812. type Toff_t = int64
  3813. type Tva_list = uintptr
  3814. type t__isoc_va_list = uintptr
  3815. type Tfpos_t = struct {
  3816. F__lldata [0]int64
  3817. F__align [0]float64
  3818. F__opaque [16]uint8
  3819. }
  3820. type T_G_fpos64_t = Tfpos_t
  3821. type Tcookie_io_functions_t = struct {
  3822. Fread uintptr
  3823. Fwrite uintptr
  3824. Fseek uintptr
  3825. Fclose1 uintptr
  3826. }
  3827. type T_IO_cookie_io_functions_t = Tcookie_io_functions_t
  3828. type Twchar_t = int32
  3829. type Tdiv_t = struct {
  3830. Fquot int32
  3831. Frem int32
  3832. }
  3833. type Tldiv_t = struct {
  3834. Fquot int64
  3835. Frem int64
  3836. }
  3837. type Tlldiv_t = struct {
  3838. Fquot int64
  3839. Frem int64
  3840. }
  3841. type Tlocale_t = uintptr
  3842. type Tblksize_t = int32
  3843. type Tnlink_t = uint32
  3844. type Tregister_t = int64
  3845. type Ttime_t = int64
  3846. type Tsuseconds_t = int64
  3847. type Tint8_t = int8
  3848. type Tint16_t = int16
  3849. type Tint32_t = int32
  3850. type Tint64_t = int64
  3851. type Tu_int64_t = uint64
  3852. type Tmode_t = uint32
  3853. type Tino_t = uint64
  3854. type Tdev_t = uint64
  3855. type Tblkcnt_t = int64
  3856. type Tfsblkcnt_t = uint64
  3857. type Tfsfilcnt_t = uint64
  3858. type Ttimer_t = uintptr
  3859. type Tclockid_t = int32
  3860. type Tclock_t = int64
  3861. type Tpid_t = int32
  3862. type Tid_t = uint32
  3863. type Tuid_t = uint32
  3864. type Tgid_t = uint32
  3865. type Tkey_t = int32
  3866. type Tuseconds_t = uint32
  3867. type Tpthread_t = uintptr
  3868. type Tpthread_once_t = int32
  3869. type Tpthread_key_t = uint32
  3870. type Tpthread_spinlock_t = int32
  3871. type Tpthread_mutexattr_t = struct {
  3872. F__attr uint32
  3873. }
  3874. type Tpthread_condattr_t = struct {
  3875. F__attr uint32
  3876. }
  3877. type Tpthread_barrierattr_t = struct {
  3878. F__attr uint32
  3879. }
  3880. type Tpthread_rwlockattr_t = struct {
  3881. F__attr [2]uint32
  3882. }
  3883. type Tpthread_attr_t = struct {
  3884. F__u struct {
  3885. F__vi [0][14]int32
  3886. F__s [0][7]uint64
  3887. F__i [14]int32
  3888. }
  3889. }
  3890. type Tpthread_mutex_t = struct {
  3891. F__u struct {
  3892. F__vi [0][10]int32
  3893. F__p [0][5]uintptr
  3894. F__i [10]int32
  3895. }
  3896. }
  3897. type Tpthread_cond_t = struct {
  3898. F__u struct {
  3899. F__vi [0][12]int32
  3900. F__p [0][6]uintptr
  3901. F__i [12]int32
  3902. }
  3903. }
  3904. type Tpthread_rwlock_t = struct {
  3905. F__u struct {
  3906. F__vi [0][14]int32
  3907. F__p [0][7]uintptr
  3908. F__i [14]int32
  3909. }
  3910. }
  3911. type Tpthread_barrier_t = struct {
  3912. F__u struct {
  3913. F__vi [0][8]int32
  3914. F__p [0][4]uintptr
  3915. F__i [8]int32
  3916. }
  3917. }
  3918. type Tu_int8_t = uint8
  3919. type Tu_int16_t = uint16
  3920. type Tu_int32_t = uint32
  3921. type Tcaddr_t = uintptr
  3922. type Tu_char = uint8
  3923. type Tu_short = uint16
  3924. type Tushort = uint16
  3925. type Tu_int = uint32
  3926. type Tuint = uint32
  3927. type Tu_long = uint64
  3928. type Tulong = uint64
  3929. type Tquad_t = int64
  3930. type Tu_quad_t = uint64
  3931. type Tuint16_t = uint16
  3932. type Tuint32_t = uint32
  3933. type Tuint64_t = uint64
  3934. type Ttimeval = struct {
  3935. Ftv_sec Ttime_t
  3936. Ftv_usec Tsuseconds_t
  3937. }
  3938. type Ttimespec = struct {
  3939. Ftv_sec Ttime_t
  3940. Ftv_nsec int64
  3941. }
  3942. type Tsigset_t = struct {
  3943. F__bits [16]uint64
  3944. }
  3945. type t__sigset_t = Tsigset_t
  3946. type Tfd_mask = uint64
  3947. type Tfd_set = struct {
  3948. Ffds_bits [16]uint64
  3949. }
  3950. type TXID = uint64
  3951. type TMask = uint64
  3952. type TAtom = uint64
  3953. type TVisualID = uint64
  3954. type TTime = uint64
  3955. type TWindow = uint64
  3956. type TDrawable = uint64
  3957. type TFont = uint64
  3958. type TPixmap = uint64
  3959. type TCursor = uint64
  3960. type TColormap = uint64
  3961. type TGContext = uint64
  3962. type TKeySym = uint64
  3963. type TKeyCode = uint8
  3964. type Tmax_align_t = struct {
  3965. F__ll int64
  3966. F__ld float64
  3967. }
  3968. type Tptrdiff_t = int64
  3969. type TXPointer = uintptr
  3970. type TXExtData = struct {
  3971. Fnumber int32
  3972. Fnext uintptr
  3973. Ffree_private uintptr
  3974. Fprivate_data TXPointer
  3975. }
  3976. type T_XExtData = TXExtData
  3977. type TXExtCodes = struct {
  3978. Fextension int32
  3979. Fmajor_opcode int32
  3980. Ffirst_event int32
  3981. Ffirst_error int32
  3982. }
  3983. type TXPixmapFormatValues = struct {
  3984. Fdepth int32
  3985. Fbits_per_pixel int32
  3986. Fscanline_pad int32
  3987. }
  3988. type TXGCValues = struct {
  3989. Ffunction int32
  3990. Fplane_mask uint64
  3991. Fforeground uint64
  3992. Fbackground uint64
  3993. Fline_width int32
  3994. Fline_style int32
  3995. Fcap_style int32
  3996. Fjoin_style int32
  3997. Ffill_style int32
  3998. Ffill_rule int32
  3999. Farc_mode int32
  4000. Ftile TPixmap
  4001. Fstipple TPixmap
  4002. Fts_x_origin int32
  4003. Fts_y_origin int32
  4004. Ffont TFont
  4005. Fsubwindow_mode int32
  4006. Fgraphics_exposures int32
  4007. Fclip_x_origin int32
  4008. Fclip_y_origin int32
  4009. Fclip_mask TPixmap
  4010. Fdash_offset int32
  4011. Fdashes uint8
  4012. }
  4013. type TGC = uintptr
  4014. type T_XGC = struct {
  4015. Fext_data uintptr
  4016. Fgid TGContext
  4017. Frects int32
  4018. Fdashes int32
  4019. Fdirty uint64
  4020. Fvalues TXGCValues
  4021. }
  4022. type TVisual = struct {
  4023. Fext_data uintptr
  4024. Fvisualid TVisualID
  4025. Fclass int32
  4026. Fred_mask uint64
  4027. Fgreen_mask uint64
  4028. Fblue_mask uint64
  4029. Fbits_per_rgb int32
  4030. Fmap_entries int32
  4031. }
  4032. type TDepth = struct {
  4033. Fdepth int32
  4034. Fnvisuals int32
  4035. Fvisuals uintptr
  4036. }
  4037. type T_XDisplay = struct {
  4038. Fext_data uintptr
  4039. Ffree_funcs uintptr
  4040. Ffd int32
  4041. Fconn_checker int32
  4042. Fproto_major_version int32
  4043. Fproto_minor_version int32
  4044. Fvendor uintptr
  4045. Fresource_base TXID
  4046. Fresource_mask TXID
  4047. Fresource_id TXID
  4048. Fresource_shift int32
  4049. Fresource_alloc uintptr
  4050. Fbyte_order int32
  4051. Fbitmap_unit int32
  4052. Fbitmap_pad int32
  4053. Fbitmap_bit_order int32
  4054. Fnformats int32
  4055. Fpixmap_format uintptr
  4056. Fvnumber int32
  4057. Frelease int32
  4058. Fhead uintptr
  4059. Ftail uintptr
  4060. Fqlen int32
  4061. Flast_request_read uint64
  4062. Frequest uint64
  4063. Flast_req uintptr
  4064. Fbuffer uintptr
  4065. Fbufptr uintptr
  4066. Fbufmax uintptr
  4067. Fmax_request_size uint32
  4068. Fdb uintptr
  4069. Fsynchandler uintptr
  4070. Fdisplay_name uintptr
  4071. Fdefault_screen int32
  4072. Fnscreens int32
  4073. Fscreens uintptr
  4074. Fmotion_buffer uint64
  4075. Fflags uint64
  4076. Fmin_keycode int32
  4077. Fmax_keycode int32
  4078. Fkeysyms uintptr
  4079. Fmodifiermap uintptr
  4080. Fkeysyms_per_keycode int32
  4081. Fxdefaults uintptr
  4082. Fscratch_buffer uintptr
  4083. Fscratch_length uint64
  4084. Fext_number int32
  4085. Fext_procs uintptr
  4086. Fevent_vec [128]uintptr
  4087. Fwire_vec [128]uintptr
  4088. Flock_meaning TKeySym
  4089. Flock uintptr
  4090. Fasync_handlers uintptr
  4091. Fbigreq_size uint64
  4092. Flock_fns uintptr
  4093. Fidlist_alloc uintptr
  4094. Fkey_bindings uintptr
  4095. Fcursor_font TFont
  4096. Fatoms uintptr
  4097. Fmode_switch uint32
  4098. Fnum_lock uint32
  4099. Fcontext_db uintptr
  4100. Ferror_vec uintptr
  4101. Fcms struct {
  4102. FdefaultCCCs TXPointer
  4103. FclientCmaps TXPointer
  4104. FperVisualIntensityMaps TXPointer
  4105. }
  4106. Fim_filters uintptr
  4107. Fqfree uintptr
  4108. Fnext_event_serial_num uint64
  4109. Fflushes uintptr
  4110. Fim_fd_info uintptr
  4111. Fim_fd_length int32
  4112. Fconn_watchers uintptr
  4113. Fwatcher_count int32
  4114. Ffiledes TXPointer
  4115. Fsavedsynchandler uintptr
  4116. Fresource_max TXID
  4117. Fxcmisc_opcode int32
  4118. Fxkb_info uintptr
  4119. Ftrans_conn uintptr
  4120. Fxcb uintptr
  4121. Fnext_cookie uint32
  4122. Fgeneric_event_vec [128]uintptr
  4123. Fgeneric_event_copy_vec [128]uintptr
  4124. Fcookiejar uintptr
  4125. Ferror_threads uintptr
  4126. Fexit_handler TXIOErrorExitHandler
  4127. Fexit_handler_data uintptr
  4128. Fin_ifevent TCARD32
  4129. Fifevent_thread Txthread_t
  4130. }
  4131. type TScreen = struct {
  4132. Fext_data uintptr
  4133. Fdisplay uintptr
  4134. Froot TWindow
  4135. Fwidth int32
  4136. Fheight int32
  4137. Fmwidth int32
  4138. Fmheight int32
  4139. Fndepths int32
  4140. Fdepths uintptr
  4141. Froot_depth int32
  4142. Froot_visual uintptr
  4143. Fdefault_gc TGC
  4144. Fcmap TColormap
  4145. Fwhite_pixel uint64
  4146. Fblack_pixel uint64
  4147. Fmax_maps int32
  4148. Fmin_maps int32
  4149. Fbacking_store int32
  4150. Fsave_unders int32
  4151. Froot_input_mask int64
  4152. }
  4153. type TScreenFormat = struct {
  4154. Fext_data uintptr
  4155. Fdepth int32
  4156. Fbits_per_pixel int32
  4157. Fscanline_pad int32
  4158. }
  4159. type TXSetWindowAttributes = struct {
  4160. Fbackground_pixmap TPixmap
  4161. Fbackground_pixel uint64
  4162. Fborder_pixmap TPixmap
  4163. Fborder_pixel uint64
  4164. Fbit_gravity int32
  4165. Fwin_gravity int32
  4166. Fbacking_store int32
  4167. Fbacking_planes uint64
  4168. Fbacking_pixel uint64
  4169. Fsave_under int32
  4170. Fevent_mask int64
  4171. Fdo_not_propagate_mask int64
  4172. Foverride_redirect int32
  4173. Fcolormap TColormap
  4174. Fcursor TCursor
  4175. }
  4176. type TXWindowAttributes = struct {
  4177. Fx int32
  4178. Fy int32
  4179. Fwidth int32
  4180. Fheight int32
  4181. Fborder_width int32
  4182. Fdepth int32
  4183. Fvisual uintptr
  4184. Froot TWindow
  4185. Fclass int32
  4186. Fbit_gravity int32
  4187. Fwin_gravity int32
  4188. Fbacking_store int32
  4189. Fbacking_planes uint64
  4190. Fbacking_pixel uint64
  4191. Fsave_under int32
  4192. Fcolormap TColormap
  4193. Fmap_installed int32
  4194. Fmap_state int32
  4195. Fall_event_masks int64
  4196. Fyour_event_mask int64
  4197. Fdo_not_propagate_mask int64
  4198. Foverride_redirect int32
  4199. Fscreen uintptr
  4200. }
  4201. type TXHostAddress = struct {
  4202. Ffamily int32
  4203. Flength int32
  4204. Faddress uintptr
  4205. }
  4206. type TXServerInterpretedAddress = struct {
  4207. Ftypelength int32
  4208. Fvaluelength int32
  4209. Ftype1 uintptr
  4210. Fvalue uintptr
  4211. }
  4212. type TXImage = struct {
  4213. Fwidth int32
  4214. Fheight int32
  4215. Fxoffset int32
  4216. Fformat int32
  4217. Fdata uintptr
  4218. Fbyte_order int32
  4219. Fbitmap_unit int32
  4220. Fbitmap_bit_order int32
  4221. Fbitmap_pad int32
  4222. Fdepth int32
  4223. Fbytes_per_line int32
  4224. Fbits_per_pixel int32
  4225. Fred_mask uint64
  4226. Fgreen_mask uint64
  4227. Fblue_mask uint64
  4228. Fobdata TXPointer
  4229. Ff Tfuncs
  4230. }
  4231. type T_XImage = TXImage
  4232. type TXWindowChanges = struct {
  4233. Fx int32
  4234. Fy int32
  4235. Fwidth int32
  4236. Fheight int32
  4237. Fborder_width int32
  4238. Fsibling TWindow
  4239. Fstack_mode int32
  4240. }
  4241. type TXColor = struct {
  4242. Fpixel uint64
  4243. Fred uint16
  4244. Fgreen uint16
  4245. Fblue uint16
  4246. Fflags uint8
  4247. Fpad uint8
  4248. }
  4249. type TXSegment = struct {
  4250. Fx1 int16
  4251. Fy1 int16
  4252. Fx2 int16
  4253. Fy2 int16
  4254. }
  4255. type TXPoint = struct {
  4256. Fx int16
  4257. Fy int16
  4258. }
  4259. type TXRectangle = struct {
  4260. Fx int16
  4261. Fy int16
  4262. Fwidth uint16
  4263. Fheight uint16
  4264. }
  4265. type TXArc = struct {
  4266. Fx int16
  4267. Fy int16
  4268. Fwidth uint16
  4269. Fheight uint16
  4270. Fangle1 int16
  4271. Fangle2 int16
  4272. }
  4273. type TXKeyboardControl = struct {
  4274. Fkey_click_percent int32
  4275. Fbell_percent int32
  4276. Fbell_pitch int32
  4277. Fbell_duration int32
  4278. Fled int32
  4279. Fled_mode int32
  4280. Fkey int32
  4281. Fauto_repeat_mode int32
  4282. }
  4283. type TXKeyboardState = struct {
  4284. Fkey_click_percent int32
  4285. Fbell_percent int32
  4286. Fbell_pitch uint32
  4287. Fbell_duration uint32
  4288. Fled_mask uint64
  4289. Fglobal_auto_repeat int32
  4290. Fauto_repeats [32]uint8
  4291. }
  4292. type TXTimeCoord = struct {
  4293. Ftime TTime
  4294. Fx int16
  4295. Fy int16
  4296. }
  4297. type TXModifierKeymap = struct {
  4298. Fmax_keypermod int32
  4299. Fmodifiermap uintptr
  4300. }
  4301. type TDisplay = struct {
  4302. Fext_data uintptr
  4303. Ffree_funcs uintptr
  4304. Ffd int32
  4305. Fconn_checker int32
  4306. Fproto_major_version int32
  4307. Fproto_minor_version int32
  4308. Fvendor uintptr
  4309. Fresource_base TXID
  4310. Fresource_mask TXID
  4311. Fresource_id TXID
  4312. Fresource_shift int32
  4313. Fresource_alloc uintptr
  4314. Fbyte_order int32
  4315. Fbitmap_unit int32
  4316. Fbitmap_pad int32
  4317. Fbitmap_bit_order int32
  4318. Fnformats int32
  4319. Fpixmap_format uintptr
  4320. Fvnumber int32
  4321. Frelease int32
  4322. Fhead uintptr
  4323. Ftail uintptr
  4324. Fqlen int32
  4325. Flast_request_read uint64
  4326. Frequest uint64
  4327. Flast_req uintptr
  4328. Fbuffer uintptr
  4329. Fbufptr uintptr
  4330. Fbufmax uintptr
  4331. Fmax_request_size uint32
  4332. Fdb uintptr
  4333. Fsynchandler uintptr
  4334. Fdisplay_name uintptr
  4335. Fdefault_screen int32
  4336. Fnscreens int32
  4337. Fscreens uintptr
  4338. Fmotion_buffer uint64
  4339. Fflags uint64
  4340. Fmin_keycode int32
  4341. Fmax_keycode int32
  4342. Fkeysyms uintptr
  4343. Fmodifiermap uintptr
  4344. Fkeysyms_per_keycode int32
  4345. Fxdefaults uintptr
  4346. Fscratch_buffer uintptr
  4347. Fscratch_length uint64
  4348. Fext_number int32
  4349. Fext_procs uintptr
  4350. Fevent_vec [128]uintptr
  4351. Fwire_vec [128]uintptr
  4352. Flock_meaning TKeySym
  4353. Flock uintptr
  4354. Fasync_handlers uintptr
  4355. Fbigreq_size uint64
  4356. Flock_fns uintptr
  4357. Fidlist_alloc uintptr
  4358. Fkey_bindings uintptr
  4359. Fcursor_font TFont
  4360. Fatoms uintptr
  4361. Fmode_switch uint32
  4362. Fnum_lock uint32
  4363. Fcontext_db uintptr
  4364. Ferror_vec uintptr
  4365. Fcms struct {
  4366. FdefaultCCCs TXPointer
  4367. FclientCmaps TXPointer
  4368. FperVisualIntensityMaps TXPointer
  4369. }
  4370. Fim_filters uintptr
  4371. Fqfree uintptr
  4372. Fnext_event_serial_num uint64
  4373. Fflushes uintptr
  4374. Fim_fd_info uintptr
  4375. Fim_fd_length int32
  4376. Fconn_watchers uintptr
  4377. Fwatcher_count int32
  4378. Ffiledes TXPointer
  4379. Fsavedsynchandler uintptr
  4380. Fresource_max TXID
  4381. Fxcmisc_opcode int32
  4382. Fxkb_info uintptr
  4383. Ftrans_conn uintptr
  4384. Fxcb uintptr
  4385. Fnext_cookie uint32
  4386. Fgeneric_event_vec [128]uintptr
  4387. Fgeneric_event_copy_vec [128]uintptr
  4388. Fcookiejar uintptr
  4389. Ferror_threads uintptr
  4390. Fexit_handler TXIOErrorExitHandler
  4391. Fexit_handler_data uintptr
  4392. Fin_ifevent TCARD32
  4393. Fifevent_thread Txthread_t
  4394. }
  4395. type T_XPrivDisplay = uintptr
  4396. type TXKeyEvent = struct {
  4397. Ftype1 int32
  4398. Fserial uint64
  4399. Fsend_event int32
  4400. Fdisplay uintptr
  4401. Fwindow TWindow
  4402. Froot TWindow
  4403. Fsubwindow TWindow
  4404. Ftime TTime
  4405. Fx int32
  4406. Fy int32
  4407. Fx_root int32
  4408. Fy_root int32
  4409. Fstate uint32
  4410. Fkeycode uint32
  4411. Fsame_screen int32
  4412. }
  4413. type TXKeyPressedEvent = struct {
  4414. Ftype1 int32
  4415. Fserial uint64
  4416. Fsend_event int32
  4417. Fdisplay uintptr
  4418. Fwindow TWindow
  4419. Froot TWindow
  4420. Fsubwindow TWindow
  4421. Ftime TTime
  4422. Fx int32
  4423. Fy int32
  4424. Fx_root int32
  4425. Fy_root int32
  4426. Fstate uint32
  4427. Fkeycode uint32
  4428. Fsame_screen int32
  4429. }
  4430. type TXKeyReleasedEvent = struct {
  4431. Ftype1 int32
  4432. Fserial uint64
  4433. Fsend_event int32
  4434. Fdisplay uintptr
  4435. Fwindow TWindow
  4436. Froot TWindow
  4437. Fsubwindow TWindow
  4438. Ftime TTime
  4439. Fx int32
  4440. Fy int32
  4441. Fx_root int32
  4442. Fy_root int32
  4443. Fstate uint32
  4444. Fkeycode uint32
  4445. Fsame_screen int32
  4446. }
  4447. type TXButtonEvent = struct {
  4448. Ftype1 int32
  4449. Fserial uint64
  4450. Fsend_event int32
  4451. Fdisplay uintptr
  4452. Fwindow TWindow
  4453. Froot TWindow
  4454. Fsubwindow TWindow
  4455. Ftime TTime
  4456. Fx int32
  4457. Fy int32
  4458. Fx_root int32
  4459. Fy_root int32
  4460. Fstate uint32
  4461. Fbutton uint32
  4462. Fsame_screen int32
  4463. }
  4464. type TXButtonPressedEvent = struct {
  4465. Ftype1 int32
  4466. Fserial uint64
  4467. Fsend_event int32
  4468. Fdisplay uintptr
  4469. Fwindow TWindow
  4470. Froot TWindow
  4471. Fsubwindow TWindow
  4472. Ftime TTime
  4473. Fx int32
  4474. Fy int32
  4475. Fx_root int32
  4476. Fy_root int32
  4477. Fstate uint32
  4478. Fbutton uint32
  4479. Fsame_screen int32
  4480. }
  4481. type TXButtonReleasedEvent = struct {
  4482. Ftype1 int32
  4483. Fserial uint64
  4484. Fsend_event int32
  4485. Fdisplay uintptr
  4486. Fwindow TWindow
  4487. Froot TWindow
  4488. Fsubwindow TWindow
  4489. Ftime TTime
  4490. Fx int32
  4491. Fy int32
  4492. Fx_root int32
  4493. Fy_root int32
  4494. Fstate uint32
  4495. Fbutton uint32
  4496. Fsame_screen int32
  4497. }
  4498. type TXMotionEvent = struct {
  4499. Ftype1 int32
  4500. Fserial uint64
  4501. Fsend_event int32
  4502. Fdisplay uintptr
  4503. Fwindow TWindow
  4504. Froot TWindow
  4505. Fsubwindow TWindow
  4506. Ftime TTime
  4507. Fx int32
  4508. Fy int32
  4509. Fx_root int32
  4510. Fy_root int32
  4511. Fstate uint32
  4512. Fis_hint uint8
  4513. Fsame_screen int32
  4514. }
  4515. type TXPointerMovedEvent = struct {
  4516. Ftype1 int32
  4517. Fserial uint64
  4518. Fsend_event int32
  4519. Fdisplay uintptr
  4520. Fwindow TWindow
  4521. Froot TWindow
  4522. Fsubwindow TWindow
  4523. Ftime TTime
  4524. Fx int32
  4525. Fy int32
  4526. Fx_root int32
  4527. Fy_root int32
  4528. Fstate uint32
  4529. Fis_hint uint8
  4530. Fsame_screen int32
  4531. }
  4532. type TXCrossingEvent = struct {
  4533. Ftype1 int32
  4534. Fserial uint64
  4535. Fsend_event int32
  4536. Fdisplay uintptr
  4537. Fwindow TWindow
  4538. Froot TWindow
  4539. Fsubwindow TWindow
  4540. Ftime TTime
  4541. Fx int32
  4542. Fy int32
  4543. Fx_root int32
  4544. Fy_root int32
  4545. Fmode int32
  4546. Fdetail int32
  4547. Fsame_screen int32
  4548. Ffocus int32
  4549. Fstate uint32
  4550. }
  4551. type TXEnterWindowEvent = struct {
  4552. Ftype1 int32
  4553. Fserial uint64
  4554. Fsend_event int32
  4555. Fdisplay uintptr
  4556. Fwindow TWindow
  4557. Froot TWindow
  4558. Fsubwindow TWindow
  4559. Ftime TTime
  4560. Fx int32
  4561. Fy int32
  4562. Fx_root int32
  4563. Fy_root int32
  4564. Fmode int32
  4565. Fdetail int32
  4566. Fsame_screen int32
  4567. Ffocus int32
  4568. Fstate uint32
  4569. }
  4570. type TXLeaveWindowEvent = struct {
  4571. Ftype1 int32
  4572. Fserial uint64
  4573. Fsend_event int32
  4574. Fdisplay uintptr
  4575. Fwindow TWindow
  4576. Froot TWindow
  4577. Fsubwindow TWindow
  4578. Ftime TTime
  4579. Fx int32
  4580. Fy int32
  4581. Fx_root int32
  4582. Fy_root int32
  4583. Fmode int32
  4584. Fdetail int32
  4585. Fsame_screen int32
  4586. Ffocus int32
  4587. Fstate uint32
  4588. }
  4589. type TXFocusChangeEvent = struct {
  4590. Ftype1 int32
  4591. Fserial uint64
  4592. Fsend_event int32
  4593. Fdisplay uintptr
  4594. Fwindow TWindow
  4595. Fmode int32
  4596. Fdetail int32
  4597. }
  4598. type TXFocusInEvent = struct {
  4599. Ftype1 int32
  4600. Fserial uint64
  4601. Fsend_event int32
  4602. Fdisplay uintptr
  4603. Fwindow TWindow
  4604. Fmode int32
  4605. Fdetail int32
  4606. }
  4607. type TXFocusOutEvent = struct {
  4608. Ftype1 int32
  4609. Fserial uint64
  4610. Fsend_event int32
  4611. Fdisplay uintptr
  4612. Fwindow TWindow
  4613. Fmode int32
  4614. Fdetail int32
  4615. }
  4616. type TXKeymapEvent = struct {
  4617. Ftype1 int32
  4618. Fserial uint64
  4619. Fsend_event int32
  4620. Fdisplay uintptr
  4621. Fwindow TWindow
  4622. Fkey_vector [32]uint8
  4623. }
  4624. type TXExposeEvent = struct {
  4625. Ftype1 int32
  4626. Fserial uint64
  4627. Fsend_event int32
  4628. Fdisplay uintptr
  4629. Fwindow TWindow
  4630. Fx int32
  4631. Fy int32
  4632. Fwidth int32
  4633. Fheight int32
  4634. Fcount int32
  4635. }
  4636. type TXGraphicsExposeEvent = struct {
  4637. Ftype1 int32
  4638. Fserial uint64
  4639. Fsend_event int32
  4640. Fdisplay uintptr
  4641. Fdrawable TDrawable
  4642. Fx int32
  4643. Fy int32
  4644. Fwidth int32
  4645. Fheight int32
  4646. Fcount int32
  4647. Fmajor_code int32
  4648. Fminor_code int32
  4649. }
  4650. type TXNoExposeEvent = struct {
  4651. Ftype1 int32
  4652. Fserial uint64
  4653. Fsend_event int32
  4654. Fdisplay uintptr
  4655. Fdrawable TDrawable
  4656. Fmajor_code int32
  4657. Fminor_code int32
  4658. }
  4659. type TXVisibilityEvent = struct {
  4660. Ftype1 int32
  4661. Fserial uint64
  4662. Fsend_event int32
  4663. Fdisplay uintptr
  4664. Fwindow TWindow
  4665. Fstate int32
  4666. }
  4667. type TXCreateWindowEvent = struct {
  4668. Ftype1 int32
  4669. Fserial uint64
  4670. Fsend_event int32
  4671. Fdisplay uintptr
  4672. Fparent TWindow
  4673. Fwindow TWindow
  4674. Fx int32
  4675. Fy int32
  4676. Fwidth int32
  4677. Fheight int32
  4678. Fborder_width int32
  4679. Foverride_redirect int32
  4680. }
  4681. type TXDestroyWindowEvent = struct {
  4682. Ftype1 int32
  4683. Fserial uint64
  4684. Fsend_event int32
  4685. Fdisplay uintptr
  4686. Fevent TWindow
  4687. Fwindow TWindow
  4688. }
  4689. type TXUnmapEvent = struct {
  4690. Ftype1 int32
  4691. Fserial uint64
  4692. Fsend_event int32
  4693. Fdisplay uintptr
  4694. Fevent TWindow
  4695. Fwindow TWindow
  4696. Ffrom_configure int32
  4697. }
  4698. type TXMapEvent = struct {
  4699. Ftype1 int32
  4700. Fserial uint64
  4701. Fsend_event int32
  4702. Fdisplay uintptr
  4703. Fevent TWindow
  4704. Fwindow TWindow
  4705. Foverride_redirect int32
  4706. }
  4707. type TXMapRequestEvent = struct {
  4708. Ftype1 int32
  4709. Fserial uint64
  4710. Fsend_event int32
  4711. Fdisplay uintptr
  4712. Fparent TWindow
  4713. Fwindow TWindow
  4714. }
  4715. type TXReparentEvent = struct {
  4716. Ftype1 int32
  4717. Fserial uint64
  4718. Fsend_event int32
  4719. Fdisplay uintptr
  4720. Fevent TWindow
  4721. Fwindow TWindow
  4722. Fparent TWindow
  4723. Fx int32
  4724. Fy int32
  4725. Foverride_redirect int32
  4726. }
  4727. type TXConfigureEvent = struct {
  4728. Ftype1 int32
  4729. Fserial uint64
  4730. Fsend_event int32
  4731. Fdisplay uintptr
  4732. Fevent TWindow
  4733. Fwindow TWindow
  4734. Fx int32
  4735. Fy int32
  4736. Fwidth int32
  4737. Fheight int32
  4738. Fborder_width int32
  4739. Fabove TWindow
  4740. Foverride_redirect int32
  4741. }
  4742. type TXGravityEvent = struct {
  4743. Ftype1 int32
  4744. Fserial uint64
  4745. Fsend_event int32
  4746. Fdisplay uintptr
  4747. Fevent TWindow
  4748. Fwindow TWindow
  4749. Fx int32
  4750. Fy int32
  4751. }
  4752. type TXResizeRequestEvent = struct {
  4753. Ftype1 int32
  4754. Fserial uint64
  4755. Fsend_event int32
  4756. Fdisplay uintptr
  4757. Fwindow TWindow
  4758. Fwidth int32
  4759. Fheight int32
  4760. }
  4761. type TXConfigureRequestEvent = struct {
  4762. Ftype1 int32
  4763. Fserial uint64
  4764. Fsend_event int32
  4765. Fdisplay uintptr
  4766. Fparent TWindow
  4767. Fwindow TWindow
  4768. Fx int32
  4769. Fy int32
  4770. Fwidth int32
  4771. Fheight int32
  4772. Fborder_width int32
  4773. Fabove TWindow
  4774. Fdetail int32
  4775. Fvalue_mask uint64
  4776. }
  4777. type TXCirculateEvent = struct {
  4778. Ftype1 int32
  4779. Fserial uint64
  4780. Fsend_event int32
  4781. Fdisplay uintptr
  4782. Fevent TWindow
  4783. Fwindow TWindow
  4784. Fplace int32
  4785. }
  4786. type TXCirculateRequestEvent = struct {
  4787. Ftype1 int32
  4788. Fserial uint64
  4789. Fsend_event int32
  4790. Fdisplay uintptr
  4791. Fparent TWindow
  4792. Fwindow TWindow
  4793. Fplace int32
  4794. }
  4795. type TXPropertyEvent = struct {
  4796. Ftype1 int32
  4797. Fserial uint64
  4798. Fsend_event int32
  4799. Fdisplay uintptr
  4800. Fwindow TWindow
  4801. Fatom TAtom
  4802. Ftime TTime
  4803. Fstate int32
  4804. }
  4805. type TXSelectionClearEvent = struct {
  4806. Ftype1 int32
  4807. Fserial uint64
  4808. Fsend_event int32
  4809. Fdisplay uintptr
  4810. Fwindow TWindow
  4811. Fselection TAtom
  4812. Ftime TTime
  4813. }
  4814. type TXSelectionRequestEvent = struct {
  4815. Ftype1 int32
  4816. Fserial uint64
  4817. Fsend_event int32
  4818. Fdisplay uintptr
  4819. Fowner TWindow
  4820. Frequestor TWindow
  4821. Fselection TAtom
  4822. Ftarget TAtom
  4823. Fproperty TAtom
  4824. Ftime TTime
  4825. }
  4826. type TXSelectionEvent = struct {
  4827. Ftype1 int32
  4828. Fserial uint64
  4829. Fsend_event int32
  4830. Fdisplay uintptr
  4831. Frequestor TWindow
  4832. Fselection TAtom
  4833. Ftarget TAtom
  4834. Fproperty TAtom
  4835. Ftime TTime
  4836. }
  4837. type TXColormapEvent = struct {
  4838. Ftype1 int32
  4839. Fserial uint64
  4840. Fsend_event int32
  4841. Fdisplay uintptr
  4842. Fwindow TWindow
  4843. Fcolormap TColormap
  4844. Fnew1 int32
  4845. Fstate int32
  4846. }
  4847. type TXClientMessageEvent = struct {
  4848. Ftype1 int32
  4849. Fserial uint64
  4850. Fsend_event int32
  4851. Fdisplay uintptr
  4852. Fwindow TWindow
  4853. Fmessage_type TAtom
  4854. Fformat int32
  4855. Fdata struct {
  4856. Fs [0][10]int16
  4857. Fl [0][5]int64
  4858. Fb [20]uint8
  4859. F__ccgo_pad3 [20]byte
  4860. }
  4861. }
  4862. type TXMappingEvent = struct {
  4863. Ftype1 int32
  4864. Fserial uint64
  4865. Fsend_event int32
  4866. Fdisplay uintptr
  4867. Fwindow TWindow
  4868. Frequest int32
  4869. Ffirst_keycode int32
  4870. Fcount int32
  4871. }
  4872. type TXErrorEvent = struct {
  4873. Ftype1 int32
  4874. Fdisplay uintptr
  4875. Fresourceid TXID
  4876. Fserial uint64
  4877. Ferror_code uint8
  4878. Frequest_code uint8
  4879. Fminor_code uint8
  4880. }
  4881. type TXAnyEvent = struct {
  4882. Ftype1 int32
  4883. Fserial uint64
  4884. Fsend_event int32
  4885. Fdisplay uintptr
  4886. Fwindow TWindow
  4887. }
  4888. type TXGenericEvent = struct {
  4889. Ftype1 int32
  4890. Fserial uint64
  4891. Fsend_event int32
  4892. Fdisplay uintptr
  4893. Fextension int32
  4894. Fevtype int32
  4895. }
  4896. type TXGenericEventCookie = struct {
  4897. Ftype1 int32
  4898. Fserial uint64
  4899. Fsend_event int32
  4900. Fdisplay uintptr
  4901. Fextension int32
  4902. Fevtype int32
  4903. Fcookie uint32
  4904. Fdata uintptr
  4905. }
  4906. type TXEvent = struct {
  4907. Fxany [0]TXAnyEvent
  4908. Fxkey [0]TXKeyEvent
  4909. Fxbutton [0]TXButtonEvent
  4910. Fxmotion [0]TXMotionEvent
  4911. Fxcrossing [0]TXCrossingEvent
  4912. Fxfocus [0]TXFocusChangeEvent
  4913. Fxexpose [0]TXExposeEvent
  4914. Fxgraphicsexpose [0]TXGraphicsExposeEvent
  4915. Fxnoexpose [0]TXNoExposeEvent
  4916. Fxvisibility [0]TXVisibilityEvent
  4917. Fxcreatewindow [0]TXCreateWindowEvent
  4918. Fxdestroywindow [0]TXDestroyWindowEvent
  4919. Fxunmap [0]TXUnmapEvent
  4920. Fxmap [0]TXMapEvent
  4921. Fxmaprequest [0]TXMapRequestEvent
  4922. Fxreparent [0]TXReparentEvent
  4923. Fxconfigure [0]TXConfigureEvent
  4924. Fxgravity [0]TXGravityEvent
  4925. Fxresizerequest [0]TXResizeRequestEvent
  4926. Fxconfigurerequest [0]TXConfigureRequestEvent
  4927. Fxcirculate [0]TXCirculateEvent
  4928. Fxcirculaterequest [0]TXCirculateRequestEvent
  4929. Fxproperty [0]TXPropertyEvent
  4930. Fxselectionclear [0]TXSelectionClearEvent
  4931. Fxselectionrequest [0]TXSelectionRequestEvent
  4932. Fxselection [0]TXSelectionEvent
  4933. Fxcolormap [0]TXColormapEvent
  4934. Fxclient [0]TXClientMessageEvent
  4935. Fxmapping [0]TXMappingEvent
  4936. Fxerror [0]TXErrorEvent
  4937. Fxkeymap [0]TXKeymapEvent
  4938. Fxgeneric [0]TXGenericEvent
  4939. Fxcookie [0]TXGenericEventCookie
  4940. Fpad [0][24]int64
  4941. Ftype1 int32
  4942. F__ccgo_pad35 [188]byte
  4943. }
  4944. type T_XEvent = TXEvent
  4945. type TXCharStruct = struct {
  4946. Flbearing int16
  4947. Frbearing int16
  4948. Fwidth int16
  4949. Fascent int16
  4950. Fdescent int16
  4951. Fattributes uint16
  4952. }
  4953. type TXFontProp = struct {
  4954. Fname TAtom
  4955. Fcard32 uint64
  4956. }
  4957. type TXFontStruct = struct {
  4958. Fext_data uintptr
  4959. Ffid TFont
  4960. Fdirection uint32
  4961. Fmin_char_or_byte2 uint32
  4962. Fmax_char_or_byte2 uint32
  4963. Fmin_byte1 uint32
  4964. Fmax_byte1 uint32
  4965. Fall_chars_exist int32
  4966. Fdefault_char uint32
  4967. Fn_properties int32
  4968. Fproperties uintptr
  4969. Fmin_bounds TXCharStruct
  4970. Fmax_bounds TXCharStruct
  4971. Fper_char uintptr
  4972. Fascent int32
  4973. Fdescent int32
  4974. }
  4975. type TXTextItem = struct {
  4976. Fchars uintptr
  4977. Fnchars int32
  4978. Fdelta int32
  4979. Ffont TFont
  4980. }
  4981. type TXChar2b = struct {
  4982. Fbyte1 uint8
  4983. Fbyte2 uint8
  4984. }
  4985. type TXTextItem16 = struct {
  4986. Fchars uintptr
  4987. Fnchars int32
  4988. Fdelta int32
  4989. Ffont TFont
  4990. }
  4991. type TXEDataObject = struct {
  4992. Fgc [0]TGC
  4993. Fvisual [0]uintptr
  4994. Fscreen [0]uintptr
  4995. Fpixmap_format [0]uintptr
  4996. Ffont [0]uintptr
  4997. Fdisplay uintptr
  4998. }
  4999. type TXFontSetExtents = struct {
  5000. Fmax_ink_extent TXRectangle
  5001. Fmax_logical_extent TXRectangle
  5002. }
  5003. type TXOM = uintptr
  5004. type TXOC = uintptr
  5005. type TXFontSet = uintptr
  5006. type TXmbTextItem = struct {
  5007. Fchars uintptr
  5008. Fnchars int32
  5009. Fdelta int32
  5010. Ffont_set TXFontSet
  5011. }
  5012. type TXwcTextItem = struct {
  5013. Fchars uintptr
  5014. Fnchars int32
  5015. Fdelta int32
  5016. Ffont_set TXFontSet
  5017. }
  5018. type TXOMCharSetList = struct {
  5019. Fcharset_count int32
  5020. Fcharset_list uintptr
  5021. }
  5022. type TXOrientation = int32
  5023. const _XOMOrientation_LTR_TTB = 0
  5024. const _XOMOrientation_RTL_TTB = 1
  5025. const _XOMOrientation_TTB_LTR = 2
  5026. const _XOMOrientation_TTB_RTL = 3
  5027. const _XOMOrientation_Context = 4
  5028. type TXOMOrientation = struct {
  5029. Fnum_orientation int32
  5030. Forientation uintptr
  5031. }
  5032. type TXOMFontInfo = struct {
  5033. Fnum_font int32
  5034. Ffont_struct_list uintptr
  5035. Ffont_name_list uintptr
  5036. }
  5037. type TXIM = uintptr
  5038. type TXIC = uintptr
  5039. type TXIMProc = uintptr
  5040. type TXICProc = uintptr
  5041. type TXIDProc = uintptr
  5042. type TXIMStyle = uint64
  5043. type TXIMStyles = struct {
  5044. Fcount_styles uint16
  5045. Fsupported_styles uintptr
  5046. }
  5047. type TXVaNestedList = uintptr
  5048. type TXIMCallback = struct {
  5049. Fclient_data TXPointer
  5050. Fcallback TXIMProc
  5051. }
  5052. type TXICCallback = struct {
  5053. Fclient_data TXPointer
  5054. Fcallback TXICProc
  5055. }
  5056. type TXIMFeedback = uint64
  5057. type TXIMText = struct {
  5058. Flength uint16
  5059. Ffeedback uintptr
  5060. Fencoding_is_wchar int32
  5061. Fstring1 struct {
  5062. Fwide_char [0]uintptr
  5063. Fmulti_byte uintptr
  5064. }
  5065. }
  5066. type T_XIMText = TXIMText
  5067. type TXIMPreeditState = uint64
  5068. type TXIMPreeditStateNotifyCallbackStruct = struct {
  5069. Fstate TXIMPreeditState
  5070. }
  5071. type T_XIMPreeditStateNotifyCallbackStruct = TXIMPreeditStateNotifyCallbackStruct
  5072. type TXIMResetState = uint64
  5073. type TXIMStringConversionFeedback = uint64
  5074. type TXIMStringConversionText = struct {
  5075. Flength uint16
  5076. Ffeedback uintptr
  5077. Fencoding_is_wchar int32
  5078. Fstring1 struct {
  5079. Fwcs [0]uintptr
  5080. Fmbs uintptr
  5081. }
  5082. }
  5083. type T_XIMStringConversionText = TXIMStringConversionText
  5084. type TXIMStringConversionPosition = uint16
  5085. type TXIMStringConversionType = uint16
  5086. type TXIMStringConversionOperation = uint16
  5087. type TXIMCaretDirection = int32
  5088. const _XIMForwardChar = 0
  5089. const _XIMBackwardChar = 1
  5090. const _XIMForwardWord = 2
  5091. const _XIMBackwardWord = 3
  5092. const _XIMCaretUp = 4
  5093. const _XIMCaretDown = 5
  5094. const _XIMNextLine = 6
  5095. const _XIMPreviousLine = 7
  5096. const _XIMLineStart = 8
  5097. const _XIMLineEnd = 9
  5098. const _XIMAbsolutePosition = 10
  5099. const _XIMDontChange = 11
  5100. type TXIMStringConversionCallbackStruct = struct {
  5101. Fposition TXIMStringConversionPosition
  5102. Fdirection TXIMCaretDirection
  5103. Foperation TXIMStringConversionOperation
  5104. Ffactor uint16
  5105. Ftext uintptr
  5106. }
  5107. type T_XIMStringConversionCallbackStruct = TXIMStringConversionCallbackStruct
  5108. type TXIMPreeditDrawCallbackStruct = struct {
  5109. Fcaret int32
  5110. Fchg_first int32
  5111. Fchg_length int32
  5112. Ftext uintptr
  5113. }
  5114. type T_XIMPreeditDrawCallbackStruct = TXIMPreeditDrawCallbackStruct
  5115. type TXIMCaretStyle = int32
  5116. const _XIMIsInvisible = 0
  5117. const _XIMIsPrimary = 1
  5118. const _XIMIsSecondary = 2
  5119. type TXIMPreeditCaretCallbackStruct = struct {
  5120. Fposition int32
  5121. Fdirection TXIMCaretDirection
  5122. Fstyle TXIMCaretStyle
  5123. }
  5124. type T_XIMPreeditCaretCallbackStruct = TXIMPreeditCaretCallbackStruct
  5125. type TXIMStatusDataType = int32
  5126. const _XIMTextType = 0
  5127. const _XIMBitmapType = 1
  5128. type TXIMStatusDrawCallbackStruct = struct {
  5129. Ftype1 TXIMStatusDataType
  5130. Fdata struct {
  5131. Fbitmap [0]TPixmap
  5132. Ftext uintptr
  5133. }
  5134. }
  5135. type T_XIMStatusDrawCallbackStruct = TXIMStatusDrawCallbackStruct
  5136. type TXIMHotKeyTrigger = struct {
  5137. Fkeysym TKeySym
  5138. Fmodifier int32
  5139. Fmodifier_mask int32
  5140. }
  5141. type T_XIMHotKeyTrigger = TXIMHotKeyTrigger
  5142. type TXIMHotKeyTriggers = struct {
  5143. Fnum_hot_key int32
  5144. Fkey uintptr
  5145. }
  5146. type T_XIMHotKeyTriggers = TXIMHotKeyTriggers
  5147. type TXIMHotKeyState = uint64
  5148. type TXIMValuesList = struct {
  5149. Fcount_values uint16
  5150. Fsupported_values uintptr
  5151. }
  5152. type TXErrorHandler = uintptr
  5153. type TXIOErrorHandler = uintptr
  5154. type TXIOErrorExitHandler = uintptr
  5155. type TXConnectionWatchProc = uintptr
  5156. type TXSizeHints = struct {
  5157. Fflags int64
  5158. Fx int32
  5159. Fy int32
  5160. Fwidth int32
  5161. Fheight int32
  5162. Fmin_width int32
  5163. Fmin_height int32
  5164. Fmax_width int32
  5165. Fmax_height int32
  5166. Fwidth_inc int32
  5167. Fheight_inc int32
  5168. Fmin_aspect struct {
  5169. Fx int32
  5170. Fy int32
  5171. }
  5172. Fmax_aspect struct {
  5173. Fx int32
  5174. Fy int32
  5175. }
  5176. Fbase_width int32
  5177. Fbase_height int32
  5178. Fwin_gravity int32
  5179. }
  5180. type TXWMHints = struct {
  5181. Fflags int64
  5182. Finput int32
  5183. Finitial_state int32
  5184. Ficon_pixmap TPixmap
  5185. Ficon_window TWindow
  5186. Ficon_x int32
  5187. Ficon_y int32
  5188. Ficon_mask TPixmap
  5189. Fwindow_group TXID
  5190. }
  5191. type TXTextProperty = struct {
  5192. Fvalue uintptr
  5193. Fencoding TAtom
  5194. Fformat int32
  5195. Fnitems uint64
  5196. }
  5197. type TXICCEncodingStyle = int32
  5198. const _XStringStyle = 0
  5199. const _XCompoundTextStyle = 1
  5200. const _XTextStyle = 2
  5201. const _XStdICCTextStyle = 3
  5202. const _XUTF8StringStyle = 4
  5203. type TXIconSize = struct {
  5204. Fmin_width int32
  5205. Fmin_height int32
  5206. Fmax_width int32
  5207. Fmax_height int32
  5208. Fwidth_inc int32
  5209. Fheight_inc int32
  5210. }
  5211. type TXClassHint = struct {
  5212. Fres_name uintptr
  5213. Fres_class uintptr
  5214. }
  5215. type TXComposeStatus = struct {
  5216. Fcompose_ptr TXPointer
  5217. Fchars_matched int32
  5218. }
  5219. type T_XComposeStatus = TXComposeStatus
  5220. type TRegion = uintptr
  5221. type TXVisualInfo = struct {
  5222. Fvisual uintptr
  5223. Fvisualid TVisualID
  5224. Fscreen int32
  5225. Fdepth int32
  5226. Fclass int32
  5227. Fred_mask uint64
  5228. Fgreen_mask uint64
  5229. Fblue_mask uint64
  5230. Fcolormap_size int32
  5231. Fbits_per_rgb int32
  5232. }
  5233. type TXStandardColormap = struct {
  5234. Fcolormap TColormap
  5235. Fred_max uint64
  5236. Fred_mult uint64
  5237. Fgreen_max uint64
  5238. Fgreen_mult uint64
  5239. Fblue_max uint64
  5240. Fblue_mult uint64
  5241. Fbase_pixel uint64
  5242. Fvisualid TVisualID
  5243. Fkillid TXID
  5244. }
  5245. type TXContext = int32
  5246. type TINT64 = int64
  5247. type TINT32 = int32
  5248. type TINT16 = int16
  5249. type TINT8 = int8
  5250. type TCARD64 = uint64
  5251. type TCARD32 = uint32
  5252. type TCARD16 = uint16
  5253. type TCARD8 = uint8
  5254. type TBITS32 = uint32
  5255. type TBITS16 = uint16
  5256. type TBYTE = uint8
  5257. type TBOOL = uint8
  5258. type Tuintptr_t = uint64
  5259. type Tintptr_t = int64
  5260. type Tintmax_t = int64
  5261. type Tuint8_t = uint8
  5262. type Tuintmax_t = uint64
  5263. type Tint_fast8_t = int8
  5264. type Tint_fast64_t = int64
  5265. type Tint_least8_t = int8
  5266. type Tint_least16_t = int16
  5267. type Tint_least32_t = int32
  5268. type Tint_least64_t = int64
  5269. type Tuint_fast8_t = uint8
  5270. type Tuint_fast64_t = uint64
  5271. type Tuint_least8_t = uint8
  5272. type Tuint_least16_t = uint16
  5273. type Tuint_least32_t = uint32
  5274. type Tuint_least64_t = uint64
  5275. type Tint_fast16_t = int32
  5276. type Tint_fast32_t = int32
  5277. type Tuint_fast16_t = uint32
  5278. type Tuint_fast32_t = uint32
  5279. type TxSegment = struct {
  5280. Fx1 TINT16
  5281. Fy1 TINT16
  5282. Fx2 TINT16
  5283. Fy2 TINT16
  5284. }
  5285. type T_xSegment = TxSegment
  5286. type TxPoint = struct {
  5287. Fx TINT16
  5288. Fy TINT16
  5289. }
  5290. type T_xPoint = TxPoint
  5291. type TxRectangle = struct {
  5292. Fx TINT16
  5293. Fy TINT16
  5294. Fwidth TCARD16
  5295. Fheight TCARD16
  5296. }
  5297. type T_xRectangle = TxRectangle
  5298. type TxArc = struct {
  5299. Fx TINT16
  5300. Fy TINT16
  5301. Fwidth TCARD16
  5302. Fheight TCARD16
  5303. Fangle1 TINT16
  5304. Fangle2 TINT16
  5305. }
  5306. type T_xArc = TxArc
  5307. type TKeyButMask = uint16
  5308. type TxConnClientPrefix = struct {
  5309. FbyteOrder TCARD8
  5310. Fpad TBYTE
  5311. FmajorVersion TCARD16
  5312. FminorVersion TCARD16
  5313. FnbytesAuthProto TCARD16
  5314. FnbytesAuthString TCARD16
  5315. Fpad2 TCARD16
  5316. }
  5317. type TxConnSetupPrefix = struct {
  5318. Fsuccess TCARD8
  5319. FlengthReason TBYTE
  5320. FmajorVersion TCARD16
  5321. FminorVersion TCARD16
  5322. Flength TCARD16
  5323. }
  5324. type TxConnSetup = struct {
  5325. Frelease TCARD32
  5326. FridBase TCARD32
  5327. FridMask TCARD32
  5328. FmotionBufferSize TCARD32
  5329. FnbytesVendor TCARD16
  5330. FmaxRequestSize TCARD16
  5331. FnumRoots TCARD8
  5332. FnumFormats TCARD8
  5333. FimageByteOrder TCARD8
  5334. FbitmapBitOrder TCARD8
  5335. FbitmapScanlineUnit TCARD8
  5336. FbitmapScanlinePad TCARD8
  5337. FminKeyCode TCARD8
  5338. FmaxKeyCode TCARD8
  5339. Fpad2 TCARD32
  5340. }
  5341. type TxPixmapFormat = struct {
  5342. Fdepth TCARD8
  5343. FbitsPerPixel TCARD8
  5344. FscanLinePad TCARD8
  5345. Fpad1 TCARD8
  5346. Fpad2 TCARD32
  5347. }
  5348. type TxDepth = struct {
  5349. Fdepth TCARD8
  5350. Fpad1 TCARD8
  5351. FnVisuals TCARD16
  5352. Fpad2 TCARD32
  5353. }
  5354. type TxVisualType = struct {
  5355. FvisualID TCARD32
  5356. Fclass TCARD8
  5357. FbitsPerRGB TCARD8
  5358. FcolormapEntries TCARD16
  5359. FredMask TCARD32
  5360. FgreenMask TCARD32
  5361. FblueMask TCARD32
  5362. Fpad TCARD32
  5363. }
  5364. type TxWindowRoot = struct {
  5365. FwindowId TCARD32
  5366. FdefaultColormap TCARD32
  5367. FwhitePixel TCARD32
  5368. FblackPixel TCARD32
  5369. FcurrentInputMask TCARD32
  5370. FpixWidth TCARD16
  5371. FpixHeight TCARD16
  5372. FmmWidth TCARD16
  5373. FmmHeight TCARD16
  5374. FminInstalledMaps TCARD16
  5375. FmaxInstalledMaps TCARD16
  5376. FrootVisualID TCARD32
  5377. FbackingStore TCARD8
  5378. FsaveUnders TBOOL
  5379. FrootDepth TCARD8
  5380. FnDepths TCARD8
  5381. }
  5382. type TxTimecoord = struct {
  5383. Ftime TCARD32
  5384. Fx TINT16
  5385. Fy TINT16
  5386. }
  5387. type TxHostEntry = struct {
  5388. Ffamily TCARD8
  5389. Fpad TBYTE
  5390. Flength TCARD16
  5391. }
  5392. type TxCharInfo = struct {
  5393. FleftSideBearing TINT16
  5394. FrightSideBearing TINT16
  5395. FcharacterWidth TINT16
  5396. Fascent TINT16
  5397. Fdescent TINT16
  5398. Fattributes TCARD16
  5399. }
  5400. type TxFontProp = struct {
  5401. Fname TCARD32
  5402. Fvalue TCARD32
  5403. }
  5404. type TxTextElt = struct {
  5405. Flen1 TCARD8
  5406. Fdelta TINT8
  5407. }
  5408. type TxColorItem = struct {
  5409. Fpixel TCARD32
  5410. Fred TCARD16
  5411. Fgreen TCARD16
  5412. Fblue TCARD16
  5413. Fflags TCARD8
  5414. Fpad TCARD8
  5415. }
  5416. type Txrgb = struct {
  5417. Fred TCARD16
  5418. Fgreen TCARD16
  5419. Fblue TCARD16
  5420. Fpad TCARD16
  5421. }
  5422. type TKEYCODE = uint8
  5423. type TxGenericReply = struct {
  5424. Ftype1 TBYTE
  5425. Fdata1 TBYTE
  5426. FsequenceNumber TCARD16
  5427. Flength TCARD32
  5428. Fdata00 TCARD32
  5429. Fdata01 TCARD32
  5430. Fdata02 TCARD32
  5431. Fdata03 TCARD32
  5432. Fdata04 TCARD32
  5433. Fdata05 TCARD32
  5434. }
  5435. type TxGetWindowAttributesReply = struct {
  5436. Ftype1 TBYTE
  5437. FbackingStore TCARD8
  5438. FsequenceNumber TCARD16
  5439. Flength TCARD32
  5440. FvisualID TCARD32
  5441. Fclass TCARD16
  5442. FbitGravity TCARD8
  5443. FwinGravity TCARD8
  5444. FbackingBitPlanes TCARD32
  5445. FbackingPixel TCARD32
  5446. FsaveUnder TBOOL
  5447. FmapInstalled TBOOL
  5448. FmapState TCARD8
  5449. Foverride TBOOL
  5450. Fcolormap TCARD32
  5451. FallEventMasks TCARD32
  5452. FyourEventMask TCARD32
  5453. FdoNotPropagateMask TCARD16
  5454. Fpad TCARD16
  5455. }
  5456. type TxGetGeometryReply = struct {
  5457. Ftype1 TBYTE
  5458. Fdepth TCARD8
  5459. FsequenceNumber TCARD16
  5460. Flength TCARD32
  5461. Froot TCARD32
  5462. Fx TINT16
  5463. Fy TINT16
  5464. Fwidth TCARD16
  5465. Fheight TCARD16
  5466. FborderWidth TCARD16
  5467. Fpad1 TCARD16
  5468. Fpad2 TCARD32
  5469. Fpad3 TCARD32
  5470. }
  5471. type TxQueryTreeReply = struct {
  5472. Ftype1 TBYTE
  5473. Fpad1 TBYTE
  5474. FsequenceNumber TCARD16
  5475. Flength TCARD32
  5476. Froot TCARD32
  5477. Fparent TCARD32
  5478. FnChildren TCARD16
  5479. Fpad2 TCARD16
  5480. Fpad3 TCARD32
  5481. Fpad4 TCARD32
  5482. Fpad5 TCARD32
  5483. }
  5484. type TxInternAtomReply = struct {
  5485. Ftype1 TBYTE
  5486. Fpad1 TBYTE
  5487. FsequenceNumber TCARD16
  5488. Flength TCARD32
  5489. Fatom TCARD32
  5490. Fpad2 TCARD32
  5491. Fpad3 TCARD32
  5492. Fpad4 TCARD32
  5493. Fpad5 TCARD32
  5494. Fpad6 TCARD32
  5495. }
  5496. type TxGetAtomNameReply = struct {
  5497. Ftype1 TBYTE
  5498. Fpad1 TBYTE
  5499. FsequenceNumber TCARD16
  5500. Flength TCARD32
  5501. FnameLength TCARD16
  5502. Fpad2 TCARD16
  5503. Fpad3 TCARD32
  5504. Fpad4 TCARD32
  5505. Fpad5 TCARD32
  5506. Fpad6 TCARD32
  5507. Fpad7 TCARD32
  5508. }
  5509. type TxGetPropertyReply = struct {
  5510. Ftype1 TBYTE
  5511. Fformat TCARD8
  5512. FsequenceNumber TCARD16
  5513. Flength TCARD32
  5514. FpropertyType TCARD32
  5515. FbytesAfter TCARD32
  5516. FnItems TCARD32
  5517. Fpad1 TCARD32
  5518. Fpad2 TCARD32
  5519. Fpad3 TCARD32
  5520. }
  5521. type TxListPropertiesReply = struct {
  5522. Ftype1 TBYTE
  5523. Fpad1 TBYTE
  5524. FsequenceNumber TCARD16
  5525. Flength TCARD32
  5526. FnProperties TCARD16
  5527. Fpad2 TCARD16
  5528. Fpad3 TCARD32
  5529. Fpad4 TCARD32
  5530. Fpad5 TCARD32
  5531. Fpad6 TCARD32
  5532. Fpad7 TCARD32
  5533. }
  5534. type TxGetSelectionOwnerReply = struct {
  5535. Ftype1 TBYTE
  5536. Fpad1 TBYTE
  5537. FsequenceNumber TCARD16
  5538. Flength TCARD32
  5539. Fowner TCARD32
  5540. Fpad2 TCARD32
  5541. Fpad3 TCARD32
  5542. Fpad4 TCARD32
  5543. Fpad5 TCARD32
  5544. Fpad6 TCARD32
  5545. }
  5546. type TxGrabPointerReply = struct {
  5547. Ftype1 TBYTE
  5548. Fstatus TBYTE
  5549. FsequenceNumber TCARD16
  5550. Flength TCARD32
  5551. Fpad1 TCARD32
  5552. Fpad2 TCARD32
  5553. Fpad3 TCARD32
  5554. Fpad4 TCARD32
  5555. Fpad5 TCARD32
  5556. Fpad6 TCARD32
  5557. }
  5558. type TxGrabKeyboardReply = struct {
  5559. Ftype1 TBYTE
  5560. Fstatus TBYTE
  5561. FsequenceNumber TCARD16
  5562. Flength TCARD32
  5563. Fpad1 TCARD32
  5564. Fpad2 TCARD32
  5565. Fpad3 TCARD32
  5566. Fpad4 TCARD32
  5567. Fpad5 TCARD32
  5568. Fpad6 TCARD32
  5569. }
  5570. type TxQueryPointerReply = struct {
  5571. Ftype1 TBYTE
  5572. FsameScreen TBOOL
  5573. FsequenceNumber TCARD16
  5574. Flength TCARD32
  5575. Froot TCARD32
  5576. Fchild TCARD32
  5577. FrootX TINT16
  5578. FrootY TINT16
  5579. FwinX TINT16
  5580. FwinY TINT16
  5581. Fmask TCARD16
  5582. Fpad1 TCARD16
  5583. Fpad TCARD32
  5584. }
  5585. type TxGetMotionEventsReply = struct {
  5586. Ftype1 TBYTE
  5587. Fpad1 TBYTE
  5588. FsequenceNumber TCARD16
  5589. Flength TCARD32
  5590. FnEvents TCARD32
  5591. Fpad2 TCARD32
  5592. Fpad3 TCARD32
  5593. Fpad4 TCARD32
  5594. Fpad5 TCARD32
  5595. Fpad6 TCARD32
  5596. }
  5597. type TxTranslateCoordsReply = struct {
  5598. Ftype1 TBYTE
  5599. FsameScreen TBOOL
  5600. FsequenceNumber TCARD16
  5601. Flength TCARD32
  5602. Fchild TCARD32
  5603. FdstX TINT16
  5604. FdstY TINT16
  5605. Fpad2 TCARD32
  5606. Fpad3 TCARD32
  5607. Fpad4 TCARD32
  5608. Fpad5 TCARD32
  5609. }
  5610. type TxGetInputFocusReply = struct {
  5611. Ftype1 TBYTE
  5612. FrevertTo TCARD8
  5613. FsequenceNumber TCARD16
  5614. Flength TCARD32
  5615. Ffocus TCARD32
  5616. Fpad1 TCARD32
  5617. Fpad2 TCARD32
  5618. Fpad3 TCARD32
  5619. Fpad4 TCARD32
  5620. Fpad5 TCARD32
  5621. }
  5622. type TxQueryKeymapReply = struct {
  5623. Ftype1 TBYTE
  5624. Fpad1 TBYTE
  5625. FsequenceNumber TCARD16
  5626. Flength TCARD32
  5627. Fmap1 [32]TBYTE
  5628. }
  5629. type TxQueryFontReply = struct {
  5630. Ftype1 TBYTE
  5631. Fpad1 TBYTE
  5632. FsequenceNumber TCARD16
  5633. Flength TCARD32
  5634. FminBounds TxCharInfo
  5635. Fwalign1 TCARD32
  5636. FmaxBounds TxCharInfo
  5637. Fwalign2 TCARD32
  5638. FminCharOrByte2 TCARD16
  5639. FmaxCharOrByte2 TCARD16
  5640. FdefaultChar TCARD16
  5641. FnFontProps TCARD16
  5642. FdrawDirection TCARD8
  5643. FminByte1 TCARD8
  5644. FmaxByte1 TCARD8
  5645. FallCharsExist TBOOL
  5646. FfontAscent TINT16
  5647. FfontDescent TINT16
  5648. FnCharInfos TCARD32
  5649. }
  5650. type T_xQueryFontReply = TxQueryFontReply
  5651. type TxQueryTextExtentsReply = struct {
  5652. Ftype1 TBYTE
  5653. FdrawDirection TCARD8
  5654. FsequenceNumber TCARD16
  5655. Flength TCARD32
  5656. FfontAscent TINT16
  5657. FfontDescent TINT16
  5658. FoverallAscent TINT16
  5659. FoverallDescent TINT16
  5660. FoverallWidth TINT32
  5661. FoverallLeft TINT32
  5662. FoverallRight TINT32
  5663. Fpad TCARD32
  5664. }
  5665. type TxListFontsReply = struct {
  5666. Ftype1 TBYTE
  5667. Fpad1 TBYTE
  5668. FsequenceNumber TCARD16
  5669. Flength TCARD32
  5670. FnFonts TCARD16
  5671. Fpad2 TCARD16
  5672. Fpad3 TCARD32
  5673. Fpad4 TCARD32
  5674. Fpad5 TCARD32
  5675. Fpad6 TCARD32
  5676. Fpad7 TCARD32
  5677. }
  5678. type TxListFontsWithInfoReply = struct {
  5679. Ftype1 TBYTE
  5680. FnameLength TCARD8
  5681. FsequenceNumber TCARD16
  5682. Flength TCARD32
  5683. FminBounds TxCharInfo
  5684. Fwalign1 TCARD32
  5685. FmaxBounds TxCharInfo
  5686. Fwalign2 TCARD32
  5687. FminCharOrByte2 TCARD16
  5688. FmaxCharOrByte2 TCARD16
  5689. FdefaultChar TCARD16
  5690. FnFontProps TCARD16
  5691. FdrawDirection TCARD8
  5692. FminByte1 TCARD8
  5693. FmaxByte1 TCARD8
  5694. FallCharsExist TBOOL
  5695. FfontAscent TINT16
  5696. FfontDescent TINT16
  5697. FnReplies TCARD32
  5698. }
  5699. type TxGetFontPathReply = struct {
  5700. Ftype1 TBYTE
  5701. Fpad1 TBYTE
  5702. FsequenceNumber TCARD16
  5703. Flength TCARD32
  5704. FnPaths TCARD16
  5705. Fpad2 TCARD16
  5706. Fpad3 TCARD32
  5707. Fpad4 TCARD32
  5708. Fpad5 TCARD32
  5709. Fpad6 TCARD32
  5710. Fpad7 TCARD32
  5711. }
  5712. type TxGetImageReply = struct {
  5713. Ftype1 TBYTE
  5714. Fdepth TCARD8
  5715. FsequenceNumber TCARD16
  5716. Flength TCARD32
  5717. Fvisual TCARD32
  5718. Fpad3 TCARD32
  5719. Fpad4 TCARD32
  5720. Fpad5 TCARD32
  5721. Fpad6 TCARD32
  5722. Fpad7 TCARD32
  5723. }
  5724. type TxListInstalledColormapsReply = struct {
  5725. Ftype1 TBYTE
  5726. Fpad1 TBYTE
  5727. FsequenceNumber TCARD16
  5728. Flength TCARD32
  5729. FnColormaps TCARD16
  5730. Fpad2 TCARD16
  5731. Fpad3 TCARD32
  5732. Fpad4 TCARD32
  5733. Fpad5 TCARD32
  5734. Fpad6 TCARD32
  5735. Fpad7 TCARD32
  5736. }
  5737. type TxAllocColorReply = struct {
  5738. Ftype1 TBYTE
  5739. Fpad1 TBYTE
  5740. FsequenceNumber TCARD16
  5741. Flength TCARD32
  5742. Fred TCARD16
  5743. Fgreen TCARD16
  5744. Fblue TCARD16
  5745. Fpad2 TCARD16
  5746. Fpixel TCARD32
  5747. Fpad3 TCARD32
  5748. Fpad4 TCARD32
  5749. Fpad5 TCARD32
  5750. }
  5751. type TxAllocNamedColorReply = struct {
  5752. Ftype1 TBYTE
  5753. Fpad1 TBYTE
  5754. FsequenceNumber TCARD16
  5755. Flength TCARD32
  5756. Fpixel TCARD32
  5757. FexactRed TCARD16
  5758. FexactGreen TCARD16
  5759. FexactBlue TCARD16
  5760. FscreenRed TCARD16
  5761. FscreenGreen TCARD16
  5762. FscreenBlue TCARD16
  5763. Fpad2 TCARD32
  5764. Fpad3 TCARD32
  5765. }
  5766. type TxAllocColorCellsReply = struct {
  5767. Ftype1 TBYTE
  5768. Fpad1 TBYTE
  5769. FsequenceNumber TCARD16
  5770. Flength TCARD32
  5771. FnPixels TCARD16
  5772. FnMasks TCARD16
  5773. Fpad3 TCARD32
  5774. Fpad4 TCARD32
  5775. Fpad5 TCARD32
  5776. Fpad6 TCARD32
  5777. Fpad7 TCARD32
  5778. }
  5779. type TxAllocColorPlanesReply = struct {
  5780. Ftype1 TBYTE
  5781. Fpad1 TBYTE
  5782. FsequenceNumber TCARD16
  5783. Flength TCARD32
  5784. FnPixels TCARD16
  5785. Fpad2 TCARD16
  5786. FredMask TCARD32
  5787. FgreenMask TCARD32
  5788. FblueMask TCARD32
  5789. Fpad3 TCARD32
  5790. Fpad4 TCARD32
  5791. }
  5792. type TxQueryColorsReply = struct {
  5793. Ftype1 TBYTE
  5794. Fpad1 TBYTE
  5795. FsequenceNumber TCARD16
  5796. Flength TCARD32
  5797. FnColors TCARD16
  5798. Fpad2 TCARD16
  5799. Fpad3 TCARD32
  5800. Fpad4 TCARD32
  5801. Fpad5 TCARD32
  5802. Fpad6 TCARD32
  5803. Fpad7 TCARD32
  5804. }
  5805. type TxLookupColorReply = struct {
  5806. Ftype1 TBYTE
  5807. Fpad1 TBYTE
  5808. FsequenceNumber TCARD16
  5809. Flength TCARD32
  5810. FexactRed TCARD16
  5811. FexactGreen TCARD16
  5812. FexactBlue TCARD16
  5813. FscreenRed TCARD16
  5814. FscreenGreen TCARD16
  5815. FscreenBlue TCARD16
  5816. Fpad3 TCARD32
  5817. Fpad4 TCARD32
  5818. Fpad5 TCARD32
  5819. }
  5820. type TxQueryBestSizeReply = struct {
  5821. Ftype1 TBYTE
  5822. Fpad1 TBYTE
  5823. FsequenceNumber TCARD16
  5824. Flength TCARD32
  5825. Fwidth TCARD16
  5826. Fheight TCARD16
  5827. Fpad3 TCARD32
  5828. Fpad4 TCARD32
  5829. Fpad5 TCARD32
  5830. Fpad6 TCARD32
  5831. Fpad7 TCARD32
  5832. }
  5833. type TxQueryExtensionReply = struct {
  5834. Ftype1 TBYTE
  5835. Fpad1 TBYTE
  5836. FsequenceNumber TCARD16
  5837. Flength TCARD32
  5838. Fpresent TBOOL
  5839. Fmajor_opcode TCARD8
  5840. Ffirst_event TCARD8
  5841. Ffirst_error TCARD8
  5842. Fpad3 TCARD32
  5843. Fpad4 TCARD32
  5844. Fpad5 TCARD32
  5845. Fpad6 TCARD32
  5846. Fpad7 TCARD32
  5847. }
  5848. type TxListExtensionsReply = struct {
  5849. Ftype1 TBYTE
  5850. FnExtensions TCARD8
  5851. FsequenceNumber TCARD16
  5852. Flength TCARD32
  5853. Fpad2 TCARD32
  5854. Fpad3 TCARD32
  5855. Fpad4 TCARD32
  5856. Fpad5 TCARD32
  5857. Fpad6 TCARD32
  5858. Fpad7 TCARD32
  5859. }
  5860. type TxSetMappingReply = struct {
  5861. Ftype1 TBYTE
  5862. Fsuccess TCARD8
  5863. FsequenceNumber TCARD16
  5864. Flength TCARD32
  5865. Fpad2 TCARD32
  5866. Fpad3 TCARD32
  5867. Fpad4 TCARD32
  5868. Fpad5 TCARD32
  5869. Fpad6 TCARD32
  5870. Fpad7 TCARD32
  5871. }
  5872. type TxSetPointerMappingReply = struct {
  5873. Ftype1 TBYTE
  5874. Fsuccess TCARD8
  5875. FsequenceNumber TCARD16
  5876. Flength TCARD32
  5877. Fpad2 TCARD32
  5878. Fpad3 TCARD32
  5879. Fpad4 TCARD32
  5880. Fpad5 TCARD32
  5881. Fpad6 TCARD32
  5882. Fpad7 TCARD32
  5883. }
  5884. type TxSetModifierMappingReply = struct {
  5885. Ftype1 TBYTE
  5886. Fsuccess TCARD8
  5887. FsequenceNumber TCARD16
  5888. Flength TCARD32
  5889. Fpad2 TCARD32
  5890. Fpad3 TCARD32
  5891. Fpad4 TCARD32
  5892. Fpad5 TCARD32
  5893. Fpad6 TCARD32
  5894. Fpad7 TCARD32
  5895. }
  5896. type TxGetPointerMappingReply = struct {
  5897. Ftype1 TBYTE
  5898. FnElts TCARD8
  5899. FsequenceNumber TCARD16
  5900. Flength TCARD32
  5901. Fpad2 TCARD32
  5902. Fpad3 TCARD32
  5903. Fpad4 TCARD32
  5904. Fpad5 TCARD32
  5905. Fpad6 TCARD32
  5906. Fpad7 TCARD32
  5907. }
  5908. type TxGetKeyboardMappingReply = struct {
  5909. Ftype1 TBYTE
  5910. FkeySymsPerKeyCode TCARD8
  5911. FsequenceNumber TCARD16
  5912. Flength TCARD32
  5913. Fpad2 TCARD32
  5914. Fpad3 TCARD32
  5915. Fpad4 TCARD32
  5916. Fpad5 TCARD32
  5917. Fpad6 TCARD32
  5918. Fpad7 TCARD32
  5919. }
  5920. type TxGetModifierMappingReply = struct {
  5921. Ftype1 TBYTE
  5922. FnumKeyPerModifier TCARD8
  5923. FsequenceNumber TCARD16
  5924. Flength TCARD32
  5925. Fpad1 TCARD32
  5926. Fpad2 TCARD32
  5927. Fpad3 TCARD32
  5928. Fpad4 TCARD32
  5929. Fpad5 TCARD32
  5930. Fpad6 TCARD32
  5931. }
  5932. type TxGetKeyboardControlReply = struct {
  5933. Ftype1 TBYTE
  5934. FglobalAutoRepeat TBOOL
  5935. FsequenceNumber TCARD16
  5936. Flength TCARD32
  5937. FledMask TCARD32
  5938. FkeyClickPercent TCARD8
  5939. FbellPercent TCARD8
  5940. FbellPitch TCARD16
  5941. FbellDuration TCARD16
  5942. Fpad TCARD16
  5943. Fmap1 [32]TBYTE
  5944. }
  5945. type TxGetPointerControlReply = struct {
  5946. Ftype1 TBYTE
  5947. Fpad1 TBYTE
  5948. FsequenceNumber TCARD16
  5949. Flength TCARD32
  5950. FaccelNumerator TCARD16
  5951. FaccelDenominator TCARD16
  5952. Fthreshold TCARD16
  5953. Fpad2 TCARD16
  5954. Fpad3 TCARD32
  5955. Fpad4 TCARD32
  5956. Fpad5 TCARD32
  5957. Fpad6 TCARD32
  5958. }
  5959. type TxGetScreenSaverReply = struct {
  5960. Ftype1 TBYTE
  5961. Fpad1 TBYTE
  5962. FsequenceNumber TCARD16
  5963. Flength TCARD32
  5964. Ftimeout TCARD16
  5965. Finterval TCARD16
  5966. FpreferBlanking TBOOL
  5967. FallowExposures TBOOL
  5968. Fpad2 TCARD16
  5969. Fpad3 TCARD32
  5970. Fpad4 TCARD32
  5971. Fpad5 TCARD32
  5972. Fpad6 TCARD32
  5973. }
  5974. type TxListHostsReply = struct {
  5975. Ftype1 TBYTE
  5976. Fenabled TBOOL
  5977. FsequenceNumber TCARD16
  5978. Flength TCARD32
  5979. FnHosts TCARD16
  5980. Fpad1 TCARD16
  5981. Fpad3 TCARD32
  5982. Fpad4 TCARD32
  5983. Fpad5 TCARD32
  5984. Fpad6 TCARD32
  5985. Fpad7 TCARD32
  5986. }
  5987. type TxError = struct {
  5988. Ftype1 TBYTE
  5989. FerrorCode TBYTE
  5990. FsequenceNumber TCARD16
  5991. FresourceID TCARD32
  5992. FminorCode TCARD16
  5993. FmajorCode TCARD8
  5994. Fpad1 TBYTE
  5995. Fpad3 TCARD32
  5996. Fpad4 TCARD32
  5997. Fpad5 TCARD32
  5998. Fpad6 TCARD32
  5999. Fpad7 TCARD32
  6000. }
  6001. type TxEvent = struct {
  6002. Fu struct {
  6003. FkeyButtonPointer [0]struct {
  6004. Fpad00 TCARD32
  6005. Ftime TCARD32
  6006. Froot TCARD32
  6007. Fevent TCARD32
  6008. Fchild TCARD32
  6009. FrootX TINT16
  6010. FrootY TINT16
  6011. FeventX TINT16
  6012. FeventY TINT16
  6013. Fstate TKeyButMask
  6014. FsameScreen TBOOL
  6015. Fpad1 TBYTE
  6016. }
  6017. FenterLeave [0]struct {
  6018. Fpad00 TCARD32
  6019. Ftime TCARD32
  6020. Froot TCARD32
  6021. Fevent TCARD32
  6022. Fchild TCARD32
  6023. FrootX TINT16
  6024. FrootY TINT16
  6025. FeventX TINT16
  6026. FeventY TINT16
  6027. Fstate TKeyButMask
  6028. Fmode TBYTE
  6029. Fflags TBYTE
  6030. }
  6031. Ffocus [0]struct {
  6032. Fpad00 TCARD32
  6033. Fwindow TCARD32
  6034. Fmode TBYTE
  6035. Fpad1 TBYTE
  6036. Fpad2 TBYTE
  6037. Fpad3 TBYTE
  6038. }
  6039. Fexpose [0]struct {
  6040. Fpad00 TCARD32
  6041. Fwindow TCARD32
  6042. Fx TCARD16
  6043. Fy TCARD16
  6044. Fwidth TCARD16
  6045. Fheight TCARD16
  6046. Fcount TCARD16
  6047. Fpad2 TCARD16
  6048. }
  6049. FgraphicsExposure [0]struct {
  6050. Fpad00 TCARD32
  6051. Fdrawable TCARD32
  6052. Fx TCARD16
  6053. Fy TCARD16
  6054. Fwidth TCARD16
  6055. Fheight TCARD16
  6056. FminorEvent TCARD16
  6057. Fcount TCARD16
  6058. FmajorEvent TBYTE
  6059. Fpad1 TBYTE
  6060. Fpad2 TBYTE
  6061. Fpad3 TBYTE
  6062. }
  6063. FnoExposure [0]struct {
  6064. Fpad00 TCARD32
  6065. Fdrawable TCARD32
  6066. FminorEvent TCARD16
  6067. FmajorEvent TBYTE
  6068. Fbpad TBYTE
  6069. }
  6070. Fvisibility [0]struct {
  6071. Fpad00 TCARD32
  6072. Fwindow TCARD32
  6073. Fstate TCARD8
  6074. Fpad1 TBYTE
  6075. Fpad2 TBYTE
  6076. Fpad3 TBYTE
  6077. }
  6078. FcreateNotify [0]struct {
  6079. Fpad00 TCARD32
  6080. Fparent TCARD32
  6081. Fwindow TCARD32
  6082. Fx TINT16
  6083. Fy TINT16
  6084. Fwidth TCARD16
  6085. Fheight TCARD16
  6086. FborderWidth TCARD16
  6087. Foverride TBOOL
  6088. Fbpad TBYTE
  6089. }
  6090. FdestroyNotify [0]struct {
  6091. Fpad00 TCARD32
  6092. Fevent TCARD32
  6093. Fwindow TCARD32
  6094. }
  6095. FunmapNotify [0]struct {
  6096. Fpad00 TCARD32
  6097. Fevent TCARD32
  6098. Fwindow TCARD32
  6099. FfromConfigure TBOOL
  6100. Fpad1 TBYTE
  6101. Fpad2 TBYTE
  6102. Fpad3 TBYTE
  6103. }
  6104. FmapNotify [0]struct {
  6105. Fpad00 TCARD32
  6106. Fevent TCARD32
  6107. Fwindow TCARD32
  6108. Foverride TBOOL
  6109. Fpad1 TBYTE
  6110. Fpad2 TBYTE
  6111. Fpad3 TBYTE
  6112. }
  6113. FmapRequest [0]struct {
  6114. Fpad00 TCARD32
  6115. Fparent TCARD32
  6116. Fwindow TCARD32
  6117. }
  6118. Freparent [0]struct {
  6119. Fpad00 TCARD32
  6120. Fevent TCARD32
  6121. Fwindow TCARD32
  6122. Fparent TCARD32
  6123. Fx TINT16
  6124. Fy TINT16
  6125. Foverride TBOOL
  6126. Fpad1 TBYTE
  6127. Fpad2 TBYTE
  6128. Fpad3 TBYTE
  6129. }
  6130. FconfigureNotify [0]struct {
  6131. Fpad00 TCARD32
  6132. Fevent TCARD32
  6133. Fwindow TCARD32
  6134. FaboveSibling TCARD32
  6135. Fx TINT16
  6136. Fy TINT16
  6137. Fwidth TCARD16
  6138. Fheight TCARD16
  6139. FborderWidth TCARD16
  6140. Foverride TBOOL
  6141. Fbpad TBYTE
  6142. }
  6143. FconfigureRequest [0]struct {
  6144. Fpad00 TCARD32
  6145. Fparent TCARD32
  6146. Fwindow TCARD32
  6147. Fsibling TCARD32
  6148. Fx TINT16
  6149. Fy TINT16
  6150. Fwidth TCARD16
  6151. Fheight TCARD16
  6152. FborderWidth TCARD16
  6153. FvalueMask TCARD16
  6154. Fpad1 TCARD32
  6155. }
  6156. Fgravity [0]struct {
  6157. Fpad00 TCARD32
  6158. Fevent TCARD32
  6159. Fwindow TCARD32
  6160. Fx TINT16
  6161. Fy TINT16
  6162. Fpad1 TCARD32
  6163. Fpad2 TCARD32
  6164. Fpad3 TCARD32
  6165. Fpad4 TCARD32
  6166. }
  6167. FresizeRequest [0]struct {
  6168. Fpad00 TCARD32
  6169. Fwindow TCARD32
  6170. Fwidth TCARD16
  6171. Fheight TCARD16
  6172. }
  6173. Fcirculate [0]struct {
  6174. Fpad00 TCARD32
  6175. Fevent TCARD32
  6176. Fwindow TCARD32
  6177. Fparent TCARD32
  6178. Fplace TBYTE
  6179. Fpad1 TBYTE
  6180. Fpad2 TBYTE
  6181. Fpad3 TBYTE
  6182. }
  6183. Fproperty [0]struct {
  6184. Fpad00 TCARD32
  6185. Fwindow TCARD32
  6186. Fatom TCARD32
  6187. Ftime TCARD32
  6188. Fstate TBYTE
  6189. Fpad1 TBYTE
  6190. Fpad2 TCARD16
  6191. }
  6192. FselectionClear [0]struct {
  6193. Fpad00 TCARD32
  6194. Ftime TCARD32
  6195. Fwindow TCARD32
  6196. Fatom TCARD32
  6197. }
  6198. FselectionRequest [0]struct {
  6199. Fpad00 TCARD32
  6200. Ftime TCARD32
  6201. Fowner TCARD32
  6202. Frequestor TCARD32
  6203. Fselection TCARD32
  6204. Ftarget TCARD32
  6205. Fproperty TCARD32
  6206. }
  6207. FselectionNotify [0]struct {
  6208. Fpad00 TCARD32
  6209. Ftime TCARD32
  6210. Frequestor TCARD32
  6211. Fselection TCARD32
  6212. Ftarget TCARD32
  6213. Fproperty TCARD32
  6214. }
  6215. Fcolormap [0]struct {
  6216. Fpad00 TCARD32
  6217. Fwindow TCARD32
  6218. Fcolormap TCARD32
  6219. Fnew1 TBOOL
  6220. Fstate TBYTE
  6221. Fpad1 TBYTE
  6222. Fpad2 TBYTE
  6223. }
  6224. FmappingNotify [0]struct {
  6225. Fpad00 TCARD32
  6226. Frequest TCARD8
  6227. FfirstKeyCode TCARD8
  6228. Fcount TCARD8
  6229. Fpad1 TBYTE
  6230. }
  6231. FclientMessage [0]struct {
  6232. Fpad00 TCARD32
  6233. Fwindow TCARD32
  6234. Fu struct {
  6235. Fs [0]struct {
  6236. Ftype1 TCARD32
  6237. Fshorts0 TINT16
  6238. Fshorts1 TINT16
  6239. Fshorts2 TINT16
  6240. Fshorts3 TINT16
  6241. Fshorts4 TINT16
  6242. Fshorts5 TINT16
  6243. Fshorts6 TINT16
  6244. Fshorts7 TINT16
  6245. Fshorts8 TINT16
  6246. Fshorts9 TINT16
  6247. }
  6248. Fb [0]struct {
  6249. Ftype1 TCARD32
  6250. Fbytes [20]TINT8
  6251. }
  6252. Fl struct {
  6253. Ftype1 TCARD32
  6254. Flongs0 TINT32
  6255. Flongs1 TINT32
  6256. Flongs2 TINT32
  6257. Flongs3 TINT32
  6258. Flongs4 TINT32
  6259. }
  6260. }
  6261. }
  6262. Fu struct {
  6263. Ftype1 TBYTE
  6264. Fdetail TBYTE
  6265. FsequenceNumber TCARD16
  6266. }
  6267. F__ccgo_pad26 [28]byte
  6268. }
  6269. }
  6270. type T_xEvent = TxEvent
  6271. type TxGenericEvent = struct {
  6272. Ftype1 TBYTE
  6273. Fextension TCARD8
  6274. FsequenceNumber TCARD16
  6275. Flength TCARD32
  6276. Fevtype TCARD16
  6277. Fpad2 TCARD16
  6278. Fpad3 TCARD32
  6279. Fpad4 TCARD32
  6280. Fpad5 TCARD32
  6281. Fpad6 TCARD32
  6282. Fpad7 TCARD32
  6283. }
  6284. type TxKeymapEvent = struct {
  6285. Ftype1 TBYTE
  6286. Fmap1 [31]TBYTE
  6287. }
  6288. type TxReply = struct {
  6289. Fgeom [0]TxGetGeometryReply
  6290. Ftree [0]TxQueryTreeReply
  6291. Fatom [0]TxInternAtomReply
  6292. FatomName [0]TxGetAtomNameReply
  6293. Fproperty [0]TxGetPropertyReply
  6294. FlistProperties [0]TxListPropertiesReply
  6295. Fselection [0]TxGetSelectionOwnerReply
  6296. FgrabPointer [0]TxGrabPointerReply
  6297. FgrabKeyboard [0]TxGrabKeyboardReply
  6298. Fpointer [0]TxQueryPointerReply
  6299. FmotionEvents [0]TxGetMotionEventsReply
  6300. Fcoords [0]TxTranslateCoordsReply
  6301. FinputFocus [0]TxGetInputFocusReply
  6302. FtextExtents [0]TxQueryTextExtentsReply
  6303. Ffonts [0]TxListFontsReply
  6304. FfontPath [0]TxGetFontPathReply
  6305. Fimage [0]TxGetImageReply
  6306. Fcolormaps [0]TxListInstalledColormapsReply
  6307. FallocColor [0]TxAllocColorReply
  6308. FallocNamedColor [0]TxAllocNamedColorReply
  6309. FcolorCells [0]TxAllocColorCellsReply
  6310. FcolorPlanes [0]TxAllocColorPlanesReply
  6311. Fcolors [0]TxQueryColorsReply
  6312. FlookupColor [0]TxLookupColorReply
  6313. FbestSize [0]TxQueryBestSizeReply
  6314. Fextension [0]TxQueryExtensionReply
  6315. Fextensions [0]TxListExtensionsReply
  6316. FsetModifierMapping [0]TxSetModifierMappingReply
  6317. FgetModifierMapping [0]TxGetModifierMappingReply
  6318. FsetPointerMapping [0]TxSetPointerMappingReply
  6319. FgetKeyboardMapping [0]TxGetKeyboardMappingReply
  6320. FgetPointerMapping [0]TxGetPointerMappingReply
  6321. FpointerControl [0]TxGetPointerControlReply
  6322. FscreenSaver [0]TxGetScreenSaverReply
  6323. Fhosts [0]TxListHostsReply
  6324. Ferror1 [0]TxError
  6325. Fevent [0]TxEvent
  6326. Fgeneric TxGenericReply
  6327. }
  6328. type TxReq = struct {
  6329. FreqType TCARD8
  6330. Fdata TCARD8
  6331. Flength TCARD16
  6332. }
  6333. type T_xReq = TxReq
  6334. type TxResourceReq = struct {
  6335. FreqType TCARD8
  6336. Fpad TBYTE
  6337. Flength TCARD16
  6338. Fid TCARD32
  6339. }
  6340. type TxCreateWindowReq = struct {
  6341. FreqType TCARD8
  6342. Fdepth TCARD8
  6343. Flength TCARD16
  6344. Fwid TCARD32
  6345. Fparent TCARD32
  6346. Fx TINT16
  6347. Fy TINT16
  6348. Fwidth TCARD16
  6349. Fheight TCARD16
  6350. FborderWidth TCARD16
  6351. Fclass TCARD16
  6352. Fvisual TCARD32
  6353. Fmask TCARD32
  6354. }
  6355. type TxChangeWindowAttributesReq = struct {
  6356. FreqType TCARD8
  6357. Fpad TBYTE
  6358. Flength TCARD16
  6359. Fwindow TCARD32
  6360. FvalueMask TCARD32
  6361. }
  6362. type TxChangeSaveSetReq = struct {
  6363. FreqType TCARD8
  6364. Fmode TBYTE
  6365. Flength TCARD16
  6366. Fwindow TCARD32
  6367. }
  6368. type TxReparentWindowReq = struct {
  6369. FreqType TCARD8
  6370. Fpad TBYTE
  6371. Flength TCARD16
  6372. Fwindow TCARD32
  6373. Fparent TCARD32
  6374. Fx TINT16
  6375. Fy TINT16
  6376. }
  6377. type TxConfigureWindowReq = struct {
  6378. FreqType TCARD8
  6379. Fpad TCARD8
  6380. Flength TCARD16
  6381. Fwindow TCARD32
  6382. Fmask TCARD16
  6383. Fpad2 TCARD16
  6384. }
  6385. type TxCirculateWindowReq = struct {
  6386. FreqType TCARD8
  6387. Fdirection TCARD8
  6388. Flength TCARD16
  6389. Fwindow TCARD32
  6390. }
  6391. type TxInternAtomReq = struct {
  6392. FreqType TCARD8
  6393. FonlyIfExists TBOOL
  6394. Flength TCARD16
  6395. Fnbytes TCARD16
  6396. Fpad TCARD16
  6397. }
  6398. type TxChangePropertyReq = struct {
  6399. FreqType TCARD8
  6400. Fmode TCARD8
  6401. Flength TCARD16
  6402. Fwindow TCARD32
  6403. Fproperty TCARD32
  6404. Ftype1 TCARD32
  6405. Fformat TCARD8
  6406. Fpad [3]TBYTE
  6407. FnUnits TCARD32
  6408. }
  6409. type TxDeletePropertyReq = struct {
  6410. FreqType TCARD8
  6411. Fpad TBYTE
  6412. Flength TCARD16
  6413. Fwindow TCARD32
  6414. Fproperty TCARD32
  6415. }
  6416. type TxGetPropertyReq = struct {
  6417. FreqType TCARD8
  6418. Fdelete1 TBOOL
  6419. Flength TCARD16
  6420. Fwindow TCARD32
  6421. Fproperty TCARD32
  6422. Ftype1 TCARD32
  6423. FlongOffset TCARD32
  6424. FlongLength TCARD32
  6425. }
  6426. type TxSetSelectionOwnerReq = struct {
  6427. FreqType TCARD8
  6428. Fpad TBYTE
  6429. Flength TCARD16
  6430. Fwindow TCARD32
  6431. Fselection TCARD32
  6432. Ftime TCARD32
  6433. }
  6434. type TxConvertSelectionReq = struct {
  6435. FreqType TCARD8
  6436. Fpad TBYTE
  6437. Flength TCARD16
  6438. Frequestor TCARD32
  6439. Fselection TCARD32
  6440. Ftarget TCARD32
  6441. Fproperty TCARD32
  6442. Ftime TCARD32
  6443. }
  6444. type TxSendEventReq = struct {
  6445. FreqType TCARD8
  6446. Fpropagate TBOOL
  6447. Flength TCARD16
  6448. Fdestination TCARD32
  6449. FeventMask TCARD32
  6450. Fevent TxEvent
  6451. }
  6452. type TxGrabPointerReq = struct {
  6453. FreqType TCARD8
  6454. FownerEvents TBOOL
  6455. Flength TCARD16
  6456. FgrabWindow TCARD32
  6457. FeventMask TCARD16
  6458. FpointerMode TBYTE
  6459. FkeyboardMode TBYTE
  6460. FconfineTo TCARD32
  6461. Fcursor TCARD32
  6462. Ftime TCARD32
  6463. }
  6464. type TxGrabButtonReq = struct {
  6465. FreqType TCARD8
  6466. FownerEvents TBOOL
  6467. Flength TCARD16
  6468. FgrabWindow TCARD32
  6469. FeventMask TCARD16
  6470. FpointerMode TBYTE
  6471. FkeyboardMode TBYTE
  6472. FconfineTo TCARD32
  6473. Fcursor TCARD32
  6474. Fbutton TCARD8
  6475. Fpad TBYTE
  6476. Fmodifiers TCARD16
  6477. }
  6478. type TxUngrabButtonReq = struct {
  6479. FreqType TCARD8
  6480. Fbutton TCARD8
  6481. Flength TCARD16
  6482. FgrabWindow TCARD32
  6483. Fmodifiers TCARD16
  6484. Fpad TCARD16
  6485. }
  6486. type TxChangeActivePointerGrabReq = struct {
  6487. FreqType TCARD8
  6488. Fpad TBYTE
  6489. Flength TCARD16
  6490. Fcursor TCARD32
  6491. Ftime TCARD32
  6492. FeventMask TCARD16
  6493. Fpad2 TCARD16
  6494. }
  6495. type TxGrabKeyboardReq = struct {
  6496. FreqType TCARD8
  6497. FownerEvents TBOOL
  6498. Flength TCARD16
  6499. FgrabWindow TCARD32
  6500. Ftime TCARD32
  6501. FpointerMode TBYTE
  6502. FkeyboardMode TBYTE
  6503. Fpad TCARD16
  6504. }
  6505. type TxGrabKeyReq = struct {
  6506. FreqType TCARD8
  6507. FownerEvents TBOOL
  6508. Flength TCARD16
  6509. FgrabWindow TCARD32
  6510. Fmodifiers TCARD16
  6511. Fkey TCARD8
  6512. FpointerMode TBYTE
  6513. FkeyboardMode TBYTE
  6514. Fpad1 TBYTE
  6515. Fpad2 TBYTE
  6516. Fpad3 TBYTE
  6517. }
  6518. type TxUngrabKeyReq = struct {
  6519. FreqType TCARD8
  6520. Fkey TCARD8
  6521. Flength TCARD16
  6522. FgrabWindow TCARD32
  6523. Fmodifiers TCARD16
  6524. Fpad TCARD16
  6525. }
  6526. type TxAllowEventsReq = struct {
  6527. FreqType TCARD8
  6528. Fmode TCARD8
  6529. Flength TCARD16
  6530. Ftime TCARD32
  6531. }
  6532. type TxGetMotionEventsReq = struct {
  6533. FreqType TCARD8
  6534. Fpad TBYTE
  6535. Flength TCARD16
  6536. Fwindow TCARD32
  6537. Fstart TCARD32
  6538. Fstop TCARD32
  6539. }
  6540. type TxTranslateCoordsReq = struct {
  6541. FreqType TCARD8
  6542. Fpad TBYTE
  6543. Flength TCARD16
  6544. FsrcWid TCARD32
  6545. FdstWid TCARD32
  6546. FsrcX TINT16
  6547. FsrcY TINT16
  6548. }
  6549. type TxWarpPointerReq = struct {
  6550. FreqType TCARD8
  6551. Fpad TBYTE
  6552. Flength TCARD16
  6553. FsrcWid TCARD32
  6554. FdstWid TCARD32
  6555. FsrcX TINT16
  6556. FsrcY TINT16
  6557. FsrcWidth TCARD16
  6558. FsrcHeight TCARD16
  6559. FdstX TINT16
  6560. FdstY TINT16
  6561. }
  6562. type TxSetInputFocusReq = struct {
  6563. FreqType TCARD8
  6564. FrevertTo TCARD8
  6565. Flength TCARD16
  6566. Ffocus TCARD32
  6567. Ftime TCARD32
  6568. }
  6569. type TxOpenFontReq = struct {
  6570. FreqType TCARD8
  6571. Fpad TBYTE
  6572. Flength TCARD16
  6573. Ffid TCARD32
  6574. Fnbytes TCARD16
  6575. Fpad1 TBYTE
  6576. Fpad2 TBYTE
  6577. }
  6578. type TxQueryTextExtentsReq = struct {
  6579. FreqType TCARD8
  6580. FoddLength TBOOL
  6581. Flength TCARD16
  6582. Ffid TCARD32
  6583. }
  6584. type TxListFontsReq = struct {
  6585. FreqType TCARD8
  6586. Fpad TBYTE
  6587. Flength TCARD16
  6588. FmaxNames TCARD16
  6589. Fnbytes TCARD16
  6590. }
  6591. type TxListFontsWithInfoReq = struct {
  6592. FreqType TCARD8
  6593. Fpad TBYTE
  6594. Flength TCARD16
  6595. FmaxNames TCARD16
  6596. Fnbytes TCARD16
  6597. }
  6598. type TxSetFontPathReq = struct {
  6599. FreqType TCARD8
  6600. Fpad TBYTE
  6601. Flength TCARD16
  6602. FnFonts TCARD16
  6603. Fpad1 TBYTE
  6604. Fpad2 TBYTE
  6605. }
  6606. type TxCreatePixmapReq = struct {
  6607. FreqType TCARD8
  6608. Fdepth TCARD8
  6609. Flength TCARD16
  6610. Fpid TCARD32
  6611. Fdrawable TCARD32
  6612. Fwidth TCARD16
  6613. Fheight TCARD16
  6614. }
  6615. type TxCreateGCReq = struct {
  6616. FreqType TCARD8
  6617. Fpad TBYTE
  6618. Flength TCARD16
  6619. Fgc TCARD32
  6620. Fdrawable TCARD32
  6621. Fmask TCARD32
  6622. }
  6623. type TxChangeGCReq = struct {
  6624. FreqType TCARD8
  6625. Fpad TBYTE
  6626. Flength TCARD16
  6627. Fgc TCARD32
  6628. Fmask TCARD32
  6629. }
  6630. type TxCopyGCReq = struct {
  6631. FreqType TCARD8
  6632. Fpad TBYTE
  6633. Flength TCARD16
  6634. FsrcGC TCARD32
  6635. FdstGC TCARD32
  6636. Fmask TCARD32
  6637. }
  6638. type TxSetDashesReq = struct {
  6639. FreqType TCARD8
  6640. Fpad TBYTE
  6641. Flength TCARD16
  6642. Fgc TCARD32
  6643. FdashOffset TCARD16
  6644. FnDashes TCARD16
  6645. }
  6646. type TxSetClipRectanglesReq = struct {
  6647. FreqType TCARD8
  6648. Fordering TBYTE
  6649. Flength TCARD16
  6650. Fgc TCARD32
  6651. FxOrigin TINT16
  6652. FyOrigin TINT16
  6653. }
  6654. type TxClearAreaReq = struct {
  6655. FreqType TCARD8
  6656. Fexposures TBOOL
  6657. Flength TCARD16
  6658. Fwindow TCARD32
  6659. Fx TINT16
  6660. Fy TINT16
  6661. Fwidth TCARD16
  6662. Fheight TCARD16
  6663. }
  6664. type TxCopyAreaReq = struct {
  6665. FreqType TCARD8
  6666. Fpad TBYTE
  6667. Flength TCARD16
  6668. FsrcDrawable TCARD32
  6669. FdstDrawable TCARD32
  6670. Fgc TCARD32
  6671. FsrcX TINT16
  6672. FsrcY TINT16
  6673. FdstX TINT16
  6674. FdstY TINT16
  6675. Fwidth TCARD16
  6676. Fheight TCARD16
  6677. }
  6678. type TxCopyPlaneReq = struct {
  6679. FreqType TCARD8
  6680. Fpad TBYTE
  6681. Flength TCARD16
  6682. FsrcDrawable TCARD32
  6683. FdstDrawable TCARD32
  6684. Fgc TCARD32
  6685. FsrcX TINT16
  6686. FsrcY TINT16
  6687. FdstX TINT16
  6688. FdstY TINT16
  6689. Fwidth TCARD16
  6690. Fheight TCARD16
  6691. FbitPlane TCARD32
  6692. }
  6693. type TxPolyPointReq = struct {
  6694. FreqType TCARD8
  6695. FcoordMode TBYTE
  6696. Flength TCARD16
  6697. Fdrawable TCARD32
  6698. Fgc TCARD32
  6699. }
  6700. type TxPolyLineReq = struct {
  6701. FreqType TCARD8
  6702. FcoordMode TBYTE
  6703. Flength TCARD16
  6704. Fdrawable TCARD32
  6705. Fgc TCARD32
  6706. }
  6707. type TxPolySegmentReq = struct {
  6708. FreqType TCARD8
  6709. Fpad TBYTE
  6710. Flength TCARD16
  6711. Fdrawable TCARD32
  6712. Fgc TCARD32
  6713. }
  6714. type TxPolyArcReq = struct {
  6715. FreqType TCARD8
  6716. Fpad TBYTE
  6717. Flength TCARD16
  6718. Fdrawable TCARD32
  6719. Fgc TCARD32
  6720. }
  6721. type TxPolyRectangleReq = struct {
  6722. FreqType TCARD8
  6723. Fpad TBYTE
  6724. Flength TCARD16
  6725. Fdrawable TCARD32
  6726. Fgc TCARD32
  6727. }
  6728. type TxPolyFillRectangleReq = struct {
  6729. FreqType TCARD8
  6730. Fpad TBYTE
  6731. Flength TCARD16
  6732. Fdrawable TCARD32
  6733. Fgc TCARD32
  6734. }
  6735. type TxPolyFillArcReq = struct {
  6736. FreqType TCARD8
  6737. Fpad TBYTE
  6738. Flength TCARD16
  6739. Fdrawable TCARD32
  6740. Fgc TCARD32
  6741. }
  6742. type TxFillPolyReq = struct {
  6743. FreqType TCARD8
  6744. Fpad TBYTE
  6745. Flength TCARD16
  6746. Fdrawable TCARD32
  6747. Fgc TCARD32
  6748. Fshape TBYTE
  6749. FcoordMode TBYTE
  6750. Fpad1 TCARD16
  6751. }
  6752. type T_FillPolyReq = TxFillPolyReq
  6753. type TxPutImageReq = struct {
  6754. FreqType TCARD8
  6755. Fformat TCARD8
  6756. Flength TCARD16
  6757. Fdrawable TCARD32
  6758. Fgc TCARD32
  6759. Fwidth TCARD16
  6760. Fheight TCARD16
  6761. FdstX TINT16
  6762. FdstY TINT16
  6763. FleftPad TCARD8
  6764. Fdepth TCARD8
  6765. Fpad TCARD16
  6766. }
  6767. type T_PutImageReq = TxPutImageReq
  6768. type TxGetImageReq = struct {
  6769. FreqType TCARD8
  6770. Fformat TCARD8
  6771. Flength TCARD16
  6772. Fdrawable TCARD32
  6773. Fx TINT16
  6774. Fy TINT16
  6775. Fwidth TCARD16
  6776. Fheight TCARD16
  6777. FplaneMask TCARD32
  6778. }
  6779. type TxPolyTextReq = struct {
  6780. FreqType TCARD8
  6781. Fpad TCARD8
  6782. Flength TCARD16
  6783. Fdrawable TCARD32
  6784. Fgc TCARD32
  6785. Fx TINT16
  6786. Fy TINT16
  6787. }
  6788. type TxPolyText8Req = struct {
  6789. FreqType TCARD8
  6790. Fpad TCARD8
  6791. Flength TCARD16
  6792. Fdrawable TCARD32
  6793. Fgc TCARD32
  6794. Fx TINT16
  6795. Fy TINT16
  6796. }
  6797. type TxPolyText16Req = struct {
  6798. FreqType TCARD8
  6799. Fpad TCARD8
  6800. Flength TCARD16
  6801. Fdrawable TCARD32
  6802. Fgc TCARD32
  6803. Fx TINT16
  6804. Fy TINT16
  6805. }
  6806. type TxImageTextReq = struct {
  6807. FreqType TCARD8
  6808. FnChars TBYTE
  6809. Flength TCARD16
  6810. Fdrawable TCARD32
  6811. Fgc TCARD32
  6812. Fx TINT16
  6813. Fy TINT16
  6814. }
  6815. type TxImageText8Req = struct {
  6816. FreqType TCARD8
  6817. FnChars TBYTE
  6818. Flength TCARD16
  6819. Fdrawable TCARD32
  6820. Fgc TCARD32
  6821. Fx TINT16
  6822. Fy TINT16
  6823. }
  6824. type TxImageText16Req = struct {
  6825. FreqType TCARD8
  6826. FnChars TBYTE
  6827. Flength TCARD16
  6828. Fdrawable TCARD32
  6829. Fgc TCARD32
  6830. Fx TINT16
  6831. Fy TINT16
  6832. }
  6833. type TxCreateColormapReq = struct {
  6834. FreqType TCARD8
  6835. Falloc TBYTE
  6836. Flength TCARD16
  6837. Fmid TCARD32
  6838. Fwindow TCARD32
  6839. Fvisual TCARD32
  6840. }
  6841. type TxCopyColormapAndFreeReq = struct {
  6842. FreqType TCARD8
  6843. Fpad TBYTE
  6844. Flength TCARD16
  6845. Fmid TCARD32
  6846. FsrcCmap TCARD32
  6847. }
  6848. type TxAllocColorReq = struct {
  6849. FreqType TCARD8
  6850. Fpad TBYTE
  6851. Flength TCARD16
  6852. Fcmap TCARD32
  6853. Fred TCARD16
  6854. Fgreen TCARD16
  6855. Fblue TCARD16
  6856. Fpad2 TCARD16
  6857. }
  6858. type TxAllocNamedColorReq = struct {
  6859. FreqType TCARD8
  6860. Fpad TBYTE
  6861. Flength TCARD16
  6862. Fcmap TCARD32
  6863. Fnbytes TCARD16
  6864. Fpad1 TBYTE
  6865. Fpad2 TBYTE
  6866. }
  6867. type TxAllocColorCellsReq = struct {
  6868. FreqType TCARD8
  6869. Fcontiguous TBOOL
  6870. Flength TCARD16
  6871. Fcmap TCARD32
  6872. Fcolors TCARD16
  6873. Fplanes TCARD16
  6874. }
  6875. type TxAllocColorPlanesReq = struct {
  6876. FreqType TCARD8
  6877. Fcontiguous TBOOL
  6878. Flength TCARD16
  6879. Fcmap TCARD32
  6880. Fcolors TCARD16
  6881. Fred TCARD16
  6882. Fgreen TCARD16
  6883. Fblue TCARD16
  6884. }
  6885. type TxFreeColorsReq = struct {
  6886. FreqType TCARD8
  6887. Fpad TBYTE
  6888. Flength TCARD16
  6889. Fcmap TCARD32
  6890. FplaneMask TCARD32
  6891. }
  6892. type TxStoreColorsReq = struct {
  6893. FreqType TCARD8
  6894. Fpad TBYTE
  6895. Flength TCARD16
  6896. Fcmap TCARD32
  6897. }
  6898. type TxStoreNamedColorReq = struct {
  6899. FreqType TCARD8
  6900. Fflags TCARD8
  6901. Flength TCARD16
  6902. Fcmap TCARD32
  6903. Fpixel TCARD32
  6904. Fnbytes TCARD16
  6905. Fpad1 TBYTE
  6906. Fpad2 TBYTE
  6907. }
  6908. type TxQueryColorsReq = struct {
  6909. FreqType TCARD8
  6910. Fpad TBYTE
  6911. Flength TCARD16
  6912. Fcmap TCARD32
  6913. }
  6914. type TxLookupColorReq = struct {
  6915. FreqType TCARD8
  6916. Fpad TBYTE
  6917. Flength TCARD16
  6918. Fcmap TCARD32
  6919. Fnbytes TCARD16
  6920. Fpad1 TBYTE
  6921. Fpad2 TBYTE
  6922. }
  6923. type TxCreateCursorReq = struct {
  6924. FreqType TCARD8
  6925. Fpad TBYTE
  6926. Flength TCARD16
  6927. Fcid TCARD32
  6928. Fsource TCARD32
  6929. Fmask TCARD32
  6930. FforeRed TCARD16
  6931. FforeGreen TCARD16
  6932. FforeBlue TCARD16
  6933. FbackRed TCARD16
  6934. FbackGreen TCARD16
  6935. FbackBlue TCARD16
  6936. Fx TCARD16
  6937. Fy TCARD16
  6938. }
  6939. type TxCreateGlyphCursorReq = struct {
  6940. FreqType TCARD8
  6941. Fpad TBYTE
  6942. Flength TCARD16
  6943. Fcid TCARD32
  6944. Fsource TCARD32
  6945. Fmask TCARD32
  6946. FsourceChar TCARD16
  6947. FmaskChar TCARD16
  6948. FforeRed TCARD16
  6949. FforeGreen TCARD16
  6950. FforeBlue TCARD16
  6951. FbackRed TCARD16
  6952. FbackGreen TCARD16
  6953. FbackBlue TCARD16
  6954. }
  6955. type TxRecolorCursorReq = struct {
  6956. FreqType TCARD8
  6957. Fpad TBYTE
  6958. Flength TCARD16
  6959. Fcursor TCARD32
  6960. FforeRed TCARD16
  6961. FforeGreen TCARD16
  6962. FforeBlue TCARD16
  6963. FbackRed TCARD16
  6964. FbackGreen TCARD16
  6965. FbackBlue TCARD16
  6966. }
  6967. type TxQueryBestSizeReq = struct {
  6968. FreqType TCARD8
  6969. Fclass TCARD8
  6970. Flength TCARD16
  6971. Fdrawable TCARD32
  6972. Fwidth TCARD16
  6973. Fheight TCARD16
  6974. }
  6975. type TxQueryExtensionReq = struct {
  6976. FreqType TCARD8
  6977. Fpad TBYTE
  6978. Flength TCARD16
  6979. Fnbytes TCARD16
  6980. Fpad1 TBYTE
  6981. Fpad2 TBYTE
  6982. }
  6983. type TxSetModifierMappingReq = struct {
  6984. FreqType TCARD8
  6985. FnumKeyPerModifier TCARD8
  6986. Flength TCARD16
  6987. }
  6988. type TxSetPointerMappingReq = struct {
  6989. FreqType TCARD8
  6990. FnElts TCARD8
  6991. Flength TCARD16
  6992. }
  6993. type TxGetKeyboardMappingReq = struct {
  6994. FreqType TCARD8
  6995. Fpad TBYTE
  6996. Flength TCARD16
  6997. FfirstKeyCode TCARD8
  6998. Fcount TCARD8
  6999. Fpad1 TCARD16
  7000. }
  7001. type TxChangeKeyboardMappingReq = struct {
  7002. FreqType TCARD8
  7003. FkeyCodes TCARD8
  7004. Flength TCARD16
  7005. FfirstKeyCode TCARD8
  7006. FkeySymsPerKeyCode TCARD8
  7007. Fpad1 TCARD16
  7008. }
  7009. type TxChangeKeyboardControlReq = struct {
  7010. FreqType TCARD8
  7011. Fpad TBYTE
  7012. Flength TCARD16
  7013. Fmask TCARD32
  7014. }
  7015. type TxBellReq = struct {
  7016. FreqType TCARD8
  7017. Fpercent TINT8
  7018. Flength TCARD16
  7019. }
  7020. type TxChangePointerControlReq = struct {
  7021. FreqType TCARD8
  7022. Fpad TBYTE
  7023. Flength TCARD16
  7024. FaccelNum TINT16
  7025. FaccelDenum TINT16
  7026. Fthreshold TINT16
  7027. FdoAccel TBOOL
  7028. FdoThresh TBOOL
  7029. }
  7030. type TxSetScreenSaverReq = struct {
  7031. FreqType TCARD8
  7032. Fpad TBYTE
  7033. Flength TCARD16
  7034. Ftimeout TINT16
  7035. Finterval TINT16
  7036. FpreferBlank TBYTE
  7037. FallowExpose TBYTE
  7038. Fpad2 TCARD16
  7039. }
  7040. type TxChangeHostsReq = struct {
  7041. FreqType TCARD8
  7042. Fmode TBYTE
  7043. Flength TCARD16
  7044. FhostFamily TCARD8
  7045. Fpad TBYTE
  7046. FhostLength TCARD16
  7047. }
  7048. type TxListHostsReq = struct {
  7049. FreqType TCARD8
  7050. Fpad TBYTE
  7051. Flength TCARD16
  7052. }
  7053. type TxChangeModeReq = struct {
  7054. FreqType TCARD8
  7055. Fmode TBYTE
  7056. Flength TCARD16
  7057. }
  7058. type TxSetAccessControlReq = struct {
  7059. FreqType TCARD8
  7060. Fmode TBYTE
  7061. Flength TCARD16
  7062. }
  7063. type TxSetCloseDownModeReq = struct {
  7064. FreqType TCARD8
  7065. Fmode TBYTE
  7066. Flength TCARD16
  7067. }
  7068. type TxForceScreenSaverReq = struct {
  7069. FreqType TCARD8
  7070. Fmode TBYTE
  7071. Flength TCARD16
  7072. }
  7073. type TxRotatePropertiesReq = struct {
  7074. FreqType TCARD8
  7075. Fpad TBYTE
  7076. Flength TCARD16
  7077. Fwindow TCARD32
  7078. FnAtoms TCARD16
  7079. FnPositions TINT16
  7080. }
  7081. type Tsched_param = struct {
  7082. Fsched_priority int32
  7083. F__reserved1 int32
  7084. F__reserved2 [2]struct {
  7085. F__reserved1 Ttime_t
  7086. F__reserved2 int64
  7087. }
  7088. F__reserved3 int32
  7089. }
  7090. type Tcpu_set_t = struct {
  7091. F__bits [16]uint64
  7092. }
  7093. type Ttm = struct {
  7094. Ftm_sec int32
  7095. Ftm_min int32
  7096. Ftm_hour int32
  7097. Ftm_mday int32
  7098. Ftm_mon int32
  7099. Ftm_year int32
  7100. Ftm_wday int32
  7101. Ftm_yday int32
  7102. Ftm_isdst int32
  7103. Ftm_gmtoff int64
  7104. Ftm_zone uintptr
  7105. }
  7106. type Titimerspec = struct {
  7107. Fit_interval Ttimespec
  7108. Fit_value Ttimespec
  7109. }
  7110. type t__ptcb = struct {
  7111. F__f uintptr
  7112. F__x uintptr
  7113. F__next uintptr
  7114. }
  7115. type Tcpu_set_t1 = struct {
  7116. F__bits [16]uint64
  7117. }
  7118. type Txthread_t = uintptr
  7119. type Txthread_key_t = uint32
  7120. type Txcondition_rec = struct {
  7121. F__u struct {
  7122. F__vi [0][12]int32
  7123. F__p [0][6]uintptr
  7124. F__i [12]int32
  7125. }
  7126. }
  7127. type Txmutex_rec = struct {
  7128. F__u struct {
  7129. F__vi [0][10]int32
  7130. F__p [0][5]uintptr
  7131. F__i [10]int32
  7132. }
  7133. }
  7134. type Txcondition_t = uintptr
  7135. type Txmutex_t = uintptr
  7136. type T_XQEvent = struct {
  7137. Fnext uintptr
  7138. Fevent TXEvent
  7139. Fqserial_num uint64
  7140. }
  7141. type T_XSQEvent = T_XQEvent
  7142. type TLockInfoPtr = uintptr
  7143. type T_XLockPtrs = struct {
  7144. Flock_display uintptr
  7145. Funlock_display uintptr
  7146. }
  7147. type T_XAsyncHandler = struct {
  7148. Fnext uintptr
  7149. Fhandler uintptr
  7150. Fdata TXPointer
  7151. }
  7152. type T_XInternalAsync = T_XAsyncHandler
  7153. type T_XAsyncErrorState = struct {
  7154. Fmin_sequence_number uint64
  7155. Fmax_sequence_number uint64
  7156. Ferror_code uint8
  7157. Fmajor_opcode uint8
  7158. Fminor_opcode uint16
  7159. Flast_error_received uint8
  7160. Ferror_count int32
  7161. }
  7162. type T_XAsyncEState = T_XAsyncErrorState
  7163. type TFreeFuncType = uintptr
  7164. type TFreeModmapType = uintptr
  7165. type T_XFreeFuncRec = struct {
  7166. Fatoms TFreeFuncType
  7167. Fmodifiermap TFreeModmapType
  7168. Fkey_bindings TFreeFuncType
  7169. Fcontext_db TFreeFuncType
  7170. FdefaultCCCs TFreeFuncType
  7171. FclientCmaps TFreeFuncType
  7172. FintensityMaps TFreeFuncType
  7173. Fim_filters TFreeFuncType
  7174. Fxkb TFreeFuncType
  7175. }
  7176. type T_XFreeFuncs = T_XFreeFuncRec
  7177. type TCreateGCType = uintptr
  7178. type TCopyGCType = uintptr
  7179. type TFlushGCType = uintptr
  7180. type TFreeGCType = uintptr
  7181. type TCreateFontType = uintptr
  7182. type TFreeFontType = uintptr
  7183. type TCloseDisplayType = uintptr
  7184. type TErrorType = uintptr
  7185. type TErrorStringType = uintptr
  7186. type TPrintErrorType = uintptr
  7187. type TBeforeFlushType = uintptr
  7188. type T_XExtension = struct {
  7189. Fnext uintptr
  7190. Fcodes TXExtCodes
  7191. Fcreate_GC TCreateGCType
  7192. Fcopy_GC TCopyGCType
  7193. Fflush_GC TFlushGCType
  7194. Ffree_GC TFreeGCType
  7195. Fcreate_Font TCreateFontType
  7196. Ffree_Font TFreeFontType
  7197. Fclose_display TCloseDisplayType
  7198. Ferror1 TErrorType
  7199. Ferror_string TErrorStringType
  7200. Fname uintptr
  7201. Ferror_values TPrintErrorType
  7202. Fbefore_flush TBeforeFlushType
  7203. Fnext_flush uintptr
  7204. }
  7205. type T_XExten = T_XExtension
  7206. type T_XInternalConnectionProc = uintptr
  7207. type T_XConnectionInfo = struct {
  7208. Ffd int32
  7209. Fread_callback T_XInternalConnectionProc
  7210. Fcall_data TXPointer
  7211. Fwatch_data uintptr
  7212. Fnext uintptr
  7213. }
  7214. type T_XConnWatchInfo = struct {
  7215. Ffn TXConnectionWatchProc
  7216. Fclient_data TXPointer
  7217. Fnext uintptr
  7218. }
  7219. type t__jmp_buf = [26]uint64
  7220. type Tjmp_buf = [1]t__jmp_buf_tag
  7221. type t__jmp_buf_tag = struct {
  7222. F__jb t__jmp_buf
  7223. F__fl uint64
  7224. F__ss [16]uint64
  7225. }
  7226. type Tsigjmp_buf = [1]t__jmp_buf_tag
  7227. type TFT_Int16 = int16
  7228. type TFT_UInt16 = uint16
  7229. type TFT_Int32 = int32
  7230. type TFT_UInt32 = uint32
  7231. type TFT_Fast = int32
  7232. type TFT_UFast = uint32
  7233. type TFT_Int64 = int64
  7234. type TFT_UInt64 = uint64
  7235. type TFT_Memory = uintptr
  7236. type TFT_MemoryRec_ = struct {
  7237. Fuser uintptr
  7238. Falloc TFT_Alloc_Func
  7239. Ffree TFT_Free_Func
  7240. Frealloc TFT_Realloc_Func
  7241. }
  7242. type TFT_Alloc_Func = uintptr
  7243. type TFT_Free_Func = uintptr
  7244. type TFT_Realloc_Func = uintptr
  7245. type TFT_Stream = uintptr
  7246. type TFT_StreamRec_ = struct {
  7247. Fbase uintptr
  7248. Fsize uint64
  7249. Fpos uint64
  7250. Fdescriptor TFT_StreamDesc
  7251. Fpathname TFT_StreamDesc
  7252. Fread TFT_Stream_IoFunc
  7253. Fclose1 TFT_Stream_CloseFunc
  7254. Fmemory TFT_Memory
  7255. Fcursor uintptr
  7256. Flimit uintptr
  7257. }
  7258. type TFT_StreamDesc = struct {
  7259. Fpointer [0]uintptr
  7260. Fvalue int64
  7261. }
  7262. type TFT_StreamDesc_ = TFT_StreamDesc
  7263. type TFT_Stream_IoFunc = uintptr
  7264. type TFT_Stream_CloseFunc = uintptr
  7265. type TFT_StreamRec = struct {
  7266. Fbase uintptr
  7267. Fsize uint64
  7268. Fpos uint64
  7269. Fdescriptor TFT_StreamDesc
  7270. Fpathname TFT_StreamDesc
  7271. Fread TFT_Stream_IoFunc
  7272. Fclose1 TFT_Stream_CloseFunc
  7273. Fmemory TFT_Memory
  7274. Fcursor uintptr
  7275. Flimit uintptr
  7276. }
  7277. type TFT_Pos = int64
  7278. type TFT_Vector = struct {
  7279. Fx TFT_Pos
  7280. Fy TFT_Pos
  7281. }
  7282. type TFT_Vector_ = TFT_Vector
  7283. type TFT_BBox = struct {
  7284. FxMin TFT_Pos
  7285. FyMin TFT_Pos
  7286. FxMax TFT_Pos
  7287. FyMax TFT_Pos
  7288. }
  7289. type TFT_BBox_ = TFT_BBox
  7290. type TFT_Pixel_Mode = int32
  7291. type _FT_Pixel_Mode_ = int32
  7292. const _FT_PIXEL_MODE_NONE = 0
  7293. const _FT_PIXEL_MODE_MONO = 1
  7294. const _FT_PIXEL_MODE_GRAY = 2
  7295. const _FT_PIXEL_MODE_GRAY2 = 3
  7296. const _FT_PIXEL_MODE_GRAY4 = 4
  7297. const _FT_PIXEL_MODE_LCD = 5
  7298. const _FT_PIXEL_MODE_LCD_V = 6
  7299. const _FT_PIXEL_MODE_BGRA = 7
  7300. const _FT_PIXEL_MODE_MAX = 8
  7301. type TFT_Bitmap = struct {
  7302. Frows uint32
  7303. Fwidth uint32
  7304. Fpitch int32
  7305. Fbuffer uintptr
  7306. Fnum_grays uint16
  7307. Fpixel_mode uint8
  7308. Fpalette_mode uint8
  7309. Fpalette uintptr
  7310. }
  7311. type TFT_Bitmap_ = TFT_Bitmap
  7312. type TFT_Outline = struct {
  7313. Fn_contours int16
  7314. Fn_points int16
  7315. Fpoints uintptr
  7316. Ftags uintptr
  7317. Fcontours uintptr
  7318. Fflags int32
  7319. }
  7320. type TFT_Outline_ = TFT_Outline
  7321. type TFT_Outline_MoveToFunc = uintptr
  7322. type TFT_Outline_LineToFunc = uintptr
  7323. type TFT_Outline_ConicToFunc = uintptr
  7324. type TFT_Outline_CubicToFunc = uintptr
  7325. type TFT_Outline_Funcs = struct {
  7326. Fmove_to TFT_Outline_MoveToFunc
  7327. Fline_to TFT_Outline_LineToFunc
  7328. Fconic_to TFT_Outline_ConicToFunc
  7329. Fcubic_to TFT_Outline_CubicToFunc
  7330. Fshift int32
  7331. Fdelta TFT_Pos
  7332. }
  7333. type TFT_Outline_Funcs_ = TFT_Outline_Funcs
  7334. type TFT_Glyph_Format = int32
  7335. type _FT_Glyph_Format_ = int32
  7336. const _FT_GLYPH_FORMAT_NONE = 0
  7337. const _FT_GLYPH_FORMAT_COMPOSITE = 1668246896
  7338. const _FT_GLYPH_FORMAT_BITMAP = 1651078259
  7339. const _FT_GLYPH_FORMAT_OUTLINE = 1869968492
  7340. const _FT_GLYPH_FORMAT_PLOTTER = 1886154612
  7341. const _FT_GLYPH_FORMAT_SVG = 1398163232
  7342. type TFT_Span = struct {
  7343. Fx int16
  7344. Flen1 uint16
  7345. Fcoverage uint8
  7346. }
  7347. type TFT_Span_ = TFT_Span
  7348. type TFT_SpanFunc = uintptr
  7349. type TFT_Raster_BitTest_Func = uintptr
  7350. type TFT_Raster_BitSet_Func = uintptr
  7351. type TFT_Raster_Params = struct {
  7352. Ftarget uintptr
  7353. Fsource uintptr
  7354. Fflags int32
  7355. Fgray_spans TFT_SpanFunc
  7356. Fblack_spans TFT_SpanFunc
  7357. Fbit_test TFT_Raster_BitTest_Func
  7358. Fbit_set TFT_Raster_BitSet_Func
  7359. Fuser uintptr
  7360. Fclip_box TFT_BBox
  7361. }
  7362. type TFT_Raster_Params_ = TFT_Raster_Params
  7363. type TFT_Raster = uintptr
  7364. type TFT_Raster_NewFunc = uintptr
  7365. type TFT_Raster_DoneFunc = uintptr
  7366. type TFT_Raster_ResetFunc = uintptr
  7367. type TFT_Raster_SetModeFunc = uintptr
  7368. type TFT_Raster_RenderFunc = uintptr
  7369. type TFT_Raster_Funcs = struct {
  7370. Fglyph_format TFT_Glyph_Format
  7371. Fraster_new TFT_Raster_NewFunc
  7372. Fraster_reset TFT_Raster_ResetFunc
  7373. Fraster_set_mode TFT_Raster_SetModeFunc
  7374. Fraster_render TFT_Raster_RenderFunc
  7375. Fraster_done TFT_Raster_DoneFunc
  7376. }
  7377. type TFT_Raster_Funcs_ = TFT_Raster_Funcs
  7378. type TFT_Bool = uint8
  7379. type TFT_FWord = int16
  7380. type TFT_UFWord = uint16
  7381. type TFT_Char = int8
  7382. type TFT_Byte = uint8
  7383. type TFT_Bytes = uintptr
  7384. type TFT_Tag = uint32
  7385. type TFT_String = uint8
  7386. type TFT_Short = int16
  7387. type TFT_UShort = uint16
  7388. type TFT_Int = int32
  7389. type TFT_UInt = uint32
  7390. type TFT_Long = int64
  7391. type TFT_ULong = uint64
  7392. type TFT_F2Dot14 = int16
  7393. type TFT_F26Dot6 = int64
  7394. type TFT_Fixed = int64
  7395. type TFT_Error = int32
  7396. type TFT_Pointer = uintptr
  7397. type TFT_Offset = uint64
  7398. type TFT_PtrDist = int64
  7399. type TFT_UnitVector = struct {
  7400. Fx TFT_F2Dot14
  7401. Fy TFT_F2Dot14
  7402. }
  7403. type TFT_UnitVector_ = TFT_UnitVector
  7404. type TFT_Matrix = struct {
  7405. Fxx TFT_Fixed
  7406. Fxy TFT_Fixed
  7407. Fyx TFT_Fixed
  7408. Fyy TFT_Fixed
  7409. }
  7410. type TFT_Matrix_ = TFT_Matrix
  7411. type TFT_Data = struct {
  7412. Fpointer uintptr
  7413. Flength TFT_UInt
  7414. }
  7415. type TFT_Data_ = TFT_Data
  7416. type TFT_Generic_Finalizer = uintptr
  7417. type TFT_Generic = struct {
  7418. Fdata uintptr
  7419. Ffinalizer TFT_Generic_Finalizer
  7420. }
  7421. type TFT_Generic_ = TFT_Generic
  7422. type TFT_ListNode = uintptr
  7423. type TFT_ListNodeRec_ = struct {
  7424. Fprev TFT_ListNode
  7425. Fnext TFT_ListNode
  7426. Fdata uintptr
  7427. }
  7428. type TFT_List = uintptr
  7429. type TFT_ListRec_ = struct {
  7430. Fhead TFT_ListNode
  7431. Ftail TFT_ListNode
  7432. }
  7433. type TFT_ListNodeRec = struct {
  7434. Fprev TFT_ListNode
  7435. Fnext TFT_ListNode
  7436. Fdata uintptr
  7437. }
  7438. type TFT_ListRec = struct {
  7439. Fhead TFT_ListNode
  7440. Ftail TFT_ListNode
  7441. }
  7442. const _FT_Mod_Err_Base = 0
  7443. const _FT_Mod_Err_Autofit = 0
  7444. const _FT_Mod_Err_BDF = 0
  7445. const _FT_Mod_Err_Bzip2 = 0
  7446. const _FT_Mod_Err_Cache = 0
  7447. const _FT_Mod_Err_CFF = 0
  7448. const _FT_Mod_Err_CID = 0
  7449. const _FT_Mod_Err_Gzip = 0
  7450. const _FT_Mod_Err_LZW = 0
  7451. const _FT_Mod_Err_OTvalid = 0
  7452. const _FT_Mod_Err_PCF = 0
  7453. const _FT_Mod_Err_PFR = 0
  7454. const _FT_Mod_Err_PSaux = 0
  7455. const _FT_Mod_Err_PShinter = 0
  7456. const _FT_Mod_Err_PSnames = 0
  7457. const _FT_Mod_Err_Raster = 0
  7458. const _FT_Mod_Err_SFNT = 0
  7459. const _FT_Mod_Err_Smooth = 0
  7460. const _FT_Mod_Err_TrueType = 0
  7461. const _FT_Mod_Err_Type1 = 0
  7462. const _FT_Mod_Err_Type42 = 0
  7463. const _FT_Mod_Err_Winfonts = 0
  7464. const _FT_Mod_Err_GXvalid = 0
  7465. const _FT_Mod_Err_Sdf = 0
  7466. const _FT_Mod_Err_Max = 1
  7467. const _FT_Err_Ok = 0
  7468. const _FT_Err_Cannot_Open_Resource = 1
  7469. const _FT_Err_Unknown_File_Format = 2
  7470. const _FT_Err_Invalid_File_Format = 3
  7471. const _FT_Err_Invalid_Version = 4
  7472. const _FT_Err_Lower_Module_Version = 5
  7473. const _FT_Err_Invalid_Argument = 6
  7474. const _FT_Err_Unimplemented_Feature = 7
  7475. const _FT_Err_Invalid_Table = 8
  7476. const _FT_Err_Invalid_Offset = 9
  7477. const _FT_Err_Array_Too_Large = 10
  7478. const _FT_Err_Missing_Module = 11
  7479. const _FT_Err_Missing_Property = 12
  7480. const _FT_Err_Invalid_Glyph_Index = 16
  7481. const _FT_Err_Invalid_Character_Code = 17
  7482. const _FT_Err_Invalid_Glyph_Format = 18
  7483. const _FT_Err_Cannot_Render_Glyph = 19
  7484. const _FT_Err_Invalid_Outline = 20
  7485. const _FT_Err_Invalid_Composite = 21
  7486. const _FT_Err_Too_Many_Hints = 22
  7487. const _FT_Err_Invalid_Pixel_Size = 23
  7488. const _FT_Err_Invalid_SVG_Document = 24
  7489. const _FT_Err_Invalid_Handle = 32
  7490. const _FT_Err_Invalid_Library_Handle = 33
  7491. const _FT_Err_Invalid_Driver_Handle = 34
  7492. const _FT_Err_Invalid_Face_Handle = 35
  7493. const _FT_Err_Invalid_Size_Handle = 36
  7494. const _FT_Err_Invalid_Slot_Handle = 37
  7495. const _FT_Err_Invalid_CharMap_Handle = 38
  7496. const _FT_Err_Invalid_Cache_Handle = 39
  7497. const _FT_Err_Invalid_Stream_Handle = 40
  7498. const _FT_Err_Too_Many_Drivers = 48
  7499. const _FT_Err_Too_Many_Extensions = 49
  7500. const _FT_Err_Out_Of_Memory = 64
  7501. const _FT_Err_Unlisted_Object = 65
  7502. const _FT_Err_Cannot_Open_Stream = 81
  7503. const _FT_Err_Invalid_Stream_Seek = 82
  7504. const _FT_Err_Invalid_Stream_Skip = 83
  7505. const _FT_Err_Invalid_Stream_Read = 84
  7506. const _FT_Err_Invalid_Stream_Operation = 85
  7507. const _FT_Err_Invalid_Frame_Operation = 86
  7508. const _FT_Err_Nested_Frame_Access = 87
  7509. const _FT_Err_Invalid_Frame_Read = 88
  7510. const _FT_Err_Raster_Uninitialized = 96
  7511. const _FT_Err_Raster_Corrupted = 97
  7512. const _FT_Err_Raster_Overflow = 98
  7513. const _FT_Err_Raster_Negative_Height = 99
  7514. const _FT_Err_Too_Many_Caches = 112
  7515. const _FT_Err_Invalid_Opcode = 128
  7516. const _FT_Err_Too_Few_Arguments = 129
  7517. const _FT_Err_Stack_Overflow = 130
  7518. const _FT_Err_Code_Overflow = 131
  7519. const _FT_Err_Bad_Argument = 132
  7520. const _FT_Err_Divide_By_Zero = 133
  7521. const _FT_Err_Invalid_Reference = 134
  7522. const _FT_Err_Debug_OpCode = 135
  7523. const _FT_Err_ENDF_In_Exec_Stream = 136
  7524. const _FT_Err_Nested_DEFS = 137
  7525. const _FT_Err_Invalid_CodeRange = 138
  7526. const _FT_Err_Execution_Too_Long = 139
  7527. const _FT_Err_Too_Many_Function_Defs = 140
  7528. const _FT_Err_Too_Many_Instruction_Defs = 141
  7529. const _FT_Err_Table_Missing = 142
  7530. const _FT_Err_Horiz_Header_Missing = 143
  7531. const _FT_Err_Locations_Missing = 144
  7532. const _FT_Err_Name_Table_Missing = 145
  7533. const _FT_Err_CMap_Table_Missing = 146
  7534. const _FT_Err_Hmtx_Table_Missing = 147
  7535. const _FT_Err_Post_Table_Missing = 148
  7536. const _FT_Err_Invalid_Horiz_Metrics = 149
  7537. const _FT_Err_Invalid_CharMap_Format = 150
  7538. const _FT_Err_Invalid_PPem = 151
  7539. const _FT_Err_Invalid_Vert_Metrics = 152
  7540. const _FT_Err_Could_Not_Find_Context = 153
  7541. const _FT_Err_Invalid_Post_Table_Format = 154
  7542. const _FT_Err_Invalid_Post_Table = 155
  7543. const _FT_Err_DEF_In_Glyf_Bytecode = 156
  7544. const _FT_Err_Missing_Bitmap = 157
  7545. const _FT_Err_Missing_SVG_Hooks = 158
  7546. const _FT_Err_Syntax_Error = 160
  7547. const _FT_Err_Stack_Underflow = 161
  7548. const _FT_Err_Ignore = 162
  7549. const _FT_Err_No_Unicode_Glyph_Name = 163
  7550. const _FT_Err_Glyph_Too_Big = 164
  7551. const _FT_Err_Missing_Startfont_Field = 176
  7552. const _FT_Err_Missing_Font_Field = 177
  7553. const _FT_Err_Missing_Size_Field = 178
  7554. const _FT_Err_Missing_Fontboundingbox_Field = 179
  7555. const _FT_Err_Missing_Chars_Field = 180
  7556. const _FT_Err_Missing_Startchar_Field = 181
  7557. const _FT_Err_Missing_Encoding_Field = 182
  7558. const _FT_Err_Missing_Bbx_Field = 183
  7559. const _FT_Err_Bbx_Too_Big = 184
  7560. const _FT_Err_Corrupted_Font_Header = 185
  7561. const _FT_Err_Corrupted_Font_Glyphs = 186
  7562. const _FT_Err_Max = 187
  7563. type TFT_Glyph_Metrics = struct {
  7564. Fwidth TFT_Pos
  7565. Fheight TFT_Pos
  7566. FhoriBearingX TFT_Pos
  7567. FhoriBearingY TFT_Pos
  7568. FhoriAdvance TFT_Pos
  7569. FvertBearingX TFT_Pos
  7570. FvertBearingY TFT_Pos
  7571. FvertAdvance TFT_Pos
  7572. }
  7573. type TFT_Glyph_Metrics_ = TFT_Glyph_Metrics
  7574. type TFT_Bitmap_Size = struct {
  7575. Fheight TFT_Short
  7576. Fwidth TFT_Short
  7577. Fsize TFT_Pos
  7578. Fx_ppem TFT_Pos
  7579. Fy_ppem TFT_Pos
  7580. }
  7581. type TFT_Bitmap_Size_ = TFT_Bitmap_Size
  7582. type TFT_Library = uintptr
  7583. type TFT_Module = uintptr
  7584. type TFT_Driver = uintptr
  7585. type TFT_Renderer = uintptr
  7586. type TFT_Face = uintptr
  7587. type TFT_FaceRec_ = struct {
  7588. Fnum_faces TFT_Long
  7589. Fface_index TFT_Long
  7590. Fface_flags TFT_Long
  7591. Fstyle_flags TFT_Long
  7592. Fnum_glyphs TFT_Long
  7593. Ffamily_name uintptr
  7594. Fstyle_name uintptr
  7595. Fnum_fixed_sizes TFT_Int
  7596. Favailable_sizes uintptr
  7597. Fnum_charmaps TFT_Int
  7598. Fcharmaps uintptr
  7599. Fgeneric TFT_Generic
  7600. Fbbox TFT_BBox
  7601. Funits_per_EM TFT_UShort
  7602. Fascender TFT_Short
  7603. Fdescender TFT_Short
  7604. Fheight TFT_Short
  7605. Fmax_advance_width TFT_Short
  7606. Fmax_advance_height TFT_Short
  7607. Funderline_position TFT_Short
  7608. Funderline_thickness TFT_Short
  7609. Fglyph TFT_GlyphSlot
  7610. Fsize TFT_Size
  7611. Fcharmap TFT_CharMap
  7612. Fdriver TFT_Driver
  7613. Fmemory TFT_Memory
  7614. Fstream TFT_Stream
  7615. Fsizes_list TFT_ListRec
  7616. Fautohint TFT_Generic
  7617. Fextensions uintptr
  7618. Finternal TFT_Face_Internal
  7619. }
  7620. type TFT_Size = uintptr
  7621. type TFT_SizeRec_ = struct {
  7622. Fface TFT_Face
  7623. Fgeneric TFT_Generic
  7624. Fmetrics TFT_Size_Metrics
  7625. Finternal TFT_Size_Internal
  7626. }
  7627. type TFT_GlyphSlot = uintptr
  7628. type TFT_GlyphSlotRec_ = struct {
  7629. Flibrary TFT_Library
  7630. Fface TFT_Face
  7631. Fnext TFT_GlyphSlot
  7632. Fglyph_index TFT_UInt
  7633. Fgeneric TFT_Generic
  7634. Fmetrics TFT_Glyph_Metrics
  7635. FlinearHoriAdvance TFT_Fixed
  7636. FlinearVertAdvance TFT_Fixed
  7637. Fadvance TFT_Vector
  7638. Fformat TFT_Glyph_Format
  7639. Fbitmap TFT_Bitmap
  7640. Fbitmap_left TFT_Int
  7641. Fbitmap_top TFT_Int
  7642. Foutline TFT_Outline
  7643. Fnum_subglyphs TFT_UInt
  7644. Fsubglyphs TFT_SubGlyph
  7645. Fcontrol_data uintptr
  7646. Fcontrol_len int64
  7647. Flsb_delta TFT_Pos
  7648. Frsb_delta TFT_Pos
  7649. Fother uintptr
  7650. Finternal TFT_Slot_Internal
  7651. }
  7652. type TFT_CharMap = uintptr
  7653. type TFT_CharMapRec_ = struct {
  7654. Fface TFT_Face
  7655. Fencoding TFT_Encoding
  7656. Fplatform_id TFT_UShort
  7657. Fencoding_id TFT_UShort
  7658. }
  7659. type _FT_Encoding_ = int32
  7660. const _FT_ENCODING_NONE = 0
  7661. const _FT_ENCODING_MS_SYMBOL = 1937337698
  7662. const _FT_ENCODING_UNICODE = 1970170211
  7663. const _FT_ENCODING_SJIS = 1936353651
  7664. const _FT_ENCODING_PRC = 1734484000
  7665. const _FT_ENCODING_BIG5 = 1651074869
  7666. const _FT_ENCODING_WANSUNG = 2002873971
  7667. const _FT_ENCODING_JOHAB = 1785686113
  7668. const _FT_ENCODING_GB2312 = 1734484000
  7669. const _FT_ENCODING_MS_SJIS = 1936353651
  7670. const _FT_ENCODING_MS_GB2312 = 1734484000
  7671. const _FT_ENCODING_MS_BIG5 = 1651074869
  7672. const _FT_ENCODING_MS_WANSUNG = 2002873971
  7673. const _FT_ENCODING_MS_JOHAB = 1785686113
  7674. const _FT_ENCODING_ADOBE_STANDARD = 1094995778
  7675. const _FT_ENCODING_ADOBE_EXPERT = 1094992453
  7676. const _FT_ENCODING_ADOBE_CUSTOM = 1094992451
  7677. const _FT_ENCODING_ADOBE_LATIN_1 = 1818326065
  7678. const _FT_ENCODING_OLD_LATIN_2 = 1818326066
  7679. const _FT_ENCODING_APPLE_ROMAN = 1634889070
  7680. type TFT_Encoding = int32
  7681. type TFT_CharMapRec = struct {
  7682. Fface TFT_Face
  7683. Fencoding TFT_Encoding
  7684. Fplatform_id TFT_UShort
  7685. Fencoding_id TFT_UShort
  7686. }
  7687. type TFT_Face_Internal = uintptr
  7688. type TFT_FaceRec = struct {
  7689. Fnum_faces TFT_Long
  7690. Fface_index TFT_Long
  7691. Fface_flags TFT_Long
  7692. Fstyle_flags TFT_Long
  7693. Fnum_glyphs TFT_Long
  7694. Ffamily_name uintptr
  7695. Fstyle_name uintptr
  7696. Fnum_fixed_sizes TFT_Int
  7697. Favailable_sizes uintptr
  7698. Fnum_charmaps TFT_Int
  7699. Fcharmaps uintptr
  7700. Fgeneric TFT_Generic
  7701. Fbbox TFT_BBox
  7702. Funits_per_EM TFT_UShort
  7703. Fascender TFT_Short
  7704. Fdescender TFT_Short
  7705. Fheight TFT_Short
  7706. Fmax_advance_width TFT_Short
  7707. Fmax_advance_height TFT_Short
  7708. Funderline_position TFT_Short
  7709. Funderline_thickness TFT_Short
  7710. Fglyph TFT_GlyphSlot
  7711. Fsize TFT_Size
  7712. Fcharmap TFT_CharMap
  7713. Fdriver TFT_Driver
  7714. Fmemory TFT_Memory
  7715. Fstream TFT_Stream
  7716. Fsizes_list TFT_ListRec
  7717. Fautohint TFT_Generic
  7718. Fextensions uintptr
  7719. Finternal TFT_Face_Internal
  7720. }
  7721. type TFT_Size_Internal = uintptr
  7722. type TFT_Size_Metrics = struct {
  7723. Fx_ppem TFT_UShort
  7724. Fy_ppem TFT_UShort
  7725. Fx_scale TFT_Fixed
  7726. Fy_scale TFT_Fixed
  7727. Fascender TFT_Pos
  7728. Fdescender TFT_Pos
  7729. Fheight TFT_Pos
  7730. Fmax_advance TFT_Pos
  7731. }
  7732. type TFT_Size_Metrics_ = TFT_Size_Metrics
  7733. type TFT_SizeRec = struct {
  7734. Fface TFT_Face
  7735. Fgeneric TFT_Generic
  7736. Fmetrics TFT_Size_Metrics
  7737. Finternal TFT_Size_Internal
  7738. }
  7739. type TFT_SubGlyph = uintptr
  7740. type TFT_Slot_Internal = uintptr
  7741. type TFT_GlyphSlotRec = struct {
  7742. Flibrary TFT_Library
  7743. Fface TFT_Face
  7744. Fnext TFT_GlyphSlot
  7745. Fglyph_index TFT_UInt
  7746. Fgeneric TFT_Generic
  7747. Fmetrics TFT_Glyph_Metrics
  7748. FlinearHoriAdvance TFT_Fixed
  7749. FlinearVertAdvance TFT_Fixed
  7750. Fadvance TFT_Vector
  7751. Fformat TFT_Glyph_Format
  7752. Fbitmap TFT_Bitmap
  7753. Fbitmap_left TFT_Int
  7754. Fbitmap_top TFT_Int
  7755. Foutline TFT_Outline
  7756. Fnum_subglyphs TFT_UInt
  7757. Fsubglyphs TFT_SubGlyph
  7758. Fcontrol_data uintptr
  7759. Fcontrol_len int64
  7760. Flsb_delta TFT_Pos
  7761. Frsb_delta TFT_Pos
  7762. Fother uintptr
  7763. Finternal TFT_Slot_Internal
  7764. }
  7765. type TFT_Parameter = struct {
  7766. Ftag TFT_ULong
  7767. Fdata TFT_Pointer
  7768. }
  7769. type TFT_Parameter_ = TFT_Parameter
  7770. type TFT_Open_Args = struct {
  7771. Fflags TFT_UInt
  7772. Fmemory_base uintptr
  7773. Fmemory_size TFT_Long
  7774. Fpathname uintptr
  7775. Fstream TFT_Stream
  7776. Fdriver TFT_Module
  7777. Fnum_params TFT_Int
  7778. Fparams uintptr
  7779. }
  7780. type TFT_Open_Args_ = TFT_Open_Args
  7781. type TFT_Size_Request_Type = int32
  7782. type _FT_Size_Request_Type_ = int32
  7783. const _FT_SIZE_REQUEST_TYPE_NOMINAL = 0
  7784. const _FT_SIZE_REQUEST_TYPE_REAL_DIM = 1
  7785. const _FT_SIZE_REQUEST_TYPE_BBOX = 2
  7786. const _FT_SIZE_REQUEST_TYPE_CELL = 3
  7787. const _FT_SIZE_REQUEST_TYPE_SCALES = 4
  7788. const _FT_SIZE_REQUEST_TYPE_MAX = 5
  7789. type TFT_Size_RequestRec = struct {
  7790. Ftype1 TFT_Size_Request_Type
  7791. Fwidth TFT_Long
  7792. Fheight TFT_Long
  7793. FhoriResolution TFT_UInt
  7794. FvertResolution TFT_UInt
  7795. }
  7796. type TFT_Size_RequestRec_ = TFT_Size_RequestRec
  7797. type TFT_Size_Request = uintptr
  7798. type TFT_Render_Mode = int32
  7799. type _FT_Render_Mode_ = int32
  7800. const _FT_RENDER_MODE_NORMAL = 0
  7801. const _FT_RENDER_MODE_LIGHT = 1
  7802. const _FT_RENDER_MODE_MONO = 2
  7803. const _FT_RENDER_MODE_LCD = 3
  7804. const _FT_RENDER_MODE_LCD_V = 4
  7805. const _FT_RENDER_MODE_SDF = 5
  7806. const _FT_RENDER_MODE_MAX = 6
  7807. type TFT_Kerning_Mode = int32
  7808. type _FT_Kerning_Mode_ = int32
  7809. const _FT_KERNING_DEFAULT = 0
  7810. const _FT_KERNING_UNFITTED = 1
  7811. const _FT_KERNING_UNSCALED = 2
  7812. type Tstat = struct {
  7813. Fst_dev Tdev_t
  7814. Fst_ino Tino_t
  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__pad uint64
  7821. Fst_size Toff_t
  7822. Fst_blksize Tblksize_t
  7823. F__pad2 int32
  7824. Fst_blocks Tblkcnt_t
  7825. Fst_atim Ttimespec
  7826. Fst_mtim Ttimespec
  7827. Fst_ctim Ttimespec
  7828. F__unused [2]uint32
  7829. }
  7830. type Tstatx_timestamp = struct {
  7831. Ftv_sec Tint64_t
  7832. Ftv_nsec Tuint32_t
  7833. F__pad Tuint32_t
  7834. }
  7835. type Tstatx = struct {
  7836. Fstx_mask Tuint32_t
  7837. Fstx_blksize Tuint32_t
  7838. Fstx_attributes Tuint64_t
  7839. Fstx_nlink Tuint32_t
  7840. Fstx_uid Tuint32_t
  7841. Fstx_gid Tuint32_t
  7842. Fstx_mode Tuint16_t
  7843. F__pad0 [1]Tuint16_t
  7844. Fstx_ino Tuint64_t
  7845. Fstx_size Tuint64_t
  7846. Fstx_blocks Tuint64_t
  7847. Fstx_attributes_mask Tuint64_t
  7848. Fstx_atime Tstatx_timestamp
  7849. Fstx_btime Tstatx_timestamp
  7850. Fstx_ctime Tstatx_timestamp
  7851. Fstx_mtime Tstatx_timestamp
  7852. Fstx_rdev_major Tuint32_t
  7853. Fstx_rdev_minor Tuint32_t
  7854. Fstx_dev_major Tuint32_t
  7855. Fstx_dev_minor Tuint32_t
  7856. F__pad1 [14]Tuint64_t
  7857. }
  7858. type TFcChar8 = uint8
  7859. type TFcChar16 = uint16
  7860. type TFcChar32 = uint32
  7861. type TFcBool = int32
  7862. type TFcType = int32
  7863. type __FcType = int32
  7864. const _FcTypeUnknown = -1
  7865. const _FcTypeVoid = 0
  7866. const _FcTypeInteger = 1
  7867. const _FcTypeDouble = 2
  7868. const _FcTypeString = 3
  7869. const _FcTypeBool = 4
  7870. const _FcTypeMatrix = 5
  7871. const _FcTypeCharSet = 6
  7872. const _FcTypeFTFace = 7
  7873. const _FcTypeLangSet = 8
  7874. const _FcTypeRange = 9
  7875. type TFcMatrix = struct {
  7876. Fxx float64
  7877. Fxy float64
  7878. Fyx float64
  7879. Fyy float64
  7880. }
  7881. type T_FcMatrix = TFcMatrix
  7882. type TFcObjectType = struct {
  7883. Fobject uintptr
  7884. Ftype1 TFcType
  7885. }
  7886. type T_FcObjectType = TFcObjectType
  7887. type TFcConstant = struct {
  7888. Fname uintptr
  7889. Fobject uintptr
  7890. Fvalue int32
  7891. }
  7892. type T_FcConstant = TFcConstant
  7893. type TFcResult = int32
  7894. type __FcResult = int32
  7895. const _FcResultMatch = 0
  7896. const _FcResultNoMatch = 1
  7897. const _FcResultTypeMismatch = 2
  7898. const _FcResultNoId = 3
  7899. const _FcResultOutOfMemory = 4
  7900. type TFcValueBinding = int32
  7901. type __FcValueBinding = int32
  7902. const _FcValueBindingWeak = 0
  7903. const _FcValueBindingStrong = 1
  7904. const _FcValueBindingSame = 2
  7905. const _FcValueBindingEnd = 2147483647
  7906. type TFcPatternIter = struct {
  7907. Fdummy1 uintptr
  7908. Fdummy2 uintptr
  7909. }
  7910. type T_FcPatternIter = TFcPatternIter
  7911. type TFcValue = struct {
  7912. Ftype1 TFcType
  7913. Fu struct {
  7914. Fi [0]int32
  7915. Fb [0]TFcBool
  7916. Fd [0]float64
  7917. Fm [0]uintptr
  7918. Fc [0]uintptr
  7919. Ff [0]uintptr
  7920. Fl [0]uintptr
  7921. Fr [0]uintptr
  7922. Fs uintptr
  7923. }
  7924. }
  7925. type T_FcValue = TFcValue
  7926. type TFcFontSet = struct {
  7927. Fnfont int32
  7928. Fsfont int32
  7929. Ffonts uintptr
  7930. }
  7931. type T_FcFontSet = TFcFontSet
  7932. type TFcObjectSet = struct {
  7933. Fnobject int32
  7934. Fsobject int32
  7935. Fobjects uintptr
  7936. }
  7937. type T_FcObjectSet = TFcObjectSet
  7938. type TFcMatchKind = int32
  7939. type __FcMatchKind = int32
  7940. const _FcMatchPattern = 0
  7941. const _FcMatchFont = 1
  7942. const _FcMatchScan = 2
  7943. const _FcMatchKindEnd = 3
  7944. const _FcMatchKindBegin = 0
  7945. type TFcLangResult = int32
  7946. type __FcLangResult = int32
  7947. const _FcLangEqual = 0
  7948. const _FcLangDifferentCountry = 1
  7949. const _FcLangDifferentTerritory = 1
  7950. const _FcLangDifferentLang = 2
  7951. type TFcSetName = int32
  7952. type __FcSetName = int32
  7953. const _FcSetSystem = 0
  7954. const _FcSetApplication = 1
  7955. type TFcConfigFileInfoIter = struct {
  7956. Fdummy1 uintptr
  7957. Fdummy2 uintptr
  7958. Fdummy3 uintptr
  7959. }
  7960. type T_FcConfigFileInfoIter = TFcConfigFileInfoIter
  7961. type TFcEndian = int32
  7962. const _FcEndianBig = 0
  7963. const _FcEndianLittle = 1
  7964. type Tpointer = uintptr
  7965. type TClientPtr = uintptr
  7966. type TFontPtr = uintptr
  7967. type TFSID = uint64
  7968. type TAccContext = uint64
  7969. type TOSTimePtr = uintptr
  7970. type TBlockHandlerProcPtr = uintptr
  7971. type TGlyph = uint64
  7972. type TGlyphSet = uint64
  7973. type TPicture = uint64
  7974. type TPictFormat = uint64
  7975. type TXRenderDirectFormat = struct {
  7976. Fred int16
  7977. FredMask int16
  7978. Fgreen int16
  7979. FgreenMask int16
  7980. Fblue int16
  7981. FblueMask int16
  7982. Falpha int16
  7983. FalphaMask int16
  7984. }
  7985. type TXRenderPictFormat = struct {
  7986. Fid TPictFormat
  7987. Ftype1 int32
  7988. Fdepth int32
  7989. Fdirect TXRenderDirectFormat
  7990. Fcolormap TColormap
  7991. }
  7992. type TXRenderPictureAttributes = struct {
  7993. Frepeat int32
  7994. Falpha_map TPicture
  7995. Falpha_x_origin int32
  7996. Falpha_y_origin int32
  7997. Fclip_x_origin int32
  7998. Fclip_y_origin int32
  7999. Fclip_mask TPixmap
  8000. Fgraphics_exposures int32
  8001. Fsubwindow_mode int32
  8002. Fpoly_edge int32
  8003. Fpoly_mode int32
  8004. Fdither TAtom
  8005. Fcomponent_alpha int32
  8006. }
  8007. type T_XRenderPictureAttributes = TXRenderPictureAttributes
  8008. type TXRenderColor = struct {
  8009. Fred uint16
  8010. Fgreen uint16
  8011. Fblue uint16
  8012. Falpha uint16
  8013. }
  8014. type TXGlyphInfo = struct {
  8015. Fwidth uint16
  8016. Fheight uint16
  8017. Fx int16
  8018. Fy int16
  8019. FxOff int16
  8020. FyOff int16
  8021. }
  8022. type T_XGlyphInfo = TXGlyphInfo
  8023. type TXGlyphElt8 = struct {
  8024. Fglyphset TGlyphSet
  8025. Fchars uintptr
  8026. Fnchars int32
  8027. FxOff int32
  8028. FyOff int32
  8029. }
  8030. type T_XGlyphElt8 = TXGlyphElt8
  8031. type TXGlyphElt16 = struct {
  8032. Fglyphset TGlyphSet
  8033. Fchars uintptr
  8034. Fnchars int32
  8035. FxOff int32
  8036. FyOff int32
  8037. }
  8038. type T_XGlyphElt16 = TXGlyphElt16
  8039. type TXGlyphElt32 = struct {
  8040. Fglyphset TGlyphSet
  8041. Fchars uintptr
  8042. Fnchars int32
  8043. FxOff int32
  8044. FyOff int32
  8045. }
  8046. type T_XGlyphElt32 = TXGlyphElt32
  8047. type TXDouble = float64
  8048. type TXPointDouble = struct {
  8049. Fx TXDouble
  8050. Fy TXDouble
  8051. }
  8052. type T_XPointDouble = TXPointDouble
  8053. type TXFixed = int32
  8054. type TXPointFixed = struct {
  8055. Fx TXFixed
  8056. Fy TXFixed
  8057. }
  8058. type T_XPointFixed = TXPointFixed
  8059. type TXLineFixed = struct {
  8060. Fp1 TXPointFixed
  8061. Fp2 TXPointFixed
  8062. }
  8063. type T_XLineFixed = TXLineFixed
  8064. type TXTriangle = struct {
  8065. Fp1 TXPointFixed
  8066. Fp2 TXPointFixed
  8067. Fp3 TXPointFixed
  8068. }
  8069. type T_XTriangle = TXTriangle
  8070. type TXCircle = struct {
  8071. Fx TXFixed
  8072. Fy TXFixed
  8073. Fradius TXFixed
  8074. }
  8075. type T_XCircle = TXCircle
  8076. type TXTrapezoid = struct {
  8077. Ftop TXFixed
  8078. Fbottom TXFixed
  8079. Fleft TXLineFixed
  8080. Fright TXLineFixed
  8081. }
  8082. type T_XTrapezoid = TXTrapezoid
  8083. type TXTransform = struct {
  8084. Fmatrix [3][3]TXFixed
  8085. }
  8086. type T_XTransform = TXTransform
  8087. type TXFilters = struct {
  8088. Fnfilter int32
  8089. Ffilter uintptr
  8090. Fnalias int32
  8091. Falias uintptr
  8092. }
  8093. type T_XFilters = TXFilters
  8094. type TXIndexValue = struct {
  8095. Fpixel uint64
  8096. Fred uint16
  8097. Fgreen uint16
  8098. Fblue uint16
  8099. Falpha uint16
  8100. }
  8101. type T_XIndexValue = TXIndexValue
  8102. type TXAnimCursor = struct {
  8103. Fcursor TCursor
  8104. Fdelay uint64
  8105. }
  8106. type T_XAnimCursor = TXAnimCursor
  8107. type TXSpanFix = struct {
  8108. Fleft TXFixed
  8109. Fright TXFixed
  8110. Fy TXFixed
  8111. }
  8112. type T_XSpanFix = TXSpanFix
  8113. type TXTrap = struct {
  8114. Ftop TXSpanFix
  8115. Fbottom TXSpanFix
  8116. }
  8117. type T_XTrap = TXTrap
  8118. type TXLinearGradient = struct {
  8119. Fp1 TXPointFixed
  8120. Fp2 TXPointFixed
  8121. }
  8122. type T_XLinearGradient = TXLinearGradient
  8123. type TXRadialGradient = struct {
  8124. Finner TXCircle
  8125. Fouter TXCircle
  8126. }
  8127. type T_XRadialGradient = TXRadialGradient
  8128. type TXConicalGradient = struct {
  8129. Fcenter TXPointFixed
  8130. Fangle TXFixed
  8131. }
  8132. type T_XConicalGradient = TXConicalGradient
  8133. type TXftFontInfo = struct {
  8134. Fhash TFcChar32
  8135. Ffile uintptr
  8136. Fxsize TFT_F26Dot6
  8137. Fysize TFT_F26Dot6
  8138. Fantialias TFcBool
  8139. Fembolden TFcBool
  8140. Fcolor TFcBool
  8141. Frgba int32
  8142. Flcd_filter int32
  8143. Fmatrix TFT_Matrix
  8144. Ftransform TFcBool
  8145. Fload_flags TFT_Int
  8146. Frender TFcBool
  8147. Fspacing int32
  8148. Fminspace TFcBool
  8149. Fchar_width int32
  8150. }
  8151. type T_XftFontInfo = TXftFontInfo
  8152. type TXftFont = struct {
  8153. Fascent int32
  8154. Fdescent int32
  8155. Fheight int32
  8156. Fmax_advance_width int32
  8157. Fcharset uintptr
  8158. Fpattern uintptr
  8159. }
  8160. type T_XftFont = TXftFont
  8161. type TXftDraw = struct {
  8162. Fdpy uintptr
  8163. Fscreen int32
  8164. Fbits_per_pixel uint32
  8165. Fdepth uint32
  8166. Fdrawable TDrawable
  8167. Fvisual uintptr
  8168. Fcolormap TColormap
  8169. Fclip_type TXftClipType
  8170. Fclip TXftClip
  8171. Fsubwindow_mode int32
  8172. Frender struct {
  8173. Fpict TPicture
  8174. }
  8175. Fcore struct {
  8176. Fgc TGC
  8177. Fuse_pixmap int32
  8178. }
  8179. }
  8180. type T_XftDraw = TXftDraw
  8181. type __XftClipType = int32
  8182. const _XftClipTypeNone = 0
  8183. const _XftClipTypeRegion = 1
  8184. const _XftClipTypeRectangles = 2
  8185. type TXftColor = struct {
  8186. Fpixel uint64
  8187. Fcolor TXRenderColor
  8188. }
  8189. type T_XftColor = TXftColor
  8190. type TXftCharSpec = struct {
  8191. Fucs4 TFcChar32
  8192. Fx int16
  8193. Fy int16
  8194. }
  8195. type T_XftCharSpec = TXftCharSpec
  8196. type TXftCharFontSpec = struct {
  8197. Ffont uintptr
  8198. Fucs4 TFcChar32
  8199. Fx int16
  8200. Fy int16
  8201. }
  8202. type T_XftCharFontSpec = TXftCharFontSpec
  8203. type TXftGlyphSpec = struct {
  8204. Fglyph TFT_UInt
  8205. Fx int16
  8206. Fy int16
  8207. }
  8208. type T_XftGlyphSpec = TXftGlyphSpec
  8209. type TXftGlyphFontSpec = struct {
  8210. Ffont uintptr
  8211. Fglyph TFT_UInt
  8212. Fx int16
  8213. Fy int16
  8214. }
  8215. type T_XftGlyphFontSpec = TXftGlyphFontSpec
  8216. type TXftMatcher = struct {
  8217. Fobject uintptr
  8218. Fcompare uintptr
  8219. }
  8220. type T_XftMatcher = TXftMatcher
  8221. type TXftSymbolic = struct {
  8222. Fname uintptr
  8223. Fvalue int32
  8224. }
  8225. type T_XftSymbolic = TXftSymbolic
  8226. type TXftGlyph = struct {
  8227. Fmetrics TXGlyphInfo
  8228. Fbitmap uintptr
  8229. Fglyph_memory uint64
  8230. Fpicture TPicture
  8231. }
  8232. type T_XftGlyph = TXftGlyph
  8233. type TXftGlyphUsage = struct {
  8234. Fcontents TXftGlyph
  8235. Fnewer TFT_UInt
  8236. Folder TFT_UInt
  8237. }
  8238. type T_XftGlyphUsage = TXftGlyphUsage
  8239. type TXftUcsHash = struct {
  8240. Fucs4 TFcChar32
  8241. Fglyph TFT_UInt
  8242. }
  8243. type T_XftUcsHash = TXftUcsHash
  8244. type TXftFtFile = struct {
  8245. Fnext uintptr
  8246. Fref int32
  8247. Ffile uintptr
  8248. Fid int32
  8249. Fxsize TFT_F26Dot6
  8250. Fysize TFT_F26Dot6
  8251. Fmatrix TFT_Matrix
  8252. Flock int32
  8253. Fface TFT_Face
  8254. }
  8255. type T_XftFtFile = TXftFtFile
  8256. type TXftFontInt = struct {
  8257. Fpublic TXftFont
  8258. Fnext uintptr
  8259. Fhash_next uintptr
  8260. Finfo TXftFontInfo
  8261. Fref int32
  8262. Fglyphs uintptr
  8263. Fnum_glyphs TFT_UInt
  8264. Fhash_table uintptr
  8265. Fhash_value int32
  8266. Frehash_value int32
  8267. Fglyphset TGlyphSet
  8268. Fformat uintptr
  8269. Fglyph_memory uint64
  8270. Fmax_glyph_memory uint64
  8271. Fsizeof_glyph uint32
  8272. Fnewest TFT_UInt
  8273. Ftotal_inuse TFT_UInt
  8274. Ftrack_mem_usage TFcBool
  8275. Fuse_free_glyphs TFcBool
  8276. }
  8277. type T_XftFontInt = TXftFontInt
  8278. type TXftClipType = int32
  8279. type TXftClipRect = struct {
  8280. FxOrigin int32
  8281. FyOrigin int32
  8282. Fn int32
  8283. }
  8284. type T_XftClipRect = TXftClipRect
  8285. type TXftClip = struct {
  8286. Fregion [0]TRegion
  8287. Frect uintptr
  8288. }
  8289. type T_XftClip = TXftClip
  8290. type TXftSolidColor = struct {
  8291. Fcolor TXRenderColor
  8292. Fscreen int32
  8293. Fpict TPicture
  8294. }
  8295. type T_XftSolidColor = TXftSolidColor
  8296. type TXftDisplayInfo = struct {
  8297. Fnext uintptr
  8298. Fdisplay uintptr
  8299. Fcodes uintptr
  8300. Fdefaults uintptr
  8301. FhasRender TFcBool
  8302. FhasSolid TFcBool
  8303. Ffonts uintptr
  8304. FsolidFormat uintptr
  8305. Fglyph_memory uint64
  8306. Fmax_glyph_memory uint64
  8307. Ftrack_mem_usage TFcBool
  8308. Fuse_free_glyphs TFcBool
  8309. Fnum_unref_fonts int32
  8310. Fmax_unref_fonts int32
  8311. Fcolors [16]TXftSolidColor
  8312. FfontHash [127]uintptr
  8313. }
  8314. type T_XftDisplayInfo = TXftDisplayInfo
  8315. type TXFT_MEM_KIND = int32
  8316. const _XFT_MEM_DRAW = 0
  8317. const _XFT_MEM_FONT = 1
  8318. const _XFT_MEM_FILE = 2
  8319. const _XFT_MEM_GLYPH = 3
  8320. const _XFT_MEM_NUM = 4
  8321. /* xftxlfd.c */
  8322. func XXftColorAllocName(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, name uintptr, result uintptr) (r int32) {
  8323. bp := tls.Alloc(32)
  8324. defer tls.Free(32)
  8325. var _ /* exact at bp+16 */ TXColor
  8326. var _ /* screen at bp+0 */ TXColor
  8327. if !(libx11.XXAllocNamedColor(tls, dpy, cmap, name, bp, bp+16) != 0) {
  8328. /* XXX stick standard colormap stuff here */
  8329. return m_False
  8330. }
  8331. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8332. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fred
  8333. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fgreen
  8334. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fblue
  8335. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = uint16(0xffff)
  8336. return int32(m_True)
  8337. }
  8338. func _maskbase(tls *libc.TLS, m uint64) (r int16) {
  8339. var i int16
  8340. _ = i
  8341. if !(m != 0) {
  8342. return 0
  8343. }
  8344. i = 0
  8345. for !(m&libc.Uint64FromInt32(1) != 0) {
  8346. m >>= uint64(1)
  8347. i++
  8348. }
  8349. return i
  8350. }
  8351. func _masklen(tls *libc.TLS, m uint64) (r int16) {
  8352. var y uint64
  8353. _ = y
  8354. y = m >> int32(1) & uint64(033333333333)
  8355. y = m - y - y>>int32(1)&uint64(033333333333)
  8356. return libc.Int16FromUint64((y + y>>libc.Int32FromInt32(3)) & libc.Uint64FromUint32(030707070707) % libc.Uint64FromInt32(077))
  8357. }
  8358. func XXftColorAllocValue(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr, result uintptr) (r int32) {
  8359. bp := tls.Alloc(16)
  8360. defer tls.Free(16)
  8361. var blue_len, blue_shift, green_len, green_shift, red_len, red_shift int32
  8362. var _ /* xcolor at bp+0 */ TXColor
  8363. _, _, _, _, _, _ = blue_len, blue_shift, green_len, green_shift, red_len, red_shift
  8364. if (*TVisual)(unsafe.Pointer(visual)).Fclass == int32(m_TrueColor) {
  8365. red_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8366. red_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8367. green_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8368. green_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8369. blue_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8370. blue_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8371. (*TXftColor)(unsafe.Pointer(result)).Fpixel = libc.Uint64FromInt32(libc.Int32FromUint16((*TXRenderColor)(unsafe.Pointer(color)).Fred)>>(libc.Int32FromInt32(16)-red_len)<<red_shift | libc.Int32FromUint16((*TXRenderColor)(unsafe.Pointer(color)).Fgreen)>>(libc.Int32FromInt32(16)-green_len)<<green_shift | libc.Int32FromUint16((*TXRenderColor)(unsafe.Pointer(color)).Fblue)>>(libc.Int32FromInt32(16)-blue_len)<<blue_shift)
  8372. } else {
  8373. (*(*TXColor)(unsafe.Pointer(bp))).Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8374. (*(*TXColor)(unsafe.Pointer(bp))).Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8375. (*(*TXColor)(unsafe.Pointer(bp))).Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8376. if !(libx11.XXAllocColor(tls, dpy, cmap, bp) != 0) {
  8377. return m_False
  8378. }
  8379. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8380. }
  8381. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8382. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8383. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8384. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = (*TXRenderColor)(unsafe.Pointer(color)).Falpha
  8385. return int32(m_True)
  8386. }
  8387. func XXftColorFree(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr) {
  8388. if (*TVisual)(unsafe.Pointer(visual)).Fclass != int32(m_TrueColor) {
  8389. libx11.XXFreeColors(tls, dpy, cmap, color, int32(1), uint64(0))
  8390. }
  8391. }
  8392. type Tfuncs = struct {
  8393. Fcreate_image uintptr
  8394. Fdestroy_image uintptr
  8395. Fget_pixel uintptr
  8396. Fput_pixel uintptr
  8397. Fsub_image uintptr
  8398. Fadd_pixel uintptr
  8399. }
  8400. const m_NUM_LOCAL = 1024
  8401. /* xftxlfd.c */
  8402. func XXftRectCore(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  8403. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  8404. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  8405. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  8406. }
  8407. }
  8408. /*
  8409. * Use the core protocol to draw the glyphs
  8410. */
  8411. func __XftSharpGlyphMono(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8412. var bits, bitsMask uint8
  8413. var height, lenspan, stride, w, width, xspan, v1 int32
  8414. var src, srcLine, v2, v3, v4 uintptr
  8415. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8416. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8417. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8418. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8419. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8420. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8421. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8422. for {
  8423. v1 = height
  8424. height--
  8425. if !(v1 != 0) {
  8426. break
  8427. }
  8428. src = srcLine
  8429. srcLine += uintptr(stride)
  8430. w = width
  8431. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8432. v2 = src
  8433. src++
  8434. bits = *(*uint8)(unsafe.Pointer(v2))
  8435. xspan = x
  8436. for w != 0 {
  8437. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8438. lenspan = 0
  8439. for cond := true; cond; cond = libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8440. lenspan++
  8441. if lenspan == w {
  8442. break
  8443. }
  8444. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8445. if !(bitsMask != 0) {
  8446. v3 = src
  8447. src++
  8448. bits = *(*uint8)(unsafe.Pointer(v3))
  8449. bitsMask = uint8(0x80)
  8450. }
  8451. }
  8452. 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))
  8453. xspan += lenspan
  8454. w -= lenspan
  8455. } else {
  8456. for cond := true; cond; cond = !(libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0) {
  8457. w--
  8458. xspan++
  8459. if !(w != 0) {
  8460. break
  8461. }
  8462. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8463. if !(bitsMask != 0) {
  8464. v4 = src
  8465. src++
  8466. bits = *(*uint8)(unsafe.Pointer(v4))
  8467. bitsMask = uint8(0x80)
  8468. }
  8469. }
  8470. }
  8471. }
  8472. y++
  8473. }
  8474. }
  8475. // C documentation
  8476. //
  8477. // /*
  8478. // * Draw solid color text from an anti-aliased bitmap. This is a
  8479. // * fallback for cases where a particular drawable has no AA code
  8480. // */
  8481. func __XftSharpGlyphGray(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8482. var bits uint8
  8483. var height, lenspan, stride, w, width, xspan, v1 int32
  8484. var src, srcLine, v2, v3, v4 uintptr
  8485. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8486. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8487. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8488. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8489. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8490. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8491. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8492. for {
  8493. v1 = height
  8494. height--
  8495. if !(v1 != 0) {
  8496. break
  8497. }
  8498. src = srcLine
  8499. srcLine += uintptr(stride)
  8500. w = width
  8501. v2 = src
  8502. src++
  8503. bits = *(*uint8)(unsafe.Pointer(v2))
  8504. xspan = x
  8505. for w != 0 {
  8506. if libc.Int32FromUint8(bits) >= int32(0x80) {
  8507. lenspan = 0
  8508. for cond := true; cond; cond = libc.Int32FromUint8(bits) >= int32(0x80) {
  8509. lenspan++
  8510. if lenspan == w {
  8511. break
  8512. }
  8513. v3 = src
  8514. src++
  8515. bits = *(*uint8)(unsafe.Pointer(v3))
  8516. }
  8517. 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))
  8518. xspan += lenspan
  8519. w -= lenspan
  8520. } else {
  8521. for cond := true; cond; cond = libc.Int32FromUint8(bits) < int32(0x80) {
  8522. w--
  8523. xspan++
  8524. if !(w != 0) {
  8525. break
  8526. }
  8527. v4 = src
  8528. src++
  8529. bits = *(*uint8)(unsafe.Pointer(v4))
  8530. }
  8531. }
  8532. }
  8533. y++
  8534. }
  8535. }
  8536. func __XftSharpGlyphRgba(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8537. var bits TCARD32
  8538. var height, lenspan, stride, w, width, xspan, v1 int32
  8539. var src, srcLine, v2, v3, v4 uintptr
  8540. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8541. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8542. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8543. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8544. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8545. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8546. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8547. for {
  8548. v1 = height
  8549. height--
  8550. if !(v1 != 0) {
  8551. break
  8552. }
  8553. src = srcLine
  8554. srcLine += uintptr(stride) * 4
  8555. w = width
  8556. v2 = src
  8557. src += 4
  8558. bits = *(*TCARD32)(unsafe.Pointer(v2))
  8559. xspan = x
  8560. for w != 0 {
  8561. if bits >= uint32(0x80000000) {
  8562. lenspan = 0
  8563. for cond := true; cond; cond = bits >= uint32(0x80000000) {
  8564. lenspan++
  8565. if lenspan == w {
  8566. break
  8567. }
  8568. v3 = src
  8569. src += 4
  8570. bits = *(*TCARD32)(unsafe.Pointer(v3))
  8571. }
  8572. 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))
  8573. xspan += lenspan
  8574. w -= lenspan
  8575. } else {
  8576. for cond := true; cond; cond = bits < uint32(0x80000000) {
  8577. w--
  8578. xspan++
  8579. if !(w != 0) {
  8580. break
  8581. }
  8582. v4 = src
  8583. src += 4
  8584. bits = *(*TCARD32)(unsafe.Pointer(v4))
  8585. }
  8586. }
  8587. }
  8588. y++
  8589. }
  8590. }
  8591. type TXftSharpGlyph = uintptr
  8592. func __XftSharpGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSharpGlyph) {
  8593. var font uintptr
  8594. _ = font
  8595. font = public
  8596. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  8597. return __ccgo_fp(__XftSharpGlyphMono)
  8598. } else {
  8599. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  8600. case int32(m_FC_RGBA_RGB):
  8601. fallthrough
  8602. case int32(m_FC_RGBA_BGR):
  8603. fallthrough
  8604. case int32(m_FC_RGBA_VRGB):
  8605. fallthrough
  8606. case int32(m_FC_RGBA_VBGR):
  8607. return __ccgo_fp(__XftSharpGlyphRgba)
  8608. default:
  8609. return __ccgo_fp(__XftSharpGlyphGray)
  8610. }
  8611. }
  8612. return r
  8613. }
  8614. /*
  8615. * Draw glyphs to a target that supports anti-aliasing
  8616. */
  8617. /*
  8618. * Primitives for converting between RGB values and TrueColor pixels
  8619. */
  8620. func __XftExamineBitfield(tls *libc.TLS, mask uint64, shift uintptr, len1 uintptr) {
  8621. var l, s int32
  8622. _, _ = l, s
  8623. s = 0
  8624. for mask&uint64(1) == uint64(0) {
  8625. mask >>= uint64(1)
  8626. s++
  8627. }
  8628. l = 0
  8629. for mask&uint64(1) == uint64(1) {
  8630. mask >>= uint64(1)
  8631. l++
  8632. }
  8633. *(*int32)(unsafe.Pointer(shift)) = s
  8634. *(*int32)(unsafe.Pointer(len1)) = l
  8635. }
  8636. func __XftGetField(tls *libc.TLS, l_pixel uint64, shift int32, len1 int32) (r TCARD32) {
  8637. var pixel TCARD32
  8638. _ = pixel
  8639. pixel = uint32(l_pixel)
  8640. pixel = pixel & libc.Uint32FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<shift)
  8641. pixel = pixel << (int32(32) - (shift + len1)) >> int32(24)
  8642. for len1 < int32(8) {
  8643. pixel |= pixel >> len1
  8644. len1 <<= int32(1)
  8645. }
  8646. return pixel
  8647. }
  8648. func __XftPutField(tls *libc.TLS, pixel TCARD32, shift int32, len1 int32) (r uint64) {
  8649. var l_pixel uint64
  8650. _ = l_pixel
  8651. l_pixel = uint64(pixel)
  8652. shift = shift - (int32(8) - len1)
  8653. if len1 <= int32(8) {
  8654. l_pixel = l_pixel & libc.Uint64FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<(libc.Int32FromInt32(8)-len1))
  8655. }
  8656. if shift < 0 {
  8657. l_pixel >>= libc.Uint64FromInt32(-shift)
  8658. } else {
  8659. l_pixel <<= libc.Uint64FromInt32(shift)
  8660. }
  8661. return l_pixel
  8662. }
  8663. // C documentation
  8664. //
  8665. // /*
  8666. // * This is used when doing XftCharFontSpec/XftGlyphFontSpec where
  8667. // * some of the fonts are bitmaps and some are anti-aliased to handle
  8668. // * the bitmap portions
  8669. // */
  8670. func __XftSmoothGlyphMono(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8671. bp := tls.Alloc(32)
  8672. defer tls.Free(32)
  8673. var bits, bitsMask uint8
  8674. var height, stride, w, width, xspan, v1, v3 int32
  8675. var pixel uint64
  8676. var src, srcLine, v2, v4 uintptr
  8677. var _ /* b_len at bp+20 */ int32
  8678. var _ /* b_shift at bp+16 */ int32
  8679. var _ /* g_len at bp+12 */ int32
  8680. var _ /* g_shift at bp+8 */ int32
  8681. var _ /* r_len at bp+4 */ int32
  8682. var _ /* r_shift at bp+0 */ int32
  8683. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, pixel, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8684. srcLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8685. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8686. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8687. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8688. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8689. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8690. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8691. 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)))
  8692. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8693. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8694. for {
  8695. v1 = height
  8696. height--
  8697. if !(v1 != 0) {
  8698. break
  8699. }
  8700. src = srcLine
  8701. srcLine += uintptr(stride)
  8702. w = width
  8703. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8704. v2 = src
  8705. src++
  8706. bits = *(*uint8)(unsafe.Pointer(v2))
  8707. xspan = x
  8708. for {
  8709. v3 = w
  8710. w--
  8711. if !(v3 != 0) {
  8712. break
  8713. }
  8714. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8715. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, xspan, y, pixel)
  8716. }
  8717. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8718. if !(bitsMask != 0) {
  8719. v4 = src
  8720. src++
  8721. bits = *(*uint8)(unsafe.Pointer(v4))
  8722. bitsMask = uint8(0x80)
  8723. }
  8724. xspan++
  8725. }
  8726. y++
  8727. }
  8728. }
  8729. /*
  8730. * As simple anti-aliasing is likely to be common, there are three
  8731. * optimized versions for the usual true color pixel formats (888, 565, 555).
  8732. * Other formats are handled by the general case
  8733. */
  8734. /*
  8735. * There are two ways of handling alpha -- either as a single unified value or
  8736. * a separate value for each component, hence each macro must have two
  8737. * versions. The unified alpha version has a 'U' at the end of the name,
  8738. * the component version has a 'C'. Similarly, functions which deal with
  8739. * this difference will have two versions using the same convention.
  8740. */
  8741. func _fbOver24(tls *libc.TLS, x TCARD32, y TCARD32) (r TCARD32) {
  8742. var a, t TCARD16
  8743. var m, n, o TCARD32
  8744. _, _, _, _, _ = a, m, n, o, t
  8745. a = uint16(^x >> libc.Int32FromInt32(24))
  8746. t = uint16(0)
  8747. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8748. 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)))))
  8749. m = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(0)
  8750. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8751. 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)))))
  8752. n = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(8)
  8753. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8754. 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)))))
  8755. o = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(16)
  8756. return m | n | o
  8757. }
  8758. func _fbIn(tls *libc.TLS, x TCARD32, y TCARD8) (r TCARD32) {
  8759. var a, t TCARD16
  8760. var m, n, o, p TCARD32
  8761. _, _, _, _, _, _ = a, m, n, o, p, t
  8762. a = uint16(y)
  8763. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8764. m = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << 0
  8765. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8766. n = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(8)
  8767. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8768. o = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(16)
  8769. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(24))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8770. p = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(24)
  8771. return m | n | o | p
  8772. }
  8773. func __XftSmoothGlyphGray8888(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8774. var b, d, g, r, src, srca TCARD32
  8775. var dst, dstLine, mask, maskLine, v3 uintptr
  8776. var dstStride, height, maskStride, w, width, v1, v2 int32
  8777. var m TCARD8
  8778. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8779. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8780. /* This handles only RGB and BGR */
  8781. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8782. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xff0000) {
  8783. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8784. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8785. } else {
  8786. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8787. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8788. }
  8789. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8790. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8791. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8792. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8793. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8794. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(2))
  8795. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(2)
  8796. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8797. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8798. for {
  8799. v1 = height
  8800. height--
  8801. if !(v1 != 0) {
  8802. break
  8803. }
  8804. dst = dstLine
  8805. dstLine += uintptr(dstStride) * 4
  8806. mask = maskLine
  8807. maskLine += uintptr(maskStride)
  8808. w = width
  8809. for {
  8810. v2 = w
  8811. w--
  8812. if !(v2 != 0) {
  8813. break
  8814. }
  8815. v3 = mask
  8816. mask++
  8817. m = *(*TCARD8)(unsafe.Pointer(v3))
  8818. if libc.Int32FromUint8(m) == int32(0xff) {
  8819. if srca == uint32(0xff) {
  8820. *(*TCARD32)(unsafe.Pointer(dst)) = src
  8821. } else {
  8822. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, src, *(*TCARD32)(unsafe.Pointer(dst)))
  8823. }
  8824. } else {
  8825. if m != 0 {
  8826. d = _fbIn(tls, src, m)
  8827. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, d, *(*TCARD32)(unsafe.Pointer(dst)))
  8828. }
  8829. }
  8830. dst += 4
  8831. }
  8832. }
  8833. }
  8834. func __XftSmoothGlyphGray565(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8835. var b, d, g, r, src, srca TCARD32
  8836. var dst, dstLine, mask, maskLine, v3 uintptr
  8837. var dstStride, height, maskStride, w, width, v1, v2 int32
  8838. var m TCARD8
  8839. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8840. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8841. /* This handles only RGB and BGR */
  8842. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8843. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8844. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8845. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8846. } else {
  8847. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8848. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8849. }
  8850. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8851. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8852. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8853. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8854. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8855. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8856. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8857. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8858. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8859. for {
  8860. v1 = height
  8861. height--
  8862. if !(v1 != 0) {
  8863. break
  8864. }
  8865. dst = dstLine
  8866. dstLine += uintptr(dstStride) * 2
  8867. mask = maskLine
  8868. maskLine += uintptr(maskStride)
  8869. w = width
  8870. for {
  8871. v2 = w
  8872. w--
  8873. if !(v2 != 0) {
  8874. break
  8875. }
  8876. v3 = mask
  8877. mask++
  8878. m = *(*TCARD8)(unsafe.Pointer(v3))
  8879. if libc.Int32FromUint8(m) == int32(0xff) {
  8880. if srca == uint32(0xff) {
  8881. d = src
  8882. } else {
  8883. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8884. 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)))
  8885. }
  8886. *(*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))
  8887. } else {
  8888. if m != 0 {
  8889. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8890. 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)))
  8891. *(*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))
  8892. }
  8893. }
  8894. dst += 2
  8895. }
  8896. }
  8897. }
  8898. func __XftSmoothGlyphGray555(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8899. var b, d, g, r, src, srca TCARD32
  8900. var dst, dstLine, mask, maskLine, v3 uintptr
  8901. var dstStride, height, maskStride, w, width, v1, v2 int32
  8902. var m TCARD8
  8903. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8904. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8905. /* This handles only RGB and BGR */
  8906. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8907. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8908. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8909. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8910. } else {
  8911. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8912. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8913. }
  8914. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8915. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8916. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8917. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8918. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8919. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8920. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8921. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8922. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8923. for {
  8924. v1 = height
  8925. height--
  8926. if !(v1 != 0) {
  8927. break
  8928. }
  8929. dst = dstLine
  8930. dstLine += uintptr(dstStride) * 2
  8931. mask = maskLine
  8932. maskLine += uintptr(maskStride)
  8933. w = width
  8934. for {
  8935. v2 = w
  8936. w--
  8937. if !(v2 != 0) {
  8938. break
  8939. }
  8940. v3 = mask
  8941. mask++
  8942. m = *(*TCARD8)(unsafe.Pointer(v3))
  8943. if libc.Int32FromUint8(m) == int32(0xff) {
  8944. if srca == uint32(0xff) {
  8945. d = src
  8946. } else {
  8947. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8948. 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)))
  8949. }
  8950. *(*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))
  8951. } else {
  8952. if m != 0 {
  8953. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8954. 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)))
  8955. *(*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))
  8956. }
  8957. }
  8958. dst += 2
  8959. }
  8960. }
  8961. }
  8962. func __XftSmoothGlyphGray(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8963. bp := tls.Alloc(32)
  8964. defer tls.Free(32)
  8965. var d, src, srca TCARD32
  8966. var height, maskStride, tx, w, width, v1, v2 int32
  8967. var m TCARD8
  8968. var mask, maskLine, v3 uintptr
  8969. var pixel uint64
  8970. var _ /* b_len at bp+20 */ int32
  8971. var _ /* b_shift at bp+16 */ int32
  8972. var _ /* g_len at bp+12 */ int32
  8973. var _ /* g_shift at bp+8 */ int32
  8974. var _ /* r_len at bp+4 */ int32
  8975. var _ /* r_shift at bp+0 */ int32
  8976. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, height, m, mask, maskLine, maskStride, pixel, src, srca, tx, w, width, v1, v2, v3
  8977. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8978. 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))
  8979. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8980. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8981. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8982. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8983. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8984. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8985. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8986. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8987. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8988. for {
  8989. v1 = height
  8990. height--
  8991. if !(v1 != 0) {
  8992. break
  8993. }
  8994. mask = maskLine
  8995. maskLine += uintptr(maskStride)
  8996. w = width
  8997. tx = x
  8998. for {
  8999. v2 = w
  9000. w--
  9001. if !(v2 != 0) {
  9002. break
  9003. }
  9004. v3 = mask
  9005. mask++
  9006. m = *(*TCARD8)(unsafe.Pointer(v3))
  9007. if libc.Int32FromUint8(m) == int32(0xff) {
  9008. if srca == uint32(0xff) {
  9009. d = src
  9010. } else {
  9011. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9012. 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)))
  9013. d = _fbOver24(tls, src, d)
  9014. }
  9015. 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)))
  9016. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9017. } else {
  9018. if m != 0 {
  9019. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9020. 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)))
  9021. d = _fbOver24(tls, _fbIn(tls, src, m), d)
  9022. 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)))
  9023. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9024. }
  9025. }
  9026. tx++
  9027. }
  9028. y++
  9029. }
  9030. }
  9031. func __XftSmoothGlyphRgba(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  9032. bp := tls.Alloc(32)
  9033. defer tls.Free(32)
  9034. var __a, __a1, __a2 TCARD16
  9035. var __i, __i1, __i2, __t, __t1, __t2, __ta, __ta1, __ta2, d, m, ma, n, o, src, srca TCARD32
  9036. var height, tx, w, width, v1, v2 int32
  9037. var mask, v3 uintptr
  9038. var pixel uint64
  9039. var _ /* b_len at bp+20 */ int32
  9040. var _ /* b_shift at bp+16 */ int32
  9041. var _ /* g_len at bp+12 */ int32
  9042. var _ /* g_shift at bp+8 */ int32
  9043. var _ /* r_len at bp+4 */ int32
  9044. var _ /* r_shift at bp+0 */ int32
  9045. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = __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
  9046. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  9047. 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))
  9048. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  9049. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  9050. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  9051. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  9052. mask = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  9053. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  9054. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  9055. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  9056. for {
  9057. v1 = height
  9058. height--
  9059. if !(v1 != 0) {
  9060. break
  9061. }
  9062. w = width
  9063. tx = x
  9064. for {
  9065. v2 = w
  9066. w--
  9067. if !(v2 != 0) {
  9068. break
  9069. }
  9070. v3 = mask
  9071. mask += 4
  9072. ma = *(*TCARD32)(unsafe.Pointer(v3))
  9073. if ma == uint32(0xffffffff) {
  9074. if srca == uint32(0xff) {
  9075. d = src
  9076. } else {
  9077. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9078. 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)))
  9079. d = _fbOver24(tls, src, d)
  9080. }
  9081. 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)))
  9082. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9083. } else {
  9084. if ma != 0 {
  9085. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9086. 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)))
  9087. __a = uint16(uint8(ma >> libc.Int32FromInt32(0)))
  9088. __i = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(__a) + libc.Int32FromInt32(0x80))
  9089. __t = (__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8)
  9090. __i = srca*uint32(__a) + libc.Uint32FromInt32(0x80)
  9091. __ta = uint32(uint8(^((__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8))))
  9092. __i = uint32(uint16(uint8(d>>libc.Int32FromInt32(0))))*__ta + libc.Uint32FromInt32(0x80)
  9093. __t = __t + (__i>>libc.Int32FromInt32(8)+__i)>>libc.Int32FromInt32(8)
  9094. __t = uint32(uint8(__t | -(__t >> libc.Int32FromInt32(8))))
  9095. m = __t << 0
  9096. __a1 = uint16(uint8(ma >> libc.Int32FromInt32(8)))
  9097. __i1 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(__a1) + libc.Int32FromInt32(0x80))
  9098. __t1 = (__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8)
  9099. __i1 = srca*uint32(__a1) + libc.Uint32FromInt32(0x80)
  9100. __ta1 = uint32(uint8(^((__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8))))
  9101. __i1 = uint32(uint16(uint8(d>>libc.Int32FromInt32(8))))*__ta1 + libc.Uint32FromInt32(0x80)
  9102. __t1 = __t1 + (__i1>>libc.Int32FromInt32(8)+__i1)>>libc.Int32FromInt32(8)
  9103. __t1 = uint32(uint8(__t1 | -(__t1 >> libc.Int32FromInt32(8))))
  9104. n = __t1 << int32(8)
  9105. __a2 = uint16(uint8(ma >> libc.Int32FromInt32(16)))
  9106. __i2 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(__a2) + libc.Int32FromInt32(0x80))
  9107. __t2 = (__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8)
  9108. __i2 = srca*uint32(__a2) + libc.Uint32FromInt32(0x80)
  9109. __ta2 = uint32(uint8(^((__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8))))
  9110. __i2 = uint32(uint16(uint8(d>>libc.Int32FromInt32(16))))*__ta2 + libc.Uint32FromInt32(0x80)
  9111. __t2 = __t2 + (__i2>>libc.Int32FromInt32(8)+__i2)>>libc.Int32FromInt32(8)
  9112. __t2 = uint32(uint8(__t2 | -(__t2 >> libc.Int32FromInt32(8))))
  9113. o = __t2 << int32(16)
  9114. d = m | n | o
  9115. 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)))
  9116. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9117. }
  9118. }
  9119. tx++
  9120. }
  9121. y++
  9122. }
  9123. }
  9124. func __XftSmoothGlyphPossible(tls *libc.TLS, draw uintptr) (r TFcBool) {
  9125. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) {
  9126. return m_FcFalse
  9127. }
  9128. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fclass != int32(m_TrueColor) {
  9129. return m_FcFalse
  9130. }
  9131. return int32(m_FcTrue)
  9132. }
  9133. type TXftSmoothGlyph = uintptr
  9134. func __XftSmoothGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSmoothGlyph) {
  9135. var font uintptr
  9136. _ = font
  9137. font = public
  9138. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  9139. return __ccgo_fp(__XftSmoothGlyphMono)
  9140. } else {
  9141. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  9142. case int32(m_FC_RGBA_RGB):
  9143. fallthrough
  9144. case int32(m_FC_RGBA_BGR):
  9145. fallthrough
  9146. case int32(m_FC_RGBA_VRGB):
  9147. fallthrough
  9148. case int32(m_FC_RGBA_VBGR):
  9149. return __ccgo_fp(__XftSmoothGlyphRgba)
  9150. default:
  9151. switch XXftDrawBitsPerPixel(tls, draw) {
  9152. case uint32(32):
  9153. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0xff0000) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x00ff00) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0x0000ff) || (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0x0000ff) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x00ff00) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0xff0000) {
  9154. return __ccgo_fp(__XftSmoothGlyphGray8888)
  9155. }
  9156. case uint32(16):
  9157. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0xf800) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x07e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0x001f) || (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0x001f) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x07e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0xf800) {
  9158. return __ccgo_fp(__XftSmoothGlyphGray565)
  9159. }
  9160. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0x7c00) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x03e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0x001f) || (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0x001f) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x03e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0x7c00) {
  9161. return __ccgo_fp(__XftSmoothGlyphGray555)
  9162. }
  9163. default:
  9164. break
  9165. }
  9166. return __ccgo_fp(__XftSmoothGlyphGray)
  9167. }
  9168. }
  9169. return r
  9170. }
  9171. func __XftGlyphDefault(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  9172. bp := tls.Alloc(1040)
  9173. defer tls.Free(1040)
  9174. var font uintptr
  9175. var glyphs_loaded TFcBool
  9176. var _ /* missing at bp+0 */ [256]TFT_UInt
  9177. var _ /* nmissing at bp+1024 */ int32
  9178. _, _ = font, glyphs_loaded
  9179. font = public
  9180. glyphs_loaded = m_FcFalse
  9181. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), uint32(0), bp, bp+1024) != 0 {
  9182. glyphs_loaded = int32(m_FcTrue)
  9183. }
  9184. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9185. XXftFontLoadGlyphs(tls, dpy, public, glyphs_loaded, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9186. }
  9187. return *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs))
  9188. }
  9189. func _XftGetImageErrorHandler(tls *libc.TLS, dpy uintptr, error_event uintptr) (r int32) {
  9190. return 0
  9191. }
  9192. func XXftGlyphCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  9193. bp := tls.Alloc(1168)
  9194. defer tls.Free(1168)
  9195. var depth, v3 uint32
  9196. var dpy, font, g, image, xftg, v10, v11, v2, v6, v7 uintptr
  9197. var gc TGC
  9198. var glyph TFT_UInt
  9199. var glyphs_loaded TFcBool
  9200. var n, ox, oy, v1, v5, v9 int32
  9201. var pix TPixmap
  9202. var prev_error TXErrorHandler
  9203. var sharp TXftSharpGlyph
  9204. var smooth TXftSmoothGlyph
  9205. var v12, v4, v8 bool
  9206. var _ /* gcv at bp+1040 */ TXGCValues
  9207. var _ /* gi at bp+1028 */ TXGlyphInfo
  9208. var _ /* missing at bp+0 */ [256]TFT_UInt
  9209. var _ /* nmissing at bp+1024 */ int32
  9210. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9211. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9212. font = public
  9213. /*
  9214. * Load missing glyphs
  9215. */
  9216. g = glyphs
  9217. n = nglyphs
  9218. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9219. glyphs_loaded = m_FcFalse
  9220. for {
  9221. v1 = n
  9222. n--
  9223. if !(v1 != 0) {
  9224. break
  9225. }
  9226. v2 = g
  9227. g += 4
  9228. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  9229. glyphs_loaded = int32(m_FcTrue)
  9230. }
  9231. }
  9232. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9233. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9234. }
  9235. g = glyphs
  9236. n = nglyphs
  9237. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9238. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9239. XXftGlyphExtents(tls, dpy, public, glyphs, nglyphs, bp+1028)
  9240. if !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth != 0) || !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight != 0) {
  9241. goto bail1
  9242. }
  9243. ox = x - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9244. oy = y - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9245. /*
  9246. * Try to get bits directly from the drawable; if that fails,
  9247. * use a temporary pixmap. When it does fail, assume it
  9248. * will probably fail for a while and keep using temporary
  9249. * pixmaps for a while to avoid double round trips.
  9250. */
  9251. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9252. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9253. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, ox, oy, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9254. libx11.XXSetErrorHandler(tls, prev_error)
  9255. if !(image != 0) {
  9256. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9257. }
  9258. } else {
  9259. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9260. image = libc.UintptrFromInt32(0)
  9261. }
  9262. if v4 = !(image != 0); v4 {
  9263. v3 = XXftDrawDepth(tls, draw)
  9264. depth = v3
  9265. }
  9266. if v4 && v3 != 0 {
  9267. 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)
  9268. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9269. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9270. 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)
  9271. libx11.XXFreeGC(tls, dpy, gc)
  9272. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9273. libx11.XXFreePixmap(tls, dpy, pix)
  9274. }
  9275. if !(image != 0) {
  9276. goto bail1
  9277. }
  9278. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9279. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9280. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9281. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9282. XXftSwapImage(tls, image)
  9283. }
  9284. for {
  9285. v5 = n
  9286. n--
  9287. if !(v5 != 0) {
  9288. break
  9289. }
  9290. v6 = g
  9291. g += 4
  9292. glyph = *(*TFT_UInt)(unsafe.Pointer(v6))
  9293. if v8 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v8 {
  9294. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9295. xftg = v7
  9296. }
  9297. if v8 || !(v7 != 0) {
  9298. xftg = __XftGlyphDefault(tls, dpy, public)
  9299. }
  9300. if xftg != 0 {
  9301. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, x-ox, y-oy, color)
  9302. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9303. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9304. }
  9305. }
  9306. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9307. XXftSwapImage(tls, image)
  9308. }
  9309. 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))
  9310. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9311. } else {
  9312. sharp = __XftSharpGlyphFind(tls, draw, public)
  9313. for {
  9314. v9 = n
  9315. n--
  9316. if !(v9 != 0) {
  9317. break
  9318. }
  9319. v10 = g
  9320. g += 4
  9321. glyph = *(*TFT_UInt)(unsafe.Pointer(v10))
  9322. if v12 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v12 {
  9323. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9324. xftg = v11
  9325. }
  9326. if v12 || !(v11 != 0) {
  9327. xftg = __XftGlyphDefault(tls, dpy, public)
  9328. }
  9329. if xftg != 0 {
  9330. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, x, y)
  9331. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9332. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9333. }
  9334. }
  9335. }
  9336. goto bail1
  9337. bail1:
  9338. ;
  9339. if glyphs_loaded != 0 {
  9340. X_XftFontManageMemory(tls, dpy, public)
  9341. }
  9342. }
  9343. func XXftGlyphSpecCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, glyphs uintptr, nglyphs int32) {
  9344. bp := tls.Alloc(1168)
  9345. defer tls.Free(1168)
  9346. var depth, v5 uint32
  9347. var dpy, font, image, xftg, v11, v8 uintptr
  9348. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9349. var gc TGC
  9350. var glyph, glyph1 TFT_UInt
  9351. var glyphs_loaded TFcBool
  9352. var pix TPixmap
  9353. var prev_error TXErrorHandler
  9354. var sharp TXftSharpGlyph
  9355. var smooth TXftSmoothGlyph
  9356. var v12, v6, v9 bool
  9357. var _ /* gcv at bp+1040 */ TXGCValues
  9358. var _ /* gi at bp+1028 */ TXGlyphInfo
  9359. var _ /* missing at bp+0 */ [256]TFT_UInt
  9360. var _ /* nmissing at bp+1024 */ int32
  9361. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9362. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9363. font = public
  9364. /*
  9365. * Load missing glyphs
  9366. */
  9367. glyphs_loaded = m_FcFalse
  9368. v3 = libc.Int32FromInt32(0)
  9369. y2 = v3
  9370. v2 = v3
  9371. x2 = v2
  9372. v1 = v2
  9373. y1 = v1
  9374. x1 = v1
  9375. i = 0
  9376. for {
  9377. if !(i < nglyphs) {
  9378. break
  9379. }
  9380. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9381. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph, bp, bp+1024) != 0 {
  9382. glyphs_loaded = int32(m_FcTrue)
  9383. }
  9384. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9385. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9386. }
  9387. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*8, int32(1), bp+1028)
  9388. g_x1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9389. g_y1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9390. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9391. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9392. if i != 0 {
  9393. if g_x1 < x1 {
  9394. x1 = g_x1
  9395. }
  9396. if g_y1 < y1 {
  9397. y1 = g_y1
  9398. }
  9399. if g_x2 > x2 {
  9400. x2 = g_x2
  9401. }
  9402. if g_y2 > y2 {
  9403. y2 = g_y2
  9404. }
  9405. } else {
  9406. x1 = g_x1
  9407. y1 = g_y1
  9408. x2 = g_x2
  9409. y2 = g_y2
  9410. }
  9411. goto _4
  9412. _4:
  9413. ;
  9414. i++
  9415. }
  9416. if x1 == x2 || y1 == y2 {
  9417. goto bail1
  9418. }
  9419. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9420. width = x2 - x1
  9421. height = y2 - y1
  9422. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9423. /*
  9424. * Try to get bits directly from the drawable; if that fails,
  9425. * use a temporary pixmap. When it does fail, assume it
  9426. * will probably fail for a while and keep using temporary
  9427. * pixmaps for a while to avoid double round trips.
  9428. */
  9429. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9430. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9431. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9432. libx11.XXSetErrorHandler(tls, prev_error)
  9433. if !(image != 0) {
  9434. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9435. }
  9436. } else {
  9437. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9438. image = libc.UintptrFromInt32(0)
  9439. }
  9440. if v6 = !(image != 0); v6 {
  9441. v5 = XXftDrawDepth(tls, draw)
  9442. depth = v5
  9443. }
  9444. if v6 && v5 != 0 {
  9445. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9446. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9447. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9448. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9449. libx11.XXFreeGC(tls, dpy, gc)
  9450. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9451. libx11.XXFreePixmap(tls, dpy, pix)
  9452. }
  9453. if !(image != 0) {
  9454. goto bail1
  9455. }
  9456. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9457. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9458. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9459. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9460. XXftSwapImage(tls, image)
  9461. }
  9462. i = 0
  9463. for {
  9464. if !(i < nglyphs) {
  9465. break
  9466. }
  9467. glyph = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9468. if v9 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v9 {
  9469. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9470. xftg = v8
  9471. }
  9472. if v9 || !(v8 != 0) {
  9473. xftg = __XftGlyphDefault(tls, dpy, public)
  9474. }
  9475. if xftg != 0 {
  9476. (*(*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)
  9477. }
  9478. goto _7
  9479. _7:
  9480. ;
  9481. i++
  9482. }
  9483. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9484. XXftSwapImage(tls, image)
  9485. }
  9486. 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))
  9487. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9488. } else {
  9489. sharp = __XftSharpGlyphFind(tls, draw, public)
  9490. i = 0
  9491. for {
  9492. if !(i < nglyphs) {
  9493. break
  9494. }
  9495. glyph1 = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9496. if v12 = glyph1 >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v12 {
  9497. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph1)*8))
  9498. xftg = v11
  9499. }
  9500. if v12 || !(v11 != 0) {
  9501. xftg = __XftGlyphDefault(tls, dpy, public)
  9502. }
  9503. if xftg != 0 {
  9504. (*(*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))
  9505. }
  9506. goto _10
  9507. _10:
  9508. ;
  9509. i++
  9510. }
  9511. }
  9512. goto bail1
  9513. bail1:
  9514. ;
  9515. if glyphs_loaded != 0 {
  9516. X_XftFontManageMemory(tls, dpy, public)
  9517. }
  9518. }
  9519. func XXftGlyphFontSpecCore(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, nglyphs int32) {
  9520. bp := tls.Alloc(1168)
  9521. defer tls.Free(1168)
  9522. var depth, v6 uint32
  9523. var dpy, font, font1, image, public, public1, public2, xftg, v12, v9 uintptr
  9524. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9525. var gc TGC
  9526. var glyph, glyph1 TFT_UInt
  9527. var glyphs_loaded TFcBool
  9528. var pix TPixmap
  9529. var prev_error TXErrorHandler
  9530. var sharp TXftSharpGlyph
  9531. var smooth TXftSmoothGlyph
  9532. var t int16
  9533. var v10, v13, v7 bool
  9534. var _ /* gcv at bp+1040 */ TXGCValues
  9535. var _ /* gi at bp+1028 */ TXGlyphInfo
  9536. var _ /* missing at bp+0 */ [256]TFT_UInt
  9537. var _ /* nmissing at bp+1024 */ int32
  9538. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9539. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9540. /*
  9541. * Load missing glyphs
  9542. */
  9543. glyphs_loaded = m_FcFalse
  9544. v3 = libc.Int32FromInt32(0)
  9545. y2 = v3
  9546. v2 = v3
  9547. x2 = v2
  9548. v1 = v2
  9549. y1 = v1
  9550. x1 = v1
  9551. i = 0
  9552. for {
  9553. if !(i < nglyphs) {
  9554. break
  9555. }
  9556. public = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9557. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9558. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph, bp, bp+1024) != 0 {
  9559. glyphs_loaded = int32(m_FcTrue)
  9560. }
  9561. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9562. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9563. }
  9564. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*16+8, int32(1), bp+1028)
  9565. g_x1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9566. g_y1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9567. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9568. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9569. if i != 0 {
  9570. if g_x1 < x1 {
  9571. if g_x1 < 0 {
  9572. /* do nothing if the given glyphs are out of range */
  9573. t = int16((*TXftFont)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*16))).Ffont)).Fmax_advance_width + int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*16))).Fx))
  9574. if int32(t) < 0 && int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*16))).Fx) > 0 {
  9575. goto bail1
  9576. }
  9577. }
  9578. x1 = g_x1
  9579. }
  9580. if g_y1 < y1 {
  9581. y1 = g_y1
  9582. }
  9583. if g_x2 > x2 {
  9584. x2 = g_x2
  9585. }
  9586. if g_y2 > y2 {
  9587. y2 = g_y2
  9588. }
  9589. } else {
  9590. x1 = g_x1
  9591. y1 = g_y1
  9592. x2 = g_x2
  9593. y2 = g_y2
  9594. }
  9595. goto _4
  9596. _4:
  9597. ;
  9598. i++
  9599. }
  9600. if x1 == x2 || y1 == y2 {
  9601. goto bail1
  9602. }
  9603. i = 0
  9604. for {
  9605. if !(i < nglyphs) {
  9606. break
  9607. }
  9608. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Finfo.Fantialias != 0 {
  9609. break
  9610. }
  9611. goto _5
  9612. _5:
  9613. ;
  9614. i++
  9615. }
  9616. if (i != nglyphs || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9617. width = x2 - x1
  9618. height = y2 - y1
  9619. /*
  9620. * Try to get bits directly from the drawable; if that fails,
  9621. * use a temporary pixmap. When it does fail, assume it
  9622. * will probably fail for a while and keep using temporary
  9623. * pixmaps for a while to avoid double round trips.
  9624. */
  9625. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9626. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9627. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9628. libx11.XXSetErrorHandler(tls, prev_error)
  9629. if !(image != 0) {
  9630. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9631. }
  9632. } else {
  9633. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9634. image = libc.UintptrFromInt32(0)
  9635. }
  9636. if v7 = !(image != 0); v7 {
  9637. v6 = XXftDrawDepth(tls, draw)
  9638. depth = v6
  9639. }
  9640. if v7 && v6 != 0 {
  9641. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9642. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9643. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9644. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9645. libx11.XXFreeGC(tls, dpy, gc)
  9646. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9647. libx11.XXFreePixmap(tls, dpy, pix)
  9648. }
  9649. if !(image != 0) {
  9650. goto bail1
  9651. }
  9652. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9653. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9654. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9655. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9656. XXftSwapImage(tls, image)
  9657. }
  9658. i = 0
  9659. for {
  9660. if !(i < nglyphs) {
  9661. break
  9662. }
  9663. public1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9664. font = public1
  9665. smooth = __XftSmoothGlyphFind(tls, draw, public1)
  9666. glyph = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9667. if v10 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v10 {
  9668. v9 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9669. xftg = v9
  9670. }
  9671. if v10 || !(v9 != 0) {
  9672. xftg = __XftGlyphDefault(tls, dpy, public1)
  9673. }
  9674. if xftg != 0 {
  9675. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)-x1, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)-y1, color)
  9676. }
  9677. goto _8
  9678. _8:
  9679. ;
  9680. i++
  9681. }
  9682. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9683. XXftSwapImage(tls, image)
  9684. }
  9685. 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))
  9686. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9687. } else {
  9688. i = 0
  9689. for {
  9690. if !(i < nglyphs) {
  9691. break
  9692. }
  9693. public2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9694. font1 = public2
  9695. sharp = __XftSharpGlyphFind(tls, draw, public2)
  9696. glyph1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9697. if v13 = glyph1 >= (*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs; !v13 {
  9698. v12 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(glyph1)*8))
  9699. xftg = v12
  9700. }
  9701. if v13 || !(v12 != 0) {
  9702. xftg = __XftGlyphDefault(tls, dpy, public2)
  9703. }
  9704. if xftg != 0 {
  9705. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy))
  9706. }
  9707. goto _11
  9708. _11:
  9709. ;
  9710. i++
  9711. }
  9712. }
  9713. goto bail1
  9714. bail1:
  9715. ;
  9716. if glyphs_loaded != 0 {
  9717. i = 0
  9718. for {
  9719. if !(i < nglyphs) {
  9720. break
  9721. }
  9722. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  9723. goto _14
  9724. _14:
  9725. ;
  9726. i++
  9727. }
  9728. }
  9729. }
  9730. /* xftxlfd.c */
  9731. func XXftDebug(tls *libc.TLS) (r int32) {
  9732. bp := tls.Alloc(16)
  9733. defer tls.Free(16)
  9734. var e uintptr
  9735. _ = e
  9736. if !(_initialized != 0) {
  9737. _initialized = int32(1)
  9738. e = libc.Xgetenv(tls, __ccgo_ts)
  9739. if e != 0 {
  9740. libc.Xprintf(tls, __ccgo_ts+10, libc.VaList(bp+8, e))
  9741. _debug = libc.Xatoi(tls, e)
  9742. if _debug <= 0 {
  9743. _debug = int32(1)
  9744. }
  9745. }
  9746. }
  9747. return _debug
  9748. }
  9749. var _initialized int32
  9750. var _debug int32
  9751. func __XftCloseDisplay(tls *libc.TLS, dpy uintptr, codes uintptr) (r int32) {
  9752. var info, prev, v2 uintptr
  9753. _, _, _ = info, prev, v2
  9754. info = X_XftDisplayInfoGet(tls, dpy, m_FcFalse)
  9755. if !(info != 0) {
  9756. return 0
  9757. }
  9758. /*
  9759. * Get rid of any dangling unreferenced fonts
  9760. */
  9761. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = 0
  9762. XXftFontManageMemory(tls, dpy)
  9763. /*
  9764. * Clean up the default values
  9765. */
  9766. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  9767. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  9768. }
  9769. /*
  9770. * Unhook from the global list
  9771. */
  9772. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9773. for {
  9774. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9775. info = v2
  9776. if !(v2 != 0) {
  9777. break
  9778. }
  9779. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9780. break
  9781. }
  9782. goto _1
  9783. _1:
  9784. ;
  9785. prev = *(*uintptr)(unsafe.Pointer(prev))
  9786. }
  9787. if info != libc.UintptrFromInt32(0) {
  9788. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9789. }
  9790. libc.Xfree(tls, info)
  9791. return 0
  9792. }
  9793. func X_XftDisplayInfoGet(tls *libc.TLS, dpy uintptr, createIfNecessary TFcBool) (r uintptr) {
  9794. bp := tls.Alloc(96)
  9795. defer tls.Free(96)
  9796. var format, info, prev, visual, v2, v3, v5 uintptr
  9797. var i int32
  9798. var _ /* error_base at bp+44 */ int32
  9799. var _ /* event_base at bp+40 */ int32
  9800. var _ /* major at bp+48 */ int32
  9801. var _ /* minor at bp+52 */ int32
  9802. var _ /* pf at bp+0 */ TXRenderPictFormat
  9803. _, _, _, _, _, _, _, _ = format, i, info, prev, visual, v2, v3, v5
  9804. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9805. for {
  9806. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9807. info = v2
  9808. if !(v2 != 0) {
  9809. break
  9810. }
  9811. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9812. /*
  9813. * MRU the list
  9814. */
  9815. if prev != uintptr(unsafe.Pointer(&X_XftDisplayInfo)) {
  9816. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9817. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  9818. X_XftDisplayInfo = info
  9819. }
  9820. return info
  9821. }
  9822. goto _1
  9823. _1:
  9824. ;
  9825. prev = *(*uintptr)(unsafe.Pointer(prev))
  9826. }
  9827. if !(createIfNecessary != 0) {
  9828. return libc.UintptrFromInt32(0)
  9829. }
  9830. info = libc.Xmalloc(tls, uint64(1488))
  9831. if !(info != 0) {
  9832. goto bail0
  9833. }
  9834. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes = libx11.XXAddExtension(tls, dpy)
  9835. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes != 0) {
  9836. goto bail1
  9837. }
  9838. libx11.XXESetCloseDisplay(tls, dpy, (*TXExtCodes)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes)).Fextension, __ccgo_fp(__XftCloseDisplay))
  9839. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay = dpy
  9840. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = libc.UintptrFromInt32(0)
  9841. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libc.UintptrFromInt32(0)
  9842. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender = libc.BoolInt32(libxrender.XXRenderQueryExtension(tls, dpy, bp+40, bp+44) != 0 && libxrender.XXRenderFindVisualFormat(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  9843. Fext_data uintptr
  9844. Fprivate1 uintptr
  9845. Ffd int32
  9846. Fprivate2 int32
  9847. Fproto_major_version int32
  9848. Fproto_minor_version int32
  9849. Fvendor uintptr
  9850. Fprivate3 TXID
  9851. Fprivate4 TXID
  9852. Fprivate5 TXID
  9853. Fprivate6 int32
  9854. Fresource_alloc uintptr
  9855. Fbyte_order int32
  9856. Fbitmap_unit int32
  9857. Fbitmap_pad int32
  9858. Fbitmap_bit_order int32
  9859. Fnformats int32
  9860. Fpixmap_format uintptr
  9861. Fprivate8 int32
  9862. Frelease int32
  9863. Fprivate9 uintptr
  9864. Fprivate10 uintptr
  9865. Fqlen int32
  9866. Flast_request_read uint64
  9867. Frequest uint64
  9868. Fprivate11 TXPointer
  9869. Fprivate12 TXPointer
  9870. Fprivate13 TXPointer
  9871. Fprivate14 TXPointer
  9872. Fmax_request_size uint32
  9873. Fdb uintptr
  9874. Fprivate15 uintptr
  9875. Fdisplay_name uintptr
  9876. Fdefault_screen int32
  9877. Fnscreens int32
  9878. Fscreens uintptr
  9879. Fmotion_buffer uint64
  9880. Fprivate16 uint64
  9881. Fmin_keycode int32
  9882. Fmax_keycode int32
  9883. Fprivate17 TXPointer
  9884. Fprivate18 TXPointer
  9885. Fprivate19 int32
  9886. Fxdefaults uintptr
  9887. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  9888. Fext_data uintptr
  9889. Fprivate1 uintptr
  9890. Ffd int32
  9891. Fprivate2 int32
  9892. Fproto_major_version int32
  9893. Fproto_minor_version int32
  9894. Fvendor uintptr
  9895. Fprivate3 TXID
  9896. Fprivate4 TXID
  9897. Fprivate5 TXID
  9898. Fprivate6 int32
  9899. Fresource_alloc uintptr
  9900. Fbyte_order int32
  9901. Fbitmap_unit int32
  9902. Fbitmap_pad int32
  9903. Fbitmap_bit_order int32
  9904. Fnformats int32
  9905. Fpixmap_format uintptr
  9906. Fprivate8 int32
  9907. Frelease int32
  9908. Fprivate9 uintptr
  9909. Fprivate10 uintptr
  9910. Fqlen int32
  9911. Flast_request_read uint64
  9912. Frequest uint64
  9913. Fprivate11 TXPointer
  9914. Fprivate12 TXPointer
  9915. Fprivate13 TXPointer
  9916. Fprivate14 TXPointer
  9917. Fmax_request_size uint32
  9918. Fdb uintptr
  9919. Fprivate15 uintptr
  9920. Fdisplay_name uintptr
  9921. Fdefault_screen int32
  9922. Fnscreens int32
  9923. Fscreens uintptr
  9924. Fmotion_buffer uint64
  9925. Fprivate16 uint64
  9926. Fmin_keycode int32
  9927. Fmax_keycode int32
  9928. Fprivate17 TXPointer
  9929. Fprivate18 TXPointer
  9930. Fprivate19 int32
  9931. Fxdefaults uintptr
  9932. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual) != libc.UintptrFromInt32(0))
  9933. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = int32(m_FcTrue)
  9934. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  9935. libxrender.XXRenderQueryVersion(tls, dpy, bp+48, bp+52)
  9936. if *(*int32)(unsafe.Pointer(bp + 48)) < 0 || *(*int32)(unsafe.Pointer(bp + 48)) == 0 && *(*int32)(unsafe.Pointer(bp + 52)) <= int32(2) {
  9937. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = m_FcFalse
  9938. }
  9939. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = m_FcFalse
  9940. if *(*int32)(unsafe.Pointer(bp + 48)) > 0 || *(*int32)(unsafe.Pointer(bp + 48)) == 0 && *(*int32)(unsafe.Pointer(bp + 52)) >= int32(10) {
  9941. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = int32(m_FcTrue)
  9942. }
  9943. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  9944. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = int32(32)
  9945. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FredMask = int16(0xff)
  9946. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FgreenMask = int16(0xff)
  9947. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FblueMask = int16(0xff)
  9948. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(0xff)
  9949. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libxrender.XXRenderFindFormat(tls, dpy, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(1)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(2)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(4)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(6)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(10)), bp, 0)
  9950. }
  9951. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  9952. visual = (*TScreen)(unsafe.Pointer((*struct {
  9953. Fext_data uintptr
  9954. Fprivate1 uintptr
  9955. Ffd int32
  9956. Fprivate2 int32
  9957. Fproto_major_version int32
  9958. Fproto_minor_version int32
  9959. Fvendor uintptr
  9960. Fprivate3 TXID
  9961. Fprivate4 TXID
  9962. Fprivate5 TXID
  9963. Fprivate6 int32
  9964. Fresource_alloc uintptr
  9965. Fbyte_order int32
  9966. Fbitmap_unit int32
  9967. Fbitmap_pad int32
  9968. Fbitmap_bit_order int32
  9969. Fnformats int32
  9970. Fpixmap_format uintptr
  9971. Fprivate8 int32
  9972. Frelease int32
  9973. Fprivate9 uintptr
  9974. Fprivate10 uintptr
  9975. Fqlen int32
  9976. Flast_request_read uint64
  9977. Frequest uint64
  9978. Fprivate11 TXPointer
  9979. Fprivate12 TXPointer
  9980. Fprivate13 TXPointer
  9981. Fprivate14 TXPointer
  9982. Fmax_request_size uint32
  9983. Fdb uintptr
  9984. Fprivate15 uintptr
  9985. Fdisplay_name uintptr
  9986. Fdefault_screen int32
  9987. Fnscreens int32
  9988. Fscreens uintptr
  9989. Fmotion_buffer uint64
  9990. Fprivate16 uint64
  9991. Fmin_keycode int32
  9992. Fmax_keycode int32
  9993. Fprivate17 TXPointer
  9994. Fprivate18 TXPointer
  9995. Fprivate19 int32
  9996. Fxdefaults uintptr
  9997. })(unsafe.Pointer(dpy)).Fscreens + uintptr((*struct {
  9998. Fext_data uintptr
  9999. Fprivate1 uintptr
  10000. Ffd int32
  10001. Fprivate2 int32
  10002. Fproto_major_version int32
  10003. Fproto_minor_version int32
  10004. Fvendor uintptr
  10005. Fprivate3 TXID
  10006. Fprivate4 TXID
  10007. Fprivate5 TXID
  10008. Fprivate6 int32
  10009. Fresource_alloc uintptr
  10010. Fbyte_order int32
  10011. Fbitmap_unit int32
  10012. Fbitmap_pad int32
  10013. Fbitmap_bit_order int32
  10014. Fnformats int32
  10015. Fpixmap_format uintptr
  10016. Fprivate8 int32
  10017. Frelease int32
  10018. Fprivate9 uintptr
  10019. Fprivate10 uintptr
  10020. Fqlen int32
  10021. Flast_request_read uint64
  10022. Frequest uint64
  10023. Fprivate11 TXPointer
  10024. Fprivate12 TXPointer
  10025. Fprivate13 TXPointer
  10026. Fprivate14 TXPointer
  10027. Fmax_request_size uint32
  10028. Fdb uintptr
  10029. Fprivate15 uintptr
  10030. Fdisplay_name uintptr
  10031. Fdefault_screen int32
  10032. Fnscreens int32
  10033. Fscreens uintptr
  10034. Fmotion_buffer uint64
  10035. Fprivate16 uint64
  10036. Fmin_keycode int32
  10037. Fmax_keycode int32
  10038. Fprivate17 TXPointer
  10039. Fprivate18 TXPointer
  10040. Fprivate19 int32
  10041. Fxdefaults uintptr
  10042. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual
  10043. format = libxrender.XXRenderFindVisualFormat(tls, dpy, visual)
  10044. libc.Xprintf(tls, __ccgo_ts+24, libc.VaList(bp+64, libc.Int32FromUint64((*TVisual)(unsafe.Pointer(visual)).Fvisualid)))
  10045. if format != 0 {
  10046. if (*TXRenderPictFormat)(unsafe.Pointer(format)).Ftype1 == int32(m_PictTypeDirect) {
  10047. libc.Xprintf(tls, __ccgo_ts+63, libc.VaList(bp+64, int32((*TXRenderPictFormat)(unsafe.Pointer(format)).Fdirect.Falpha), int32((*TXRenderPictFormat)(unsafe.Pointer(format)).Fdirect.Fred), int32((*TXRenderPictFormat)(unsafe.Pointer(format)).Fdirect.Fgreen), int32((*TXRenderPictFormat)(unsafe.Pointer(format)).Fdirect.Fblue)))
  10048. } else {
  10049. libc.Xprintf(tls, __ccgo_ts+83, 0)
  10050. }
  10051. } else {
  10052. libc.Xprintf(tls, __ccgo_ts+99, 0)
  10053. }
  10054. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  10055. v3 = __ccgo_ts + 136
  10056. } else {
  10057. v3 = __ccgo_ts + 141
  10058. }
  10059. libc.Xprintf(tls, __ccgo_ts+147, libc.VaList(bp+64, v3))
  10060. }
  10061. i = 0
  10062. for {
  10063. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  10064. break
  10065. }
  10066. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = -int32(1)
  10067. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  10068. goto _4
  10069. _4:
  10070. ;
  10071. i++
  10072. }
  10073. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = libc.UintptrFromInt32(0)
  10074. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  10075. X_XftDisplayInfo = info
  10076. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory = uint64(0)
  10077. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint64FromInt32(XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, 0, libc.Int32FromInt32(4)*libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  10078. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10079. libc.Xprintf(tls, __ccgo_ts+216, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10080. }
  10081. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts = 0
  10082. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, int32(m_XFT_DPY_MAX_UNREF_FONTS))
  10083. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10084. libc.Xprintf(tls, __ccgo_ts+259, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  10085. }
  10086. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = m_FcFalse
  10087. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = XXftDefaultGetBool(tls, dpy, __ccgo_ts+287, 0, m_FcFalse)
  10088. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10089. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage != 0 {
  10090. v5 = __ccgo_ts + 301
  10091. } else {
  10092. v5 = __ccgo_ts + 306
  10093. }
  10094. libc.Xprintf(tls, __ccgo_ts+312, libc.VaList(bp+64, v5))
  10095. }
  10096. libc.Xmemset(tls, info+472, int32('\000'), libc.Uint64FromInt64(8)*libc.Uint64FromInt32(m_XFT_NUM_FONT_HASH))
  10097. return info
  10098. goto bail1
  10099. bail1:
  10100. ;
  10101. libc.Xfree(tls, info)
  10102. goto bail0
  10103. bail0:
  10104. ;
  10105. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  10106. libc.Xprintf(tls, __ccgo_ts+340, 0)
  10107. }
  10108. return libc.UintptrFromInt32(0)
  10109. }
  10110. /*
  10111. * Reduce memory usage in X server
  10112. */
  10113. func __XftDisplayValidateMemory(tls *libc.TLS, info uintptr) {
  10114. bp := tls.Alloc(32)
  10115. defer tls.Free(32)
  10116. var font, public uintptr
  10117. var glyph_memory uint64
  10118. _, _, _ = font, glyph_memory, public
  10119. glyph_memory = uint64(0)
  10120. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10121. for {
  10122. if !(public != 0) {
  10123. break
  10124. }
  10125. font = public
  10126. glyph_memory += (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10127. goto _1
  10128. _1:
  10129. ;
  10130. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10131. }
  10132. if glyph_memory != (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory {
  10133. libc.Xprintf(tls, __ccgo_ts+393, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, glyph_memory))
  10134. }
  10135. }
  10136. func X_XftDisplayManageMemory(tls *libc.TLS, dpy uintptr) {
  10137. bp := tls.Alloc(32)
  10138. defer tls.Free(32)
  10139. var font, info, public uintptr
  10140. var glyph_memory uint64
  10141. _, _, _, _ = font, glyph_memory, info, public
  10142. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  10143. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10144. return
  10145. }
  10146. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10147. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10148. libc.Xprintf(tls, __ccgo_ts+455, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10149. }
  10150. __XftDisplayValidateMemory(tls, info)
  10151. }
  10152. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10153. glyph_memory = libc.Uint64FromInt32(libc.Xrand(tls)) % (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory
  10154. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10155. for public != 0 {
  10156. font = public
  10157. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > glyph_memory {
  10158. X_XftFontUncacheGlyph(tls, dpy, public)
  10159. break
  10160. }
  10161. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10162. glyph_memory -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10163. }
  10164. }
  10165. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10166. __XftDisplayValidateMemory(tls, info)
  10167. }
  10168. }
  10169. func XXftDefaultHasRender(tls *libc.TLS, dpy uintptr) (r int32) {
  10170. var info uintptr
  10171. _ = info
  10172. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10173. if !(info != 0) {
  10174. return m_False
  10175. }
  10176. return (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  10177. }
  10178. func XXftDefaultSet(tls *libc.TLS, dpy uintptr, defaults uintptr) (r int32) {
  10179. bp := tls.Alloc(16)
  10180. defer tls.Free(16)
  10181. var info, v1 uintptr
  10182. _, _ = info, v1
  10183. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10184. if !(info != 0) {
  10185. return m_False
  10186. }
  10187. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  10188. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  10189. }
  10190. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = defaults
  10191. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10192. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint64FromInt32(libc.Int32FromInt32(4) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  10193. }
  10194. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint64FromInt32(XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, 0, libc.Int32FromUint64((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory)))
  10195. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10196. libc.Xprintf(tls, __ccgo_ts+493, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10197. }
  10198. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts != 0) {
  10199. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = int32(m_XFT_DPY_MAX_UNREF_FONTS)
  10200. }
  10201. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts)
  10202. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10203. libc.Xprintf(tls, __ccgo_ts+522, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  10204. }
  10205. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = XXftDefaultGetBool(tls, dpy, __ccgo_ts+287, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage)
  10206. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10207. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage != 0 {
  10208. v1 = __ccgo_ts + 301
  10209. } else {
  10210. v1 = __ccgo_ts + 306
  10211. }
  10212. libc.Xprintf(tls, __ccgo_ts+550, libc.VaList(bp+8, v1))
  10213. }
  10214. return int32(m_True)
  10215. }
  10216. func XXftDefaultParseBool(tls *libc.TLS, v uintptr) (r int32) {
  10217. var c0, c1 uint8
  10218. _, _ = c0, c1
  10219. c0 = *(*uint8)(unsafe.Pointer(v))
  10220. if libc.BoolInt32(libc.Uint32FromInt32(libc.Int32FromUint8(c0))-uint32('A') < uint32(26)) != 0 {
  10221. c0 = libc.Uint8FromInt32(libc.Xtolower(tls, libc.Int32FromUint8(c0)))
  10222. }
  10223. if libc.Int32FromUint8(c0) == int32('t') || libc.Int32FromUint8(c0) == int32('y') || libc.Int32FromUint8(c0) == int32('1') {
  10224. return int32(1)
  10225. }
  10226. if libc.Int32FromUint8(c0) == int32('f') || libc.Int32FromUint8(c0) == int32('n') || libc.Int32FromUint8(c0) == int32('0') {
  10227. return 0
  10228. }
  10229. if libc.Int32FromUint8(c0) == int32('o') {
  10230. c1 = *(*uint8)(unsafe.Pointer(v + 1))
  10231. if libc.BoolInt32(libc.Uint32FromInt32(libc.Int32FromUint8(c1))-uint32('A') < uint32(26)) != 0 {
  10232. c1 = libc.Uint8FromInt32(libc.Xtolower(tls, libc.Int32FromUint8(c1)))
  10233. }
  10234. if libc.Int32FromUint8(c1) == int32('n') {
  10235. return int32(1)
  10236. }
  10237. if libc.Int32FromUint8(c1) == int32('f') {
  10238. return 0
  10239. }
  10240. }
  10241. return -int32(1)
  10242. }
  10243. func __XftDefaultInitBool(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10244. var i, v1 int32
  10245. var v uintptr
  10246. var v2 bool
  10247. _, _, _, _ = i, v, v1, v2
  10248. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10249. if v2 = v != 0; v2 {
  10250. v1 = XXftDefaultParseBool(tls, v)
  10251. i = v1
  10252. }
  10253. if v2 && v1 >= 0 {
  10254. return libfontconfig.XFcPatternAddBool(tls, pat, option, libc.BoolInt32(i != 0))
  10255. }
  10256. return int32(m_True)
  10257. }
  10258. func __XftDefaultInitDouble(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10259. bp := tls.Alloc(16)
  10260. defer tls.Free(16)
  10261. var d float64
  10262. var v uintptr
  10263. var _ /* e at bp+0 */ uintptr
  10264. _, _ = d, v
  10265. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10266. if v != 0 {
  10267. d = libc.Xstrtod(tls, v, bp)
  10268. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10269. return libfontconfig.XFcPatternAddDouble(tls, pat, option, d)
  10270. }
  10271. }
  10272. return int32(m_True)
  10273. }
  10274. func __XftDefaultInitInteger(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10275. bp := tls.Alloc(16)
  10276. defer tls.Free(16)
  10277. var v uintptr
  10278. var _ /* e at bp+0 */ uintptr
  10279. var _ /* i at bp+8 */ int32
  10280. _ = v
  10281. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10282. if v != 0 {
  10283. if libfontconfig.XFcNameConstant(tls, v, bp+8) != 0 {
  10284. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10285. }
  10286. *(*int32)(unsafe.Pointer(bp + 8)) = int32(libc.Xstrtol(tls, v, bp, 0))
  10287. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10288. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10289. }
  10290. }
  10291. return int32(m_True)
  10292. }
  10293. func __XftDefaultInit(tls *libc.TLS, dpy uintptr) (r uintptr) {
  10294. var pat uintptr
  10295. _ = pat
  10296. pat = libfontconfig.XFcPatternCreate(tls)
  10297. if !(pat != 0) {
  10298. goto bail0
  10299. }
  10300. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+582) != 0) {
  10301. goto bail1
  10302. }
  10303. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+588) != 0) {
  10304. goto bail1
  10305. }
  10306. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+592) != 0) {
  10307. goto bail1
  10308. }
  10309. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+599) != 0) {
  10310. goto bail1
  10311. }
  10312. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+604) != 0) {
  10313. goto bail1
  10314. }
  10315. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+614) != 0) {
  10316. goto bail1
  10317. }
  10318. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+624) != 0) {
  10319. goto bail1
  10320. }
  10321. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+633) != 0) {
  10322. goto bail1
  10323. }
  10324. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+642) != 0) {
  10325. goto bail1
  10326. }
  10327. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+652) != 0) {
  10328. goto bail1
  10329. }
  10330. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+660) != 0) {
  10331. goto bail1
  10332. }
  10333. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+201) != 0) {
  10334. goto bail1
  10335. }
  10336. return pat
  10337. goto bail1
  10338. bail1:
  10339. ;
  10340. libfontconfig.XFcPatternDestroy(tls, pat)
  10341. goto bail0
  10342. bail0:
  10343. ;
  10344. return libc.UintptrFromInt32(0)
  10345. return r
  10346. }
  10347. func __XftDefaultGet(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, v uintptr) (r1 TFcResult) {
  10348. var info uintptr
  10349. var r TFcResult
  10350. _, _ = info, r
  10351. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10352. if !(info != 0) {
  10353. return int32(_FcResultNoMatch)
  10354. }
  10355. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10356. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = __XftDefaultInit(tls, dpy)
  10357. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10358. return int32(_FcResultNoMatch)
  10359. }
  10360. }
  10361. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, screen, v)
  10362. if r == int32(_FcResultNoId) && screen > 0 {
  10363. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, 0, v)
  10364. }
  10365. return r
  10366. }
  10367. func XXftDefaultGetBool(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10368. bp := tls.Alloc(16)
  10369. defer tls.Free(16)
  10370. var r TFcResult
  10371. var _ /* v at bp+0 */ TFcValue
  10372. _ = r
  10373. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10374. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeBool) {
  10375. return def
  10376. }
  10377. return *(*TFcBool)(unsafe.Pointer(bp + 8))
  10378. }
  10379. func XXftDefaultGetInteger(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(_FcTypeInteger) {
  10387. return def
  10388. }
  10389. return *(*int32)(unsafe.Pointer(bp + 8))
  10390. }
  10391. func XXftDefaultGetDouble(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def float64) (r1 float64) {
  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(_FcTypeDouble) {
  10399. return def
  10400. }
  10401. return *(*float64)(unsafe.Pointer(bp + 8))
  10402. }
  10403. func XXftDefaultSubstitute(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr) {
  10404. bp := tls.Alloc(16)
  10405. defer tls.Free(16)
  10406. var dpi float64
  10407. var render_order, subpixel int32
  10408. var _ /* v at bp+0 */ TFcValue
  10409. _, _, _ = dpi, render_order, subpixel
  10410. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+592, 0, bp) == int32(_FcResultNoMatch) {
  10411. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+592, XXftDefaultGetBool(tls, dpy, __ccgo_ts+592, screen, XXftDefaultHasRender(tls, dpy)))
  10412. }
  10413. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+614, 0, bp) == int32(_FcResultNoMatch) {
  10414. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+614, XXftDefaultGetBool(tls, dpy, __ccgo_ts+614, screen, int32(m_True)))
  10415. }
  10416. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+624, 0, bp) == int32(_FcResultNoMatch) {
  10417. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+624, XXftDefaultGetBool(tls, dpy, __ccgo_ts+624, screen, m_False))
  10418. }
  10419. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+652, 0, bp) == int32(_FcResultNoMatch) {
  10420. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+652, XXftDefaultGetBool(tls, dpy, __ccgo_ts+652, screen, int32(m_True)))
  10421. }
  10422. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+642, 0, bp) == int32(_FcResultNoMatch) {
  10423. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+642, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+642, screen, int32(m_FC_HINT_FULL)))
  10424. }
  10425. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+633, 0, bp) == int32(_FcResultNoMatch) {
  10426. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+633, XXftDefaultGetBool(tls, dpy, __ccgo_ts+633, screen, m_False))
  10427. }
  10428. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+599, 0, bp) == int32(_FcResultNoMatch) {
  10429. subpixel = m_FC_RGBA_UNKNOWN
  10430. if XXftDefaultHasRender(tls, dpy) != 0 {
  10431. render_order = libxrender.XXRenderQuerySubpixelOrder(tls, dpy, screen)
  10432. switch render_order {
  10433. default:
  10434. fallthrough
  10435. case m_SubPixelUnknown:
  10436. subpixel = m_FC_RGBA_UNKNOWN
  10437. case int32(m_SubPixelHorizontalRGB):
  10438. subpixel = int32(m_FC_RGBA_RGB)
  10439. case int32(m_SubPixelHorizontalBGR):
  10440. subpixel = int32(m_FC_RGBA_BGR)
  10441. case int32(m_SubPixelVerticalRGB):
  10442. subpixel = int32(m_FC_RGBA_VRGB)
  10443. case int32(m_SubPixelVerticalBGR):
  10444. subpixel = int32(m_FC_RGBA_VBGR)
  10445. case int32(m_SubPixelNone):
  10446. subpixel = int32(m_FC_RGBA_NONE)
  10447. break
  10448. }
  10449. }
  10450. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+599, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+599, screen, subpixel))
  10451. }
  10452. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+604, 0, bp) == int32(_FcResultNoMatch) {
  10453. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+604, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+604, screen, int32(m_FC_LCD_DEFAULT)))
  10454. }
  10455. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+660, 0, bp) == int32(_FcResultNoMatch) {
  10456. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+660, XXftDefaultGetBool(tls, dpy, __ccgo_ts+660, screen, m_False))
  10457. }
  10458. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+588, 0, bp) == int32(_FcResultNoMatch) {
  10459. dpi = float64(float64((*TScreen)(unsafe.Pointer((*struct {
  10460. Fext_data uintptr
  10461. Fprivate1 uintptr
  10462. Ffd int32
  10463. Fprivate2 int32
  10464. Fproto_major_version int32
  10465. Fproto_minor_version int32
  10466. Fvendor uintptr
  10467. Fprivate3 TXID
  10468. Fprivate4 TXID
  10469. Fprivate5 TXID
  10470. Fprivate6 int32
  10471. Fresource_alloc uintptr
  10472. Fbyte_order int32
  10473. Fbitmap_unit int32
  10474. Fbitmap_pad int32
  10475. Fbitmap_bit_order int32
  10476. Fnformats int32
  10477. Fpixmap_format uintptr
  10478. Fprivate8 int32
  10479. Frelease int32
  10480. Fprivate9 uintptr
  10481. Fprivate10 uintptr
  10482. Fqlen int32
  10483. Flast_request_read uint64
  10484. Frequest uint64
  10485. Fprivate11 TXPointer
  10486. Fprivate12 TXPointer
  10487. Fprivate13 TXPointer
  10488. Fprivate14 TXPointer
  10489. Fmax_request_size uint32
  10490. Fdb uintptr
  10491. Fprivate15 uintptr
  10492. Fdisplay_name uintptr
  10493. Fdefault_screen int32
  10494. Fnscreens int32
  10495. Fscreens uintptr
  10496. Fmotion_buffer uint64
  10497. Fprivate16 uint64
  10498. Fmin_keycode int32
  10499. Fmax_keycode int32
  10500. Fprivate17 TXPointer
  10501. Fprivate18 TXPointer
  10502. Fprivate19 int32
  10503. Fxdefaults uintptr
  10504. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fheight)*float64(25.4)) / float64((*TScreen)(unsafe.Pointer((*struct {
  10505. Fext_data uintptr
  10506. Fprivate1 uintptr
  10507. Ffd int32
  10508. Fprivate2 int32
  10509. Fproto_major_version int32
  10510. Fproto_minor_version int32
  10511. Fvendor uintptr
  10512. Fprivate3 TXID
  10513. Fprivate4 TXID
  10514. Fprivate5 TXID
  10515. Fprivate6 int32
  10516. Fresource_alloc uintptr
  10517. Fbyte_order int32
  10518. Fbitmap_unit int32
  10519. Fbitmap_pad int32
  10520. Fbitmap_bit_order int32
  10521. Fnformats int32
  10522. Fpixmap_format uintptr
  10523. Fprivate8 int32
  10524. Frelease int32
  10525. Fprivate9 uintptr
  10526. Fprivate10 uintptr
  10527. Fqlen int32
  10528. Flast_request_read uint64
  10529. Frequest uint64
  10530. Fprivate11 TXPointer
  10531. Fprivate12 TXPointer
  10532. Fprivate13 TXPointer
  10533. Fprivate14 TXPointer
  10534. Fmax_request_size uint32
  10535. Fdb uintptr
  10536. Fprivate15 uintptr
  10537. Fdisplay_name uintptr
  10538. Fdefault_screen int32
  10539. Fnscreens int32
  10540. Fscreens uintptr
  10541. Fmotion_buffer uint64
  10542. Fprivate16 uint64
  10543. Fmin_keycode int32
  10544. Fmax_keycode int32
  10545. Fprivate17 TXPointer
  10546. Fprivate18 TXPointer
  10547. Fprivate19 int32
  10548. Fxdefaults uintptr
  10549. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fmheight)
  10550. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+588, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+588, screen, dpi))
  10551. }
  10552. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+582, 0, bp) == int32(_FcResultNoMatch) {
  10553. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+582, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+582, screen, float64(1)))
  10554. }
  10555. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+201, 0, bp) == int32(_FcResultNoMatch) {
  10556. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+201, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, screen, libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  10557. }
  10558. libfontconfig.XFcDefaultSubstitute(tls, pattern)
  10559. }
  10560. const m_VisualIDMask1 = 1
  10561. const m_VisualScreenMask1 = 2
  10562. /* xftxlfd.c */
  10563. /*
  10564. * Ok, this is a pain. To share source pictures across multiple destinations,
  10565. * the screen for each drawable must be discovered.
  10566. */
  10567. func __XftDrawScreen(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr) (r int32) {
  10568. bp := tls.Alloc(112)
  10569. defer tls.Free(112)
  10570. var ret uintptr
  10571. var s int32
  10572. var _ /* borderWidth at bp+24 */ uint32
  10573. var _ /* depth at bp+28 */ uint32
  10574. var _ /* height at bp+20 */ uint32
  10575. var _ /* nret at bp+96 */ int32
  10576. var _ /* root at bp+0 */ TWindow
  10577. var _ /* template at bp+32 */ TXVisualInfo
  10578. var _ /* width at bp+16 */ uint32
  10579. var _ /* x at bp+8 */ int32
  10580. var _ /* y at bp+12 */ int32
  10581. _, _ = ret, s
  10582. /* Special case the most common environment */
  10583. if (*struct {
  10584. Fext_data uintptr
  10585. Fprivate1 uintptr
  10586. Ffd int32
  10587. Fprivate2 int32
  10588. Fproto_major_version int32
  10589. Fproto_minor_version int32
  10590. Fvendor uintptr
  10591. Fprivate3 TXID
  10592. Fprivate4 TXID
  10593. Fprivate5 TXID
  10594. Fprivate6 int32
  10595. Fresource_alloc uintptr
  10596. Fbyte_order int32
  10597. Fbitmap_unit int32
  10598. Fbitmap_pad int32
  10599. Fbitmap_bit_order int32
  10600. Fnformats int32
  10601. Fpixmap_format uintptr
  10602. Fprivate8 int32
  10603. Frelease int32
  10604. Fprivate9 uintptr
  10605. Fprivate10 uintptr
  10606. Fqlen int32
  10607. Flast_request_read uint64
  10608. Frequest uint64
  10609. Fprivate11 TXPointer
  10610. Fprivate12 TXPointer
  10611. Fprivate13 TXPointer
  10612. Fprivate14 TXPointer
  10613. Fmax_request_size uint32
  10614. Fdb uintptr
  10615. Fprivate15 uintptr
  10616. Fdisplay_name uintptr
  10617. Fdefault_screen int32
  10618. Fnscreens int32
  10619. Fscreens uintptr
  10620. Fmotion_buffer uint64
  10621. Fprivate16 uint64
  10622. Fmin_keycode int32
  10623. Fmax_keycode int32
  10624. Fprivate17 TXPointer
  10625. Fprivate18 TXPointer
  10626. Fprivate19 int32
  10627. Fxdefaults uintptr
  10628. })(unsafe.Pointer(dpy)).Fnscreens == int32(1) {
  10629. return 0
  10630. }
  10631. /*
  10632. * If we've got a visual, look for the screen that points at it.
  10633. * This requires no round trip.
  10634. */
  10635. if visual != 0 {
  10636. s = 0
  10637. for {
  10638. if !(s < (*struct {
  10639. Fext_data uintptr
  10640. Fprivate1 uintptr
  10641. Ffd int32
  10642. Fprivate2 int32
  10643. Fproto_major_version int32
  10644. Fproto_minor_version int32
  10645. Fvendor uintptr
  10646. Fprivate3 TXID
  10647. Fprivate4 TXID
  10648. Fprivate5 TXID
  10649. Fprivate6 int32
  10650. Fresource_alloc uintptr
  10651. Fbyte_order int32
  10652. Fbitmap_unit int32
  10653. Fbitmap_pad int32
  10654. Fbitmap_bit_order int32
  10655. Fnformats int32
  10656. Fpixmap_format uintptr
  10657. Fprivate8 int32
  10658. Frelease int32
  10659. Fprivate9 uintptr
  10660. Fprivate10 uintptr
  10661. Fqlen int32
  10662. Flast_request_read uint64
  10663. Frequest uint64
  10664. Fprivate11 TXPointer
  10665. Fprivate12 TXPointer
  10666. Fprivate13 TXPointer
  10667. Fprivate14 TXPointer
  10668. Fmax_request_size uint32
  10669. Fdb uintptr
  10670. Fprivate15 uintptr
  10671. Fdisplay_name uintptr
  10672. Fdefault_screen int32
  10673. Fnscreens int32
  10674. Fscreens uintptr
  10675. Fmotion_buffer uint64
  10676. Fprivate16 uint64
  10677. Fmin_keycode int32
  10678. Fmax_keycode int32
  10679. Fprivate17 TXPointer
  10680. Fprivate18 TXPointer
  10681. Fprivate19 int32
  10682. Fxdefaults uintptr
  10683. })(unsafe.Pointer(dpy)).Fnscreens) {
  10684. break
  10685. }
  10686. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fvisualid = (*TVisual)(unsafe.Pointer(visual)).Fvisualid
  10687. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fscreen = s
  10688. ret = libx11.XXGetVisualInfo(tls, dpy, int64(libc.Int32FromInt32(m_VisualIDMask1)|libc.Int32FromInt32(m_VisualScreenMask1)), bp+32, bp+96)
  10689. if ret != 0 {
  10690. libx11.XXFree(tls, ret)
  10691. return s
  10692. }
  10693. goto _1
  10694. _1:
  10695. ;
  10696. s++
  10697. }
  10698. }
  10699. /*
  10700. * Otherwise, as the server for the drawable geometry and find
  10701. * the screen from the root window.
  10702. * This takes a round trip.
  10703. */
  10704. if libx11.XXGetGeometry(tls, dpy, drawable, bp, bp+8, bp+12, bp+16, bp+20, bp+24, bp+28) != 0 {
  10705. s = 0
  10706. for {
  10707. if !(s < (*struct {
  10708. Fext_data uintptr
  10709. Fprivate1 uintptr
  10710. Ffd int32
  10711. Fprivate2 int32
  10712. Fproto_major_version int32
  10713. Fproto_minor_version int32
  10714. Fvendor uintptr
  10715. Fprivate3 TXID
  10716. Fprivate4 TXID
  10717. Fprivate5 TXID
  10718. Fprivate6 int32
  10719. Fresource_alloc uintptr
  10720. Fbyte_order int32
  10721. Fbitmap_unit int32
  10722. Fbitmap_pad int32
  10723. Fbitmap_bit_order int32
  10724. Fnformats int32
  10725. Fpixmap_format uintptr
  10726. Fprivate8 int32
  10727. Frelease int32
  10728. Fprivate9 uintptr
  10729. Fprivate10 uintptr
  10730. Fqlen int32
  10731. Flast_request_read uint64
  10732. Frequest uint64
  10733. Fprivate11 TXPointer
  10734. Fprivate12 TXPointer
  10735. Fprivate13 TXPointer
  10736. Fprivate14 TXPointer
  10737. Fmax_request_size uint32
  10738. Fdb uintptr
  10739. Fprivate15 uintptr
  10740. Fdisplay_name uintptr
  10741. Fdefault_screen int32
  10742. Fnscreens int32
  10743. Fscreens uintptr
  10744. Fmotion_buffer uint64
  10745. Fprivate16 uint64
  10746. Fmin_keycode int32
  10747. Fmax_keycode int32
  10748. Fprivate17 TXPointer
  10749. Fprivate18 TXPointer
  10750. Fprivate19 int32
  10751. Fxdefaults uintptr
  10752. })(unsafe.Pointer(dpy)).Fnscreens) {
  10753. break
  10754. }
  10755. if (*TScreen)(unsafe.Pointer((*struct {
  10756. Fext_data uintptr
  10757. Fprivate1 uintptr
  10758. Ffd int32
  10759. Fprivate2 int32
  10760. Fproto_major_version int32
  10761. Fproto_minor_version int32
  10762. Fvendor uintptr
  10763. Fprivate3 TXID
  10764. Fprivate4 TXID
  10765. Fprivate5 TXID
  10766. Fprivate6 int32
  10767. Fresource_alloc uintptr
  10768. Fbyte_order int32
  10769. Fbitmap_unit int32
  10770. Fbitmap_pad int32
  10771. Fbitmap_bit_order int32
  10772. Fnformats int32
  10773. Fpixmap_format uintptr
  10774. Fprivate8 int32
  10775. Frelease int32
  10776. Fprivate9 uintptr
  10777. Fprivate10 uintptr
  10778. Fqlen int32
  10779. Flast_request_read uint64
  10780. Frequest uint64
  10781. Fprivate11 TXPointer
  10782. Fprivate12 TXPointer
  10783. Fprivate13 TXPointer
  10784. Fprivate14 TXPointer
  10785. Fmax_request_size uint32
  10786. Fdb uintptr
  10787. Fprivate15 uintptr
  10788. Fdisplay_name uintptr
  10789. Fdefault_screen int32
  10790. Fnscreens int32
  10791. Fscreens uintptr
  10792. Fmotion_buffer uint64
  10793. Fprivate16 uint64
  10794. Fmin_keycode int32
  10795. Fmax_keycode int32
  10796. Fprivate17 TXPointer
  10797. Fprivate18 TXPointer
  10798. Fprivate19 int32
  10799. Fxdefaults uintptr
  10800. })(unsafe.Pointer(dpy)).Fscreens+uintptr(s)*128)).Froot == *(*TWindow)(unsafe.Pointer(bp)) {
  10801. return s
  10802. }
  10803. goto _2
  10804. _2:
  10805. ;
  10806. s++
  10807. }
  10808. }
  10809. /*
  10810. * Make a guess -- it's probably wrong, but then the app probably
  10811. * handed us a bogus drawable in this case
  10812. */
  10813. return 0
  10814. }
  10815. func XXftDrawDepth(tls *libc.TLS, draw uintptr) (r uint32) {
  10816. bp := tls.Alloc(32)
  10817. defer tls.Free(32)
  10818. var _ /* borderWidth at bp+24 */ uint32
  10819. var _ /* depth at bp+28 */ uint32
  10820. var _ /* height at bp+20 */ uint32
  10821. var _ /* root at bp+0 */ TWindow
  10822. var _ /* width at bp+16 */ uint32
  10823. var _ /* x at bp+8 */ int32
  10824. var _ /* y at bp+12 */ int32
  10825. if !((*TXftDraw)(unsafe.Pointer(draw)).Fdepth != 0) {
  10826. if libx11.XXGetGeometry(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, bp, bp+8, bp+12, bp+16, bp+20, bp+24, bp+28) != 0 {
  10827. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = *(*uint32)(unsafe.Pointer(bp + 28))
  10828. }
  10829. }
  10830. return (*TXftDraw)(unsafe.Pointer(draw)).Fdepth
  10831. }
  10832. func XXftDrawBitsPerPixel(tls *libc.TLS, draw uintptr) (r uint32) {
  10833. bp := tls.Alloc(16)
  10834. defer tls.Free(16)
  10835. var depth, v1 uint32
  10836. var formats, v2 uintptr
  10837. var i int32
  10838. var v3 bool
  10839. var _ /* nformats at bp+0 */ int32
  10840. _, _, _, _, _, _ = depth, formats, i, v1, v2, v3
  10841. if !((*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel != 0) {
  10842. v1 = XXftDrawDepth(tls, draw)
  10843. depth = v1
  10844. if v3 = v1 != 0; v3 {
  10845. v2 = libx11.XXListPixmapFormats(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, bp)
  10846. formats = v2
  10847. }
  10848. if v3 && v2 != 0 {
  10849. i = 0
  10850. for {
  10851. if !(i < *(*int32)(unsafe.Pointer(bp))) {
  10852. break
  10853. }
  10854. if libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fdepth) == depth {
  10855. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fbits_per_pixel)
  10856. break
  10857. }
  10858. goto _4
  10859. _4:
  10860. ;
  10861. i++
  10862. }
  10863. libx11.XXFree(tls, formats)
  10864. }
  10865. }
  10866. return (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel
  10867. }
  10868. func XXftDrawCreate(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr, colormap TColormap) (r uintptr) {
  10869. var draw uintptr
  10870. _ = draw
  10871. draw = libc.Xmalloc(tls, uint64(96))
  10872. if !(draw != 0) {
  10873. return libc.UintptrFromInt32(0)
  10874. }
  10875. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10876. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10877. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, drawable, visual)
  10878. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(0) /* don't find out unless we need to know */
  10879. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out unless we need to know */
  10880. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = visual
  10881. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = colormap
  10882. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10883. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10884. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10885. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10886. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10887. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint64(96))
  10888. return draw
  10889. }
  10890. func XXftDrawCreateBitmap(tls *libc.TLS, dpy uintptr, bitmap TPixmap) (r uintptr) {
  10891. var draw uintptr
  10892. _ = draw
  10893. draw = libc.Xmalloc(tls, uint64(96))
  10894. if !(draw != 0) {
  10895. return libc.UintptrFromInt32(0)
  10896. }
  10897. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10898. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = bitmap
  10899. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, bitmap, libc.UintptrFromInt32(0))
  10900. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(1)
  10901. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(1)
  10902. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10903. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10904. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10905. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10906. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10907. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10908. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10909. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint64(96))
  10910. return draw
  10911. }
  10912. func XXftDrawCreateAlpha(tls *libc.TLS, dpy uintptr, pixmap TPixmap, depth int32) (r uintptr) {
  10913. var draw uintptr
  10914. _ = draw
  10915. draw = libc.Xmalloc(tls, uint64(96))
  10916. if !(draw != 0) {
  10917. return libc.UintptrFromInt32(0)
  10918. }
  10919. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10920. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = pixmap
  10921. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, pixmap, libc.UintptrFromInt32(0))
  10922. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = libc.Uint32FromInt32(depth)
  10923. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out until we need it */
  10924. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10925. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10926. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10927. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10928. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10929. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10930. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10931. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint64(96))
  10932. return draw
  10933. }
  10934. func __XftDrawFormat(tls *libc.TLS, draw uintptr) (r uintptr) {
  10935. bp := tls.Alloc(48)
  10936. defer tls.Free(48)
  10937. var info uintptr
  10938. var _ /* pf at bp+0 */ TXRenderPictFormat
  10939. _ = info
  10940. info = X_XftDisplayInfoGet(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_True))
  10941. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0) {
  10942. return libc.UintptrFromInt32(0)
  10943. }
  10944. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual == libc.UintptrFromInt32(0) {
  10945. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  10946. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = libc.Int32FromUint32(XXftDrawDepth(tls, draw))
  10947. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.Falpha = 0
  10948. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(libc.Int32FromInt32(1)<<(*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth - libc.Int32FromInt32(1))
  10949. return libxrender.XXRenderFindFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(1)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(2)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(9)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(10)), bp, 0)
  10950. } else {
  10951. return libxrender.XXRenderFindVisualFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fvisual)
  10952. }
  10953. return r
  10954. }
  10955. func XXftDrawChange(tls *libc.TLS, draw uintptr, drawable TDrawable) {
  10956. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10957. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10958. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10959. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10960. }
  10961. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10962. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10963. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10964. }
  10965. }
  10966. func XXftDrawDisplay(tls *libc.TLS, draw uintptr) (r uintptr) {
  10967. return (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  10968. }
  10969. func XXftDrawDrawable(tls *libc.TLS, draw uintptr) (r TDrawable) {
  10970. return (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable
  10971. }
  10972. func XXftDrawColormap(tls *libc.TLS, draw uintptr) (r TColormap) {
  10973. return (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap
  10974. }
  10975. func XXftDrawVisual(tls *libc.TLS, draw uintptr) (r uintptr) {
  10976. return (*TXftDraw)(unsafe.Pointer(draw)).Fvisual
  10977. }
  10978. func XXftDrawDestroy(tls *libc.TLS, draw uintptr) {
  10979. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10980. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10981. }
  10982. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10983. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10984. }
  10985. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  10986. case int32(_XftClipTypeRegion):
  10987. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  10988. case int32(_XftClipTypeRectangles):
  10989. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  10990. case int32(_XftClipTypeNone):
  10991. break
  10992. }
  10993. XXftMemFree(tls, int32(_XFT_MEM_DRAW), uint64(96))
  10994. libc.Xfree(tls, draw)
  10995. }
  10996. func XXftDrawSrcPicture(tls *libc.TLS, draw uintptr, color uintptr) (r TPicture) {
  10997. bp := tls.Alloc(96)
  10998. defer tls.Free(96)
  10999. var dpy, info uintptr
  11000. var i int32
  11001. var pix TPixmap
  11002. var _ /* bitmapColor at bp+0 */ TXftColor
  11003. var _ /* pa at bp+16 */ TXRenderPictureAttributes
  11004. _, _, _, _ = dpy, i, info, pix
  11005. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  11006. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  11007. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat != 0) {
  11008. return uint64(0)
  11009. }
  11010. /*
  11011. * Monochrome targets require special handling; the PictOp controls
  11012. * the color, and the color must be opaque
  11013. */
  11014. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fdepth == uint32(1) {
  11015. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Falpha = uint16(0xffff)
  11016. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fred = uint16(0xffff)
  11017. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fgreen = uint16(0xffff)
  11018. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fblue = uint16(0xffff)
  11019. color = bp
  11020. }
  11021. /*
  11022. * See if there's one already available
  11023. */
  11024. i = 0
  11025. for {
  11026. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  11027. break
  11028. }
  11029. if (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0 && (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen == (*TXftDraw)(unsafe.Pointer(draw)).Fscreen && !(libc.Xmemcmp(tls, color+8, info+88+uintptr(i)*24, uint64(8)) != 0) {
  11030. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  11031. }
  11032. goto _1
  11033. _1:
  11034. ;
  11035. i++
  11036. }
  11037. /*
  11038. * Pick one to replace at random
  11039. */
  11040. i = libc.Int32FromUint32(libc.Uint32FromInt32(libc.Xrand(tls)) % uint32(m_XFT_NUM_SOLID_COLOR))
  11041. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid != 0 {
  11042. /*
  11043. * Free any existing entry
  11044. */
  11045. if (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0 {
  11046. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict)
  11047. }
  11048. /*
  11049. * Create picture
  11050. */
  11051. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = libxrender.XXRenderCreateSolidFill(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, color+8)
  11052. } else {
  11053. if (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen != (*TXftDraw)(unsafe.Pointer(draw)).Fscreen && (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0 {
  11054. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict)
  11055. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  11056. }
  11057. /*
  11058. * Create picture if necessary
  11059. */
  11060. if !((*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0) {
  11061. pix = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  11062. Fext_data uintptr
  11063. Fprivate1 uintptr
  11064. Ffd int32
  11065. Fprivate2 int32
  11066. Fproto_major_version int32
  11067. Fproto_minor_version int32
  11068. Fvendor uintptr
  11069. Fprivate3 TXID
  11070. Fprivate4 TXID
  11071. Fprivate5 TXID
  11072. Fprivate6 int32
  11073. Fresource_alloc uintptr
  11074. Fbyte_order int32
  11075. Fbitmap_unit int32
  11076. Fbitmap_pad int32
  11077. Fbitmap_bit_order int32
  11078. Fnformats int32
  11079. Fpixmap_format uintptr
  11080. Fprivate8 int32
  11081. Frelease int32
  11082. Fprivate9 uintptr
  11083. Fprivate10 uintptr
  11084. Fqlen int32
  11085. Flast_request_read uint64
  11086. Frequest uint64
  11087. Fprivate11 TXPointer
  11088. Fprivate12 TXPointer
  11089. Fprivate13 TXPointer
  11090. Fprivate14 TXPointer
  11091. Fmax_request_size uint32
  11092. Fdb uintptr
  11093. Fprivate15 uintptr
  11094. Fdisplay_name uintptr
  11095. Fdefault_screen int32
  11096. Fnscreens int32
  11097. Fscreens uintptr
  11098. Fmotion_buffer uint64
  11099. Fprivate16 uint64
  11100. Fmin_keycode int32
  11101. Fmax_keycode int32
  11102. Fprivate17 TXPointer
  11103. Fprivate18 TXPointer
  11104. Fprivate19 int32
  11105. Fxdefaults uintptr
  11106. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*TXftDraw)(unsafe.Pointer(draw)).Fscreen)*128)).Froot, uint32(1), uint32(1), libc.Uint32FromInt32((*TXRenderPictFormat)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat)).Fdepth))
  11107. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp + 16))).Frepeat = int32(m_True)
  11108. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pix, (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(0)), bp+16)
  11109. libx11.XXFreePixmap(tls, dpy, pix)
  11110. }
  11111. /*
  11112. * Set to the new color
  11113. */
  11114. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11115. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11116. libxrender.XXRenderFillRectangle(tls, dpy, int32(m_PictOpSrc), (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict, color+8, 0, 0, uint32(1), uint32(1))
  11117. }
  11118. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11119. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11120. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  11121. }
  11122. func __XftDrawOp(tls *libc.TLS, draw uintptr, color uintptr) (r int32) {
  11123. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0 || (*TXftDraw)(unsafe.Pointer(draw)).Fdepth != uint32(1) {
  11124. return int32(m_PictOpOver)
  11125. }
  11126. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  11127. return int32(m_PictOpOver)
  11128. }
  11129. return int32(m_PictOpOutReverse)
  11130. }
  11131. func __XftDrawRenderPrepare(tls *libc.TLS, draw uintptr) (r TFcBool) {
  11132. bp := tls.Alloc(80)
  11133. defer tls.Free(80)
  11134. var format uintptr
  11135. var mask uint64
  11136. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11137. _, _ = format, mask
  11138. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11139. mask = uint64(0)
  11140. format = __XftDrawFormat(tls, draw)
  11141. if !(format != 0) {
  11142. return m_FcFalse
  11143. }
  11144. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11145. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11146. mask |= libc.Uint64FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(8))
  11147. }
  11148. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, format, mask, bp)
  11149. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11150. return m_FcFalse
  11151. }
  11152. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11153. case int32(_XftClipTypeRegion):
  11154. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11155. case int32(_XftClipTypeRectangles):
  11156. libxrender.XXRenderSetPictureClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FxOrigin, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FyOrigin, *(*uintptr)(unsafe.Pointer(draw + 56))+libc.UintptrFromInt32(1)*12, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).Fn)
  11157. case int32(_XftClipTypeNone):
  11158. break
  11159. }
  11160. }
  11161. return int32(m_FcTrue)
  11162. }
  11163. func __XftDrawCorePrepare(tls *libc.TLS, draw uintptr, color uintptr) (r TFcBool) {
  11164. bp := tls.Alloc(128)
  11165. defer tls.Free(128)
  11166. var mask uint64
  11167. var _ /* gcv at bp+0 */ TXGCValues
  11168. _ = mask
  11169. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11170. mask = uint64(0)
  11171. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11172. (*(*TXGCValues)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11173. mask |= libc.Uint64FromInt64(libc.Int64FromInt64(1) << libc.Int32FromInt32(15))
  11174. }
  11175. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libx11.XXCreateGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, mask, bp)
  11176. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11177. return m_FcFalse
  11178. }
  11179. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11180. case int32(_XftClipTypeRegion):
  11181. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11182. case int32(_XftClipTypeRectangles):
  11183. libx11.XXSetClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FxOrigin, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FyOrigin, *(*uintptr)(unsafe.Pointer(draw + 56))+libc.UintptrFromInt32(1)*12, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).Fn, m_Unsorted)
  11184. case int32(_XftClipTypeNone):
  11185. break
  11186. }
  11187. }
  11188. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11189. return int32(m_FcTrue)
  11190. }
  11191. func XXftDrawPicture(tls *libc.TLS, draw uintptr) (r TPicture) {
  11192. if !(__XftDrawRenderPrepare(tls, draw) != 0) {
  11193. return uint64(0)
  11194. }
  11195. return (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict
  11196. }
  11197. func XXftDrawGlyphs(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  11198. var font uintptr
  11199. var src, v1 TPicture
  11200. var v2 bool
  11201. _, _, _, _ = font, src, v1, v2
  11202. font = pub
  11203. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11204. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11205. v1 = XXftDrawSrcPicture(tls, draw, color)
  11206. src = v1
  11207. }
  11208. if v2 && v1 != 0 {
  11209. 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)
  11210. }
  11211. } else {
  11212. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11213. XXftGlyphCore(tls, draw, color, pub, x, y, glyphs, nglyphs)
  11214. }
  11215. }
  11216. }
  11217. func XXftDrawString8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11218. bp := tls.Alloc(4128)
  11219. defer tls.Free(4128)
  11220. var glyphs uintptr
  11221. var i int32
  11222. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11223. _, _ = glyphs, i
  11224. if XXftDebug(tls)&int32(m_XFT_DBG_DRAW) != 0 {
  11225. libc.Xprintf(tls, __ccgo_ts+669, libc.VaList(bp+4104, len1, len1, string1))
  11226. }
  11227. if len1 <= int32(m_NUM_LOCAL) {
  11228. glyphs = bp
  11229. } else {
  11230. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11231. if !(glyphs != 0) {
  11232. return
  11233. }
  11234. }
  11235. i = 0
  11236. for {
  11237. if !(i < len1) {
  11238. break
  11239. }
  11240. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11241. goto _1
  11242. _1:
  11243. ;
  11244. i++
  11245. }
  11246. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11247. if glyphs != bp {
  11248. libc.Xfree(tls, glyphs)
  11249. }
  11250. }
  11251. func XXftDrawString16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11252. bp := tls.Alloc(4096)
  11253. defer tls.Free(4096)
  11254. var glyphs uintptr
  11255. var i int32
  11256. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11257. _, _ = glyphs, i
  11258. if len1 <= 0 {
  11259. return
  11260. }
  11261. if len1 <= int32(m_NUM_LOCAL) {
  11262. glyphs = bp
  11263. } else {
  11264. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11265. if !(glyphs != 0) {
  11266. return
  11267. }
  11268. }
  11269. i = 0
  11270. for {
  11271. if !(i < len1) {
  11272. break
  11273. }
  11274. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11275. goto _1
  11276. _1:
  11277. ;
  11278. i++
  11279. }
  11280. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11281. if glyphs != bp {
  11282. libc.Xfree(tls, glyphs)
  11283. }
  11284. }
  11285. func XXftDrawString32(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11286. bp := tls.Alloc(4096)
  11287. defer tls.Free(4096)
  11288. var glyphs uintptr
  11289. var i int32
  11290. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11291. _, _ = glyphs, i
  11292. if len1 <= 0 {
  11293. return
  11294. }
  11295. if len1 <= int32(m_NUM_LOCAL) {
  11296. glyphs = bp
  11297. } else {
  11298. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11299. if !(glyphs != 0) {
  11300. return
  11301. }
  11302. }
  11303. i = 0
  11304. for {
  11305. if !(i < len1) {
  11306. break
  11307. }
  11308. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11309. goto _1
  11310. _1:
  11311. ;
  11312. i++
  11313. }
  11314. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11315. if glyphs != bp {
  11316. libc.Xfree(tls, glyphs)
  11317. }
  11318. }
  11319. func XXftDrawStringUtf8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11320. bp := tls.Alloc(4112)
  11321. defer tls.Free(4112)
  11322. var glyphs, glyphs_new uintptr
  11323. var i, l, size, v1, v3 int32
  11324. var v2 bool
  11325. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11326. var _ /* ucs4 at bp+4096 */ TFcChar32
  11327. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11328. if len1 <= 0 {
  11329. return
  11330. }
  11331. i = 0
  11332. glyphs = bp
  11333. size = int32(m_NUM_LOCAL)
  11334. for {
  11335. if v2 = len1 != 0; v2 {
  11336. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11337. l = v1
  11338. }
  11339. if !(v2 && v1 > 0) {
  11340. break
  11341. }
  11342. if i == size {
  11343. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11344. if !(glyphs_new != 0) {
  11345. if glyphs != bp {
  11346. libc.Xfree(tls, glyphs)
  11347. }
  11348. return
  11349. }
  11350. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11351. size *= int32(2)
  11352. if glyphs != bp {
  11353. libc.Xfree(tls, glyphs)
  11354. }
  11355. glyphs = glyphs_new
  11356. }
  11357. v3 = i
  11358. i++
  11359. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11360. string1 += uintptr(l)
  11361. len1 -= l
  11362. }
  11363. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11364. if glyphs != bp {
  11365. libc.Xfree(tls, glyphs)
  11366. }
  11367. }
  11368. func XXftDrawStringUtf16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, endian TFcEndian, len1 int32) {
  11369. bp := tls.Alloc(4112)
  11370. defer tls.Free(4112)
  11371. var glyphs, glyphs_new uintptr
  11372. var i, l, size, v1, v3 int32
  11373. var v2 bool
  11374. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11375. var _ /* ucs4 at bp+4096 */ TFcChar32
  11376. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11377. if len1 <= 0 {
  11378. return
  11379. }
  11380. i = 0
  11381. glyphs = bp
  11382. size = int32(m_NUM_LOCAL)
  11383. for {
  11384. if v2 = len1 != 0; v2 {
  11385. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11386. l = v1
  11387. }
  11388. if !(v2 && v1 > 0) {
  11389. break
  11390. }
  11391. if i == size {
  11392. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11393. if !(glyphs_new != 0) {
  11394. if glyphs != bp {
  11395. libc.Xfree(tls, glyphs)
  11396. }
  11397. return
  11398. }
  11399. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11400. size *= int32(2)
  11401. if glyphs != bp {
  11402. libc.Xfree(tls, glyphs)
  11403. }
  11404. glyphs = glyphs_new
  11405. }
  11406. v3 = i
  11407. i++
  11408. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11409. string1 += uintptr(l)
  11410. len1 -= l
  11411. }
  11412. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11413. if glyphs != bp {
  11414. libc.Xfree(tls, glyphs)
  11415. }
  11416. }
  11417. func XXftDrawGlyphSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, glyphs uintptr, len1 int32) {
  11418. var font uintptr
  11419. var src, v1 TPicture
  11420. var v2 bool
  11421. _, _, _, _ = font, src, v1, v2
  11422. font = pub
  11423. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11424. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11425. v1 = XXftDrawSrcPicture(tls, draw, color)
  11426. src = v1
  11427. }
  11428. if v2 && v1 != 0 {
  11429. XXftGlyphSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, pub, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs, len1)
  11430. }
  11431. } else {
  11432. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11433. XXftGlyphSpecCore(tls, draw, color, pub, glyphs, len1)
  11434. }
  11435. }
  11436. }
  11437. func XXftDrawGlyphFontSpec(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, len1 int32) {
  11438. var i, start int32
  11439. var src, v1 TPicture
  11440. var v2 bool
  11441. _, _, _, _, _ = i, src, start, v1, v2
  11442. i = 0
  11443. for i < len1 {
  11444. start = i
  11445. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11446. for i < len1 && (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11447. i++
  11448. }
  11449. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11450. v1 = XXftDrawSrcPicture(tls, draw, color)
  11451. src = v1
  11452. }
  11453. if v2 && v1 != 0 {
  11454. XXftGlyphFontSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs+uintptr(start)*16, i-start)
  11455. }
  11456. } else {
  11457. for i < len1 && !((*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0) {
  11458. i++
  11459. }
  11460. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11461. XXftGlyphFontSpecCore(tls, draw, color, glyphs+uintptr(start)*16, i-start)
  11462. }
  11463. }
  11464. }
  11465. }
  11466. func XXftDrawCharSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, chars uintptr, len1 int32) {
  11467. bp := tls.Alloc(8192)
  11468. defer tls.Free(8192)
  11469. var glyphs uintptr
  11470. var i int32
  11471. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  11472. _, _ = glyphs, i
  11473. if len1 <= 0 {
  11474. return
  11475. }
  11476. if len1 <= int32(m_NUM_LOCAL) {
  11477. glyphs = bp
  11478. } else {
  11479. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(8))
  11480. if !(glyphs != 0) {
  11481. return
  11482. }
  11483. }
  11484. i = 0
  11485. for {
  11486. if !(i < len1) {
  11487. break
  11488. }
  11489. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  11490. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  11491. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  11492. goto _1
  11493. _1:
  11494. ;
  11495. i++
  11496. }
  11497. XXftDrawGlyphSpec(tls, draw, color, pub, glyphs, len1)
  11498. if glyphs != bp {
  11499. libc.Xfree(tls, glyphs)
  11500. }
  11501. }
  11502. func XXftDrawCharFontSpec(tls *libc.TLS, draw uintptr, color uintptr, chars uintptr, len1 int32) {
  11503. bp := tls.Alloc(16384)
  11504. defer tls.Free(16384)
  11505. var glyphs uintptr
  11506. var i int32
  11507. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  11508. _, _ = glyphs, i
  11509. if len1 <= 0 {
  11510. return
  11511. }
  11512. if len1 <= int32(m_NUM_LOCAL) {
  11513. glyphs = bp
  11514. } else {
  11515. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(16))
  11516. if !(glyphs != 0) {
  11517. return
  11518. }
  11519. }
  11520. i = 0
  11521. for {
  11522. if !(i < len1) {
  11523. break
  11524. }
  11525. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  11526. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont, (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fucs4)
  11527. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  11528. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  11529. goto _1
  11530. _1:
  11531. ;
  11532. i++
  11533. }
  11534. XXftDrawGlyphFontSpec(tls, draw, color, glyphs, len1)
  11535. if glyphs != bp {
  11536. libc.Xfree(tls, glyphs)
  11537. }
  11538. }
  11539. func XXftDrawRect(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  11540. if __XftDrawRenderPrepare(tls, draw) != 0 {
  11541. libxrender.XXRenderFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_PictOpSrc), (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, color+8, x, y, width, height)
  11542. } else {
  11543. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11544. /* note: not XftRectCore() */
  11545. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11546. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  11547. }
  11548. }
  11549. }
  11550. func XXftDrawSetClip(tls *libc.TLS, draw uintptr, r TRegion) (r1 int32) {
  11551. bp := tls.Alloc(80)
  11552. defer tls.Free(80)
  11553. var n TRegion
  11554. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11555. _ = n
  11556. n = libc.UintptrFromInt32(0)
  11557. /*
  11558. * Check for quick exits
  11559. */
  11560. if !(r != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeNone) {
  11561. return int32(m_True)
  11562. }
  11563. if r != 0 && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRegion) && libx11.XXEqualRegion(tls, r, *(*TRegion)(unsafe.Pointer(draw + 56))) != 0 {
  11564. return int32(m_True)
  11565. }
  11566. /*
  11567. * Duplicate the region so future changes can be short circuited
  11568. */
  11569. if r != 0 {
  11570. n = libx11.XXCreateRegion(tls)
  11571. if n != 0 {
  11572. if !(libx11.XXUnionRegion(tls, n, r, n) != 0) {
  11573. libx11.XXDestroyRegion(tls, n)
  11574. return m_False
  11575. }
  11576. }
  11577. }
  11578. /*
  11579. * Destroy existing clip
  11580. */
  11581. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11582. case int32(_XftClipTypeRegion):
  11583. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11584. case int32(_XftClipTypeRectangles):
  11585. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11586. case int32(_XftClipTypeNone):
  11587. break
  11588. }
  11589. /*
  11590. * Set the clip
  11591. */
  11592. if n != 0 {
  11593. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRegion)
  11594. *(*TRegion)(unsafe.Pointer(draw + 56)) = n
  11595. } else {
  11596. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  11597. }
  11598. /*
  11599. * Apply new clip to existing objects
  11600. */
  11601. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11602. if n != 0 {
  11603. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, n)
  11604. } else {
  11605. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fclip_mask = uint64(0)
  11606. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(6)), bp)
  11607. }
  11608. }
  11609. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11610. if n != 0 {
  11611. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11612. } else {
  11613. libx11.XXSetClipMask(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, uint64(0))
  11614. }
  11615. }
  11616. return int32(m_True)
  11617. }
  11618. func XXftDrawSetClipRectangles(tls *libc.TLS, draw uintptr, xOrigin int32, yOrigin int32, rects uintptr, n int32) (r int32) {
  11619. var new1 uintptr
  11620. _ = new1
  11621. new1 = libc.UintptrFromInt32(0)
  11622. /*
  11623. * Check for quick exit
  11624. */
  11625. if (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRectangles) && (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).Fn == n && (n == 0 || (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FxOrigin == xOrigin && (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FyOrigin == yOrigin) && !(libc.Xmemcmp(tls, *(*uintptr)(unsafe.Pointer(draw + 56))+libc.UintptrFromInt32(1)*12, rects, libc.Uint64FromInt32(n)*uint64(8)) != 0) {
  11626. return int32(m_True)
  11627. }
  11628. /*
  11629. * Duplicate the region so future changes can be short circuited
  11630. */
  11631. new1 = libc.Xmalloc(tls, uint64(12)+libc.Uint64FromInt32(n)*uint64(8))
  11632. if !(new1 != 0) {
  11633. return m_False
  11634. }
  11635. (*TXftClipRect)(unsafe.Pointer(new1)).Fn = n
  11636. (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin = xOrigin
  11637. (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin = yOrigin
  11638. libc.Xmemcpy(tls, new1+libc.UintptrFromInt32(1)*12, rects, libc.Uint64FromInt32(n)*uint64(8))
  11639. /*
  11640. * Destroy existing clip
  11641. */
  11642. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11643. case int32(_XftClipTypeRegion):
  11644. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11645. case int32(_XftClipTypeRectangles):
  11646. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11647. case int32(_XftClipTypeNone):
  11648. break
  11649. }
  11650. /*
  11651. * Set the clip
  11652. */
  11653. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRectangles)
  11654. *(*uintptr)(unsafe.Pointer(draw + 56)) = new1
  11655. /*
  11656. * Apply new clip to existing objects
  11657. */
  11658. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11659. 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)
  11660. }
  11661. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11662. 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)
  11663. }
  11664. return int32(m_True)
  11665. }
  11666. func XXftDrawSetSubwindowMode(tls *libc.TLS, draw uintptr, mode int32) {
  11667. bp := tls.Alloc(80)
  11668. defer tls.Free(80)
  11669. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11670. if mode == (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode {
  11671. return
  11672. }
  11673. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = mode
  11674. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11675. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = mode
  11676. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)), bp)
  11677. }
  11678. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11679. libx11.XXSetSubwindowMode(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, mode)
  11680. }
  11681. }
  11682. const m_VisualIDMask2 = 0x1
  11683. const m_VisualScreenMask2 = 0x2
  11684. /* xftxlfd.c */
  11685. func XXftGlyphExtents(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyphs int32, extents uintptr) {
  11686. bp := tls.Alloc(1040)
  11687. defer tls.Free(1040)
  11688. var bottom, left, n, overall_bottom, overall_left, overall_right, overall_top, right, top, x, y, v1, v6 int32
  11689. var font, g, xftg, v2, v3, v4, v7, v8 uintptr
  11690. var glyph TFT_UInt
  11691. var glyphs_loaded TFcBool
  11692. var v5, v9 bool
  11693. var _ /* missing at bp+0 */ [256]TFT_UInt
  11694. var _ /* nmissing at bp+1024 */ int32
  11695. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  11696. font = pub
  11697. g = glyphs
  11698. n = nglyphs
  11699. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  11700. glyphs_loaded = m_FcFalse
  11701. for {
  11702. v1 = n
  11703. n--
  11704. if !(v1 != 0) {
  11705. break
  11706. }
  11707. v2 = g
  11708. g += 4
  11709. if XXftFontCheckGlyph(tls, dpy, pub, m_FcFalse, *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  11710. glyphs_loaded = int32(m_FcTrue)
  11711. }
  11712. }
  11713. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  11714. XXftFontLoadGlyphs(tls, dpy, pub, m_FcFalse, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  11715. }
  11716. g = glyphs
  11717. n = nglyphs
  11718. xftg = libc.UintptrFromInt32(0)
  11719. for n != 0 {
  11720. v3 = g
  11721. g += 4
  11722. glyph = *(*TFT_UInt)(unsafe.Pointer(v3))
  11723. n--
  11724. if v5 = glyph < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; v5 {
  11725. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11726. xftg = v4
  11727. }
  11728. if v5 && v4 != 0 {
  11729. break
  11730. }
  11731. }
  11732. if n == 0 {
  11733. if xftg != 0 {
  11734. *(*TXGlyphInfo)(unsafe.Pointer(extents)) = (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics
  11735. } else {
  11736. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11737. }
  11738. } else {
  11739. x = 0
  11740. y = 0
  11741. overall_left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11742. overall_top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11743. overall_right = overall_left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11744. overall_bottom = overall_top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11745. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11746. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11747. for {
  11748. v6 = n
  11749. n--
  11750. if !(v6 != 0) {
  11751. break
  11752. }
  11753. v7 = g
  11754. g += 4
  11755. glyph = *(*TFT_UInt)(unsafe.Pointer(v7))
  11756. if v9 = glyph < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; v9 {
  11757. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11758. xftg = v8
  11759. }
  11760. if v9 && v8 != 0 {
  11761. left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11762. top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11763. right = left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11764. bottom = top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11765. if left < overall_left {
  11766. overall_left = left
  11767. }
  11768. if top < overall_top {
  11769. overall_top = top
  11770. }
  11771. if right > overall_right {
  11772. overall_right = right
  11773. }
  11774. if bottom > overall_bottom {
  11775. overall_bottom = bottom
  11776. }
  11777. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11778. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11779. }
  11780. }
  11781. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fx = int16(-overall_left)
  11782. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fy = int16(-overall_top)
  11783. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fwidth = libc.Uint16FromInt32(overall_right - overall_left)
  11784. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fheight = libc.Uint16FromInt32(overall_bottom - overall_top)
  11785. (*TXGlyphInfo)(unsafe.Pointer(extents)).FxOff = int16(x)
  11786. (*TXGlyphInfo)(unsafe.Pointer(extents)).FyOff = int16(y)
  11787. }
  11788. if glyphs_loaded != 0 {
  11789. X_XftFontManageMemory(tls, dpy, pub)
  11790. }
  11791. }
  11792. func XXftTextExtents8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11793. bp := tls.Alloc(4096)
  11794. defer tls.Free(4096)
  11795. var glyphs, v1 uintptr
  11796. var i int32
  11797. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11798. _, _, _ = glyphs, i, v1
  11799. if len1 < 0 {
  11800. return
  11801. }
  11802. if len1 <= int32(m_NUM_LOCAL) {
  11803. v1 = bp
  11804. glyphs = v1
  11805. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11806. } else {
  11807. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11808. if !(glyphs != 0) {
  11809. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11810. return
  11811. }
  11812. }
  11813. i = 0
  11814. for {
  11815. if !(i < len1) {
  11816. break
  11817. }
  11818. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11819. goto _2
  11820. _2:
  11821. ;
  11822. i++
  11823. }
  11824. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11825. if glyphs != bp {
  11826. libc.Xfree(tls, glyphs)
  11827. }
  11828. }
  11829. func XXftTextExtents16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11830. bp := tls.Alloc(4096)
  11831. defer tls.Free(4096)
  11832. var glyphs, v1 uintptr
  11833. var i int32
  11834. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11835. _, _, _ = glyphs, i, v1
  11836. if len1 < 0 {
  11837. return
  11838. }
  11839. if len1 <= int32(m_NUM_LOCAL) {
  11840. v1 = bp
  11841. glyphs = v1
  11842. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11843. } else {
  11844. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11845. if !(glyphs != 0) {
  11846. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11847. return
  11848. }
  11849. }
  11850. i = 0
  11851. for {
  11852. if !(i < len1) {
  11853. break
  11854. }
  11855. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11856. goto _2
  11857. _2:
  11858. ;
  11859. i++
  11860. }
  11861. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11862. if glyphs != bp {
  11863. libc.Xfree(tls, glyphs)
  11864. }
  11865. }
  11866. func XXftTextExtents32(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11867. bp := tls.Alloc(4096)
  11868. defer tls.Free(4096)
  11869. var glyphs, v1 uintptr
  11870. var i int32
  11871. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11872. _, _, _ = glyphs, i, v1
  11873. if len1 < 0 {
  11874. return
  11875. }
  11876. if len1 <= int32(m_NUM_LOCAL) {
  11877. v1 = bp
  11878. glyphs = v1
  11879. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11880. } else {
  11881. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11882. if !(glyphs != 0) {
  11883. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11884. return
  11885. }
  11886. }
  11887. i = 0
  11888. for {
  11889. if !(i < len1) {
  11890. break
  11891. }
  11892. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11893. goto _2
  11894. _2:
  11895. ;
  11896. i++
  11897. }
  11898. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11899. if glyphs != bp {
  11900. libc.Xfree(tls, glyphs)
  11901. }
  11902. }
  11903. func XXftTextExtentsUtf8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11904. bp := tls.Alloc(4112)
  11905. defer tls.Free(4112)
  11906. var glyphs, glyphs_new, v1 uintptr
  11907. var i, l, size, v2, v4 int32
  11908. var v3 bool
  11909. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11910. var _ /* ucs4 at bp+4096 */ TFcChar32
  11911. _, _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3, v4
  11912. if len1 < 0 {
  11913. return
  11914. }
  11915. i = 0
  11916. v1 = bp
  11917. glyphs = v1
  11918. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11919. size = int32(m_NUM_LOCAL)
  11920. for {
  11921. if v3 = len1 != 0; v3 {
  11922. v2 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11923. l = v2
  11924. }
  11925. if !(v3 && v2 > 0) {
  11926. break
  11927. }
  11928. if i == size {
  11929. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11930. if !(glyphs_new != 0) {
  11931. if glyphs != bp {
  11932. libc.Xfree(tls, glyphs)
  11933. }
  11934. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11935. return
  11936. }
  11937. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11938. size *= int32(2)
  11939. if glyphs != bp {
  11940. libc.Xfree(tls, glyphs)
  11941. }
  11942. glyphs = glyphs_new
  11943. }
  11944. v4 = i
  11945. i++
  11946. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v4)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11947. string1 += uintptr(l)
  11948. len1 -= l
  11949. }
  11950. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  11951. if glyphs != bp {
  11952. libc.Xfree(tls, glyphs)
  11953. }
  11954. }
  11955. func XXftTextExtentsUtf16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, endian TFcEndian, len1 int32, extents uintptr) {
  11956. bp := tls.Alloc(4112)
  11957. defer tls.Free(4112)
  11958. var glyphs, glyphs_new, v1 uintptr
  11959. var i, l, size, v2, v4 int32
  11960. var v3 bool
  11961. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11962. var _ /* ucs4 at bp+4096 */ TFcChar32
  11963. _, _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3, v4
  11964. if len1 < 0 {
  11965. return
  11966. }
  11967. i = 0
  11968. v1 = bp
  11969. glyphs = v1
  11970. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11971. size = int32(m_NUM_LOCAL)
  11972. for {
  11973. if v3 = len1 != 0; v3 {
  11974. v2 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11975. l = v2
  11976. }
  11977. if !(v3 && v2 > 0) {
  11978. break
  11979. }
  11980. if i == size {
  11981. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11982. if !(glyphs_new != 0) {
  11983. if glyphs != bp {
  11984. libc.Xfree(tls, glyphs)
  11985. }
  11986. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11987. return
  11988. }
  11989. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11990. size *= int32(2)
  11991. if glyphs != bp {
  11992. libc.Xfree(tls, glyphs)
  11993. }
  11994. glyphs = glyphs_new
  11995. }
  11996. v4 = i
  11997. i++
  11998. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v4)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11999. string1 += uintptr(l)
  12000. len1 -= l
  12001. }
  12002. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  12003. if glyphs != bp {
  12004. libc.Xfree(tls, glyphs)
  12005. }
  12006. }
  12007. /* xftxlfd.c */
  12008. func XXftFontMatch(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, result uintptr) (r uintptr) {
  12009. var match, new1 uintptr
  12010. _, _ = match, new1
  12011. if !(XXftInit(tls, libc.UintptrFromInt32(0)) != 0) {
  12012. return libc.UintptrFromInt32(0)
  12013. }
  12014. new1 = libfontconfig.XFcPatternDuplicate(tls, pattern)
  12015. if !(new1 != 0) {
  12016. return libc.UintptrFromInt32(0)
  12017. }
  12018. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12019. libc.Xprintf(tls, __ccgo_ts+689, 0)
  12020. libfontconfig.XFcPatternPrint(tls, new1)
  12021. }
  12022. libfontconfig.XFcConfigSubstitute(tls, libc.UintptrFromInt32(0), new1, int32(_FcMatchPattern))
  12023. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12024. libc.Xprintf(tls, __ccgo_ts+711, 0)
  12025. libfontconfig.XFcPatternPrint(tls, new1)
  12026. }
  12027. XXftDefaultSubstitute(tls, dpy, screen, new1)
  12028. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12029. libc.Xprintf(tls, __ccgo_ts+754, 0)
  12030. libfontconfig.XFcPatternPrint(tls, new1)
  12031. }
  12032. match = libfontconfig.XFcFontMatch(tls, libc.UintptrFromInt32(0), new1, result)
  12033. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12034. libc.Xprintf(tls, __ccgo_ts+799, 0)
  12035. libfontconfig.XFcPatternPrint(tls, match)
  12036. }
  12037. libfontconfig.XFcPatternDestroy(tls, new1)
  12038. return match
  12039. }
  12040. func XXftFontOpen(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  12041. bp := tls.Alloc(16)
  12042. defer tls.Free(16)
  12043. var font, match, pat uintptr
  12044. var va Tva_list
  12045. var _ /* result at bp+0 */ TFcResult
  12046. _, _, _, _ = font, match, pat, va
  12047. va = va1
  12048. pat = libfontconfig.XFcPatternVaBuild(tls, libc.UintptrFromInt32(0), va)
  12049. _ = va
  12050. if !(pat != 0) {
  12051. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12052. libc.Xprintf(tls, __ccgo_ts+820, 0)
  12053. }
  12054. return libc.UintptrFromInt32(0)
  12055. }
  12056. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12057. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12058. libc.Xprintf(tls, __ccgo_ts+859, 0)
  12059. libfontconfig.XFcPatternPrint(tls, pat)
  12060. if match != 0 {
  12061. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12062. libfontconfig.XFcPatternPrint(tls, match)
  12063. } else {
  12064. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12065. }
  12066. }
  12067. libfontconfig.XFcPatternDestroy(tls, pat)
  12068. if !(match != 0) {
  12069. return libc.UintptrFromInt32(0)
  12070. }
  12071. font = XXftFontOpenPattern(tls, dpy, match)
  12072. if !(font != 0) {
  12073. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12074. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12075. }
  12076. libfontconfig.XFcPatternDestroy(tls, match)
  12077. }
  12078. return font
  12079. }
  12080. func XXftFontOpenName(tls *libc.TLS, dpy uintptr, screen int32, name uintptr) (r uintptr) {
  12081. bp := tls.Alloc(32)
  12082. defer tls.Free(32)
  12083. var font, match, pat uintptr
  12084. var _ /* result at bp+0 */ TFcResult
  12085. _, _, _ = font, match, pat
  12086. pat = libfontconfig.XFcNameParse(tls, name)
  12087. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12088. libc.Xprintf(tls, __ccgo_ts+894, libc.VaList(bp+16, name))
  12089. if pat != 0 {
  12090. libfontconfig.XFcPatternPrint(tls, pat)
  12091. } else {
  12092. libc.Xprintf(tls, __ccgo_ts+917, 0)
  12093. }
  12094. }
  12095. if !(pat != 0) {
  12096. return libc.UintptrFromInt32(0)
  12097. }
  12098. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12099. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12100. if match != 0 {
  12101. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12102. libfontconfig.XFcPatternPrint(tls, match)
  12103. } else {
  12104. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12105. }
  12106. }
  12107. libfontconfig.XFcPatternDestroy(tls, pat)
  12108. if !(match != 0) {
  12109. return libc.UintptrFromInt32(0)
  12110. }
  12111. font = XXftFontOpenPattern(tls, dpy, match)
  12112. if !(font != 0) {
  12113. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12114. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12115. }
  12116. libfontconfig.XFcPatternDestroy(tls, match)
  12117. }
  12118. return font
  12119. }
  12120. func XXftFontOpenXlfd(tls *libc.TLS, dpy uintptr, screen int32, xlfd uintptr) (r uintptr) {
  12121. bp := tls.Alloc(32)
  12122. defer tls.Free(32)
  12123. var font, match, pat uintptr
  12124. var _ /* result at bp+0 */ TFcResult
  12125. _, _, _ = font, match, pat
  12126. pat = XXftXlfdParse(tls, xlfd, m_FcFalse, m_FcFalse)
  12127. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12128. libc.Xprintf(tls, __ccgo_ts+931, libc.VaList(bp+16, xlfd))
  12129. if pat != 0 {
  12130. libc.Xprintf(tls, __ccgo_ts+954, 0)
  12131. } else {
  12132. libfontconfig.XFcPatternPrint(tls, pat)
  12133. }
  12134. }
  12135. if !(pat != 0) {
  12136. return libc.UintptrFromInt32(0)
  12137. }
  12138. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12139. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12140. if match != 0 {
  12141. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12142. libfontconfig.XFcPatternPrint(tls, match)
  12143. } else {
  12144. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12145. }
  12146. }
  12147. libfontconfig.XFcPatternDestroy(tls, pat)
  12148. if !(match != 0) {
  12149. return libc.UintptrFromInt32(0)
  12150. }
  12151. font = XXftFontOpenPattern(tls, dpy, match)
  12152. if !(font != 0) {
  12153. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12154. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12155. }
  12156. libfontconfig.XFcPatternDestroy(tls, match)
  12157. }
  12158. return font
  12159. }
  12160. const m_FT_LOAD_DEFAULT1 = 0
  12161. const m_UINT_MAX1 = 4294967295
  12162. const m_XFT_EMBEDDED_BITMAP = "embeddedbitmap"
  12163. /*
  12164. * List of all open files (each face in a file is managed separately)
  12165. */
  12166. var __XftFtFiles uintptr
  12167. var _XftMaxFreeTypeFiles = int32(5)
  12168. func __XftGetFile(tls *libc.TLS, file uintptr, id int32) (r uintptr) {
  12169. bp := tls.Alloc(32)
  12170. defer tls.Free(32)
  12171. var f uintptr
  12172. var v2, v3, v4 TFT_Fixed
  12173. _, _, _, _ = f, v2, v3, v4
  12174. if !(XXftInitFtLibrary(tls) != 0) {
  12175. return libc.UintptrFromInt32(0)
  12176. }
  12177. f = __XftFtFiles
  12178. for {
  12179. if !(f != 0) {
  12180. break
  12181. }
  12182. if !(libc.Xstrcmp(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file) != 0) && (*TXftFtFile)(unsafe.Pointer(f)).Fid == id {
  12183. (*TXftFtFile)(unsafe.Pointer(f)).Fref++
  12184. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12185. libc.Xprintf(tls, __ccgo_ts+968, libc.VaList(bp+8, file, id, (*TXftFtFile)(unsafe.Pointer(f)).Fref))
  12186. }
  12187. return f
  12188. }
  12189. goto _1
  12190. _1:
  12191. ;
  12192. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12193. }
  12194. f = libc.Xmalloc(tls, uint64(96)+libc.Xstrlen(tls, file)+uint64(1))
  12195. if !(f != 0) {
  12196. return libc.UintptrFromInt32(0)
  12197. }
  12198. XXftMemAlloc(tls, int32(_XFT_MEM_FILE), uint64(96)+libc.Xstrlen(tls, file)+uint64(1))
  12199. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12200. libc.Xprintf(tls, __ccgo_ts+1006, libc.VaList(bp+8, file, id))
  12201. }
  12202. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = __XftFtFiles
  12203. __XftFtFiles = f
  12204. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12205. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = f + libc.UintptrFromInt32(1)*96
  12206. libc.Xstrcpy(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file)
  12207. (*TXftFtFile)(unsafe.Pointer(f)).Fid = id
  12208. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12209. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12210. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12211. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12212. v4 = libc.Int64FromInt32(0)
  12213. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v4
  12214. v3 = v4
  12215. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v3
  12216. v2 = v3
  12217. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v2
  12218. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v2
  12219. return f
  12220. }
  12221. func __XftGetFaceFile(tls *libc.TLS, face TFT_Face) (r uintptr) {
  12222. var f uintptr
  12223. var v1, v2, v3 TFT_Fixed
  12224. _, _, _, _ = f, v1, v2, v3
  12225. f = libc.Xmalloc(tls, uint64(96))
  12226. if !(f != 0) {
  12227. return libc.UintptrFromInt32(0)
  12228. }
  12229. XXftMemAlloc(tls, int32(_XFT_MEM_FILE), uint64(96))
  12230. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = libc.UintptrFromInt32(0)
  12231. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12232. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = libc.UintptrFromInt32(0)
  12233. (*TXftFtFile)(unsafe.Pointer(f)).Fid = 0
  12234. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12235. (*TXftFtFile)(unsafe.Pointer(f)).Fface = face
  12236. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12237. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12238. v3 = libc.Int64FromInt32(0)
  12239. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12240. v2 = v3
  12241. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12242. v1 = v2
  12243. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12244. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12245. return f
  12246. }
  12247. func __XftNumFiles(tls *libc.TLS) (r int32) {
  12248. var count int32
  12249. var f uintptr
  12250. _, _ = count, f
  12251. count = 0
  12252. f = __XftFtFiles
  12253. for {
  12254. if !(f != 0) {
  12255. break
  12256. }
  12257. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12258. count++
  12259. }
  12260. goto _1
  12261. _1:
  12262. ;
  12263. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12264. }
  12265. return count
  12266. }
  12267. func __XftNthFile(tls *libc.TLS, n int32) (r uintptr) {
  12268. var count, v2 int32
  12269. var f uintptr
  12270. _, _, _ = count, f, v2
  12271. count = 0
  12272. f = __XftFtFiles
  12273. for {
  12274. if !(f != 0) {
  12275. break
  12276. }
  12277. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12278. v2 = count
  12279. count++
  12280. if v2 == n {
  12281. break
  12282. }
  12283. }
  12284. goto _1
  12285. _1:
  12286. ;
  12287. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12288. }
  12289. return f
  12290. }
  12291. func __XftUncacheFiles(tls *libc.TLS) {
  12292. bp := tls.Alloc(32)
  12293. defer tls.Free(32)
  12294. var f uintptr
  12295. var n, v1, v2 int32
  12296. _, _, _, _ = f, n, v1, v2
  12297. for {
  12298. v1 = __XftNumFiles(tls)
  12299. n = v1
  12300. if !(v1 > _XftMaxFreeTypeFiles) {
  12301. break
  12302. }
  12303. if n != 0 {
  12304. v2 = libc.Xrand(tls) % n
  12305. } else {
  12306. v2 = 0
  12307. }
  12308. f = __XftNthFile(tls, v2)
  12309. if f != 0 {
  12310. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12311. libc.Xprintf(tls, __ccgo_ts+1034, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12312. }
  12313. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12314. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12315. }
  12316. }
  12317. }
  12318. func __XftLockFile(tls *libc.TLS, f uintptr) (r TFT_Face) {
  12319. bp := tls.Alloc(32)
  12320. defer tls.Free(32)
  12321. var v1, v2, v3 TFT_Fixed
  12322. _, _, _ = v1, v2, v3
  12323. (*TXftFtFile)(unsafe.Pointer(f)).Flock++
  12324. if !((*TXftFtFile)(unsafe.Pointer(f)).Fface != 0) {
  12325. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12326. libc.Xprintf(tls, __ccgo_ts+1065, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12327. }
  12328. if libfreetype.XFT_New_Face(tls, X_XftFTlibrary, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, int64((*TXftFtFile)(unsafe.Pointer(f)).Fid), f+88) != 0 {
  12329. (*TXftFtFile)(unsafe.Pointer(f)).Flock--
  12330. }
  12331. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12332. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12333. v3 = libc.Int64FromInt32(0)
  12334. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12335. v2 = v3
  12336. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12337. v1 = v2
  12338. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12339. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12340. __XftUncacheFiles(tls)
  12341. }
  12342. return (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12343. }
  12344. func __XftLockError(tls *libc.TLS, reason uintptr) {
  12345. bp := tls.Alloc(16)
  12346. defer tls.Free(16)
  12347. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+1085, libc.VaList(bp+8, reason))
  12348. }
  12349. func __XftUnlockFile(tls *libc.TLS, f uintptr) {
  12350. var v1 int32
  12351. var v2 uintptr
  12352. _, _ = v1, v2
  12353. v2 = f + 80
  12354. *(*int32)(unsafe.Pointer(v2))--
  12355. v1 = *(*int32)(unsafe.Pointer(v2))
  12356. if v1 < 0 {
  12357. __XftLockError(tls, __ccgo_ts+1108)
  12358. }
  12359. }
  12360. func X_XftSetFace(tls *libc.TLS, f uintptr, xsize TFT_F26Dot6, ysize TFT_F26Dot6, matrix uintptr) (r TFcBool) {
  12361. bp := tls.Alloc(48)
  12362. defer tls.Free(48)
  12363. var best, i int32
  12364. var face TFT_Face
  12365. var v2, v3, v4, v5, v6, v7 int64
  12366. var v8, v9 bool
  12367. _, _, _, _, _, _, _, _, _, _, _ = best, face, i, v2, v3, v4, v5, v6, v7, v8, v9
  12368. face = (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12369. if (*TXftFtFile)(unsafe.Pointer(f)).Fxsize != xsize || (*TXftFtFile)(unsafe.Pointer(f)).Fysize != ysize {
  12370. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12371. libc.Xprintf(tls, __ccgo_ts+1130, libc.VaList(bp+8, int32(xsize>>libc.Int32FromInt32(6)), int32(ysize>>libc.Int32FromInt32(6)), int32(xsize), int32(ysize)))
  12372. }
  12373. /*
  12374. * Bitmap only faces must match exactly, so find the closest
  12375. * one (height dominant search)
  12376. */
  12377. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  12378. best = 0
  12379. i = int32(1)
  12380. for {
  12381. if !(i < (*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_fixed_sizes) {
  12382. break
  12383. }
  12384. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12385. v2 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12386. } else {
  12387. v2 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem
  12388. }
  12389. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem < 0 {
  12390. v3 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12391. } else {
  12392. v3 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12393. }
  12394. if v9 = v2 < v3; !v9 {
  12395. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12396. v4 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12397. } else {
  12398. v4 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem
  12399. }
  12400. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem < 0 {
  12401. v5 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12402. } else {
  12403. v5 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12404. }
  12405. if v8 = v4 == v5; v8 {
  12406. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem < 0 {
  12407. v6 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem)
  12408. } else {
  12409. v6 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem
  12410. }
  12411. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem < 0 {
  12412. v7 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem)
  12413. } else {
  12414. v7 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem
  12415. }
  12416. }
  12417. }
  12418. if v9 || v8 && v6 < v7 {
  12419. best = i
  12420. }
  12421. goto _1
  12422. _1:
  12423. ;
  12424. i++
  12425. }
  12426. /*
  12427. * Freetype 2.1.7 and earlier used width/height
  12428. * for matching sizes in the BDF and PCF loaders.
  12429. * This has been fixed for 2.1.8. Because BDF and PCF
  12430. * files have but a single strike per file, we can
  12431. * simply try both sizes.
  12432. */
  12433. if libfreetype.XFT_Set_Char_Size(tls, face, (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem, (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem, uint32(0), uint32(0)) != 0 && libfreetype.XFT_Set_Char_Size(tls, face, int64(int32((*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fwidth)<<int32(6)), int64(int32((*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fheight)<<int32(6)), uint32(0), uint32(0)) != 0 {
  12434. return m_False
  12435. }
  12436. } else {
  12437. if libfreetype.XFT_Set_Char_Size(tls, face, xsize, ysize, uint32(0), uint32(0)) != 0 {
  12438. return m_False
  12439. }
  12440. }
  12441. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = xsize
  12442. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = ysize
  12443. }
  12444. if !((*TFT_Matrix)(unsafe.Pointer(f+48)).Fxx == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fxx && (*TFT_Matrix)(unsafe.Pointer(f+48)).Fyy == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fyy && (*TFT_Matrix)(unsafe.Pointer(f+48)).Fxy == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fxy && (*TFT_Matrix)(unsafe.Pointer(f+48)).Fyx == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fyx) {
  12445. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12446. 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)))
  12447. }
  12448. libfreetype.XFT_Set_Transform(tls, face, matrix, libc.UintptrFromInt32(0))
  12449. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  12450. }
  12451. return int32(m_True)
  12452. }
  12453. func __XftReleaseFile(tls *libc.TLS, f uintptr) {
  12454. var prev, v2 uintptr
  12455. var v1 int32
  12456. var v4 uint64
  12457. _, _, _, _ = prev, v1, v2, v4
  12458. v2 = f + 8
  12459. *(*int32)(unsafe.Pointer(v2))--
  12460. v1 = *(*int32)(unsafe.Pointer(v2))
  12461. if v1 != 0 {
  12462. return
  12463. }
  12464. if (*TXftFtFile)(unsafe.Pointer(f)).Flock != 0 {
  12465. __XftLockError(tls, __ccgo_ts+1196)
  12466. }
  12467. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12468. prev = uintptr(unsafe.Pointer(&__XftFtFiles))
  12469. for {
  12470. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  12471. break
  12472. }
  12473. if *(*uintptr)(unsafe.Pointer(prev)) == f {
  12474. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12475. break
  12476. }
  12477. goto _3
  12478. _3:
  12479. ;
  12480. prev = *(*uintptr)(unsafe.Pointer(prev))
  12481. }
  12482. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 {
  12483. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12484. }
  12485. }
  12486. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12487. v4 = libc.Xstrlen(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile) + uint64(1)
  12488. } else {
  12489. v4 = uint64(0)
  12490. }
  12491. XXftMemFree(tls, int32(_XFT_MEM_FILE), libc.Uint64FromInt64(96)+v4)
  12492. libc.Xfree(tls, f)
  12493. }
  12494. /*
  12495. * Find a prime larger than the minimum reasonable hash size
  12496. */
  12497. func __XftSqrt(tls *libc.TLS, a TFcChar32) (r TFcChar32) {
  12498. var h, l, m TFcChar32
  12499. _, _, _ = h, l, m
  12500. l = uint32(2)
  12501. h = a / uint32(2)
  12502. for h-l > uint32(1) {
  12503. m = (h + l) >> int32(1)
  12504. if m*m < a {
  12505. l = m
  12506. } else {
  12507. h = m
  12508. }
  12509. }
  12510. return h
  12511. }
  12512. func __XftIsPrime(tls *libc.TLS, i TFcChar32) (r TFcBool) {
  12513. var l, t TFcChar32
  12514. _, _ = l, t
  12515. if i < uint32(2) {
  12516. return m_FcFalse
  12517. }
  12518. if i&uint32(1) == uint32(0) {
  12519. if i == uint32(2) {
  12520. return int32(m_FcTrue)
  12521. }
  12522. return m_FcFalse
  12523. }
  12524. l = __XftSqrt(tls, i) + uint32(1)
  12525. t = uint32(3)
  12526. for {
  12527. if !(t <= l) {
  12528. break
  12529. }
  12530. if i%t == uint32(0) {
  12531. return m_FcFalse
  12532. }
  12533. goto _1
  12534. _1:
  12535. ;
  12536. t += uint32(2)
  12537. }
  12538. return int32(m_FcTrue)
  12539. }
  12540. func __XftHashSize(tls *libc.TLS, num_unicode TFcChar32) (r TFcChar32) {
  12541. var hash TFcChar32
  12542. _ = hash
  12543. /* at least 31.25 % extra space */
  12544. hash = num_unicode + num_unicode>>libc.Int32FromInt32(2) + num_unicode>>libc.Int32FromInt32(4)
  12545. if hash&uint32(1) == uint32(0) {
  12546. hash++
  12547. }
  12548. for !(__XftIsPrime(tls, hash) != 0) {
  12549. hash += uint32(2)
  12550. }
  12551. return hash
  12552. }
  12553. func XXftLockFace(tls *libc.TLS, public uintptr) (r TFT_Face) {
  12554. var face TFT_Face
  12555. var fi, font uintptr
  12556. _, _, _ = face, fi, font
  12557. font = public
  12558. fi = font + 48
  12559. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12560. /*
  12561. * Make sure the face is usable at the requested size
  12562. */
  12563. if face != 0 && !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+56) != 0) {
  12564. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12565. face = libc.UintptrFromInt32(0)
  12566. }
  12567. return face
  12568. }
  12569. func XXftUnlockFace(tls *libc.TLS, public uintptr) {
  12570. var font uintptr
  12571. _ = font
  12572. font = public
  12573. __XftUnlockFile(tls, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)
  12574. }
  12575. func _XftFontInfoFill(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r TFcBool) {
  12576. bp := tls.Alloc(144)
  12577. defer tls.Free(144)
  12578. var hash TFcChar32
  12579. var hashp, info, v1, v12, p10, p6, p7, p8, p9 uintptr
  12580. var mid, nhash, v11 int32
  12581. var v2, v3 TFT_Fixed
  12582. var v4, v5 float64
  12583. var _ /* aspect at bp+24 */ float64
  12584. var _ /* autohint at bp+80 */ TFcBool
  12585. var _ /* bitmap at bp+104 */ TFcBool
  12586. var _ /* dsize at bp+16 */ float64
  12587. var _ /* face at bp+96 */ TFT_Face
  12588. var _ /* filename at bp+0 */ uintptr
  12589. var _ /* fm1 at bp+40 */ TFcMatrix
  12590. var _ /* font_matrix at bp+32 */ uintptr
  12591. var _ /* global_advance at bp+84 */ TFcBool
  12592. var _ /* hint_style at bp+88 */ int32
  12593. var _ /* hinting at bp+72 */ TFcBool
  12594. var _ /* id at bp+8 */ int32
  12595. var _ /* vertical_layout at bp+76 */ TFcBool
  12596. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hash, hashp, info, mid, nhash, v1, v11, v12, v2, v3, v4, v5, p10, p6, p7, p8, p9
  12597. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12598. if !(info != 0) {
  12599. return m_FcFalse
  12600. }
  12601. /*
  12602. * Initialize the whole XftFontInfo so that padding doesn't interfere with
  12603. * hash or XftFontInfoEqual().
  12604. */
  12605. libc.Xmemset(tls, fi, int32('\000'), uint64(112))
  12606. /*
  12607. * Find the associated file
  12608. */
  12609. switch libfontconfig.XFcPatternGetString(tls, pattern, __ccgo_ts+1225, 0, bp) {
  12610. case int32(_FcResultNoMatch):
  12611. *(*uintptr)(unsafe.Pointer(bp)) = libc.UintptrFromInt32(0)
  12612. case int32(_FcResultMatch):
  12613. default:
  12614. goto bail0
  12615. }
  12616. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1230, 0, bp+8) {
  12617. case int32(_FcResultNoMatch):
  12618. *(*int32)(unsafe.Pointer(bp + 8)) = 0
  12619. case int32(_FcResultMatch):
  12620. default:
  12621. goto bail0
  12622. }
  12623. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12624. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFile(tls, *(*uintptr)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 8)))
  12625. } else {
  12626. if libfontconfig.XFcPatternGetFTFace(tls, pattern, __ccgo_ts+1236, 0, bp+96) == int32(_FcResultMatch) && *(*TFT_Face)(unsafe.Pointer(bp + 96)) != 0 {
  12627. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFaceFile(tls, *(*TFT_Face)(unsafe.Pointer(bp + 96)))
  12628. }
  12629. }
  12630. if !((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0) {
  12631. goto bail0
  12632. }
  12633. /*
  12634. * Compute pixel size
  12635. */
  12636. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1243, 0, bp+16) != int32(_FcResultMatch) {
  12637. goto bail1
  12638. }
  12639. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1253, 0, bp+24) != int32(_FcResultMatch) {
  12640. *(*float64)(unsafe.Pointer(bp + 24)) = float64(1)
  12641. }
  12642. (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize = int64(float64(*(*float64)(unsafe.Pointer(bp + 16)) * libc.Float64FromFloat64(64)))
  12643. (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize = int64(float64(float64(*(*float64)(unsafe.Pointer(bp + 16))**(*float64)(unsafe.Pointer(bp + 24))) * libc.Float64FromFloat64(64)))
  12644. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12645. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12646. v1 = *(*uintptr)(unsafe.Pointer(bp))
  12647. } else {
  12648. v1 = __ccgo_ts + 1260
  12649. }
  12650. libc.Xprintf(tls, __ccgo_ts+1267, libc.VaList(bp+120, v1, *(*int32)(unsafe.Pointer(bp + 8)), *(*float64)(unsafe.Pointer(bp + 16))))
  12651. }
  12652. /*
  12653. * Get antialias value
  12654. */
  12655. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+614, 0, fi+32) {
  12656. case int32(_FcResultNoMatch):
  12657. (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias = int32(m_True)
  12658. case int32(_FcResultMatch):
  12659. default:
  12660. goto bail1
  12661. }
  12662. /*
  12663. * Get rgba value
  12664. */
  12665. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+599, 0, fi+44) {
  12666. case int32(_FcResultNoMatch):
  12667. (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba = m_FC_RGBA_UNKNOWN
  12668. case int32(_FcResultMatch):
  12669. default:
  12670. goto bail1
  12671. }
  12672. /*
  12673. * Get lcd_filter value
  12674. */
  12675. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+604, 0, fi+48) {
  12676. case int32(_FcResultNoMatch):
  12677. (*TXftFontInfo)(unsafe.Pointer(fi)).Flcd_filter = int32(m_FC_LCD_DEFAULT)
  12678. case int32(_FcResultMatch):
  12679. default:
  12680. goto bail1
  12681. }
  12682. /*
  12683. * Get matrix and transform values
  12684. */
  12685. switch libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1304, 0, bp+32) {
  12686. case int32(_FcResultNoMatch):
  12687. v2 = libc.Int64FromInt32(0x10000)
  12688. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = v2
  12689. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = v2
  12690. v3 = libc.Int64FromInt32(0)
  12691. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = v3
  12692. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = v3
  12693. case int32(_FcResultMatch):
  12694. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxx))
  12695. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyy))
  12696. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxy))
  12697. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyx))
  12698. default:
  12699. goto bail1
  12700. }
  12701. mid = int32(1)
  12702. for libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1304, mid, bp+32) == int32(_FcResultMatch) {
  12703. v4 = libc.Float64FromInt32(1)
  12704. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fyy = v4
  12705. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fxx = v4
  12706. v5 = libc.Float64FromInt32(0)
  12707. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fyx = v5
  12708. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fxy = v5
  12709. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxx = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx) / libc.Float64FromInt64(0x10000)
  12710. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyy = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy) / libc.Float64FromInt64(0x10000)
  12711. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxy = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy) / libc.Float64FromInt64(0x10000)
  12712. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyx = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx) / libc.Float64FromInt64(0x10000)
  12713. libfontconfig.XFcMatrixMultiply(tls, bp+40, *(*uintptr)(unsafe.Pointer(bp + 32)), bp+40)
  12714. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxx))
  12715. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyy))
  12716. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxy))
  12717. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyx))
  12718. mid++
  12719. }
  12720. (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform = libc.BoolInt32((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx != int64(0x10000) || (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy != int64(0x10000))
  12721. /*
  12722. * Get render value, set to false if no Render extension present
  12723. */
  12724. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  12725. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+592, 0, fi+96) {
  12726. case int32(_FcResultTypeMismatch):
  12727. /*
  12728. * Fontconfig no longer supports xft's custom values in
  12729. * text patterns, so any name specifying render:true or
  12730. * render:false will have an invalid type in the resulting
  12731. * pattern. Just ignore that case so that the app doesn't
  12732. * just fail
  12733. */
  12734. /* fall through ... */
  12735. fallthrough
  12736. case int32(_FcResultNoMatch):
  12737. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  12738. case int32(_FcResultMatch):
  12739. default:
  12740. goto bail1
  12741. }
  12742. } else {
  12743. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = m_FcFalse
  12744. }
  12745. /*
  12746. * Compute glyph load flags
  12747. */
  12748. (*TXftFontInfo)(unsafe.Pointer(fi)).Fload_flags = int32(libc.Int64FromInt32(m_FT_LOAD_DEFAULT1) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(20))
  12749. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1311, 0, bp+104) {
  12750. case int32(_FcResultNoMatch):
  12751. *(*TFcBool)(unsafe.Pointer(bp + 104)) = m_FcFalse
  12752. case int32(_FcResultMatch):
  12753. default:
  12754. goto bail1
  12755. }
  12756. /* disable bitmaps when anti-aliasing or transforming glyphs */
  12757. if !(*(*TFcBool)(unsafe.Pointer(bp + 104)) != 0) && (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12758. p6 = fi + 92
  12759. *(*TFT_Int)(unsafe.Pointer(p6)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p6))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))
  12760. }
  12761. /* disable hinting if requested */
  12762. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+652, 0, bp+72) {
  12763. case int32(_FcResultNoMatch):
  12764. *(*TFcBool)(unsafe.Pointer(bp + 72)) = int32(m_FcTrue)
  12765. case int32(_FcResultMatch):
  12766. default:
  12767. goto bail1
  12768. }
  12769. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+624, 0, fi+36) {
  12770. case int32(_FcResultNoMatch):
  12771. (*TXftFontInfo)(unsafe.Pointer(fi)).Fembolden = m_FcFalse
  12772. case int32(_FcResultMatch):
  12773. default:
  12774. goto bail1
  12775. }
  12776. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+642, 0, bp+88) {
  12777. case int32(_FcResultNoMatch):
  12778. *(*int32)(unsafe.Pointer(bp + 88)) = int32(m_FC_HINT_FULL)
  12779. case int32(_FcResultMatch):
  12780. default:
  12781. goto bail1
  12782. }
  12783. if !(*(*TFcBool)(unsafe.Pointer(bp + 72)) != 0) || *(*int32)(unsafe.Pointer(bp + 88)) == m_FC_HINT_NONE {
  12784. p7 = fi + 92
  12785. *(*TFT_Int)(unsafe.Pointer(p7)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p7))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(1))
  12786. }
  12787. /* Figure out the load target, which modifies the hinting
  12788. * behavior of FreeType based on the intended use of the glyphs.
  12789. */
  12790. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 {
  12791. if m_FC_HINT_NONE < *(*int32)(unsafe.Pointer(bp + 88)) && *(*int32)(unsafe.Pointer(bp + 88)) < int32(m_FC_HINT_FULL) {
  12792. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_LIGHT) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12793. } else {
  12794. /* autohinter will snap stems to integer widths, when
  12795. * the LCD targets are used.
  12796. */
  12797. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  12798. case int32(m_FC_RGBA_RGB):
  12799. fallthrough
  12800. case int32(m_FC_RGBA_BGR):
  12801. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_LCD) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12802. case int32(m_FC_RGBA_VRGB):
  12803. fallthrough
  12804. case int32(m_FC_RGBA_VBGR):
  12805. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_LCD_V) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12806. break
  12807. }
  12808. }
  12809. } else {
  12810. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_MONO) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12811. }
  12812. /* set vertical layout if requested */
  12813. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1326, 0, bp+76) {
  12814. case int32(_FcResultNoMatch):
  12815. *(*TFcBool)(unsafe.Pointer(bp + 76)) = m_FcFalse
  12816. case int32(_FcResultMatch):
  12817. default:
  12818. goto bail1
  12819. }
  12820. if *(*TFcBool)(unsafe.Pointer(bp + 76)) != 0 {
  12821. p8 = fi + 92
  12822. *(*TFT_Int)(unsafe.Pointer(p8)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p8))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(4))
  12823. }
  12824. /* force autohinting if requested */
  12825. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+633, 0, bp+80) {
  12826. case int32(_FcResultNoMatch):
  12827. *(*TFcBool)(unsafe.Pointer(bp + 80)) = m_FcFalse
  12828. case int32(_FcResultMatch):
  12829. default:
  12830. goto bail1
  12831. }
  12832. if *(*TFcBool)(unsafe.Pointer(bp + 80)) != 0 {
  12833. p9 = fi + 92
  12834. *(*TFT_Int)(unsafe.Pointer(p9)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p9))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(5))
  12835. }
  12836. /* disable global advance width (for broken DynaLab TT CJK fonts) */
  12837. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1341, 0, bp+84) {
  12838. case int32(_FcResultNoMatch):
  12839. *(*TFcBool)(unsafe.Pointer(bp + 84)) = int32(m_FcTrue)
  12840. case int32(_FcResultMatch):
  12841. default:
  12842. goto bail1
  12843. }
  12844. if !(*(*TFcBool)(unsafe.Pointer(bp + 84)) != 0) {
  12845. p10 = fi + 92
  12846. *(*TFT_Int)(unsafe.Pointer(p10)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p10))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(9))
  12847. }
  12848. /*
  12849. * Get requested spacing value
  12850. */
  12851. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1355, 0, fi+100) {
  12852. case int32(_FcResultNoMatch):
  12853. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = m_FC_PROPORTIONAL
  12854. case int32(_FcResultMatch):
  12855. default:
  12856. goto bail1
  12857. }
  12858. /*
  12859. * Check for minspace
  12860. */
  12861. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+660, 0, fi+104) {
  12862. case int32(_FcResultNoMatch):
  12863. (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace = m_FcFalse
  12864. case int32(_FcResultMatch):
  12865. default:
  12866. goto bail1
  12867. }
  12868. /*
  12869. * Check for fixed pixel spacing
  12870. */
  12871. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1363, 0, fi+108) {
  12872. case int32(_FcResultNoMatch):
  12873. (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width = 0
  12874. case int32(_FcResultMatch):
  12875. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  12876. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = int32(m_FC_MONO)
  12877. }
  12878. default:
  12879. goto bail1
  12880. }
  12881. /*
  12882. * Step over hash value in the structure
  12883. */
  12884. hash = uint32(0)
  12885. hashp = fi + uintptr(1)*4
  12886. nhash = libc.Int32FromUint64(libc.Uint64FromInt64(112)/libc.Uint64FromInt64(4) - libc.Uint64FromInt32(1))
  12887. for {
  12888. v11 = nhash
  12889. nhash--
  12890. if !(v11 != 0) {
  12891. break
  12892. }
  12893. v12 = hashp
  12894. hashp += 4
  12895. hash += *(*TFcChar32)(unsafe.Pointer(v12))
  12896. }
  12897. (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash = hash
  12898. /*
  12899. * All done
  12900. */
  12901. return int32(m_FcTrue)
  12902. goto bail1
  12903. bail1:
  12904. ;
  12905. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12906. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = libc.UintptrFromInt32(0)
  12907. goto bail0
  12908. bail0:
  12909. ;
  12910. return m_FcFalse
  12911. return r
  12912. }
  12913. func _XftFontInfoEmpty(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12914. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0 {
  12915. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12916. }
  12917. }
  12918. func XXftFontInfoCreate(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  12919. var fi uintptr
  12920. _ = fi
  12921. fi = libc.Xmalloc(tls, uint64(112))
  12922. if !(fi != 0) {
  12923. return libc.UintptrFromInt32(0)
  12924. }
  12925. if !(_XftFontInfoFill(tls, dpy, pattern, fi) != 0) {
  12926. libc.Xfree(tls, fi)
  12927. fi = libc.UintptrFromInt32(0)
  12928. }
  12929. XXftMemAlloc(tls, int32(_XFT_MEM_FONT), uint64(112))
  12930. return fi
  12931. }
  12932. func XXftFontInfoDestroy(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12933. _XftFontInfoEmpty(tls, dpy, fi)
  12934. XXftMemFree(tls, int32(_XFT_MEM_FONT), uint64(112))
  12935. libc.Xfree(tls, fi)
  12936. }
  12937. func XXftFontInfoHash(tls *libc.TLS, fi uintptr) (r TFcChar32) {
  12938. return (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash
  12939. }
  12940. func XXftFontInfoEqual(tls *libc.TLS, a uintptr, b uintptr) (r TFcBool) {
  12941. return libc.BoolInt32(libc.Xmemcmp(tls, a, b, uint64(112)) == 0)
  12942. }
  12943. func XXftFontOpenInfo(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r uintptr) {
  12944. bp := tls.Alloc(96)
  12945. defer tls.Free(96)
  12946. var alloc_size Tsize_t
  12947. var antialias, color TFcBool
  12948. var ascent, descent, height, i, v2, v4 int32
  12949. var bucket, font, format, info, v3 uintptr
  12950. var face TFT_Face
  12951. var hash_value, num_unicode, rehash_value TFcChar32
  12952. var num_glyphs TFT_UInt
  12953. var v6 uint64
  12954. var _ /* charset at bp+0 */ uintptr
  12955. var _ /* max_glyph_memory at bp+8 */ int32
  12956. var _ /* vector at bp+16 */ TFT_Vector
  12957. var _ /* vector at bp+32 */ TFT_Vector
  12958. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  12959. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12960. if !(info != 0) {
  12961. return libc.UintptrFromInt32(0)
  12962. }
  12963. /*
  12964. * Find a matching previously opened font
  12965. */
  12966. bucket = info + 472 + uintptr((*TXftFontInfo)(unsafe.Pointer(fi)).Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  12967. font = *(*uintptr)(unsafe.Pointer(bucket))
  12968. for {
  12969. if !(font != 0) {
  12970. break
  12971. }
  12972. if XXftFontInfoEqual(tls, font+48, fi) != 0 {
  12973. v3 = font + 160
  12974. v2 = *(*int32)(unsafe.Pointer(v3))
  12975. *(*int32)(unsafe.Pointer(v3))++
  12976. if !(v2 != 0) {
  12977. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  12978. }
  12979. libfontconfig.XFcPatternDestroy(tls, pattern)
  12980. return font
  12981. }
  12982. goto _1
  12983. _1:
  12984. ;
  12985. font = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  12986. }
  12987. /*
  12988. * No existing font, create another.
  12989. */
  12990. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  12991. libc.Xprintf(tls, __ccgo_ts+1373, libc.VaList(bp+56, (*TXftFtFile)(unsafe.Pointer((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)).Ffile, (*TXftFtFile)(unsafe.Pointer((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)).Fid, int32((*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize)>>int32(6), int32((*TXftFontInfo)(unsafe.Pointer(fi)).Fysize)>>int32(6)))
  12992. }
  12993. if libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+201, 0, bp+8) != int32(_FcResultMatch) {
  12994. *(*int32)(unsafe.Pointer(bp + 8)) = libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024)
  12995. }
  12996. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12997. if !(face != 0) {
  12998. goto bail0
  12999. }
  13000. if !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+56) != 0) {
  13001. goto bail1
  13002. }
  13003. /*
  13004. * Get the set of Unicode codepoints covered by the font.
  13005. * If the incoming pattern doesn't provide this data, go
  13006. * off and compute it. Yes, this is expensive, but it's
  13007. * required to map Unicode to glyph indices.
  13008. */
  13009. if libfontconfig.XFcPatternGetCharSet(tls, pattern, __ccgo_ts+1400, 0, bp) == int32(_FcResultMatch) {
  13010. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcCharSetCopy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13011. } else {
  13012. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcFreeTypeCharSet(tls, face, libfontconfig.XFcConfigGetBlanks(tls, libc.UintptrFromInt32(0)))
  13013. }
  13014. antialias = (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias
  13015. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  13016. antialias = m_FcFalse
  13017. }
  13018. if !!((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(14)) != 0) {
  13019. v4 = int32(m_FcTrue)
  13020. } else {
  13021. v4 = m_FcFalse
  13022. }
  13023. color = v4
  13024. /*
  13025. * Find the appropriate picture format
  13026. */
  13027. if (*TXftFontInfo)(unsafe.Pointer(fi)).Frender != 0 {
  13028. if color != 0 {
  13029. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  13030. } else {
  13031. if antialias != 0 {
  13032. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  13033. case int32(m_FC_RGBA_RGB):
  13034. fallthrough
  13035. case int32(m_FC_RGBA_BGR):
  13036. fallthrough
  13037. case int32(m_FC_RGBA_VRGB):
  13038. fallthrough
  13039. case int32(m_FC_RGBA_VBGR):
  13040. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  13041. default:
  13042. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  13043. break
  13044. }
  13045. } else {
  13046. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA1))
  13047. }
  13048. }
  13049. if !(format != 0) {
  13050. goto bail2
  13051. }
  13052. } else {
  13053. format = libc.UintptrFromInt32(0)
  13054. }
  13055. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  13056. num_unicode = libfontconfig.XFcCharSetCount(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13057. hash_value = __XftHashSize(tls, num_unicode)
  13058. rehash_value = hash_value - uint32(2)
  13059. } else {
  13060. hash_value = uint32(0)
  13061. rehash_value = uint32(0)
  13062. }
  13063. /*
  13064. * Sometimes the glyphs are numbered 1..n, other times 0..n-1,
  13065. * accept either numbering scheme by making room in the table
  13066. */
  13067. num_glyphs = libc.Uint32FromInt64((*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_glyphs) + uint32(1)
  13068. alloc_size = libc.Uint64FromInt64(256) + uint64(num_glyphs)*libc.Uint64FromInt64(8) + uint64(hash_value)*libc.Uint64FromInt64(8)
  13069. font = libc.Xmalloc(tls, alloc_size)
  13070. if !(font != 0) {
  13071. goto bail2
  13072. }
  13073. XXftMemAlloc(tls, int32(_XFT_MEM_FONT), alloc_size)
  13074. /*
  13075. * Public fields
  13076. */
  13077. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  13078. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  13079. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender
  13080. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+56)
  13081. descent = int32(-((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6)))
  13082. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  13083. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender
  13084. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+56)
  13085. ascent = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6))
  13086. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  13087. height = ascent + descent
  13088. } else {
  13089. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  13090. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight
  13091. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+56)
  13092. height = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6))
  13093. }
  13094. } else {
  13095. descent = -int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender >> libc.Int32FromInt32(6))
  13096. ascent = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender >> libc.Int32FromInt32(6))
  13097. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  13098. height = ascent + descent
  13099. } else {
  13100. height = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight >> libc.Int32FromInt32(6))
  13101. }
  13102. }
  13103. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fascent = ascent
  13104. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fdescent = descent
  13105. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fheight = height
  13106. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  13107. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width
  13108. } else {
  13109. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  13110. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  13111. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = 0
  13112. libfreetype.XFT_Vector_Transform(tls, bp+32, fi+56)
  13113. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx >> libc.Int32FromInt32(6))
  13114. } else {
  13115. (*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))
  13116. }
  13117. }
  13118. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset = *(*uintptr)(unsafe.Pointer(bp))
  13119. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern = pattern
  13120. /*
  13121. * Management fields
  13122. */
  13123. (*TXftFontInt)(unsafe.Pointer(font)).Fref = int32(1)
  13124. (*TXftFontInt)(unsafe.Pointer(font)).Fnext = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  13125. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = font
  13126. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next = *(*uintptr)(unsafe.Pointer(bucket))
  13127. *(*uintptr)(unsafe.Pointer(bucket)) = font
  13128. /*
  13129. * Copy the info over
  13130. */
  13131. (*TXftFontInt)(unsafe.Pointer(font)).Finfo = *(*TXftFontInfo)(unsafe.Pointer(fi))
  13132. /*
  13133. * reset the antialias field. It can't
  13134. * be set correctly until the font is opened,
  13135. * which doesn't happen in XftFontInfoFill
  13136. */
  13137. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias = antialias
  13138. /*
  13139. * Set color value, which is only known once the
  13140. * font was loaded
  13141. */
  13142. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor = color
  13143. /*
  13144. * bump XftFile reference count
  13145. */
  13146. (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Fref++
  13147. /*
  13148. * Per glyph information
  13149. */
  13150. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs = font + libc.UintptrFromInt32(1)*256
  13151. libc.Xmemset(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs, int32('\000'), uint64(num_glyphs)*uint64(8))
  13152. (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs = num_glyphs
  13153. /*
  13154. * Memory-usage tracking
  13155. */
  13156. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = uint32(0xffffffff)
  13157. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse = uint32(0)
  13158. /*
  13159. * Unicode hash table information
  13160. */
  13161. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_table = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*8
  13162. i = 0
  13163. for {
  13164. if !(libc.Uint32FromInt32(i) < hash_value) {
  13165. break
  13166. }
  13167. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fucs4 = libc.Uint32FromInt32(^libc.Int32FromInt32(0))
  13168. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fglyph = uint32(0)
  13169. goto _5
  13170. _5:
  13171. ;
  13172. i++
  13173. }
  13174. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_value = libc.Int32FromUint32(hash_value)
  13175. (*TXftFontInt)(unsafe.Pointer(font)).Frehash_value = libc.Int32FromUint32(rehash_value)
  13176. /*
  13177. * X specific fields
  13178. */
  13179. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  13180. (*TXftFontInt)(unsafe.Pointer(font)).Fformat = format
  13181. /*
  13182. * Glyph memory management fields
  13183. */
  13184. (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory = uint64(0)
  13185. (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory = libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 8)))
  13186. (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage
  13187. (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs
  13188. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  13189. v6 = uint64(48)
  13190. } else {
  13191. v6 = uint64(40)
  13192. }
  13193. (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph = uint32(v6)
  13194. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13195. return font
  13196. goto bail2
  13197. bail2:
  13198. ;
  13199. libfontconfig.XFcCharSetDestroy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13200. goto bail1
  13201. bail1:
  13202. ;
  13203. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13204. goto bail0
  13205. bail0:
  13206. ;
  13207. return libc.UintptrFromInt32(0)
  13208. return r
  13209. }
  13210. func XXftFontOpenPattern(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  13211. bp := tls.Alloc(112)
  13212. defer tls.Free(112)
  13213. var font uintptr
  13214. var _ /* info at bp+0 */ TXftFontInfo
  13215. _ = font
  13216. if !(_XftFontInfoFill(tls, dpy, pattern, bp) != 0) {
  13217. return libc.UintptrFromInt32(0)
  13218. }
  13219. font = XXftFontOpenInfo(tls, dpy, pattern, bp)
  13220. _XftFontInfoEmpty(tls, dpy, bp)
  13221. return font
  13222. }
  13223. func XXftFontCopy(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  13224. var font uintptr
  13225. _ = font
  13226. font = public
  13227. (*TXftFontInt)(unsafe.Pointer(font)).Fref++
  13228. return public
  13229. }
  13230. func _XftFontDestroy(tls *libc.TLS, dpy uintptr, public uintptr) {
  13231. var font, info, xftg uintptr
  13232. var i TFT_UInt
  13233. _, _, _, _ = font, i, info, xftg
  13234. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13235. font = public
  13236. /* note reduction in memory use */
  13237. if info != 0 {
  13238. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  13239. }
  13240. /* Clean up the info */
  13241. _XftFontInfoEmpty(tls, dpy, font+48)
  13242. /* Free the glyphset */
  13243. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  13244. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  13245. }
  13246. /* Free the glyphs */
  13247. i = uint32(0)
  13248. for {
  13249. if !(i < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13250. break
  13251. }
  13252. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(i)*8))
  13253. if xftg != 0 {
  13254. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  13255. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  13256. }
  13257. libc.Xfree(tls, xftg)
  13258. }
  13259. goto _1
  13260. _1:
  13261. ;
  13262. i++
  13263. }
  13264. /* Free the pattern and the charset */
  13265. libfontconfig.XFcPatternDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern)
  13266. libfontconfig.XFcCharSetDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset)
  13267. /* Finally, free the font structure */
  13268. XXftMemFree(tls, int32(_XFT_MEM_FONT), libc.Uint64FromInt64(256)+uint64((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*libc.Uint64FromInt64(8)+libc.Uint64FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)*libc.Uint64FromInt64(8))
  13269. libc.Xfree(tls, font)
  13270. }
  13271. func _XftFontFindNthUnref(tls *libc.TLS, info uintptr, n int32) (r uintptr) {
  13272. var font, public uintptr
  13273. var v2 int32
  13274. var v3 bool
  13275. _, _, _, _ = font, public, v2, v3
  13276. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  13277. for {
  13278. if !(public != 0) {
  13279. break
  13280. }
  13281. font = public
  13282. if v3 = !((*TXftFontInt)(unsafe.Pointer(font)).Fref != 0); v3 {
  13283. v2 = n
  13284. n--
  13285. }
  13286. if v3 && !(v2 != 0) {
  13287. break
  13288. }
  13289. goto _1
  13290. _1:
  13291. ;
  13292. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13293. }
  13294. return public
  13295. }
  13296. func XXftFontManageMemory(tls *libc.TLS, dpy uintptr) {
  13297. bp := tls.Alloc(48)
  13298. defer tls.Free(48)
  13299. var font, info, prev, public uintptr
  13300. _, _, _, _ = font, info, prev, public
  13301. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13302. if !(info != 0) {
  13303. return
  13304. }
  13305. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts {
  13306. public = _XftFontFindNthUnref(tls, info, libc.Xrand(tls)%(*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts)
  13307. font = public
  13308. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13309. libc.Xprintf(tls, __ccgo_ts+1408, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Ffile, (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Fid, int32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fxsize)>>int32(6), int32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fysize)>>int32(6)))
  13310. }
  13311. /* Unhook from display list */
  13312. prev = info + 40
  13313. for {
  13314. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13315. break
  13316. }
  13317. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13318. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13319. break
  13320. }
  13321. goto _1
  13322. _1:
  13323. ;
  13324. prev = *(*uintptr)(unsafe.Pointer(prev)) + 32
  13325. }
  13326. /* Unhook from hash list */
  13327. prev = info + 472 + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  13328. for {
  13329. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13330. break
  13331. }
  13332. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13333. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  13334. break
  13335. }
  13336. goto _2
  13337. _2:
  13338. ;
  13339. prev = *(*uintptr)(unsafe.Pointer(prev)) + 40
  13340. }
  13341. /* Destroy the font */
  13342. _XftFontDestroy(tls, dpy, public)
  13343. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  13344. }
  13345. }
  13346. func XXftFontClose(tls *libc.TLS, dpy uintptr, public uintptr) {
  13347. var font, info, v2 uintptr
  13348. var v1 int32
  13349. _, _, _, _ = font, info, v1, v2
  13350. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13351. font = public
  13352. v2 = font + 160
  13353. *(*int32)(unsafe.Pointer(v2))--
  13354. v1 = *(*int32)(unsafe.Pointer(v2))
  13355. if v1 != 0 {
  13356. return
  13357. }
  13358. if info != 0 {
  13359. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts++
  13360. XXftFontManageMemory(tls, dpy)
  13361. } else {
  13362. _XftFontDestroy(tls, dpy, public)
  13363. }
  13364. }
  13365. func XXftInitFtLibrary(tls *libc.TLS) (r TFcBool) {
  13366. if X_XftFTlibrary != 0 {
  13367. return int32(m_FcTrue)
  13368. }
  13369. if libfreetype.XFT_Init_FreeType(tls, uintptr(unsafe.Pointer(&X_XftFTlibrary))) != 0 {
  13370. return m_FcFalse
  13371. }
  13372. return int32(m_FcTrue)
  13373. }
  13374. const m_FT_LCD_FILTER_FIVE_TAPS = 5
  13375. const m_FT_LOAD_DEFAULT2 = 0x0
  13376. const m_FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY"
  13377. const m_FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY"
  13378. const m_ft_glyph_bbox_gridfit = "FT_GLYPH_BBOX_GRIDFIT"
  13379. const m_ft_glyph_bbox_pixels = "FT_GLYPH_BBOX_PIXELS"
  13380. const m_ft_glyph_bbox_subpixels = "FT_GLYPH_BBOX_SUBPIXELS"
  13381. const m_ft_glyph_bbox_truncate = "FT_GLYPH_BBOX_TRUNCATE"
  13382. const m_ft_glyph_bbox_unscaled = "FT_GLYPH_BBOX_UNSCALED"
  13383. type TFT_Orientation = int32
  13384. type _FT_Orientation_ = int32
  13385. const _FT_ORIENTATION_TRUETYPE = 0
  13386. const _FT_ORIENTATION_POSTSCRIPT = 1
  13387. const _FT_ORIENTATION_FILL_RIGHT = 0
  13388. const _FT_ORIENTATION_FILL_LEFT = 1
  13389. const _FT_ORIENTATION_NONE = 2
  13390. type TFT_LcdFilter = int32
  13391. type _FT_LcdFilter_ = int32
  13392. const _FT_LCD_FILTER_NONE = 0
  13393. const _FT_LCD_FILTER_DEFAULT = 1
  13394. const _FT_LCD_FILTER_LIGHT = 2
  13395. const _FT_LCD_FILTER_LEGACY1 = 3
  13396. const _FT_LCD_FILTER_LEGACY = 16
  13397. const _FT_LCD_FILTER_MAX = 17
  13398. type TFT_LcdFiveTapFilter = [5]TFT_Byte
  13399. type TFT_Glyph = uintptr
  13400. type TFT_GlyphRec_ = struct {
  13401. Flibrary TFT_Library
  13402. Fclazz uintptr
  13403. Fformat TFT_Glyph_Format
  13404. Fadvance TFT_Vector
  13405. }
  13406. type TFT_GlyphRec = struct {
  13407. Flibrary TFT_Library
  13408. Fclazz uintptr
  13409. Fformat TFT_Glyph_Format
  13410. Fadvance TFT_Vector
  13411. }
  13412. type TFT_BitmapGlyph = uintptr
  13413. type TFT_BitmapGlyphRec_ = struct {
  13414. Froot TFT_GlyphRec
  13415. Fleft TFT_Int
  13416. Ftop TFT_Int
  13417. Fbitmap TFT_Bitmap
  13418. }
  13419. type TFT_BitmapGlyphRec = struct {
  13420. Froot TFT_GlyphRec
  13421. Fleft TFT_Int
  13422. Ftop TFT_Int
  13423. Fbitmap TFT_Bitmap
  13424. }
  13425. type TFT_OutlineGlyph = uintptr
  13426. type TFT_OutlineGlyphRec_ = struct {
  13427. Froot TFT_GlyphRec
  13428. Foutline TFT_Outline
  13429. }
  13430. type TFT_OutlineGlyphRec = struct {
  13431. Froot TFT_GlyphRec
  13432. Foutline TFT_Outline
  13433. }
  13434. type TFT_SvgGlyph = uintptr
  13435. type TFT_SvgGlyphRec_ = struct {
  13436. Froot TFT_GlyphRec
  13437. Fsvg_document uintptr
  13438. Fsvg_document_length TFT_ULong
  13439. Fglyph_index TFT_UInt
  13440. Fmetrics TFT_Size_Metrics
  13441. Funits_per_EM TFT_UShort
  13442. Fstart_glyph_id TFT_UShort
  13443. Fend_glyph_id TFT_UShort
  13444. Ftransform TFT_Matrix
  13445. Fdelta TFT_Vector
  13446. }
  13447. type TFT_SvgGlyphRec = struct {
  13448. Froot TFT_GlyphRec
  13449. Fsvg_document uintptr
  13450. Fsvg_document_length TFT_ULong
  13451. Fglyph_index TFT_UInt
  13452. Fmetrics TFT_Size_Metrics
  13453. Funits_per_EM TFT_UShort
  13454. Fstart_glyph_id TFT_UShort
  13455. Fend_glyph_id TFT_UShort
  13456. Ftransform TFT_Matrix
  13457. Fdelta TFT_Vector
  13458. }
  13459. type TFT_Glyph_BBox_Mode = int32
  13460. type _FT_Glyph_BBox_Mode_ = int32
  13461. const _FT_GLYPH_BBOX_UNSCALED = 0
  13462. const _FT_GLYPH_BBOX_SUBPIXELS = 0
  13463. const _FT_GLYPH_BBOX_GRIDFIT = 1
  13464. const _FT_GLYPH_BBOX_TRUNCATE = 2
  13465. const _FT_GLYPH_BBOX_PIXELS = 3
  13466. /* */
  13467. /* END */
  13468. /* Local Variables: */
  13469. /* coding: utf-8 */
  13470. /* End: */
  13471. type Tm3x3 = [3][3]float64
  13472. func _m3x3_uniform(tls *libc.TLS, m uintptr) {
  13473. var v1, v2, v3, v4, v5, v6, v7 float64
  13474. _, _, _, _, _, _, _ = v1, v2, v3, v4, v5, v6, v7
  13475. v2 = libc.Float64FromFloat64(1)
  13476. *(*float64)(unsafe.Pointer(m + 2*24 + 2*8)) = v2
  13477. v1 = v2
  13478. *(*float64)(unsafe.Pointer(m + 1*24 + 1*8)) = v1
  13479. *(*float64)(unsafe.Pointer(m)) = v1
  13480. v7 = libc.Float64FromInt32(0)
  13481. *(*float64)(unsafe.Pointer(m + 2*24 + 1*8)) = v7
  13482. v6 = v7
  13483. *(*float64)(unsafe.Pointer(m + 2*24)) = v6
  13484. v5 = v6
  13485. *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) = v5
  13486. v4 = v5
  13487. *(*float64)(unsafe.Pointer(m + 2*8)) = v4
  13488. v3 = v4
  13489. *(*float64)(unsafe.Pointer(m + 1*24)) = v3
  13490. *(*float64)(unsafe.Pointer(m + 1*8)) = v3
  13491. }
  13492. func _m3x3_transform(tls *libc.TLS, v uintptr, m uintptr) {
  13493. var x, y float64
  13494. _, _ = x, y
  13495. x = float64((*TFT_Vector)(unsafe.Pointer(v)).Fx)
  13496. y = float64((*TFT_Vector)(unsafe.Pointer(v)).Fy)
  13497. (*TFT_Vector)(unsafe.Pointer(v)).Fx = int64(float64(x**(*float64)(unsafe.Pointer(m))) + float64(y**(*float64)(unsafe.Pointer(m + 1*8))) + *(*float64)(unsafe.Pointer(m + 2*8)) + libc.Float64FromFloat64(0.5))
  13498. (*TFT_Vector)(unsafe.Pointer(v)).Fy = int64(float64(x**(*float64)(unsafe.Pointer(m + 1*24))) + float64(y**(*float64)(unsafe.Pointer(m + 1*24 + 1*8))) + *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) + libc.Float64FromFloat64(0.5))
  13499. }
  13500. func _m3x3_invert(tls *libc.TLS, m uintptr, mi uintptr) {
  13501. var det float64
  13502. _ = det
  13503. 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)))))
  13504. 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)))))
  13505. 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)))))
  13506. det = float64(1) / det
  13507. *(*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)))))
  13508. *(*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)))))
  13509. *(*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)))))
  13510. *(*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)))))
  13511. *(*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)))))
  13512. *(*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)))))
  13513. *(*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)))))
  13514. *(*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)))))
  13515. *(*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)))))
  13516. }
  13517. /*
  13518. * Validate the memory info for a font
  13519. */
  13520. func __XftFontValidateMemory(tls *libc.TLS, dpy uintptr, public uintptr) {
  13521. bp := tls.Alloc(32)
  13522. defer tls.Free(32)
  13523. var font, xftg uintptr
  13524. var glyph_memory uint64
  13525. var glyphindex TFT_UInt
  13526. _, _, _, _ = font, glyph_memory, glyphindex, xftg
  13527. font = public
  13528. glyph_memory = uint64(0)
  13529. glyphindex = uint32(0)
  13530. for {
  13531. if !(glyphindex < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13532. break
  13533. }
  13534. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  13535. if xftg != 0 {
  13536. glyph_memory += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13537. }
  13538. goto _1
  13539. _1:
  13540. ;
  13541. glyphindex++
  13542. }
  13543. if glyph_memory != (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory {
  13544. libc.Xprintf(tls, __ccgo_ts+1452, libc.VaList(bp+8, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, glyph_memory))
  13545. }
  13546. }
  13547. // C documentation
  13548. //
  13549. // /*
  13550. // * Validate the glyph usage-links for a font.
  13551. // */
  13552. func __XftValidateGlyphUsage(tls *libc.TLS, font uintptr) {
  13553. bp := tls.Alloc(32)
  13554. defer tls.Free(32)
  13555. var forward, next, reverse, v2, v4 TFT_UInt
  13556. var x1st, xuse uintptr
  13557. _, _, _, _, _, _, _ = forward, next, reverse, x1st, xuse, v2, v4
  13558. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != uint32(0xffffffff) {
  13559. x1st = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  13560. xuse = x1st
  13561. forward = uint32(1)
  13562. next = (*TXftGlyphUsage)(unsafe.Pointer(x1st)).Fnewer
  13563. for {
  13564. if !(xuse != libc.UintptrFromInt32(0) && next != (*TXftFontInt)(unsafe.Pointer(font)).Fnewest) {
  13565. break
  13566. }
  13567. if next >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  13568. libc.Xprintf(tls, __ccgo_ts+1511, libc.VaList(bp+8, next))
  13569. break
  13570. }
  13571. forward++
  13572. v2 = forward
  13573. if v2 > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13574. libc.Xprintf(tls, __ccgo_ts+1534, libc.VaList(bp+8, forward, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13575. if forward > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse+uint32(10) {
  13576. break
  13577. }
  13578. }
  13579. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(next)*8))
  13580. goto _1
  13581. _1:
  13582. ;
  13583. next = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  13584. }
  13585. if forward < (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13586. libc.Xprintf(tls, __ccgo_ts+1574, libc.VaList(bp+8, forward, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13587. }
  13588. reverse = uint32(1)
  13589. next = (*TXftGlyphUsage)(unsafe.Pointer(x1st)).Folder
  13590. for {
  13591. if !(xuse != libc.UintptrFromInt32(0) && next != (*TXftFontInt)(unsafe.Pointer(font)).Fnewest) {
  13592. break
  13593. }
  13594. if next >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  13595. libc.Xprintf(tls, __ccgo_ts+1613, libc.VaList(bp+8, next))
  13596. break
  13597. }
  13598. reverse++
  13599. v4 = reverse
  13600. if v4 > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13601. libc.Xprintf(tls, __ccgo_ts+1534, libc.VaList(bp+8, reverse, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13602. if reverse > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse+uint32(10) {
  13603. break
  13604. }
  13605. }
  13606. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(next)*8))
  13607. goto _3
  13608. _3:
  13609. ;
  13610. next = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  13611. }
  13612. if reverse < (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13613. libc.Xprintf(tls, __ccgo_ts+1574, libc.VaList(bp+8, reverse, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13614. }
  13615. if forward != reverse {
  13616. libc.Xprintf(tls, __ccgo_ts+1635, libc.VaList(bp+8, forward, reverse))
  13617. libc.Xexit(tls, int32(1))
  13618. }
  13619. }
  13620. }
  13621. // C documentation
  13622. //
  13623. // /* we sometimes need to convert the glyph bitmap in a FT_GlyphSlot
  13624. // * into a different format. For example, we want to convert a
  13625. // * FT_PIXEL_MODE_LCD or FT_PIXEL_MODE_LCD_V bitmap into a 32-bit
  13626. // * ARGB or ABGR bitmap.
  13627. // *
  13628. // * this function prepares a target descriptor for this operation.
  13629. // *
  13630. // * input :: target bitmap descriptor. The function will set its
  13631. // * 'width', 'rows' and 'pitch' fields, and only these
  13632. // *
  13633. // * slot :: the glyph slot containing the source bitmap. this
  13634. // * function assumes that slot->format == FT_GLYPH_FORMAT_BITMAP
  13635. // *
  13636. // * mode :: the requested final rendering mode. supported values are
  13637. // * MONO, NORMAL (i.e. gray), LCD and LCD_V
  13638. // *
  13639. // * the function returns the size in bytes of the corresponding buffer,
  13640. // * it's up to the caller to allocate the corresponding memory block
  13641. // * before calling _fill_xrender_bitmap
  13642. // *
  13643. // * it also returns -1 in case of error (e.g. incompatible arguments,
  13644. // * like trying to convert a gray bitmap into a monochrome one)
  13645. // */
  13646. func __compute_xrender_bitmap_size(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, matrix uintptr, m uintptr) (r int32) {
  13647. bp := tls.Alloc(80)
  13648. defer tls.Free(80)
  13649. var bottom, height, left, pitch, right, top, width, xc, yc, v1, v2, v3, v6, v7 int32
  13650. var ftbit uintptr
  13651. var v10 float64
  13652. var v8 TFT_Fixed
  13653. var v9 TFT_Pos
  13654. var _ /* inverse at bp+32 */ TFT_Matrix
  13655. var _ /* mirror at bp+0 */ TFT_Matrix
  13656. var _ /* vector at bp+64 */ TFT_Vector
  13657. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bottom, ftbit, height, left, pitch, right, top, width, xc, yc, v1, v10, v2, v3, v6, v7, v8, v9
  13658. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(slot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13659. return -int32(1)
  13660. }
  13661. /* compute the size of the final bitmap */
  13662. ftbit = slot + 152
  13663. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13664. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13665. if matrix != 0 && mode == int32(_FT_RENDER_MODE_NORMAL) {
  13666. v3 = libc.Int32FromInt32(0)
  13667. bottom = v3
  13668. v2 = v3
  13669. top = v2
  13670. v1 = v2
  13671. right = v1
  13672. left = v1
  13673. xc = 0
  13674. for {
  13675. if !(xc <= int32(1)) {
  13676. break
  13677. }
  13678. yc = 0
  13679. for {
  13680. if !(yc <= int32(1)) {
  13681. break
  13682. }
  13683. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx = int64(xc * width)
  13684. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy = int64(yc * height)
  13685. libfreetype.XFT_Vector_Transform(tls, bp+64, matrix)
  13686. if xc == 0 && yc == 0 {
  13687. v6 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13688. right = v6
  13689. left = v6
  13690. v7 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13691. bottom = v7
  13692. top = v7
  13693. } else {
  13694. if int64(left) > (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx {
  13695. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13696. }
  13697. if int64(right) < (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx {
  13698. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13699. }
  13700. if int64(bottom) > (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy {
  13701. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13702. }
  13703. if int64(top) < (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy {
  13704. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13705. }
  13706. }
  13707. goto _5
  13708. _5:
  13709. ;
  13710. yc++
  13711. }
  13712. goto _4
  13713. _4:
  13714. ;
  13715. xc++
  13716. }
  13717. width = right - left
  13718. height = top - bottom
  13719. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fxx = int64(+libc.Int32FromInt32(0x10000))
  13720. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fyy = int64(-int32(0x10000))
  13721. v8 = libc.Int64FromInt32(0)
  13722. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fyx = v8
  13723. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fxy = v8
  13724. *(*TFT_Matrix)(unsafe.Pointer(bp + 32)) = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  13725. libfreetype.XFT_Matrix_Multiply(tls, bp, bp+32)
  13726. libfreetype.XFT_Matrix_Invert(tls, bp+32)
  13727. libfreetype.XFT_Matrix_Multiply(tls, bp, bp+32)
  13728. v9 = libc.Int64FromInt32(0)
  13729. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy = v9
  13730. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx = v9
  13731. libfreetype.XFT_Vector_Transform(tls, bp+64, bp+32)
  13732. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13733. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13734. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx = int64(width)
  13735. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy = int64(height)
  13736. libfreetype.XFT_Vector_Transform(tls, bp+64, bp+32)
  13737. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13738. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13739. left = right - left - libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13740. bottom = top - bottom - libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13741. *(*float64)(unsafe.Pointer(m)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fxx) / libc.Float64FromInt32(0x10000)
  13742. *(*float64)(unsafe.Pointer(m + 1*8)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fxy) / libc.Float64FromInt32(0x10000)
  13743. *(*float64)(unsafe.Pointer(m + 1*24)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fyx) / libc.Float64FromInt32(0x10000)
  13744. *(*float64)(unsafe.Pointer(m + 1*24 + 1*8)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fyy) / libc.Float64FromInt32(0x10000)
  13745. *(*float64)(unsafe.Pointer(m + 2*8)) = float64(-left) / libc.Float64FromInt32(2)
  13746. *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) = float64(-bottom) / libc.Float64FromInt32(2)
  13747. v10 = libc.Float64FromFloat64(0)
  13748. *(*float64)(unsafe.Pointer(m + 2*24 + 1*8)) = v10
  13749. *(*float64)(unsafe.Pointer(m + 2*24)) = v10
  13750. *(*float64)(unsafe.Pointer(m + 2*24 + 2*8)) = float64(1)
  13751. }
  13752. pitch = (width + int32(3)) & ^libc.Int32FromInt32(3)
  13753. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13754. case int32(_FT_PIXEL_MODE_MONO):
  13755. if mode == int32(_FT_RENDER_MODE_MONO) {
  13756. pitch = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  13757. break
  13758. }
  13759. /* fall-through */
  13760. fallthrough
  13761. case int32(_FT_PIXEL_MODE_GRAY):
  13762. if mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V) {
  13763. /* each pixel is replicated into a 32-bit ARGB value */
  13764. pitch = width * int32(4)
  13765. }
  13766. case int32(_FT_PIXEL_MODE_BGRA):
  13767. pitch = width * int32(4)
  13768. case int32(_FT_PIXEL_MODE_LCD):
  13769. if mode != int32(_FT_RENDER_MODE_LCD) {
  13770. return -int32(1)
  13771. }
  13772. /* horz pixel triplets are packed into 32-bit ARGB values */
  13773. width /= int32(3)
  13774. pitch = width * int32(4)
  13775. case int32(_FT_PIXEL_MODE_LCD_V):
  13776. if mode != int32(_FT_RENDER_MODE_LCD_V) {
  13777. return -int32(1)
  13778. }
  13779. /* vert pixel triplets are packed into 32-bit ARGB values */
  13780. height /= int32(3)
  13781. pitch = width * int32(4)
  13782. default: /* unsupported source format */
  13783. return -int32(1)
  13784. }
  13785. (*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth = libc.Uint32FromInt32(width)
  13786. (*TFT_Bitmap)(unsafe.Pointer(target)).Frows = libc.Uint32FromInt32(height)
  13787. (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch = pitch
  13788. (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer = libc.UintptrFromInt32(0)
  13789. return pitch * height
  13790. }
  13791. // C documentation
  13792. //
  13793. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13794. // * into a different format while scaling by applying the given matrix
  13795. // * (see _compute_xrender_bitmap_size)
  13796. // *
  13797. // * you should call this function after _compute_xrender_bitmap_size
  13798. // *
  13799. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13800. // * must point to memory allocated by the caller
  13801. // *
  13802. // * source :: the source bitmap descriptor
  13803. // *
  13804. // * matrix :: the scaling matrix to apply
  13805. // */
  13806. func __scaled_fill_xrender_bitmap(tls *libc.TLS, target uintptr, source uintptr, m uintptr) {
  13807. bp := tls.Alloc(48)
  13808. defer tls.Free(48)
  13809. var dst_line, src, src_buf uintptr
  13810. var height, i, pitch, sample_count, sample_x, sample_y, sampling_height, sampling_width, src_pitch, src_x, src_y, width, x, y int32
  13811. var _ /* bgra at bp+32 */ [4]int32
  13812. var _ /* vector at bp+0 */ TFT_Vector
  13813. var _ /* vector0 at bp+16 */ TFT_Vector
  13814. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13815. src_buf = (*TFT_Bitmap)(unsafe.Pointer(source)).Fbuffer
  13816. dst_line = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13817. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(source)).Fpitch
  13818. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13819. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13820. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13821. if src_pitch < 0 {
  13822. src_buf -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(source)).Frows - libc.Uint32FromInt32(1)))
  13823. }
  13824. /* compute how many source pixels a target pixel spans */
  13825. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx = int64(1)
  13826. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy = int64(1)
  13827. _m3x3_transform(tls, bp, m)
  13828. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  13829. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = 0
  13830. _m3x3_transform(tls, bp+16, m)
  13831. sampling_width = int32(((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx - (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx) / libc.Int64FromInt32(2))
  13832. sampling_height = int32(((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy - (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy) / libc.Int64FromInt32(2))
  13833. if sampling_width < 0 {
  13834. sampling_width = -sampling_width
  13835. }
  13836. if sampling_height < 0 {
  13837. sampling_height = -sampling_height
  13838. }
  13839. sample_count = (int32(2)*sampling_width + int32(1)) * (int32(2)*sampling_height + int32(1))
  13840. y = height
  13841. for {
  13842. if !(y > 0) {
  13843. break
  13844. }
  13845. x = 0
  13846. for {
  13847. if !(x < width) {
  13848. break
  13849. }
  13850. /* compute target pixel location in source space */
  13851. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx = int64(x)
  13852. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy = int64(height - y)
  13853. _m3x3_transform(tls, bp, m)
  13854. if libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(source)).Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) {
  13855. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx < int64(-sampling_width) || (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx > libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth+libc.Uint32FromInt32(sampling_width)) {
  13856. goto _2
  13857. }
  13858. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy < int64(-sampling_height) || (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy > libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Frows+libc.Uint32FromInt32(sampling_height)) {
  13859. goto _2
  13860. }
  13861. } else {
  13862. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx < 0 || (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth) {
  13863. goto _2
  13864. }
  13865. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy < 0 || (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Frows) {
  13866. goto _2
  13867. }
  13868. }
  13869. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(source)).Fpixel_mode) {
  13870. case int32(_FT_PIXEL_MODE_MONO): /* convert mono to 8-bit gray, scale using nearest pixel */
  13871. src = src_buf + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy*int64(src_pitch))
  13872. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx>>libc.Int32FromInt32(3)))))&(int32(0x80)>>((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx&int64(7))) != 0 {
  13873. *(*uint8)(unsafe.Pointer(dst_line + uintptr(x))) = uint8(0xff)
  13874. }
  13875. case int32(_FT_PIXEL_MODE_GRAY): /* scale using nearest pixel */
  13876. src = src_buf + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy*int64(src_pitch))
  13877. *(*uint8)(unsafe.Pointer(dst_line + uintptr(x))) = *(*uint8)(unsafe.Pointer(src + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx)))
  13878. case int32(_FT_PIXEL_MODE_BGRA): /* scale by averaging all relevant source pixels, keep BGRA format */
  13879. *(*[4]int32)(unsafe.Pointer(bp + 32)) = [4]int32{}
  13880. sample_y = -sampling_height
  13881. for {
  13882. if !(sample_y < sampling_height+int32(1)) {
  13883. break
  13884. }
  13885. src_y = int32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy + int64(sample_y))
  13886. if src_y < 0 || int64(src_y) >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Frows) {
  13887. goto _3
  13888. }
  13889. src = src_buf + uintptr(src_y*src_pitch)
  13890. sample_x = -sampling_width
  13891. for {
  13892. if !(sample_x < sampling_width+int32(1)) {
  13893. break
  13894. }
  13895. src_x = int32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx + int64(sample_x))
  13896. if src_x < 0 || int64(src_x) >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth) {
  13897. goto _4
  13898. }
  13899. i = 0
  13900. for {
  13901. if !(i < int32(4)) {
  13902. break
  13903. }
  13904. *(*int32)(unsafe.Pointer(bp + 32 + uintptr(i)*4)) += libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr(src_x*int32(4)+i))))
  13905. goto _5
  13906. _5:
  13907. ;
  13908. i++
  13909. }
  13910. goto _4
  13911. _4:
  13912. ;
  13913. sample_x++
  13914. }
  13915. goto _3
  13916. _3:
  13917. ;
  13918. sample_y++
  13919. }
  13920. i = 0
  13921. for {
  13922. if !(i < int32(4)) {
  13923. break
  13924. }
  13925. *(*uint8)(unsafe.Pointer(dst_line + uintptr(int32(4)*x+i))) = libc.Uint8FromInt32((*(*[4]int32)(unsafe.Pointer(bp + 32)))[i] / sample_count)
  13926. goto _6
  13927. _6:
  13928. ;
  13929. i++
  13930. }
  13931. break
  13932. }
  13933. goto _2
  13934. _2:
  13935. ;
  13936. x++
  13937. }
  13938. goto _1
  13939. _1:
  13940. ;
  13941. y--
  13942. dst_line += uintptr(pitch)
  13943. }
  13944. }
  13945. // C documentation
  13946. //
  13947. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13948. // * into a different format (see _compute_xrender_bitmap_size)
  13949. // *
  13950. // * you should call this function after _compute_xrender_bitmap_size
  13951. // *
  13952. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13953. // * must point to memory allocated by the caller
  13954. // *
  13955. // * slot :: the glyph slot containing the source bitmap
  13956. // *
  13957. // * mode :: the requested final rendering mode
  13958. // *
  13959. // * bgr :: boolean, set if BGR or VBGR pixel ordering is needed
  13960. // */
  13961. func __fill_xrender_bitmap(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, bgr int32) {
  13962. var bytes, h, height, pitch, src_pitch, subpixel, width, x, x1, x2, x3, x4, x5, x6 int32
  13963. var dst, dst1, dst2, dst3, dst4, dstLine, ftbit, src, src1, src2, src3, srcLine uintptr
  13964. var pix, pix1, pix2, pix3, pix4 uint32
  13965. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13966. ftbit = slot + 152
  13967. srcLine = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  13968. dstLine = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13969. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch
  13970. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13971. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13972. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13973. subpixel = libc.BoolInt32(mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V))
  13974. if src_pitch < 0 {
  13975. srcLine -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows - libc.Uint32FromInt32(1)))
  13976. }
  13977. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13978. case int32(_FT_PIXEL_MODE_MONO):
  13979. goto _1
  13980. case int32(_FT_PIXEL_MODE_GRAY):
  13981. goto _2
  13982. case int32(_FT_PIXEL_MODE_BGRA):
  13983. goto _3
  13984. case int32(_FT_PIXEL_MODE_LCD):
  13985. goto _4
  13986. default:
  13987. goto _5
  13988. }
  13989. goto _6
  13990. _1:
  13991. ;
  13992. if subpixel != 0 { /* convert mono to ARGB32 values */
  13993. h = height
  13994. for {
  13995. if !(h > 0) {
  13996. break
  13997. }
  13998. x = 0
  13999. for {
  14000. if !(x < width) {
  14001. break
  14002. }
  14003. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x&int32(7))) != 0 {
  14004. *(*uint32)(unsafe.Pointer(dstLine + uintptr(x)*4)) = uint32(0xffffffff)
  14005. }
  14006. goto _8
  14007. _8:
  14008. ;
  14009. x++
  14010. }
  14011. goto _7
  14012. _7:
  14013. ;
  14014. h--
  14015. srcLine += uintptr(src_pitch)
  14016. dstLine += uintptr(pitch)
  14017. }
  14018. } else {
  14019. if mode == int32(_FT_RENDER_MODE_NORMAL) { /* convert mono to 8-bit gray */
  14020. h = height
  14021. for {
  14022. if !(h > 0) {
  14023. break
  14024. }
  14025. x1 = 0
  14026. for {
  14027. if !(x1 < width) {
  14028. break
  14029. }
  14030. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x1>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x1&int32(7))) != 0 {
  14031. *(*uint8)(unsafe.Pointer(dstLine + uintptr(x1))) = uint8(0xff)
  14032. }
  14033. goto _10
  14034. _10:
  14035. ;
  14036. x1++
  14037. }
  14038. goto _9
  14039. _9:
  14040. ;
  14041. h--
  14042. srcLine += uintptr(src_pitch)
  14043. dstLine += uintptr(pitch)
  14044. }
  14045. } else { /* copy mono to mono */
  14046. bytes = (width + int32(7)) >> int32(3)
  14047. h = height
  14048. for {
  14049. if !(h > 0) {
  14050. break
  14051. }
  14052. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(bytes))
  14053. goto _11
  14054. _11:
  14055. ;
  14056. h--
  14057. srcLine += uintptr(src_pitch)
  14058. dstLine += uintptr(pitch)
  14059. }
  14060. }
  14061. }
  14062. goto _6
  14063. _2:
  14064. ;
  14065. if subpixel != 0 { /* convert gray to ARGB32 values */
  14066. h = height
  14067. for {
  14068. if !(h > 0) {
  14069. break
  14070. }
  14071. dst = dstLine
  14072. x2 = 0
  14073. for {
  14074. if !(x2 < width) {
  14075. break
  14076. }
  14077. pix = uint32(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x2))))
  14078. pix |= pix << int32(8)
  14079. pix |= pix << int32(16)
  14080. *(*uint32)(unsafe.Pointer(dst + uintptr(x2)*4)) = pix
  14081. goto _13
  14082. _13:
  14083. ;
  14084. x2++
  14085. }
  14086. goto _12
  14087. _12:
  14088. ;
  14089. h--
  14090. srcLine += uintptr(src_pitch)
  14091. dstLine += uintptr(pitch)
  14092. }
  14093. } else { /* copy gray into gray */
  14094. h = height
  14095. for {
  14096. if !(h > 0) {
  14097. break
  14098. }
  14099. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(width))
  14100. goto _14
  14101. _14:
  14102. ;
  14103. h--
  14104. srcLine += uintptr(src_pitch)
  14105. dstLine += uintptr(pitch)
  14106. }
  14107. }
  14108. goto _6
  14109. _3:
  14110. ; /* Preserve BGRA format */
  14111. h = height
  14112. _17:
  14113. ;
  14114. if !(h > 0) {
  14115. goto _15
  14116. }
  14117. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(width)*uint64(4))
  14118. goto _16
  14119. _16:
  14120. ;
  14121. h--
  14122. srcLine += uintptr(src_pitch)
  14123. dstLine += uintptr(pitch)
  14124. goto _17
  14125. goto _15
  14126. _15:
  14127. ;
  14128. goto _6
  14129. _4:
  14130. ;
  14131. if !(bgr != 0) {
  14132. /* convert horizontal RGB into ARGB32 */
  14133. h = height
  14134. for {
  14135. if !(h > 0) {
  14136. break
  14137. }
  14138. src = srcLine
  14139. dst1 = dstLine
  14140. x3 = 0
  14141. for {
  14142. if !(x3 < width) {
  14143. break
  14144. }
  14145. 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)
  14146. *(*uint32)(unsafe.Pointer(dst1 + uintptr(x3)*4)) = pix1
  14147. goto _19
  14148. _19:
  14149. ;
  14150. x3++
  14151. src += uintptr(3)
  14152. }
  14153. goto _18
  14154. _18:
  14155. ;
  14156. h--
  14157. srcLine += uintptr(src_pitch)
  14158. dstLine += uintptr(pitch)
  14159. }
  14160. } else {
  14161. /* convert horizontal BGR into ARGB32 */
  14162. h = height
  14163. for {
  14164. if !(h > 0) {
  14165. break
  14166. }
  14167. src1 = srcLine
  14168. dst2 = dstLine
  14169. x4 = 0
  14170. for {
  14171. if !(x4 < width) {
  14172. break
  14173. }
  14174. 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)
  14175. *(*uint32)(unsafe.Pointer(dst2 + uintptr(x4)*4)) = pix2
  14176. goto _21
  14177. _21:
  14178. ;
  14179. x4++
  14180. src1 += uintptr(3)
  14181. }
  14182. goto _20
  14183. _20:
  14184. ;
  14185. h--
  14186. srcLine += uintptr(src_pitch)
  14187. dstLine += uintptr(pitch)
  14188. }
  14189. }
  14190. goto _6
  14191. _5:
  14192. ; /* FT_PIXEL_MODE_LCD_V */
  14193. /* convert vertical RGB into ARGB32 */
  14194. if !(bgr != 0) {
  14195. h = height
  14196. for {
  14197. if !(h > 0) {
  14198. break
  14199. }
  14200. src2 = srcLine
  14201. dst3 = dstLine
  14202. x5 = 0
  14203. for {
  14204. if !(x5 < width) {
  14205. break
  14206. }
  14207. 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)
  14208. *(*uint32)(unsafe.Pointer(dst3 + uintptr(x5)*4)) = pix3
  14209. goto _23
  14210. _23:
  14211. ;
  14212. x5++
  14213. src2 += uintptr(1)
  14214. }
  14215. goto _22
  14216. _22:
  14217. ;
  14218. h--
  14219. srcLine += uintptr(int32(3) * src_pitch)
  14220. dstLine += uintptr(pitch)
  14221. }
  14222. } else {
  14223. h = height
  14224. for {
  14225. if !(h > 0) {
  14226. break
  14227. }
  14228. src3 = srcLine
  14229. dst4 = dstLine
  14230. x6 = 0
  14231. for {
  14232. if !(x6 < width) {
  14233. break
  14234. }
  14235. 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)
  14236. *(*uint32)(unsafe.Pointer(dst4 + uintptr(x6)*4)) = pix4
  14237. goto _25
  14238. _25:
  14239. ;
  14240. x6++
  14241. src3 += uintptr(1)
  14242. }
  14243. goto _24
  14244. _24:
  14245. ;
  14246. h--
  14247. srcLine += uintptr(int32(3) * src_pitch)
  14248. dstLine += uintptr(pitch)
  14249. }
  14250. }
  14251. _6:
  14252. }
  14253. func XXftFontLoadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyphs uintptr, nglyph int32) {
  14254. bp := tls.Alloc(4544)
  14255. defer tls.Free(4544)
  14256. 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
  14257. var bufBitmap, font, ftbit, info, line, line1, xftg, xnew, xold, xuse, v14, v16, v2 uintptr
  14258. var error1 TFT_Error
  14259. var face TFT_Face
  14260. var gc TGC
  14261. var glyph_transform, transform TFcBool
  14262. var glyphindex TFT_UInt
  14263. var glyphslot TFT_GlyphSlot
  14264. var mode TFT_Render_Mode
  14265. var pixmap TPixmap
  14266. var _ /* bufLocal at bp+8 */ [4096]uint8
  14267. var _ /* glyph at bp+0 */ TGlyph
  14268. var _ /* image at bp+4304 */ TXImage
  14269. var _ /* local at bp+4104 */ TFT_Bitmap
  14270. var _ /* m at bp+4160 */ Tm3x3
  14271. var _ /* mi at bp+4232 */ Tm3x3
  14272. var _ /* vector at bp+4144 */ TFT_Vector
  14273. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  14274. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  14275. font = pub
  14276. bufBitmap = bp + 8
  14277. bufSize = int32(4096)
  14278. mode = int32(_FT_RENDER_MODE_MONO)
  14279. if !(info != 0) {
  14280. return
  14281. }
  14282. face = XXftLockFace(tls, font)
  14283. if !(face != 0) {
  14284. return
  14285. }
  14286. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor != 0 {
  14287. mode = int32(_FT_RENDER_MODE_NORMAL)
  14288. }
  14289. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  14290. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  14291. case int32(m_FC_RGBA_RGB):
  14292. fallthrough
  14293. case int32(m_FC_RGBA_BGR):
  14294. mode = int32(_FT_RENDER_MODE_LCD)
  14295. case int32(m_FC_RGBA_VRGB):
  14296. fallthrough
  14297. case int32(m_FC_RGBA_VBGR):
  14298. mode = int32(_FT_RENDER_MODE_LCD_V)
  14299. default:
  14300. mode = int32(_FT_RENDER_MODE_NORMAL)
  14301. }
  14302. }
  14303. transform = libc.BoolInt32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0 && mode != int32(_FT_RENDER_MODE_MONO))
  14304. for {
  14305. v1 = nglyph
  14306. nglyph--
  14307. if !(v1 != 0) {
  14308. break
  14309. }
  14310. v2 = glyphs
  14311. glyphs += 4
  14312. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  14313. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  14314. if !(xftg != 0) {
  14315. continue
  14316. }
  14317. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14318. __XftFontValidateMemory(tls, dpy, pub)
  14319. }
  14320. /*
  14321. * Check to see if this glyph has just been loaded,
  14322. * this happens when drawing the same glyph twice
  14323. * in a single string
  14324. */
  14325. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  14326. continue
  14327. }
  14328. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Flcd_filter)
  14329. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)
  14330. if error1 != 0 {
  14331. /*
  14332. * If anti-aliasing or transforming glyphs and
  14333. * no outline version exists, fallback to the
  14334. * bitmap and let things look bad instead of
  14335. * missing the glyph
  14336. */
  14337. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3)) != 0 {
  14338. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, int32(int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags) & ^(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))))
  14339. }
  14340. if error1 != 0 {
  14341. continue
  14342. }
  14343. }
  14344. glyphslot = (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph
  14345. /*
  14346. * Embolden if required
  14347. */
  14348. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fembolden != 0 {
  14349. libfreetype.XFT_GlyphSlot_Embolden(tls, glyphslot)
  14350. }
  14351. /*
  14352. * Compute glyph metrics from FreeType information
  14353. */
  14354. if transform != 0 {
  14355. v5 = libc.Int32FromInt32(0)
  14356. bottom = v5
  14357. v4 = v5
  14358. top = v4
  14359. v3 = v4
  14360. right = v3
  14361. left = v3
  14362. xc = 0
  14363. for {
  14364. if !(xc <= int32(1)) {
  14365. break
  14366. }
  14367. yc = 0
  14368. for {
  14369. if !(yc <= int32(1)) {
  14370. break
  14371. }
  14372. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + int64(xc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth
  14373. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - int64(yc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight
  14374. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+56)
  14375. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  14376. libc.Xprintf(tls, __ccgo_ts+1666, libc.VaList(bp+4448, xc, yc, int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx), int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)))
  14377. }
  14378. if xc == 0 && yc == 0 {
  14379. v8 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14380. right = v8
  14381. left = v8
  14382. v9 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14383. bottom = v9
  14384. top = v9
  14385. } else {
  14386. if int64(left) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  14387. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14388. }
  14389. if int64(right) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  14390. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14391. }
  14392. if int64(bottom) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  14393. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14394. }
  14395. if int64(top) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  14396. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14397. }
  14398. }
  14399. goto _7
  14400. _7:
  14401. ;
  14402. yc++
  14403. }
  14404. goto _6
  14405. _6:
  14406. ;
  14407. xc++
  14408. }
  14409. left = left & -libc.Int32FromInt32(64)
  14410. right = (right + libc.Int32FromInt32(63)) & -libc.Int32FromInt32(64)
  14411. bottom = bottom & -libc.Int32FromInt32(64)
  14412. top = (top + libc.Int32FromInt32(63)) & -libc.Int32FromInt32(64)
  14413. } else {
  14414. left = int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX & int64(-libc.Int32FromInt32(64)))
  14415. right = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  14416. top = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  14417. bottom = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight) & int64(-libc.Int32FromInt32(64)))
  14418. }
  14419. /*
  14420. * Clip charcell glyphs to the bounding box
  14421. * XXX transformed?
  14422. */
  14423. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_CHARCELL) && !(transform != 0) {
  14424. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  14425. if bottom>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  14426. adjust = bottom - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  14427. if adjust > top {
  14428. adjust = top
  14429. }
  14430. top -= adjust
  14431. bottom -= adjust
  14432. }
  14433. } else {
  14434. if right>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  14435. adjust1 = right - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  14436. if adjust1 > left {
  14437. adjust1 = left
  14438. }
  14439. left -= adjust1
  14440. right -= adjust1
  14441. }
  14442. }
  14443. }
  14444. glyph_transform = transform
  14445. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  14446. error1 = libfreetype.XFT_Render_Glyph(tls, (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph, mode)
  14447. if error1 != 0 {
  14448. continue
  14449. }
  14450. glyph_transform = m_False
  14451. }
  14452. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, int32(_FT_LCD_FILTER_NONE))
  14453. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_MONO) {
  14454. if transform != 0 {
  14455. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  14456. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = 0
  14457. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = -(*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  14458. } else {
  14459. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  14460. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = 0
  14461. }
  14462. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+56)
  14463. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14464. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14465. } else {
  14466. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  14467. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = 0
  14468. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  14469. } else {
  14470. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16((*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  14471. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = 0
  14472. }
  14473. }
  14474. } else {
  14475. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fx + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14476. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fy + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6)))
  14477. }
  14478. /* compute the size of the final bitmap */
  14479. ftbit = glyphslot + 152
  14480. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  14481. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  14482. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  14483. libc.Xprintf(tls, __ccgo_ts+1686, libc.VaList(bp+4448, libc.Int32FromUint32(glyphindex)))
  14484. libc.Xprintf(tls, __ccgo_ts+1697, libc.VaList(bp+4448, int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX), int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY), int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth), int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight), left, right, top, bottom, width, height))
  14485. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPHV) != 0 {
  14486. line = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  14487. if (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch < 0 {
  14488. line -= uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch * (height - int32(1)))
  14489. }
  14490. y = 0
  14491. for {
  14492. if !(y < height) {
  14493. break
  14494. }
  14495. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  14496. x = 0
  14497. for {
  14498. if !(x < width) {
  14499. break
  14500. }
  14501. libc.Xprintf(tls, __ccgo_ts+1750, libc.VaList(bp+4448, libc.Int32FromUint8(_den[libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x))))>>int32(5)])))
  14502. goto _11
  14503. _11:
  14504. ;
  14505. x++
  14506. }
  14507. } else {
  14508. x = 0
  14509. for {
  14510. if !(x < width*int32(8)) {
  14511. break
  14512. }
  14513. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x>>int32(3)))))&(int32(1)<<(x&int32(7))) != 0 {
  14514. v13 = int32('#')
  14515. } else {
  14516. v13 = int32(' ')
  14517. }
  14518. libc.Xprintf(tls, __ccgo_ts+1750, libc.VaList(bp+4448, v13))
  14519. goto _12
  14520. _12:
  14521. ;
  14522. x++
  14523. }
  14524. }
  14525. libc.Xprintf(tls, __ccgo_ts+1753, 0)
  14526. line += uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch)
  14527. goto _10
  14528. _10:
  14529. ;
  14530. y++
  14531. }
  14532. libc.Xprintf(tls, __ccgo_ts+1756, 0)
  14533. }
  14534. }
  14535. _m3x3_uniform(tls, bp+4160)
  14536. if glyph_transform != 0 {
  14537. v14 = font + 48 + 56
  14538. } else {
  14539. v14 = libc.UintptrFromInt32(0)
  14540. }
  14541. size = __compute_xrender_bitmap_size(tls, bp+4104, glyphslot, mode, v14, bp+4160)
  14542. if size < 0 {
  14543. continue
  14544. }
  14545. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth)
  14546. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows)
  14547. if glyph_transform != 0 {
  14548. _m3x3_invert(tls, bp+4160, bp+4232)
  14549. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = int64(-(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left)
  14550. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = int64((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top)
  14551. _m3x3_transform(tls, bp+4144, bp+4232)
  14552. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14553. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14554. } else {
  14555. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16(-(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left)
  14556. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top)
  14557. }
  14558. /*
  14559. * If the glyph is relatively large (> 1% of server memory),
  14560. * don't send it until necessary.
  14561. */
  14562. if !(need_bitmaps != 0) && libc.Uint64FromInt32(size) > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory/uint64(100) {
  14563. continue
  14564. }
  14565. /*
  14566. * Make sure there is enough buffer space for the glyph.
  14567. */
  14568. if size > bufSize {
  14569. if bufBitmap != bp+8 {
  14570. libc.Xfree(tls, bufBitmap)
  14571. }
  14572. bufBitmap = libc.Xmalloc(tls, libc.Uint64FromInt32(size))
  14573. if !(bufBitmap != 0) {
  14574. continue
  14575. }
  14576. bufSize = size
  14577. }
  14578. libc.Xmemset(tls, bufBitmap, 0, libc.Uint64FromInt32(size))
  14579. (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fbuffer = bufBitmap
  14580. if mode == int32(_FT_RENDER_MODE_NORMAL) && glyph_transform != 0 {
  14581. __scaled_fill_xrender_bitmap(tls, bp+4104, glyphslot+152, bp+4160)
  14582. } else {
  14583. __fill_xrender_bitmap(tls, bp+4104, glyphslot, mode, libc.BoolInt32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba == int32(m_FC_RGBA_BGR) || (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba == int32(m_FC_RGBA_VBGR)))
  14584. }
  14585. /*
  14586. * Copy or convert into local buffer.
  14587. */
  14588. /*
  14589. * Use the glyph index as the wire encoding; it
  14590. * might be more efficient for some locales to map
  14591. * these by first usage to smaller values, but that
  14592. * would require persistently storing the map when
  14593. * glyphs were freed.
  14594. */
  14595. *(*TGlyph)(unsafe.Pointer(bp)) = uint64(glyphindex)
  14596. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture != 0 {
  14597. libxrender.XXRenderFreePicture(tls, dpy, (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture)
  14598. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = uint64(0)
  14599. }
  14600. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = libc.Uint64FromInt32(size) + uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph)
  14601. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  14602. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14603. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = libxrender.XXRenderCreateGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fformat)
  14604. }
  14605. if mode == int32(_FT_RENDER_MODE_MONO) {
  14606. /* swap bits in each byte */
  14607. if (*struct {
  14608. Fext_data uintptr
  14609. Fprivate1 uintptr
  14610. Ffd int32
  14611. Fprivate2 int32
  14612. Fproto_major_version int32
  14613. Fproto_minor_version int32
  14614. Fvendor uintptr
  14615. Fprivate3 TXID
  14616. Fprivate4 TXID
  14617. Fprivate5 TXID
  14618. Fprivate6 int32
  14619. Fresource_alloc uintptr
  14620. Fbyte_order int32
  14621. Fbitmap_unit int32
  14622. Fbitmap_pad int32
  14623. Fbitmap_bit_order int32
  14624. Fnformats int32
  14625. Fpixmap_format uintptr
  14626. Fprivate8 int32
  14627. Frelease int32
  14628. Fprivate9 uintptr
  14629. Fprivate10 uintptr
  14630. Fqlen int32
  14631. Flast_request_read uint64
  14632. Frequest uint64
  14633. Fprivate11 TXPointer
  14634. Fprivate12 TXPointer
  14635. Fprivate13 TXPointer
  14636. Fprivate14 TXPointer
  14637. Fmax_request_size uint32
  14638. Fdb uintptr
  14639. Fprivate15 uintptr
  14640. Fdisplay_name uintptr
  14641. Fdefault_screen int32
  14642. Fnscreens int32
  14643. Fscreens uintptr
  14644. Fmotion_buffer uint64
  14645. Fprivate16 uint64
  14646. Fmin_keycode int32
  14647. Fmax_keycode int32
  14648. Fprivate17 TXPointer
  14649. Fprivate18 TXPointer
  14650. Fprivate19 int32
  14651. Fxdefaults uintptr
  14652. })(unsafe.Pointer(dpy)).Fbitmap_bit_order != int32(m_MSBFirst) {
  14653. line1 = bufBitmap
  14654. i = size
  14655. for {
  14656. v15 = i
  14657. i--
  14658. if !(v15 != 0) {
  14659. break
  14660. }
  14661. c = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line1)))
  14662. c = c<<int32(1)&int32(0xaa) | c>>int32(1)&int32(0x55)
  14663. c = c<<int32(2)&int32(0xcc) | c>>int32(2)&int32(0x33)
  14664. c = c<<int32(4)&int32(0xf0) | c>>int32(4)&int32(0x0f)
  14665. v16 = line1
  14666. line1++
  14667. *(*uint8)(unsafe.Pointer(v16)) = libc.Uint8FromInt32(c)
  14668. }
  14669. }
  14670. } else {
  14671. if libc.Int32FromUint8((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap.Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) || mode != int32(_FT_RENDER_MODE_NORMAL) {
  14672. /* invert ARGB <=> BGRA */
  14673. if (*struct {
  14674. Fext_data uintptr
  14675. Fprivate1 uintptr
  14676. Ffd int32
  14677. Fprivate2 int32
  14678. Fproto_major_version int32
  14679. Fproto_minor_version int32
  14680. Fvendor uintptr
  14681. Fprivate3 TXID
  14682. Fprivate4 TXID
  14683. Fprivate5 TXID
  14684. Fprivate6 int32
  14685. Fresource_alloc uintptr
  14686. Fbyte_order int32
  14687. Fbitmap_unit int32
  14688. Fbitmap_pad int32
  14689. Fbitmap_bit_order int32
  14690. Fnformats int32
  14691. Fpixmap_format uintptr
  14692. Fprivate8 int32
  14693. Frelease int32
  14694. Fprivate9 uintptr
  14695. Fprivate10 uintptr
  14696. Fqlen int32
  14697. Flast_request_read uint64
  14698. Frequest uint64
  14699. Fprivate11 TXPointer
  14700. Fprivate12 TXPointer
  14701. Fprivate13 TXPointer
  14702. Fprivate14 TXPointer
  14703. Fmax_request_size uint32
  14704. Fdb uintptr
  14705. Fprivate15 uintptr
  14706. Fdisplay_name uintptr
  14707. Fdefault_screen int32
  14708. Fnscreens int32
  14709. Fscreens uintptr
  14710. Fmotion_buffer uint64
  14711. Fprivate16 uint64
  14712. Fmin_keycode int32
  14713. Fmax_keycode int32
  14714. Fprivate17 TXPointer
  14715. Fprivate18 TXPointer
  14716. Fprivate19 int32
  14717. Fxdefaults uintptr
  14718. })(unsafe.Pointer(dpy)).Fbyte_order != XXftNativeByteOrder(tls) {
  14719. XXftSwapCARD32(tls, bufBitmap, size>>int32(2))
  14720. }
  14721. }
  14722. }
  14723. if libc.Int32FromUint8((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap.Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) {
  14724. pixmap = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  14725. Fext_data uintptr
  14726. Fprivate1 uintptr
  14727. Ffd int32
  14728. Fprivate2 int32
  14729. Fproto_major_version int32
  14730. Fproto_minor_version int32
  14731. Fvendor uintptr
  14732. Fprivate3 TXID
  14733. Fprivate4 TXID
  14734. Fprivate5 TXID
  14735. Fprivate6 int32
  14736. Fresource_alloc uintptr
  14737. Fbyte_order int32
  14738. Fbitmap_unit int32
  14739. Fbitmap_pad int32
  14740. Fbitmap_bit_order int32
  14741. Fnformats int32
  14742. Fpixmap_format uintptr
  14743. Fprivate8 int32
  14744. Frelease int32
  14745. Fprivate9 uintptr
  14746. Fprivate10 uintptr
  14747. Fqlen int32
  14748. Flast_request_read uint64
  14749. Frequest uint64
  14750. Fprivate11 TXPointer
  14751. Fprivate12 TXPointer
  14752. Fprivate13 TXPointer
  14753. Fprivate14 TXPointer
  14754. Fmax_request_size uint32
  14755. Fdb uintptr
  14756. Fprivate15 uintptr
  14757. Fdisplay_name uintptr
  14758. Fdefault_screen int32
  14759. Fnscreens int32
  14760. Fscreens uintptr
  14761. Fmotion_buffer uint64
  14762. Fprivate16 uint64
  14763. Fmin_keycode int32
  14764. Fmax_keycode int32
  14765. Fprivate17 TXPointer
  14766. Fprivate18 TXPointer
  14767. Fprivate19 int32
  14768. Fxdefaults uintptr
  14769. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  14770. Fext_data uintptr
  14771. Fprivate1 uintptr
  14772. Ffd int32
  14773. Fprivate2 int32
  14774. Fproto_major_version int32
  14775. Fproto_minor_version int32
  14776. Fvendor uintptr
  14777. Fprivate3 TXID
  14778. Fprivate4 TXID
  14779. Fprivate5 TXID
  14780. Fprivate6 int32
  14781. Fresource_alloc uintptr
  14782. Fbyte_order int32
  14783. Fbitmap_unit int32
  14784. Fbitmap_pad int32
  14785. Fbitmap_bit_order int32
  14786. Fnformats int32
  14787. Fpixmap_format uintptr
  14788. Fprivate8 int32
  14789. Frelease int32
  14790. Fprivate9 uintptr
  14791. Fprivate10 uintptr
  14792. Fqlen int32
  14793. Flast_request_read uint64
  14794. Frequest uint64
  14795. Fprivate11 TXPointer
  14796. Fprivate12 TXPointer
  14797. Fprivate13 TXPointer
  14798. Fprivate14 TXPointer
  14799. Fmax_request_size uint32
  14800. Fdb uintptr
  14801. Fprivate15 uintptr
  14802. Fdisplay_name uintptr
  14803. Fdefault_screen int32
  14804. Fnscreens int32
  14805. Fscreens uintptr
  14806. Fmotion_buffer uint64
  14807. Fprivate16 uint64
  14808. Fmin_keycode int32
  14809. Fmax_keycode int32
  14810. Fprivate17 TXPointer
  14811. Fprivate18 TXPointer
  14812. Fprivate19 int32
  14813. Fxdefaults uintptr
  14814. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows, uint32(32))
  14815. gc = libx11.XXCreateGC(tls, dpy, pixmap, uint64(0), libc.UintptrFromInt32(0))
  14816. *(*TXImage)(unsafe.Pointer(bp + 4304)) = TXImage{
  14817. Fwidth: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth),
  14818. Fheight: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows),
  14819. Fformat: int32(m_ZPixmap),
  14820. Fdata: bufBitmap,
  14821. Fbyte_order: (*TDisplay)(unsafe.Pointer(dpy)).Fbyte_order,
  14822. Fbitmap_unit: (*TDisplay)(unsafe.Pointer(dpy)).Fbitmap_unit,
  14823. Fbitmap_bit_order: (*TDisplay)(unsafe.Pointer(dpy)).Fbitmap_bit_order,
  14824. Fbitmap_pad: int32(32),
  14825. Fdepth: int32(32),
  14826. Fbytes_per_line: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth*libc.Uint32FromInt32(4) - libc.Uint32FromInt32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fpitch)),
  14827. Fbits_per_pixel: int32(32),
  14828. }
  14829. libx11.XXInitImage(tls, bp+4304)
  14830. libx11.XXPutImage(tls, dpy, pixmap, gc, bp+4304, 0, 0, 0, 0, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows)
  14831. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = libxrender.XXRenderCreatePicture(tls, dpy, pixmap, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, uint64(0), libc.UintptrFromInt32(0))
  14832. libx11.XXFreeGC(tls, dpy, gc)
  14833. libx11.XXFreePixmap(tls, dpy, pixmap)
  14834. /*
  14835. * Record 256 times higher memory pressure for unrotated
  14836. * pictures, and maximum for rotated pictures.
  14837. */
  14838. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fmatrix.Fxy != 0 || (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fmatrix.Fyx != 0 {
  14839. *(*uint64)(unsafe.Pointer(xftg + 24)) += (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory - libc.Uint64FromInt32(size)
  14840. } else {
  14841. *(*uint64)(unsafe.Pointer(xftg + 24)) += libc.Uint64FromInt32(size) * uint64(255)
  14842. }
  14843. } else {
  14844. libxrender.XXRenderAddGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, xftg, int32(1), bufBitmap, size)
  14845. }
  14846. } else {
  14847. if size != 0 {
  14848. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.Xmalloc(tls, libc.Uint64FromInt32(size))
  14849. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  14850. libc.Xmemcpy(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap, bufBitmap, libc.Uint64FromInt32(size))
  14851. }
  14852. } else {
  14853. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  14854. }
  14855. }
  14856. *(*uint64)(unsafe.Pointer(font + 216)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14857. *(*uint64)(unsafe.Pointer(info + 56)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14858. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14859. __XftFontValidateMemory(tls, dpy, pub)
  14860. }
  14861. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14862. libc.Xprintf(tls, __ccgo_ts+1758, libc.VaList(bp+4448, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14863. }
  14864. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  14865. xuse = xftg
  14866. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == uint32(0xffffffff) {
  14867. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = glyphindex
  14868. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = glyphindex
  14869. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14870. libc.Xprintf(tls, __ccgo_ts+1787, libc.VaList(bp+4448, font, glyphindex, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer))
  14871. }
  14872. } else {
  14873. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  14874. xold = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer)*8))
  14875. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = (*TXftFontInt)(unsafe.Pointer(font)).Fnewest
  14876. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer
  14877. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer = glyphindex
  14878. (*TXftGlyphUsage)(unsafe.Pointer(xold)).Folder = glyphindex
  14879. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14880. libc.Xprintf(tls, __ccgo_ts+1817, libc.VaList(bp+4448, font, glyphindex, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer, xnew, (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer, xold, (*TXftGlyphUsage)(unsafe.Pointer(xold)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xold)).Fnewer))
  14881. }
  14882. }
  14883. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = glyphindex
  14884. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse++
  14885. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14886. __XftValidateGlyphUsage(tls, font)
  14887. }
  14888. }
  14889. }
  14890. if bufBitmap != bp+8 {
  14891. libc.Xfree(tls, bufBitmap)
  14892. }
  14893. XXftUnlockFace(tls, font)
  14894. }
  14895. var _den = [9]uint8{' ', '.', ':', ';', '=', '+', '*', '#'}
  14896. func XXftFontUnloadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyph int32) {
  14897. bp := tls.Alloc(8240)
  14898. defer tls.Free(8240)
  14899. var font, info, xftg, xtmp, xuse, v2 uintptr
  14900. var glyphindex TFT_UInt
  14901. var nused, v1, v3 int32
  14902. var _ /* glyphBuf at bp+0 */ [1024]TGlyph
  14903. _, _, _, _, _, _, _, _, _, _ = font, glyphindex, info, nused, xftg, xtmp, xuse, v1, v2, v3
  14904. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  14905. font = pub
  14906. nused = 0
  14907. for {
  14908. v1 = nglyph
  14909. nglyph--
  14910. if !(v1 != 0) {
  14911. break
  14912. }
  14913. v2 = glyphs
  14914. glyphs += 4
  14915. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  14916. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  14917. if !(xftg != 0) {
  14918. continue
  14919. }
  14920. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  14921. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14922. libc.Xprintf(tls, __ccgo_ts+1874, libc.VaList(bp+8200, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14923. }
  14924. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  14925. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture != 0 {
  14926. libxrender.XXRenderFreePicture(tls, dpy, (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture)
  14927. } else {
  14928. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  14929. v3 = nused
  14930. nused++
  14931. (*(*[1024]TGlyph)(unsafe.Pointer(bp)))[v3] = uint64(glyphindex)
  14932. if libc.Uint64FromInt32(nused) == libc.Uint64FromInt64(8192)/libc.Uint64FromInt64(8) {
  14933. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  14934. nused = 0
  14935. }
  14936. }
  14937. }
  14938. } else {
  14939. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  14940. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  14941. }
  14942. }
  14943. *(*uint64)(unsafe.Pointer(font + 216)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14944. if info != 0 {
  14945. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14946. }
  14947. }
  14948. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  14949. xuse = xftg
  14950. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14951. libc.Xprintf(tls, __ccgo_ts+1905, libc.VaList(bp+8200, font, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer))
  14952. }
  14953. if (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder != uint32(0xffffffff) {
  14954. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder)*8))
  14955. if xtmp != libc.UintptrFromInt32(0) {
  14956. /* update link around to oldest glyph */
  14957. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  14958. }
  14959. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == glyphindex {
  14960. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder {
  14961. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = uint32(0xffffffff)
  14962. } else {
  14963. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  14964. }
  14965. }
  14966. }
  14967. if (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer != uint32(0xffffffff) {
  14968. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer)*8))
  14969. if xtmp != libc.UintptrFromInt32(0) {
  14970. /* update link around to newest glyph */
  14971. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Folder = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  14972. }
  14973. }
  14974. if (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse != 0 {
  14975. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse--
  14976. } else {
  14977. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+1930, 0)
  14978. }
  14979. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14980. __XftValidateGlyphUsage(tls, font)
  14981. }
  14982. }
  14983. libc.Xfree(tls, xftg)
  14984. XXftMemFree(tls, int32(_XFT_MEM_GLYPH), uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph))
  14985. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8)) = libc.UintptrFromInt32(0)
  14986. }
  14987. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 && nused != 0 {
  14988. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  14989. }
  14990. }
  14991. func XXftFontCheckGlyph(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyph TFT_UInt, missing uintptr, nmissing uintptr) (r TFcBool) {
  14992. var font, xftg, xnew, xold, xtmp, xuse, xuse1 uintptr
  14993. var n, v1 int32
  14994. _, _, _, _, _, _, _, _, _ = font, n, xftg, xnew, xold, xtmp, xuse, xuse1, v1
  14995. font = pub
  14996. if glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  14997. return m_FcFalse
  14998. }
  14999. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  15000. if !(xftg != 0) || need_bitmaps != 0 && !((*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0) {
  15001. if !(xftg != 0) {
  15002. xftg = libc.Xmalloc(tls, uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph))
  15003. if !(xftg != 0) {
  15004. return m_FcFalse
  15005. }
  15006. XXftMemAlloc(tls, int32(_XFT_MEM_GLYPH), uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph))
  15007. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  15008. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = uint64(0)
  15009. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = uint64(0)
  15010. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8)) = xftg
  15011. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  15012. xuse = xftg
  15013. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = uint32(0xffffffff)
  15014. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = uint32(0xffffffff)
  15015. }
  15016. }
  15017. n = *(*int32)(unsafe.Pointer(nmissing))
  15018. v1 = n
  15019. n++
  15020. *(*TFT_UInt)(unsafe.Pointer(missing + uintptr(v1)*4)) = glyph
  15021. if n == int32(m_XFT_NMISSING) {
  15022. XXftFontLoadGlyphs(tls, dpy, pub, need_bitmaps, missing, n)
  15023. n = 0
  15024. }
  15025. *(*int32)(unsafe.Pointer(nmissing)) = n
  15026. return int32(m_FcTrue)
  15027. }
  15028. /*
  15029. * Make unloading faster by moving newly-referenced glyphs to the front
  15030. * of the list, leaving the less-used glyphs on the end.
  15031. */
  15032. 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 {
  15033. xuse1 = xftg
  15034. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  15035. /* delink */
  15036. xold = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder)*8))
  15037. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer)*8))
  15038. (*TXftGlyphUsage)(unsafe.Pointer(xold)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer
  15039. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder = (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder
  15040. /* relink */
  15041. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer)*8))
  15042. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder = glyph
  15043. (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder = (*TXftFontInt)(unsafe.Pointer(font)).Fnewest
  15044. (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer
  15045. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer = glyph
  15046. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = glyph
  15047. }
  15048. return m_FcFalse
  15049. }
  15050. func XXftCharExists(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFcBool) {
  15051. if (*TXftFont)(unsafe.Pointer(pub)).Fcharset != 0 {
  15052. return libfontconfig.XFcCharSetHasChar(tls, (*TXftFont)(unsafe.Pointer(pub)).Fcharset, ucs4)
  15053. }
  15054. return m_FcFalse
  15055. }
  15056. func XXftCharIndex(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFT_UInt) {
  15057. var ent, offset TFcChar32
  15058. var face TFT_Face
  15059. var font uintptr
  15060. _, _, _, _ = ent, face, font, offset
  15061. font = pub
  15062. if !((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value != 0) {
  15063. return uint32(0)
  15064. }
  15065. ent = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  15066. offset = uint32(0)
  15067. for (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 != ucs4 {
  15068. if (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 == libc.Uint32FromInt32(^libc.Int32FromInt32(0)) {
  15069. if !(XXftCharExists(tls, dpy, pub, ucs4) != 0) {
  15070. return uint32(0)
  15071. }
  15072. face = XXftLockFace(tls, pub)
  15073. if !(face != 0) {
  15074. return uint32(0)
  15075. }
  15076. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 = ucs4
  15077. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph = libfontconfig.XFcFreeTypeCharIndex(tls, face, ucs4)
  15078. XXftUnlockFace(tls, pub)
  15079. break
  15080. }
  15081. if !(offset != 0) {
  15082. offset = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Frehash_value)
  15083. if !(offset != 0) {
  15084. offset = uint32(1)
  15085. }
  15086. }
  15087. ent = ent + offset
  15088. if ent >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value) {
  15089. ent -= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  15090. }
  15091. }
  15092. return (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph
  15093. }
  15094. // C documentation
  15095. //
  15096. // /*
  15097. // * Remove glyph(s) from the font to reduce memory-usage.
  15098. // */
  15099. func X_XftFontUncacheGlyph(tls *libc.TLS, dpy uintptr, pub uintptr) {
  15100. bp := tls.Alloc(16)
  15101. defer tls.Free(16)
  15102. var font, xftg, xuse uintptr
  15103. var glyph_memory uint64
  15104. var v1 TFT_UInt
  15105. var _ /* glyphindex at bp+0 */ TFT_UInt
  15106. _, _, _, _, _ = font, glyph_memory, xftg, xuse, v1
  15107. font = pub
  15108. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory != 0) {
  15109. return
  15110. }
  15111. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15112. __XftFontValidateMemory(tls, dpy, pub)
  15113. }
  15114. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  15115. /*
  15116. * Remove the oldest glyph from the font.
  15117. */
  15118. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != uint32(0xffffffff) {
  15119. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  15120. v1 = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  15121. *(*TFT_UInt)(unsafe.Pointer(bp)) = v1
  15122. if v1 != uint32(0xffffffff) {
  15123. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15124. }
  15125. }
  15126. } else {
  15127. if (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs != 0 {
  15128. /*
  15129. * Pick a random glyph from the font and remove it from the cache
  15130. */
  15131. glyph_memory = libc.Uint64FromInt32(libc.Xrand(tls)) % (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  15132. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  15133. for {
  15134. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  15135. break
  15136. }
  15137. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*8))
  15138. if xftg != 0 {
  15139. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > glyph_memory {
  15140. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15141. break
  15142. }
  15143. glyph_memory -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  15144. }
  15145. goto _2
  15146. _2:
  15147. ;
  15148. *(*TFT_UInt)(unsafe.Pointer(bp))++
  15149. }
  15150. } else {
  15151. /*
  15152. * Free all glyphs, since they are part of a set.
  15153. */
  15154. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  15155. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  15156. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  15157. }
  15158. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  15159. for {
  15160. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  15161. break
  15162. }
  15163. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*8))
  15164. if xftg != 0 {
  15165. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > uint64(0) {
  15166. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15167. }
  15168. }
  15169. goto _3
  15170. _3:
  15171. ;
  15172. *(*TFT_UInt)(unsafe.Pointer(bp))++
  15173. }
  15174. }
  15175. }
  15176. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15177. __XftFontValidateMemory(tls, dpy, pub)
  15178. }
  15179. }
  15180. func X_XftFontManageMemory(tls *libc.TLS, dpy uintptr, pub uintptr) {
  15181. bp := tls.Alloc(32)
  15182. defer tls.Free(32)
  15183. var font uintptr
  15184. var v1 uint64
  15185. _, _ = font, v1
  15186. font = pub
  15187. if (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory != 0 {
  15188. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15189. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  15190. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  15191. v1 = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  15192. } else {
  15193. v1 = uint64(font)
  15194. }
  15195. libc.Xprintf(tls, __ccgo_ts+1954, libc.VaList(bp+8, v1, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory))
  15196. }
  15197. }
  15198. for (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  15199. X_XftFontUncacheGlyph(tls, dpy, pub)
  15200. }
  15201. }
  15202. X_XftDisplayManageMemory(tls, dpy)
  15203. }
  15204. const m_UINT_MAX2 = 0xffffffff
  15205. /* xftxlfd.c */
  15206. var __XftConfigInitialized int32
  15207. func XXftInit(tls *libc.TLS, config uintptr) (r int32) {
  15208. if __XftConfigInitialized != 0 {
  15209. return int32(m_True)
  15210. }
  15211. __XftConfigInitialized = int32(m_True)
  15212. if !(libfontconfig.XFcInit(tls) != 0) {
  15213. return m_False
  15214. }
  15215. return int32(m_True)
  15216. }
  15217. func XXftGetVersion(tls *libc.TLS) (r int32) {
  15218. return libc.Int32FromInt32(m_XFT_MAJOR)*libc.Int32FromInt32(10000) + libc.Int32FromInt32(m_XFT_MINOR)*libc.Int32FromInt32(100) + libc.Int32FromInt32(m_XFT_REVISION)
  15219. }
  15220. var _XftInUse = [4]struct {
  15221. Fname uintptr
  15222. Falloc_count int32
  15223. Falloc_mem Tsize_t
  15224. Ffree_count int32
  15225. Ffree_mem Tsize_t
  15226. }{
  15227. 0: {
  15228. Fname: __ccgo_ts + 2000,
  15229. },
  15230. 1: {
  15231. Fname: __ccgo_ts + 2008,
  15232. },
  15233. 2: {
  15234. Fname: __ccgo_ts + 2016,
  15235. },
  15236. 3: {
  15237. Fname: __ccgo_ts + 2026,
  15238. },
  15239. }
  15240. var _XftAllocCount int32
  15241. var _XftAllocMem Tsize_t
  15242. var _XftFreeCount int32
  15243. var _XftFreeMem Tsize_t
  15244. var _XftMemNotice = libc.Uint64FromInt32(libc.Int32FromInt32(1) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  15245. var _XftAllocNotify Tsize_t
  15246. var _XftFreeNotify Tsize_t
  15247. func XXftMemReport(tls *libc.TLS) {
  15248. bp := tls.Alloc(48)
  15249. defer tls.Free(48)
  15250. var i int32
  15251. _ = i
  15252. libc.Xprintf(tls, __ccgo_ts+2035, 0)
  15253. libc.Xprintf(tls, __ccgo_ts+2054, 0)
  15254. libc.Xprintf(tls, __ccgo_ts+2093, 0)
  15255. i = 0
  15256. for {
  15257. if !(i < int32(_XFT_MEM_NUM)) {
  15258. break
  15259. }
  15260. 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))
  15261. goto _1
  15262. _1:
  15263. ;
  15264. i++
  15265. }
  15266. libc.Xprintf(tls, __ccgo_ts+2137, libc.VaList(bp+8, __ccgo_ts+2159, _XftAllocCount, _XftAllocMem, _XftFreeCount, _XftFreeMem))
  15267. _XftAllocNotify = uint64(0)
  15268. _XftFreeNotify = uint64(0)
  15269. }
  15270. func XXftMemAlloc(tls *libc.TLS, kind int32, size Tsize_t) {
  15271. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  15272. _XftInUse[kind].Falloc_count++
  15273. _XftInUse[kind].Falloc_mem += size
  15274. _XftAllocCount++
  15275. _XftAllocMem += size
  15276. _XftAllocNotify += size
  15277. if _XftAllocNotify > _XftMemNotice {
  15278. XXftMemReport(tls)
  15279. }
  15280. }
  15281. }
  15282. func XXftMemFree(tls *libc.TLS, kind int32, size Tsize_t) {
  15283. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  15284. _XftInUse[kind].Ffree_count++
  15285. _XftInUse[kind].Ffree_mem += size
  15286. _XftFreeCount++
  15287. _XftFreeMem += size
  15288. _XftFreeNotify += size
  15289. if _XftFreeNotify > _XftMemNotice {
  15290. XXftMemReport(tls)
  15291. }
  15292. }
  15293. }
  15294. /* xftxlfd.c */
  15295. func XXftListFontsPatternObjects(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, os uintptr) (r uintptr) {
  15296. return libfontconfig.XFcFontList(tls, libc.UintptrFromInt32(0), pattern, os)
  15297. }
  15298. func XXftListFonts(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  15299. bp := tls.Alloc(16)
  15300. defer tls.Free(16)
  15301. var __o__, __ob__, __os__, __p__, first, fs, os, pattern uintptr
  15302. var va Tva_list
  15303. var _ /* __v__ at bp+0 */ TFcValue
  15304. _, _, _, _, _, _, _, _, _ = __o__, __ob__, __os__, __p__, first, fs, os, pattern, va
  15305. va = va1
  15306. __p__ = libc.UintptrFromInt32(0)
  15307. if !(__p__ != 0) {
  15308. __p__ = libfontconfig.XFcPatternCreate(tls)
  15309. if !(__p__ != 0) {
  15310. goto _FcPatternVapBuild_bail0
  15311. }
  15312. }
  15313. for {
  15314. __o__ = libc.VaUintptr(&va)
  15315. if !(__o__ != 0) {
  15316. break
  15317. }
  15318. (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 = libc.VaInt32(&va)
  15319. switch (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 {
  15320. case int32(_FcTypeUnknown):
  15321. fallthrough
  15322. case int32(_FcTypeVoid):
  15323. goto _FcPatternVapBuild_bail1
  15324. case int32(_FcTypeInteger):
  15325. *(*int32)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  15326. case int32(_FcTypeDouble):
  15327. *(*float64)(unsafe.Pointer(bp + 8)) = libc.VaFloat64(&va)
  15328. case int32(_FcTypeString):
  15329. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15330. case int32(_FcTypeBool):
  15331. *(*TFcBool)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  15332. case int32(_FcTypeMatrix):
  15333. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15334. case int32(_FcTypeCharSet):
  15335. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15336. case int32(_FcTypeFTFace):
  15337. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15338. case int32(_FcTypeLangSet):
  15339. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15340. case int32(_FcTypeRange):
  15341. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15342. break
  15343. }
  15344. if !(libfontconfig.XFcPatternAdd(tls, __p__, __o__, *(*TFcValue)(unsafe.Pointer(bp)), int32(m_FcTrue)) != 0) {
  15345. goto _FcPatternVapBuild_bail1
  15346. }
  15347. goto _1
  15348. _1:
  15349. }
  15350. pattern = __p__
  15351. goto _FcPatternVapBuild_return
  15352. goto _FcPatternVapBuild_bail1
  15353. _FcPatternVapBuild_bail1:
  15354. ;
  15355. if !(libc.UintptrFromInt32(0) != 0) {
  15356. libfontconfig.XFcPatternDestroy(tls, __p__)
  15357. }
  15358. goto _FcPatternVapBuild_bail0
  15359. _FcPatternVapBuild_bail0:
  15360. ;
  15361. pattern = libc.UintptrFromInt32(0)
  15362. goto _FcPatternVapBuild_return
  15363. _FcPatternVapBuild_return:
  15364. ;
  15365. first = libc.VaUintptr(&va)
  15366. os = uintptr(0)
  15367. __os__ = libfontconfig.XFcObjectSetCreate(tls)
  15368. if !(__os__ != 0) {
  15369. goto _FcObjectSetVapBuild_bail0
  15370. }
  15371. __ob__ = first
  15372. for __ob__ != 0 {
  15373. if !(libfontconfig.XFcObjectSetAdd(tls, __os__, __ob__) != 0) {
  15374. goto _FcObjectSetVapBuild_bail1
  15375. }
  15376. __ob__ = libc.VaUintptr(&va)
  15377. }
  15378. os = __os__
  15379. goto _FcObjectSetVapBuild_bail1
  15380. _FcObjectSetVapBuild_bail1:
  15381. ;
  15382. if !(os != 0) && __os__ != 0 {
  15383. libfontconfig.XFcObjectSetDestroy(tls, __os__)
  15384. }
  15385. goto _FcObjectSetVapBuild_bail0
  15386. _FcObjectSetVapBuild_bail0:
  15387. ;
  15388. _ = va
  15389. fs = XXftListFontsPatternObjects(tls, dpy, screen, pattern, os)
  15390. libfontconfig.XFcPatternDestroy(tls, pattern)
  15391. libfontconfig.XFcObjectSetDestroy(tls, os)
  15392. return fs
  15393. }
  15394. /* xftxlfd.c */
  15395. func XXftNameParse(tls *libc.TLS, name uintptr) (r uintptr) {
  15396. return libfontconfig.XFcNameParse(tls, name)
  15397. }
  15398. func XXftNameUnparse(tls *libc.TLS, pat uintptr, dest uintptr, len1 int32) (r TFcBool) {
  15399. var name, new1 uintptr
  15400. _, _ = name, new1
  15401. name = libfontconfig.XFcNameUnparse(tls, pat)
  15402. if !(name != 0) {
  15403. return m_FcFalse
  15404. }
  15405. if libc.Xstrlen(tls, name)+uint64(1) > libc.Uint64FromInt32(len1) {
  15406. new1 = libfontconfig.XFcPatternDuplicate(tls, pat)
  15407. libc.Xfree(tls, name)
  15408. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+2165)
  15409. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+1400)
  15410. name = libfontconfig.XFcNameUnparse(tls, new1)
  15411. libfontconfig.XFcPatternDestroy(tls, new1)
  15412. if !(name != 0) {
  15413. return m_FcFalse
  15414. }
  15415. if libc.Xstrlen(tls, name)+uint64(1) > libc.Uint64FromInt32(len1) {
  15416. libc.Xstrncpy(tls, dest, name, libc.Uint64FromInt32(len1)-uint64(1))
  15417. *(*uint8)(unsafe.Pointer(dest + uintptr(len1-int32(1)))) = uint8('\000')
  15418. libc.Xfree(tls, name)
  15419. return m_FcFalse
  15420. }
  15421. }
  15422. libc.Xstrcpy(tls, dest, name)
  15423. libc.Xfree(tls, name)
  15424. return int32(m_FcTrue)
  15425. }
  15426. const m_NUM_ELT_LOCAL = 128
  15427. const m_UINT64_MAX1 = 18446744073709551615
  15428. /* xftxlfd.c */
  15429. // C documentation
  15430. //
  15431. // /*
  15432. // * Dispatch glyph drawing to the correct XRenderCompositeString function
  15433. // */
  15434. 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) {
  15435. if nchars == 0 {
  15436. return
  15437. }
  15438. switch charwidth {
  15439. case int32(1):
  15440. fallthrough
  15441. default:
  15442. libxrender.XXRenderCompositeString8(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15443. case int32(2):
  15444. libxrender.XXRenderCompositeString16(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15445. case int32(4):
  15446. libxrender.XXRenderCompositeString32(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15447. break
  15448. }
  15449. }
  15450. /*
  15451. * Use the Render extension to draw the glyphs
  15452. */
  15453. 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) {
  15454. bp := tls.Alloc(5136)
  15455. defer tls.Free(5136)
  15456. var char16, char32, char8, chars, font, glyph uintptr
  15457. var dstx, dsty, i, j, width int32
  15458. var g, max TFT_UInt
  15459. var glyphs_loaded TFcBool
  15460. var needed, size Tsize_t
  15461. var wire TGlyph
  15462. var _ /* char_local at bp+1028 */ [1024]uint32
  15463. var _ /* missing at bp+0 */ [256]TFT_UInt
  15464. var _ /* nmissing at bp+1024 */ int32
  15465. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, dstx, dsty, font, g, glyph, glyphs_loaded, i, j, max, needed, size, width, wire
  15466. font = pub
  15467. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15468. return
  15469. }
  15470. /*
  15471. * Load missing glyphs
  15472. */
  15473. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15474. max = uint32(0)
  15475. glyphs_loaded = m_FcFalse
  15476. i = 0
  15477. for {
  15478. if !(i < nglyphs) {
  15479. break
  15480. }
  15481. g = *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4))
  15482. if g > max {
  15483. max = g
  15484. }
  15485. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15486. glyphs_loaded = int32(m_FcTrue)
  15487. }
  15488. goto _1
  15489. _1:
  15490. ;
  15491. i++
  15492. }
  15493. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15494. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15495. }
  15496. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15497. goto bail1
  15498. }
  15499. if max < uint32(0x100) {
  15500. width = int32(1)
  15501. size = uint64(1)
  15502. } else {
  15503. if max < uint32(0x10000) {
  15504. width = int32(2)
  15505. size = uint64(2)
  15506. } else {
  15507. width = int32(4)
  15508. size = uint64(4)
  15509. }
  15510. }
  15511. chars = bp + 1028
  15512. if libc.Uint64FromInt32(nglyphs) > uint64(0xffffffffffffffff)/size {
  15513. goto bail1
  15514. }
  15515. needed = libc.Uint64FromInt32(nglyphs) * size
  15516. if needed > uint64(4096) {
  15517. chars = libc.Xmalloc(tls, needed)
  15518. if !(chars != 0) {
  15519. goto bail1
  15520. }
  15521. }
  15522. dstx = x
  15523. dsty = y
  15524. char8 = chars
  15525. char16 = chars
  15526. char32 = chars
  15527. i = 0
  15528. j = libc.Int32FromInt32(0)
  15529. for {
  15530. if !(i < nglyphs) {
  15531. break
  15532. }
  15533. wire = uint64(*(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)))
  15534. if wire >= uint64((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*8)) != 0) {
  15535. wire = uint64(0)
  15536. }
  15537. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*8))
  15538. if glyph == libc.UintptrFromInt32(0) {
  15539. goto _2
  15540. }
  15541. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  15542. __XftCompositeString(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, width, chars, j)
  15543. libxrender.XXRenderComposite(tls, dpy, int32(m_PictOpOver), (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture, uint64(0), dst, 0, 0, 0, 0, dstx-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx), dsty-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight))
  15544. dstx += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15545. dsty += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15546. x = dstx
  15547. y = dsty
  15548. j = 0
  15549. } else {
  15550. switch width {
  15551. case int32(1):
  15552. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(wire)
  15553. case int32(2):
  15554. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(wire)
  15555. case int32(4):
  15556. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = uint32(wire)
  15557. break
  15558. }
  15559. dstx += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15560. dsty += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15561. j++
  15562. }
  15563. goto _2
  15564. _2:
  15565. ;
  15566. i++
  15567. }
  15568. __XftCompositeString(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, width, chars, j)
  15569. if chars != bp+1028 {
  15570. libc.Xfree(tls, chars)
  15571. }
  15572. goto bail1
  15573. bail1:
  15574. ;
  15575. if glyphs_loaded != 0 {
  15576. X_XftFontManageMemory(tls, dpy, pub)
  15577. }
  15578. }
  15579. // C documentation
  15580. //
  15581. // /*
  15582. // * Dispatch glyph drawing to the correct XRenderCompositeText function
  15583. // */
  15584. 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) {
  15585. if nelt == 0 {
  15586. return
  15587. }
  15588. switch eltwidth {
  15589. case int32(1):
  15590. fallthrough
  15591. default:
  15592. libxrender.XXRenderCompositeText8(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15593. case int32(2):
  15594. libxrender.XXRenderCompositeText16(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15595. case int32(4):
  15596. libxrender.XXRenderCompositeText32(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15597. break
  15598. }
  15599. }
  15600. func XXftGlyphSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  15601. bp := tls.Alloc(9232)
  15602. defer tls.Free(9232)
  15603. var char16, char32, char8, chars, elts, font, glyph, v4, v7 uintptr
  15604. var g, max TFT_UInt
  15605. var glyphs_loaded TFcBool
  15606. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  15607. var _ /* char_local at bp+1028 */ [1024]uint32
  15608. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  15609. var _ /* missing at bp+0 */ [256]TFT_UInt
  15610. var _ /* nmissing at bp+1024 */ int32
  15611. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, elts, font, g, glyph, glyphs_loaded, i, j, max, n, nelt, size, width, x, y, v3, v4, v5, v7
  15612. font = pub
  15613. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15614. return
  15615. }
  15616. if !(nglyphs != 0) {
  15617. return
  15618. }
  15619. /*
  15620. * Load missing glyphs
  15621. */
  15622. max = uint32(0)
  15623. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15624. glyphs_loaded = m_FcFalse
  15625. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fglyph
  15626. i = 0
  15627. for {
  15628. if !(i < nglyphs) {
  15629. break
  15630. }
  15631. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15632. if g > max {
  15633. max = g
  15634. }
  15635. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15636. glyphs_loaded = int32(m_FcTrue)
  15637. }
  15638. goto _1
  15639. _1:
  15640. ;
  15641. i++
  15642. }
  15643. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15644. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15645. }
  15646. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15647. goto bail1
  15648. }
  15649. /*
  15650. * See what encoding size is needed
  15651. */
  15652. if max < uint32(0x100) {
  15653. size = int32(1)
  15654. width = int32(1)
  15655. } else {
  15656. if max < uint32(0x10000) {
  15657. size = int32(2)
  15658. width = int32(2)
  15659. } else {
  15660. size = int32(4)
  15661. width = int32(4)
  15662. }
  15663. }
  15664. chars = bp + 1028
  15665. if nglyphs*size > int32(m_NUM_LOCAL) {
  15666. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  15667. if !(chars != 0) {
  15668. goto bail1
  15669. }
  15670. }
  15671. char8 = chars
  15672. char16 = chars
  15673. char32 = chars
  15674. /*
  15675. * Compute the number of glyph elts needed
  15676. */
  15677. nelt = int32(1)
  15678. i = 0
  15679. for {
  15680. if !(i < nglyphs) {
  15681. break
  15682. }
  15683. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15684. /* Substitute default for non-existent glyphs */
  15685. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  15686. g = uint32(0)
  15687. }
  15688. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0 {
  15689. break
  15690. }
  15691. goto _2
  15692. _2:
  15693. ;
  15694. i++
  15695. }
  15696. if i == nglyphs {
  15697. goto bail2
  15698. }
  15699. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  15700. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15701. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15702. for {
  15703. i++
  15704. v3 = i
  15705. if !(v3 < nglyphs) {
  15706. break
  15707. }
  15708. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15709. /* Substitute default for non-existent glyphs */
  15710. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  15711. g = uint32(0)
  15712. }
  15713. /*
  15714. * check to see if the glyph is placed where it would
  15715. * fall using the normal spacing and if it would render
  15716. * as a XRender glyph
  15717. */
  15718. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  15719. glyph = v4
  15720. if v4 != 0 && !((*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0) {
  15721. if x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  15722. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  15723. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  15724. nelt++
  15725. }
  15726. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15727. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15728. }
  15729. }
  15730. elts = bp + 5128
  15731. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor != 0) && nelt > int32(m_NUM_ELT_LOCAL) {
  15732. elts = libc.Xmalloc(tls, libc.Uint64FromInt32(nelt)*uint64(32))
  15733. if !(elts != 0) {
  15734. goto bail2
  15735. }
  15736. }
  15737. /*
  15738. * Generate the list of glyph elts or render color glyphs
  15739. */
  15740. nelt = 0
  15741. v5 = libc.Int32FromInt32(0)
  15742. y = v5
  15743. x = v5
  15744. n = 0
  15745. j = 0
  15746. i = 0
  15747. for {
  15748. if !(i < nglyphs) {
  15749. break
  15750. }
  15751. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15752. /* Substitute default for non-existent glyphs */
  15753. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  15754. g = uint32(0)
  15755. }
  15756. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  15757. glyph = v7
  15758. if v7 != 0 {
  15759. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  15760. libxrender.XXRenderComposite(tls, dpy, int32(m_PictOpOver), (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture, uint64(0), dst, 0, 0, 0, 0, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx), int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight))
  15761. goto _6
  15762. }
  15763. if !(i != 0) || x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  15764. if n != 0 {
  15765. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  15766. nelt++
  15767. }
  15768. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  15769. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  15770. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - x
  15771. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - y
  15772. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  15773. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  15774. n = 0
  15775. }
  15776. switch width {
  15777. case int32(1):
  15778. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(g)
  15779. case int32(2):
  15780. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  15781. case int32(4):
  15782. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  15783. break
  15784. }
  15785. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15786. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15787. j++
  15788. n++
  15789. }
  15790. goto _6
  15791. _6:
  15792. ;
  15793. i++
  15794. }
  15795. if n != 0 {
  15796. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  15797. nelt++
  15798. }
  15799. __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)
  15800. if elts != bp+5128 {
  15801. libc.Xfree(tls, elts)
  15802. }
  15803. goto bail2
  15804. bail2:
  15805. ;
  15806. if chars != bp+1028 {
  15807. libc.Xfree(tls, chars)
  15808. }
  15809. goto bail1
  15810. bail1:
  15811. ;
  15812. if glyphs_loaded != 0 {
  15813. X_XftFontManageMemory(tls, dpy, pub)
  15814. }
  15815. }
  15816. func XXftCharSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  15817. bp := tls.Alloc(8192)
  15818. defer tls.Free(8192)
  15819. var glyphs uintptr
  15820. var i int32
  15821. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  15822. _, _ = glyphs, i
  15823. if len1 <= 0 {
  15824. return
  15825. }
  15826. if len1 <= int32(m_NUM_LOCAL) {
  15827. glyphs = bp
  15828. } else {
  15829. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(8))
  15830. if !(glyphs != 0) {
  15831. return
  15832. }
  15833. }
  15834. i = 0
  15835. for {
  15836. if !(i < len1) {
  15837. break
  15838. }
  15839. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, dpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  15840. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  15841. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  15842. goto _1
  15843. _1:
  15844. ;
  15845. i++
  15846. }
  15847. XXftGlyphSpecRender(tls, dpy, op, src, pub, dst, srcx, srcy, glyphs, len1)
  15848. if glyphs != bp {
  15849. libc.Xfree(tls, glyphs)
  15850. }
  15851. }
  15852. /*
  15853. * Choose which format to draw text in when drawing with fonts
  15854. * of different formats. The trick is that ARGB formats aren't
  15855. * compatible with A formats as PictOpAdd does the wrong thing, so
  15856. * fall back to an A format when presented with an ARGB and A format
  15857. */
  15858. func _XftPreferFormat(tls *libc.TLS, dpy uintptr, a uintptr, b uintptr) (r uintptr) {
  15859. var prefer uintptr
  15860. _ = prefer
  15861. prefer = libc.UintptrFromInt32(0)
  15862. if a == b {
  15863. prefer = a
  15864. } else {
  15865. if libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth == int32(32)) != libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth == int32(32)) {
  15866. prefer = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  15867. } else {
  15868. if (*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth > (*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth {
  15869. prefer = a
  15870. } else {
  15871. prefer = b
  15872. }
  15873. }
  15874. }
  15875. return prefer
  15876. }
  15877. func XXftGlyphFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  15878. bp := tls.Alloc(9232)
  15879. defer tls.Free(9232)
  15880. var char16, char32, char8, chars, elts, firstFont, font, font1, font2, font3, format, glyph, prevPublic, pub, pub1, pub2, pub3, v4, v7 uintptr
  15881. var g, max TFT_UInt
  15882. var glyphs_loaded TFcBool
  15883. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  15884. var _ /* char_local at bp+1028 */ [1024]uint32
  15885. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  15886. var _ /* missing at bp+0 */ [256]TFT_UInt
  15887. var _ /* nmissing at bp+1024 */ int32
  15888. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  15889. if !(nglyphs != 0) {
  15890. return
  15891. }
  15892. /*
  15893. * Load missing glyphs. Have to load them
  15894. * one at a time in case the font changes
  15895. */
  15896. max = uint32(0)
  15897. glyphs_loaded = m_FcFalse
  15898. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fglyph
  15899. i = 0
  15900. for {
  15901. if !(i < nglyphs) {
  15902. break
  15903. }
  15904. pub = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  15905. font = pub
  15906. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  15907. if g > max {
  15908. max = g
  15909. }
  15910. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15911. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15912. glyphs_loaded = int32(m_FcTrue)
  15913. }
  15914. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15915. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15916. }
  15917. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15918. goto bail1
  15919. }
  15920. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15921. goto bail1
  15922. }
  15923. goto _1
  15924. _1:
  15925. ;
  15926. i++
  15927. }
  15928. /*
  15929. * See what encoding size is needed
  15930. */
  15931. if max < uint32(0x100) {
  15932. size = int32(1)
  15933. width = int32(1)
  15934. } else {
  15935. if max < uint32(0x10000) {
  15936. size = int32(2)
  15937. width = int32(2)
  15938. } else {
  15939. size = int32(4)
  15940. width = int32(4)
  15941. }
  15942. }
  15943. chars = bp + 1028
  15944. if nglyphs*size > int32(m_NUM_LOCAL) {
  15945. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  15946. if !(chars != 0) {
  15947. goto bail1
  15948. }
  15949. }
  15950. char8 = chars
  15951. char16 = chars
  15952. char32 = chars
  15953. /*
  15954. * Compute the number of glyph elts needed
  15955. */
  15956. nelt = int32(1)
  15957. firstFont = libc.UintptrFromInt32(0)
  15958. i = 0
  15959. for {
  15960. if !(i < nglyphs) {
  15961. break
  15962. }
  15963. pub1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  15964. font1 = pub1
  15965. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  15966. /* Substitute default for non-existent glyphs */
  15967. if g >= (*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0) {
  15968. g = uint32(0)
  15969. }
  15970. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0 {
  15971. firstFont = font1
  15972. break
  15973. }
  15974. goto _2
  15975. _2:
  15976. ;
  15977. i++
  15978. }
  15979. if i == nglyphs || !(firstFont != 0) {
  15980. goto bail2
  15981. }
  15982. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(firstFont)).Fglyphs + uintptr(g)*8))
  15983. format = (*TXftFontInt)(unsafe.Pointer(firstFont)).Fformat
  15984. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15985. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15986. prevPublic = libc.UintptrFromInt32(0)
  15987. for {
  15988. i++
  15989. v3 = i
  15990. if !(v3 < nglyphs) {
  15991. break
  15992. }
  15993. pub2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  15994. font2 = pub2
  15995. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  15996. /* Substitute default for non-existent glyphs */
  15997. if g >= (*TXftFontInt)(unsafe.Pointer(font2)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8)) != 0) {
  15998. g = uint32(0)
  15999. }
  16000. /*
  16001. * check to see if the glyph is placed where it would
  16002. * fall using the normal spacing
  16003. */
  16004. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8))
  16005. glyph = v4
  16006. if v4 != 0 && !((*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0) {
  16007. if pub2 != prevPublic || x != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) || y != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) {
  16008. prevPublic = pub2
  16009. if (*TXftFontInt)(unsafe.Pointer(font2)).Fformat != format {
  16010. format = _XftPreferFormat(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font2)).Fformat, format)
  16011. }
  16012. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  16013. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  16014. nelt++
  16015. }
  16016. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  16017. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  16018. }
  16019. }
  16020. elts = bp + 5128
  16021. if nelt > int32(m_NUM_ELT_LOCAL) {
  16022. elts = libc.Xmalloc(tls, libc.Uint64FromInt32(nelt)*uint64(32))
  16023. if !(elts != 0) {
  16024. goto bail2
  16025. }
  16026. }
  16027. /*
  16028. * Generate the list of glyph elts and render color glyphs
  16029. */
  16030. nelt = 0
  16031. v5 = libc.Int32FromInt32(0)
  16032. y = v5
  16033. x = v5
  16034. n = 0
  16035. j = 0
  16036. prevPublic = libc.UintptrFromInt32(0)
  16037. i = 0
  16038. for {
  16039. if !(i < nglyphs) {
  16040. break
  16041. }
  16042. pub3 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  16043. font3 = pub3
  16044. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  16045. /* Substitute default for non-existent glyphs */
  16046. if g >= (*TXftFontInt)(unsafe.Pointer(font3)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8)) != 0) {
  16047. g = uint32(0)
  16048. }
  16049. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8))
  16050. glyph = v7
  16051. if v7 != 0 {
  16052. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  16053. libxrender.XXRenderComposite(tls, dpy, int32(m_PictOpOver), (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture, uint64(0), dst, 0, 0, 0, 0, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight))
  16054. goto _6
  16055. }
  16056. if !(i != 0) || pub3 != prevPublic || x != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) || y != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) {
  16057. if n != 0 {
  16058. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  16059. nelt++
  16060. }
  16061. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font3)).Fglyphset
  16062. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  16063. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - x
  16064. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - y
  16065. prevPublic = pub3
  16066. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  16067. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  16068. n = 0
  16069. }
  16070. switch width {
  16071. case int32(1):
  16072. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(g)
  16073. case int32(2):
  16074. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  16075. case int32(4):
  16076. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  16077. break
  16078. }
  16079. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  16080. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  16081. j++
  16082. n++
  16083. }
  16084. goto _6
  16085. _6:
  16086. ;
  16087. i++
  16088. }
  16089. if n != 0 {
  16090. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  16091. nelt++
  16092. }
  16093. __XftCompositeText(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), width, elts, nelt)
  16094. if elts != bp+5128 {
  16095. libc.Xfree(tls, elts)
  16096. }
  16097. goto bail2
  16098. bail2:
  16099. ;
  16100. if chars != bp+1028 {
  16101. libc.Xfree(tls, chars)
  16102. }
  16103. goto bail1
  16104. bail1:
  16105. ;
  16106. if glyphs_loaded != 0 {
  16107. i = 0
  16108. for {
  16109. if !(i < nglyphs) {
  16110. break
  16111. }
  16112. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  16113. goto _8
  16114. _8:
  16115. ;
  16116. i++
  16117. }
  16118. }
  16119. }
  16120. func XXftCharFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  16121. bp := tls.Alloc(16384)
  16122. defer tls.Free(16384)
  16123. var glyphs uintptr
  16124. var i int32
  16125. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  16126. _, _ = glyphs, i
  16127. if len1 <= 0 {
  16128. return
  16129. }
  16130. if len1 <= int32(m_NUM_LOCAL) {
  16131. glyphs = bp
  16132. } else {
  16133. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(16))
  16134. if !(glyphs != 0) {
  16135. return
  16136. }
  16137. }
  16138. i = 0
  16139. for {
  16140. if !(i < len1) {
  16141. break
  16142. }
  16143. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  16144. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph = XXftCharIndex(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont, (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fucs4)
  16145. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  16146. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  16147. goto _1
  16148. _1:
  16149. ;
  16150. i++
  16151. }
  16152. XXftGlyphFontSpecRender(tls, dpy, op, src, dst, srcx, srcy, glyphs, len1)
  16153. if glyphs != bp {
  16154. libc.Xfree(tls, glyphs)
  16155. }
  16156. }
  16157. 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) {
  16158. bp := tls.Alloc(4096)
  16159. defer tls.Free(4096)
  16160. var glyphs uintptr
  16161. var i int32
  16162. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16163. _, _ = glyphs, i
  16164. if len1 <= 0 {
  16165. return
  16166. }
  16167. if len1 <= int32(m_NUM_LOCAL) {
  16168. glyphs = bp
  16169. } else {
  16170. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16171. if !(glyphs != 0) {
  16172. return
  16173. }
  16174. }
  16175. i = 0
  16176. for {
  16177. if !(i < len1) {
  16178. break
  16179. }
  16180. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  16181. goto _1
  16182. _1:
  16183. ;
  16184. i++
  16185. }
  16186. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16187. if glyphs != bp {
  16188. libc.Xfree(tls, glyphs)
  16189. }
  16190. }
  16191. 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) {
  16192. bp := tls.Alloc(4096)
  16193. defer tls.Free(4096)
  16194. var glyphs uintptr
  16195. var i int32
  16196. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16197. _, _ = glyphs, i
  16198. if len1 <= 0 {
  16199. return
  16200. }
  16201. if len1 <= int32(m_NUM_LOCAL) {
  16202. glyphs = bp
  16203. } else {
  16204. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16205. if !(glyphs != 0) {
  16206. return
  16207. }
  16208. }
  16209. i = 0
  16210. for {
  16211. if !(i < len1) {
  16212. break
  16213. }
  16214. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  16215. goto _1
  16216. _1:
  16217. ;
  16218. i++
  16219. }
  16220. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16221. if glyphs != bp {
  16222. libc.Xfree(tls, glyphs)
  16223. }
  16224. }
  16225. 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) {
  16226. bp := tls.Alloc(4096)
  16227. defer tls.Free(4096)
  16228. var glyphs uintptr
  16229. var i int32
  16230. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16231. _, _ = glyphs, i
  16232. if len1 <= 0 {
  16233. return
  16234. }
  16235. if len1 <= int32(m_NUM_LOCAL) {
  16236. glyphs = bp
  16237. } else {
  16238. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16239. if !(glyphs != 0) {
  16240. return
  16241. }
  16242. }
  16243. i = 0
  16244. for {
  16245. if !(i < len1) {
  16246. break
  16247. }
  16248. *(*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)))))))
  16249. goto _1
  16250. _1:
  16251. ;
  16252. i++
  16253. }
  16254. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16255. if glyphs != bp {
  16256. libc.Xfree(tls, glyphs)
  16257. }
  16258. }
  16259. 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) {
  16260. bp := tls.Alloc(4096)
  16261. defer tls.Free(4096)
  16262. var glyphs uintptr
  16263. var i int32
  16264. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16265. _, _ = glyphs, i
  16266. if len1 <= 0 {
  16267. return
  16268. }
  16269. if len1 <= int32(m_NUM_LOCAL) {
  16270. glyphs = bp
  16271. } else {
  16272. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16273. if !(glyphs != 0) {
  16274. return
  16275. }
  16276. }
  16277. i = 0
  16278. for {
  16279. if !(i < len1) {
  16280. break
  16281. }
  16282. *(*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)))
  16283. goto _1
  16284. _1:
  16285. ;
  16286. i++
  16287. }
  16288. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16289. if glyphs != bp {
  16290. libc.Xfree(tls, glyphs)
  16291. }
  16292. }
  16293. 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) {
  16294. bp := tls.Alloc(4096)
  16295. defer tls.Free(4096)
  16296. var glyphs uintptr
  16297. var i int32
  16298. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16299. _, _ = glyphs, i
  16300. if len1 <= 0 {
  16301. return
  16302. }
  16303. if len1 <= int32(m_NUM_LOCAL) {
  16304. glyphs = bp
  16305. } else {
  16306. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16307. if !(glyphs != 0) {
  16308. return
  16309. }
  16310. }
  16311. i = 0
  16312. for {
  16313. if !(i < len1) {
  16314. break
  16315. }
  16316. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  16317. goto _1
  16318. _1:
  16319. ;
  16320. i++
  16321. }
  16322. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16323. if glyphs != bp {
  16324. libc.Xfree(tls, glyphs)
  16325. }
  16326. }
  16327. 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) {
  16328. bp := tls.Alloc(4096)
  16329. defer tls.Free(4096)
  16330. var glyphs uintptr
  16331. var i int32
  16332. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16333. _, _ = glyphs, i
  16334. if len1 <= 0 {
  16335. return
  16336. }
  16337. if len1 <= int32(m_NUM_LOCAL) {
  16338. glyphs = bp
  16339. } else {
  16340. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16341. if !(glyphs != 0) {
  16342. return
  16343. }
  16344. }
  16345. i = 0
  16346. for {
  16347. if !(i < len1) {
  16348. break
  16349. }
  16350. *(*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)))))))
  16351. goto _1
  16352. _1:
  16353. ;
  16354. i++
  16355. }
  16356. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16357. if glyphs != bp {
  16358. libc.Xfree(tls, glyphs)
  16359. }
  16360. }
  16361. 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) {
  16362. bp := tls.Alloc(4096)
  16363. defer tls.Free(4096)
  16364. var glyphs uintptr
  16365. var i int32
  16366. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16367. _, _ = glyphs, i
  16368. if len1 <= 0 {
  16369. return
  16370. }
  16371. if len1 <= int32(m_NUM_LOCAL) {
  16372. glyphs = bp
  16373. } else {
  16374. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16375. if !(glyphs != 0) {
  16376. return
  16377. }
  16378. }
  16379. i = 0
  16380. for {
  16381. if !(i < len1) {
  16382. break
  16383. }
  16384. *(*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)))
  16385. goto _1
  16386. _1:
  16387. ;
  16388. i++
  16389. }
  16390. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16391. if glyphs != bp {
  16392. libc.Xfree(tls, glyphs)
  16393. }
  16394. }
  16395. 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) {
  16396. bp := tls.Alloc(4112)
  16397. defer tls.Free(4112)
  16398. var glyphs, glyphs_new uintptr
  16399. var i, l, size, v1, v3 int32
  16400. var v2 bool
  16401. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16402. var _ /* ucs4 at bp+4096 */ TFcChar32
  16403. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  16404. if len1 <= 0 {
  16405. return
  16406. }
  16407. i = 0
  16408. glyphs = bp
  16409. size = int32(m_NUM_LOCAL)
  16410. for {
  16411. if v2 = len1 != 0; v2 {
  16412. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  16413. l = v1
  16414. }
  16415. if !(v2 && v1 > 0) {
  16416. break
  16417. }
  16418. if i == size {
  16419. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  16420. if !(glyphs_new != 0) {
  16421. if glyphs != bp {
  16422. libc.Xfree(tls, glyphs)
  16423. }
  16424. return
  16425. }
  16426. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  16427. size *= int32(2)
  16428. if glyphs != bp {
  16429. libc.Xfree(tls, glyphs)
  16430. }
  16431. glyphs = glyphs_new
  16432. }
  16433. v3 = i
  16434. i++
  16435. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  16436. string1 += uintptr(l)
  16437. len1 -= l
  16438. }
  16439. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, i)
  16440. if glyphs != bp {
  16441. libc.Xfree(tls, glyphs)
  16442. }
  16443. }
  16444. 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) {
  16445. bp := tls.Alloc(4112)
  16446. defer tls.Free(4112)
  16447. var glyphs, glyphs_new uintptr
  16448. var i, l, size, v1, v3 int32
  16449. var v2 bool
  16450. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16451. var _ /* ucs4 at bp+4096 */ TFcChar32
  16452. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  16453. if len1 <= 0 {
  16454. return
  16455. }
  16456. i = 0
  16457. glyphs = bp
  16458. size = int32(m_NUM_LOCAL)
  16459. for {
  16460. if v2 = len1 != 0; v2 {
  16461. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  16462. l = v1
  16463. }
  16464. if !(v2 && v1 > 0) {
  16465. break
  16466. }
  16467. if i == size {
  16468. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  16469. if !(glyphs_new != 0) {
  16470. if glyphs != bp {
  16471. libc.Xfree(tls, glyphs)
  16472. }
  16473. return
  16474. }
  16475. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  16476. size *= int32(2)
  16477. if glyphs != bp {
  16478. libc.Xfree(tls, glyphs)
  16479. }
  16480. glyphs = glyphs_new
  16481. }
  16482. v3 = i
  16483. i++
  16484. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  16485. string1 += uintptr(l)
  16486. len1 -= l
  16487. }
  16488. XXftGlyphRender(tls, dpy, int32(m_PictOpOver), src, pub, dst, srcx, srcy, x, y, glyphs, i)
  16489. if glyphs != bp {
  16490. libc.Xfree(tls, glyphs)
  16491. }
  16492. }
  16493. const m_UINT64_MAX2 = "0xffffffffffffffffu"
  16494. /* xftxlfd.c */
  16495. func X_XftMatchSymbolic(tls *libc.TLS, s uintptr, n int32, name uintptr, def int32) (r int32) {
  16496. var v1 int32
  16497. _ = v1
  16498. for {
  16499. v1 = n
  16500. n--
  16501. if !(v1 != 0) {
  16502. break
  16503. }
  16504. if !(libfontconfig.XFcStrCmpIgnoreCase(tls, (*TXftSymbolic)(unsafe.Pointer(s)).Fname, name) != 0) {
  16505. return (*TXftSymbolic)(unsafe.Pointer(s)).Fvalue
  16506. }
  16507. s += 16
  16508. }
  16509. return def
  16510. }
  16511. /* xftxlfd.c */
  16512. func XXftNativeByteOrder(tls *libc.TLS) (r int32) {
  16513. bp := tls.Alloc(16)
  16514. defer tls.Free(16)
  16515. var _ /* whichbyte at bp+0 */ int32
  16516. *(*int32)(unsafe.Pointer(bp)) = int32(1)
  16517. if *(*uint8)(unsafe.Pointer(bp)) != 0 {
  16518. return m_LSBFirst
  16519. }
  16520. return int32(m_MSBFirst)
  16521. }
  16522. /* byte swap a 32-bit value */
  16523. /* byte swap a short */
  16524. /* byte swap a three-byte unit */
  16525. func XXftSwapCARD32(tls *libc.TLS, data uintptr, u int32) {
  16526. var n uint8
  16527. var v1 int32
  16528. _, _ = n, v1
  16529. for {
  16530. v1 = u
  16531. u--
  16532. if !(v1 != 0) {
  16533. break
  16534. }
  16535. n = *(*uint8)(unsafe.Pointer(data))
  16536. *(*uint8)(unsafe.Pointer(data)) = *(*uint8)(unsafe.Pointer(data + 3))
  16537. *(*uint8)(unsafe.Pointer(data + 3)) = n
  16538. n = *(*uint8)(unsafe.Pointer(data + 1))
  16539. *(*uint8)(unsafe.Pointer(data + 1)) = *(*uint8)(unsafe.Pointer(data + 2))
  16540. *(*uint8)(unsafe.Pointer(data + 2)) = n
  16541. data += 4
  16542. }
  16543. }
  16544. func XXftSwapCARD24(tls *libc.TLS, data uintptr, width int32, height int32) {
  16545. var d uintptr
  16546. var n uint8
  16547. var u, units, v1, v2 int32
  16548. _, _, _, _, _, _ = d, n, u, units, v1, v2
  16549. units = width / int32(3)
  16550. for {
  16551. v1 = height
  16552. height--
  16553. if !(v1 != 0) {
  16554. break
  16555. }
  16556. d = data
  16557. data += uintptr(width)
  16558. u = units
  16559. for {
  16560. v2 = u
  16561. u--
  16562. if !(v2 != 0) {
  16563. break
  16564. }
  16565. n = *(*uint8)(unsafe.Pointer(d))
  16566. *(*uint8)(unsafe.Pointer(d)) = *(*uint8)(unsafe.Pointer(d + 2))
  16567. *(*uint8)(unsafe.Pointer(d + 2)) = n
  16568. d += uintptr(3)
  16569. }
  16570. }
  16571. }
  16572. func XXftSwapCARD16(tls *libc.TLS, data uintptr, u int32) {
  16573. var n uint8
  16574. var v1 int32
  16575. _, _ = n, v1
  16576. for {
  16577. v1 = u
  16578. u--
  16579. if !(v1 != 0) {
  16580. break
  16581. }
  16582. n = *(*uint8)(unsafe.Pointer(data))
  16583. *(*uint8)(unsafe.Pointer(data)) = *(*uint8)(unsafe.Pointer(data + 1))
  16584. *(*uint8)(unsafe.Pointer(data + 1)) = n
  16585. data += 2
  16586. }
  16587. }
  16588. func XXftSwapImage(tls *libc.TLS, image uintptr) {
  16589. switch (*TXImage)(unsafe.Pointer(image)).Fbits_per_pixel {
  16590. case int32(32):
  16591. XXftSwapCARD32(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(2))
  16592. case int32(24):
  16593. XXftSwapCARD24(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line, (*TXImage)(unsafe.Pointer(image)).Fheight)
  16594. case int32(16):
  16595. XXftSwapCARD16(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(1))
  16596. default:
  16597. break
  16598. }
  16599. }
  16600. /* xftxlfd.c */
  16601. var _XftXlfdWeights = [6]TXftSymbolic{
  16602. 0: {
  16603. Fname: __ccgo_ts + 2170,
  16604. Fvalue: int32(m_FC_WEIGHT_LIGHT),
  16605. },
  16606. 1: {
  16607. Fname: __ccgo_ts + 2176,
  16608. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  16609. },
  16610. 2: {
  16611. Fname: __ccgo_ts + 2183,
  16612. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  16613. },
  16614. 3: {
  16615. Fname: __ccgo_ts + 2191,
  16616. Fvalue: int32(m_FC_WEIGHT_DEMIBOLD),
  16617. },
  16618. 4: {
  16619. Fname: __ccgo_ts + 2200,
  16620. Fvalue: int32(m_FC_WEIGHT_BOLD),
  16621. },
  16622. 5: {
  16623. Fname: __ccgo_ts + 2205,
  16624. Fvalue: int32(m_FC_WEIGHT_BLACK),
  16625. },
  16626. }
  16627. var _XftXlfdSlants = [3]TXftSymbolic{
  16628. 0: {
  16629. Fname: __ccgo_ts + 2211,
  16630. },
  16631. 1: {
  16632. Fname: __ccgo_ts + 2213,
  16633. Fvalue: int32(m_FC_SLANT_ITALIC),
  16634. },
  16635. 2: {
  16636. Fname: __ccgo_ts + 2215,
  16637. Fvalue: int32(m_FC_SLANT_OBLIQUE),
  16638. },
  16639. }
  16640. // C documentation
  16641. //
  16642. // /*
  16643. // * Cut out one XLFD field, placing it in 'save' and return
  16644. // * the start of 'save'
  16645. // */
  16646. func _XftSplitStr(tls *libc.TLS, field uintptr, save uintptr) (r uintptr) {
  16647. var c uint8
  16648. var s, v1, v2 uintptr
  16649. _, _, _, _ = c, s, v1, v2
  16650. s = save
  16651. for *(*uint8)(unsafe.Pointer(field)) != 0 {
  16652. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(field))) == int32('-') {
  16653. break
  16654. }
  16655. v1 = field
  16656. field++
  16657. c = *(*uint8)(unsafe.Pointer(v1))
  16658. v2 = save
  16659. save++
  16660. *(*uint8)(unsafe.Pointer(v2)) = c
  16661. }
  16662. *(*uint8)(unsafe.Pointer(save)) = uint8(0)
  16663. return s
  16664. }
  16665. /*
  16666. * convert one XLFD numeric field. Return -1 if the field is '*'
  16667. */
  16668. func _XftGetInt(tls *libc.TLS, ptr uintptr, val uintptr) (r uintptr) {
  16669. var v2 uintptr
  16670. _ = v2
  16671. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) == int32('*') {
  16672. *(*int32)(unsafe.Pointer(val)) = -int32(1)
  16673. ptr++
  16674. } else {
  16675. *(*int32)(unsafe.Pointer(val)) = 0
  16676. for {
  16677. if !(libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) >= int32('0') && libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) <= int32('9')) {
  16678. break
  16679. }
  16680. v2 = ptr
  16681. ptr++
  16682. *(*int32)(unsafe.Pointer(val)) = *(*int32)(unsafe.Pointer(val))*int32(10) + libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) - int32('0')
  16683. goto _1
  16684. _1:
  16685. }
  16686. }
  16687. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) == int32('-') {
  16688. return ptr
  16689. }
  16690. return libc.UintptrFromInt32(0)
  16691. }
  16692. func XXftXlfdParse(tls *libc.TLS, xlfd_orig uintptr, ignore_scalable TFcBool, complete TFcBool) (r uintptr) {
  16693. bp := tls.Alloc(16)
  16694. defer tls.Free(16)
  16695. var dpixel float64
  16696. 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
  16697. var slant_value, weight_value int32
  16698. var _ /* pixel at bp+0 */ int32
  16699. var _ /* point at bp+4 */ int32
  16700. var _ /* resx at bp+8 */ int32
  16701. var _ /* resy at bp+12 */ int32
  16702. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  16703. xlfd = xlfd_orig
  16704. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(xlfd))) != int32('-') {
  16705. return libc.UintptrFromInt32(0)
  16706. }
  16707. xlfd++
  16708. v3 = xlfd
  16709. v2 = v3
  16710. foundry = v2
  16711. v1 = libc.Xstrchr(tls, v2, int32('-'))
  16712. xlfd = v1
  16713. if !(v1 != 0) {
  16714. return libc.UintptrFromInt32(0)
  16715. }
  16716. xlfd++
  16717. v6 = xlfd
  16718. v5 = v6
  16719. family = v5
  16720. v4 = libc.Xstrchr(tls, v5, int32('-'))
  16721. xlfd = v4
  16722. if !(v4 != 0) {
  16723. return libc.UintptrFromInt32(0)
  16724. }
  16725. xlfd++
  16726. v9 = xlfd
  16727. v8 = v9
  16728. weight_name = v8
  16729. v7 = libc.Xstrchr(tls, v8, int32('-'))
  16730. xlfd = v7
  16731. if !(v7 != 0) {
  16732. return libc.UintptrFromInt32(0)
  16733. }
  16734. xlfd++
  16735. v12 = xlfd
  16736. v11 = v12
  16737. slant = v11
  16738. v10 = libc.Xstrchr(tls, v11, int32('-'))
  16739. xlfd = v10
  16740. if !(v10 != 0) {
  16741. return libc.UintptrFromInt32(0)
  16742. }
  16743. xlfd++
  16744. v14 = xlfd
  16745. v13 = libc.Xstrchr(tls, v14, int32('-'))
  16746. xlfd = v13
  16747. if !(v13 != 0) {
  16748. return libc.UintptrFromInt32(0)
  16749. }
  16750. xlfd++
  16751. v16 = xlfd
  16752. v15 = libc.Xstrchr(tls, v16, int32('-'))
  16753. xlfd = v15
  16754. if !(v15 != 0) {
  16755. return libc.UintptrFromInt32(0)
  16756. }
  16757. xlfd++
  16758. v18 = xlfd
  16759. v17 = _XftGetInt(tls, v18, bp)
  16760. xlfd = v17
  16761. if !(v17 != 0) {
  16762. return libc.UintptrFromInt32(0)
  16763. }
  16764. xlfd++
  16765. v20 = xlfd
  16766. v19 = _XftGetInt(tls, v20, bp+4)
  16767. xlfd = v19
  16768. if !(v19 != 0) {
  16769. return libc.UintptrFromInt32(0)
  16770. }
  16771. xlfd++
  16772. v22 = xlfd
  16773. v21 = _XftGetInt(tls, v22, bp+8)
  16774. xlfd = v21
  16775. if !(v21 != 0) {
  16776. return libc.UintptrFromInt32(0)
  16777. }
  16778. xlfd++
  16779. v24 = xlfd
  16780. v23 = _XftGetInt(tls, v24, bp+12)
  16781. xlfd = v23
  16782. if !(v23 != 0) {
  16783. return libc.UintptrFromInt32(0)
  16784. }
  16785. xlfd++
  16786. v26 = xlfd
  16787. v25 = libc.Xstrchr(tls, v26, int32('-'))
  16788. xlfd = v25
  16789. if !(v25 != 0) {
  16790. return libc.UintptrFromInt32(0)
  16791. }
  16792. xlfd++
  16793. v28 = xlfd
  16794. v27 = libc.Xstrchr(tls, v28, int32('-'))
  16795. xlfd = v27
  16796. if !(v27 != 0) {
  16797. return libc.UintptrFromInt32(0)
  16798. }
  16799. xlfd++
  16800. v30 = xlfd
  16801. v29 = libc.Xstrchr(tls, v30, int32('-'))
  16802. xlfd = v29
  16803. if !(v29 != 0) {
  16804. return libc.UintptrFromInt32(0)
  16805. }
  16806. /* make sure no fields follow this one */
  16807. xlfd++
  16808. v31 = xlfd
  16809. if libc.Xstrchr(tls, v31, int32('-')) != 0 {
  16810. return libc.UintptrFromInt32(0)
  16811. }
  16812. if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
  16813. return libc.UintptrFromInt32(0)
  16814. }
  16815. pat = libfontconfig.XFcPatternCreate(tls)
  16816. if !(pat != 0) {
  16817. return libc.UintptrFromInt32(0)
  16818. }
  16819. save = libc.Xmalloc(tls, libc.Xstrlen(tls, foundry)+uint64(1))
  16820. if !(save != 0) {
  16821. libfontconfig.XFcPatternDestroy(tls, pat)
  16822. return libc.UintptrFromInt32(0)
  16823. }
  16824. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2217, xlfd_orig) != 0) {
  16825. goto bail
  16826. }
  16827. _XftSplitStr(tls, foundry, save)
  16828. if *(*uint8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+2222) != 0 {
  16829. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2224, save) != 0) {
  16830. goto bail
  16831. }
  16832. }
  16833. _XftSplitStr(tls, family, save)
  16834. if *(*uint8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+2222) != 0 {
  16835. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2232, save) != 0) {
  16836. goto bail
  16837. }
  16838. }
  16839. weight_value = X_XftMatchSymbolic(tls, uintptr(unsafe.Pointer(&_XftXlfdWeights)), libc.Int32FromUint64(libc.Uint64FromInt64(96)/libc.Uint64FromInt64(16)), _XftSplitStr(tls, weight_name, save), int32(m_FC_WEIGHT_MEDIUM))
  16840. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+2239, weight_value) != 0) {
  16841. goto bail
  16842. }
  16843. slant_value = X_XftMatchSymbolic(tls, uintptr(unsafe.Pointer(&_XftXlfdSlants)), libc.Int32FromUint64(libc.Uint64FromInt64(48)/libc.Uint64FromInt64(16)), _XftSplitStr(tls, slant, save), m_FC_SLANT_ROMAN)
  16844. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+2246, slant_value) != 0) {
  16845. goto bail
  16846. }
  16847. dpixel = float64(*(*int32)(unsafe.Pointer(bp)))
  16848. if *(*int32)(unsafe.Pointer(bp + 4)) > 0 {
  16849. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+2252, float64(*(*int32)(unsafe.Pointer(bp + 4)))/float64(10)) != 0) {
  16850. goto bail
  16851. }
  16852. if *(*int32)(unsafe.Pointer(bp)) <= 0 && *(*int32)(unsafe.Pointer(bp + 12)) > 0 {
  16853. dpixel = float64(float64(*(*int32)(unsafe.Pointer(bp + 4)))*float64(*(*int32)(unsafe.Pointer(bp + 12)))) / float64(720)
  16854. }
  16855. }
  16856. if dpixel > libc.Float64FromInt32(0) {
  16857. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+1243, dpixel) != 0) {
  16858. goto bail
  16859. }
  16860. }
  16861. libc.Xfree(tls, save)
  16862. return pat
  16863. goto bail
  16864. bail:
  16865. ;
  16866. libc.Xfree(tls, save)
  16867. libfontconfig.XFcPatternDestroy(tls, pat)
  16868. return libc.UintptrFromInt32(0)
  16869. }
  16870. func __ccgo_fp(f interface{}) uintptr {
  16871. type iface [2]uintptr
  16872. return (*iface)(unsafe.Pointer(&f))[1]
  16873. }
  16874. /* xftxlfd.c */
  16875. var X_XftDisplayInfo uintptr
  16876. /* xftxlfd.c */
  16877. var X_XftFTlibrary TFT_Library
  16878. var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data
  16879. 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"