ccgo_linux_ppc64le.go 498 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761
  1. // Code generated for linux/ppc64le 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/debian/src/modernc.org/builder/.exclude/modernc.org/libfontconfig/include/linux/ppc64le -I /home/debian/src/modernc.org/builder/.exclude/modernc.org/libfreetype/include/linux/ppc64le -I /home/debian/src/modernc.org/builder/.exclude/modernc.org/libX11/include/linux/ppc64le -I /home/debian/src/modernc.org/builder/.exclude/modernc.org/libXrender/include/linux/ppc64le -lfontconfig -lfreetype -lX11 -lXrender -o libxft.go --package-name libxft src/.libs/libXft.a', DO NOT EDIT.
  2. //go:build linux && ppc64le
  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_COLL_WEIGHTS_MAX = 2
  92. const m_CPLastBit = 12
  93. const m_CURSORFONT = "cursor"
  94. const m_CapButt = 1
  95. const m_CapNotLast = 0
  96. const m_CapProjecting = 3
  97. const m_CapRound = 2
  98. const m_CenterGravity = 5
  99. const m_CirculateNotify = 26
  100. const m_CirculateRequest = 27
  101. const m_ClientMessage = 33
  102. const m_ClipByChildren = 0
  103. const m_ColormapInstalled = 1
  104. const m_ColormapNotify = 32
  105. const m_ColormapUninstalled = 0
  106. const m_Complex = 0
  107. const m_ConfigureNotify = 22
  108. const m_ConfigureRequest = 23
  109. const m_ControlMapIndex = 2
  110. const m_Convex = 2
  111. const m_CoordModeOrigin = 0
  112. const m_CoordModePrevious = 1
  113. const m_CopyFromParent = 0
  114. const m_CreateNotify = 16
  115. const m_CurrentTime = 0
  116. const m_CursorShape = 0
  117. const m_DELAYTIMER_MAX = 0x7fffffff
  118. const m_DefaultBlanking = 2
  119. const m_DefaultExposures = 2
  120. const m_DestroyAll = 0
  121. const m_DestroyNotify = 17
  122. const m_DirectColor = 5
  123. const m_DisableAccess = 0
  124. const m_DisableScreenInterval = 0
  125. const m_DisableScreenSaver = 0
  126. const m_DontAllowExposures = 0
  127. const m_DontCareState = 0
  128. const m_DontPreferBlanking = 0
  129. const m_E2BIG = 7
  130. const m_EACCES = 13
  131. const m_EADDRINUSE = 98
  132. const m_EADDRNOTAVAIL = 99
  133. const m_EADV = 68
  134. const m_EAFNOSUPPORT = 97
  135. const m_EAGAIN = 11
  136. const m_EALREADY = 114
  137. const m_EBADE = 52
  138. const m_EBADF = 9
  139. const m_EBADFD = 77
  140. const m_EBADMSG = 74
  141. const m_EBADR = 53
  142. const m_EBADRQC = 56
  143. const m_EBADSLT = 57
  144. const m_EBFONT = 59
  145. const m_EBUSY = 16
  146. const m_ECANCELED = 125
  147. const m_ECHILD = 10
  148. const m_ECHRNG = 44
  149. const m_ECOMM = 70
  150. const m_ECONNABORTED = 103
  151. const m_ECONNREFUSED = 111
  152. const m_ECONNRESET = 104
  153. const m_EDEADLK = 35
  154. const m_EDEADLOCK = 58
  155. const m_EDESTADDRREQ = 89
  156. const m_EDOM = 33
  157. const m_EDOTDOT = 73
  158. const m_EDQUOT = 122
  159. const m_EEXIST = 17
  160. const m_EFAULT = 14
  161. const m_EFBIG = 27
  162. const m_EHOSTDOWN = 112
  163. const m_EHOSTUNREACH = 113
  164. const m_EHWPOISON = 133
  165. const m_EIDRM = 43
  166. const m_EILSEQ = 84
  167. const m_EINPROGRESS = 115
  168. const m_EINTR = 4
  169. const m_EINVAL = 22
  170. const m_EIO = 5
  171. const m_EISCONN = 106
  172. const m_EISDIR = 21
  173. const m_EISNAM = 120
  174. const m_EKEYEXPIRED = 127
  175. const m_EKEYREJECTED = 129
  176. const m_EKEYREVOKED = 128
  177. const m_EL2HLT = 51
  178. const m_EL2NSYNC = 45
  179. const m_EL3HLT = 46
  180. const m_EL3RST = 47
  181. const m_ELIBACC = 79
  182. const m_ELIBBAD = 80
  183. const m_ELIBEXEC = 83
  184. const m_ELIBMAX = 82
  185. const m_ELIBSCN = 81
  186. const m_ELNRNG = 48
  187. const m_ELOOP = 40
  188. const m_EMEDIUMTYPE = 124
  189. const m_EMFILE = 24
  190. const m_EMLINK = 31
  191. const m_EMSGSIZE = 90
  192. const m_EMULTIHOP = 72
  193. const m_ENAMETOOLONG = 36
  194. const m_ENAVAIL = 119
  195. const m_ENETDOWN = 100
  196. const m_ENETRESET = 102
  197. const m_ENETUNREACH = 101
  198. const m_ENFILE = 23
  199. const m_ENOANO = 55
  200. const m_ENOBUFS = 105
  201. const m_ENOCSI = 50
  202. const m_ENODATA = 61
  203. const m_ENODEV = 19
  204. const m_ENOENT = 2
  205. const m_ENOEXEC = 8
  206. const m_ENOKEY = 126
  207. const m_ENOLCK = 37
  208. const m_ENOLINK = 67
  209. const m_ENOMEDIUM = 123
  210. const m_ENOMEM = 12
  211. const m_ENOMSG = 42
  212. const m_ENONET = 64
  213. const m_ENOPKG = 65
  214. const m_ENOPROTOOPT = 92
  215. const m_ENOSPC = 28
  216. const m_ENOSR = 63
  217. const m_ENOSTR = 60
  218. const m_ENOSYS = 38
  219. const m_ENOTBLK = 15
  220. const m_ENOTCONN = 107
  221. const m_ENOTDIR = 20
  222. const m_ENOTEMPTY = 39
  223. const m_ENOTNAM = 118
  224. const m_ENOTRECOVERABLE = 131
  225. const m_ENOTSOCK = 88
  226. const m_ENOTSUP = "EOPNOTSUPP"
  227. const m_ENOTTY = 25
  228. const m_ENOTUNIQ = 76
  229. const m_ENXIO = 6
  230. const m_EOPNOTSUPP = 95
  231. const m_EOVERFLOW = 75
  232. const m_EOWNERDEAD = 130
  233. const m_EPERM = 1
  234. const m_EPFNOSUPPORT = 96
  235. const m_EPIPE = 32
  236. const m_EPROTO = 71
  237. const m_EPROTONOSUPPORT = 93
  238. const m_EPROTOTYPE = 91
  239. const m_ERANGE = 34
  240. const m_EREMCHG = 78
  241. const m_EREMOTE = 66
  242. const m_EREMOTEIO = 121
  243. const m_ERESTART = 85
  244. const m_ERFKILL = 132
  245. const m_EROFS = 30
  246. const m_ESHUTDOWN = 108
  247. const m_ESOCKTNOSUPPORT = 94
  248. const m_ESPIPE = 29
  249. const m_ESRCH = 3
  250. const m_ESRMNT = 69
  251. const m_ESTALE = 116
  252. const m_ESTRPIPE = 86
  253. const m_ETIME = 62
  254. const m_ETIMEDOUT = 110
  255. const m_ETOOMANYREFS = 109
  256. const m_ETXTBSY = 26
  257. const m_EUCLEAN = 117
  258. const m_EUNATCH = 49
  259. const m_EUSERS = 87
  260. const m_EWOULDBLOCK = "EAGAIN"
  261. const m_EXDEV = 18
  262. const m_EXFULL = 54
  263. const m_EXIT_FAILURE = 1
  264. const m_EXIT_SUCCESS = 0
  265. const m_EXPR_NEST_MAX = 32
  266. const m_EastGravity = 6
  267. const m_EnableAccess = 1
  268. const m_EnterNotify = 7
  269. const m_EvenOddRule = 0
  270. const m_Expose = 12
  271. const m_FARCSPERBATCH = 256
  272. const m_FC_ANTIALIAS = "antialias"
  273. const m_FC_ASPECT = "aspect"
  274. const m_FC_AUTOHINT = "autohint"
  275. const m_FC_CACHE_VERSION_NUMBER = 7
  276. const m_FC_CAPABILITY = "capability"
  277. const m_FC_CHARCELL = 110
  278. const m_FC_CHARSET = "charset"
  279. const m_FC_CHARWIDTH = "charwidth"
  280. const m_FC_CHAR_HEIGHT = "charheight"
  281. const m_FC_CHAR_WIDTH = "FC_CHARWIDTH"
  282. const m_FC_COLOR = "color"
  283. const m_FC_DECORATIVE = "decorative"
  284. const m_FC_DPI = "dpi"
  285. const m_FC_DUAL = 90
  286. const m_FC_EMBEDDED_BITMAP = "embeddedbitmap"
  287. const m_FC_EMBOLDEN = "embolden"
  288. const m_FC_FAMILY = "family"
  289. const m_FC_FAMILYLANG = "familylang"
  290. const m_FC_FILE = "file"
  291. const m_FC_FONTFORMAT = "fontformat"
  292. const m_FC_FONTVERSION = "fontversion"
  293. const m_FC_FONT_FEATURES = "fontfeatures"
  294. const m_FC_FONT_VARIATIONS = "fontvariations"
  295. const m_FC_FOUNDRY = "foundry"
  296. const m_FC_FT_FACE = "ftface"
  297. const m_FC_FULLNAME = "fullname"
  298. const m_FC_FULLNAMELANG = "fullnamelang"
  299. const m_FC_GLOBAL_ADVANCE = "globaladvance"
  300. const m_FC_HASH = "hash"
  301. const m_FC_HINTING = "hinting"
  302. const m_FC_HINT_FULL = 3
  303. const m_FC_HINT_MEDIUM = 2
  304. const m_FC_HINT_NONE = 0
  305. const m_FC_HINT_SLIGHT = 1
  306. const m_FC_HINT_STYLE = "hintstyle"
  307. const m_FC_INDEX = "index"
  308. const m_FC_LANG = "lang"
  309. const m_FC_LCD_DEFAULT = 1
  310. const m_FC_LCD_FILTER = "lcdfilter"
  311. const m_FC_LCD_LEGACY = 3
  312. const m_FC_LCD_LIGHT = 2
  313. const m_FC_LCD_NONE = 0
  314. const m_FC_MAJOR = 2
  315. const m_FC_MATRIX = "matrix"
  316. const m_FC_MINOR = 13
  317. const m_FC_MINSPACE = "minspace"
  318. const m_FC_MONO = 100
  319. const m_FC_NAMELANG = "namelang"
  320. const m_FC_OUTLINE = "outline"
  321. const m_FC_PIXEL_SIZE = "pixelsize"
  322. const m_FC_POSTSCRIPT_NAME = "postscriptname"
  323. const m_FC_PRGNAME = "prgname"
  324. const m_FC_PROPORTIONAL = 0
  325. const m_FC_RASTERIZER = "rasterizer"
  326. const m_FC_REVISION = 1
  327. const m_FC_RGBA = "rgba"
  328. const m_FC_RGBA_BGR = 2
  329. const m_FC_RGBA_NONE = 5
  330. const m_FC_RGBA_RGB = 1
  331. const m_FC_RGBA_UNKNOWN = 0
  332. const m_FC_RGBA_VBGR = 4
  333. const m_FC_RGBA_VRGB = 3
  334. const m_FC_SCALABLE = "scalable"
  335. const m_FC_SCALE = "scale"
  336. const m_FC_SIZE = "size"
  337. const m_FC_SLANT = "slant"
  338. const m_FC_SLANT_ITALIC = 100
  339. const m_FC_SLANT_OBLIQUE = 110
  340. const m_FC_SLANT_ROMAN = 0
  341. const m_FC_SOURCE = "source"
  342. const m_FC_SPACING = "spacing"
  343. const m_FC_STYLE = "style"
  344. const m_FC_STYLELANG = "stylelang"
  345. const m_FC_SYMBOL = "symbol"
  346. const m_FC_UTF8_MAX_LEN = 6
  347. const m_FC_VARIABLE = "variable"
  348. const m_FC_VERTICAL_LAYOUT = "verticallayout"
  349. const m_FC_WEIGHT = "weight"
  350. const m_FC_WEIGHT_BLACK = 210
  351. const m_FC_WEIGHT_BOLD = 200
  352. const m_FC_WEIGHT_BOOK = 75
  353. const m_FC_WEIGHT_DEMIBOLD = 180
  354. const m_FC_WEIGHT_DEMILIGHT = 55
  355. const m_FC_WEIGHT_EXTRABLACK = 215
  356. const m_FC_WEIGHT_EXTRABOLD = 205
  357. const m_FC_WEIGHT_EXTRALIGHT = 40
  358. const m_FC_WEIGHT_HEAVY = "FC_WEIGHT_BLACK"
  359. const m_FC_WEIGHT_LIGHT = 50
  360. const m_FC_WEIGHT_MEDIUM = 100
  361. const m_FC_WEIGHT_NORMAL = "FC_WEIGHT_REGULAR"
  362. const m_FC_WEIGHT_REGULAR = 80
  363. const m_FC_WEIGHT_SEMIBOLD = "FC_WEIGHT_DEMIBOLD"
  364. const m_FC_WEIGHT_SEMILIGHT = "FC_WEIGHT_DEMILIGHT"
  365. const m_FC_WEIGHT_THIN = 0
  366. const m_FC_WEIGHT_ULTRABLACK = "FC_WEIGHT_EXTRABLACK"
  367. const m_FC_WEIGHT_ULTRABOLD = "FC_WEIGHT_EXTRABOLD"
  368. const m_FC_WEIGHT_ULTRALIGHT = "FC_WEIGHT_EXTRALIGHT"
  369. const m_FC_WIDTH = "width"
  370. const m_FC_WIDTH_CONDENSED = 75
  371. const m_FC_WIDTH_EXPANDED = 125
  372. const m_FC_WIDTH_EXTRACONDENSED = 63
  373. const m_FC_WIDTH_EXTRAEXPANDED = 150
  374. const m_FC_WIDTH_NORMAL = 100
  375. const m_FC_WIDTH_SEMICONDENSED = 87
  376. const m_FC_WIDTH_SEMIEXPANDED = 113
  377. const m_FC_WIDTH_ULTRACONDENSED = 50
  378. const m_FC_WIDTH_ULTRAEXPANDED = 200
  379. const m_FD_SETSIZE = 1024
  380. const m_FILENAME_MAX = 4096
  381. const m_FILESIZEBITS = 64
  382. const m_FOPEN_MAX = 1000
  383. const m_FRCTSPERBATCH = 256
  384. const m_FREETYPE_MAJOR = 2
  385. const m_FREETYPE_MINOR = 10
  386. const m_FREETYPE_PATCH = 4
  387. const m_FT_AUTOHINTER_H = "FT_DRIVER_H"
  388. const m_FT_CACHE_CHARMAP_H = "FT_CACHE_H"
  389. const m_FT_CACHE_IMAGE_H = "FT_CACHE_H"
  390. const m_FT_CACHE_INTERNAL_CACHE_H = "FT_CACHE_H"
  391. const m_FT_CACHE_INTERNAL_GLYPH_H = "FT_CACHE_H"
  392. const m_FT_CACHE_INTERNAL_IMAGE_H = "FT_CACHE_H"
  393. const m_FT_CACHE_INTERNAL_MANAGER_H = "FT_CACHE_H"
  394. const m_FT_CACHE_INTERNAL_MRU_H = "FT_CACHE_H"
  395. const m_FT_CACHE_INTERNAL_SBITS_H = "FT_CACHE_H"
  396. const m_FT_CACHE_MANAGER_H = "FT_CACHE_H"
  397. const m_FT_CACHE_SMALL_BITMAPS_H = "FT_CACHE_H"
  398. const m_FT_CFF_DRIVER_H = "FT_DRIVER_H"
  399. const m_FT_CHAR_BIT = "CHAR_BIT"
  400. const m_FT_CURVE_TAG_CONIC = 0x00
  401. const m_FT_CURVE_TAG_CUBIC = 0x02
  402. const m_FT_CURVE_TAG_HAS_SCANMODE = 0x04
  403. const m_FT_CURVE_TAG_ON = 0x01
  404. const m_FT_CURVE_TAG_TOUCH_X = 0x08
  405. const m_FT_CURVE_TAG_TOUCH_Y = 0x10
  406. const m_FT_Curve_Tag_Conic = "FT_CURVE_TAG_CONIC"
  407. const m_FT_Curve_Tag_Cubic = "FT_CURVE_TAG_CUBIC"
  408. const m_FT_Curve_Tag_On = "FT_CURVE_TAG_ON"
  409. const m_FT_Curve_Tag_Touch_X = "FT_CURVE_TAG_TOUCH_X"
  410. const m_FT_Curve_Tag_Touch_Y = "FT_CURVE_TAG_TOUCH_Y"
  411. const m_FT_FILE = "FILE"
  412. const m_FT_FSTYPE_BITMAP_EMBEDDING_ONLY = 0x0200
  413. const m_FT_FSTYPE_EDITABLE_EMBEDDING = 0x0008
  414. const m_FT_FSTYPE_INSTALLABLE_EMBEDDING = 0x0000
  415. const m_FT_FSTYPE_NO_SUBSETTING = 0x0100
  416. const m_FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING = 0x0004
  417. const m_FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING = 0x0002
  418. const m_FT_INT64 = "long"
  419. const m_FT_INT_MAX = "INT_MAX"
  420. const m_FT_INT_MIN = "INT_MIN"
  421. const m_FT_LOAD_DEFAULT = 0x0
  422. const m_FT_LONG_MAX = "LONG_MAX"
  423. const m_FT_LONG_MIN = "LONG_MIN"
  424. const m_FT_MAX_MODULES = 32
  425. const m_FT_OPEN_DRIVER = 0x8
  426. const m_FT_OPEN_MEMORY = 0x1
  427. const m_FT_OPEN_PARAMS = 0x10
  428. const m_FT_OPEN_PATHNAME = 0x4
  429. const m_FT_OPEN_STREAM = 0x2
  430. const m_FT_OUTLINE_CONTOURS_MAX = "SHRT_MAX"
  431. const m_FT_OUTLINE_EVEN_ODD_FILL = 0x2
  432. const m_FT_OUTLINE_HIGH_PRECISION = 0x100
  433. const m_FT_OUTLINE_IGNORE_DROPOUTS = 0x8
  434. const m_FT_OUTLINE_INCLUDE_STUBS = 0x20
  435. const m_FT_OUTLINE_NONE = 0x0
  436. const m_FT_OUTLINE_OVERLAP = 0x40
  437. const m_FT_OUTLINE_OWNER = 0x1
  438. const m_FT_OUTLINE_POINTS_MAX = "SHRT_MAX"
  439. const m_FT_OUTLINE_REVERSE_FILL = 0x4
  440. const m_FT_OUTLINE_SINGLE_PASS = 0x200
  441. const m_FT_OUTLINE_SMART_DROPOUTS = 0x10
  442. const m_FT_Outline_ConicTo_Func = "FT_Outline_ConicToFunc"
  443. const m_FT_Outline_CubicTo_Func = "FT_Outline_CubicToFunc"
  444. const m_FT_Outline_LineTo_Func = "FT_Outline_LineToFunc"
  445. const m_FT_Outline_MoveTo_Func = "FT_Outline_MoveToFunc"
  446. const m_FT_PCF_DRIVER_H = "FT_DRIVER_H"
  447. const m_FT_RASTER_FLAG_AA = 0x1
  448. const m_FT_RASTER_FLAG_CLIP = 0x4
  449. const m_FT_RASTER_FLAG_DEFAULT = 0x0
  450. const m_FT_RASTER_FLAG_DIRECT = 0x2
  451. const m_FT_RENDER_POOL_SIZE = 16384
  452. const m_FT_Raster_Done_Func = "FT_Raster_DoneFunc"
  453. const m_FT_Raster_New_Func = "FT_Raster_NewFunc"
  454. const m_FT_Raster_Render_Func = "FT_Raster_RenderFunc"
  455. const m_FT_Raster_Reset_Func = "FT_Raster_ResetFunc"
  456. const m_FT_Raster_Set_Mode_Func = "FT_Raster_SetModeFunc"
  457. const m_FT_Raster_Span_Func = "FT_SpanFunc"
  458. const m_FT_SUBGLYPH_FLAG_2X2 = 0x80
  459. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS = 1
  460. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES = 2
  461. const m_FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID = 4
  462. const m_FT_SUBGLYPH_FLAG_SCALE = 8
  463. const m_FT_SUBGLYPH_FLAG_USE_MY_METRICS = 0x200
  464. const m_FT_SUBGLYPH_FLAG_XY_SCALE = 0x40
  465. const m_FT_TRUETYPE_DRIVER_H = "FT_DRIVER_H"
  466. const m_FT_UINT_MAX = "UINT_MAX"
  467. const m_FT_ULONG_MAX = "ULONG_MAX"
  468. const m_FT_USHORT_MAX = "USHRT_MAX"
  469. const m_FT_XFREE86_H = "FT_FONT_FORMATS_H"
  470. const m_FUNCPROTO = 15
  471. const m_False = 0
  472. const m_FamilyChaos = 2
  473. const m_FamilyDECnet = 1
  474. const m_FamilyInternet = 0
  475. const m_FamilyInternet6 = 6
  476. const m_FamilyServerInterpreted = 5
  477. const m_FcConfigGetRescanInverval = "FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval"
  478. const m_FcConfigSetRescanInverval = "FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval"
  479. const m_FcDontCare = 2
  480. const m_FcFalse = 0
  481. const m_FcTrue = 1
  482. const m_FillOpaqueStippled = 3
  483. const m_FillSolid = 0
  484. const m_FillStippled = 2
  485. const m_FillTiled = 1
  486. const m_FilterBest = "best"
  487. const m_FilterBilinear = "bilinear"
  488. const m_FilterConvolution = "convolution"
  489. const m_FilterFast = "fast"
  490. const m_FilterGood = "good"
  491. const m_FilterNearest = "nearest"
  492. const m_FirstExtensionError = 128
  493. const m_FocusIn = 9
  494. const m_FocusOut = 10
  495. const m_FontChange = 255
  496. const m_FontLeftToRight = 0
  497. const m_FontRightToLeft = 1
  498. const m_ForgetGravity = 0
  499. const m_GCLastBit = 22
  500. const m_GXand = 0x1
  501. const m_GXandInverted = 0x4
  502. const m_GXandReverse = 0x2
  503. const m_GXclear = 0x0
  504. const m_GXcopy = 0x3
  505. const m_GXcopyInverted = 0xc
  506. const m_GXequiv = 0x9
  507. const m_GXinvert = 0xa
  508. const m_GXnand = 0xe
  509. const m_GXnoop = 0x5
  510. const m_GXnor = 0x8
  511. const m_GXor = 0x7
  512. const m_GXorInverted = 0xd
  513. const m_GXorReverse = 0xb
  514. const m_GXset = 0xf
  515. const m_GXxor = 0x6
  516. const m_GenericEvent = 35
  517. const m_GrabFrozen = 4
  518. const m_GrabInvalidTime = 2
  519. const m_GrabModeAsync = 1
  520. const m_GrabModeSync = 0
  521. const m_GrabNotViewable = 3
  522. const m_GrabSuccess = 0
  523. const m_GraphicsExpose = 13
  524. const m_GravityNotify = 24
  525. const m_GrayScale = 1
  526. const m_HAVE_CONFIG_H = 1
  527. const m_HAVE_DLFCN_H = 1
  528. const m_HAVE_INTTYPES_H = 1
  529. const m_HAVE_MEMORY_H = 1
  530. const m_HAVE_STDINT_H = 1
  531. const m_HAVE_STDLIB_H = 1
  532. const m_HAVE_STRINGS_H = 1
  533. const m_HAVE_STRING_H = 1
  534. const m_HAVE_SYS_STAT_H = 1
  535. const m_HAVE_SYS_TYPES_H = 1
  536. const m_HAVE_UNISTD_H = 1
  537. const m_HOST_NAME_MAX = 255
  538. const m_HeightValue = 0x0008
  539. const m_HostDelete = 1
  540. const m_HostInsert = 0
  541. const m_INT16_MAX = 0x7fff
  542. const m_INT32_MAX = 0x7fffffff
  543. const m_INT64_MAX = 0x7fffffffffffffff
  544. const m_INT8_MAX = 0x7f
  545. const m_INTMAX_MAX = "INT64_MAX"
  546. const m_INTMAX_MIN = "INT64_MIN"
  547. const m_INTPTR_MAX = "INT64_MAX"
  548. const m_INTPTR_MIN = "INT64_MIN"
  549. const m_INT_FAST16_MAX = "INT32_MAX"
  550. const m_INT_FAST16_MIN = "INT32_MIN"
  551. const m_INT_FAST32_MAX = "INT32_MAX"
  552. const m_INT_FAST32_MIN = "INT32_MIN"
  553. const m_INT_FAST64_MAX = "INT64_MAX"
  554. const m_INT_FAST64_MIN = "INT64_MIN"
  555. const m_INT_FAST8_MAX = "INT8_MAX"
  556. const m_INT_FAST8_MIN = "INT8_MIN"
  557. const m_INT_LEAST16_MAX = "INT16_MAX"
  558. const m_INT_LEAST16_MIN = "INT16_MIN"
  559. const m_INT_LEAST32_MAX = "INT32_MAX"
  560. const m_INT_LEAST32_MIN = "INT32_MIN"
  561. const m_INT_LEAST64_MAX = "INT64_MAX"
  562. const m_INT_LEAST64_MIN = "INT64_MIN"
  563. const m_INT_LEAST8_MAX = "INT8_MAX"
  564. const m_INT_LEAST8_MIN = "INT8_MIN"
  565. const m_INT_MAX = 2147483647
  566. const m_IOV_MAX = 1024
  567. const m_IconicState = 3
  568. const m_InactiveState = 4
  569. const m_IncludeInferiors = 1
  570. const m_InputFocus = 1
  571. const m_InputOnly = 2
  572. const m_InputOutput = 1
  573. const m_IsUnmapped = 0
  574. const m_IsUnviewable = 1
  575. const m_IsViewable = 2
  576. const m_JoinBevel = 2
  577. const m_JoinMiter = 0
  578. const m_JoinRound = 1
  579. const m_KeyPress = 2
  580. const m_KeyRelease = 3
  581. const m_KeymapNotify = 11
  582. const m_LASTEvent = 36
  583. const m_LINE_MAX = 4096
  584. const m_LITTLE_ENDIAN = "__LITTLE_ENDIAN"
  585. const m_LLONG_MAX = 0x7fffffffffffffff
  586. const m_LOCKED = 1
  587. const m_LOGIN_NAME_MAX = 256
  588. const m_LONG_BIT = 64
  589. const m_LONG_MAX = "__LONG_MAX"
  590. const m_LSBFirst = 0
  591. const m_LT_OBJDIR = ".libs/"
  592. const m_L_ctermid = 20
  593. const m_L_cuserid = 20
  594. const m_L_tmpnam = 20
  595. const m_LastExtensionError = 255
  596. const m_LeaveNotify = 8
  597. const m_LedModeOff = 0
  598. const m_LedModeOn = 1
  599. const m_LineDoubleDash = 2
  600. const m_LineOnOffDash = 1
  601. const m_LineSolid = 0
  602. const m_LockMapIndex = 1
  603. const m_LowerHighest = 1
  604. const m_MB_LEN_MAX = 4
  605. const m_MQ_PRIO_MAX = 32768
  606. const m_MSBFirst = 1
  607. const m_MapNotify = 19
  608. const m_MapRequest = 20
  609. const m_MappingBusy = 1
  610. const m_MappingFailed = 2
  611. const m_MappingKeyboard = 1
  612. const m_MappingModifier = 0
  613. const m_MappingNotify = 34
  614. const m_MappingPointer = 2
  615. const m_MappingSuccess = 0
  616. const m_Mod1MapIndex = 3
  617. const m_Mod2MapIndex = 4
  618. const m_Mod3MapIndex = 5
  619. const m_Mod4MapIndex = 6
  620. const m_Mod5MapIndex = 7
  621. const m_MotionNotify = 6
  622. const m_NAME_MAX = 255
  623. const m_NDEBUG = 1
  624. const m_NGROUPS_MAX = 32
  625. const m_NL_ARGMAX = 9
  626. const m_NL_LANGMAX = 32
  627. const m_NL_MSGMAX = 32767
  628. const m_NL_NMAX = 16
  629. const m_NL_SETMAX = 255
  630. const m_NL_TEXTMAX = 2048
  631. const m_NZERO = 20
  632. const m_NeedFunctionPrototypes = 1
  633. const m_NeedNestedPrototypes = 1
  634. const m_NeedVarargsPrototypes = 1
  635. const m_NeedWidePrototypes = 0
  636. const m_NoEventMask = 0
  637. const m_NoExpose = 14
  638. const m_NoSymbol = 0
  639. const m_NoValue = 0x0000
  640. const m_Nonconvex = 1
  641. const m_None = 0
  642. const m_NormalState = 1
  643. const m_NorthEastGravity = 3
  644. const m_NorthGravity = 2
  645. const m_NorthWestGravity = 1
  646. const m_NotUseful = 0
  647. const m_NotifyAncestor = 0
  648. const m_NotifyDetailNone = 7
  649. const m_NotifyGrab = 1
  650. const m_NotifyHint = 1
  651. const m_NotifyInferior = 2
  652. const m_NotifyNonlinear = 3
  653. const m_NotifyNonlinearVirtual = 4
  654. const m_NotifyNormal = 0
  655. const m_NotifyPointer = 5
  656. const m_NotifyPointerRoot = 6
  657. const m_NotifyUngrab = 2
  658. const m_NotifyVirtual = 1
  659. const m_NotifyWhileGrabbed = 3
  660. const m_Opposite = 4
  661. const m_PACKAGE = "libXft"
  662. const m_PACKAGE_BUGREPORT = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg"
  663. const m_PACKAGE_NAME = "libXft"
  664. const m_PACKAGE_STRING = "libXft 2.3.2"
  665. const m_PACKAGE_TARNAME = "libXft"
  666. const m_PACKAGE_URL = ""
  667. const m_PACKAGE_VERSION = "2.3.2"
  668. const m_PACKAGE_VERSION_MAJOR = 2
  669. const m_PACKAGE_VERSION_MINOR = 3
  670. const m_PACKAGE_VERSION_PATCHLEVEL = 2
  671. const m_PATH_MAX = 4096
  672. const m_PDP_ENDIAN = "__PDP_ENDIAN"
  673. const m_PIPE_BUF = 4096
  674. const m_PTHREAD_DESTRUCTOR_ITERATIONS = 4
  675. const m_PTHREAD_KEYS_MAX = 128
  676. const m_PTHREAD_STACK_MIN = 2048
  677. const m_PTRDIFF_MAX = "INT64_MAX"
  678. const m_PTRDIFF_MIN = "INT64_MIN"
  679. const m_PTSPERBATCH = 1024
  680. const m_P_tmpdir = "/tmp"
  681. const m_ParentRelative = 1
  682. const m_PictOpAdd = 12
  683. const m_PictOpAtop = 9
  684. const m_PictOpAtopReverse = 10
  685. const m_PictOpBlendMaximum = 0x3e
  686. const m_PictOpBlendMinimum = 0x30
  687. const m_PictOpClear = 0
  688. const m_PictOpColorBurn = 0x36
  689. const m_PictOpColorDodge = 0x35
  690. const m_PictOpConjointAtop = 0x29
  691. const m_PictOpConjointAtopReverse = 0x2a
  692. const m_PictOpConjointClear = 0x20
  693. const m_PictOpConjointDst = 0x22
  694. const m_PictOpConjointIn = 0x25
  695. const m_PictOpConjointInReverse = 0x26
  696. const m_PictOpConjointMaximum = 0x2b
  697. const m_PictOpConjointMinimum = 0x20
  698. const m_PictOpConjointOut = 0x27
  699. const m_PictOpConjointOutReverse = 0x28
  700. const m_PictOpConjointOver = 0x23
  701. const m_PictOpConjointOverReverse = 0x24
  702. const m_PictOpConjointSrc = 0x21
  703. const m_PictOpConjointXor = 0x2b
  704. const m_PictOpDarken = 0x33
  705. const m_PictOpDifference = 0x39
  706. const m_PictOpDisjointAtop = 0x19
  707. const m_PictOpDisjointAtopReverse = 0x1a
  708. const m_PictOpDisjointClear = 0x10
  709. const m_PictOpDisjointDst = 0x12
  710. const m_PictOpDisjointIn = 0x15
  711. const m_PictOpDisjointInReverse = 0x16
  712. const m_PictOpDisjointMaximum = 0x1b
  713. const m_PictOpDisjointMinimum = 0x10
  714. const m_PictOpDisjointOut = 0x17
  715. const m_PictOpDisjointOutReverse = 0x18
  716. const m_PictOpDisjointOver = 0x13
  717. const m_PictOpDisjointOverReverse = 0x14
  718. const m_PictOpDisjointSrc = 0x11
  719. const m_PictOpDisjointXor = 0x1b
  720. const m_PictOpDst = 2
  721. const m_PictOpExclusion = 0x3a
  722. const m_PictOpHSLColor = 0x3d
  723. const m_PictOpHSLHue = 0x3b
  724. const m_PictOpHSLLuminosity = 0x3e
  725. const m_PictOpHSLSaturation = 0x3c
  726. const m_PictOpHardLight = 0x37
  727. const m_PictOpIn = 5
  728. const m_PictOpInReverse = 6
  729. const m_PictOpLighten = 0x34
  730. const m_PictOpMaximum = 13
  731. const m_PictOpMinimum = 0
  732. const m_PictOpMultiply = 0x30
  733. const m_PictOpOut = 7
  734. const m_PictOpOutReverse = 8
  735. const m_PictOpOver = 3
  736. const m_PictOpOverReverse = 4
  737. const m_PictOpOverlay = 0x32
  738. const m_PictOpSaturate = 13
  739. const m_PictOpScreen = 0x31
  740. const m_PictOpSoftLight = 0x38
  741. const m_PictOpSrc = 1
  742. const m_PictOpXor = 11
  743. const m_PictStandardA1 = 4
  744. const m_PictStandardA4 = 3
  745. const m_PictStandardA8 = 2
  746. const m_PictStandardARGB32 = 0
  747. const m_PictStandardNUM = 5
  748. const m_PictStandardRGB24 = 1
  749. const m_PictTypeDirect = 1
  750. const m_PictTypeIndexed = 0
  751. const m_PlaceOnBottom = 1
  752. const m_PlaceOnTop = 0
  753. const m_PointerRoot = 1
  754. const m_PointerWindow = 0
  755. const m_PolyEdgeSharp = 0
  756. const m_PolyEdgeSmooth = 1
  757. const m_PolyModeImprecise = 1
  758. const m_PolyModePrecise = 0
  759. const m_PreferBlanking = 1
  760. const m_PropModeAppend = 2
  761. const m_PropModePrepend = 1
  762. const m_PropModeReplace = 0
  763. const m_PropertyDelete = 1
  764. const m_PropertyNewValue = 0
  765. const m_PropertyNotify = 28
  766. const m_PseudoColor = 3
  767. const m_QueuedAfterFlush = 2
  768. const m_QueuedAfterReading = 1
  769. const m_QueuedAlready = 0
  770. const m_RAND_MAX = 0x7fffffff
  771. const m_RENDER_MAJOR = 0
  772. const m_RENDER_MINOR = 11
  773. const m_RENDER_NAME = "RENDER"
  774. const m_RE_DUP_MAX = 255
  775. const m_RaiseLowest = 0
  776. const m_RectangleIn = 1
  777. const m_RectangleOut = 0
  778. const m_RectanglePart = 2
  779. const m_ReparentNotify = 21
  780. const m_RepeatNone = 0
  781. const m_RepeatNormal = 1
  782. const m_RepeatPad = 2
  783. const m_RepeatReflect = 3
  784. const m_ReplayKeyboard = 5
  785. const m_ReplayPointer = 2
  786. const m_ResizeRequest = 25
  787. const m_RetainPermanent = 1
  788. const m_RetainTemporary = 2
  789. const m_RevertToParent = 2
  790. const m_SCHAR_MAX = 127
  791. const m_SEM_NSEMS_MAX = 256
  792. const m_SEM_VALUE_MAX = 0x7fffffff
  793. const m_SHRT_MAX = 0x7fff
  794. const m_SIG_ATOMIC_MAX = "INT32_MAX"
  795. const m_SIG_ATOMIC_MIN = "INT32_MIN"
  796. const m_SIZE_MAX = "UINT64_MAX"
  797. const m_SSIZE_MAX = "LONG_MAX"
  798. const m_STATX_ALL = 0xfff
  799. const m_STATX_ATIME = 0x20
  800. const m_STATX_BASIC_STATS = 0x7ff
  801. const m_STATX_BLOCKS = 0x400
  802. const m_STATX_BTIME = 0x800
  803. const m_STATX_CTIME = 0x80
  804. const m_STATX_GID = 0x10
  805. const m_STATX_INO = 0x100
  806. const m_STATX_MODE = 2
  807. const m_STATX_MTIME = 0x40
  808. const m_STATX_NLINK = 4
  809. const m_STATX_SIZE = 0x200
  810. const m_STATX_TYPE = 1
  811. const m_STATX_UID = 8
  812. const m_STDC_HEADERS = 1
  813. const m_SYMLOOP_MAX = 40
  814. const m_S_IEXEC = "S_IXUSR"
  815. const m_S_IFBLK = 0060000
  816. const m_S_IFCHR = 0020000
  817. const m_S_IFDIR = 0040000
  818. const m_S_IFIFO = 0010000
  819. const m_S_IFLNK = 0120000
  820. const m_S_IFMT = 0170000
  821. const m_S_IFREG = 0100000
  822. const m_S_IFSOCK = 0140000
  823. const m_S_IREAD = "S_IRUSR"
  824. const m_S_IRGRP = 0040
  825. const m_S_IROTH = 0004
  826. const m_S_IRUSR = 0400
  827. const m_S_IRWXG = 0070
  828. const m_S_IRWXO = 0007
  829. const m_S_IRWXU = 0700
  830. const m_S_ISGID = 02000
  831. const m_S_ISUID = 04000
  832. const m_S_ISVTX = 01000
  833. const m_S_IWGRP = 0020
  834. const m_S_IWOTH = 0002
  835. const m_S_IWRITE = "S_IWUSR"
  836. const m_S_IWUSR = 0200
  837. const m_S_IXGRP = 0010
  838. const m_S_IXOTH = 0001
  839. const m_S_IXUSR = 0100
  840. const m_ScreenSaverActive = 1
  841. const m_ScreenSaverReset = 0
  842. const m_SelectionClear = 29
  843. const m_SelectionNotify = 31
  844. const m_SelectionRequest = 30
  845. const m_SetModeDelete = 1
  846. const m_SetModeInsert = 0
  847. const m_ShiftMapIndex = 0
  848. const m_SouthEastGravity = 9
  849. const m_SouthGravity = 8
  850. const m_SouthWestGravity = 7
  851. const m_StaticColor = 2
  852. const m_StaticGravity = 10
  853. const m_StaticGray = 0
  854. const m_Status = "int"
  855. const m_StippleShape = 2
  856. const m_SubPixelHorizontalBGR = 2
  857. const m_SubPixelHorizontalRGB = 1
  858. const m_SubPixelNone = 5
  859. const m_SubPixelUnknown = 0
  860. const m_SubPixelVerticalBGR = 4
  861. const m_SubPixelVerticalRGB = 3
  862. const m_Success = 0
  863. const m_SyncBoth = 7
  864. const m_SyncKeyboard = 4
  865. const m_SyncPointer = 1
  866. const m_T1_MAX_CHARSTRINGS_OPERANDS = 256
  867. const m_T1_MAX_DICT_DEPTH = 5
  868. const m_T1_MAX_SUBRS_CALLS = 16
  869. const m_TMP_MAX = 10000
  870. const m_TTY_NAME_MAX = 32
  871. const m_TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES = 1000000
  872. const m_TT_CONFIG_OPTION_SUBPIXEL_HINTING = 2
  873. const m_TZNAME_MAX = 6
  874. const m_TileShape = 1
  875. const m_TopIf = 2
  876. const m_True = 1
  877. const m_TrueColor = 4
  878. const m_UCHAR_MAX = 255
  879. const m_UINT16_MAX = 0xffff
  880. const m_UINT32_MAX = "0xffffffffu"
  881. const m_UINT64_MAX = "0xffffffffffffffffu"
  882. const m_UINT8_MAX = 0xff
  883. const m_UINTMAX_MAX = "UINT64_MAX"
  884. const m_UINTPTR_MAX = "UINT64_MAX"
  885. const m_UINT_FAST16_MAX = "UINT32_MAX"
  886. const m_UINT_FAST32_MAX = "UINT32_MAX"
  887. const m_UINT_FAST64_MAX = "UINT64_MAX"
  888. const m_UINT_FAST8_MAX = "UINT8_MAX"
  889. const m_UINT_LEAST16_MAX = "UINT16_MAX"
  890. const m_UINT_LEAST32_MAX = "UINT32_MAX"
  891. const m_UINT_LEAST64_MAX = "UINT64_MAX"
  892. const m_UINT_LEAST8_MAX = "UINT8_MAX"
  893. const m_UINT_MAX = 0xffffffff
  894. const m_UNLOCKED = 0
  895. const m_USHRT_MAX = 0xffff
  896. const m_UTIME_NOW = 0x3fffffff
  897. const m_UTIME_OMIT = 0x3ffffffe
  898. const m_UnmapGravity = 0
  899. const m_UnmapNotify = 18
  900. const m_Unsorted = 0
  901. const m_VERSION = "2.3.2"
  902. const m_VisibilityFullyObscured = 2
  903. const m_VisibilityNotify = 15
  904. const m_VisibilityPartiallyObscured = 1
  905. const m_VisibilityUnobscured = 0
  906. const m_VisualAllMask = 0x1FF
  907. const m_VisualBitsPerRGBMask = 0x100
  908. const m_VisualBlueMaskMask = 0x40
  909. const m_VisualClassMask = 0x8
  910. const m_VisualColormapSizeMask = 0x80
  911. const m_VisualDepthMask = 0x4
  912. const m_VisualGreenMaskMask = 0x20
  913. const m_VisualIDMask = 0x1
  914. const m_VisualNoMask = 0x0
  915. const m_VisualRedMaskMask = 0x10
  916. const m_VisualScreenMask = 0x2
  917. const m_WINT_MAX = "UINT32_MAX"
  918. const m_WINT_MIN = 0
  919. const m_WLNSPERBATCH = 50
  920. const m_WNOHANG = 1
  921. const m_WORD_BIT = 32
  922. const m_WRCTSPERBATCH = 10
  923. const m_WUNTRACED = 2
  924. const m_WestGravity = 4
  925. const m_WhenMapped = 1
  926. const m_WidthValue = 0x0004
  927. const m_WindingRule = 1
  928. const m_WithdrawnState = 0
  929. const m_XCNOENT = 2
  930. const m_XCNOMEM = 1
  931. const m_XCSUCCESS = 0
  932. const m_XFT_ASSUME_PIXMAP = 20
  933. const m_XFT_CORE = "core"
  934. const m_XFT_DBG_CACHE = 128
  935. const m_XFT_DBG_CACHEV = 256
  936. const m_XFT_DBG_DRAW = 8
  937. const m_XFT_DBG_GLYPH = 32
  938. const m_XFT_DBG_GLYPHV = 64
  939. const m_XFT_DBG_MEMORY = 512
  940. const m_XFT_DBG_OPEN = 1
  941. const m_XFT_DBG_OPENV = 2
  942. const m_XFT_DBG_REF = 16
  943. const m_XFT_DBG_RENDER = 4
  944. const m_XFT_DPY_MAX_UNREF_FONTS = 16
  945. const m_XFT_MAJOR = 2
  946. const m_XFT_MAX_GLYPH_MEMORY = "maxglyphmemory"
  947. const m_XFT_MAX_UNREF_FONTS = "maxunreffonts"
  948. const m_XFT_MEM_DRAW = 0
  949. const m_XFT_MEM_FILE = 2
  950. const m_XFT_MEM_FONT = 1
  951. const m_XFT_MEM_GLYPH = 3
  952. const m_XFT_MEM_NUM = 4
  953. const m_XFT_MINOR = 3
  954. const m_XFT_NMISSING = 256
  955. const m_XFT_NUM_FONT_HASH = 127
  956. const m_XFT_NUM_SOLID_COLOR = 16
  957. const m_XFT_RENDER = "render"
  958. const m_XFT_REVISION = 2
  959. const m_XFT_XLFD = "xlfd"
  960. const m_XIMHotKeyStateOFF = 0x0002
  961. const m_XIMHotKeyStateON = 0x0001
  962. const m_XIMInitialState = 1
  963. const m_XIMPreeditArea = 0x0001
  964. const m_XIMPreeditCallbacks = 0x0002
  965. const m_XIMPreeditEnable = 1
  966. const m_XIMPreeditNone = 0x0010
  967. const m_XIMPreeditNothing = 0x0008
  968. const m_XIMPreeditPosition = 0x0004
  969. const m_XIMPreeditUnKnown = 0
  970. const m_XIMReverse = 1
  971. const m_XIMStatusArea = 0x0100
  972. const m_XIMStatusCallbacks = 0x0200
  973. const m_XIMStatusNone = 0x0800
  974. const m_XIMStatusNothing = 0x0400
  975. const m_XIMStringConversionBottomEdge = 0x00000008
  976. const m_XIMStringConversionBuffer = 0x0001
  977. const m_XIMStringConversionChar = 0x0004
  978. const m_XIMStringConversionConcealed = 0x00000010
  979. const m_XIMStringConversionLeftEdge = 0x00000001
  980. const m_XIMStringConversionLine = 0x0002
  981. const m_XIMStringConversionRetrieval = 0x0002
  982. const m_XIMStringConversionRightEdge = 0x00000002
  983. const m_XIMStringConversionSubstitution = 0x0001
  984. const m_XIMStringConversionTopEdge = 0x00000004
  985. const m_XIMStringConversionWord = 0x0003
  986. const m_XIMStringConversionWrapped = 0x00000020
  987. const m_XK_0 = 0x0030
  988. const m_XK_1 = 0x0031
  989. const m_XK_2 = 0x0032
  990. const m_XK_3 = 0x0033
  991. const m_XK_4 = 0x0034
  992. const m_XK_5 = 0x0035
  993. const m_XK_6 = 0x0036
  994. const m_XK_7 = 0x0037
  995. const m_XK_8 = 0x0038
  996. const m_XK_9 = 0x0039
  997. const m_XK_A = 0x0041
  998. const m_XK_AE = 0x00c6
  999. const m_XK_Aacute = 0x00c1
  1000. const m_XK_Abelowdot = 0x1001ea0
  1001. const m_XK_Abreve = 0x01c3
  1002. const m_XK_Abreveacute = 0x1001eae
  1003. const m_XK_Abrevebelowdot = 0x1001eb6
  1004. const m_XK_Abrevegrave = 0x1001eb0
  1005. const m_XK_Abrevehook = 0x1001eb2
  1006. const m_XK_Abrevetilde = 0x1001eb4
  1007. const m_XK_AccessX_Enable = 0xfe70
  1008. const m_XK_AccessX_Feedback_Enable = 0xfe71
  1009. const m_XK_Acircumflex = 0x00c2
  1010. const m_XK_Acircumflexacute = 0x1001ea4
  1011. const m_XK_Acircumflexbelowdot = 0x1001eac
  1012. const m_XK_Acircumflexgrave = 0x1001ea6
  1013. const m_XK_Acircumflexhook = 0x1001ea8
  1014. const m_XK_Acircumflextilde = 0x1001eaa
  1015. const m_XK_Adiaeresis = 0x00c4
  1016. const m_XK_Agrave = 0x00c0
  1017. const m_XK_Ahook = 0x1001ea2
  1018. const m_XK_Alt_L = 0xffe9
  1019. const m_XK_Alt_R = 0xffea
  1020. const m_XK_Amacron = 0x03c0
  1021. const m_XK_Aogonek = 0x01a1
  1022. const m_XK_Arabic_0 = 0x1000660
  1023. const m_XK_Arabic_1 = 0x1000661
  1024. const m_XK_Arabic_2 = 0x1000662
  1025. const m_XK_Arabic_3 = 0x1000663
  1026. const m_XK_Arabic_4 = 0x1000664
  1027. const m_XK_Arabic_5 = 0x1000665
  1028. const m_XK_Arabic_6 = 0x1000666
  1029. const m_XK_Arabic_7 = 0x1000667
  1030. const m_XK_Arabic_8 = 0x1000668
  1031. const m_XK_Arabic_9 = 0x1000669
  1032. const m_XK_Arabic_ain = 0x05d9
  1033. const m_XK_Arabic_alef = 0x05c7
  1034. const m_XK_Arabic_alefmaksura = 0x05e9
  1035. const m_XK_Arabic_beh = 0x05c8
  1036. const m_XK_Arabic_comma = 0x05ac
  1037. const m_XK_Arabic_dad = 0x05d6
  1038. const m_XK_Arabic_dal = 0x05cf
  1039. const m_XK_Arabic_damma = 0x05ef
  1040. const m_XK_Arabic_dammatan = 0x05ec
  1041. const m_XK_Arabic_ddal = 0x1000688
  1042. const m_XK_Arabic_farsi_yeh = 0x10006cc
  1043. const m_XK_Arabic_fatha = 0x05ee
  1044. const m_XK_Arabic_fathatan = 0x05eb
  1045. const m_XK_Arabic_feh = 0x05e1
  1046. const m_XK_Arabic_fullstop = 0x10006d4
  1047. const m_XK_Arabic_gaf = 0x10006af
  1048. const m_XK_Arabic_ghain = 0x05da
  1049. const m_XK_Arabic_ha = 0x05e7
  1050. const m_XK_Arabic_hah = 0x05cd
  1051. const m_XK_Arabic_hamza = 0x05c1
  1052. const m_XK_Arabic_hamza_above = 0x1000654
  1053. const m_XK_Arabic_hamza_below = 0x1000655
  1054. const m_XK_Arabic_hamzaonalef = 0x05c3
  1055. const m_XK_Arabic_hamzaonwaw = 0x05c4
  1056. const m_XK_Arabic_hamzaonyeh = 0x05c6
  1057. const m_XK_Arabic_hamzaunderalef = 0x05c5
  1058. const m_XK_Arabic_heh = 0x05e7
  1059. const m_XK_Arabic_heh_doachashmee = 0x10006be
  1060. const m_XK_Arabic_heh_goal = 0x10006c1
  1061. const m_XK_Arabic_jeem = 0x05cc
  1062. const m_XK_Arabic_jeh = 0x1000698
  1063. const m_XK_Arabic_kaf = 0x05e3
  1064. const m_XK_Arabic_kasra = 0x05f0
  1065. const m_XK_Arabic_kasratan = 0x05ed
  1066. const m_XK_Arabic_keheh = 0x10006a9
  1067. const m_XK_Arabic_khah = 0x05ce
  1068. const m_XK_Arabic_lam = 0x05e4
  1069. const m_XK_Arabic_madda_above = 0x1000653
  1070. const m_XK_Arabic_maddaonalef = 0x05c2
  1071. const m_XK_Arabic_meem = 0x05e5
  1072. const m_XK_Arabic_noon = 0x05e6
  1073. const m_XK_Arabic_noon_ghunna = 0x10006ba
  1074. const m_XK_Arabic_peh = 0x100067e
  1075. const m_XK_Arabic_percent = 0x100066a
  1076. const m_XK_Arabic_qaf = 0x05e2
  1077. const m_XK_Arabic_question_mark = 0x05bf
  1078. const m_XK_Arabic_ra = 0x05d1
  1079. const m_XK_Arabic_rreh = 0x1000691
  1080. const m_XK_Arabic_sad = 0x05d5
  1081. const m_XK_Arabic_seen = 0x05d3
  1082. const m_XK_Arabic_semicolon = 0x05bb
  1083. const m_XK_Arabic_shadda = 0x05f1
  1084. const m_XK_Arabic_sheen = 0x05d4
  1085. const m_XK_Arabic_sukun = 0x05f2
  1086. const m_XK_Arabic_superscript_alef = 0x1000670
  1087. const m_XK_Arabic_switch = 0xff7e
  1088. const m_XK_Arabic_tah = 0x05d7
  1089. const m_XK_Arabic_tatweel = 0x05e0
  1090. const m_XK_Arabic_tcheh = 0x1000686
  1091. const m_XK_Arabic_teh = 0x05ca
  1092. const m_XK_Arabic_tehmarbuta = 0x05c9
  1093. const m_XK_Arabic_thal = 0x05d0
  1094. const m_XK_Arabic_theh = 0x05cb
  1095. const m_XK_Arabic_tteh = 0x1000679
  1096. const m_XK_Arabic_veh = 0x10006a4
  1097. const m_XK_Arabic_waw = 0x05e8
  1098. const m_XK_Arabic_yeh = 0x05ea
  1099. const m_XK_Arabic_yeh_baree = 0x10006d2
  1100. const m_XK_Arabic_zah = 0x05d8
  1101. const m_XK_Arabic_zain = 0x05d2
  1102. const m_XK_Aring = 0x00c5
  1103. const m_XK_Armenian_AT = 0x1000538
  1104. const m_XK_Armenian_AYB = 0x1000531
  1105. const m_XK_Armenian_BEN = 0x1000532
  1106. const m_XK_Armenian_CHA = 0x1000549
  1107. const m_XK_Armenian_DA = 0x1000534
  1108. const m_XK_Armenian_DZA = 0x1000541
  1109. const m_XK_Armenian_E = 0x1000537
  1110. const m_XK_Armenian_FE = 0x1000556
  1111. const m_XK_Armenian_GHAT = 0x1000542
  1112. const m_XK_Armenian_GIM = 0x1000533
  1113. const m_XK_Armenian_HI = 0x1000545
  1114. const m_XK_Armenian_HO = 0x1000540
  1115. const m_XK_Armenian_INI = 0x100053b
  1116. const m_XK_Armenian_JE = 0x100054b
  1117. const m_XK_Armenian_KE = 0x1000554
  1118. const m_XK_Armenian_KEN = 0x100053f
  1119. const m_XK_Armenian_KHE = 0x100053d
  1120. const m_XK_Armenian_LYUN = 0x100053c
  1121. const m_XK_Armenian_MEN = 0x1000544
  1122. const m_XK_Armenian_NU = 0x1000546
  1123. const m_XK_Armenian_O = 0x1000555
  1124. const m_XK_Armenian_PE = 0x100054a
  1125. const m_XK_Armenian_PYUR = 0x1000553
  1126. const m_XK_Armenian_RA = 0x100054c
  1127. const m_XK_Armenian_RE = 0x1000550
  1128. const m_XK_Armenian_SE = 0x100054d
  1129. const m_XK_Armenian_SHA = 0x1000547
  1130. const m_XK_Armenian_TCHE = 0x1000543
  1131. const m_XK_Armenian_TO = 0x1000539
  1132. const m_XK_Armenian_TSA = 0x100053e
  1133. const m_XK_Armenian_TSO = 0x1000551
  1134. const m_XK_Armenian_TYUN = 0x100054f
  1135. const m_XK_Armenian_VEV = 0x100054e
  1136. const m_XK_Armenian_VO = 0x1000548
  1137. const m_XK_Armenian_VYUN = 0x1000552
  1138. const m_XK_Armenian_YECH = 0x1000535
  1139. const m_XK_Armenian_ZA = 0x1000536
  1140. const m_XK_Armenian_ZHE = 0x100053a
  1141. const m_XK_Armenian_accent = 0x100055b
  1142. const m_XK_Armenian_amanak = 0x100055c
  1143. const m_XK_Armenian_apostrophe = 0x100055a
  1144. const m_XK_Armenian_at = 0x1000568
  1145. const m_XK_Armenian_ayb = 0x1000561
  1146. const m_XK_Armenian_ben = 0x1000562
  1147. const m_XK_Armenian_but = 0x100055d
  1148. const m_XK_Armenian_cha = 0x1000579
  1149. const m_XK_Armenian_da = 0x1000564
  1150. const m_XK_Armenian_dza = 0x1000571
  1151. const m_XK_Armenian_e = 0x1000567
  1152. const m_XK_Armenian_exclam = 0x100055c
  1153. const m_XK_Armenian_fe = 0x1000586
  1154. const m_XK_Armenian_full_stop = 0x1000589
  1155. const m_XK_Armenian_ghat = 0x1000572
  1156. const m_XK_Armenian_gim = 0x1000563
  1157. const m_XK_Armenian_hi = 0x1000575
  1158. const m_XK_Armenian_ho = 0x1000570
  1159. const m_XK_Armenian_hyphen = 0x100058a
  1160. const m_XK_Armenian_ini = 0x100056b
  1161. const m_XK_Armenian_je = 0x100057b
  1162. const m_XK_Armenian_ke = 0x1000584
  1163. const m_XK_Armenian_ken = 0x100056f
  1164. const m_XK_Armenian_khe = 0x100056d
  1165. const m_XK_Armenian_ligature_ew = 0x1000587
  1166. const m_XK_Armenian_lyun = 0x100056c
  1167. const m_XK_Armenian_men = 0x1000574
  1168. const m_XK_Armenian_nu = 0x1000576
  1169. const m_XK_Armenian_o = 0x1000585
  1170. const m_XK_Armenian_paruyk = 0x100055e
  1171. const m_XK_Armenian_pe = 0x100057a
  1172. const m_XK_Armenian_pyur = 0x1000583
  1173. const m_XK_Armenian_question = 0x100055e
  1174. const m_XK_Armenian_ra = 0x100057c
  1175. const m_XK_Armenian_re = 0x1000580
  1176. const m_XK_Armenian_se = 0x100057d
  1177. const m_XK_Armenian_separation_mark = 0x100055d
  1178. const m_XK_Armenian_sha = 0x1000577
  1179. const m_XK_Armenian_shesht = 0x100055b
  1180. const m_XK_Armenian_tche = 0x1000573
  1181. const m_XK_Armenian_to = 0x1000569
  1182. const m_XK_Armenian_tsa = 0x100056e
  1183. const m_XK_Armenian_tso = 0x1000581
  1184. const m_XK_Armenian_tyun = 0x100057f
  1185. const m_XK_Armenian_verjaket = 0x1000589
  1186. const m_XK_Armenian_vev = 0x100057e
  1187. const m_XK_Armenian_vo = 0x1000578
  1188. const m_XK_Armenian_vyun = 0x1000582
  1189. const m_XK_Armenian_yech = 0x1000565
  1190. const m_XK_Armenian_yentamna = 0x100058a
  1191. const m_XK_Armenian_za = 0x1000566
  1192. const m_XK_Armenian_zhe = 0x100056a
  1193. const m_XK_Atilde = 0x00c3
  1194. const m_XK_AudibleBell_Enable = 0xfe7a
  1195. const m_XK_B = 0x0042
  1196. const m_XK_Babovedot = 0x1001e02
  1197. const m_XK_BackSpace = 0xff08
  1198. const m_XK_Begin = 0xff58
  1199. const m_XK_BounceKeys_Enable = 0xfe74
  1200. const m_XK_Break = 0xff6b
  1201. const m_XK_Byelorussian_SHORTU = 0x06be
  1202. const m_XK_Byelorussian_shortu = 0x06ae
  1203. const m_XK_C = 0x0043
  1204. const m_XK_CH = 0xfea2
  1205. const m_XK_C_H = 0xfea5
  1206. const m_XK_C_h = 0xfea4
  1207. const m_XK_Cabovedot = 0x02c5
  1208. const m_XK_Cacute = 0x01c6
  1209. const m_XK_Cancel = 0xff69
  1210. const m_XK_Caps_Lock = 0xffe5
  1211. const m_XK_Ccaron = 0x01c8
  1212. const m_XK_Ccedilla = 0x00c7
  1213. const m_XK_Ccircumflex = 0x02c6
  1214. const m_XK_Ch = 0xfea1
  1215. const m_XK_Clear = 0xff0b
  1216. const m_XK_Codeinput = 0xff37
  1217. const m_XK_ColonSign = 0x10020a1
  1218. const m_XK_Control_L = 0xffe3
  1219. const m_XK_Control_R = 0xffe4
  1220. const m_XK_CruzeiroSign = 0x10020a2
  1221. const m_XK_Cyrillic_A = 0x06e1
  1222. const m_XK_Cyrillic_BE = 0x06e2
  1223. const m_XK_Cyrillic_CHE = 0x06fe
  1224. const m_XK_Cyrillic_CHE_descender = 0x10004b6
  1225. const m_XK_Cyrillic_CHE_vertstroke = 0x10004b8
  1226. const m_XK_Cyrillic_DE = 0x06e4
  1227. const m_XK_Cyrillic_DZHE = 0x06bf
  1228. const m_XK_Cyrillic_E = 0x06fc
  1229. const m_XK_Cyrillic_EF = 0x06e6
  1230. const m_XK_Cyrillic_EL = 0x06ec
  1231. const m_XK_Cyrillic_EM = 0x06ed
  1232. const m_XK_Cyrillic_EN = 0x06ee
  1233. const m_XK_Cyrillic_EN_descender = 0x10004a2
  1234. const m_XK_Cyrillic_ER = 0x06f2
  1235. const m_XK_Cyrillic_ES = 0x06f3
  1236. const m_XK_Cyrillic_GHE = 0x06e7
  1237. const m_XK_Cyrillic_GHE_bar = 0x1000492
  1238. const m_XK_Cyrillic_HA = 0x06e8
  1239. const m_XK_Cyrillic_HARDSIGN = 0x06ff
  1240. const m_XK_Cyrillic_HA_descender = 0x10004b2
  1241. const m_XK_Cyrillic_I = 0x06e9
  1242. const m_XK_Cyrillic_IE = 0x06e5
  1243. const m_XK_Cyrillic_IO = 0x06b3
  1244. const m_XK_Cyrillic_I_macron = 0x10004e2
  1245. const m_XK_Cyrillic_JE = 0x06b8
  1246. const m_XK_Cyrillic_KA = 0x06eb
  1247. const m_XK_Cyrillic_KA_descender = 0x100049a
  1248. const m_XK_Cyrillic_KA_vertstroke = 0x100049c
  1249. const m_XK_Cyrillic_LJE = 0x06b9
  1250. const m_XK_Cyrillic_NJE = 0x06ba
  1251. const m_XK_Cyrillic_O = 0x06ef
  1252. const m_XK_Cyrillic_O_bar = 0x10004e8
  1253. const m_XK_Cyrillic_PE = 0x06f0
  1254. const m_XK_Cyrillic_SCHWA = 0x10004d8
  1255. const m_XK_Cyrillic_SHA = 0x06fb
  1256. const m_XK_Cyrillic_SHCHA = 0x06fd
  1257. const m_XK_Cyrillic_SHHA = 0x10004ba
  1258. const m_XK_Cyrillic_SHORTI = 0x06ea
  1259. const m_XK_Cyrillic_SOFTSIGN = 0x06f8
  1260. const m_XK_Cyrillic_TE = 0x06f4
  1261. const m_XK_Cyrillic_TSE = 0x06e3
  1262. const m_XK_Cyrillic_U = 0x06f5
  1263. const m_XK_Cyrillic_U_macron = 0x10004ee
  1264. const m_XK_Cyrillic_U_straight = 0x10004ae
  1265. const m_XK_Cyrillic_U_straight_bar = 0x10004b0
  1266. const m_XK_Cyrillic_VE = 0x06f7
  1267. const m_XK_Cyrillic_YA = 0x06f1
  1268. const m_XK_Cyrillic_YERU = 0x06f9
  1269. const m_XK_Cyrillic_YU = 0x06e0
  1270. const m_XK_Cyrillic_ZE = 0x06fa
  1271. const m_XK_Cyrillic_ZHE = 0x06f6
  1272. const m_XK_Cyrillic_ZHE_descender = 0x1000496
  1273. const m_XK_Cyrillic_a = 0x06c1
  1274. const m_XK_Cyrillic_be = 0x06c2
  1275. const m_XK_Cyrillic_che = 0x06de
  1276. const m_XK_Cyrillic_che_descender = 0x10004b7
  1277. const m_XK_Cyrillic_che_vertstroke = 0x10004b9
  1278. const m_XK_Cyrillic_de = 0x06c4
  1279. const m_XK_Cyrillic_dzhe = 0x06af
  1280. const m_XK_Cyrillic_e = 0x06dc
  1281. const m_XK_Cyrillic_ef = 0x06c6
  1282. const m_XK_Cyrillic_el = 0x06cc
  1283. const m_XK_Cyrillic_em = 0x06cd
  1284. const m_XK_Cyrillic_en = 0x06ce
  1285. const m_XK_Cyrillic_en_descender = 0x10004a3
  1286. const m_XK_Cyrillic_er = 0x06d2
  1287. const m_XK_Cyrillic_es = 0x06d3
  1288. const m_XK_Cyrillic_ghe = 0x06c7
  1289. const m_XK_Cyrillic_ghe_bar = 0x1000493
  1290. const m_XK_Cyrillic_ha = 0x06c8
  1291. const m_XK_Cyrillic_ha_descender = 0x10004b3
  1292. const m_XK_Cyrillic_hardsign = 0x06df
  1293. const m_XK_Cyrillic_i = 0x06c9
  1294. const m_XK_Cyrillic_i_macron = 0x10004e3
  1295. const m_XK_Cyrillic_ie = 0x06c5
  1296. const m_XK_Cyrillic_io = 0x06a3
  1297. const m_XK_Cyrillic_je = 0x06a8
  1298. const m_XK_Cyrillic_ka = 0x06cb
  1299. const m_XK_Cyrillic_ka_descender = 0x100049b
  1300. const m_XK_Cyrillic_ka_vertstroke = 0x100049d
  1301. const m_XK_Cyrillic_lje = 0x06a9
  1302. const m_XK_Cyrillic_nje = 0x06aa
  1303. const m_XK_Cyrillic_o = 0x06cf
  1304. const m_XK_Cyrillic_o_bar = 0x10004e9
  1305. const m_XK_Cyrillic_pe = 0x06d0
  1306. const m_XK_Cyrillic_schwa = 0x10004d9
  1307. const m_XK_Cyrillic_sha = 0x06db
  1308. const m_XK_Cyrillic_shcha = 0x06dd
  1309. const m_XK_Cyrillic_shha = 0x10004bb
  1310. const m_XK_Cyrillic_shorti = 0x06ca
  1311. const m_XK_Cyrillic_softsign = 0x06d8
  1312. const m_XK_Cyrillic_te = 0x06d4
  1313. const m_XK_Cyrillic_tse = 0x06c3
  1314. const m_XK_Cyrillic_u = 0x06d5
  1315. const m_XK_Cyrillic_u_macron = 0x10004ef
  1316. const m_XK_Cyrillic_u_straight = 0x10004af
  1317. const m_XK_Cyrillic_u_straight_bar = 0x10004b1
  1318. const m_XK_Cyrillic_ve = 0x06d7
  1319. const m_XK_Cyrillic_ya = 0x06d1
  1320. const m_XK_Cyrillic_yeru = 0x06d9
  1321. const m_XK_Cyrillic_yu = 0x06c0
  1322. const m_XK_Cyrillic_ze = 0x06da
  1323. const m_XK_Cyrillic_zhe = 0x06d6
  1324. const m_XK_Cyrillic_zhe_descender = 0x1000497
  1325. const m_XK_D = 0x0044
  1326. const m_XK_Dabovedot = 0x1001e0a
  1327. const m_XK_Dcaron = 0x01cf
  1328. const m_XK_Delete = 0xffff
  1329. const m_XK_DongSign = 0x10020ab
  1330. const m_XK_Down = 0xff54
  1331. const m_XK_Dstroke = 0x01d0
  1332. const m_XK_E = 0x0045
  1333. const m_XK_ENG = 0x03bd
  1334. const m_XK_ETH = 0x00d0
  1335. const m_XK_EZH = 0x10001b7
  1336. const m_XK_Eabovedot = 0x03cc
  1337. const m_XK_Eacute = 0x00c9
  1338. const m_XK_Ebelowdot = 0x1001eb8
  1339. const m_XK_Ecaron = 0x01cc
  1340. const m_XK_Ecircumflex = 0x00ca
  1341. const m_XK_Ecircumflexacute = 0x1001ebe
  1342. const m_XK_Ecircumflexbelowdot = 0x1001ec6
  1343. const m_XK_Ecircumflexgrave = 0x1001ec0
  1344. const m_XK_Ecircumflexhook = 0x1001ec2
  1345. const m_XK_Ecircumflextilde = 0x1001ec4
  1346. const m_XK_EcuSign = 0x10020a0
  1347. const m_XK_Ediaeresis = 0x00cb
  1348. const m_XK_Egrave = 0x00c8
  1349. const m_XK_Ehook = 0x1001eba
  1350. const m_XK_Eisu_Shift = 0xff2f
  1351. const m_XK_Eisu_toggle = 0xff30
  1352. const m_XK_Emacron = 0x03aa
  1353. const m_XK_End = 0xff57
  1354. const m_XK_Eogonek = 0x01ca
  1355. const m_XK_Escape = 0xff1b
  1356. const m_XK_Eth = 0x00d0
  1357. const m_XK_Etilde = 0x1001ebc
  1358. const m_XK_EuroSign = 0x20ac
  1359. const m_XK_Execute = 0xff62
  1360. const m_XK_F = 0x0046
  1361. const m_XK_F1 = 0xffbe
  1362. const m_XK_F10 = 0xffc7
  1363. const m_XK_F11 = 0xffc8
  1364. const m_XK_F12 = 0xffc9
  1365. const m_XK_F13 = 0xffca
  1366. const m_XK_F14 = 0xffcb
  1367. const m_XK_F15 = 0xffcc
  1368. const m_XK_F16 = 0xffcd
  1369. const m_XK_F17 = 0xffce
  1370. const m_XK_F18 = 0xffcf
  1371. const m_XK_F19 = 0xffd0
  1372. const m_XK_F2 = 0xffbf
  1373. const m_XK_F20 = 0xffd1
  1374. const m_XK_F21 = 0xffd2
  1375. const m_XK_F22 = 0xffd3
  1376. const m_XK_F23 = 0xffd4
  1377. const m_XK_F24 = 0xffd5
  1378. const m_XK_F25 = 0xffd6
  1379. const m_XK_F26 = 0xffd7
  1380. const m_XK_F27 = 0xffd8
  1381. const m_XK_F28 = 0xffd9
  1382. const m_XK_F29 = 0xffda
  1383. const m_XK_F3 = 0xffc0
  1384. const m_XK_F30 = 0xffdb
  1385. const m_XK_F31 = 0xffdc
  1386. const m_XK_F32 = 0xffdd
  1387. const m_XK_F33 = 0xffde
  1388. const m_XK_F34 = 0xffdf
  1389. const m_XK_F35 = 0xffe0
  1390. const m_XK_F4 = 0xffc1
  1391. const m_XK_F5 = 0xffc2
  1392. const m_XK_F6 = 0xffc3
  1393. const m_XK_F7 = 0xffc4
  1394. const m_XK_F8 = 0xffc5
  1395. const m_XK_F9 = 0xffc6
  1396. const m_XK_FFrancSign = 0x10020a3
  1397. const m_XK_Fabovedot = 0x1001e1e
  1398. const m_XK_Farsi_0 = 0x10006f0
  1399. const m_XK_Farsi_1 = 0x10006f1
  1400. const m_XK_Farsi_2 = 0x10006f2
  1401. const m_XK_Farsi_3 = 0x10006f3
  1402. const m_XK_Farsi_4 = 0x10006f4
  1403. const m_XK_Farsi_5 = 0x10006f5
  1404. const m_XK_Farsi_6 = 0x10006f6
  1405. const m_XK_Farsi_7 = 0x10006f7
  1406. const m_XK_Farsi_8 = 0x10006f8
  1407. const m_XK_Farsi_9 = 0x10006f9
  1408. const m_XK_Farsi_yeh = 0x10006cc
  1409. const m_XK_Find = 0xff68
  1410. const m_XK_First_Virtual_Screen = 0xfed0
  1411. const m_XK_G = 0x0047
  1412. const m_XK_Gabovedot = 0x02d5
  1413. const m_XK_Gbreve = 0x02ab
  1414. const m_XK_Gcaron = 0x10001e6
  1415. const m_XK_Gcedilla = 0x03ab
  1416. const m_XK_Gcircumflex = 0x02d8
  1417. const m_XK_Georgian_an = 0x10010d0
  1418. const m_XK_Georgian_ban = 0x10010d1
  1419. const m_XK_Georgian_can = 0x10010ea
  1420. const m_XK_Georgian_char = 0x10010ed
  1421. const m_XK_Georgian_chin = 0x10010e9
  1422. const m_XK_Georgian_cil = 0x10010ec
  1423. const m_XK_Georgian_don = 0x10010d3
  1424. const m_XK_Georgian_en = 0x10010d4
  1425. const m_XK_Georgian_fi = 0x10010f6
  1426. const m_XK_Georgian_gan = 0x10010d2
  1427. const m_XK_Georgian_ghan = 0x10010e6
  1428. const m_XK_Georgian_hae = 0x10010f0
  1429. const m_XK_Georgian_har = 0x10010f4
  1430. const m_XK_Georgian_he = 0x10010f1
  1431. const m_XK_Georgian_hie = 0x10010f2
  1432. const m_XK_Georgian_hoe = 0x10010f5
  1433. const m_XK_Georgian_in = 0x10010d8
  1434. const m_XK_Georgian_jhan = 0x10010ef
  1435. const m_XK_Georgian_jil = 0x10010eb
  1436. const m_XK_Georgian_kan = 0x10010d9
  1437. const m_XK_Georgian_khar = 0x10010e5
  1438. const m_XK_Georgian_las = 0x10010da
  1439. const m_XK_Georgian_man = 0x10010db
  1440. const m_XK_Georgian_nar = 0x10010dc
  1441. const m_XK_Georgian_on = 0x10010dd
  1442. const m_XK_Georgian_par = 0x10010de
  1443. const m_XK_Georgian_phar = 0x10010e4
  1444. const m_XK_Georgian_qar = 0x10010e7
  1445. const m_XK_Georgian_rae = 0x10010e0
  1446. const m_XK_Georgian_san = 0x10010e1
  1447. const m_XK_Georgian_shin = 0x10010e8
  1448. const m_XK_Georgian_tan = 0x10010d7
  1449. const m_XK_Georgian_tar = 0x10010e2
  1450. const m_XK_Georgian_un = 0x10010e3
  1451. const m_XK_Georgian_vin = 0x10010d5
  1452. const m_XK_Georgian_we = 0x10010f3
  1453. const m_XK_Georgian_xan = 0x10010ee
  1454. const m_XK_Georgian_zen = 0x10010d6
  1455. const m_XK_Georgian_zhar = 0x10010df
  1456. const m_XK_Greek_ALPHA = 0x07c1
  1457. const m_XK_Greek_ALPHAaccent = 0x07a1
  1458. const m_XK_Greek_BETA = 0x07c2
  1459. const m_XK_Greek_CHI = 0x07d7
  1460. const m_XK_Greek_DELTA = 0x07c4
  1461. const m_XK_Greek_EPSILON = 0x07c5
  1462. const m_XK_Greek_EPSILONaccent = 0x07a2
  1463. const m_XK_Greek_ETA = 0x07c7
  1464. const m_XK_Greek_ETAaccent = 0x07a3
  1465. const m_XK_Greek_GAMMA = 0x07c3
  1466. const m_XK_Greek_IOTA = 0x07c9
  1467. const m_XK_Greek_IOTAaccent = 0x07a4
  1468. const m_XK_Greek_IOTAdiaeresis = 0x07a5
  1469. const m_XK_Greek_IOTAdieresis = 0x07a5
  1470. const m_XK_Greek_KAPPA = 0x07ca
  1471. const m_XK_Greek_LAMBDA = 0x07cb
  1472. const m_XK_Greek_LAMDA = 0x07cb
  1473. const m_XK_Greek_MU = 0x07cc
  1474. const m_XK_Greek_NU = 0x07cd
  1475. const m_XK_Greek_OMEGA = 0x07d9
  1476. const m_XK_Greek_OMEGAaccent = 0x07ab
  1477. const m_XK_Greek_OMICRON = 0x07cf
  1478. const m_XK_Greek_OMICRONaccent = 0x07a7
  1479. const m_XK_Greek_PHI = 0x07d6
  1480. const m_XK_Greek_PI = 0x07d0
  1481. const m_XK_Greek_PSI = 0x07d8
  1482. const m_XK_Greek_RHO = 0x07d1
  1483. const m_XK_Greek_SIGMA = 0x07d2
  1484. const m_XK_Greek_TAU = 0x07d4
  1485. const m_XK_Greek_THETA = 0x07c8
  1486. const m_XK_Greek_UPSILON = 0x07d5
  1487. const m_XK_Greek_UPSILONaccent = 0x07a8
  1488. const m_XK_Greek_UPSILONdieresis = 0x07a9
  1489. const m_XK_Greek_XI = 0x07ce
  1490. const m_XK_Greek_ZETA = 0x07c6
  1491. const m_XK_Greek_accentdieresis = 0x07ae
  1492. const m_XK_Greek_alpha = 0x07e1
  1493. const m_XK_Greek_alphaaccent = 0x07b1
  1494. const m_XK_Greek_beta = 0x07e2
  1495. const m_XK_Greek_chi = 0x07f7
  1496. const m_XK_Greek_delta = 0x07e4
  1497. const m_XK_Greek_epsilon = 0x07e5
  1498. const m_XK_Greek_epsilonaccent = 0x07b2
  1499. const m_XK_Greek_eta = 0x07e7
  1500. const m_XK_Greek_etaaccent = 0x07b3
  1501. const m_XK_Greek_finalsmallsigma = 0x07f3
  1502. const m_XK_Greek_gamma = 0x07e3
  1503. const m_XK_Greek_horizbar = 0x07af
  1504. const m_XK_Greek_iota = 0x07e9
  1505. const m_XK_Greek_iotaaccent = 0x07b4
  1506. const m_XK_Greek_iotaaccentdieresis = 0x07b6
  1507. const m_XK_Greek_iotadieresis = 0x07b5
  1508. const m_XK_Greek_kappa = 0x07ea
  1509. const m_XK_Greek_lambda = 0x07eb
  1510. const m_XK_Greek_lamda = 0x07eb
  1511. const m_XK_Greek_mu = 0x07ec
  1512. const m_XK_Greek_nu = 0x07ed
  1513. const m_XK_Greek_omega = 0x07f9
  1514. const m_XK_Greek_omegaaccent = 0x07bb
  1515. const m_XK_Greek_omicron = 0x07ef
  1516. const m_XK_Greek_omicronaccent = 0x07b7
  1517. const m_XK_Greek_phi = 0x07f6
  1518. const m_XK_Greek_pi = 0x07f0
  1519. const m_XK_Greek_psi = 0x07f8
  1520. const m_XK_Greek_rho = 0x07f1
  1521. const m_XK_Greek_sigma = 0x07f2
  1522. const m_XK_Greek_switch = 0xff7e
  1523. const m_XK_Greek_tau = 0x07f4
  1524. const m_XK_Greek_theta = 0x07e8
  1525. const m_XK_Greek_upsilon = 0x07f5
  1526. const m_XK_Greek_upsilonaccent = 0x07b8
  1527. const m_XK_Greek_upsilonaccentdieresis = 0x07ba
  1528. const m_XK_Greek_upsilondieresis = 0x07b9
  1529. const m_XK_Greek_xi = 0x07ee
  1530. const m_XK_Greek_zeta = 0x07e6
  1531. const m_XK_H = 0x0048
  1532. const m_XK_Hangul = 0xff31
  1533. const m_XK_Hangul_A = 0x0ebf
  1534. const m_XK_Hangul_AE = 0x0ec0
  1535. const m_XK_Hangul_AraeA = 0x0ef6
  1536. const m_XK_Hangul_AraeAE = 0x0ef7
  1537. const m_XK_Hangul_Banja = 0xff39
  1538. const m_XK_Hangul_Cieuc = 0x0eba
  1539. const m_XK_Hangul_Codeinput = 0xff37
  1540. const m_XK_Hangul_Dikeud = 0x0ea7
  1541. const m_XK_Hangul_E = 0x0ec4
  1542. const m_XK_Hangul_EO = 0x0ec3
  1543. const m_XK_Hangul_EU = 0x0ed1
  1544. const m_XK_Hangul_End = 0xff33
  1545. const m_XK_Hangul_Hanja = 0xff34
  1546. const m_XK_Hangul_Hieuh = 0x0ebe
  1547. const m_XK_Hangul_I = 0x0ed3
  1548. const m_XK_Hangul_Ieung = 0x0eb7
  1549. const m_XK_Hangul_J_Cieuc = 0x0eea
  1550. const m_XK_Hangul_J_Dikeud = 0x0eda
  1551. const m_XK_Hangul_J_Hieuh = 0x0eee
  1552. const m_XK_Hangul_J_Ieung = 0x0ee8
  1553. const m_XK_Hangul_J_Jieuj = 0x0ee9
  1554. const m_XK_Hangul_J_Khieuq = 0x0eeb
  1555. const m_XK_Hangul_J_Kiyeog = 0x0ed4
  1556. const m_XK_Hangul_J_KiyeogSios = 0x0ed6
  1557. const m_XK_Hangul_J_KkogjiDalrinIeung = 0x0ef9
  1558. const m_XK_Hangul_J_Mieum = 0x0ee3
  1559. const m_XK_Hangul_J_Nieun = 0x0ed7
  1560. const m_XK_Hangul_J_NieunHieuh = 0x0ed9
  1561. const m_XK_Hangul_J_NieunJieuj = 0x0ed8
  1562. const m_XK_Hangul_J_PanSios = 0x0ef8
  1563. const m_XK_Hangul_J_Phieuf = 0x0eed
  1564. const m_XK_Hangul_J_Pieub = 0x0ee4
  1565. const m_XK_Hangul_J_PieubSios = 0x0ee5
  1566. const m_XK_Hangul_J_Rieul = 0x0edb
  1567. const m_XK_Hangul_J_RieulHieuh = 0x0ee2
  1568. const m_XK_Hangul_J_RieulKiyeog = 0x0edc
  1569. const m_XK_Hangul_J_RieulMieum = 0x0edd
  1570. const m_XK_Hangul_J_RieulPhieuf = 0x0ee1
  1571. const m_XK_Hangul_J_RieulPieub = 0x0ede
  1572. const m_XK_Hangul_J_RieulSios = 0x0edf
  1573. const m_XK_Hangul_J_RieulTieut = 0x0ee0
  1574. const m_XK_Hangul_J_Sios = 0x0ee6
  1575. const m_XK_Hangul_J_SsangKiyeog = 0x0ed5
  1576. const m_XK_Hangul_J_SsangSios = 0x0ee7
  1577. const m_XK_Hangul_J_Tieut = 0x0eec
  1578. const m_XK_Hangul_J_YeorinHieuh = 0x0efa
  1579. const m_XK_Hangul_Jamo = 0xff35
  1580. const m_XK_Hangul_Jeonja = 0xff38
  1581. const m_XK_Hangul_Jieuj = 0x0eb8
  1582. const m_XK_Hangul_Khieuq = 0x0ebb
  1583. const m_XK_Hangul_Kiyeog = 0x0ea1
  1584. const m_XK_Hangul_KiyeogSios = 0x0ea3
  1585. const m_XK_Hangul_KkogjiDalrinIeung = 0x0ef3
  1586. const m_XK_Hangul_Mieum = 0x0eb1
  1587. const m_XK_Hangul_MultipleCandidate = 0xff3d
  1588. const m_XK_Hangul_Nieun = 0x0ea4
  1589. const m_XK_Hangul_NieunHieuh = 0x0ea6
  1590. const m_XK_Hangul_NieunJieuj = 0x0ea5
  1591. const m_XK_Hangul_O = 0x0ec7
  1592. const m_XK_Hangul_OE = 0x0eca
  1593. const m_XK_Hangul_PanSios = 0x0ef2
  1594. const m_XK_Hangul_Phieuf = 0x0ebd
  1595. const m_XK_Hangul_Pieub = 0x0eb2
  1596. const m_XK_Hangul_PieubSios = 0x0eb4
  1597. const m_XK_Hangul_PostHanja = 0xff3b
  1598. const m_XK_Hangul_PreHanja = 0xff3a
  1599. const m_XK_Hangul_PreviousCandidate = 0xff3e
  1600. const m_XK_Hangul_Rieul = 0x0ea9
  1601. const m_XK_Hangul_RieulHieuh = 0x0eb0
  1602. const m_XK_Hangul_RieulKiyeog = 0x0eaa
  1603. const m_XK_Hangul_RieulMieum = 0x0eab
  1604. const m_XK_Hangul_RieulPhieuf = 0x0eaf
  1605. const m_XK_Hangul_RieulPieub = 0x0eac
  1606. const m_XK_Hangul_RieulSios = 0x0ead
  1607. const m_XK_Hangul_RieulTieut = 0x0eae
  1608. const m_XK_Hangul_RieulYeorinHieuh = 0x0eef
  1609. const m_XK_Hangul_Romaja = 0xff36
  1610. const m_XK_Hangul_SingleCandidate = 0xff3c
  1611. const m_XK_Hangul_Sios = 0x0eb5
  1612. const m_XK_Hangul_Special = 0xff3f
  1613. const m_XK_Hangul_SsangDikeud = 0x0ea8
  1614. const m_XK_Hangul_SsangJieuj = 0x0eb9
  1615. const m_XK_Hangul_SsangKiyeog = 0x0ea2
  1616. const m_XK_Hangul_SsangPieub = 0x0eb3
  1617. const m_XK_Hangul_SsangSios = 0x0eb6
  1618. const m_XK_Hangul_Start = 0xff32
  1619. const m_XK_Hangul_SunkyeongeumMieum = 0x0ef0
  1620. const m_XK_Hangul_SunkyeongeumPhieuf = 0x0ef4
  1621. const m_XK_Hangul_SunkyeongeumPieub = 0x0ef1
  1622. const m_XK_Hangul_Tieut = 0x0ebc
  1623. const m_XK_Hangul_U = 0x0ecc
  1624. const m_XK_Hangul_WA = 0x0ec8
  1625. const m_XK_Hangul_WAE = 0x0ec9
  1626. const m_XK_Hangul_WE = 0x0ece
  1627. const m_XK_Hangul_WEO = 0x0ecd
  1628. const m_XK_Hangul_WI = 0x0ecf
  1629. const m_XK_Hangul_YA = 0x0ec1
  1630. const m_XK_Hangul_YAE = 0x0ec2
  1631. const m_XK_Hangul_YE = 0x0ec6
  1632. const m_XK_Hangul_YEO = 0x0ec5
  1633. const m_XK_Hangul_YI = 0x0ed2
  1634. const m_XK_Hangul_YO = 0x0ecb
  1635. const m_XK_Hangul_YU = 0x0ed0
  1636. const m_XK_Hangul_YeorinHieuh = 0x0ef5
  1637. const m_XK_Hangul_switch = 0xff7e
  1638. const m_XK_Hankaku = 0xff29
  1639. const m_XK_Hcircumflex = 0x02a6
  1640. const m_XK_Hebrew_switch = 0xff7e
  1641. const m_XK_Help = 0xff6a
  1642. const m_XK_Henkan = 0xff23
  1643. const m_XK_Henkan_Mode = 0xff23
  1644. const m_XK_Hiragana = 0xff25
  1645. const m_XK_Hiragana_Katakana = 0xff27
  1646. const m_XK_Home = 0xff50
  1647. const m_XK_Hstroke = 0x02a1
  1648. const m_XK_Hyper_L = 0xffed
  1649. const m_XK_Hyper_R = 0xffee
  1650. const m_XK_I = 0x0049
  1651. const m_XK_ISO_Center_Object = 0xfe33
  1652. const m_XK_ISO_Continuous_Underline = 0xfe30
  1653. const m_XK_ISO_Discontinuous_Underline = 0xfe31
  1654. const m_XK_ISO_Emphasize = 0xfe32
  1655. const m_XK_ISO_Enter = 0xfe34
  1656. const m_XK_ISO_Fast_Cursor_Down = 0xfe2f
  1657. const m_XK_ISO_Fast_Cursor_Left = 0xfe2c
  1658. const m_XK_ISO_Fast_Cursor_Right = 0xfe2d
  1659. const m_XK_ISO_Fast_Cursor_Up = 0xfe2e
  1660. const m_XK_ISO_First_Group = 0xfe0c
  1661. const m_XK_ISO_First_Group_Lock = 0xfe0d
  1662. const m_XK_ISO_Group_Latch = 0xfe06
  1663. const m_XK_ISO_Group_Lock = 0xfe07
  1664. const m_XK_ISO_Group_Shift = 0xff7e
  1665. const m_XK_ISO_Last_Group = 0xfe0e
  1666. const m_XK_ISO_Last_Group_Lock = 0xfe0f
  1667. const m_XK_ISO_Left_Tab = 0xfe20
  1668. const m_XK_ISO_Level2_Latch = 0xfe02
  1669. const m_XK_ISO_Level3_Latch = 0xfe04
  1670. const m_XK_ISO_Level3_Lock = 0xfe05
  1671. const m_XK_ISO_Level3_Shift = 0xfe03
  1672. const m_XK_ISO_Level5_Latch = 0xfe12
  1673. const m_XK_ISO_Level5_Lock = 0xfe13
  1674. const m_XK_ISO_Level5_Shift = 0xfe11
  1675. const m_XK_ISO_Lock = 0xfe01
  1676. const m_XK_ISO_Move_Line_Down = 0xfe22
  1677. const m_XK_ISO_Move_Line_Up = 0xfe21
  1678. const m_XK_ISO_Next_Group = 0xfe08
  1679. const m_XK_ISO_Next_Group_Lock = 0xfe09
  1680. const m_XK_ISO_Partial_Line_Down = 0xfe24
  1681. const m_XK_ISO_Partial_Line_Up = 0xfe23
  1682. const m_XK_ISO_Partial_Space_Left = 0xfe25
  1683. const m_XK_ISO_Partial_Space_Right = 0xfe26
  1684. const m_XK_ISO_Prev_Group = 0xfe0a
  1685. const m_XK_ISO_Prev_Group_Lock = 0xfe0b
  1686. const m_XK_ISO_Release_Both_Margins = 0xfe2b
  1687. const m_XK_ISO_Release_Margin_Left = 0xfe29
  1688. const m_XK_ISO_Release_Margin_Right = 0xfe2a
  1689. const m_XK_ISO_Set_Margin_Left = 0xfe27
  1690. const m_XK_ISO_Set_Margin_Right = 0xfe28
  1691. const m_XK_Iabovedot = 0x02a9
  1692. const m_XK_Iacute = 0x00cd
  1693. const m_XK_Ibelowdot = 0x1001eca
  1694. const m_XK_Ibreve = 0x100012c
  1695. const m_XK_Icircumflex = 0x00ce
  1696. const m_XK_Idiaeresis = 0x00cf
  1697. const m_XK_Igrave = 0x00cc
  1698. const m_XK_Ihook = 0x1001ec8
  1699. const m_XK_Imacron = 0x03cf
  1700. const m_XK_Insert = 0xff63
  1701. const m_XK_Iogonek = 0x03c7
  1702. const m_XK_Itilde = 0x03a5
  1703. const m_XK_J = 0x004a
  1704. const m_XK_Jcircumflex = 0x02ac
  1705. const m_XK_K = 0x004b
  1706. const m_XK_KP_0 = 0xffb0
  1707. const m_XK_KP_1 = 0xffb1
  1708. const m_XK_KP_2 = 0xffb2
  1709. const m_XK_KP_3 = 0xffb3
  1710. const m_XK_KP_4 = 0xffb4
  1711. const m_XK_KP_5 = 0xffb5
  1712. const m_XK_KP_6 = 0xffb6
  1713. const m_XK_KP_7 = 0xffb7
  1714. const m_XK_KP_8 = 0xffb8
  1715. const m_XK_KP_9 = 0xffb9
  1716. const m_XK_KP_Add = 0xffab
  1717. const m_XK_KP_Begin = 0xff9d
  1718. const m_XK_KP_Decimal = 0xffae
  1719. const m_XK_KP_Delete = 0xff9f
  1720. const m_XK_KP_Divide = 0xffaf
  1721. const m_XK_KP_Down = 0xff99
  1722. const m_XK_KP_End = 0xff9c
  1723. const m_XK_KP_Enter = 0xff8d
  1724. const m_XK_KP_Equal = 0xffbd
  1725. const m_XK_KP_F1 = 0xff91
  1726. const m_XK_KP_F2 = 0xff92
  1727. const m_XK_KP_F3 = 0xff93
  1728. const m_XK_KP_F4 = 0xff94
  1729. const m_XK_KP_Home = 0xff95
  1730. const m_XK_KP_Insert = 0xff9e
  1731. const m_XK_KP_Left = 0xff96
  1732. const m_XK_KP_Multiply = 0xffaa
  1733. const m_XK_KP_Next = 0xff9b
  1734. const m_XK_KP_Page_Down = 0xff9b
  1735. const m_XK_KP_Page_Up = 0xff9a
  1736. const m_XK_KP_Prior = 0xff9a
  1737. const m_XK_KP_Right = 0xff98
  1738. const m_XK_KP_Separator = 0xffac
  1739. const m_XK_KP_Space = 0xff80
  1740. const m_XK_KP_Subtract = 0xffad
  1741. const m_XK_KP_Tab = 0xff89
  1742. const m_XK_KP_Up = 0xff97
  1743. const m_XK_Kana_Lock = 0xff2d
  1744. const m_XK_Kana_Shift = 0xff2e
  1745. const m_XK_Kanji = 0xff21
  1746. const m_XK_Kanji_Bangou = 0xff37
  1747. const m_XK_Katakana = 0xff26
  1748. const m_XK_Kcedilla = 0x03d3
  1749. const m_XK_Korean_Won = 0x0eff
  1750. const m_XK_L = 0x004c
  1751. const m_XK_L1 = 0xffc8
  1752. const m_XK_L10 = 0xffd1
  1753. const m_XK_L2 = 0xffc9
  1754. const m_XK_L3 = 0xffca
  1755. const m_XK_L4 = 0xffcb
  1756. const m_XK_L5 = 0xffcc
  1757. const m_XK_L6 = 0xffcd
  1758. const m_XK_L7 = 0xffce
  1759. const m_XK_L8 = 0xffcf
  1760. const m_XK_L9 = 0xffd0
  1761. const m_XK_Lacute = 0x01c5
  1762. const m_XK_Last_Virtual_Screen = 0xfed4
  1763. const m_XK_Lbelowdot = 0x1001e36
  1764. const m_XK_Lcaron = 0x01a5
  1765. const m_XK_Lcedilla = 0x03a6
  1766. const m_XK_Left = 0xff51
  1767. const m_XK_Linefeed = 0xff0a
  1768. const m_XK_LiraSign = 0x10020a4
  1769. const m_XK_Lstroke = 0x01a3
  1770. const m_XK_M = 0x004d
  1771. const m_XK_Mabovedot = 0x1001e40
  1772. const m_XK_Macedonia_DSE = 0x06b5
  1773. const m_XK_Macedonia_GJE = 0x06b2
  1774. const m_XK_Macedonia_KJE = 0x06bc
  1775. const m_XK_Macedonia_dse = 0x06a5
  1776. const m_XK_Macedonia_gje = 0x06a2
  1777. const m_XK_Macedonia_kje = 0x06ac
  1778. const m_XK_Mae_Koho = 0xff3e
  1779. const m_XK_Massyo = 0xff2c
  1780. const m_XK_Menu = 0xff67
  1781. const m_XK_Meta_L = 0xffe7
  1782. const m_XK_Meta_R = 0xffe8
  1783. const m_XK_MillSign = 0x10020a5
  1784. const m_XK_Mode_switch = 0xff7e
  1785. const m_XK_MouseKeys_Accel_Enable = 0xfe77
  1786. const m_XK_MouseKeys_Enable = 0xfe76
  1787. const m_XK_Muhenkan = 0xff22
  1788. const m_XK_Multi_key = 0xff20
  1789. const m_XK_MultipleCandidate = 0xff3d
  1790. const m_XK_N = 0x004e
  1791. const m_XK_Nacute = 0x01d1
  1792. const m_XK_NairaSign = 0x10020a6
  1793. const m_XK_Ncaron = 0x01d2
  1794. const m_XK_Ncedilla = 0x03d1
  1795. const m_XK_NewSheqelSign = 0x10020aa
  1796. const m_XK_Next = 0xff56
  1797. const m_XK_Next_Virtual_Screen = 0xfed2
  1798. const m_XK_Ntilde = 0x00d1
  1799. const m_XK_Num_Lock = 0xff7f
  1800. const m_XK_O = 0x004f
  1801. const m_XK_OE = 0x13bc
  1802. const m_XK_Oacute = 0x00d3
  1803. const m_XK_Obarred = 0x100019f
  1804. const m_XK_Obelowdot = 0x1001ecc
  1805. const m_XK_Ocaron = 0x10001d1
  1806. const m_XK_Ocircumflex = 0x00d4
  1807. const m_XK_Ocircumflexacute = 0x1001ed0
  1808. const m_XK_Ocircumflexbelowdot = 0x1001ed8
  1809. const m_XK_Ocircumflexgrave = 0x1001ed2
  1810. const m_XK_Ocircumflexhook = 0x1001ed4
  1811. const m_XK_Ocircumflextilde = 0x1001ed6
  1812. const m_XK_Odiaeresis = 0x00d6
  1813. const m_XK_Odoubleacute = 0x01d5
  1814. const m_XK_Ograve = 0x00d2
  1815. const m_XK_Ohook = 0x1001ece
  1816. const m_XK_Ohorn = 0x10001a0
  1817. const m_XK_Ohornacute = 0x1001eda
  1818. const m_XK_Ohornbelowdot = 0x1001ee2
  1819. const m_XK_Ohorngrave = 0x1001edc
  1820. const m_XK_Ohornhook = 0x1001ede
  1821. const m_XK_Ohorntilde = 0x1001ee0
  1822. const m_XK_Omacron = 0x03d2
  1823. const m_XK_Ooblique = 0x00d8
  1824. const m_XK_Oslash = 0x00d8
  1825. const m_XK_Otilde = 0x00d5
  1826. const m_XK_Overlay1_Enable = 0xfe78
  1827. const m_XK_Overlay2_Enable = 0xfe79
  1828. const m_XK_P = 0x0050
  1829. const m_XK_Pabovedot = 0x1001e56
  1830. const m_XK_Page_Down = 0xff56
  1831. const m_XK_Page_Up = 0xff55
  1832. const m_XK_Pause = 0xff13
  1833. const m_XK_PesetaSign = 0x10020a7
  1834. const m_XK_Pointer_Accelerate = 0xfefa
  1835. const m_XK_Pointer_Button1 = 0xfee9
  1836. const m_XK_Pointer_Button2 = 0xfeea
  1837. const m_XK_Pointer_Button3 = 0xfeeb
  1838. const m_XK_Pointer_Button4 = 0xfeec
  1839. const m_XK_Pointer_Button5 = 0xfeed
  1840. const m_XK_Pointer_Button_Dflt = 0xfee8
  1841. const m_XK_Pointer_DblClick1 = 0xfeef
  1842. const m_XK_Pointer_DblClick2 = 0xfef0
  1843. const m_XK_Pointer_DblClick3 = 0xfef1
  1844. const m_XK_Pointer_DblClick4 = 0xfef2
  1845. const m_XK_Pointer_DblClick5 = 0xfef3
  1846. const m_XK_Pointer_DblClick_Dflt = 0xfeee
  1847. const m_XK_Pointer_DfltBtnNext = 0xfefb
  1848. const m_XK_Pointer_DfltBtnPrev = 0xfefc
  1849. const m_XK_Pointer_Down = 0xfee3
  1850. const m_XK_Pointer_DownLeft = 0xfee6
  1851. const m_XK_Pointer_DownRight = 0xfee7
  1852. const m_XK_Pointer_Drag1 = 0xfef5
  1853. const m_XK_Pointer_Drag2 = 0xfef6
  1854. const m_XK_Pointer_Drag3 = 0xfef7
  1855. const m_XK_Pointer_Drag4 = 0xfef8
  1856. const m_XK_Pointer_Drag5 = 0xfefd
  1857. const m_XK_Pointer_Drag_Dflt = 0xfef4
  1858. const m_XK_Pointer_EnableKeys = 0xfef9
  1859. const m_XK_Pointer_Left = 0xfee0
  1860. const m_XK_Pointer_Right = 0xfee1
  1861. const m_XK_Pointer_Up = 0xfee2
  1862. const m_XK_Pointer_UpLeft = 0xfee4
  1863. const m_XK_Pointer_UpRight = 0xfee5
  1864. const m_XK_Prev_Virtual_Screen = 0xfed1
  1865. const m_XK_PreviousCandidate = 0xff3e
  1866. const m_XK_Print = 0xff61
  1867. const m_XK_Prior = 0xff55
  1868. const m_XK_Q = 0x0051
  1869. const m_XK_R = 0x0052
  1870. const m_XK_R1 = 0xffd2
  1871. const m_XK_R10 = 0xffdb
  1872. const m_XK_R11 = 0xffdc
  1873. const m_XK_R12 = 0xffdd
  1874. const m_XK_R13 = 0xffde
  1875. const m_XK_R14 = 0xffdf
  1876. const m_XK_R15 = 0xffe0
  1877. const m_XK_R2 = 0xffd3
  1878. const m_XK_R3 = 0xffd4
  1879. const m_XK_R4 = 0xffd5
  1880. const m_XK_R5 = 0xffd6
  1881. const m_XK_R6 = 0xffd7
  1882. const m_XK_R7 = 0xffd8
  1883. const m_XK_R8 = 0xffd9
  1884. const m_XK_R9 = 0xffda
  1885. const m_XK_Racute = 0x01c0
  1886. const m_XK_Rcaron = 0x01d8
  1887. const m_XK_Rcedilla = 0x03a3
  1888. const m_XK_Redo = 0xff66
  1889. const m_XK_RepeatKeys_Enable = 0xfe72
  1890. const m_XK_Return = 0xff0d
  1891. const m_XK_Right = 0xff53
  1892. const m_XK_Romaji = 0xff24
  1893. const m_XK_RupeeSign = 0x10020a8
  1894. const m_XK_S = 0x0053
  1895. const m_XK_SCHWA = 0x100018f
  1896. const m_XK_Sabovedot = 0x1001e60
  1897. const m_XK_Sacute = 0x01a6
  1898. const m_XK_Scaron = 0x01a9
  1899. const m_XK_Scedilla = 0x01aa
  1900. const m_XK_Scircumflex = 0x02de
  1901. const m_XK_Scroll_Lock = 0xff14
  1902. const m_XK_Select = 0xff60
  1903. const m_XK_Serbian_DJE = 0x06b1
  1904. const m_XK_Serbian_DZE = 0x06bf
  1905. const m_XK_Serbian_JE = 0x06b8
  1906. const m_XK_Serbian_LJE = 0x06b9
  1907. const m_XK_Serbian_NJE = 0x06ba
  1908. const m_XK_Serbian_TSHE = 0x06bb
  1909. const m_XK_Serbian_dje = 0x06a1
  1910. const m_XK_Serbian_dze = 0x06af
  1911. const m_XK_Serbian_je = 0x06a8
  1912. const m_XK_Serbian_lje = 0x06a9
  1913. const m_XK_Serbian_nje = 0x06aa
  1914. const m_XK_Serbian_tshe = 0x06ab
  1915. const m_XK_Shift_L = 0xffe1
  1916. const m_XK_Shift_Lock = 0xffe6
  1917. const m_XK_Shift_R = 0xffe2
  1918. const m_XK_SingleCandidate = 0xff3c
  1919. const m_XK_Sinh_a = 0x1000d85
  1920. const m_XK_Sinh_aa = 0x1000d86
  1921. const m_XK_Sinh_aa2 = 0x1000dcf
  1922. const m_XK_Sinh_ae = 0x1000d87
  1923. const m_XK_Sinh_ae2 = 0x1000dd0
  1924. const m_XK_Sinh_aee = 0x1000d88
  1925. const m_XK_Sinh_aee2 = 0x1000dd1
  1926. const m_XK_Sinh_ai = 0x1000d93
  1927. const m_XK_Sinh_ai2 = 0x1000ddb
  1928. const m_XK_Sinh_al = 0x1000dca
  1929. const m_XK_Sinh_au = 0x1000d96
  1930. const m_XK_Sinh_au2 = 0x1000dde
  1931. const m_XK_Sinh_ba = 0x1000db6
  1932. const m_XK_Sinh_bha = 0x1000db7
  1933. const m_XK_Sinh_ca = 0x1000da0
  1934. const m_XK_Sinh_cha = 0x1000da1
  1935. const m_XK_Sinh_dda = 0x1000da9
  1936. const m_XK_Sinh_ddha = 0x1000daa
  1937. const m_XK_Sinh_dha = 0x1000daf
  1938. const m_XK_Sinh_dhha = 0x1000db0
  1939. const m_XK_Sinh_e = 0x1000d91
  1940. const m_XK_Sinh_e2 = 0x1000dd9
  1941. const m_XK_Sinh_ee = 0x1000d92
  1942. const m_XK_Sinh_ee2 = 0x1000dda
  1943. const m_XK_Sinh_fa = 0x1000dc6
  1944. const m_XK_Sinh_ga = 0x1000d9c
  1945. const m_XK_Sinh_gha = 0x1000d9d
  1946. const m_XK_Sinh_h2 = 0x1000d83
  1947. const m_XK_Sinh_ha = 0x1000dc4
  1948. const m_XK_Sinh_i = 0x1000d89
  1949. const m_XK_Sinh_i2 = 0x1000dd2
  1950. const m_XK_Sinh_ii = 0x1000d8a
  1951. const m_XK_Sinh_ii2 = 0x1000dd3
  1952. const m_XK_Sinh_ja = 0x1000da2
  1953. const m_XK_Sinh_jha = 0x1000da3
  1954. const m_XK_Sinh_jnya = 0x1000da5
  1955. const m_XK_Sinh_ka = 0x1000d9a
  1956. const m_XK_Sinh_kha = 0x1000d9b
  1957. const m_XK_Sinh_kunddaliya = 0x1000df4
  1958. const m_XK_Sinh_la = 0x1000dbd
  1959. const m_XK_Sinh_lla = 0x1000dc5
  1960. const m_XK_Sinh_lu = 0x1000d8f
  1961. const m_XK_Sinh_lu2 = 0x1000ddf
  1962. const m_XK_Sinh_luu = 0x1000d90
  1963. const m_XK_Sinh_luu2 = 0x1000df3
  1964. const m_XK_Sinh_ma = 0x1000db8
  1965. const m_XK_Sinh_mba = 0x1000db9
  1966. const m_XK_Sinh_na = 0x1000db1
  1967. const m_XK_Sinh_ndda = 0x1000dac
  1968. const m_XK_Sinh_ndha = 0x1000db3
  1969. const m_XK_Sinh_ng = 0x1000d82
  1970. const m_XK_Sinh_ng2 = 0x1000d9e
  1971. const m_XK_Sinh_nga = 0x1000d9f
  1972. const m_XK_Sinh_nja = 0x1000da6
  1973. const m_XK_Sinh_nna = 0x1000dab
  1974. const m_XK_Sinh_nya = 0x1000da4
  1975. const m_XK_Sinh_o = 0x1000d94
  1976. const m_XK_Sinh_o2 = 0x1000ddc
  1977. const m_XK_Sinh_oo = 0x1000d95
  1978. const m_XK_Sinh_oo2 = 0x1000ddd
  1979. const m_XK_Sinh_pa = 0x1000db4
  1980. const m_XK_Sinh_pha = 0x1000db5
  1981. const m_XK_Sinh_ra = 0x1000dbb
  1982. const m_XK_Sinh_ri = 0x1000d8d
  1983. const m_XK_Sinh_rii = 0x1000d8e
  1984. const m_XK_Sinh_ru2 = 0x1000dd8
  1985. const m_XK_Sinh_ruu2 = 0x1000df2
  1986. const m_XK_Sinh_sa = 0x1000dc3
  1987. const m_XK_Sinh_sha = 0x1000dc1
  1988. const m_XK_Sinh_ssha = 0x1000dc2
  1989. const m_XK_Sinh_tha = 0x1000dad
  1990. const m_XK_Sinh_thha = 0x1000dae
  1991. const m_XK_Sinh_tta = 0x1000da7
  1992. const m_XK_Sinh_ttha = 0x1000da8
  1993. const m_XK_Sinh_u = 0x1000d8b
  1994. const m_XK_Sinh_u2 = 0x1000dd4
  1995. const m_XK_Sinh_uu = 0x1000d8c
  1996. const m_XK_Sinh_uu2 = 0x1000dd6
  1997. const m_XK_Sinh_va = 0x1000dc0
  1998. const m_XK_Sinh_ya = 0x1000dba
  1999. const m_XK_SlowKeys_Enable = 0xfe73
  2000. const m_XK_StickyKeys_Enable = 0xfe75
  2001. const m_XK_Super_L = 0xffeb
  2002. const m_XK_Super_R = 0xffec
  2003. const m_XK_Sys_Req = 0xff15
  2004. const m_XK_T = 0x0054
  2005. const m_XK_THORN = 0x00de
  2006. const m_XK_Tab = 0xff09
  2007. const m_XK_Tabovedot = 0x1001e6a
  2008. const m_XK_Tcaron = 0x01ab
  2009. const m_XK_Tcedilla = 0x01de
  2010. const m_XK_Terminate_Server = 0xfed5
  2011. const m_XK_Thai_baht = 0x0ddf
  2012. const m_XK_Thai_bobaimai = 0x0dba
  2013. const m_XK_Thai_chochan = 0x0da8
  2014. const m_XK_Thai_chochang = 0x0daa
  2015. const m_XK_Thai_choching = 0x0da9
  2016. const m_XK_Thai_chochoe = 0x0dac
  2017. const m_XK_Thai_dochada = 0x0dae
  2018. const m_XK_Thai_dodek = 0x0db4
  2019. const m_XK_Thai_fofa = 0x0dbd
  2020. const m_XK_Thai_fofan = 0x0dbf
  2021. const m_XK_Thai_hohip = 0x0dcb
  2022. const m_XK_Thai_honokhuk = 0x0dce
  2023. const m_XK_Thai_khokhai = 0x0da2
  2024. const m_XK_Thai_khokhon = 0x0da5
  2025. const m_XK_Thai_khokhuat = 0x0da3
  2026. const m_XK_Thai_khokhwai = 0x0da4
  2027. const m_XK_Thai_khorakhang = 0x0da6
  2028. const m_XK_Thai_kokai = 0x0da1
  2029. const m_XK_Thai_lakkhangyao = 0x0de5
  2030. const m_XK_Thai_lekchet = 0x0df7
  2031. const m_XK_Thai_lekha = 0x0df5
  2032. const m_XK_Thai_lekhok = 0x0df6
  2033. const m_XK_Thai_lekkao = 0x0df9
  2034. const m_XK_Thai_leknung = 0x0df1
  2035. const m_XK_Thai_lekpaet = 0x0df8
  2036. const m_XK_Thai_leksam = 0x0df3
  2037. const m_XK_Thai_leksi = 0x0df4
  2038. const m_XK_Thai_leksong = 0x0df2
  2039. const m_XK_Thai_leksun = 0x0df0
  2040. const m_XK_Thai_lochula = 0x0dcc
  2041. const m_XK_Thai_loling = 0x0dc5
  2042. const m_XK_Thai_lu = 0x0dc6
  2043. const m_XK_Thai_maichattawa = 0x0deb
  2044. const m_XK_Thai_maiek = 0x0de8
  2045. const m_XK_Thai_maihanakat = 0x0dd1
  2046. const m_XK_Thai_maihanakat_maitho = 0x0dde
  2047. const m_XK_Thai_maitaikhu = 0x0de7
  2048. const m_XK_Thai_maitho = 0x0de9
  2049. const m_XK_Thai_maitri = 0x0dea
  2050. const m_XK_Thai_maiyamok = 0x0de6
  2051. const m_XK_Thai_moma = 0x0dc1
  2052. const m_XK_Thai_ngongu = 0x0da7
  2053. const m_XK_Thai_nikhahit = 0x0ded
  2054. const m_XK_Thai_nonen = 0x0db3
  2055. const m_XK_Thai_nonu = 0x0db9
  2056. const m_XK_Thai_oang = 0x0dcd
  2057. const m_XK_Thai_paiyannoi = 0x0dcf
  2058. const m_XK_Thai_phinthu = 0x0dda
  2059. const m_XK_Thai_phophan = 0x0dbe
  2060. const m_XK_Thai_phophung = 0x0dbc
  2061. const m_XK_Thai_phosamphao = 0x0dc0
  2062. const m_XK_Thai_popla = 0x0dbb
  2063. const m_XK_Thai_rorua = 0x0dc3
  2064. const m_XK_Thai_ru = 0x0dc4
  2065. const m_XK_Thai_saraa = 0x0dd0
  2066. const m_XK_Thai_saraaa = 0x0dd2
  2067. const m_XK_Thai_saraae = 0x0de1
  2068. const m_XK_Thai_saraaimaimalai = 0x0de4
  2069. const m_XK_Thai_saraaimaimuan = 0x0de3
  2070. const m_XK_Thai_saraam = 0x0dd3
  2071. const m_XK_Thai_sarae = 0x0de0
  2072. const m_XK_Thai_sarai = 0x0dd4
  2073. const m_XK_Thai_saraii = 0x0dd5
  2074. const m_XK_Thai_sarao = 0x0de2
  2075. const m_XK_Thai_sarau = 0x0dd8
  2076. const m_XK_Thai_saraue = 0x0dd6
  2077. const m_XK_Thai_sarauee = 0x0dd7
  2078. const m_XK_Thai_sarauu = 0x0dd9
  2079. const m_XK_Thai_sorusi = 0x0dc9
  2080. const m_XK_Thai_sosala = 0x0dc8
  2081. const m_XK_Thai_soso = 0x0dab
  2082. const m_XK_Thai_sosua = 0x0dca
  2083. const m_XK_Thai_thanthakhat = 0x0dec
  2084. const m_XK_Thai_thonangmontho = 0x0db1
  2085. const m_XK_Thai_thophuthao = 0x0db2
  2086. const m_XK_Thai_thothahan = 0x0db7
  2087. const m_XK_Thai_thothan = 0x0db0
  2088. const m_XK_Thai_thothong = 0x0db8
  2089. const m_XK_Thai_thothung = 0x0db6
  2090. const m_XK_Thai_topatak = 0x0daf
  2091. const m_XK_Thai_totao = 0x0db5
  2092. const m_XK_Thai_wowaen = 0x0dc7
  2093. const m_XK_Thai_yoyak = 0x0dc2
  2094. const m_XK_Thai_yoying = 0x0dad
  2095. const m_XK_Thorn = 0x00de
  2096. const m_XK_Touroku = 0xff2b
  2097. const m_XK_Tslash = 0x03ac
  2098. const m_XK_U = 0x0055
  2099. const m_XK_Uacute = 0x00da
  2100. const m_XK_Ubelowdot = 0x1001ee4
  2101. const m_XK_Ubreve = 0x02dd
  2102. const m_XK_Ucircumflex = 0x00db
  2103. const m_XK_Udiaeresis = 0x00dc
  2104. const m_XK_Udoubleacute = 0x01db
  2105. const m_XK_Ugrave = 0x00d9
  2106. const m_XK_Uhook = 0x1001ee6
  2107. const m_XK_Uhorn = 0x10001af
  2108. const m_XK_Uhornacute = 0x1001ee8
  2109. const m_XK_Uhornbelowdot = 0x1001ef0
  2110. const m_XK_Uhorngrave = 0x1001eea
  2111. const m_XK_Uhornhook = 0x1001eec
  2112. const m_XK_Uhorntilde = 0x1001eee
  2113. const m_XK_Ukrainian_GHE_WITH_UPTURN = 0x06bd
  2114. const m_XK_Ukrainian_I = 0x06b6
  2115. const m_XK_Ukrainian_IE = 0x06b4
  2116. const m_XK_Ukrainian_YI = 0x06b7
  2117. const m_XK_Ukrainian_ghe_with_upturn = 0x06ad
  2118. const m_XK_Ukrainian_i = 0x06a6
  2119. const m_XK_Ukrainian_ie = 0x06a4
  2120. const m_XK_Ukrainian_yi = 0x06a7
  2121. const m_XK_Ukranian_I = 0x06b6
  2122. const m_XK_Ukranian_JE = 0x06b4
  2123. const m_XK_Ukranian_YI = 0x06b7
  2124. const m_XK_Ukranian_i = 0x06a6
  2125. const m_XK_Ukranian_je = 0x06a4
  2126. const m_XK_Ukranian_yi = 0x06a7
  2127. const m_XK_Umacron = 0x03de
  2128. const m_XK_Undo = 0xff65
  2129. const m_XK_Uogonek = 0x03d9
  2130. const m_XK_Up = 0xff52
  2131. const m_XK_Uring = 0x01d9
  2132. const m_XK_Utilde = 0x03dd
  2133. const m_XK_V = 0x0056
  2134. const m_XK_VoidSymbol = 0xffffff
  2135. const m_XK_W = 0x0057
  2136. const m_XK_Wacute = 0x1001e82
  2137. const m_XK_Wcircumflex = 0x1000174
  2138. const m_XK_Wdiaeresis = 0x1001e84
  2139. const m_XK_Wgrave = 0x1001e80
  2140. const m_XK_WonSign = 0x10020a9
  2141. const m_XK_X = 0x0058
  2142. const m_XK_Xabovedot = 0x1001e8a
  2143. const m_XK_Y = 0x0059
  2144. const m_XK_Yacute = 0x00dd
  2145. const m_XK_Ybelowdot = 0x1001ef4
  2146. const m_XK_Ycircumflex = 0x1000176
  2147. const m_XK_Ydiaeresis = 0x13be
  2148. const m_XK_Ygrave = 0x1001ef2
  2149. const m_XK_Yhook = 0x1001ef6
  2150. const m_XK_Ytilde = 0x1001ef8
  2151. const m_XK_Z = 0x005a
  2152. const m_XK_Zabovedot = 0x01af
  2153. const m_XK_Zacute = 0x01ac
  2154. const m_XK_Zcaron = 0x01ae
  2155. const m_XK_Zen_Koho = 0xff3d
  2156. const m_XK_Zenkaku = 0xff28
  2157. const m_XK_Zenkaku_Hankaku = 0xff2a
  2158. const m_XK_Zstroke = 0x10001b5
  2159. const m_XK_a = 0x0061
  2160. const m_XK_aacute = 0x00e1
  2161. const m_XK_abelowdot = 0x1001ea1
  2162. const m_XK_abovedot = 0x01ff
  2163. const m_XK_abreve = 0x01e3
  2164. const m_XK_abreveacute = 0x1001eaf
  2165. const m_XK_abrevebelowdot = 0x1001eb7
  2166. const m_XK_abrevegrave = 0x1001eb1
  2167. const m_XK_abrevehook = 0x1001eb3
  2168. const m_XK_abrevetilde = 0x1001eb5
  2169. const m_XK_acircumflex = 0x00e2
  2170. const m_XK_acircumflexacute = 0x1001ea5
  2171. const m_XK_acircumflexbelowdot = 0x1001ead
  2172. const m_XK_acircumflexgrave = 0x1001ea7
  2173. const m_XK_acircumflexhook = 0x1001ea9
  2174. const m_XK_acircumflextilde = 0x1001eab
  2175. const m_XK_acute = 0x00b4
  2176. const m_XK_adiaeresis = 0x00e4
  2177. const m_XK_ae = 0x00e6
  2178. const m_XK_agrave = 0x00e0
  2179. const m_XK_ahook = 0x1001ea3
  2180. const m_XK_amacron = 0x03e0
  2181. const m_XK_ampersand = 0x0026
  2182. const m_XK_aogonek = 0x01b1
  2183. const m_XK_apostrophe = 0x0027
  2184. const m_XK_approxeq = 0x1002248
  2185. const m_XK_aring = 0x00e5
  2186. const m_XK_asciicircum = 0x005e
  2187. const m_XK_asciitilde = 0x007e
  2188. const m_XK_asterisk = 0x002a
  2189. const m_XK_at = 0x0040
  2190. const m_XK_atilde = 0x00e3
  2191. const m_XK_b = 0x0062
  2192. const m_XK_babovedot = 0x1001e03
  2193. const m_XK_backslash = 0x005c
  2194. const m_XK_bar = 0x007c
  2195. const m_XK_because = 0x1002235
  2196. const m_XK_braceleft = 0x007b
  2197. const m_XK_braceright = 0x007d
  2198. const m_XK_bracketleft = 0x005b
  2199. const m_XK_bracketright = 0x005d
  2200. const m_XK_braille_blank = 0x1002800
  2201. const m_XK_braille_dot_1 = 0xfff1
  2202. const m_XK_braille_dot_10 = 0xfffa
  2203. const m_XK_braille_dot_2 = 0xfff2
  2204. const m_XK_braille_dot_3 = 0xfff3
  2205. const m_XK_braille_dot_4 = 0xfff4
  2206. const m_XK_braille_dot_5 = 0xfff5
  2207. const m_XK_braille_dot_6 = 0xfff6
  2208. const m_XK_braille_dot_7 = 0xfff7
  2209. const m_XK_braille_dot_8 = 0xfff8
  2210. const m_XK_braille_dot_9 = 0xfff9
  2211. const m_XK_braille_dots_1 = 0x1002801
  2212. const m_XK_braille_dots_12 = 0x1002803
  2213. const m_XK_braille_dots_123 = 0x1002807
  2214. const m_XK_braille_dots_1234 = 0x100280f
  2215. const m_XK_braille_dots_12345 = 0x100281f
  2216. const m_XK_braille_dots_123456 = 0x100283f
  2217. const m_XK_braille_dots_1234567 = 0x100287f
  2218. const m_XK_braille_dots_12345678 = 0x10028ff
  2219. const m_XK_braille_dots_1234568 = 0x10028bf
  2220. const m_XK_braille_dots_123457 = 0x100285f
  2221. const m_XK_braille_dots_1234578 = 0x10028df
  2222. const m_XK_braille_dots_123458 = 0x100289f
  2223. const m_XK_braille_dots_12346 = 0x100282f
  2224. const m_XK_braille_dots_123467 = 0x100286f
  2225. const m_XK_braille_dots_1234678 = 0x10028ef
  2226. const m_XK_braille_dots_123468 = 0x10028af
  2227. const m_XK_braille_dots_12347 = 0x100284f
  2228. const m_XK_braille_dots_123478 = 0x10028cf
  2229. const m_XK_braille_dots_12348 = 0x100288f
  2230. const m_XK_braille_dots_1235 = 0x1002817
  2231. const m_XK_braille_dots_12356 = 0x1002837
  2232. const m_XK_braille_dots_123567 = 0x1002877
  2233. const m_XK_braille_dots_1235678 = 0x10028f7
  2234. const m_XK_braille_dots_123568 = 0x10028b7
  2235. const m_XK_braille_dots_12357 = 0x1002857
  2236. const m_XK_braille_dots_123578 = 0x10028d7
  2237. const m_XK_braille_dots_12358 = 0x1002897
  2238. const m_XK_braille_dots_1236 = 0x1002827
  2239. const m_XK_braille_dots_12367 = 0x1002867
  2240. const m_XK_braille_dots_123678 = 0x10028e7
  2241. const m_XK_braille_dots_12368 = 0x10028a7
  2242. const m_XK_braille_dots_1237 = 0x1002847
  2243. const m_XK_braille_dots_12378 = 0x10028c7
  2244. const m_XK_braille_dots_1238 = 0x1002887
  2245. const m_XK_braille_dots_124 = 0x100280b
  2246. const m_XK_braille_dots_1245 = 0x100281b
  2247. const m_XK_braille_dots_12456 = 0x100283b
  2248. const m_XK_braille_dots_124567 = 0x100287b
  2249. const m_XK_braille_dots_1245678 = 0x10028fb
  2250. const m_XK_braille_dots_124568 = 0x10028bb
  2251. const m_XK_braille_dots_12457 = 0x100285b
  2252. const m_XK_braille_dots_124578 = 0x10028db
  2253. const m_XK_braille_dots_12458 = 0x100289b
  2254. const m_XK_braille_dots_1246 = 0x100282b
  2255. const m_XK_braille_dots_12467 = 0x100286b
  2256. const m_XK_braille_dots_124678 = 0x10028eb
  2257. const m_XK_braille_dots_12468 = 0x10028ab
  2258. const m_XK_braille_dots_1247 = 0x100284b
  2259. const m_XK_braille_dots_12478 = 0x10028cb
  2260. const m_XK_braille_dots_1248 = 0x100288b
  2261. const m_XK_braille_dots_125 = 0x1002813
  2262. const m_XK_braille_dots_1256 = 0x1002833
  2263. const m_XK_braille_dots_12567 = 0x1002873
  2264. const m_XK_braille_dots_125678 = 0x10028f3
  2265. const m_XK_braille_dots_12568 = 0x10028b3
  2266. const m_XK_braille_dots_1257 = 0x1002853
  2267. const m_XK_braille_dots_12578 = 0x10028d3
  2268. const m_XK_braille_dots_1258 = 0x1002893
  2269. const m_XK_braille_dots_126 = 0x1002823
  2270. const m_XK_braille_dots_1267 = 0x1002863
  2271. const m_XK_braille_dots_12678 = 0x10028e3
  2272. const m_XK_braille_dots_1268 = 0x10028a3
  2273. const m_XK_braille_dots_127 = 0x1002843
  2274. const m_XK_braille_dots_1278 = 0x10028c3
  2275. const m_XK_braille_dots_128 = 0x1002883
  2276. const m_XK_braille_dots_13 = 0x1002805
  2277. const m_XK_braille_dots_134 = 0x100280d
  2278. const m_XK_braille_dots_1345 = 0x100281d
  2279. const m_XK_braille_dots_13456 = 0x100283d
  2280. const m_XK_braille_dots_134567 = 0x100287d
  2281. const m_XK_braille_dots_1345678 = 0x10028fd
  2282. const m_XK_braille_dots_134568 = 0x10028bd
  2283. const m_XK_braille_dots_13457 = 0x100285d
  2284. const m_XK_braille_dots_134578 = 0x10028dd
  2285. const m_XK_braille_dots_13458 = 0x100289d
  2286. const m_XK_braille_dots_1346 = 0x100282d
  2287. const m_XK_braille_dots_13467 = 0x100286d
  2288. const m_XK_braille_dots_134678 = 0x10028ed
  2289. const m_XK_braille_dots_13468 = 0x10028ad
  2290. const m_XK_braille_dots_1347 = 0x100284d
  2291. const m_XK_braille_dots_13478 = 0x10028cd
  2292. const m_XK_braille_dots_1348 = 0x100288d
  2293. const m_XK_braille_dots_135 = 0x1002815
  2294. const m_XK_braille_dots_1356 = 0x1002835
  2295. const m_XK_braille_dots_13567 = 0x1002875
  2296. const m_XK_braille_dots_135678 = 0x10028f5
  2297. const m_XK_braille_dots_13568 = 0x10028b5
  2298. const m_XK_braille_dots_1357 = 0x1002855
  2299. const m_XK_braille_dots_13578 = 0x10028d5
  2300. const m_XK_braille_dots_1358 = 0x1002895
  2301. const m_XK_braille_dots_136 = 0x1002825
  2302. const m_XK_braille_dots_1367 = 0x1002865
  2303. const m_XK_braille_dots_13678 = 0x10028e5
  2304. const m_XK_braille_dots_1368 = 0x10028a5
  2305. const m_XK_braille_dots_137 = 0x1002845
  2306. const m_XK_braille_dots_1378 = 0x10028c5
  2307. const m_XK_braille_dots_138 = 0x1002885
  2308. const m_XK_braille_dots_14 = 0x1002809
  2309. const m_XK_braille_dots_145 = 0x1002819
  2310. const m_XK_braille_dots_1456 = 0x1002839
  2311. const m_XK_braille_dots_14567 = 0x1002879
  2312. const m_XK_braille_dots_145678 = 0x10028f9
  2313. const m_XK_braille_dots_14568 = 0x10028b9
  2314. const m_XK_braille_dots_1457 = 0x1002859
  2315. const m_XK_braille_dots_14578 = 0x10028d9
  2316. const m_XK_braille_dots_1458 = 0x1002899
  2317. const m_XK_braille_dots_146 = 0x1002829
  2318. const m_XK_braille_dots_1467 = 0x1002869
  2319. const m_XK_braille_dots_14678 = 0x10028e9
  2320. const m_XK_braille_dots_1468 = 0x10028a9
  2321. const m_XK_braille_dots_147 = 0x1002849
  2322. const m_XK_braille_dots_1478 = 0x10028c9
  2323. const m_XK_braille_dots_148 = 0x1002889
  2324. const m_XK_braille_dots_15 = 0x1002811
  2325. const m_XK_braille_dots_156 = 0x1002831
  2326. const m_XK_braille_dots_1567 = 0x1002871
  2327. const m_XK_braille_dots_15678 = 0x10028f1
  2328. const m_XK_braille_dots_1568 = 0x10028b1
  2329. const m_XK_braille_dots_157 = 0x1002851
  2330. const m_XK_braille_dots_1578 = 0x10028d1
  2331. const m_XK_braille_dots_158 = 0x1002891
  2332. const m_XK_braille_dots_16 = 0x1002821
  2333. const m_XK_braille_dots_167 = 0x1002861
  2334. const m_XK_braille_dots_1678 = 0x10028e1
  2335. const m_XK_braille_dots_168 = 0x10028a1
  2336. const m_XK_braille_dots_17 = 0x1002841
  2337. const m_XK_braille_dots_178 = 0x10028c1
  2338. const m_XK_braille_dots_18 = 0x1002881
  2339. const m_XK_braille_dots_2 = 0x1002802
  2340. const m_XK_braille_dots_23 = 0x1002806
  2341. const m_XK_braille_dots_234 = 0x100280e
  2342. const m_XK_braille_dots_2345 = 0x100281e
  2343. const m_XK_braille_dots_23456 = 0x100283e
  2344. const m_XK_braille_dots_234567 = 0x100287e
  2345. const m_XK_braille_dots_2345678 = 0x10028fe
  2346. const m_XK_braille_dots_234568 = 0x10028be
  2347. const m_XK_braille_dots_23457 = 0x100285e
  2348. const m_XK_braille_dots_234578 = 0x10028de
  2349. const m_XK_braille_dots_23458 = 0x100289e
  2350. const m_XK_braille_dots_2346 = 0x100282e
  2351. const m_XK_braille_dots_23467 = 0x100286e
  2352. const m_XK_braille_dots_234678 = 0x10028ee
  2353. const m_XK_braille_dots_23468 = 0x10028ae
  2354. const m_XK_braille_dots_2347 = 0x100284e
  2355. const m_XK_braille_dots_23478 = 0x10028ce
  2356. const m_XK_braille_dots_2348 = 0x100288e
  2357. const m_XK_braille_dots_235 = 0x1002816
  2358. const m_XK_braille_dots_2356 = 0x1002836
  2359. const m_XK_braille_dots_23567 = 0x1002876
  2360. const m_XK_braille_dots_235678 = 0x10028f6
  2361. const m_XK_braille_dots_23568 = 0x10028b6
  2362. const m_XK_braille_dots_2357 = 0x1002856
  2363. const m_XK_braille_dots_23578 = 0x10028d6
  2364. const m_XK_braille_dots_2358 = 0x1002896
  2365. const m_XK_braille_dots_236 = 0x1002826
  2366. const m_XK_braille_dots_2367 = 0x1002866
  2367. const m_XK_braille_dots_23678 = 0x10028e6
  2368. const m_XK_braille_dots_2368 = 0x10028a6
  2369. const m_XK_braille_dots_237 = 0x1002846
  2370. const m_XK_braille_dots_2378 = 0x10028c6
  2371. const m_XK_braille_dots_238 = 0x1002886
  2372. const m_XK_braille_dots_24 = 0x100280a
  2373. const m_XK_braille_dots_245 = 0x100281a
  2374. const m_XK_braille_dots_2456 = 0x100283a
  2375. const m_XK_braille_dots_24567 = 0x100287a
  2376. const m_XK_braille_dots_245678 = 0x10028fa
  2377. const m_XK_braille_dots_24568 = 0x10028ba
  2378. const m_XK_braille_dots_2457 = 0x100285a
  2379. const m_XK_braille_dots_24578 = 0x10028da
  2380. const m_XK_braille_dots_2458 = 0x100289a
  2381. const m_XK_braille_dots_246 = 0x100282a
  2382. const m_XK_braille_dots_2467 = 0x100286a
  2383. const m_XK_braille_dots_24678 = 0x10028ea
  2384. const m_XK_braille_dots_2468 = 0x10028aa
  2385. const m_XK_braille_dots_247 = 0x100284a
  2386. const m_XK_braille_dots_2478 = 0x10028ca
  2387. const m_XK_braille_dots_248 = 0x100288a
  2388. const m_XK_braille_dots_25 = 0x1002812
  2389. const m_XK_braille_dots_256 = 0x1002832
  2390. const m_XK_braille_dots_2567 = 0x1002872
  2391. const m_XK_braille_dots_25678 = 0x10028f2
  2392. const m_XK_braille_dots_2568 = 0x10028b2
  2393. const m_XK_braille_dots_257 = 0x1002852
  2394. const m_XK_braille_dots_2578 = 0x10028d2
  2395. const m_XK_braille_dots_258 = 0x1002892
  2396. const m_XK_braille_dots_26 = 0x1002822
  2397. const m_XK_braille_dots_267 = 0x1002862
  2398. const m_XK_braille_dots_2678 = 0x10028e2
  2399. const m_XK_braille_dots_268 = 0x10028a2
  2400. const m_XK_braille_dots_27 = 0x1002842
  2401. const m_XK_braille_dots_278 = 0x10028c2
  2402. const m_XK_braille_dots_28 = 0x1002882
  2403. const m_XK_braille_dots_3 = 0x1002804
  2404. const m_XK_braille_dots_34 = 0x100280c
  2405. const m_XK_braille_dots_345 = 0x100281c
  2406. const m_XK_braille_dots_3456 = 0x100283c
  2407. const m_XK_braille_dots_34567 = 0x100287c
  2408. const m_XK_braille_dots_345678 = 0x10028fc
  2409. const m_XK_braille_dots_34568 = 0x10028bc
  2410. const m_XK_braille_dots_3457 = 0x100285c
  2411. const m_XK_braille_dots_34578 = 0x10028dc
  2412. const m_XK_braille_dots_3458 = 0x100289c
  2413. const m_XK_braille_dots_346 = 0x100282c
  2414. const m_XK_braille_dots_3467 = 0x100286c
  2415. const m_XK_braille_dots_34678 = 0x10028ec
  2416. const m_XK_braille_dots_3468 = 0x10028ac
  2417. const m_XK_braille_dots_347 = 0x100284c
  2418. const m_XK_braille_dots_3478 = 0x10028cc
  2419. const m_XK_braille_dots_348 = 0x100288c
  2420. const m_XK_braille_dots_35 = 0x1002814
  2421. const m_XK_braille_dots_356 = 0x1002834
  2422. const m_XK_braille_dots_3567 = 0x1002874
  2423. const m_XK_braille_dots_35678 = 0x10028f4
  2424. const m_XK_braille_dots_3568 = 0x10028b4
  2425. const m_XK_braille_dots_357 = 0x1002854
  2426. const m_XK_braille_dots_3578 = 0x10028d4
  2427. const m_XK_braille_dots_358 = 0x1002894
  2428. const m_XK_braille_dots_36 = 0x1002824
  2429. const m_XK_braille_dots_367 = 0x1002864
  2430. const m_XK_braille_dots_3678 = 0x10028e4
  2431. const m_XK_braille_dots_368 = 0x10028a4
  2432. const m_XK_braille_dots_37 = 0x1002844
  2433. const m_XK_braille_dots_378 = 0x10028c4
  2434. const m_XK_braille_dots_38 = 0x1002884
  2435. const m_XK_braille_dots_4 = 0x1002808
  2436. const m_XK_braille_dots_45 = 0x1002818
  2437. const m_XK_braille_dots_456 = 0x1002838
  2438. const m_XK_braille_dots_4567 = 0x1002878
  2439. const m_XK_braille_dots_45678 = 0x10028f8
  2440. const m_XK_braille_dots_4568 = 0x10028b8
  2441. const m_XK_braille_dots_457 = 0x1002858
  2442. const m_XK_braille_dots_4578 = 0x10028d8
  2443. const m_XK_braille_dots_458 = 0x1002898
  2444. const m_XK_braille_dots_46 = 0x1002828
  2445. const m_XK_braille_dots_467 = 0x1002868
  2446. const m_XK_braille_dots_4678 = 0x10028e8
  2447. const m_XK_braille_dots_468 = 0x10028a8
  2448. const m_XK_braille_dots_47 = 0x1002848
  2449. const m_XK_braille_dots_478 = 0x10028c8
  2450. const m_XK_braille_dots_48 = 0x1002888
  2451. const m_XK_braille_dots_5 = 0x1002810
  2452. const m_XK_braille_dots_56 = 0x1002830
  2453. const m_XK_braille_dots_567 = 0x1002870
  2454. const m_XK_braille_dots_5678 = 0x10028f0
  2455. const m_XK_braille_dots_568 = 0x10028b0
  2456. const m_XK_braille_dots_57 = 0x1002850
  2457. const m_XK_braille_dots_578 = 0x10028d0
  2458. const m_XK_braille_dots_58 = 0x1002890
  2459. const m_XK_braille_dots_6 = 0x1002820
  2460. const m_XK_braille_dots_67 = 0x1002860
  2461. const m_XK_braille_dots_678 = 0x10028e0
  2462. const m_XK_braille_dots_68 = 0x10028a0
  2463. const m_XK_braille_dots_7 = 0x1002840
  2464. const m_XK_braille_dots_78 = 0x10028c0
  2465. const m_XK_braille_dots_8 = 0x1002880
  2466. const m_XK_breve = 0x01a2
  2467. const m_XK_brokenbar = 0x00a6
  2468. const m_XK_c = 0x0063
  2469. const m_XK_c_h = 0xfea3
  2470. const m_XK_cabovedot = 0x02e5
  2471. const m_XK_cacute = 0x01e6
  2472. const m_XK_caron = 0x01b7
  2473. const m_XK_ccaron = 0x01e8
  2474. const m_XK_ccedilla = 0x00e7
  2475. const m_XK_ccircumflex = 0x02e6
  2476. const m_XK_cedilla = 0x00b8
  2477. const m_XK_cent = 0x00a2
  2478. const m_XK_ch = 0xfea0
  2479. const m_XK_colon = 0x003a
  2480. const m_XK_comma = 0x002c
  2481. const m_XK_containsas = 0x100220B
  2482. const m_XK_copyright = 0x00a9
  2483. const m_XK_cuberoot = 0x100221B
  2484. const m_XK_currency = 0x00a4
  2485. const m_XK_d = 0x0064
  2486. const m_XK_dabovedot = 0x1001e0b
  2487. const m_XK_dcaron = 0x01ef
  2488. const m_XK_dead_A = 0xfe81
  2489. const m_XK_dead_E = 0xfe83
  2490. const m_XK_dead_I = 0xfe85
  2491. const m_XK_dead_O = 0xfe87
  2492. const m_XK_dead_U = 0xfe89
  2493. const m_XK_dead_a = 0xfe80
  2494. const m_XK_dead_abovecomma = 0xfe64
  2495. const m_XK_dead_abovedot = 0xfe56
  2496. const m_XK_dead_abovereversedcomma = 0xfe65
  2497. const m_XK_dead_abovering = 0xfe58
  2498. const m_XK_dead_aboveverticalline = 0xfe91
  2499. const m_XK_dead_acute = 0xfe51
  2500. const m_XK_dead_belowbreve = 0xfe6b
  2501. const m_XK_dead_belowcircumflex = 0xfe69
  2502. const m_XK_dead_belowcomma = 0xfe6e
  2503. const m_XK_dead_belowdiaeresis = 0xfe6c
  2504. const m_XK_dead_belowdot = 0xfe60
  2505. const m_XK_dead_belowmacron = 0xfe68
  2506. const m_XK_dead_belowring = 0xfe67
  2507. const m_XK_dead_belowtilde = 0xfe6a
  2508. const m_XK_dead_belowverticalline = 0xfe92
  2509. const m_XK_dead_breve = 0xfe55
  2510. const m_XK_dead_capital_schwa = 0xfe8b
  2511. const m_XK_dead_caron = 0xfe5a
  2512. const m_XK_dead_cedilla = 0xfe5b
  2513. const m_XK_dead_circumflex = 0xfe52
  2514. const m_XK_dead_currency = 0xfe6f
  2515. const m_XK_dead_dasia = 0xfe65
  2516. const m_XK_dead_diaeresis = 0xfe57
  2517. const m_XK_dead_doubleacute = 0xfe59
  2518. const m_XK_dead_doublegrave = 0xfe66
  2519. const m_XK_dead_e = 0xfe82
  2520. const m_XK_dead_grave = 0xfe50
  2521. const m_XK_dead_greek = 0xfe8c
  2522. const m_XK_dead_hook = 0xfe61
  2523. const m_XK_dead_horn = 0xfe62
  2524. const m_XK_dead_i = 0xfe84
  2525. const m_XK_dead_invertedbreve = 0xfe6d
  2526. const m_XK_dead_iota = 0xfe5d
  2527. const m_XK_dead_longsolidusoverlay = 0xfe93
  2528. const m_XK_dead_lowline = 0xfe90
  2529. const m_XK_dead_macron = 0xfe54
  2530. const m_XK_dead_o = 0xfe86
  2531. const m_XK_dead_ogonek = 0xfe5c
  2532. const m_XK_dead_perispomeni = 0xfe53
  2533. const m_XK_dead_psili = 0xfe64
  2534. const m_XK_dead_semivoiced_sound = 0xfe5f
  2535. const m_XK_dead_small_schwa = 0xfe8a
  2536. const m_XK_dead_stroke = 0xfe63
  2537. const m_XK_dead_tilde = 0xfe53
  2538. const m_XK_dead_u = 0xfe88
  2539. const m_XK_dead_voiced_sound = 0xfe5e
  2540. const m_XK_degree = 0x00b0
  2541. const m_XK_diaeresis = 0x00a8
  2542. const m_XK_dintegral = 0x100222C
  2543. const m_XK_division = 0x00f7
  2544. const m_XK_dollar = 0x0024
  2545. const m_XK_doubleacute = 0x01bd
  2546. const m_XK_dstroke = 0x01f0
  2547. const m_XK_e = 0x0065
  2548. const m_XK_eabovedot = 0x03ec
  2549. const m_XK_eacute = 0x00e9
  2550. const m_XK_ebelowdot = 0x1001eb9
  2551. const m_XK_ecaron = 0x01ec
  2552. const m_XK_ecircumflex = 0x00ea
  2553. const m_XK_ecircumflexacute = 0x1001ebf
  2554. const m_XK_ecircumflexbelowdot = 0x1001ec7
  2555. const m_XK_ecircumflexgrave = 0x1001ec1
  2556. const m_XK_ecircumflexhook = 0x1001ec3
  2557. const m_XK_ecircumflextilde = 0x1001ec5
  2558. const m_XK_ediaeresis = 0x00eb
  2559. const m_XK_egrave = 0x00e8
  2560. const m_XK_ehook = 0x1001ebb
  2561. const m_XK_eightsubscript = 0x1002088
  2562. const m_XK_eightsuperior = 0x1002078
  2563. const m_XK_elementof = 0x1002208
  2564. const m_XK_emacron = 0x03ba
  2565. const m_XK_emptyset = 0x1002205
  2566. const m_XK_eng = 0x03bf
  2567. const m_XK_eogonek = 0x01ea
  2568. const m_XK_equal = 0x003d
  2569. const m_XK_eth = 0x00f0
  2570. const m_XK_etilde = 0x1001ebd
  2571. const m_XK_exclam = 0x0021
  2572. const m_XK_exclamdown = 0x00a1
  2573. const m_XK_ezh = 0x1000292
  2574. const m_XK_f = 0x0066
  2575. const m_XK_fabovedot = 0x1001e1f
  2576. const m_XK_fivesubscript = 0x1002085
  2577. const m_XK_fivesuperior = 0x1002075
  2578. const m_XK_foursubscript = 0x1002084
  2579. const m_XK_foursuperior = 0x1002074
  2580. const m_XK_fourthroot = 0x100221C
  2581. const m_XK_g = 0x0067
  2582. const m_XK_gabovedot = 0x02f5
  2583. const m_XK_gbreve = 0x02bb
  2584. const m_XK_gcaron = 0x10001e7
  2585. const m_XK_gcedilla = 0x03bb
  2586. const m_XK_gcircumflex = 0x02f8
  2587. const m_XK_grave = 0x0060
  2588. const m_XK_greater = 0x003e
  2589. const m_XK_guillemotleft = 0x00ab
  2590. const m_XK_guillemotright = 0x00bb
  2591. const m_XK_h = 0x0068
  2592. const m_XK_hcircumflex = 0x02b6
  2593. const m_XK_hebrew_aleph = 0x0ce0
  2594. const m_XK_hebrew_ayin = 0x0cf2
  2595. const m_XK_hebrew_bet = 0x0ce1
  2596. const m_XK_hebrew_beth = 0x0ce1
  2597. const m_XK_hebrew_chet = 0x0ce7
  2598. const m_XK_hebrew_dalet = 0x0ce3
  2599. const m_XK_hebrew_daleth = 0x0ce3
  2600. const m_XK_hebrew_doublelowline = 0x0cdf
  2601. const m_XK_hebrew_finalkaph = 0x0cea
  2602. const m_XK_hebrew_finalmem = 0x0ced
  2603. const m_XK_hebrew_finalnun = 0x0cef
  2604. const m_XK_hebrew_finalpe = 0x0cf3
  2605. const m_XK_hebrew_finalzade = 0x0cf5
  2606. const m_XK_hebrew_finalzadi = 0x0cf5
  2607. const m_XK_hebrew_gimel = 0x0ce2
  2608. const m_XK_hebrew_gimmel = 0x0ce2
  2609. const m_XK_hebrew_he = 0x0ce4
  2610. const m_XK_hebrew_het = 0x0ce7
  2611. const m_XK_hebrew_kaph = 0x0ceb
  2612. const m_XK_hebrew_kuf = 0x0cf7
  2613. const m_XK_hebrew_lamed = 0x0cec
  2614. const m_XK_hebrew_mem = 0x0cee
  2615. const m_XK_hebrew_nun = 0x0cf0
  2616. const m_XK_hebrew_pe = 0x0cf4
  2617. const m_XK_hebrew_qoph = 0x0cf7
  2618. const m_XK_hebrew_resh = 0x0cf8
  2619. const m_XK_hebrew_samech = 0x0cf1
  2620. const m_XK_hebrew_samekh = 0x0cf1
  2621. const m_XK_hebrew_shin = 0x0cf9
  2622. const m_XK_hebrew_taf = 0x0cfa
  2623. const m_XK_hebrew_taw = 0x0cfa
  2624. const m_XK_hebrew_tet = 0x0ce8
  2625. const m_XK_hebrew_teth = 0x0ce8
  2626. const m_XK_hebrew_waw = 0x0ce5
  2627. const m_XK_hebrew_yod = 0x0ce9
  2628. const m_XK_hebrew_zade = 0x0cf6
  2629. const m_XK_hebrew_zadi = 0x0cf6
  2630. const m_XK_hebrew_zain = 0x0ce6
  2631. const m_XK_hebrew_zayin = 0x0ce6
  2632. const m_XK_hstroke = 0x02b1
  2633. const m_XK_hyphen = 0x00ad
  2634. const m_XK_i = 0x0069
  2635. const m_XK_iacute = 0x00ed
  2636. const m_XK_ibelowdot = 0x1001ecb
  2637. const m_XK_ibreve = 0x100012d
  2638. const m_XK_icircumflex = 0x00ee
  2639. const m_XK_idiaeresis = 0x00ef
  2640. const m_XK_idotless = 0x02b9
  2641. const m_XK_igrave = 0x00ec
  2642. const m_XK_ihook = 0x1001ec9
  2643. const m_XK_imacron = 0x03ef
  2644. const m_XK_iogonek = 0x03e7
  2645. const m_XK_itilde = 0x03b5
  2646. const m_XK_j = 0x006a
  2647. const m_XK_jcircumflex = 0x02bc
  2648. const m_XK_k = 0x006b
  2649. const m_XK_kana_A = 0x04b1
  2650. const m_XK_kana_CHI = 0x04c1
  2651. const m_XK_kana_E = 0x04b4
  2652. const m_XK_kana_FU = 0x04cc
  2653. const m_XK_kana_HA = 0x04ca
  2654. const m_XK_kana_HE = 0x04cd
  2655. const m_XK_kana_HI = 0x04cb
  2656. const m_XK_kana_HO = 0x04ce
  2657. const m_XK_kana_HU = 0x04cc
  2658. const m_XK_kana_I = 0x04b2
  2659. const m_XK_kana_KA = 0x04b6
  2660. const m_XK_kana_KE = 0x04b9
  2661. const m_XK_kana_KI = 0x04b7
  2662. const m_XK_kana_KO = 0x04ba
  2663. const m_XK_kana_KU = 0x04b8
  2664. const m_XK_kana_MA = 0x04cf
  2665. const m_XK_kana_ME = 0x04d2
  2666. const m_XK_kana_MI = 0x04d0
  2667. const m_XK_kana_MO = 0x04d3
  2668. const m_XK_kana_MU = 0x04d1
  2669. const m_XK_kana_N = 0x04dd
  2670. const m_XK_kana_NA = 0x04c5
  2671. const m_XK_kana_NE = 0x04c8
  2672. const m_XK_kana_NI = 0x04c6
  2673. const m_XK_kana_NO = 0x04c9
  2674. const m_XK_kana_NU = 0x04c7
  2675. const m_XK_kana_O = 0x04b5
  2676. const m_XK_kana_RA = 0x04d7
  2677. const m_XK_kana_RE = 0x04da
  2678. const m_XK_kana_RI = 0x04d8
  2679. const m_XK_kana_RO = 0x04db
  2680. const m_XK_kana_RU = 0x04d9
  2681. const m_XK_kana_SA = 0x04bb
  2682. const m_XK_kana_SE = 0x04be
  2683. const m_XK_kana_SHI = 0x04bc
  2684. const m_XK_kana_SO = 0x04bf
  2685. const m_XK_kana_SU = 0x04bd
  2686. const m_XK_kana_TA = 0x04c0
  2687. const m_XK_kana_TE = 0x04c3
  2688. const m_XK_kana_TI = 0x04c1
  2689. const m_XK_kana_TO = 0x04c4
  2690. const m_XK_kana_TSU = 0x04c2
  2691. const m_XK_kana_TU = 0x04c2
  2692. const m_XK_kana_U = 0x04b3
  2693. const m_XK_kana_WA = 0x04dc
  2694. const m_XK_kana_WO = 0x04a6
  2695. const m_XK_kana_YA = 0x04d4
  2696. const m_XK_kana_YO = 0x04d6
  2697. const m_XK_kana_YU = 0x04d5
  2698. const m_XK_kana_a = 0x04a7
  2699. const m_XK_kana_closingbracket = 0x04a3
  2700. const m_XK_kana_comma = 0x04a4
  2701. const m_XK_kana_conjunctive = 0x04a5
  2702. const m_XK_kana_e = 0x04aa
  2703. const m_XK_kana_fullstop = 0x04a1
  2704. const m_XK_kana_i = 0x04a8
  2705. const m_XK_kana_middledot = 0x04a5
  2706. const m_XK_kana_o = 0x04ab
  2707. const m_XK_kana_openingbracket = 0x04a2
  2708. const m_XK_kana_switch = 0xff7e
  2709. const m_XK_kana_tsu = 0x04af
  2710. const m_XK_kana_tu = 0x04af
  2711. const m_XK_kana_u = 0x04a9
  2712. const m_XK_kana_ya = 0x04ac
  2713. const m_XK_kana_yo = 0x04ae
  2714. const m_XK_kana_yu = 0x04ad
  2715. const m_XK_kappa = 0x03a2
  2716. const m_XK_kcedilla = 0x03f3
  2717. const m_XK_kra = 0x03a2
  2718. const m_XK_l = 0x006c
  2719. const m_XK_lacute = 0x01e5
  2720. const m_XK_lbelowdot = 0x1001e37
  2721. const m_XK_lcaron = 0x01b5
  2722. const m_XK_lcedilla = 0x03b6
  2723. const m_XK_less = 0x003c
  2724. const m_XK_lstroke = 0x01b3
  2725. const m_XK_m = 0x006d
  2726. const m_XK_mabovedot = 0x1001e41
  2727. const m_XK_macron = 0x00af
  2728. const m_XK_masculine = 0x00ba
  2729. const m_XK_minus = 0x002d
  2730. const m_XK_mu = 0x00b5
  2731. const m_XK_multiply = 0x00d7
  2732. const m_XK_n = 0x006e
  2733. const m_XK_nacute = 0x01f1
  2734. const m_XK_ncaron = 0x01f2
  2735. const m_XK_ncedilla = 0x03f1
  2736. const m_XK_ninesubscript = 0x1002089
  2737. const m_XK_ninesuperior = 0x1002079
  2738. const m_XK_nobreakspace = 0x00a0
  2739. const m_XK_notapproxeq = 0x1002247
  2740. const m_XK_notelementof = 0x1002209
  2741. const m_XK_notidentical = 0x1002262
  2742. const m_XK_notsign = 0x00ac
  2743. const m_XK_ntilde = 0x00f1
  2744. const m_XK_numbersign = 0x0023
  2745. const m_XK_numerosign = 0x06b0
  2746. const m_XK_o = 0x006f
  2747. const m_XK_oacute = 0x00f3
  2748. const m_XK_obarred = 0x1000275
  2749. const m_XK_obelowdot = 0x1001ecd
  2750. const m_XK_ocaron = 0x10001d2
  2751. const m_XK_ocircumflex = 0x00f4
  2752. const m_XK_ocircumflexacute = 0x1001ed1
  2753. const m_XK_ocircumflexbelowdot = 0x1001ed9
  2754. const m_XK_ocircumflexgrave = 0x1001ed3
  2755. const m_XK_ocircumflexhook = 0x1001ed5
  2756. const m_XK_ocircumflextilde = 0x1001ed7
  2757. const m_XK_odiaeresis = 0x00f6
  2758. const m_XK_odoubleacute = 0x01f5
  2759. const m_XK_oe = 0x13bd
  2760. const m_XK_ogonek = 0x01b2
  2761. const m_XK_ograve = 0x00f2
  2762. const m_XK_ohook = 0x1001ecf
  2763. const m_XK_ohorn = 0x10001a1
  2764. const m_XK_ohornacute = 0x1001edb
  2765. const m_XK_ohornbelowdot = 0x1001ee3
  2766. const m_XK_ohorngrave = 0x1001edd
  2767. const m_XK_ohornhook = 0x1001edf
  2768. const m_XK_ohorntilde = 0x1001ee1
  2769. const m_XK_omacron = 0x03f2
  2770. const m_XK_onehalf = 0x00bd
  2771. const m_XK_onequarter = 0x00bc
  2772. const m_XK_onesubscript = 0x1002081
  2773. const m_XK_onesuperior = 0x00b9
  2774. const m_XK_ooblique = 0x00f8
  2775. const m_XK_ordfeminine = 0x00aa
  2776. const m_XK_oslash = 0x00f8
  2777. const m_XK_otilde = 0x00f5
  2778. const m_XK_overline = 0x047e
  2779. const m_XK_p = 0x0070
  2780. const m_XK_pabovedot = 0x1001e57
  2781. const m_XK_paragraph = 0x00b6
  2782. const m_XK_parenleft = 0x0028
  2783. const m_XK_parenright = 0x0029
  2784. const m_XK_partdifferential = 0x1002202
  2785. const m_XK_percent = 0x0025
  2786. const m_XK_period = 0x002e
  2787. const m_XK_periodcentered = 0x00b7
  2788. const m_XK_plus = 0x002b
  2789. const m_XK_plusminus = 0x00b1
  2790. const m_XK_prolongedsound = 0x04b0
  2791. const m_XK_q = 0x0071
  2792. const m_XK_question = 0x003f
  2793. const m_XK_questiondown = 0x00bf
  2794. const m_XK_quotedbl = 0x0022
  2795. const m_XK_quoteleft = 0x0060
  2796. const m_XK_quoteright = 0x0027
  2797. const m_XK_r = 0x0072
  2798. const m_XK_racute = 0x01e0
  2799. const m_XK_rcaron = 0x01f8
  2800. const m_XK_rcedilla = 0x03b3
  2801. const m_XK_registered = 0x00ae
  2802. const m_XK_s = 0x0073
  2803. const m_XK_sabovedot = 0x1001e61
  2804. const m_XK_sacute = 0x01b6
  2805. const m_XK_scaron = 0x01b9
  2806. const m_XK_scedilla = 0x01ba
  2807. const m_XK_schwa = 0x1000259
  2808. const m_XK_scircumflex = 0x02fe
  2809. const m_XK_script_switch = 0xff7e
  2810. const m_XK_section = 0x00a7
  2811. const m_XK_semicolon = 0x003b
  2812. const m_XK_semivoicedsound = 0x04df
  2813. const m_XK_sevensubscript = 0x1002087
  2814. const m_XK_sevensuperior = 0x1002077
  2815. const m_XK_sixsubscript = 0x1002086
  2816. const m_XK_sixsuperior = 0x1002076
  2817. const m_XK_slash = 0x002f
  2818. const m_XK_space = 0x0020
  2819. const m_XK_squareroot = 0x100221A
  2820. const m_XK_ssharp = 0x00df
  2821. const m_XK_sterling = 0x00a3
  2822. const m_XK_stricteq = 0x1002263
  2823. const m_XK_t = 0x0074
  2824. const m_XK_tabovedot = 0x1001e6b
  2825. const m_XK_tcaron = 0x01bb
  2826. const m_XK_tcedilla = 0x01fe
  2827. const m_XK_thorn = 0x00fe
  2828. const m_XK_threequarters = 0x00be
  2829. const m_XK_threesubscript = 0x1002083
  2830. const m_XK_threesuperior = 0x00b3
  2831. const m_XK_tintegral = 0x100222D
  2832. const m_XK_tslash = 0x03bc
  2833. const m_XK_twosubscript = 0x1002082
  2834. const m_XK_twosuperior = 0x00b2
  2835. const m_XK_u = 0x0075
  2836. const m_XK_uacute = 0x00fa
  2837. const m_XK_ubelowdot = 0x1001ee5
  2838. const m_XK_ubreve = 0x02fd
  2839. const m_XK_ucircumflex = 0x00fb
  2840. const m_XK_udiaeresis = 0x00fc
  2841. const m_XK_udoubleacute = 0x01fb
  2842. const m_XK_ugrave = 0x00f9
  2843. const m_XK_uhook = 0x1001ee7
  2844. const m_XK_uhorn = 0x10001b0
  2845. const m_XK_uhornacute = 0x1001ee9
  2846. const m_XK_uhornbelowdot = 0x1001ef1
  2847. const m_XK_uhorngrave = 0x1001eeb
  2848. const m_XK_uhornhook = 0x1001eed
  2849. const m_XK_uhorntilde = 0x1001eef
  2850. const m_XK_umacron = 0x03fe
  2851. const m_XK_underscore = 0x005f
  2852. const m_XK_uogonek = 0x03f9
  2853. const m_XK_uring = 0x01f9
  2854. const m_XK_utilde = 0x03fd
  2855. const m_XK_v = 0x0076
  2856. const m_XK_voicedsound = 0x04de
  2857. const m_XK_w = 0x0077
  2858. const m_XK_wacute = 0x1001e83
  2859. const m_XK_wcircumflex = 0x1000175
  2860. const m_XK_wdiaeresis = 0x1001e85
  2861. const m_XK_wgrave = 0x1001e81
  2862. const m_XK_x = 0x0078
  2863. const m_XK_xabovedot = 0x1001e8b
  2864. const m_XK_y = 0x0079
  2865. const m_XK_yacute = 0x00fd
  2866. const m_XK_ybelowdot = 0x1001ef5
  2867. const m_XK_ycircumflex = 0x1000177
  2868. const m_XK_ydiaeresis = 0x00ff
  2869. const m_XK_yen = 0x00a5
  2870. const m_XK_ygrave = 0x1001ef3
  2871. const m_XK_yhook = 0x1001ef7
  2872. const m_XK_ytilde = 0x1001ef9
  2873. const m_XK_z = 0x007a
  2874. const m_XK_zabovedot = 0x01bf
  2875. const m_XK_zacute = 0x01bc
  2876. const m_XK_zcaron = 0x01be
  2877. const m_XK_zerosubscript = 0x1002080
  2878. const m_XK_zerosuperior = 0x1002070
  2879. const m_XK_zstroke = 0x10001b6
  2880. const m_XLookupBoth = 4
  2881. const m_XLookupChars = 2
  2882. const m_XLookupKeySym = 3
  2883. const m_XLookupNone = 1
  2884. const m_XMD_H = 1
  2885. const m_XNArea = "area"
  2886. const m_XNAreaNeeded = "areaNeeded"
  2887. const m_XNBackground = "background"
  2888. const m_XNBackgroundPixmap = "backgroundPixmap"
  2889. const m_XNBaseFontName = "baseFontName"
  2890. const m_XNClientWindow = "clientWindow"
  2891. const m_XNColormap = "colorMap"
  2892. const m_XNContextualDrawing = "contextualDrawing"
  2893. const m_XNCursor = "cursor"
  2894. const m_XNDefaultString = "defaultString"
  2895. const m_XNDestroyCallback = "destroyCallback"
  2896. const m_XNDirectionalDependentDrawing = "directionalDependentDrawing"
  2897. const m_XNFilterEvents = "filterEvents"
  2898. const m_XNFocusWindow = "focusWindow"
  2899. const m_XNFontInfo = "fontInfo"
  2900. const m_XNFontSet = "fontSet"
  2901. const m_XNForeground = "foreground"
  2902. const m_XNGeometryCallback = "geometryCallback"
  2903. const m_XNHotKey = "hotKey"
  2904. const m_XNHotKeyState = "hotKeyState"
  2905. const m_XNInputStyle = "inputStyle"
  2906. const m_XNLineSpace = "lineSpace"
  2907. const m_XNMissingCharSet = "missingCharSet"
  2908. const m_XNOMAutomatic = "omAutomatic"
  2909. const m_XNOrientation = "orientation"
  2910. const m_XNPreeditAttributes = "preeditAttributes"
  2911. const m_XNPreeditCaretCallback = "preeditCaretCallback"
  2912. const m_XNPreeditDoneCallback = "preeditDoneCallback"
  2913. const m_XNPreeditDrawCallback = "preeditDrawCallback"
  2914. const m_XNPreeditStartCallback = "preeditStartCallback"
  2915. const m_XNPreeditState = "preeditState"
  2916. const m_XNPreeditStateNotifyCallback = "preeditStateNotifyCallback"
  2917. const m_XNQueryICValuesList = "queryICValuesList"
  2918. const m_XNQueryIMValuesList = "queryIMValuesList"
  2919. const m_XNQueryInputStyle = "queryInputStyle"
  2920. const m_XNQueryOrientation = "queryOrientation"
  2921. const m_XNR6PreeditCallback = "r6PreeditCallback"
  2922. const m_XNRequiredCharSet = "requiredCharSet"
  2923. const m_XNResetState = "resetState"
  2924. const m_XNResourceClass = "resourceClass"
  2925. const m_XNResourceName = "resourceName"
  2926. const m_XNSeparatorofNestedList = "separatorofNestedList"
  2927. const m_XNSpotLocation = "spotLocation"
  2928. const m_XNStatusAttributes = "statusAttributes"
  2929. const m_XNStatusDoneCallback = "statusDoneCallback"
  2930. const m_XNStatusDrawCallback = "statusDrawCallback"
  2931. const m_XNStatusStartCallback = "statusStartCallback"
  2932. const m_XNStdColormap = "stdColorMap"
  2933. const m_XNStringConversion = "stringConversion"
  2934. const m_XNStringConversionCallback = "stringConversionCallback"
  2935. const m_XNVaNestedList = "XNVaNestedList"
  2936. const m_XNVisiblePosition = "visiblePosition"
  2937. const m_XNegative = 0x0010
  2938. const m_XTHREADS = 1
  2939. const m_XUSE_MTSAFE_API = 1
  2940. const m_XValue = 0x0001
  2941. const m_XYBitmap = 0
  2942. const m_XYPixmap = 1
  2943. const m_X_AllocColor = 84
  2944. const m_X_AllocColorCells = 86
  2945. const m_X_AllocColorPlanes = 87
  2946. const m_X_AllocNamedColor = 85
  2947. const m_X_AllowEvents = 35
  2948. const m_X_Bell = 104
  2949. const m_X_ChangeActivePointerGrab = 30
  2950. const m_X_ChangeGC = 56
  2951. const m_X_ChangeHosts = 109
  2952. const m_X_ChangeKeyboardControl = 102
  2953. const m_X_ChangeKeyboardMapping = 100
  2954. const m_X_ChangePointerControl = 105
  2955. const m_X_ChangeProperty = 18
  2956. const m_X_ChangeSaveSet = 6
  2957. const m_X_ChangeWindowAttributes = 2
  2958. const m_X_CirculateWindow = 13
  2959. const m_X_ClearArea = 61
  2960. const m_X_CloseFont = 46
  2961. const m_X_ConfigureWindow = 12
  2962. const m_X_ConvertSelection = 24
  2963. const m_X_CopyArea = 62
  2964. const m_X_CopyColormapAndFree = 80
  2965. const m_X_CopyGC = 57
  2966. const m_X_CopyPlane = 63
  2967. const m_X_CreateColormap = 78
  2968. const m_X_CreateCursor = 93
  2969. const m_X_CreateGC = 55
  2970. const m_X_CreateGlyphCursor = 94
  2971. const m_X_CreatePixmap = 53
  2972. const m_X_CreateWindow = 1
  2973. const m_X_DeleteProperty = 19
  2974. const m_X_DestroySubwindows = 5
  2975. const m_X_DestroyWindow = 4
  2976. const m_X_Error = 0
  2977. const m_X_FillPoly = 69
  2978. const m_X_ForceScreenSaver = 115
  2979. const m_X_FreeColormap = 79
  2980. const m_X_FreeColors = 88
  2981. const m_X_FreeCursor = 95
  2982. const m_X_FreeGC = 60
  2983. const m_X_FreePixmap = 54
  2984. const m_X_GetAtomName = 17
  2985. const m_X_GetFontPath = 52
  2986. const m_X_GetGeometry = 14
  2987. const m_X_GetImage = 73
  2988. const m_X_GetInputFocus = 43
  2989. const m_X_GetKeyboardControl = 103
  2990. const m_X_GetKeyboardMapping = 101
  2991. const m_X_GetModifierMapping = 119
  2992. const m_X_GetMotionEvents = 39
  2993. const m_X_GetPointerControl = 106
  2994. const m_X_GetPointerMapping = 117
  2995. const m_X_GetProperty = 20
  2996. const m_X_GetScreenSaver = 108
  2997. const m_X_GetSelectionOwner = 23
  2998. const m_X_GetWindowAttributes = 3
  2999. const m_X_GrabButton = 28
  3000. const m_X_GrabKey = 33
  3001. const m_X_GrabKeyboard = 31
  3002. const m_X_GrabPointer = 26
  3003. const m_X_GrabServer = 36
  3004. const m_X_HAVE_UTF8_STRING = 1
  3005. const m_X_ImageText16 = 77
  3006. const m_X_ImageText8 = 76
  3007. const m_X_InstallColormap = 81
  3008. const m_X_InternAtom = 16
  3009. const m_X_KillClient = 113
  3010. const m_X_ListExtensions = 99
  3011. const m_X_ListFonts = 49
  3012. const m_X_ListFontsWithInfo = 50
  3013. const m_X_ListHosts = 110
  3014. const m_X_ListInstalledColormaps = 83
  3015. const m_X_ListProperties = 21
  3016. const m_X_LookupColor = 92
  3017. const m_X_MapSubwindows = 9
  3018. const m_X_MapWindow = 8
  3019. const m_X_NoOperation = 127
  3020. const m_X_OpenFont = 45
  3021. const m_X_PROTOCOL = 11
  3022. const m_X_PROTOCOL_REVISION = 0
  3023. const m_X_PolyArc = 68
  3024. const m_X_PolyFillArc = 71
  3025. const m_X_PolyFillRectangle = 70
  3026. const m_X_PolyLine = 65
  3027. const m_X_PolyPoint = 64
  3028. const m_X_PolyRectangle = 67
  3029. const m_X_PolySegment = 66
  3030. const m_X_PolyText16 = 75
  3031. const m_X_PolyText8 = 74
  3032. const m_X_PutImage = 72
  3033. const m_X_QueryBestSize = 97
  3034. const m_X_QueryColors = 91
  3035. const m_X_QueryExtension = 98
  3036. const m_X_QueryFont = 47
  3037. const m_X_QueryKeymap = 44
  3038. const m_X_QueryPointer = 38
  3039. const m_X_QueryTextExtents = 48
  3040. const m_X_QueryTree = 15
  3041. const m_X_RecolorCursor = 96
  3042. const m_X_RenderAddGlyphs = 20
  3043. const m_X_RenderAddGlyphsFromPicture = 21
  3044. const m_X_RenderAddTraps = 32
  3045. const m_X_RenderChangePicture = 5
  3046. const m_X_RenderColorTrapezoids = 14
  3047. const m_X_RenderColorTriangles = 15
  3048. const m_X_RenderComposite = 8
  3049. const m_X_RenderCompositeGlyphs16 = 24
  3050. const m_X_RenderCompositeGlyphs32 = 25
  3051. const m_X_RenderCompositeGlyphs8 = 23
  3052. const m_X_RenderCreateAnimCursor = 31
  3053. const m_X_RenderCreateConicalGradient = 36
  3054. const m_X_RenderCreateCursor = 27
  3055. const m_X_RenderCreateGlyphSet = 17
  3056. const m_X_RenderCreateLinearGradient = 34
  3057. const m_X_RenderCreatePicture = 4
  3058. const m_X_RenderCreateRadialGradient = 35
  3059. const m_X_RenderCreateSolidFill = 33
  3060. const m_X_RenderFillRectangles = 26
  3061. const m_X_RenderFreeGlyphSet = 19
  3062. const m_X_RenderFreeGlyphs = 22
  3063. const m_X_RenderFreePicture = 7
  3064. const m_X_RenderQueryDithers = 3
  3065. const m_X_RenderQueryFilters = 29
  3066. const m_X_RenderQueryPictFormats = 1
  3067. const m_X_RenderQueryPictIndexValues = 2
  3068. const m_X_RenderQueryVersion = 0
  3069. const m_X_RenderReferenceGlyphSet = 18
  3070. const m_X_RenderScale = 9
  3071. const m_X_RenderSetPictureClipRectangles = 6
  3072. const m_X_RenderSetPictureFilter = 30
  3073. const m_X_RenderSetPictureTransform = 28
  3074. const m_X_RenderTrapezoids = 10
  3075. const m_X_RenderTriFan = 13
  3076. const m_X_RenderTriStrip = 12
  3077. const m_X_RenderTriangles = 11
  3078. const m_X_ReparentWindow = 7
  3079. const m_X_Reply = 1
  3080. const m_X_RotateProperties = 114
  3081. const m_X_SendEvent = 25
  3082. const m_X_SetAccessControl = 111
  3083. const m_X_SetClipRectangles = 59
  3084. const m_X_SetCloseDownMode = 112
  3085. const m_X_SetDashes = 58
  3086. const m_X_SetFontPath = 51
  3087. const m_X_SetInputFocus = 42
  3088. const m_X_SetModifierMapping = 118
  3089. const m_X_SetPointerMapping = 116
  3090. const m_X_SetScreenSaver = 107
  3091. const m_X_SetSelectionOwner = 22
  3092. const m_X_StoreColors = 89
  3093. const m_X_StoreNamedColor = 90
  3094. const m_X_TCP_PORT = 6000
  3095. const m_X_TranslateCoords = 40
  3096. const m_X_UngrabButton = 29
  3097. const m_X_UngrabKey = 34
  3098. const m_X_UngrabKeyboard = 32
  3099. const m_X_UngrabPointer = 27
  3100. const m_X_UngrabServer = 37
  3101. const m_X_UninstallColormap = 82
  3102. const m_X_UnmapSubwindows = 11
  3103. const m_X_UnmapWindow = 10
  3104. const m_X_WarpPointer = 41
  3105. const m_XftVersion = "XFT_VERSION"
  3106. const m_XlibSpecificationRelease = 6
  3107. const m_YNegative = 0x0020
  3108. const m_YSorted = 1
  3109. const m_YValue = 0x0002
  3110. const m_YXBanded = 3
  3111. const m_YXSorted = 2
  3112. const m_ZLNSPERBATCH = 1024
  3113. const m_ZPixmap = 2
  3114. const m_ZRCTSPERBATCH = 256
  3115. const m_ZoomState = 2
  3116. const m__ARCH_PPC = 1
  3117. const m__ARCH_PPC64 = 1
  3118. const m__ARCH_PPCGR = 1
  3119. const m__ARCH_PPCSQ = 1
  3120. const m__ARCH_PWR4 = 1
  3121. const m__ARCH_PWR5 = 1
  3122. const m__ARCH_PWR5X = 1
  3123. const m__ARCH_PWR6 = 1
  3124. const m__ARCH_PWR7 = 1
  3125. const m__ARCH_PWR8 = 1
  3126. const m__CALL_ELF = 2
  3127. const m__CALL_LINUX = 1
  3128. const m__GNU_SOURCE = 1
  3129. const m__IOFBF = 0
  3130. const m__IOLBF = 1
  3131. const m__IONBF = 2
  3132. const m__LITTLE_ENDIAN = 1
  3133. const m__LP64 = 1
  3134. const m__POSIX2_BC_BASE_MAX = 99
  3135. const m__POSIX2_BC_DIM_MAX = 2048
  3136. const m__POSIX2_BC_SCALE_MAX = 99
  3137. const m__POSIX2_BC_STRING_MAX = 1000
  3138. const m__POSIX2_CHARCLASS_NAME_MAX = 14
  3139. const m__POSIX2_COLL_WEIGHTS_MAX = 2
  3140. const m__POSIX2_EXPR_NEST_MAX = 32
  3141. const m__POSIX2_LINE_MAX = 2048
  3142. const m__POSIX2_RE_DUP_MAX = 255
  3143. const m__POSIX_AIO_LISTIO_MAX = 2
  3144. const m__POSIX_AIO_MAX = 1
  3145. const m__POSIX_ARG_MAX = 4096
  3146. const m__POSIX_CHILD_MAX = 25
  3147. const m__POSIX_CLOCKRES_MIN = 20000000
  3148. const m__POSIX_DELAYTIMER_MAX = 32
  3149. const m__POSIX_HOST_NAME_MAX = 255
  3150. const m__POSIX_LINK_MAX = 8
  3151. const m__POSIX_LOGIN_NAME_MAX = 9
  3152. const m__POSIX_MAX_CANON = 255
  3153. const m__POSIX_MAX_INPUT = 255
  3154. const m__POSIX_MQ_OPEN_MAX = 8
  3155. const m__POSIX_MQ_PRIO_MAX = 32
  3156. const m__POSIX_NAME_MAX = 14
  3157. const m__POSIX_NGROUPS_MAX = 8
  3158. const m__POSIX_OPEN_MAX = 20
  3159. const m__POSIX_PATH_MAX = 256
  3160. const m__POSIX_PIPE_BUF = 512
  3161. const m__POSIX_RE_DUP_MAX = 255
  3162. const m__POSIX_RTSIG_MAX = 8
  3163. const m__POSIX_SEM_NSEMS_MAX = 256
  3164. const m__POSIX_SEM_VALUE_MAX = 32767
  3165. const m__POSIX_SIGQUEUE_MAX = 32
  3166. const m__POSIX_SSIZE_MAX = 32767
  3167. const m__POSIX_SS_REPL_MAX = 4
  3168. const m__POSIX_STREAM_MAX = 8
  3169. const m__POSIX_SYMLINK_MAX = 255
  3170. const m__POSIX_SYMLOOP_MAX = 8
  3171. const m__POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
  3172. const m__POSIX_THREAD_KEYS_MAX = 128
  3173. const m__POSIX_THREAD_THREADS_MAX = 64
  3174. const m__POSIX_TIMER_MAX = 32
  3175. const m__POSIX_TRACE_EVENT_NAME_MAX = 30
  3176. const m__POSIX_TRACE_NAME_MAX = 8
  3177. const m__POSIX_TRACE_SYS_MAX = 8
  3178. const m__POSIX_TRACE_USER_EVENT_MAX = 32
  3179. const m__POSIX_TTY_NAME_MAX = 9
  3180. const m__POSIX_TZNAME_MAX = 6
  3181. const m__STDC_PREDEF_H = 1
  3182. const m__X11_XLIBINT_H_ = 1
  3183. const m__XBCOPYFUNC = "_Xbcopy"
  3184. const m__XOPEN_IOV_MAX = 16
  3185. const m__XOPEN_NAME_MAX = 255
  3186. const m__XOPEN_PATH_MAX = 1024
  3187. const m__X_INLINE = "inline"
  3188. const m__X_RESTRICT_KYWD = "restrict"
  3189. const m__Xconst = "const"
  3190. const m___ALTIVEC__ = 1
  3191. const m___APPLE_ALTIVEC__ = 1
  3192. const m___ATOMIC_ACQUIRE = 2
  3193. const m___ATOMIC_ACQ_REL = 4
  3194. const m___ATOMIC_CONSUME = 1
  3195. const m___ATOMIC_RELAXED = 0
  3196. const m___ATOMIC_RELEASE = 3
  3197. const m___ATOMIC_SEQ_CST = 5
  3198. const m___BIGGEST_ALIGNMENT__ = 16
  3199. const m___BIG_ENDIAN = 4321
  3200. const m___BUILTIN_CPU_SUPPORTS__ = 1
  3201. const m___BYTE_ORDER = 1234
  3202. const m___BYTE_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3203. const m___CCGO__ = 1
  3204. const m___CHAR_BIT__ = 8
  3205. const m___CHAR_UNSIGNED__ = 1
  3206. const m___CMODEL_MEDIUM__ = 1
  3207. const m___CRYPTO__ = 1
  3208. const m___DBL_DECIMAL_DIG__ = 17
  3209. const m___DBL_DIG__ = 15
  3210. const m___DBL_HAS_DENORM__ = 1
  3211. const m___DBL_HAS_INFINITY__ = 1
  3212. const m___DBL_HAS_QUIET_NAN__ = 1
  3213. const m___DBL_MANT_DIG__ = 53
  3214. const m___DBL_MAX_10_EXP__ = 308
  3215. const m___DBL_MAX_EXP__ = 1024
  3216. const m___DEC128_EPSILON__ = 1e-33
  3217. const m___DEC128_MANT_DIG__ = 34
  3218. const m___DEC128_MAX_EXP__ = 6145
  3219. const m___DEC128_MAX__ = "9.999999999999999999999999999999999E6144"
  3220. const m___DEC128_MIN__ = 1e-6143
  3221. const m___DEC128_SUBNORMAL_MIN__ = 0.000000000000000000000000000000001e-6143
  3222. const m___DEC32_EPSILON__ = 1e-6
  3223. const m___DEC32_MANT_DIG__ = 7
  3224. const m___DEC32_MAX_EXP__ = 97
  3225. const m___DEC32_MAX__ = 9.999999e96
  3226. const m___DEC32_MIN__ = 1e-95
  3227. const m___DEC32_SUBNORMAL_MIN__ = 0.000001e-95
  3228. const m___DEC64_EPSILON__ = 1e-15
  3229. const m___DEC64_MANT_DIG__ = 16
  3230. const m___DEC64_MAX_EXP__ = 385
  3231. const m___DEC64_MAX__ = "9.999999999999999E384"
  3232. const m___DEC64_MIN__ = 1e-383
  3233. const m___DEC64_SUBNORMAL_MIN__ = 0.000000000000001e-383
  3234. const m___DECIMAL_DIG__ = 17
  3235. const m___DEC_EVAL_METHOD__ = 2
  3236. const m___ELF__ = 1
  3237. const m___FINITE_MATH_ONLY__ = 0
  3238. const m___FLOAT128_TYPE__ = 1
  3239. const m___FLOAT128__ = 1
  3240. const m___FLOAT_WORD_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3241. const m___FLT128_DECIMAL_DIG__ = 36
  3242. const m___FLT128_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3243. const m___FLT128_DIG__ = 33
  3244. const m___FLT128_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3245. const m___FLT128_HAS_DENORM__ = 1
  3246. const m___FLT128_HAS_INFINITY__ = 1
  3247. const m___FLT128_HAS_QUIET_NAN__ = 1
  3248. const m___FLT128_MANT_DIG__ = 113
  3249. const m___FLT128_MAX_10_EXP__ = 4932
  3250. const m___FLT128_MAX_EXP__ = 16384
  3251. const m___FLT128_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3252. const m___FLT128_MIN__ = 3.36210314311209350626267781732175260e-4932
  3253. const m___FLT128_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3254. const m___FLT32X_DECIMAL_DIG__ = 17
  3255. const m___FLT32X_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3256. const m___FLT32X_DIG__ = 15
  3257. const m___FLT32X_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3258. const m___FLT32X_HAS_DENORM__ = 1
  3259. const m___FLT32X_HAS_INFINITY__ = 1
  3260. const m___FLT32X_HAS_QUIET_NAN__ = 1
  3261. const m___FLT32X_MANT_DIG__ = 53
  3262. const m___FLT32X_MAX_10_EXP__ = 308
  3263. const m___FLT32X_MAX_EXP__ = 1024
  3264. const m___FLT32X_MAX__ = 1.79769313486231570814527423731704357e+308
  3265. const m___FLT32X_MIN__ = 2.22507385850720138309023271733240406e-308
  3266. const m___FLT32X_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3267. const m___FLT32_DECIMAL_DIG__ = 9
  3268. const m___FLT32_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3269. const m___FLT32_DIG__ = 6
  3270. const m___FLT32_EPSILON__ = 1.19209289550781250000000000000000000e-7
  3271. const m___FLT32_HAS_DENORM__ = 1
  3272. const m___FLT32_HAS_INFINITY__ = 1
  3273. const m___FLT32_HAS_QUIET_NAN__ = 1
  3274. const m___FLT32_MANT_DIG__ = 24
  3275. const m___FLT32_MAX_10_EXP__ = 38
  3276. const m___FLT32_MAX_EXP__ = 128
  3277. const m___FLT32_MAX__ = 3.40282346638528859811704183484516925e+38
  3278. const m___FLT32_MIN__ = 1.17549435082228750796873653722224568e-38
  3279. const m___FLT32_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  3280. const m___FLT64X_DECIMAL_DIG__ = 36
  3281. const m___FLT64X_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3282. const m___FLT64X_DIG__ = 33
  3283. const m___FLT64X_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3284. const m___FLT64X_HAS_DENORM__ = 1
  3285. const m___FLT64X_HAS_INFINITY__ = 1
  3286. const m___FLT64X_HAS_QUIET_NAN__ = 1
  3287. const m___FLT64X_MANT_DIG__ = 113
  3288. const m___FLT64X_MAX_10_EXP__ = 4932
  3289. const m___FLT64X_MAX_EXP__ = 16384
  3290. const m___FLT64X_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3291. const m___FLT64X_MIN__ = 3.36210314311209350626267781732175260e-4932
  3292. const m___FLT64X_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3293. const m___FLT64_DECIMAL_DIG__ = 17
  3294. const m___FLT64_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3295. const m___FLT64_DIG__ = 15
  3296. const m___FLT64_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3297. const m___FLT64_HAS_DENORM__ = 1
  3298. const m___FLT64_HAS_INFINITY__ = 1
  3299. const m___FLT64_HAS_QUIET_NAN__ = 1
  3300. const m___FLT64_MANT_DIG__ = 53
  3301. const m___FLT64_MAX_10_EXP__ = 308
  3302. const m___FLT64_MAX_EXP__ = 1024
  3303. const m___FLT64_MAX__ = 1.79769313486231570814527423731704357e+308
  3304. const m___FLT64_MIN__ = 2.22507385850720138309023271733240406e-308
  3305. const m___FLT64_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3306. const m___FLT_DECIMAL_DIG__ = 9
  3307. const m___FLT_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3308. const m___FLT_DIG__ = 6
  3309. const m___FLT_EPSILON__ = 1.19209289550781250000000000000000000e-7
  3310. const m___FLT_EVAL_METHOD_TS_18661_3__ = 0
  3311. const m___FLT_EVAL_METHOD__ = 0
  3312. const m___FLT_HAS_DENORM__ = 1
  3313. const m___FLT_HAS_INFINITY__ = 1
  3314. const m___FLT_HAS_QUIET_NAN__ = 1
  3315. const m___FLT_MANT_DIG__ = 24
  3316. const m___FLT_MAX_10_EXP__ = 38
  3317. const m___FLT_MAX_EXP__ = 128
  3318. const m___FLT_MAX__ = 3.40282346638528859811704183484516925e+38
  3319. const m___FLT_MIN__ = 1.17549435082228750796873653722224568e-38
  3320. const m___FLT_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  3321. const m___FLT_RADIX__ = 2
  3322. const m___FP_FAST_FMA = 1
  3323. const m___FP_FAST_FMAF = 1
  3324. const m___FP_FAST_FMAF32 = 1
  3325. const m___FP_FAST_FMAF32x = 1
  3326. const m___FP_FAST_FMAF64 = 1
  3327. const m___FP_FAST_FMAL = 1
  3328. const m___FUNCTION__ = "__func__"
  3329. const m___GCC_ATOMIC_BOOL_LOCK_FREE = 2
  3330. const m___GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2
  3331. const m___GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2
  3332. const m___GCC_ATOMIC_CHAR_LOCK_FREE = 2
  3333. const m___GCC_ATOMIC_INT_LOCK_FREE = 2
  3334. const m___GCC_ATOMIC_LLONG_LOCK_FREE = 2
  3335. const m___GCC_ATOMIC_LONG_LOCK_FREE = 2
  3336. const m___GCC_ATOMIC_POINTER_LOCK_FREE = 2
  3337. const m___GCC_ATOMIC_SHORT_LOCK_FREE = 2
  3338. const m___GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1
  3339. const m___GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2
  3340. const m___GCC_HAVE_DWARF2_CFI_ASM = 1
  3341. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1
  3342. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 = 1
  3343. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1
  3344. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1
  3345. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1
  3346. const m___GCC_IEC_559 = 2
  3347. const m___GCC_IEC_559_COMPLEX = 2
  3348. const m___GNUC_MINOR__ = 2
  3349. const m___GNUC_PATCHLEVEL__ = 1
  3350. const m___GNUC_STDC_INLINE__ = 1
  3351. const m___GNUC__ = 10
  3352. const m___GXX_ABI_VERSION = 1014
  3353. const m___HAVE_BSWAP__ = 1
  3354. const m___HAVE_SPECULATION_SAFE_VALUE = 1
  3355. const m___HTM__ = 1
  3356. const m___INT16_MAX__ = 0x7fff
  3357. const m___INT32_MAX__ = 0x7fffffff
  3358. const m___INT32_TYPE__ = "int"
  3359. const m___INT64_MAX__ = 0x7fffffffffffffff
  3360. const m___INT8_MAX__ = 0x7f
  3361. const m___INTMAX_MAX__ = 0x7fffffffffffffff
  3362. const m___INTMAX_WIDTH__ = 64
  3363. const m___INTPTR_MAX__ = 0x7fffffffffffffff
  3364. const m___INTPTR_WIDTH__ = 64
  3365. const m___INT_FAST16_MAX__ = 0x7fffffffffffffff
  3366. const m___INT_FAST16_WIDTH__ = 64
  3367. const m___INT_FAST32_MAX__ = 0x7fffffffffffffff
  3368. const m___INT_FAST32_WIDTH__ = 64
  3369. const m___INT_FAST64_MAX__ = 0x7fffffffffffffff
  3370. const m___INT_FAST64_WIDTH__ = 64
  3371. const m___INT_FAST8_MAX__ = 0x7f
  3372. const m___INT_FAST8_WIDTH__ = 8
  3373. const m___INT_LEAST16_MAX__ = 0x7fff
  3374. const m___INT_LEAST16_WIDTH__ = 16
  3375. const m___INT_LEAST32_MAX__ = 0x7fffffff
  3376. const m___INT_LEAST32_TYPE__ = "int"
  3377. const m___INT_LEAST32_WIDTH__ = 32
  3378. const m___INT_LEAST64_MAX__ = 0x7fffffffffffffff
  3379. const m___INT_LEAST64_WIDTH__ = 64
  3380. const m___INT_LEAST8_MAX__ = 0x7f
  3381. const m___INT_LEAST8_WIDTH__ = 8
  3382. const m___INT_MAX__ = 0x7fffffff
  3383. const m___INT_WIDTH__ = 32
  3384. const m___LDBL_DECIMAL_DIG__ = 17
  3385. const m___LDBL_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3386. const m___LDBL_DIG__ = 15
  3387. const m___LDBL_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3388. const m___LDBL_HAS_DENORM__ = 1
  3389. const m___LDBL_HAS_INFINITY__ = 1
  3390. const m___LDBL_HAS_QUIET_NAN__ = 1
  3391. const m___LDBL_MANT_DIG__ = 53
  3392. const m___LDBL_MAX_10_EXP__ = 308
  3393. const m___LDBL_MAX_EXP__ = 1024
  3394. const m___LDBL_MAX__ = 1.79769313486231570814527423731704357e+308
  3395. const m___LDBL_MIN__ = 2.22507385850720138309023271733240406e-308
  3396. const m___LDBL_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3397. const m___LITTLE_ENDIAN = 1234
  3398. const m___LITTLE_ENDIAN__ = 1
  3399. const m___LONG_LONG_MAX__ = 0x7fffffffffffffff
  3400. const m___LONG_LONG_WIDTH__ = 64
  3401. const m___LONG_MAX = 0x7fffffffffffffff
  3402. const m___LONG_MAX__ = 0x7fffffffffffffff
  3403. const m___LONG_WIDTH__ = 64
  3404. const m___LP64__ = 1
  3405. const m___NO_INLINE__ = 1
  3406. const m___ORDER_BIG_ENDIAN__ = 4321
  3407. const m___ORDER_LITTLE_ENDIAN__ = 1234
  3408. const m___ORDER_PDP_ENDIAN__ = 3412
  3409. const m___PDP_ENDIAN = 3412
  3410. const m___PIC__ = 2
  3411. const m___PIE__ = 2
  3412. const m___POWER8_VECTOR__ = 1
  3413. const m___PPC64__ = 1
  3414. const m___PPC__ = 1
  3415. const m___PRAGMA_REDEFINE_EXTNAME = 1
  3416. const m___PRETTY_FUNCTION__ = "__func__"
  3417. const m___PTRDIFF_MAX__ = 0x7fffffffffffffff
  3418. const m___PTRDIFF_WIDTH__ = 64
  3419. const m___QUAD_MEMORY_ATOMIC__ = 1
  3420. const m___RECIPF__ = 1
  3421. const m___RECIP_PRECISION__ = 1
  3422. const m___RECIP__ = 1
  3423. const m___RSQRTEF__ = 1
  3424. const m___RSQRTE__ = 1
  3425. const m___SCHAR_MAX__ = 0x7f
  3426. const m___SCHAR_WIDTH__ = 8
  3427. const m___SHRT_MAX__ = 0x7fff
  3428. const m___SHRT_WIDTH__ = 16
  3429. const m___SIG_ATOMIC_MAX__ = 0x7fffffff
  3430. const m___SIG_ATOMIC_TYPE__ = "int"
  3431. const m___SIG_ATOMIC_WIDTH__ = 32
  3432. const m___SIZEOF_DOUBLE__ = 8
  3433. const m___SIZEOF_FLOAT__ = 4
  3434. const m___SIZEOF_INT128__ = 16
  3435. const m___SIZEOF_INT__ = 4
  3436. const m___SIZEOF_LONG_DOUBLE__ = 8
  3437. const m___SIZEOF_LONG_LONG__ = 8
  3438. const m___SIZEOF_LONG__ = 8
  3439. const m___SIZEOF_POINTER__ = 8
  3440. const m___SIZEOF_PTRDIFF_T__ = 8
  3441. const m___SIZEOF_SHORT__ = 2
  3442. const m___SIZEOF_SIZE_T__ = 8
  3443. const m___SIZEOF_WCHAR_T__ = 4
  3444. const m___SIZEOF_WINT_T__ = 4
  3445. const m___SIZE_MAX__ = 0xffffffffffffffff
  3446. const m___SIZE_WIDTH__ = 64
  3447. const m___STDC_HOSTED__ = 1
  3448. const m___STDC_IEC_559_COMPLEX__ = 1
  3449. const m___STDC_IEC_559__ = 1
  3450. const m___STDC_ISO_10646__ = 201706
  3451. const m___STDC_UTF_16__ = 1
  3452. const m___STDC_UTF_32__ = 1
  3453. const m___STDC_VERSION__ = 201710
  3454. const m___STDC__ = 1
  3455. const m___STRUCT_PARM_ALIGN__ = 16
  3456. const m___TM_FENCE__ = 1
  3457. const m___UINT16_MAX__ = 0xffff
  3458. const m___UINT32_MAX__ = 0xffffffff
  3459. const m___UINT64_MAX__ = 0xffffffffffffffff
  3460. const m___UINT8_MAX__ = 0xff
  3461. const m___UINTMAX_MAX__ = 0xffffffffffffffff
  3462. const m___UINTPTR_MAX__ = 0xffffffffffffffff
  3463. const m___UINT_FAST16_MAX__ = 0xffffffffffffffff
  3464. const m___UINT_FAST32_MAX__ = 0xffffffffffffffff
  3465. const m___UINT_FAST64_MAX__ = 0xffffffffffffffff
  3466. const m___UINT_FAST8_MAX__ = 0xff
  3467. const m___UINT_LEAST16_MAX__ = 0xffff
  3468. const m___UINT_LEAST32_MAX__ = 0xffffffff
  3469. const m___UINT_LEAST64_MAX__ = 0xffffffffffffffff
  3470. const m___UINT_LEAST8_MAX__ = 0xff
  3471. const m___USE_TIME_BITS64 = 1
  3472. const m___VEC_ELEMENT_REG_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3473. const m___VEC__ = 10206
  3474. const m___VERSION__ = "10.2.1 20210110"
  3475. const m___VSX__ = 1
  3476. const m___WCHAR_MAX__ = 0x7fffffff
  3477. const m___WCHAR_TYPE__ = "int"
  3478. const m___WCHAR_WIDTH__ = 32
  3479. const m___WINT_MAX__ = 0xffffffff
  3480. const m___WINT_MIN__ = 0
  3481. const m___WINT_WIDTH__ = 32
  3482. const m___builtin_copysignq = "__builtin_copysignf128"
  3483. const m___builtin_fabsq = "__builtin_fabsf128"
  3484. const m___builtin_huge_valq = "__builtin_huge_valf128"
  3485. const m___builtin_infq = "__builtin_inff128"
  3486. const m___builtin_nanq = "__builtin_nanf128"
  3487. const m___builtin_nansq = "__builtin_nansf128"
  3488. const m___builtin_vsx_vperm = "__builtin_vec_perm"
  3489. const m___builtin_vsx_xvmaddadp = "__builtin_vsx_xvmadddp"
  3490. const m___builtin_vsx_xvmaddasp = "__builtin_vsx_xvmaddsp"
  3491. const m___builtin_vsx_xvmaddmdp = "__builtin_vsx_xvmadddp"
  3492. const m___builtin_vsx_xvmaddmsp = "__builtin_vsx_xvmaddsp"
  3493. const m___builtin_vsx_xvmsubadp = "__builtin_vsx_xvmsubdp"
  3494. const m___builtin_vsx_xvmsubasp = "__builtin_vsx_xvmsubsp"
  3495. const m___builtin_vsx_xvmsubmdp = "__builtin_vsx_xvmsubdp"
  3496. const m___builtin_vsx_xvmsubmsp = "__builtin_vsx_xvmsubsp"
  3497. const m___builtin_vsx_xvnmaddadp = "__builtin_vsx_xvnmadddp"
  3498. const m___builtin_vsx_xvnmaddasp = "__builtin_vsx_xvnmaddsp"
  3499. const m___builtin_vsx_xvnmaddmdp = "__builtin_vsx_xvnmadddp"
  3500. const m___builtin_vsx_xvnmaddmsp = "__builtin_vsx_xvnmaddsp"
  3501. const m___builtin_vsx_xvnmsubadp = "__builtin_vsx_xvnmsubdp"
  3502. const m___builtin_vsx_xvnmsubasp = "__builtin_vsx_xvnmsubsp"
  3503. const m___builtin_vsx_xvnmsubmdp = "__builtin_vsx_xvnmsubdp"
  3504. const m___builtin_vsx_xvnmsubmsp = "__builtin_vsx_xvnmsubsp"
  3505. const m___builtin_vsx_xxland = "__builtin_vec_and"
  3506. const m___builtin_vsx_xxlandc = "__builtin_vec_andc"
  3507. const m___builtin_vsx_xxlnor = "__builtin_vec_nor"
  3508. const m___builtin_vsx_xxlor = "__builtin_vec_or"
  3509. const m___builtin_vsx_xxlxor = "__builtin_vec_xor"
  3510. const m___builtin_vsx_xxsel = "__builtin_vec_sel"
  3511. const m___float128 = "__ieee128"
  3512. const m___gnu_linux__ = 1
  3513. const m___inline = "inline"
  3514. const m___linux = 1
  3515. const m___linux__ = 1
  3516. const m___pic__ = 2
  3517. const m___pie__ = 2
  3518. const m___powerpc64__ = 1
  3519. const m___powerpc__ = 1
  3520. const m___restrict = "restrict"
  3521. const m___restrict_arr = "restrict"
  3522. const m___unix = 1
  3523. const m___unix__ = 1
  3524. const m_alloca = "__builtin_alloca"
  3525. const m_ft_encoding_adobe_custom = "FT_ENCODING_ADOBE_CUSTOM"
  3526. const m_ft_encoding_adobe_expert = "FT_ENCODING_ADOBE_EXPERT"
  3527. const m_ft_encoding_adobe_standard = "FT_ENCODING_ADOBE_STANDARD"
  3528. const m_ft_encoding_apple_roman = "FT_ENCODING_APPLE_ROMAN"
  3529. const m_ft_encoding_big5 = "FT_ENCODING_BIG5"
  3530. const m_ft_encoding_gb2312 = "FT_ENCODING_PRC"
  3531. const m_ft_encoding_johab = "FT_ENCODING_JOHAB"
  3532. const m_ft_encoding_latin_1 = "FT_ENCODING_ADOBE_LATIN_1"
  3533. const m_ft_encoding_latin_2 = "FT_ENCODING_OLD_LATIN_2"
  3534. const m_ft_encoding_none = "FT_ENCODING_NONE"
  3535. const m_ft_encoding_sjis = "FT_ENCODING_SJIS"
  3536. const m_ft_encoding_symbol = "FT_ENCODING_MS_SYMBOL"
  3537. const m_ft_encoding_unicode = "FT_ENCODING_UNICODE"
  3538. const m_ft_encoding_wansung = "FT_ENCODING_WANSUNG"
  3539. const m_ft_fclose = "fclose"
  3540. const m_ft_fopen = "fopen"
  3541. const m_ft_fread = "fread"
  3542. const m_ft_fseek = "fseek"
  3543. const m_ft_ftell = "ftell"
  3544. const m_ft_getenv = "getenv"
  3545. const m_ft_glyph_format_bitmap = "FT_GLYPH_FORMAT_BITMAP"
  3546. const m_ft_glyph_format_composite = "FT_GLYPH_FORMAT_COMPOSITE"
  3547. const m_ft_glyph_format_none = "FT_GLYPH_FORMAT_NONE"
  3548. const m_ft_glyph_format_outline = "FT_GLYPH_FORMAT_OUTLINE"
  3549. const m_ft_glyph_format_plotter = "FT_GLYPH_FORMAT_PLOTTER"
  3550. const m_ft_jmp_buf = "jmp_buf"
  3551. const m_ft_kerning_default = "FT_KERNING_DEFAULT"
  3552. const m_ft_kerning_unfitted = "FT_KERNING_UNFITTED"
  3553. const m_ft_kerning_unscaled = "FT_KERNING_UNSCALED"
  3554. const m_ft_longjmp = "longjmp"
  3555. const m_ft_memchr = "memchr"
  3556. const m_ft_memcmp = "memcmp"
  3557. const m_ft_memcpy = "memcpy"
  3558. const m_ft_memmove = "memmove"
  3559. const m_ft_memset = "memset"
  3560. const m_ft_open_driver = "FT_OPEN_DRIVER"
  3561. const m_ft_open_memory = "FT_OPEN_MEMORY"
  3562. const m_ft_open_params = "FT_OPEN_PARAMS"
  3563. const m_ft_open_pathname = "FT_OPEN_PATHNAME"
  3564. const m_ft_open_stream = "FT_OPEN_STREAM"
  3565. const m_ft_outline_even_odd_fill = "FT_OUTLINE_EVEN_ODD_FILL"
  3566. const m_ft_outline_high_precision = "FT_OUTLINE_HIGH_PRECISION"
  3567. const m_ft_outline_ignore_dropouts = "FT_OUTLINE_IGNORE_DROPOUTS"
  3568. const m_ft_outline_none = "FT_OUTLINE_NONE"
  3569. const m_ft_outline_owner = "FT_OUTLINE_OWNER"
  3570. const m_ft_outline_reverse_fill = "FT_OUTLINE_REVERSE_FILL"
  3571. const m_ft_outline_single_pass = "FT_OUTLINE_SINGLE_PASS"
  3572. const m_ft_pixel_mode_grays = "FT_PIXEL_MODE_GRAY"
  3573. const m_ft_pixel_mode_mono = "FT_PIXEL_MODE_MONO"
  3574. const m_ft_pixel_mode_none = "FT_PIXEL_MODE_NONE"
  3575. const m_ft_pixel_mode_pal2 = "FT_PIXEL_MODE_GRAY2"
  3576. const m_ft_pixel_mode_pal4 = "FT_PIXEL_MODE_GRAY4"
  3577. const m_ft_ptrdiff_t = "ptrdiff_t"
  3578. const m_ft_qsort = "qsort"
  3579. const m_ft_raster_flag_aa = "FT_RASTER_FLAG_AA"
  3580. const m_ft_raster_flag_clip = "FT_RASTER_FLAG_CLIP"
  3581. const m_ft_raster_flag_default = "FT_RASTER_FLAG_DEFAULT"
  3582. const m_ft_raster_flag_direct = "FT_RASTER_FLAG_DIRECT"
  3583. const m_ft_render_mode_mono = "FT_RENDER_MODE_MONO"
  3584. const m_ft_render_mode_normal = "FT_RENDER_MODE_NORMAL"
  3585. const m_ft_scalloc = "calloc"
  3586. const m_ft_sfree = "free"
  3587. const m_ft_smalloc = "malloc"
  3588. const m_ft_sprintf = "sprintf"
  3589. const m_ft_srealloc = "realloc"
  3590. const m_ft_strcat = "strcat"
  3591. const m_ft_strcmp = "strcmp"
  3592. const m_ft_strcpy = "strcpy"
  3593. const m_ft_strlen = "strlen"
  3594. const m_ft_strncmp = "strncmp"
  3595. const m_ft_strncpy = "strncpy"
  3596. const m_ft_strrchr = "strrchr"
  3597. const m_ft_strstr = "strstr"
  3598. const m_ft_strtol = "strtol"
  3599. const m_linux = 1
  3600. const m_sz_xAllocColorCellsReply = 32
  3601. const m_sz_xAllocColorCellsReq = 12
  3602. const m_sz_xAllocColorPlanesReply = 32
  3603. const m_sz_xAllocColorPlanesReq = 16
  3604. const m_sz_xAllocColorReply = 32
  3605. const m_sz_xAllocColorReq = 16
  3606. const m_sz_xAllocNamedColorReply = 32
  3607. const m_sz_xAllocNamedColorReq = 12
  3608. const m_sz_xAllowEventsReq = 8
  3609. const m_sz_xArc = 12
  3610. const m_sz_xBellReq = 4
  3611. const m_sz_xChangeActivePointerGrabReq = 16
  3612. const m_sz_xChangeGCReq = 12
  3613. const m_sz_xChangeHostsReq = 8
  3614. const m_sz_xChangeKeyboardControlReq = 8
  3615. const m_sz_xChangeKeyboardMappingReq = 8
  3616. const m_sz_xChangeModeReq = 4
  3617. const m_sz_xChangePointerControlReq = 12
  3618. const m_sz_xChangePropertyReq = 24
  3619. const m_sz_xChangeSaveSetReq = 8
  3620. const m_sz_xChangeWindowAttributesReq = 12
  3621. const m_sz_xCharInfo = 12
  3622. const m_sz_xCirculateWindowReq = 8
  3623. const m_sz_xClearAreaReq = 16
  3624. const m_sz_xColorItem = 12
  3625. const m_sz_xConfigureWindowReq = 12
  3626. const m_sz_xConnClientPrefix = 12
  3627. const m_sz_xConnSetup = 32
  3628. const m_sz_xConnSetupPrefix = 8
  3629. const m_sz_xConvertSelectionReq = 24
  3630. const m_sz_xCopyAreaReq = 28
  3631. const m_sz_xCopyColormapAndFreeReq = 12
  3632. const m_sz_xCopyGCReq = 16
  3633. const m_sz_xCopyPlaneReq = 32
  3634. const m_sz_xCreateColormapReq = 16
  3635. const m_sz_xCreateCursorReq = 32
  3636. const m_sz_xCreateGCReq = 16
  3637. const m_sz_xCreateGlyphCursorReq = 32
  3638. const m_sz_xCreatePixmapReq = 16
  3639. const m_sz_xCreateWindowReq = 32
  3640. const m_sz_xDeletePropertyReq = 12
  3641. const m_sz_xDepth = 8
  3642. const m_sz_xError = 32
  3643. const m_sz_xEvent = 32
  3644. const m_sz_xFillPolyReq = 16
  3645. const m_sz_xFontProp = 8
  3646. const m_sz_xForceScreenSaverReq = 4
  3647. const m_sz_xFreeColorsReq = 12
  3648. const m_sz_xGenericReply = 32
  3649. const m_sz_xGetAtomNameReply = 32
  3650. const m_sz_xGetFontPathReply = 32
  3651. const m_sz_xGetGeometryReply = 32
  3652. const m_sz_xGetImageReply = 32
  3653. const m_sz_xGetImageReq = 20
  3654. const m_sz_xGetInputFocusReply = 32
  3655. const m_sz_xGetKeyboardControlReply = 52
  3656. const m_sz_xGetKeyboardMappingReply = 32
  3657. const m_sz_xGetKeyboardMappingReq = 8
  3658. const m_sz_xGetModifierMappingReply = 32
  3659. const m_sz_xGetMotionEventsReply = 32
  3660. const m_sz_xGetMotionEventsReq = 16
  3661. const m_sz_xGetPointerControlReply = 32
  3662. const m_sz_xGetPointerMappingReply = 32
  3663. const m_sz_xGetPropertyReply = 32
  3664. const m_sz_xGetPropertyReq = 24
  3665. const m_sz_xGetScreenSaverReply = 32
  3666. const m_sz_xGetSelectionOwnerReply = 32
  3667. const m_sz_xGetWindowAttributesReply = 44
  3668. const m_sz_xGrabButtonReq = 24
  3669. const m_sz_xGrabKeyReq = 16
  3670. const m_sz_xGrabKeyboardReply = 32
  3671. const m_sz_xGrabKeyboardReq = 16
  3672. const m_sz_xGrabPointerReply = 32
  3673. const m_sz_xGrabPointerReq = 24
  3674. const m_sz_xHostEntry = 4
  3675. const m_sz_xImageText16Req = 16
  3676. const m_sz_xImageText8Req = 16
  3677. const m_sz_xImageTextReq = 16
  3678. const m_sz_xInternAtomReply = 32
  3679. const m_sz_xInternAtomReq = 8
  3680. const m_sz_xKeymapEvent = 32
  3681. const m_sz_xListExtensionsReply = 32
  3682. const m_sz_xListFontsReply = 32
  3683. const m_sz_xListFontsReq = 8
  3684. const m_sz_xListFontsWithInfoReply = 60
  3685. const m_sz_xListFontsWithInfoReq = 8
  3686. const m_sz_xListHostsReply = 32
  3687. const m_sz_xListHostsReq = 4
  3688. const m_sz_xListInstalledColormapsReply = 32
  3689. const m_sz_xListPropertiesReply = 32
  3690. const m_sz_xLookupColorReply = 32
  3691. const m_sz_xLookupColorReq = 12
  3692. const m_sz_xOpenFontReq = 12
  3693. const m_sz_xPixmapFormat = 8
  3694. const m_sz_xPoint = 4
  3695. const m_sz_xPolyArcReq = 12
  3696. const m_sz_xPolyFillArcReq = 12
  3697. const m_sz_xPolyFillRectangleReq = 12
  3698. const m_sz_xPolyLineReq = 12
  3699. const m_sz_xPolyPointReq = 12
  3700. const m_sz_xPolyRectangleReq = 12
  3701. const m_sz_xPolySegmentReq = 12
  3702. const m_sz_xPolyText16Req = 16
  3703. const m_sz_xPolyText8Req = 16
  3704. const m_sz_xPolyTextReq = 16
  3705. const m_sz_xPropIconSize = 24
  3706. const m_sz_xPutImageReq = 24
  3707. const m_sz_xQueryBestSizeReply = 32
  3708. const m_sz_xQueryBestSizeReq = 12
  3709. const m_sz_xQueryColorsReply = 32
  3710. const m_sz_xQueryColorsReq = 8
  3711. const m_sz_xQueryExtensionReply = 32
  3712. const m_sz_xQueryExtensionReq = 8
  3713. const m_sz_xQueryFontReply = 60
  3714. const m_sz_xQueryKeymapReply = 40
  3715. const m_sz_xQueryPointerReply = 32
  3716. const m_sz_xQueryTextExtentsReply = 32
  3717. const m_sz_xQueryTextExtentsReq = 8
  3718. const m_sz_xQueryTreeReply = 32
  3719. const m_sz_xRecolorCursorReq = 20
  3720. const m_sz_xRectangle = 8
  3721. const m_sz_xReparentWindowReq = 16
  3722. const m_sz_xReply = 32
  3723. const m_sz_xReq = 4
  3724. const m_sz_xResourceReq = 8
  3725. const m_sz_xRotatePropertiesReq = 12
  3726. const m_sz_xSegment = 8
  3727. const m_sz_xSendEventReq = 44
  3728. const m_sz_xSetAccessControlReq = 4
  3729. const m_sz_xSetClipRectanglesReq = 12
  3730. const m_sz_xSetCloseDownModeReq = 4
  3731. const m_sz_xSetDashesReq = 12
  3732. const m_sz_xSetFontPathReq = 8
  3733. const m_sz_xSetInputFocusReq = 12
  3734. const m_sz_xSetMappingReply = 32
  3735. const m_sz_xSetModifierMappingReply = 32
  3736. const m_sz_xSetModifierMappingReq = 4
  3737. const m_sz_xSetPointerMappingReply = 32
  3738. const m_sz_xSetPointerMappingReq = 4
  3739. const m_sz_xSetScreenSaverReq = 12
  3740. const m_sz_xSetSelectionOwnerReq = 16
  3741. const m_sz_xStoreColorsReq = 8
  3742. const m_sz_xStoreNamedColorReq = 16
  3743. const m_sz_xTextElt = 2
  3744. const m_sz_xTimecoord = 8
  3745. const m_sz_xTranslateCoordsReply = 32
  3746. const m_sz_xTranslateCoordsReq = 16
  3747. const m_sz_xUngrabButtonReq = 12
  3748. const m_sz_xUngrabKeyReq = 12
  3749. const m_sz_xVisualType = 24
  3750. const m_sz_xWarpPointerReq = 24
  3751. const m_sz_xWindowRoot = 40
  3752. const m_sz_xrgb = 8
  3753. const m_unix = 1
  3754. const m_xFalse = 0
  3755. const m_xTrue = 1
  3756. type t__builtin_va_list = uintptr
  3757. type t__predefined_size_t = uint64
  3758. type t__predefined_wchar_t = int32
  3759. type t__predefined_ptrdiff_t = int64
  3760. type Tsize_t = uint64
  3761. type Tssize_t = int64
  3762. type Toff_t = int64
  3763. type Tva_list = uintptr
  3764. type t__isoc_va_list = uintptr
  3765. type Tfpos_t = struct {
  3766. F__lldata [0]int64
  3767. F__align [0]float64
  3768. F__opaque [16]uint8
  3769. }
  3770. type T_G_fpos64_t = Tfpos_t
  3771. type Tcookie_io_functions_t = struct {
  3772. Fread uintptr
  3773. Fwrite uintptr
  3774. Fseek uintptr
  3775. Fclose1 uintptr
  3776. }
  3777. type T_IO_cookie_io_functions_t = Tcookie_io_functions_t
  3778. type Twchar_t = int32
  3779. type Tdiv_t = struct {
  3780. Fquot int32
  3781. Frem int32
  3782. }
  3783. type Tldiv_t = struct {
  3784. Fquot int64
  3785. Frem int64
  3786. }
  3787. type Tlldiv_t = struct {
  3788. Fquot int64
  3789. Frem int64
  3790. }
  3791. type Tlocale_t = uintptr
  3792. type Tregister_t = int64
  3793. type Ttime_t = int64
  3794. type Tsuseconds_t = int64
  3795. type Tint8_t = int8
  3796. type Tint16_t = int16
  3797. type Tint32_t = int32
  3798. type Tint64_t = int64
  3799. type Tu_int64_t = uint64
  3800. type Tmode_t = uint32
  3801. type Tnlink_t = uint64
  3802. type Tino_t = uint64
  3803. type Tdev_t = uint64
  3804. type Tblksize_t = int64
  3805. type Tblkcnt_t = int64
  3806. type Tfsblkcnt_t = uint64
  3807. type Tfsfilcnt_t = uint64
  3808. type Ttimer_t = uintptr
  3809. type Tclockid_t = int32
  3810. type Tclock_t = int64
  3811. type Tpid_t = int32
  3812. type Tid_t = uint32
  3813. type Tuid_t = uint32
  3814. type Tgid_t = uint32
  3815. type Tkey_t = int32
  3816. type Tuseconds_t = uint32
  3817. type Tpthread_t = uintptr
  3818. type Tpthread_once_t = int32
  3819. type Tpthread_key_t = uint32
  3820. type Tpthread_spinlock_t = int32
  3821. type Tpthread_mutexattr_t = struct {
  3822. F__attr uint32
  3823. }
  3824. type Tpthread_condattr_t = struct {
  3825. F__attr uint32
  3826. }
  3827. type Tpthread_barrierattr_t = struct {
  3828. F__attr uint32
  3829. }
  3830. type Tpthread_rwlockattr_t = struct {
  3831. F__attr [2]uint32
  3832. }
  3833. type Tpthread_attr_t = struct {
  3834. F__u struct {
  3835. F__vi [0][14]int32
  3836. F__s [0][7]uint64
  3837. F__i [14]int32
  3838. }
  3839. }
  3840. type Tpthread_mutex_t = struct {
  3841. F__u struct {
  3842. F__vi [0][10]int32
  3843. F__p [0][5]uintptr
  3844. F__i [10]int32
  3845. }
  3846. }
  3847. type Tpthread_cond_t = struct {
  3848. F__u struct {
  3849. F__vi [0][12]int32
  3850. F__p [0][6]uintptr
  3851. F__i [12]int32
  3852. }
  3853. }
  3854. type Tpthread_rwlock_t = struct {
  3855. F__u struct {
  3856. F__vi [0][14]int32
  3857. F__p [0][7]uintptr
  3858. F__i [14]int32
  3859. }
  3860. }
  3861. type Tpthread_barrier_t = struct {
  3862. F__u struct {
  3863. F__vi [0][8]int32
  3864. F__p [0][4]uintptr
  3865. F__i [8]int32
  3866. }
  3867. }
  3868. type Tu_int8_t = uint8
  3869. type Tu_int16_t = uint16
  3870. type Tu_int32_t = uint32
  3871. type Tcaddr_t = uintptr
  3872. type Tu_char = uint8
  3873. type Tu_short = uint16
  3874. type Tushort = uint16
  3875. type Tu_int = uint32
  3876. type Tuint = uint32
  3877. type Tu_long = uint64
  3878. type Tulong = uint64
  3879. type Tquad_t = int64
  3880. type Tu_quad_t = uint64
  3881. type Tuint16_t = uint16
  3882. type Tuint32_t = uint32
  3883. type Tuint64_t = uint64
  3884. type Ttimeval = struct {
  3885. Ftv_sec Ttime_t
  3886. Ftv_usec Tsuseconds_t
  3887. }
  3888. type Ttimespec = struct {
  3889. Ftv_sec Ttime_t
  3890. Ftv_nsec int64
  3891. }
  3892. type Tsigset_t = struct {
  3893. F__bits [16]uint64
  3894. }
  3895. type t__sigset_t = Tsigset_t
  3896. type Tfd_mask = uint64
  3897. type Tfd_set = struct {
  3898. Ffds_bits [16]uint64
  3899. }
  3900. type TXID = uint64
  3901. type TMask = uint64
  3902. type TAtom = uint64
  3903. type TVisualID = uint64
  3904. type TTime = uint64
  3905. type TWindow = uint64
  3906. type TDrawable = uint64
  3907. type TFont = uint64
  3908. type TPixmap = uint64
  3909. type TCursor = uint64
  3910. type TColormap = uint64
  3911. type TGContext = uint64
  3912. type TKeySym = uint64
  3913. type TKeyCode = uint8
  3914. type Tmax_align_t = struct {
  3915. F__ll int64
  3916. F__ld float64
  3917. }
  3918. type Tptrdiff_t = int64
  3919. type TXPointer = uintptr
  3920. type TXExtData = struct {
  3921. Fnumber int32
  3922. Fnext uintptr
  3923. Ffree_private uintptr
  3924. Fprivate_data TXPointer
  3925. }
  3926. type T_XExtData = TXExtData
  3927. type TXExtCodes = struct {
  3928. Fextension int32
  3929. Fmajor_opcode int32
  3930. Ffirst_event int32
  3931. Ffirst_error int32
  3932. }
  3933. type TXPixmapFormatValues = struct {
  3934. Fdepth int32
  3935. Fbits_per_pixel int32
  3936. Fscanline_pad int32
  3937. }
  3938. type TXGCValues = struct {
  3939. Ffunction int32
  3940. Fplane_mask uint64
  3941. Fforeground uint64
  3942. Fbackground uint64
  3943. Fline_width int32
  3944. Fline_style int32
  3945. Fcap_style int32
  3946. Fjoin_style int32
  3947. Ffill_style int32
  3948. Ffill_rule int32
  3949. Farc_mode int32
  3950. Ftile TPixmap
  3951. Fstipple TPixmap
  3952. Fts_x_origin int32
  3953. Fts_y_origin int32
  3954. Ffont TFont
  3955. Fsubwindow_mode int32
  3956. Fgraphics_exposures int32
  3957. Fclip_x_origin int32
  3958. Fclip_y_origin int32
  3959. Fclip_mask TPixmap
  3960. Fdash_offset int32
  3961. Fdashes uint8
  3962. }
  3963. type TGC = uintptr
  3964. type T_XGC = struct {
  3965. Fext_data uintptr
  3966. Fgid TGContext
  3967. Frects int32
  3968. Fdashes int32
  3969. Fdirty uint64
  3970. Fvalues TXGCValues
  3971. }
  3972. type TVisual = struct {
  3973. Fext_data uintptr
  3974. Fvisualid TVisualID
  3975. Fclass int32
  3976. Fred_mask uint64
  3977. Fgreen_mask uint64
  3978. Fblue_mask uint64
  3979. Fbits_per_rgb int32
  3980. Fmap_entries int32
  3981. }
  3982. type TDepth = struct {
  3983. Fdepth int32
  3984. Fnvisuals int32
  3985. Fvisuals uintptr
  3986. }
  3987. type T_XDisplay = struct {
  3988. Fext_data uintptr
  3989. Ffree_funcs uintptr
  3990. Ffd int32
  3991. Fconn_checker int32
  3992. Fproto_major_version int32
  3993. Fproto_minor_version int32
  3994. Fvendor uintptr
  3995. Fresource_base TXID
  3996. Fresource_mask TXID
  3997. Fresource_id TXID
  3998. Fresource_shift int32
  3999. Fresource_alloc uintptr
  4000. Fbyte_order int32
  4001. Fbitmap_unit int32
  4002. Fbitmap_pad int32
  4003. Fbitmap_bit_order int32
  4004. Fnformats int32
  4005. Fpixmap_format uintptr
  4006. Fvnumber int32
  4007. Frelease int32
  4008. Fhead uintptr
  4009. Ftail uintptr
  4010. Fqlen int32
  4011. Flast_request_read uint64
  4012. Frequest uint64
  4013. Flast_req uintptr
  4014. Fbuffer uintptr
  4015. Fbufptr uintptr
  4016. Fbufmax uintptr
  4017. Fmax_request_size uint32
  4018. Fdb uintptr
  4019. Fsynchandler uintptr
  4020. Fdisplay_name uintptr
  4021. Fdefault_screen int32
  4022. Fnscreens int32
  4023. Fscreens uintptr
  4024. Fmotion_buffer uint64
  4025. Fflags uint64
  4026. Fmin_keycode int32
  4027. Fmax_keycode int32
  4028. Fkeysyms uintptr
  4029. Fmodifiermap uintptr
  4030. Fkeysyms_per_keycode int32
  4031. Fxdefaults uintptr
  4032. Fscratch_buffer uintptr
  4033. Fscratch_length uint64
  4034. Fext_number int32
  4035. Fext_procs uintptr
  4036. Fevent_vec [128]uintptr
  4037. Fwire_vec [128]uintptr
  4038. Flock_meaning TKeySym
  4039. Flock uintptr
  4040. Fasync_handlers uintptr
  4041. Fbigreq_size uint64
  4042. Flock_fns uintptr
  4043. Fidlist_alloc uintptr
  4044. Fkey_bindings uintptr
  4045. Fcursor_font TFont
  4046. Fatoms uintptr
  4047. Fmode_switch uint32
  4048. Fnum_lock uint32
  4049. Fcontext_db uintptr
  4050. Ferror_vec uintptr
  4051. Fcms struct {
  4052. FdefaultCCCs TXPointer
  4053. FclientCmaps TXPointer
  4054. FperVisualIntensityMaps TXPointer
  4055. }
  4056. Fim_filters uintptr
  4057. Fqfree uintptr
  4058. Fnext_event_serial_num uint64
  4059. Fflushes uintptr
  4060. Fim_fd_info uintptr
  4061. Fim_fd_length int32
  4062. Fconn_watchers uintptr
  4063. Fwatcher_count int32
  4064. Ffiledes TXPointer
  4065. Fsavedsynchandler uintptr
  4066. Fresource_max TXID
  4067. Fxcmisc_opcode int32
  4068. Fxkb_info uintptr
  4069. Ftrans_conn uintptr
  4070. Fxcb uintptr
  4071. Fnext_cookie uint32
  4072. Fgeneric_event_vec [128]uintptr
  4073. Fgeneric_event_copy_vec [128]uintptr
  4074. Fcookiejar uintptr
  4075. Ferror_threads uintptr
  4076. Fexit_handler TXIOErrorExitHandler
  4077. Fexit_handler_data uintptr
  4078. }
  4079. type TScreen = struct {
  4080. Fext_data uintptr
  4081. Fdisplay uintptr
  4082. Froot TWindow
  4083. Fwidth int32
  4084. Fheight int32
  4085. Fmwidth int32
  4086. Fmheight int32
  4087. Fndepths int32
  4088. Fdepths uintptr
  4089. Froot_depth int32
  4090. Froot_visual uintptr
  4091. Fdefault_gc TGC
  4092. Fcmap TColormap
  4093. Fwhite_pixel uint64
  4094. Fblack_pixel uint64
  4095. Fmax_maps int32
  4096. Fmin_maps int32
  4097. Fbacking_store int32
  4098. Fsave_unders int32
  4099. Froot_input_mask int64
  4100. }
  4101. type TScreenFormat = struct {
  4102. Fext_data uintptr
  4103. Fdepth int32
  4104. Fbits_per_pixel int32
  4105. Fscanline_pad int32
  4106. }
  4107. type TXSetWindowAttributes = struct {
  4108. Fbackground_pixmap TPixmap
  4109. Fbackground_pixel uint64
  4110. Fborder_pixmap TPixmap
  4111. Fborder_pixel uint64
  4112. Fbit_gravity int32
  4113. Fwin_gravity int32
  4114. Fbacking_store int32
  4115. Fbacking_planes uint64
  4116. Fbacking_pixel uint64
  4117. Fsave_under int32
  4118. Fevent_mask int64
  4119. Fdo_not_propagate_mask int64
  4120. Foverride_redirect int32
  4121. Fcolormap TColormap
  4122. Fcursor TCursor
  4123. }
  4124. type TXWindowAttributes = struct {
  4125. Fx int32
  4126. Fy int32
  4127. Fwidth int32
  4128. Fheight int32
  4129. Fborder_width int32
  4130. Fdepth int32
  4131. Fvisual uintptr
  4132. Froot TWindow
  4133. Fclass int32
  4134. Fbit_gravity int32
  4135. Fwin_gravity int32
  4136. Fbacking_store int32
  4137. Fbacking_planes uint64
  4138. Fbacking_pixel uint64
  4139. Fsave_under int32
  4140. Fcolormap TColormap
  4141. Fmap_installed int32
  4142. Fmap_state int32
  4143. Fall_event_masks int64
  4144. Fyour_event_mask int64
  4145. Fdo_not_propagate_mask int64
  4146. Foverride_redirect int32
  4147. Fscreen uintptr
  4148. }
  4149. type TXHostAddress = struct {
  4150. Ffamily int32
  4151. Flength int32
  4152. Faddress uintptr
  4153. }
  4154. type TXServerInterpretedAddress = struct {
  4155. Ftypelength int32
  4156. Fvaluelength int32
  4157. Ftype1 uintptr
  4158. Fvalue uintptr
  4159. }
  4160. type TXImage = struct {
  4161. Fwidth int32
  4162. Fheight int32
  4163. Fxoffset int32
  4164. Fformat int32
  4165. Fdata uintptr
  4166. Fbyte_order int32
  4167. Fbitmap_unit int32
  4168. Fbitmap_bit_order int32
  4169. Fbitmap_pad int32
  4170. Fdepth int32
  4171. Fbytes_per_line int32
  4172. Fbits_per_pixel int32
  4173. Fred_mask uint64
  4174. Fgreen_mask uint64
  4175. Fblue_mask uint64
  4176. Fobdata TXPointer
  4177. Ff Tfuncs
  4178. }
  4179. type T_XImage = TXImage
  4180. type TXWindowChanges = struct {
  4181. Fx int32
  4182. Fy int32
  4183. Fwidth int32
  4184. Fheight int32
  4185. Fborder_width int32
  4186. Fsibling TWindow
  4187. Fstack_mode int32
  4188. }
  4189. type TXColor = struct {
  4190. Fpixel uint64
  4191. Fred uint16
  4192. Fgreen uint16
  4193. Fblue uint16
  4194. Fflags uint8
  4195. Fpad uint8
  4196. }
  4197. type TXSegment = struct {
  4198. Fx1 int16
  4199. Fy1 int16
  4200. Fx2 int16
  4201. Fy2 int16
  4202. }
  4203. type TXPoint = struct {
  4204. Fx int16
  4205. Fy int16
  4206. }
  4207. type TXRectangle = struct {
  4208. Fx int16
  4209. Fy int16
  4210. Fwidth uint16
  4211. Fheight uint16
  4212. }
  4213. type TXArc = struct {
  4214. Fx int16
  4215. Fy int16
  4216. Fwidth uint16
  4217. Fheight uint16
  4218. Fangle1 int16
  4219. Fangle2 int16
  4220. }
  4221. type TXKeyboardControl = struct {
  4222. Fkey_click_percent int32
  4223. Fbell_percent int32
  4224. Fbell_pitch int32
  4225. Fbell_duration int32
  4226. Fled int32
  4227. Fled_mode int32
  4228. Fkey int32
  4229. Fauto_repeat_mode int32
  4230. }
  4231. type TXKeyboardState = struct {
  4232. Fkey_click_percent int32
  4233. Fbell_percent int32
  4234. Fbell_pitch uint32
  4235. Fbell_duration uint32
  4236. Fled_mask uint64
  4237. Fglobal_auto_repeat int32
  4238. Fauto_repeats [32]uint8
  4239. }
  4240. type TXTimeCoord = struct {
  4241. Ftime TTime
  4242. Fx int16
  4243. Fy int16
  4244. }
  4245. type TXModifierKeymap = struct {
  4246. Fmax_keypermod int32
  4247. Fmodifiermap uintptr
  4248. }
  4249. type TDisplay = struct {
  4250. Fext_data uintptr
  4251. Ffree_funcs uintptr
  4252. Ffd int32
  4253. Fconn_checker int32
  4254. Fproto_major_version int32
  4255. Fproto_minor_version int32
  4256. Fvendor uintptr
  4257. Fresource_base TXID
  4258. Fresource_mask TXID
  4259. Fresource_id TXID
  4260. Fresource_shift int32
  4261. Fresource_alloc uintptr
  4262. Fbyte_order int32
  4263. Fbitmap_unit int32
  4264. Fbitmap_pad int32
  4265. Fbitmap_bit_order int32
  4266. Fnformats int32
  4267. Fpixmap_format uintptr
  4268. Fvnumber int32
  4269. Frelease int32
  4270. Fhead uintptr
  4271. Ftail uintptr
  4272. Fqlen int32
  4273. Flast_request_read uint64
  4274. Frequest uint64
  4275. Flast_req uintptr
  4276. Fbuffer uintptr
  4277. Fbufptr uintptr
  4278. Fbufmax uintptr
  4279. Fmax_request_size uint32
  4280. Fdb uintptr
  4281. Fsynchandler uintptr
  4282. Fdisplay_name uintptr
  4283. Fdefault_screen int32
  4284. Fnscreens int32
  4285. Fscreens uintptr
  4286. Fmotion_buffer uint64
  4287. Fflags uint64
  4288. Fmin_keycode int32
  4289. Fmax_keycode int32
  4290. Fkeysyms uintptr
  4291. Fmodifiermap uintptr
  4292. Fkeysyms_per_keycode int32
  4293. Fxdefaults uintptr
  4294. Fscratch_buffer uintptr
  4295. Fscratch_length uint64
  4296. Fext_number int32
  4297. Fext_procs uintptr
  4298. Fevent_vec [128]uintptr
  4299. Fwire_vec [128]uintptr
  4300. Flock_meaning TKeySym
  4301. Flock uintptr
  4302. Fasync_handlers uintptr
  4303. Fbigreq_size uint64
  4304. Flock_fns uintptr
  4305. Fidlist_alloc uintptr
  4306. Fkey_bindings uintptr
  4307. Fcursor_font TFont
  4308. Fatoms uintptr
  4309. Fmode_switch uint32
  4310. Fnum_lock uint32
  4311. Fcontext_db uintptr
  4312. Ferror_vec uintptr
  4313. Fcms struct {
  4314. FdefaultCCCs TXPointer
  4315. FclientCmaps TXPointer
  4316. FperVisualIntensityMaps TXPointer
  4317. }
  4318. Fim_filters uintptr
  4319. Fqfree uintptr
  4320. Fnext_event_serial_num uint64
  4321. Fflushes uintptr
  4322. Fim_fd_info uintptr
  4323. Fim_fd_length int32
  4324. Fconn_watchers uintptr
  4325. Fwatcher_count int32
  4326. Ffiledes TXPointer
  4327. Fsavedsynchandler uintptr
  4328. Fresource_max TXID
  4329. Fxcmisc_opcode int32
  4330. Fxkb_info uintptr
  4331. Ftrans_conn uintptr
  4332. Fxcb uintptr
  4333. Fnext_cookie uint32
  4334. Fgeneric_event_vec [128]uintptr
  4335. Fgeneric_event_copy_vec [128]uintptr
  4336. Fcookiejar uintptr
  4337. Ferror_threads uintptr
  4338. Fexit_handler TXIOErrorExitHandler
  4339. Fexit_handler_data uintptr
  4340. }
  4341. type T_XPrivDisplay = uintptr
  4342. type TXKeyEvent = struct {
  4343. Ftype1 int32
  4344. Fserial uint64
  4345. Fsend_event int32
  4346. Fdisplay uintptr
  4347. Fwindow TWindow
  4348. Froot TWindow
  4349. Fsubwindow TWindow
  4350. Ftime TTime
  4351. Fx int32
  4352. Fy int32
  4353. Fx_root int32
  4354. Fy_root int32
  4355. Fstate uint32
  4356. Fkeycode uint32
  4357. Fsame_screen int32
  4358. }
  4359. type TXKeyPressedEvent = struct {
  4360. Ftype1 int32
  4361. Fserial uint64
  4362. Fsend_event int32
  4363. Fdisplay uintptr
  4364. Fwindow TWindow
  4365. Froot TWindow
  4366. Fsubwindow TWindow
  4367. Ftime TTime
  4368. Fx int32
  4369. Fy int32
  4370. Fx_root int32
  4371. Fy_root int32
  4372. Fstate uint32
  4373. Fkeycode uint32
  4374. Fsame_screen int32
  4375. }
  4376. type TXKeyReleasedEvent = struct {
  4377. Ftype1 int32
  4378. Fserial uint64
  4379. Fsend_event int32
  4380. Fdisplay uintptr
  4381. Fwindow TWindow
  4382. Froot TWindow
  4383. Fsubwindow TWindow
  4384. Ftime TTime
  4385. Fx int32
  4386. Fy int32
  4387. Fx_root int32
  4388. Fy_root int32
  4389. Fstate uint32
  4390. Fkeycode uint32
  4391. Fsame_screen int32
  4392. }
  4393. type TXButtonEvent = struct {
  4394. Ftype1 int32
  4395. Fserial uint64
  4396. Fsend_event int32
  4397. Fdisplay uintptr
  4398. Fwindow TWindow
  4399. Froot TWindow
  4400. Fsubwindow TWindow
  4401. Ftime TTime
  4402. Fx int32
  4403. Fy int32
  4404. Fx_root int32
  4405. Fy_root int32
  4406. Fstate uint32
  4407. Fbutton uint32
  4408. Fsame_screen int32
  4409. }
  4410. type TXButtonPressedEvent = struct {
  4411. Ftype1 int32
  4412. Fserial uint64
  4413. Fsend_event int32
  4414. Fdisplay uintptr
  4415. Fwindow TWindow
  4416. Froot TWindow
  4417. Fsubwindow TWindow
  4418. Ftime TTime
  4419. Fx int32
  4420. Fy int32
  4421. Fx_root int32
  4422. Fy_root int32
  4423. Fstate uint32
  4424. Fbutton uint32
  4425. Fsame_screen int32
  4426. }
  4427. type TXButtonReleasedEvent = struct {
  4428. Ftype1 int32
  4429. Fserial uint64
  4430. Fsend_event int32
  4431. Fdisplay uintptr
  4432. Fwindow TWindow
  4433. Froot TWindow
  4434. Fsubwindow TWindow
  4435. Ftime TTime
  4436. Fx int32
  4437. Fy int32
  4438. Fx_root int32
  4439. Fy_root int32
  4440. Fstate uint32
  4441. Fbutton uint32
  4442. Fsame_screen int32
  4443. }
  4444. type TXMotionEvent = struct {
  4445. Ftype1 int32
  4446. Fserial uint64
  4447. Fsend_event int32
  4448. Fdisplay uintptr
  4449. Fwindow TWindow
  4450. Froot TWindow
  4451. Fsubwindow TWindow
  4452. Ftime TTime
  4453. Fx int32
  4454. Fy int32
  4455. Fx_root int32
  4456. Fy_root int32
  4457. Fstate uint32
  4458. Fis_hint uint8
  4459. Fsame_screen int32
  4460. }
  4461. type TXPointerMovedEvent = struct {
  4462. Ftype1 int32
  4463. Fserial uint64
  4464. Fsend_event int32
  4465. Fdisplay uintptr
  4466. Fwindow TWindow
  4467. Froot TWindow
  4468. Fsubwindow TWindow
  4469. Ftime TTime
  4470. Fx int32
  4471. Fy int32
  4472. Fx_root int32
  4473. Fy_root int32
  4474. Fstate uint32
  4475. Fis_hint uint8
  4476. Fsame_screen int32
  4477. }
  4478. type TXCrossingEvent = struct {
  4479. Ftype1 int32
  4480. Fserial uint64
  4481. Fsend_event int32
  4482. Fdisplay uintptr
  4483. Fwindow TWindow
  4484. Froot TWindow
  4485. Fsubwindow TWindow
  4486. Ftime TTime
  4487. Fx int32
  4488. Fy int32
  4489. Fx_root int32
  4490. Fy_root int32
  4491. Fmode int32
  4492. Fdetail int32
  4493. Fsame_screen int32
  4494. Ffocus int32
  4495. Fstate uint32
  4496. }
  4497. type TXEnterWindowEvent = struct {
  4498. Ftype1 int32
  4499. Fserial uint64
  4500. Fsend_event int32
  4501. Fdisplay uintptr
  4502. Fwindow TWindow
  4503. Froot TWindow
  4504. Fsubwindow TWindow
  4505. Ftime TTime
  4506. Fx int32
  4507. Fy int32
  4508. Fx_root int32
  4509. Fy_root int32
  4510. Fmode int32
  4511. Fdetail int32
  4512. Fsame_screen int32
  4513. Ffocus int32
  4514. Fstate uint32
  4515. }
  4516. type TXLeaveWindowEvent = struct {
  4517. Ftype1 int32
  4518. Fserial uint64
  4519. Fsend_event int32
  4520. Fdisplay uintptr
  4521. Fwindow TWindow
  4522. Froot TWindow
  4523. Fsubwindow TWindow
  4524. Ftime TTime
  4525. Fx int32
  4526. Fy int32
  4527. Fx_root int32
  4528. Fy_root int32
  4529. Fmode int32
  4530. Fdetail int32
  4531. Fsame_screen int32
  4532. Ffocus int32
  4533. Fstate uint32
  4534. }
  4535. type TXFocusChangeEvent = struct {
  4536. Ftype1 int32
  4537. Fserial uint64
  4538. Fsend_event int32
  4539. Fdisplay uintptr
  4540. Fwindow TWindow
  4541. Fmode int32
  4542. Fdetail int32
  4543. }
  4544. type TXFocusInEvent = struct {
  4545. Ftype1 int32
  4546. Fserial uint64
  4547. Fsend_event int32
  4548. Fdisplay uintptr
  4549. Fwindow TWindow
  4550. Fmode int32
  4551. Fdetail int32
  4552. }
  4553. type TXFocusOutEvent = struct {
  4554. Ftype1 int32
  4555. Fserial uint64
  4556. Fsend_event int32
  4557. Fdisplay uintptr
  4558. Fwindow TWindow
  4559. Fmode int32
  4560. Fdetail int32
  4561. }
  4562. type TXKeymapEvent = struct {
  4563. Ftype1 int32
  4564. Fserial uint64
  4565. Fsend_event int32
  4566. Fdisplay uintptr
  4567. Fwindow TWindow
  4568. Fkey_vector [32]uint8
  4569. }
  4570. type TXExposeEvent = struct {
  4571. Ftype1 int32
  4572. Fserial uint64
  4573. Fsend_event int32
  4574. Fdisplay uintptr
  4575. Fwindow TWindow
  4576. Fx int32
  4577. Fy int32
  4578. Fwidth int32
  4579. Fheight int32
  4580. Fcount int32
  4581. }
  4582. type TXGraphicsExposeEvent = struct {
  4583. Ftype1 int32
  4584. Fserial uint64
  4585. Fsend_event int32
  4586. Fdisplay uintptr
  4587. Fdrawable TDrawable
  4588. Fx int32
  4589. Fy int32
  4590. Fwidth int32
  4591. Fheight int32
  4592. Fcount int32
  4593. Fmajor_code int32
  4594. Fminor_code int32
  4595. }
  4596. type TXNoExposeEvent = struct {
  4597. Ftype1 int32
  4598. Fserial uint64
  4599. Fsend_event int32
  4600. Fdisplay uintptr
  4601. Fdrawable TDrawable
  4602. Fmajor_code int32
  4603. Fminor_code int32
  4604. }
  4605. type TXVisibilityEvent = struct {
  4606. Ftype1 int32
  4607. Fserial uint64
  4608. Fsend_event int32
  4609. Fdisplay uintptr
  4610. Fwindow TWindow
  4611. Fstate int32
  4612. }
  4613. type TXCreateWindowEvent = struct {
  4614. Ftype1 int32
  4615. Fserial uint64
  4616. Fsend_event int32
  4617. Fdisplay uintptr
  4618. Fparent TWindow
  4619. Fwindow TWindow
  4620. Fx int32
  4621. Fy int32
  4622. Fwidth int32
  4623. Fheight int32
  4624. Fborder_width int32
  4625. Foverride_redirect int32
  4626. }
  4627. type TXDestroyWindowEvent = struct {
  4628. Ftype1 int32
  4629. Fserial uint64
  4630. Fsend_event int32
  4631. Fdisplay uintptr
  4632. Fevent TWindow
  4633. Fwindow TWindow
  4634. }
  4635. type TXUnmapEvent = struct {
  4636. Ftype1 int32
  4637. Fserial uint64
  4638. Fsend_event int32
  4639. Fdisplay uintptr
  4640. Fevent TWindow
  4641. Fwindow TWindow
  4642. Ffrom_configure int32
  4643. }
  4644. type TXMapEvent = struct {
  4645. Ftype1 int32
  4646. Fserial uint64
  4647. Fsend_event int32
  4648. Fdisplay uintptr
  4649. Fevent TWindow
  4650. Fwindow TWindow
  4651. Foverride_redirect int32
  4652. }
  4653. type TXMapRequestEvent = struct {
  4654. Ftype1 int32
  4655. Fserial uint64
  4656. Fsend_event int32
  4657. Fdisplay uintptr
  4658. Fparent TWindow
  4659. Fwindow TWindow
  4660. }
  4661. type TXReparentEvent = struct {
  4662. Ftype1 int32
  4663. Fserial uint64
  4664. Fsend_event int32
  4665. Fdisplay uintptr
  4666. Fevent TWindow
  4667. Fwindow TWindow
  4668. Fparent TWindow
  4669. Fx int32
  4670. Fy int32
  4671. Foverride_redirect int32
  4672. }
  4673. type TXConfigureEvent = struct {
  4674. Ftype1 int32
  4675. Fserial uint64
  4676. Fsend_event int32
  4677. Fdisplay uintptr
  4678. Fevent TWindow
  4679. Fwindow TWindow
  4680. Fx int32
  4681. Fy int32
  4682. Fwidth int32
  4683. Fheight int32
  4684. Fborder_width int32
  4685. Fabove TWindow
  4686. Foverride_redirect int32
  4687. }
  4688. type TXGravityEvent = struct {
  4689. Ftype1 int32
  4690. Fserial uint64
  4691. Fsend_event int32
  4692. Fdisplay uintptr
  4693. Fevent TWindow
  4694. Fwindow TWindow
  4695. Fx int32
  4696. Fy int32
  4697. }
  4698. type TXResizeRequestEvent = struct {
  4699. Ftype1 int32
  4700. Fserial uint64
  4701. Fsend_event int32
  4702. Fdisplay uintptr
  4703. Fwindow TWindow
  4704. Fwidth int32
  4705. Fheight int32
  4706. }
  4707. type TXConfigureRequestEvent = struct {
  4708. Ftype1 int32
  4709. Fserial uint64
  4710. Fsend_event int32
  4711. Fdisplay uintptr
  4712. Fparent TWindow
  4713. Fwindow TWindow
  4714. Fx int32
  4715. Fy int32
  4716. Fwidth int32
  4717. Fheight int32
  4718. Fborder_width int32
  4719. Fabove TWindow
  4720. Fdetail int32
  4721. Fvalue_mask uint64
  4722. }
  4723. type TXCirculateEvent = struct {
  4724. Ftype1 int32
  4725. Fserial uint64
  4726. Fsend_event int32
  4727. Fdisplay uintptr
  4728. Fevent TWindow
  4729. Fwindow TWindow
  4730. Fplace int32
  4731. }
  4732. type TXCirculateRequestEvent = struct {
  4733. Ftype1 int32
  4734. Fserial uint64
  4735. Fsend_event int32
  4736. Fdisplay uintptr
  4737. Fparent TWindow
  4738. Fwindow TWindow
  4739. Fplace int32
  4740. }
  4741. type TXPropertyEvent = struct {
  4742. Ftype1 int32
  4743. Fserial uint64
  4744. Fsend_event int32
  4745. Fdisplay uintptr
  4746. Fwindow TWindow
  4747. Fatom TAtom
  4748. Ftime TTime
  4749. Fstate int32
  4750. }
  4751. type TXSelectionClearEvent = struct {
  4752. Ftype1 int32
  4753. Fserial uint64
  4754. Fsend_event int32
  4755. Fdisplay uintptr
  4756. Fwindow TWindow
  4757. Fselection TAtom
  4758. Ftime TTime
  4759. }
  4760. type TXSelectionRequestEvent = struct {
  4761. Ftype1 int32
  4762. Fserial uint64
  4763. Fsend_event int32
  4764. Fdisplay uintptr
  4765. Fowner TWindow
  4766. Frequestor TWindow
  4767. Fselection TAtom
  4768. Ftarget TAtom
  4769. Fproperty TAtom
  4770. Ftime TTime
  4771. }
  4772. type TXSelectionEvent = struct {
  4773. Ftype1 int32
  4774. Fserial uint64
  4775. Fsend_event int32
  4776. Fdisplay uintptr
  4777. Frequestor TWindow
  4778. Fselection TAtom
  4779. Ftarget TAtom
  4780. Fproperty TAtom
  4781. Ftime TTime
  4782. }
  4783. type TXColormapEvent = struct {
  4784. Ftype1 int32
  4785. Fserial uint64
  4786. Fsend_event int32
  4787. Fdisplay uintptr
  4788. Fwindow TWindow
  4789. Fcolormap TColormap
  4790. Fnew1 int32
  4791. Fstate int32
  4792. }
  4793. type TXClientMessageEvent = struct {
  4794. Ftype1 int32
  4795. Fserial uint64
  4796. Fsend_event int32
  4797. Fdisplay uintptr
  4798. Fwindow TWindow
  4799. Fmessage_type TAtom
  4800. Fformat int32
  4801. Fdata struct {
  4802. Fs [0][10]int16
  4803. Fl [0][5]int64
  4804. Fb [20]uint8
  4805. F__ccgo_pad3 [20]byte
  4806. }
  4807. }
  4808. type TXMappingEvent = struct {
  4809. Ftype1 int32
  4810. Fserial uint64
  4811. Fsend_event int32
  4812. Fdisplay uintptr
  4813. Fwindow TWindow
  4814. Frequest int32
  4815. Ffirst_keycode int32
  4816. Fcount int32
  4817. }
  4818. type TXErrorEvent = struct {
  4819. Ftype1 int32
  4820. Fdisplay uintptr
  4821. Fresourceid TXID
  4822. Fserial uint64
  4823. Ferror_code uint8
  4824. Frequest_code uint8
  4825. Fminor_code uint8
  4826. }
  4827. type TXAnyEvent = struct {
  4828. Ftype1 int32
  4829. Fserial uint64
  4830. Fsend_event int32
  4831. Fdisplay uintptr
  4832. Fwindow TWindow
  4833. }
  4834. type TXGenericEvent = struct {
  4835. Ftype1 int32
  4836. Fserial uint64
  4837. Fsend_event int32
  4838. Fdisplay uintptr
  4839. Fextension int32
  4840. Fevtype int32
  4841. }
  4842. type TXGenericEventCookie = struct {
  4843. Ftype1 int32
  4844. Fserial uint64
  4845. Fsend_event int32
  4846. Fdisplay uintptr
  4847. Fextension int32
  4848. Fevtype int32
  4849. Fcookie uint32
  4850. Fdata uintptr
  4851. }
  4852. type TXEvent = struct {
  4853. Fxany [0]TXAnyEvent
  4854. Fxkey [0]TXKeyEvent
  4855. Fxbutton [0]TXButtonEvent
  4856. Fxmotion [0]TXMotionEvent
  4857. Fxcrossing [0]TXCrossingEvent
  4858. Fxfocus [0]TXFocusChangeEvent
  4859. Fxexpose [0]TXExposeEvent
  4860. Fxgraphicsexpose [0]TXGraphicsExposeEvent
  4861. Fxnoexpose [0]TXNoExposeEvent
  4862. Fxvisibility [0]TXVisibilityEvent
  4863. Fxcreatewindow [0]TXCreateWindowEvent
  4864. Fxdestroywindow [0]TXDestroyWindowEvent
  4865. Fxunmap [0]TXUnmapEvent
  4866. Fxmap [0]TXMapEvent
  4867. Fxmaprequest [0]TXMapRequestEvent
  4868. Fxreparent [0]TXReparentEvent
  4869. Fxconfigure [0]TXConfigureEvent
  4870. Fxgravity [0]TXGravityEvent
  4871. Fxresizerequest [0]TXResizeRequestEvent
  4872. Fxconfigurerequest [0]TXConfigureRequestEvent
  4873. Fxcirculate [0]TXCirculateEvent
  4874. Fxcirculaterequest [0]TXCirculateRequestEvent
  4875. Fxproperty [0]TXPropertyEvent
  4876. Fxselectionclear [0]TXSelectionClearEvent
  4877. Fxselectionrequest [0]TXSelectionRequestEvent
  4878. Fxselection [0]TXSelectionEvent
  4879. Fxcolormap [0]TXColormapEvent
  4880. Fxclient [0]TXClientMessageEvent
  4881. Fxmapping [0]TXMappingEvent
  4882. Fxerror [0]TXErrorEvent
  4883. Fxkeymap [0]TXKeymapEvent
  4884. Fxgeneric [0]TXGenericEvent
  4885. Fxcookie [0]TXGenericEventCookie
  4886. Fpad [0][24]int64
  4887. Ftype1 int32
  4888. F__ccgo_pad35 [188]byte
  4889. }
  4890. type T_XEvent = TXEvent
  4891. type TXCharStruct = struct {
  4892. Flbearing int16
  4893. Frbearing int16
  4894. Fwidth int16
  4895. Fascent int16
  4896. Fdescent int16
  4897. Fattributes uint16
  4898. }
  4899. type TXFontProp = struct {
  4900. Fname TAtom
  4901. Fcard32 uint64
  4902. }
  4903. type TXFontStruct = struct {
  4904. Fext_data uintptr
  4905. Ffid TFont
  4906. Fdirection uint32
  4907. Fmin_char_or_byte2 uint32
  4908. Fmax_char_or_byte2 uint32
  4909. Fmin_byte1 uint32
  4910. Fmax_byte1 uint32
  4911. Fall_chars_exist int32
  4912. Fdefault_char uint32
  4913. Fn_properties int32
  4914. Fproperties uintptr
  4915. Fmin_bounds TXCharStruct
  4916. Fmax_bounds TXCharStruct
  4917. Fper_char uintptr
  4918. Fascent int32
  4919. Fdescent int32
  4920. }
  4921. type TXTextItem = struct {
  4922. Fchars uintptr
  4923. Fnchars int32
  4924. Fdelta int32
  4925. Ffont TFont
  4926. }
  4927. type TXChar2b = struct {
  4928. Fbyte1 uint8
  4929. Fbyte2 uint8
  4930. }
  4931. type TXTextItem16 = struct {
  4932. Fchars uintptr
  4933. Fnchars int32
  4934. Fdelta int32
  4935. Ffont TFont
  4936. }
  4937. type TXEDataObject = struct {
  4938. Fgc [0]TGC
  4939. Fvisual [0]uintptr
  4940. Fscreen [0]uintptr
  4941. Fpixmap_format [0]uintptr
  4942. Ffont [0]uintptr
  4943. Fdisplay uintptr
  4944. }
  4945. type TXFontSetExtents = struct {
  4946. Fmax_ink_extent TXRectangle
  4947. Fmax_logical_extent TXRectangle
  4948. }
  4949. type TXOM = uintptr
  4950. type TXOC = uintptr
  4951. type TXFontSet = uintptr
  4952. type TXmbTextItem = struct {
  4953. Fchars uintptr
  4954. Fnchars int32
  4955. Fdelta int32
  4956. Ffont_set TXFontSet
  4957. }
  4958. type TXwcTextItem = struct {
  4959. Fchars uintptr
  4960. Fnchars int32
  4961. Fdelta int32
  4962. Ffont_set TXFontSet
  4963. }
  4964. type TXOMCharSetList = struct {
  4965. Fcharset_count int32
  4966. Fcharset_list uintptr
  4967. }
  4968. type TXOrientation = int32
  4969. const _XOMOrientation_LTR_TTB = 0
  4970. const _XOMOrientation_RTL_TTB = 1
  4971. const _XOMOrientation_TTB_LTR = 2
  4972. const _XOMOrientation_TTB_RTL = 3
  4973. const _XOMOrientation_Context = 4
  4974. type TXOMOrientation = struct {
  4975. Fnum_orientation int32
  4976. Forientation uintptr
  4977. }
  4978. type TXOMFontInfo = struct {
  4979. Fnum_font int32
  4980. Ffont_struct_list uintptr
  4981. Ffont_name_list uintptr
  4982. }
  4983. type TXIM = uintptr
  4984. type TXIC = uintptr
  4985. type TXIMProc = uintptr
  4986. type TXICProc = uintptr
  4987. type TXIDProc = uintptr
  4988. type TXIMStyle = uint64
  4989. type TXIMStyles = struct {
  4990. Fcount_styles uint16
  4991. Fsupported_styles uintptr
  4992. }
  4993. type TXVaNestedList = uintptr
  4994. type TXIMCallback = struct {
  4995. Fclient_data TXPointer
  4996. Fcallback TXIMProc
  4997. }
  4998. type TXICCallback = struct {
  4999. Fclient_data TXPointer
  5000. Fcallback TXICProc
  5001. }
  5002. type TXIMFeedback = uint64
  5003. type TXIMText = struct {
  5004. Flength uint16
  5005. Ffeedback uintptr
  5006. Fencoding_is_wchar int32
  5007. Fstring1 struct {
  5008. Fwide_char [0]uintptr
  5009. Fmulti_byte uintptr
  5010. }
  5011. }
  5012. type T_XIMText = TXIMText
  5013. type TXIMPreeditState = uint64
  5014. type TXIMPreeditStateNotifyCallbackStruct = struct {
  5015. Fstate TXIMPreeditState
  5016. }
  5017. type T_XIMPreeditStateNotifyCallbackStruct = TXIMPreeditStateNotifyCallbackStruct
  5018. type TXIMResetState = uint64
  5019. type TXIMStringConversionFeedback = uint64
  5020. type TXIMStringConversionText = struct {
  5021. Flength uint16
  5022. Ffeedback uintptr
  5023. Fencoding_is_wchar int32
  5024. Fstring1 struct {
  5025. Fwcs [0]uintptr
  5026. Fmbs uintptr
  5027. }
  5028. }
  5029. type T_XIMStringConversionText = TXIMStringConversionText
  5030. type TXIMStringConversionPosition = uint16
  5031. type TXIMStringConversionType = uint16
  5032. type TXIMStringConversionOperation = uint16
  5033. type TXIMCaretDirection = int32
  5034. const _XIMForwardChar = 0
  5035. const _XIMBackwardChar = 1
  5036. const _XIMForwardWord = 2
  5037. const _XIMBackwardWord = 3
  5038. const _XIMCaretUp = 4
  5039. const _XIMCaretDown = 5
  5040. const _XIMNextLine = 6
  5041. const _XIMPreviousLine = 7
  5042. const _XIMLineStart = 8
  5043. const _XIMLineEnd = 9
  5044. const _XIMAbsolutePosition = 10
  5045. const _XIMDontChange = 11
  5046. type TXIMStringConversionCallbackStruct = struct {
  5047. Fposition TXIMStringConversionPosition
  5048. Fdirection TXIMCaretDirection
  5049. Foperation TXIMStringConversionOperation
  5050. Ffactor uint16
  5051. Ftext uintptr
  5052. }
  5053. type T_XIMStringConversionCallbackStruct = TXIMStringConversionCallbackStruct
  5054. type TXIMPreeditDrawCallbackStruct = struct {
  5055. Fcaret int32
  5056. Fchg_first int32
  5057. Fchg_length int32
  5058. Ftext uintptr
  5059. }
  5060. type T_XIMPreeditDrawCallbackStruct = TXIMPreeditDrawCallbackStruct
  5061. type TXIMCaretStyle = int32
  5062. const _XIMIsInvisible = 0
  5063. const _XIMIsPrimary = 1
  5064. const _XIMIsSecondary = 2
  5065. type TXIMPreeditCaretCallbackStruct = struct {
  5066. Fposition int32
  5067. Fdirection TXIMCaretDirection
  5068. Fstyle TXIMCaretStyle
  5069. }
  5070. type T_XIMPreeditCaretCallbackStruct = TXIMPreeditCaretCallbackStruct
  5071. type TXIMStatusDataType = int32
  5072. const _XIMTextType = 0
  5073. const _XIMBitmapType = 1
  5074. type TXIMStatusDrawCallbackStruct = struct {
  5075. Ftype1 TXIMStatusDataType
  5076. Fdata struct {
  5077. Fbitmap [0]TPixmap
  5078. Ftext uintptr
  5079. }
  5080. }
  5081. type T_XIMStatusDrawCallbackStruct = TXIMStatusDrawCallbackStruct
  5082. type TXIMHotKeyTrigger = struct {
  5083. Fkeysym TKeySym
  5084. Fmodifier int32
  5085. Fmodifier_mask int32
  5086. }
  5087. type T_XIMHotKeyTrigger = TXIMHotKeyTrigger
  5088. type TXIMHotKeyTriggers = struct {
  5089. Fnum_hot_key int32
  5090. Fkey uintptr
  5091. }
  5092. type T_XIMHotKeyTriggers = TXIMHotKeyTriggers
  5093. type TXIMHotKeyState = uint64
  5094. type TXIMValuesList = struct {
  5095. Fcount_values uint16
  5096. Fsupported_values uintptr
  5097. }
  5098. type TXErrorHandler = uintptr
  5099. type TXIOErrorHandler = uintptr
  5100. type TXIOErrorExitHandler = uintptr
  5101. type TXConnectionWatchProc = uintptr
  5102. type TXSizeHints = struct {
  5103. Fflags int64
  5104. Fx int32
  5105. Fy int32
  5106. Fwidth int32
  5107. Fheight int32
  5108. Fmin_width int32
  5109. Fmin_height int32
  5110. Fmax_width int32
  5111. Fmax_height int32
  5112. Fwidth_inc int32
  5113. Fheight_inc int32
  5114. Fmin_aspect struct {
  5115. Fx int32
  5116. Fy int32
  5117. }
  5118. Fmax_aspect struct {
  5119. Fx int32
  5120. Fy int32
  5121. }
  5122. Fbase_width int32
  5123. Fbase_height int32
  5124. Fwin_gravity int32
  5125. }
  5126. type TXWMHints = struct {
  5127. Fflags int64
  5128. Finput int32
  5129. Finitial_state int32
  5130. Ficon_pixmap TPixmap
  5131. Ficon_window TWindow
  5132. Ficon_x int32
  5133. Ficon_y int32
  5134. Ficon_mask TPixmap
  5135. Fwindow_group TXID
  5136. }
  5137. type TXTextProperty = struct {
  5138. Fvalue uintptr
  5139. Fencoding TAtom
  5140. Fformat int32
  5141. Fnitems uint64
  5142. }
  5143. type TXICCEncodingStyle = int32
  5144. const _XStringStyle = 0
  5145. const _XCompoundTextStyle = 1
  5146. const _XTextStyle = 2
  5147. const _XStdICCTextStyle = 3
  5148. const _XUTF8StringStyle = 4
  5149. type TXIconSize = struct {
  5150. Fmin_width int32
  5151. Fmin_height int32
  5152. Fmax_width int32
  5153. Fmax_height int32
  5154. Fwidth_inc int32
  5155. Fheight_inc int32
  5156. }
  5157. type TXClassHint = struct {
  5158. Fres_name uintptr
  5159. Fres_class uintptr
  5160. }
  5161. type TXComposeStatus = struct {
  5162. Fcompose_ptr TXPointer
  5163. Fchars_matched int32
  5164. }
  5165. type T_XComposeStatus = TXComposeStatus
  5166. type TRegion = uintptr
  5167. type TXVisualInfo = struct {
  5168. Fvisual uintptr
  5169. Fvisualid TVisualID
  5170. Fscreen int32
  5171. Fdepth int32
  5172. Fclass int32
  5173. Fred_mask uint64
  5174. Fgreen_mask uint64
  5175. Fblue_mask uint64
  5176. Fcolormap_size int32
  5177. Fbits_per_rgb int32
  5178. }
  5179. type TXStandardColormap = struct {
  5180. Fcolormap TColormap
  5181. Fred_max uint64
  5182. Fred_mult uint64
  5183. Fgreen_max uint64
  5184. Fgreen_mult uint64
  5185. Fblue_max uint64
  5186. Fblue_mult uint64
  5187. Fbase_pixel uint64
  5188. Fvisualid TVisualID
  5189. Fkillid TXID
  5190. }
  5191. type TXContext = int32
  5192. type TINT64 = int64
  5193. type TINT32 = int32
  5194. type TINT16 = int16
  5195. type TINT8 = int8
  5196. type TCARD64 = uint64
  5197. type TCARD32 = uint32
  5198. type TCARD16 = uint16
  5199. type TCARD8 = uint8
  5200. type TBITS32 = uint32
  5201. type TBITS16 = uint16
  5202. type TBYTE = uint8
  5203. type TBOOL = uint8
  5204. type Tuintptr_t = uint64
  5205. type Tintptr_t = int64
  5206. type Tintmax_t = int64
  5207. type Tuint8_t = uint8
  5208. type Tuintmax_t = uint64
  5209. type Tint_fast8_t = int8
  5210. type Tint_fast64_t = int64
  5211. type Tint_least8_t = int8
  5212. type Tint_least16_t = int16
  5213. type Tint_least32_t = int32
  5214. type Tint_least64_t = int64
  5215. type Tuint_fast8_t = uint8
  5216. type Tuint_fast64_t = uint64
  5217. type Tuint_least8_t = uint8
  5218. type Tuint_least16_t = uint16
  5219. type Tuint_least32_t = uint32
  5220. type Tuint_least64_t = uint64
  5221. type Tint_fast16_t = int32
  5222. type Tint_fast32_t = int32
  5223. type Tuint_fast16_t = uint32
  5224. type Tuint_fast32_t = uint32
  5225. type TxSegment = struct {
  5226. Fx1 TINT16
  5227. Fy1 TINT16
  5228. Fx2 TINT16
  5229. Fy2 TINT16
  5230. }
  5231. type T_xSegment = TxSegment
  5232. type TxPoint = struct {
  5233. Fx TINT16
  5234. Fy TINT16
  5235. }
  5236. type T_xPoint = TxPoint
  5237. type TxRectangle = struct {
  5238. Fx TINT16
  5239. Fy TINT16
  5240. Fwidth TCARD16
  5241. Fheight TCARD16
  5242. }
  5243. type T_xRectangle = TxRectangle
  5244. type TxArc = struct {
  5245. Fx TINT16
  5246. Fy TINT16
  5247. Fwidth TCARD16
  5248. Fheight TCARD16
  5249. Fangle1 TINT16
  5250. Fangle2 TINT16
  5251. }
  5252. type T_xArc = TxArc
  5253. type TKeyButMask = uint16
  5254. type TxConnClientPrefix = struct {
  5255. FbyteOrder TCARD8
  5256. Fpad TBYTE
  5257. FmajorVersion TCARD16
  5258. FminorVersion TCARD16
  5259. FnbytesAuthProto TCARD16
  5260. FnbytesAuthString TCARD16
  5261. Fpad2 TCARD16
  5262. }
  5263. type TxConnSetupPrefix = struct {
  5264. Fsuccess TCARD8
  5265. FlengthReason TBYTE
  5266. FmajorVersion TCARD16
  5267. FminorVersion TCARD16
  5268. Flength TCARD16
  5269. }
  5270. type TxConnSetup = struct {
  5271. Frelease TCARD32
  5272. FridBase TCARD32
  5273. FridMask TCARD32
  5274. FmotionBufferSize TCARD32
  5275. FnbytesVendor TCARD16
  5276. FmaxRequestSize TCARD16
  5277. FnumRoots TCARD8
  5278. FnumFormats TCARD8
  5279. FimageByteOrder TCARD8
  5280. FbitmapBitOrder TCARD8
  5281. FbitmapScanlineUnit TCARD8
  5282. FbitmapScanlinePad TCARD8
  5283. FminKeyCode TCARD8
  5284. FmaxKeyCode TCARD8
  5285. Fpad2 TCARD32
  5286. }
  5287. type TxPixmapFormat = struct {
  5288. Fdepth TCARD8
  5289. FbitsPerPixel TCARD8
  5290. FscanLinePad TCARD8
  5291. Fpad1 TCARD8
  5292. Fpad2 TCARD32
  5293. }
  5294. type TxDepth = struct {
  5295. Fdepth TCARD8
  5296. Fpad1 TCARD8
  5297. FnVisuals TCARD16
  5298. Fpad2 TCARD32
  5299. }
  5300. type TxVisualType = struct {
  5301. FvisualID TCARD32
  5302. Fclass TCARD8
  5303. FbitsPerRGB TCARD8
  5304. FcolormapEntries TCARD16
  5305. FredMask TCARD32
  5306. FgreenMask TCARD32
  5307. FblueMask TCARD32
  5308. Fpad TCARD32
  5309. }
  5310. type TxWindowRoot = struct {
  5311. FwindowId TCARD32
  5312. FdefaultColormap TCARD32
  5313. FwhitePixel TCARD32
  5314. FblackPixel TCARD32
  5315. FcurrentInputMask TCARD32
  5316. FpixWidth TCARD16
  5317. FpixHeight TCARD16
  5318. FmmWidth TCARD16
  5319. FmmHeight TCARD16
  5320. FminInstalledMaps TCARD16
  5321. FmaxInstalledMaps TCARD16
  5322. FrootVisualID TCARD32
  5323. FbackingStore TCARD8
  5324. FsaveUnders TBOOL
  5325. FrootDepth TCARD8
  5326. FnDepths TCARD8
  5327. }
  5328. type TxTimecoord = struct {
  5329. Ftime TCARD32
  5330. Fx TINT16
  5331. Fy TINT16
  5332. }
  5333. type TxHostEntry = struct {
  5334. Ffamily TCARD8
  5335. Fpad TBYTE
  5336. Flength TCARD16
  5337. }
  5338. type TxCharInfo = struct {
  5339. FleftSideBearing TINT16
  5340. FrightSideBearing TINT16
  5341. FcharacterWidth TINT16
  5342. Fascent TINT16
  5343. Fdescent TINT16
  5344. Fattributes TCARD16
  5345. }
  5346. type TxFontProp = struct {
  5347. Fname TCARD32
  5348. Fvalue TCARD32
  5349. }
  5350. type TxTextElt = struct {
  5351. Flen1 TCARD8
  5352. Fdelta TINT8
  5353. }
  5354. type TxColorItem = struct {
  5355. Fpixel TCARD32
  5356. Fred TCARD16
  5357. Fgreen TCARD16
  5358. Fblue TCARD16
  5359. Fflags TCARD8
  5360. Fpad TCARD8
  5361. }
  5362. type Txrgb = struct {
  5363. Fred TCARD16
  5364. Fgreen TCARD16
  5365. Fblue TCARD16
  5366. Fpad TCARD16
  5367. }
  5368. type TKEYCODE = uint8
  5369. type TxGenericReply = struct {
  5370. Ftype1 TBYTE
  5371. Fdata1 TBYTE
  5372. FsequenceNumber TCARD16
  5373. Flength TCARD32
  5374. Fdata00 TCARD32
  5375. Fdata01 TCARD32
  5376. Fdata02 TCARD32
  5377. Fdata03 TCARD32
  5378. Fdata04 TCARD32
  5379. Fdata05 TCARD32
  5380. }
  5381. type TxGetWindowAttributesReply = struct {
  5382. Ftype1 TBYTE
  5383. FbackingStore TCARD8
  5384. FsequenceNumber TCARD16
  5385. Flength TCARD32
  5386. FvisualID TCARD32
  5387. Fclass TCARD16
  5388. FbitGravity TCARD8
  5389. FwinGravity TCARD8
  5390. FbackingBitPlanes TCARD32
  5391. FbackingPixel TCARD32
  5392. FsaveUnder TBOOL
  5393. FmapInstalled TBOOL
  5394. FmapState TCARD8
  5395. Foverride TBOOL
  5396. Fcolormap TCARD32
  5397. FallEventMasks TCARD32
  5398. FyourEventMask TCARD32
  5399. FdoNotPropagateMask TCARD16
  5400. Fpad TCARD16
  5401. }
  5402. type TxGetGeometryReply = struct {
  5403. Ftype1 TBYTE
  5404. Fdepth TCARD8
  5405. FsequenceNumber TCARD16
  5406. Flength TCARD32
  5407. Froot TCARD32
  5408. Fx TINT16
  5409. Fy TINT16
  5410. Fwidth TCARD16
  5411. Fheight TCARD16
  5412. FborderWidth TCARD16
  5413. Fpad1 TCARD16
  5414. Fpad2 TCARD32
  5415. Fpad3 TCARD32
  5416. }
  5417. type TxQueryTreeReply = struct {
  5418. Ftype1 TBYTE
  5419. Fpad1 TBYTE
  5420. FsequenceNumber TCARD16
  5421. Flength TCARD32
  5422. Froot TCARD32
  5423. Fparent TCARD32
  5424. FnChildren TCARD16
  5425. Fpad2 TCARD16
  5426. Fpad3 TCARD32
  5427. Fpad4 TCARD32
  5428. Fpad5 TCARD32
  5429. }
  5430. type TxInternAtomReply = struct {
  5431. Ftype1 TBYTE
  5432. Fpad1 TBYTE
  5433. FsequenceNumber TCARD16
  5434. Flength TCARD32
  5435. Fatom TCARD32
  5436. Fpad2 TCARD32
  5437. Fpad3 TCARD32
  5438. Fpad4 TCARD32
  5439. Fpad5 TCARD32
  5440. Fpad6 TCARD32
  5441. }
  5442. type TxGetAtomNameReply = struct {
  5443. Ftype1 TBYTE
  5444. Fpad1 TBYTE
  5445. FsequenceNumber TCARD16
  5446. Flength TCARD32
  5447. FnameLength TCARD16
  5448. Fpad2 TCARD16
  5449. Fpad3 TCARD32
  5450. Fpad4 TCARD32
  5451. Fpad5 TCARD32
  5452. Fpad6 TCARD32
  5453. Fpad7 TCARD32
  5454. }
  5455. type TxGetPropertyReply = struct {
  5456. Ftype1 TBYTE
  5457. Fformat TCARD8
  5458. FsequenceNumber TCARD16
  5459. Flength TCARD32
  5460. FpropertyType TCARD32
  5461. FbytesAfter TCARD32
  5462. FnItems TCARD32
  5463. Fpad1 TCARD32
  5464. Fpad2 TCARD32
  5465. Fpad3 TCARD32
  5466. }
  5467. type TxListPropertiesReply = struct {
  5468. Ftype1 TBYTE
  5469. Fpad1 TBYTE
  5470. FsequenceNumber TCARD16
  5471. Flength TCARD32
  5472. FnProperties TCARD16
  5473. Fpad2 TCARD16
  5474. Fpad3 TCARD32
  5475. Fpad4 TCARD32
  5476. Fpad5 TCARD32
  5477. Fpad6 TCARD32
  5478. Fpad7 TCARD32
  5479. }
  5480. type TxGetSelectionOwnerReply = struct {
  5481. Ftype1 TBYTE
  5482. Fpad1 TBYTE
  5483. FsequenceNumber TCARD16
  5484. Flength TCARD32
  5485. Fowner TCARD32
  5486. Fpad2 TCARD32
  5487. Fpad3 TCARD32
  5488. Fpad4 TCARD32
  5489. Fpad5 TCARD32
  5490. Fpad6 TCARD32
  5491. }
  5492. type TxGrabPointerReply = struct {
  5493. Ftype1 TBYTE
  5494. Fstatus TBYTE
  5495. FsequenceNumber TCARD16
  5496. Flength TCARD32
  5497. Fpad1 TCARD32
  5498. Fpad2 TCARD32
  5499. Fpad3 TCARD32
  5500. Fpad4 TCARD32
  5501. Fpad5 TCARD32
  5502. Fpad6 TCARD32
  5503. }
  5504. type TxGrabKeyboardReply = struct {
  5505. Ftype1 TBYTE
  5506. Fstatus TBYTE
  5507. FsequenceNumber TCARD16
  5508. Flength TCARD32
  5509. Fpad1 TCARD32
  5510. Fpad2 TCARD32
  5511. Fpad3 TCARD32
  5512. Fpad4 TCARD32
  5513. Fpad5 TCARD32
  5514. Fpad6 TCARD32
  5515. }
  5516. type TxQueryPointerReply = struct {
  5517. Ftype1 TBYTE
  5518. FsameScreen TBOOL
  5519. FsequenceNumber TCARD16
  5520. Flength TCARD32
  5521. Froot TCARD32
  5522. Fchild TCARD32
  5523. FrootX TINT16
  5524. FrootY TINT16
  5525. FwinX TINT16
  5526. FwinY TINT16
  5527. Fmask TCARD16
  5528. Fpad1 TCARD16
  5529. Fpad TCARD32
  5530. }
  5531. type TxGetMotionEventsReply = struct {
  5532. Ftype1 TBYTE
  5533. Fpad1 TBYTE
  5534. FsequenceNumber TCARD16
  5535. Flength TCARD32
  5536. FnEvents TCARD32
  5537. Fpad2 TCARD32
  5538. Fpad3 TCARD32
  5539. Fpad4 TCARD32
  5540. Fpad5 TCARD32
  5541. Fpad6 TCARD32
  5542. }
  5543. type TxTranslateCoordsReply = struct {
  5544. Ftype1 TBYTE
  5545. FsameScreen TBOOL
  5546. FsequenceNumber TCARD16
  5547. Flength TCARD32
  5548. Fchild TCARD32
  5549. FdstX TINT16
  5550. FdstY TINT16
  5551. Fpad2 TCARD32
  5552. Fpad3 TCARD32
  5553. Fpad4 TCARD32
  5554. Fpad5 TCARD32
  5555. }
  5556. type TxGetInputFocusReply = struct {
  5557. Ftype1 TBYTE
  5558. FrevertTo TCARD8
  5559. FsequenceNumber TCARD16
  5560. Flength TCARD32
  5561. Ffocus TCARD32
  5562. Fpad1 TCARD32
  5563. Fpad2 TCARD32
  5564. Fpad3 TCARD32
  5565. Fpad4 TCARD32
  5566. Fpad5 TCARD32
  5567. }
  5568. type TxQueryKeymapReply = struct {
  5569. Ftype1 TBYTE
  5570. Fpad1 TBYTE
  5571. FsequenceNumber TCARD16
  5572. Flength TCARD32
  5573. Fmap1 [32]TBYTE
  5574. }
  5575. type TxQueryFontReply = struct {
  5576. Ftype1 TBYTE
  5577. Fpad1 TBYTE
  5578. FsequenceNumber TCARD16
  5579. Flength TCARD32
  5580. FminBounds TxCharInfo
  5581. Fwalign1 TCARD32
  5582. FmaxBounds TxCharInfo
  5583. Fwalign2 TCARD32
  5584. FminCharOrByte2 TCARD16
  5585. FmaxCharOrByte2 TCARD16
  5586. FdefaultChar TCARD16
  5587. FnFontProps TCARD16
  5588. FdrawDirection TCARD8
  5589. FminByte1 TCARD8
  5590. FmaxByte1 TCARD8
  5591. FallCharsExist TBOOL
  5592. FfontAscent TINT16
  5593. FfontDescent TINT16
  5594. FnCharInfos TCARD32
  5595. }
  5596. type T_xQueryFontReply = TxQueryFontReply
  5597. type TxQueryTextExtentsReply = struct {
  5598. Ftype1 TBYTE
  5599. FdrawDirection TCARD8
  5600. FsequenceNumber TCARD16
  5601. Flength TCARD32
  5602. FfontAscent TINT16
  5603. FfontDescent TINT16
  5604. FoverallAscent TINT16
  5605. FoverallDescent TINT16
  5606. FoverallWidth TINT32
  5607. FoverallLeft TINT32
  5608. FoverallRight TINT32
  5609. Fpad TCARD32
  5610. }
  5611. type TxListFontsReply = struct {
  5612. Ftype1 TBYTE
  5613. Fpad1 TBYTE
  5614. FsequenceNumber TCARD16
  5615. Flength TCARD32
  5616. FnFonts TCARD16
  5617. Fpad2 TCARD16
  5618. Fpad3 TCARD32
  5619. Fpad4 TCARD32
  5620. Fpad5 TCARD32
  5621. Fpad6 TCARD32
  5622. Fpad7 TCARD32
  5623. }
  5624. type TxListFontsWithInfoReply = struct {
  5625. Ftype1 TBYTE
  5626. FnameLength TCARD8
  5627. FsequenceNumber TCARD16
  5628. Flength TCARD32
  5629. FminBounds TxCharInfo
  5630. Fwalign1 TCARD32
  5631. FmaxBounds TxCharInfo
  5632. Fwalign2 TCARD32
  5633. FminCharOrByte2 TCARD16
  5634. FmaxCharOrByte2 TCARD16
  5635. FdefaultChar TCARD16
  5636. FnFontProps TCARD16
  5637. FdrawDirection TCARD8
  5638. FminByte1 TCARD8
  5639. FmaxByte1 TCARD8
  5640. FallCharsExist TBOOL
  5641. FfontAscent TINT16
  5642. FfontDescent TINT16
  5643. FnReplies TCARD32
  5644. }
  5645. type TxGetFontPathReply = struct {
  5646. Ftype1 TBYTE
  5647. Fpad1 TBYTE
  5648. FsequenceNumber TCARD16
  5649. Flength TCARD32
  5650. FnPaths TCARD16
  5651. Fpad2 TCARD16
  5652. Fpad3 TCARD32
  5653. Fpad4 TCARD32
  5654. Fpad5 TCARD32
  5655. Fpad6 TCARD32
  5656. Fpad7 TCARD32
  5657. }
  5658. type TxGetImageReply = struct {
  5659. Ftype1 TBYTE
  5660. Fdepth TCARD8
  5661. FsequenceNumber TCARD16
  5662. Flength TCARD32
  5663. Fvisual TCARD32
  5664. Fpad3 TCARD32
  5665. Fpad4 TCARD32
  5666. Fpad5 TCARD32
  5667. Fpad6 TCARD32
  5668. Fpad7 TCARD32
  5669. }
  5670. type TxListInstalledColormapsReply = struct {
  5671. Ftype1 TBYTE
  5672. Fpad1 TBYTE
  5673. FsequenceNumber TCARD16
  5674. Flength TCARD32
  5675. FnColormaps TCARD16
  5676. Fpad2 TCARD16
  5677. Fpad3 TCARD32
  5678. Fpad4 TCARD32
  5679. Fpad5 TCARD32
  5680. Fpad6 TCARD32
  5681. Fpad7 TCARD32
  5682. }
  5683. type TxAllocColorReply = struct {
  5684. Ftype1 TBYTE
  5685. Fpad1 TBYTE
  5686. FsequenceNumber TCARD16
  5687. Flength TCARD32
  5688. Fred TCARD16
  5689. Fgreen TCARD16
  5690. Fblue TCARD16
  5691. Fpad2 TCARD16
  5692. Fpixel TCARD32
  5693. Fpad3 TCARD32
  5694. Fpad4 TCARD32
  5695. Fpad5 TCARD32
  5696. }
  5697. type TxAllocNamedColorReply = struct {
  5698. Ftype1 TBYTE
  5699. Fpad1 TBYTE
  5700. FsequenceNumber TCARD16
  5701. Flength TCARD32
  5702. Fpixel TCARD32
  5703. FexactRed TCARD16
  5704. FexactGreen TCARD16
  5705. FexactBlue TCARD16
  5706. FscreenRed TCARD16
  5707. FscreenGreen TCARD16
  5708. FscreenBlue TCARD16
  5709. Fpad2 TCARD32
  5710. Fpad3 TCARD32
  5711. }
  5712. type TxAllocColorCellsReply = struct {
  5713. Ftype1 TBYTE
  5714. Fpad1 TBYTE
  5715. FsequenceNumber TCARD16
  5716. Flength TCARD32
  5717. FnPixels TCARD16
  5718. FnMasks TCARD16
  5719. Fpad3 TCARD32
  5720. Fpad4 TCARD32
  5721. Fpad5 TCARD32
  5722. Fpad6 TCARD32
  5723. Fpad7 TCARD32
  5724. }
  5725. type TxAllocColorPlanesReply = struct {
  5726. Ftype1 TBYTE
  5727. Fpad1 TBYTE
  5728. FsequenceNumber TCARD16
  5729. Flength TCARD32
  5730. FnPixels TCARD16
  5731. Fpad2 TCARD16
  5732. FredMask TCARD32
  5733. FgreenMask TCARD32
  5734. FblueMask TCARD32
  5735. Fpad3 TCARD32
  5736. Fpad4 TCARD32
  5737. }
  5738. type TxQueryColorsReply = struct {
  5739. Ftype1 TBYTE
  5740. Fpad1 TBYTE
  5741. FsequenceNumber TCARD16
  5742. Flength TCARD32
  5743. FnColors TCARD16
  5744. Fpad2 TCARD16
  5745. Fpad3 TCARD32
  5746. Fpad4 TCARD32
  5747. Fpad5 TCARD32
  5748. Fpad6 TCARD32
  5749. Fpad7 TCARD32
  5750. }
  5751. type TxLookupColorReply = struct {
  5752. Ftype1 TBYTE
  5753. Fpad1 TBYTE
  5754. FsequenceNumber TCARD16
  5755. Flength TCARD32
  5756. FexactRed TCARD16
  5757. FexactGreen TCARD16
  5758. FexactBlue TCARD16
  5759. FscreenRed TCARD16
  5760. FscreenGreen TCARD16
  5761. FscreenBlue TCARD16
  5762. Fpad3 TCARD32
  5763. Fpad4 TCARD32
  5764. Fpad5 TCARD32
  5765. }
  5766. type TxQueryBestSizeReply = struct {
  5767. Ftype1 TBYTE
  5768. Fpad1 TBYTE
  5769. FsequenceNumber TCARD16
  5770. Flength TCARD32
  5771. Fwidth TCARD16
  5772. Fheight TCARD16
  5773. Fpad3 TCARD32
  5774. Fpad4 TCARD32
  5775. Fpad5 TCARD32
  5776. Fpad6 TCARD32
  5777. Fpad7 TCARD32
  5778. }
  5779. type TxQueryExtensionReply = struct {
  5780. Ftype1 TBYTE
  5781. Fpad1 TBYTE
  5782. FsequenceNumber TCARD16
  5783. Flength TCARD32
  5784. Fpresent TBOOL
  5785. Fmajor_opcode TCARD8
  5786. Ffirst_event TCARD8
  5787. Ffirst_error TCARD8
  5788. Fpad3 TCARD32
  5789. Fpad4 TCARD32
  5790. Fpad5 TCARD32
  5791. Fpad6 TCARD32
  5792. Fpad7 TCARD32
  5793. }
  5794. type TxListExtensionsReply = struct {
  5795. Ftype1 TBYTE
  5796. FnExtensions TCARD8
  5797. FsequenceNumber TCARD16
  5798. Flength TCARD32
  5799. Fpad2 TCARD32
  5800. Fpad3 TCARD32
  5801. Fpad4 TCARD32
  5802. Fpad5 TCARD32
  5803. Fpad6 TCARD32
  5804. Fpad7 TCARD32
  5805. }
  5806. type TxSetMappingReply = struct {
  5807. Ftype1 TBYTE
  5808. Fsuccess TCARD8
  5809. FsequenceNumber TCARD16
  5810. Flength TCARD32
  5811. Fpad2 TCARD32
  5812. Fpad3 TCARD32
  5813. Fpad4 TCARD32
  5814. Fpad5 TCARD32
  5815. Fpad6 TCARD32
  5816. Fpad7 TCARD32
  5817. }
  5818. type TxSetPointerMappingReply = struct {
  5819. Ftype1 TBYTE
  5820. Fsuccess TCARD8
  5821. FsequenceNumber TCARD16
  5822. Flength TCARD32
  5823. Fpad2 TCARD32
  5824. Fpad3 TCARD32
  5825. Fpad4 TCARD32
  5826. Fpad5 TCARD32
  5827. Fpad6 TCARD32
  5828. Fpad7 TCARD32
  5829. }
  5830. type TxSetModifierMappingReply = struct {
  5831. Ftype1 TBYTE
  5832. Fsuccess TCARD8
  5833. FsequenceNumber TCARD16
  5834. Flength TCARD32
  5835. Fpad2 TCARD32
  5836. Fpad3 TCARD32
  5837. Fpad4 TCARD32
  5838. Fpad5 TCARD32
  5839. Fpad6 TCARD32
  5840. Fpad7 TCARD32
  5841. }
  5842. type TxGetPointerMappingReply = struct {
  5843. Ftype1 TBYTE
  5844. FnElts TCARD8
  5845. FsequenceNumber TCARD16
  5846. Flength TCARD32
  5847. Fpad2 TCARD32
  5848. Fpad3 TCARD32
  5849. Fpad4 TCARD32
  5850. Fpad5 TCARD32
  5851. Fpad6 TCARD32
  5852. Fpad7 TCARD32
  5853. }
  5854. type TxGetKeyboardMappingReply = struct {
  5855. Ftype1 TBYTE
  5856. FkeySymsPerKeyCode TCARD8
  5857. FsequenceNumber TCARD16
  5858. Flength TCARD32
  5859. Fpad2 TCARD32
  5860. Fpad3 TCARD32
  5861. Fpad4 TCARD32
  5862. Fpad5 TCARD32
  5863. Fpad6 TCARD32
  5864. Fpad7 TCARD32
  5865. }
  5866. type TxGetModifierMappingReply = struct {
  5867. Ftype1 TBYTE
  5868. FnumKeyPerModifier TCARD8
  5869. FsequenceNumber TCARD16
  5870. Flength TCARD32
  5871. Fpad1 TCARD32
  5872. Fpad2 TCARD32
  5873. Fpad3 TCARD32
  5874. Fpad4 TCARD32
  5875. Fpad5 TCARD32
  5876. Fpad6 TCARD32
  5877. }
  5878. type TxGetKeyboardControlReply = struct {
  5879. Ftype1 TBYTE
  5880. FglobalAutoRepeat TBOOL
  5881. FsequenceNumber TCARD16
  5882. Flength TCARD32
  5883. FledMask TCARD32
  5884. FkeyClickPercent TCARD8
  5885. FbellPercent TCARD8
  5886. FbellPitch TCARD16
  5887. FbellDuration TCARD16
  5888. Fpad TCARD16
  5889. Fmap1 [32]TBYTE
  5890. }
  5891. type TxGetPointerControlReply = struct {
  5892. Ftype1 TBYTE
  5893. Fpad1 TBYTE
  5894. FsequenceNumber TCARD16
  5895. Flength TCARD32
  5896. FaccelNumerator TCARD16
  5897. FaccelDenominator TCARD16
  5898. Fthreshold TCARD16
  5899. Fpad2 TCARD16
  5900. Fpad3 TCARD32
  5901. Fpad4 TCARD32
  5902. Fpad5 TCARD32
  5903. Fpad6 TCARD32
  5904. }
  5905. type TxGetScreenSaverReply = struct {
  5906. Ftype1 TBYTE
  5907. Fpad1 TBYTE
  5908. FsequenceNumber TCARD16
  5909. Flength TCARD32
  5910. Ftimeout TCARD16
  5911. Finterval TCARD16
  5912. FpreferBlanking TBOOL
  5913. FallowExposures TBOOL
  5914. Fpad2 TCARD16
  5915. Fpad3 TCARD32
  5916. Fpad4 TCARD32
  5917. Fpad5 TCARD32
  5918. Fpad6 TCARD32
  5919. }
  5920. type TxListHostsReply = struct {
  5921. Ftype1 TBYTE
  5922. Fenabled TBOOL
  5923. FsequenceNumber TCARD16
  5924. Flength TCARD32
  5925. FnHosts TCARD16
  5926. Fpad1 TCARD16
  5927. Fpad3 TCARD32
  5928. Fpad4 TCARD32
  5929. Fpad5 TCARD32
  5930. Fpad6 TCARD32
  5931. Fpad7 TCARD32
  5932. }
  5933. type TxError = struct {
  5934. Ftype1 TBYTE
  5935. FerrorCode TBYTE
  5936. FsequenceNumber TCARD16
  5937. FresourceID TCARD32
  5938. FminorCode TCARD16
  5939. FmajorCode TCARD8
  5940. Fpad1 TBYTE
  5941. Fpad3 TCARD32
  5942. Fpad4 TCARD32
  5943. Fpad5 TCARD32
  5944. Fpad6 TCARD32
  5945. Fpad7 TCARD32
  5946. }
  5947. type TxEvent = struct {
  5948. Fu struct {
  5949. FkeyButtonPointer [0]struct {
  5950. Fpad00 TCARD32
  5951. Ftime TCARD32
  5952. Froot TCARD32
  5953. Fevent TCARD32
  5954. Fchild TCARD32
  5955. FrootX TINT16
  5956. FrootY TINT16
  5957. FeventX TINT16
  5958. FeventY TINT16
  5959. Fstate TKeyButMask
  5960. FsameScreen TBOOL
  5961. Fpad1 TBYTE
  5962. }
  5963. FenterLeave [0]struct {
  5964. Fpad00 TCARD32
  5965. Ftime TCARD32
  5966. Froot TCARD32
  5967. Fevent TCARD32
  5968. Fchild TCARD32
  5969. FrootX TINT16
  5970. FrootY TINT16
  5971. FeventX TINT16
  5972. FeventY TINT16
  5973. Fstate TKeyButMask
  5974. Fmode TBYTE
  5975. Fflags TBYTE
  5976. }
  5977. Ffocus [0]struct {
  5978. Fpad00 TCARD32
  5979. Fwindow TCARD32
  5980. Fmode TBYTE
  5981. Fpad1 TBYTE
  5982. Fpad2 TBYTE
  5983. Fpad3 TBYTE
  5984. }
  5985. Fexpose [0]struct {
  5986. Fpad00 TCARD32
  5987. Fwindow TCARD32
  5988. Fx TCARD16
  5989. Fy TCARD16
  5990. Fwidth TCARD16
  5991. Fheight TCARD16
  5992. Fcount TCARD16
  5993. Fpad2 TCARD16
  5994. }
  5995. FgraphicsExposure [0]struct {
  5996. Fpad00 TCARD32
  5997. Fdrawable TCARD32
  5998. Fx TCARD16
  5999. Fy TCARD16
  6000. Fwidth TCARD16
  6001. Fheight TCARD16
  6002. FminorEvent TCARD16
  6003. Fcount TCARD16
  6004. FmajorEvent TBYTE
  6005. Fpad1 TBYTE
  6006. Fpad2 TBYTE
  6007. Fpad3 TBYTE
  6008. }
  6009. FnoExposure [0]struct {
  6010. Fpad00 TCARD32
  6011. Fdrawable TCARD32
  6012. FminorEvent TCARD16
  6013. FmajorEvent TBYTE
  6014. Fbpad TBYTE
  6015. }
  6016. Fvisibility [0]struct {
  6017. Fpad00 TCARD32
  6018. Fwindow TCARD32
  6019. Fstate TCARD8
  6020. Fpad1 TBYTE
  6021. Fpad2 TBYTE
  6022. Fpad3 TBYTE
  6023. }
  6024. FcreateNotify [0]struct {
  6025. Fpad00 TCARD32
  6026. Fparent TCARD32
  6027. Fwindow TCARD32
  6028. Fx TINT16
  6029. Fy TINT16
  6030. Fwidth TCARD16
  6031. Fheight TCARD16
  6032. FborderWidth TCARD16
  6033. Foverride TBOOL
  6034. Fbpad TBYTE
  6035. }
  6036. FdestroyNotify [0]struct {
  6037. Fpad00 TCARD32
  6038. Fevent TCARD32
  6039. Fwindow TCARD32
  6040. }
  6041. FunmapNotify [0]struct {
  6042. Fpad00 TCARD32
  6043. Fevent TCARD32
  6044. Fwindow TCARD32
  6045. FfromConfigure TBOOL
  6046. Fpad1 TBYTE
  6047. Fpad2 TBYTE
  6048. Fpad3 TBYTE
  6049. }
  6050. FmapNotify [0]struct {
  6051. Fpad00 TCARD32
  6052. Fevent TCARD32
  6053. Fwindow TCARD32
  6054. Foverride TBOOL
  6055. Fpad1 TBYTE
  6056. Fpad2 TBYTE
  6057. Fpad3 TBYTE
  6058. }
  6059. FmapRequest [0]struct {
  6060. Fpad00 TCARD32
  6061. Fparent TCARD32
  6062. Fwindow TCARD32
  6063. }
  6064. Freparent [0]struct {
  6065. Fpad00 TCARD32
  6066. Fevent TCARD32
  6067. Fwindow TCARD32
  6068. Fparent TCARD32
  6069. Fx TINT16
  6070. Fy TINT16
  6071. Foverride TBOOL
  6072. Fpad1 TBYTE
  6073. Fpad2 TBYTE
  6074. Fpad3 TBYTE
  6075. }
  6076. FconfigureNotify [0]struct {
  6077. Fpad00 TCARD32
  6078. Fevent TCARD32
  6079. Fwindow TCARD32
  6080. FaboveSibling TCARD32
  6081. Fx TINT16
  6082. Fy TINT16
  6083. Fwidth TCARD16
  6084. Fheight TCARD16
  6085. FborderWidth TCARD16
  6086. Foverride TBOOL
  6087. Fbpad TBYTE
  6088. }
  6089. FconfigureRequest [0]struct {
  6090. Fpad00 TCARD32
  6091. Fparent TCARD32
  6092. Fwindow TCARD32
  6093. Fsibling TCARD32
  6094. Fx TINT16
  6095. Fy TINT16
  6096. Fwidth TCARD16
  6097. Fheight TCARD16
  6098. FborderWidth TCARD16
  6099. FvalueMask TCARD16
  6100. Fpad1 TCARD32
  6101. }
  6102. Fgravity [0]struct {
  6103. Fpad00 TCARD32
  6104. Fevent TCARD32
  6105. Fwindow TCARD32
  6106. Fx TINT16
  6107. Fy TINT16
  6108. Fpad1 TCARD32
  6109. Fpad2 TCARD32
  6110. Fpad3 TCARD32
  6111. Fpad4 TCARD32
  6112. }
  6113. FresizeRequest [0]struct {
  6114. Fpad00 TCARD32
  6115. Fwindow TCARD32
  6116. Fwidth TCARD16
  6117. Fheight TCARD16
  6118. }
  6119. Fcirculate [0]struct {
  6120. Fpad00 TCARD32
  6121. Fevent TCARD32
  6122. Fwindow TCARD32
  6123. Fparent TCARD32
  6124. Fplace TBYTE
  6125. Fpad1 TBYTE
  6126. Fpad2 TBYTE
  6127. Fpad3 TBYTE
  6128. }
  6129. Fproperty [0]struct {
  6130. Fpad00 TCARD32
  6131. Fwindow TCARD32
  6132. Fatom TCARD32
  6133. Ftime TCARD32
  6134. Fstate TBYTE
  6135. Fpad1 TBYTE
  6136. Fpad2 TCARD16
  6137. }
  6138. FselectionClear [0]struct {
  6139. Fpad00 TCARD32
  6140. Ftime TCARD32
  6141. Fwindow TCARD32
  6142. Fatom TCARD32
  6143. }
  6144. FselectionRequest [0]struct {
  6145. Fpad00 TCARD32
  6146. Ftime TCARD32
  6147. Fowner TCARD32
  6148. Frequestor TCARD32
  6149. Fselection TCARD32
  6150. Ftarget TCARD32
  6151. Fproperty TCARD32
  6152. }
  6153. FselectionNotify [0]struct {
  6154. Fpad00 TCARD32
  6155. Ftime TCARD32
  6156. Frequestor TCARD32
  6157. Fselection TCARD32
  6158. Ftarget TCARD32
  6159. Fproperty TCARD32
  6160. }
  6161. Fcolormap [0]struct {
  6162. Fpad00 TCARD32
  6163. Fwindow TCARD32
  6164. Fcolormap TCARD32
  6165. Fnew1 TBOOL
  6166. Fstate TBYTE
  6167. Fpad1 TBYTE
  6168. Fpad2 TBYTE
  6169. }
  6170. FmappingNotify [0]struct {
  6171. Fpad00 TCARD32
  6172. Frequest TCARD8
  6173. FfirstKeyCode TCARD8
  6174. Fcount TCARD8
  6175. Fpad1 TBYTE
  6176. }
  6177. FclientMessage [0]struct {
  6178. Fpad00 TCARD32
  6179. Fwindow TCARD32
  6180. Fu struct {
  6181. Fs [0]struct {
  6182. Ftype1 TCARD32
  6183. Fshorts0 TINT16
  6184. Fshorts1 TINT16
  6185. Fshorts2 TINT16
  6186. Fshorts3 TINT16
  6187. Fshorts4 TINT16
  6188. Fshorts5 TINT16
  6189. Fshorts6 TINT16
  6190. Fshorts7 TINT16
  6191. Fshorts8 TINT16
  6192. Fshorts9 TINT16
  6193. }
  6194. Fb [0]struct {
  6195. Ftype1 TCARD32
  6196. Fbytes [20]TINT8
  6197. }
  6198. Fl struct {
  6199. Ftype1 TCARD32
  6200. Flongs0 TINT32
  6201. Flongs1 TINT32
  6202. Flongs2 TINT32
  6203. Flongs3 TINT32
  6204. Flongs4 TINT32
  6205. }
  6206. }
  6207. }
  6208. Fu struct {
  6209. Ftype1 TBYTE
  6210. Fdetail TBYTE
  6211. FsequenceNumber TCARD16
  6212. }
  6213. F__ccgo_pad26 [28]byte
  6214. }
  6215. }
  6216. type T_xEvent = TxEvent
  6217. type TxGenericEvent = struct {
  6218. Ftype1 TBYTE
  6219. Fextension TCARD8
  6220. FsequenceNumber TCARD16
  6221. Flength TCARD32
  6222. Fevtype TCARD16
  6223. Fpad2 TCARD16
  6224. Fpad3 TCARD32
  6225. Fpad4 TCARD32
  6226. Fpad5 TCARD32
  6227. Fpad6 TCARD32
  6228. Fpad7 TCARD32
  6229. }
  6230. type TxKeymapEvent = struct {
  6231. Ftype1 TBYTE
  6232. Fmap1 [31]TBYTE
  6233. }
  6234. type TxReply = struct {
  6235. Fgeom [0]TxGetGeometryReply
  6236. Ftree [0]TxQueryTreeReply
  6237. Fatom [0]TxInternAtomReply
  6238. FatomName [0]TxGetAtomNameReply
  6239. Fproperty [0]TxGetPropertyReply
  6240. FlistProperties [0]TxListPropertiesReply
  6241. Fselection [0]TxGetSelectionOwnerReply
  6242. FgrabPointer [0]TxGrabPointerReply
  6243. FgrabKeyboard [0]TxGrabKeyboardReply
  6244. Fpointer [0]TxQueryPointerReply
  6245. FmotionEvents [0]TxGetMotionEventsReply
  6246. Fcoords [0]TxTranslateCoordsReply
  6247. FinputFocus [0]TxGetInputFocusReply
  6248. FtextExtents [0]TxQueryTextExtentsReply
  6249. Ffonts [0]TxListFontsReply
  6250. FfontPath [0]TxGetFontPathReply
  6251. Fimage [0]TxGetImageReply
  6252. Fcolormaps [0]TxListInstalledColormapsReply
  6253. FallocColor [0]TxAllocColorReply
  6254. FallocNamedColor [0]TxAllocNamedColorReply
  6255. FcolorCells [0]TxAllocColorCellsReply
  6256. FcolorPlanes [0]TxAllocColorPlanesReply
  6257. Fcolors [0]TxQueryColorsReply
  6258. FlookupColor [0]TxLookupColorReply
  6259. FbestSize [0]TxQueryBestSizeReply
  6260. Fextension [0]TxQueryExtensionReply
  6261. Fextensions [0]TxListExtensionsReply
  6262. FsetModifierMapping [0]TxSetModifierMappingReply
  6263. FgetModifierMapping [0]TxGetModifierMappingReply
  6264. FsetPointerMapping [0]TxSetPointerMappingReply
  6265. FgetKeyboardMapping [0]TxGetKeyboardMappingReply
  6266. FgetPointerMapping [0]TxGetPointerMappingReply
  6267. FpointerControl [0]TxGetPointerControlReply
  6268. FscreenSaver [0]TxGetScreenSaverReply
  6269. Fhosts [0]TxListHostsReply
  6270. Ferror1 [0]TxError
  6271. Fevent [0]TxEvent
  6272. Fgeneric TxGenericReply
  6273. }
  6274. type TxReq = struct {
  6275. FreqType TCARD8
  6276. Fdata TCARD8
  6277. Flength TCARD16
  6278. }
  6279. type T_xReq = TxReq
  6280. type TxResourceReq = struct {
  6281. FreqType TCARD8
  6282. Fpad TBYTE
  6283. Flength TCARD16
  6284. Fid TCARD32
  6285. }
  6286. type TxCreateWindowReq = struct {
  6287. FreqType TCARD8
  6288. Fdepth TCARD8
  6289. Flength TCARD16
  6290. Fwid TCARD32
  6291. Fparent TCARD32
  6292. Fx TINT16
  6293. Fy TINT16
  6294. Fwidth TCARD16
  6295. Fheight TCARD16
  6296. FborderWidth TCARD16
  6297. Fclass TCARD16
  6298. Fvisual TCARD32
  6299. Fmask TCARD32
  6300. }
  6301. type TxChangeWindowAttributesReq = struct {
  6302. FreqType TCARD8
  6303. Fpad TBYTE
  6304. Flength TCARD16
  6305. Fwindow TCARD32
  6306. FvalueMask TCARD32
  6307. }
  6308. type TxChangeSaveSetReq = struct {
  6309. FreqType TCARD8
  6310. Fmode TBYTE
  6311. Flength TCARD16
  6312. Fwindow TCARD32
  6313. }
  6314. type TxReparentWindowReq = struct {
  6315. FreqType TCARD8
  6316. Fpad TBYTE
  6317. Flength TCARD16
  6318. Fwindow TCARD32
  6319. Fparent TCARD32
  6320. Fx TINT16
  6321. Fy TINT16
  6322. }
  6323. type TxConfigureWindowReq = struct {
  6324. FreqType TCARD8
  6325. Fpad TCARD8
  6326. Flength TCARD16
  6327. Fwindow TCARD32
  6328. Fmask TCARD16
  6329. Fpad2 TCARD16
  6330. }
  6331. type TxCirculateWindowReq = struct {
  6332. FreqType TCARD8
  6333. Fdirection TCARD8
  6334. Flength TCARD16
  6335. Fwindow TCARD32
  6336. }
  6337. type TxInternAtomReq = struct {
  6338. FreqType TCARD8
  6339. FonlyIfExists TBOOL
  6340. Flength TCARD16
  6341. Fnbytes TCARD16
  6342. Fpad TCARD16
  6343. }
  6344. type TxChangePropertyReq = struct {
  6345. FreqType TCARD8
  6346. Fmode TCARD8
  6347. Flength TCARD16
  6348. Fwindow TCARD32
  6349. Fproperty TCARD32
  6350. Ftype1 TCARD32
  6351. Fformat TCARD8
  6352. Fpad [3]TBYTE
  6353. FnUnits TCARD32
  6354. }
  6355. type TxDeletePropertyReq = struct {
  6356. FreqType TCARD8
  6357. Fpad TBYTE
  6358. Flength TCARD16
  6359. Fwindow TCARD32
  6360. Fproperty TCARD32
  6361. }
  6362. type TxGetPropertyReq = struct {
  6363. FreqType TCARD8
  6364. Fdelete1 TBOOL
  6365. Flength TCARD16
  6366. Fwindow TCARD32
  6367. Fproperty TCARD32
  6368. Ftype1 TCARD32
  6369. FlongOffset TCARD32
  6370. FlongLength TCARD32
  6371. }
  6372. type TxSetSelectionOwnerReq = struct {
  6373. FreqType TCARD8
  6374. Fpad TBYTE
  6375. Flength TCARD16
  6376. Fwindow TCARD32
  6377. Fselection TCARD32
  6378. Ftime TCARD32
  6379. }
  6380. type TxConvertSelectionReq = struct {
  6381. FreqType TCARD8
  6382. Fpad TBYTE
  6383. Flength TCARD16
  6384. Frequestor TCARD32
  6385. Fselection TCARD32
  6386. Ftarget TCARD32
  6387. Fproperty TCARD32
  6388. Ftime TCARD32
  6389. }
  6390. type TxSendEventReq = struct {
  6391. FreqType TCARD8
  6392. Fpropagate TBOOL
  6393. Flength TCARD16
  6394. Fdestination TCARD32
  6395. FeventMask TCARD32
  6396. Fevent TxEvent
  6397. }
  6398. type TxGrabPointerReq = struct {
  6399. FreqType TCARD8
  6400. FownerEvents TBOOL
  6401. Flength TCARD16
  6402. FgrabWindow TCARD32
  6403. FeventMask TCARD16
  6404. FpointerMode TBYTE
  6405. FkeyboardMode TBYTE
  6406. FconfineTo TCARD32
  6407. Fcursor TCARD32
  6408. Ftime TCARD32
  6409. }
  6410. type TxGrabButtonReq = struct {
  6411. FreqType TCARD8
  6412. FownerEvents TBOOL
  6413. Flength TCARD16
  6414. FgrabWindow TCARD32
  6415. FeventMask TCARD16
  6416. FpointerMode TBYTE
  6417. FkeyboardMode TBYTE
  6418. FconfineTo TCARD32
  6419. Fcursor TCARD32
  6420. Fbutton TCARD8
  6421. Fpad TBYTE
  6422. Fmodifiers TCARD16
  6423. }
  6424. type TxUngrabButtonReq = struct {
  6425. FreqType TCARD8
  6426. Fbutton TCARD8
  6427. Flength TCARD16
  6428. FgrabWindow TCARD32
  6429. Fmodifiers TCARD16
  6430. Fpad TCARD16
  6431. }
  6432. type TxChangeActivePointerGrabReq = struct {
  6433. FreqType TCARD8
  6434. Fpad TBYTE
  6435. Flength TCARD16
  6436. Fcursor TCARD32
  6437. Ftime TCARD32
  6438. FeventMask TCARD16
  6439. Fpad2 TCARD16
  6440. }
  6441. type TxGrabKeyboardReq = struct {
  6442. FreqType TCARD8
  6443. FownerEvents TBOOL
  6444. Flength TCARD16
  6445. FgrabWindow TCARD32
  6446. Ftime TCARD32
  6447. FpointerMode TBYTE
  6448. FkeyboardMode TBYTE
  6449. Fpad TCARD16
  6450. }
  6451. type TxGrabKeyReq = struct {
  6452. FreqType TCARD8
  6453. FownerEvents TBOOL
  6454. Flength TCARD16
  6455. FgrabWindow TCARD32
  6456. Fmodifiers TCARD16
  6457. Fkey TCARD8
  6458. FpointerMode TBYTE
  6459. FkeyboardMode TBYTE
  6460. Fpad1 TBYTE
  6461. Fpad2 TBYTE
  6462. Fpad3 TBYTE
  6463. }
  6464. type TxUngrabKeyReq = struct {
  6465. FreqType TCARD8
  6466. Fkey TCARD8
  6467. Flength TCARD16
  6468. FgrabWindow TCARD32
  6469. Fmodifiers TCARD16
  6470. Fpad TCARD16
  6471. }
  6472. type TxAllowEventsReq = struct {
  6473. FreqType TCARD8
  6474. Fmode TCARD8
  6475. Flength TCARD16
  6476. Ftime TCARD32
  6477. }
  6478. type TxGetMotionEventsReq = struct {
  6479. FreqType TCARD8
  6480. Fpad TBYTE
  6481. Flength TCARD16
  6482. Fwindow TCARD32
  6483. Fstart TCARD32
  6484. Fstop TCARD32
  6485. }
  6486. type TxTranslateCoordsReq = struct {
  6487. FreqType TCARD8
  6488. Fpad TBYTE
  6489. Flength TCARD16
  6490. FsrcWid TCARD32
  6491. FdstWid TCARD32
  6492. FsrcX TINT16
  6493. FsrcY TINT16
  6494. }
  6495. type TxWarpPointerReq = struct {
  6496. FreqType TCARD8
  6497. Fpad TBYTE
  6498. Flength TCARD16
  6499. FsrcWid TCARD32
  6500. FdstWid TCARD32
  6501. FsrcX TINT16
  6502. FsrcY TINT16
  6503. FsrcWidth TCARD16
  6504. FsrcHeight TCARD16
  6505. FdstX TINT16
  6506. FdstY TINT16
  6507. }
  6508. type TxSetInputFocusReq = struct {
  6509. FreqType TCARD8
  6510. FrevertTo TCARD8
  6511. Flength TCARD16
  6512. Ffocus TCARD32
  6513. Ftime TCARD32
  6514. }
  6515. type TxOpenFontReq = struct {
  6516. FreqType TCARD8
  6517. Fpad TBYTE
  6518. Flength TCARD16
  6519. Ffid TCARD32
  6520. Fnbytes TCARD16
  6521. Fpad1 TBYTE
  6522. Fpad2 TBYTE
  6523. }
  6524. type TxQueryTextExtentsReq = struct {
  6525. FreqType TCARD8
  6526. FoddLength TBOOL
  6527. Flength TCARD16
  6528. Ffid TCARD32
  6529. }
  6530. type TxListFontsReq = struct {
  6531. FreqType TCARD8
  6532. Fpad TBYTE
  6533. Flength TCARD16
  6534. FmaxNames TCARD16
  6535. Fnbytes TCARD16
  6536. }
  6537. type TxListFontsWithInfoReq = struct {
  6538. FreqType TCARD8
  6539. Fpad TBYTE
  6540. Flength TCARD16
  6541. FmaxNames TCARD16
  6542. Fnbytes TCARD16
  6543. }
  6544. type TxSetFontPathReq = struct {
  6545. FreqType TCARD8
  6546. Fpad TBYTE
  6547. Flength TCARD16
  6548. FnFonts TCARD16
  6549. Fpad1 TBYTE
  6550. Fpad2 TBYTE
  6551. }
  6552. type TxCreatePixmapReq = struct {
  6553. FreqType TCARD8
  6554. Fdepth TCARD8
  6555. Flength TCARD16
  6556. Fpid TCARD32
  6557. Fdrawable TCARD32
  6558. Fwidth TCARD16
  6559. Fheight TCARD16
  6560. }
  6561. type TxCreateGCReq = struct {
  6562. FreqType TCARD8
  6563. Fpad TBYTE
  6564. Flength TCARD16
  6565. Fgc TCARD32
  6566. Fdrawable TCARD32
  6567. Fmask TCARD32
  6568. }
  6569. type TxChangeGCReq = struct {
  6570. FreqType TCARD8
  6571. Fpad TBYTE
  6572. Flength TCARD16
  6573. Fgc TCARD32
  6574. Fmask TCARD32
  6575. }
  6576. type TxCopyGCReq = struct {
  6577. FreqType TCARD8
  6578. Fpad TBYTE
  6579. Flength TCARD16
  6580. FsrcGC TCARD32
  6581. FdstGC TCARD32
  6582. Fmask TCARD32
  6583. }
  6584. type TxSetDashesReq = struct {
  6585. FreqType TCARD8
  6586. Fpad TBYTE
  6587. Flength TCARD16
  6588. Fgc TCARD32
  6589. FdashOffset TCARD16
  6590. FnDashes TCARD16
  6591. }
  6592. type TxSetClipRectanglesReq = struct {
  6593. FreqType TCARD8
  6594. Fordering TBYTE
  6595. Flength TCARD16
  6596. Fgc TCARD32
  6597. FxOrigin TINT16
  6598. FyOrigin TINT16
  6599. }
  6600. type TxClearAreaReq = struct {
  6601. FreqType TCARD8
  6602. Fexposures TBOOL
  6603. Flength TCARD16
  6604. Fwindow TCARD32
  6605. Fx TINT16
  6606. Fy TINT16
  6607. Fwidth TCARD16
  6608. Fheight TCARD16
  6609. }
  6610. type TxCopyAreaReq = struct {
  6611. FreqType TCARD8
  6612. Fpad TBYTE
  6613. Flength TCARD16
  6614. FsrcDrawable TCARD32
  6615. FdstDrawable TCARD32
  6616. Fgc TCARD32
  6617. FsrcX TINT16
  6618. FsrcY TINT16
  6619. FdstX TINT16
  6620. FdstY TINT16
  6621. Fwidth TCARD16
  6622. Fheight TCARD16
  6623. }
  6624. type TxCopyPlaneReq = struct {
  6625. FreqType TCARD8
  6626. Fpad TBYTE
  6627. Flength TCARD16
  6628. FsrcDrawable TCARD32
  6629. FdstDrawable TCARD32
  6630. Fgc TCARD32
  6631. FsrcX TINT16
  6632. FsrcY TINT16
  6633. FdstX TINT16
  6634. FdstY TINT16
  6635. Fwidth TCARD16
  6636. Fheight TCARD16
  6637. FbitPlane TCARD32
  6638. }
  6639. type TxPolyPointReq = struct {
  6640. FreqType TCARD8
  6641. FcoordMode TBYTE
  6642. Flength TCARD16
  6643. Fdrawable TCARD32
  6644. Fgc TCARD32
  6645. }
  6646. type TxPolyLineReq = struct {
  6647. FreqType TCARD8
  6648. FcoordMode TBYTE
  6649. Flength TCARD16
  6650. Fdrawable TCARD32
  6651. Fgc TCARD32
  6652. }
  6653. type TxPolySegmentReq = struct {
  6654. FreqType TCARD8
  6655. Fpad TBYTE
  6656. Flength TCARD16
  6657. Fdrawable TCARD32
  6658. Fgc TCARD32
  6659. }
  6660. type TxPolyArcReq = struct {
  6661. FreqType TCARD8
  6662. Fpad TBYTE
  6663. Flength TCARD16
  6664. Fdrawable TCARD32
  6665. Fgc TCARD32
  6666. }
  6667. type TxPolyRectangleReq = struct {
  6668. FreqType TCARD8
  6669. Fpad TBYTE
  6670. Flength TCARD16
  6671. Fdrawable TCARD32
  6672. Fgc TCARD32
  6673. }
  6674. type TxPolyFillRectangleReq = struct {
  6675. FreqType TCARD8
  6676. Fpad TBYTE
  6677. Flength TCARD16
  6678. Fdrawable TCARD32
  6679. Fgc TCARD32
  6680. }
  6681. type TxPolyFillArcReq = struct {
  6682. FreqType TCARD8
  6683. Fpad TBYTE
  6684. Flength TCARD16
  6685. Fdrawable TCARD32
  6686. Fgc TCARD32
  6687. }
  6688. type TxFillPolyReq = struct {
  6689. FreqType TCARD8
  6690. Fpad TBYTE
  6691. Flength TCARD16
  6692. Fdrawable TCARD32
  6693. Fgc TCARD32
  6694. Fshape TBYTE
  6695. FcoordMode TBYTE
  6696. Fpad1 TCARD16
  6697. }
  6698. type T_FillPolyReq = TxFillPolyReq
  6699. type TxPutImageReq = struct {
  6700. FreqType TCARD8
  6701. Fformat TCARD8
  6702. Flength TCARD16
  6703. Fdrawable TCARD32
  6704. Fgc TCARD32
  6705. Fwidth TCARD16
  6706. Fheight TCARD16
  6707. FdstX TINT16
  6708. FdstY TINT16
  6709. FleftPad TCARD8
  6710. Fdepth TCARD8
  6711. Fpad TCARD16
  6712. }
  6713. type T_PutImageReq = TxPutImageReq
  6714. type TxGetImageReq = struct {
  6715. FreqType TCARD8
  6716. Fformat TCARD8
  6717. Flength TCARD16
  6718. Fdrawable TCARD32
  6719. Fx TINT16
  6720. Fy TINT16
  6721. Fwidth TCARD16
  6722. Fheight TCARD16
  6723. FplaneMask TCARD32
  6724. }
  6725. type TxPolyTextReq = struct {
  6726. FreqType TCARD8
  6727. Fpad TCARD8
  6728. Flength TCARD16
  6729. Fdrawable TCARD32
  6730. Fgc TCARD32
  6731. Fx TINT16
  6732. Fy TINT16
  6733. }
  6734. type TxPolyText8Req = struct {
  6735. FreqType TCARD8
  6736. Fpad TCARD8
  6737. Flength TCARD16
  6738. Fdrawable TCARD32
  6739. Fgc TCARD32
  6740. Fx TINT16
  6741. Fy TINT16
  6742. }
  6743. type TxPolyText16Req = struct {
  6744. FreqType TCARD8
  6745. Fpad TCARD8
  6746. Flength TCARD16
  6747. Fdrawable TCARD32
  6748. Fgc TCARD32
  6749. Fx TINT16
  6750. Fy TINT16
  6751. }
  6752. type TxImageTextReq = struct {
  6753. FreqType TCARD8
  6754. FnChars TBYTE
  6755. Flength TCARD16
  6756. Fdrawable TCARD32
  6757. Fgc TCARD32
  6758. Fx TINT16
  6759. Fy TINT16
  6760. }
  6761. type TxImageText8Req = struct {
  6762. FreqType TCARD8
  6763. FnChars TBYTE
  6764. Flength TCARD16
  6765. Fdrawable TCARD32
  6766. Fgc TCARD32
  6767. Fx TINT16
  6768. Fy TINT16
  6769. }
  6770. type TxImageText16Req = struct {
  6771. FreqType TCARD8
  6772. FnChars TBYTE
  6773. Flength TCARD16
  6774. Fdrawable TCARD32
  6775. Fgc TCARD32
  6776. Fx TINT16
  6777. Fy TINT16
  6778. }
  6779. type TxCreateColormapReq = struct {
  6780. FreqType TCARD8
  6781. Falloc TBYTE
  6782. Flength TCARD16
  6783. Fmid TCARD32
  6784. Fwindow TCARD32
  6785. Fvisual TCARD32
  6786. }
  6787. type TxCopyColormapAndFreeReq = struct {
  6788. FreqType TCARD8
  6789. Fpad TBYTE
  6790. Flength TCARD16
  6791. Fmid TCARD32
  6792. FsrcCmap TCARD32
  6793. }
  6794. type TxAllocColorReq = struct {
  6795. FreqType TCARD8
  6796. Fpad TBYTE
  6797. Flength TCARD16
  6798. Fcmap TCARD32
  6799. Fred TCARD16
  6800. Fgreen TCARD16
  6801. Fblue TCARD16
  6802. Fpad2 TCARD16
  6803. }
  6804. type TxAllocNamedColorReq = struct {
  6805. FreqType TCARD8
  6806. Fpad TBYTE
  6807. Flength TCARD16
  6808. Fcmap TCARD32
  6809. Fnbytes TCARD16
  6810. Fpad1 TBYTE
  6811. Fpad2 TBYTE
  6812. }
  6813. type TxAllocColorCellsReq = struct {
  6814. FreqType TCARD8
  6815. Fcontiguous TBOOL
  6816. Flength TCARD16
  6817. Fcmap TCARD32
  6818. Fcolors TCARD16
  6819. Fplanes TCARD16
  6820. }
  6821. type TxAllocColorPlanesReq = struct {
  6822. FreqType TCARD8
  6823. Fcontiguous TBOOL
  6824. Flength TCARD16
  6825. Fcmap TCARD32
  6826. Fcolors TCARD16
  6827. Fred TCARD16
  6828. Fgreen TCARD16
  6829. Fblue TCARD16
  6830. }
  6831. type TxFreeColorsReq = struct {
  6832. FreqType TCARD8
  6833. Fpad TBYTE
  6834. Flength TCARD16
  6835. Fcmap TCARD32
  6836. FplaneMask TCARD32
  6837. }
  6838. type TxStoreColorsReq = struct {
  6839. FreqType TCARD8
  6840. Fpad TBYTE
  6841. Flength TCARD16
  6842. Fcmap TCARD32
  6843. }
  6844. type TxStoreNamedColorReq = struct {
  6845. FreqType TCARD8
  6846. Fflags TCARD8
  6847. Flength TCARD16
  6848. Fcmap TCARD32
  6849. Fpixel TCARD32
  6850. Fnbytes TCARD16
  6851. Fpad1 TBYTE
  6852. Fpad2 TBYTE
  6853. }
  6854. type TxQueryColorsReq = struct {
  6855. FreqType TCARD8
  6856. Fpad TBYTE
  6857. Flength TCARD16
  6858. Fcmap TCARD32
  6859. }
  6860. type TxLookupColorReq = struct {
  6861. FreqType TCARD8
  6862. Fpad TBYTE
  6863. Flength TCARD16
  6864. Fcmap TCARD32
  6865. Fnbytes TCARD16
  6866. Fpad1 TBYTE
  6867. Fpad2 TBYTE
  6868. }
  6869. type TxCreateCursorReq = struct {
  6870. FreqType TCARD8
  6871. Fpad TBYTE
  6872. Flength TCARD16
  6873. Fcid TCARD32
  6874. Fsource TCARD32
  6875. Fmask TCARD32
  6876. FforeRed TCARD16
  6877. FforeGreen TCARD16
  6878. FforeBlue TCARD16
  6879. FbackRed TCARD16
  6880. FbackGreen TCARD16
  6881. FbackBlue TCARD16
  6882. Fx TCARD16
  6883. Fy TCARD16
  6884. }
  6885. type TxCreateGlyphCursorReq = struct {
  6886. FreqType TCARD8
  6887. Fpad TBYTE
  6888. Flength TCARD16
  6889. Fcid TCARD32
  6890. Fsource TCARD32
  6891. Fmask TCARD32
  6892. FsourceChar TCARD16
  6893. FmaskChar TCARD16
  6894. FforeRed TCARD16
  6895. FforeGreen TCARD16
  6896. FforeBlue TCARD16
  6897. FbackRed TCARD16
  6898. FbackGreen TCARD16
  6899. FbackBlue TCARD16
  6900. }
  6901. type TxRecolorCursorReq = struct {
  6902. FreqType TCARD8
  6903. Fpad TBYTE
  6904. Flength TCARD16
  6905. Fcursor TCARD32
  6906. FforeRed TCARD16
  6907. FforeGreen TCARD16
  6908. FforeBlue TCARD16
  6909. FbackRed TCARD16
  6910. FbackGreen TCARD16
  6911. FbackBlue TCARD16
  6912. }
  6913. type TxQueryBestSizeReq = struct {
  6914. FreqType TCARD8
  6915. Fclass TCARD8
  6916. Flength TCARD16
  6917. Fdrawable TCARD32
  6918. Fwidth TCARD16
  6919. Fheight TCARD16
  6920. }
  6921. type TxQueryExtensionReq = struct {
  6922. FreqType TCARD8
  6923. Fpad TBYTE
  6924. Flength TCARD16
  6925. Fnbytes TCARD16
  6926. Fpad1 TBYTE
  6927. Fpad2 TBYTE
  6928. }
  6929. type TxSetModifierMappingReq = struct {
  6930. FreqType TCARD8
  6931. FnumKeyPerModifier TCARD8
  6932. Flength TCARD16
  6933. }
  6934. type TxSetPointerMappingReq = struct {
  6935. FreqType TCARD8
  6936. FnElts TCARD8
  6937. Flength TCARD16
  6938. }
  6939. type TxGetKeyboardMappingReq = struct {
  6940. FreqType TCARD8
  6941. Fpad TBYTE
  6942. Flength TCARD16
  6943. FfirstKeyCode TCARD8
  6944. Fcount TCARD8
  6945. Fpad1 TCARD16
  6946. }
  6947. type TxChangeKeyboardMappingReq = struct {
  6948. FreqType TCARD8
  6949. FkeyCodes TCARD8
  6950. Flength TCARD16
  6951. FfirstKeyCode TCARD8
  6952. FkeySymsPerKeyCode TCARD8
  6953. Fpad1 TCARD16
  6954. }
  6955. type TxChangeKeyboardControlReq = struct {
  6956. FreqType TCARD8
  6957. Fpad TBYTE
  6958. Flength TCARD16
  6959. Fmask TCARD32
  6960. }
  6961. type TxBellReq = struct {
  6962. FreqType TCARD8
  6963. Fpercent TINT8
  6964. Flength TCARD16
  6965. }
  6966. type TxChangePointerControlReq = struct {
  6967. FreqType TCARD8
  6968. Fpad TBYTE
  6969. Flength TCARD16
  6970. FaccelNum TINT16
  6971. FaccelDenum TINT16
  6972. Fthreshold TINT16
  6973. FdoAccel TBOOL
  6974. FdoThresh TBOOL
  6975. }
  6976. type TxSetScreenSaverReq = struct {
  6977. FreqType TCARD8
  6978. Fpad TBYTE
  6979. Flength TCARD16
  6980. Ftimeout TINT16
  6981. Finterval TINT16
  6982. FpreferBlank TBYTE
  6983. FallowExpose TBYTE
  6984. Fpad2 TCARD16
  6985. }
  6986. type TxChangeHostsReq = struct {
  6987. FreqType TCARD8
  6988. Fmode TBYTE
  6989. Flength TCARD16
  6990. FhostFamily TCARD8
  6991. Fpad TBYTE
  6992. FhostLength TCARD16
  6993. }
  6994. type TxListHostsReq = struct {
  6995. FreqType TCARD8
  6996. Fpad TBYTE
  6997. Flength TCARD16
  6998. }
  6999. type TxChangeModeReq = struct {
  7000. FreqType TCARD8
  7001. Fmode TBYTE
  7002. Flength TCARD16
  7003. }
  7004. type TxSetAccessControlReq = struct {
  7005. FreqType TCARD8
  7006. Fmode TBYTE
  7007. Flength TCARD16
  7008. }
  7009. type TxSetCloseDownModeReq = struct {
  7010. FreqType TCARD8
  7011. Fmode TBYTE
  7012. Flength TCARD16
  7013. }
  7014. type TxForceScreenSaverReq = struct {
  7015. FreqType TCARD8
  7016. Fmode TBYTE
  7017. Flength TCARD16
  7018. }
  7019. type TxRotatePropertiesReq = struct {
  7020. FreqType TCARD8
  7021. Fpad TBYTE
  7022. Flength TCARD16
  7023. Fwindow TCARD32
  7024. FnAtoms TCARD16
  7025. FnPositions TINT16
  7026. }
  7027. type T_XQEvent = struct {
  7028. Fnext uintptr
  7029. Fevent TXEvent
  7030. Fqserial_num uint64
  7031. }
  7032. type T_XSQEvent = T_XQEvent
  7033. type TLockInfoPtr = uintptr
  7034. type T_XLockPtrs = struct {
  7035. Flock_display uintptr
  7036. Funlock_display uintptr
  7037. }
  7038. type T_XAsyncHandler = struct {
  7039. Fnext uintptr
  7040. Fhandler uintptr
  7041. Fdata TXPointer
  7042. }
  7043. type T_XInternalAsync = T_XAsyncHandler
  7044. type T_XAsyncErrorState = struct {
  7045. Fmin_sequence_number uint64
  7046. Fmax_sequence_number uint64
  7047. Ferror_code uint8
  7048. Fmajor_opcode uint8
  7049. Fminor_opcode uint16
  7050. Flast_error_received uint8
  7051. Ferror_count int32
  7052. }
  7053. type T_XAsyncEState = T_XAsyncErrorState
  7054. type TFreeFuncType = uintptr
  7055. type TFreeModmapType = uintptr
  7056. type T_XFreeFuncRec = struct {
  7057. Fatoms TFreeFuncType
  7058. Fmodifiermap TFreeModmapType
  7059. Fkey_bindings TFreeFuncType
  7060. Fcontext_db TFreeFuncType
  7061. FdefaultCCCs TFreeFuncType
  7062. FclientCmaps TFreeFuncType
  7063. FintensityMaps TFreeFuncType
  7064. Fim_filters TFreeFuncType
  7065. Fxkb TFreeFuncType
  7066. }
  7067. type T_XFreeFuncs = T_XFreeFuncRec
  7068. type TCreateGCType = uintptr
  7069. type TCopyGCType = uintptr
  7070. type TFlushGCType = uintptr
  7071. type TFreeGCType = uintptr
  7072. type TCreateFontType = uintptr
  7073. type TFreeFontType = uintptr
  7074. type TCloseDisplayType = uintptr
  7075. type TErrorType = uintptr
  7076. type TErrorStringType = uintptr
  7077. type TPrintErrorType = uintptr
  7078. type TBeforeFlushType = uintptr
  7079. type T_XExtension = struct {
  7080. Fnext uintptr
  7081. Fcodes TXExtCodes
  7082. Fcreate_GC TCreateGCType
  7083. Fcopy_GC TCopyGCType
  7084. Fflush_GC TFlushGCType
  7085. Ffree_GC TFreeGCType
  7086. Fcreate_Font TCreateFontType
  7087. Ffree_Font TFreeFontType
  7088. Fclose_display TCloseDisplayType
  7089. Ferror1 TErrorType
  7090. Ferror_string TErrorStringType
  7091. Fname uintptr
  7092. Ferror_values TPrintErrorType
  7093. Fbefore_flush TBeforeFlushType
  7094. Fnext_flush uintptr
  7095. }
  7096. type T_XExten = T_XExtension
  7097. type T_XInternalConnectionProc = uintptr
  7098. type T_XConnectionInfo = struct {
  7099. Ffd int32
  7100. Fread_callback T_XInternalConnectionProc
  7101. Fcall_data TXPointer
  7102. Fwatch_data uintptr
  7103. Fnext uintptr
  7104. }
  7105. type T_XConnWatchInfo = struct {
  7106. Ffn TXConnectionWatchProc
  7107. Fclient_data TXPointer
  7108. Fnext uintptr
  7109. }
  7110. type t__jmp_buf = [32][2]uint64
  7111. type Tjmp_buf = [1]t__jmp_buf_tag
  7112. type t__jmp_buf_tag = struct {
  7113. F__ccgo_align [0]uint64
  7114. F__jb t__jmp_buf
  7115. F__fl uint64
  7116. F__ss [16]uint64
  7117. F__ccgo_pad3 [8]byte
  7118. }
  7119. type Tsigjmp_buf = [1]t__jmp_buf_tag
  7120. type TFT_Int16 = int16
  7121. type TFT_UInt16 = uint16
  7122. type TFT_Int32 = int32
  7123. type TFT_UInt32 = uint32
  7124. type TFT_Fast = int32
  7125. type TFT_UFast = uint32
  7126. type TFT_Int64 = int64
  7127. type TFT_UInt64 = uint64
  7128. type TFT_Memory = uintptr
  7129. type TFT_MemoryRec_ = struct {
  7130. Fuser uintptr
  7131. Falloc TFT_Alloc_Func
  7132. Ffree TFT_Free_Func
  7133. Frealloc TFT_Realloc_Func
  7134. }
  7135. type TFT_Alloc_Func = uintptr
  7136. type TFT_Free_Func = uintptr
  7137. type TFT_Realloc_Func = uintptr
  7138. type TFT_Stream = uintptr
  7139. type TFT_StreamRec_ = struct {
  7140. Fbase uintptr
  7141. Fsize uint64
  7142. Fpos uint64
  7143. Fdescriptor TFT_StreamDesc
  7144. Fpathname TFT_StreamDesc
  7145. Fread TFT_Stream_IoFunc
  7146. Fclose1 TFT_Stream_CloseFunc
  7147. Fmemory TFT_Memory
  7148. Fcursor uintptr
  7149. Flimit uintptr
  7150. }
  7151. type TFT_StreamDesc = struct {
  7152. Fpointer [0]uintptr
  7153. Fvalue int64
  7154. }
  7155. type TFT_StreamDesc_ = TFT_StreamDesc
  7156. type TFT_Stream_IoFunc = uintptr
  7157. type TFT_Stream_CloseFunc = uintptr
  7158. type TFT_StreamRec = struct {
  7159. Fbase uintptr
  7160. Fsize uint64
  7161. Fpos uint64
  7162. Fdescriptor TFT_StreamDesc
  7163. Fpathname TFT_StreamDesc
  7164. Fread TFT_Stream_IoFunc
  7165. Fclose1 TFT_Stream_CloseFunc
  7166. Fmemory TFT_Memory
  7167. Fcursor uintptr
  7168. Flimit uintptr
  7169. }
  7170. type TFT_Pos = int64
  7171. type TFT_Vector = struct {
  7172. Fx TFT_Pos
  7173. Fy TFT_Pos
  7174. }
  7175. type TFT_Vector_ = TFT_Vector
  7176. type TFT_BBox = struct {
  7177. FxMin TFT_Pos
  7178. FyMin TFT_Pos
  7179. FxMax TFT_Pos
  7180. FyMax TFT_Pos
  7181. }
  7182. type TFT_BBox_ = TFT_BBox
  7183. type TFT_Pixel_Mode = int32
  7184. type _FT_Pixel_Mode_ = int32
  7185. const _FT_PIXEL_MODE_NONE = 0
  7186. const _FT_PIXEL_MODE_MONO = 1
  7187. const _FT_PIXEL_MODE_GRAY = 2
  7188. const _FT_PIXEL_MODE_GRAY2 = 3
  7189. const _FT_PIXEL_MODE_GRAY4 = 4
  7190. const _FT_PIXEL_MODE_LCD = 5
  7191. const _FT_PIXEL_MODE_LCD_V = 6
  7192. const _FT_PIXEL_MODE_BGRA = 7
  7193. const _FT_PIXEL_MODE_MAX = 8
  7194. type TFT_Bitmap = struct {
  7195. Frows uint32
  7196. Fwidth uint32
  7197. Fpitch int32
  7198. Fbuffer uintptr
  7199. Fnum_grays uint16
  7200. Fpixel_mode uint8
  7201. Fpalette_mode uint8
  7202. Fpalette uintptr
  7203. }
  7204. type TFT_Bitmap_ = TFT_Bitmap
  7205. type TFT_Outline = struct {
  7206. Fn_contours int16
  7207. Fn_points int16
  7208. Fpoints uintptr
  7209. Ftags uintptr
  7210. Fcontours uintptr
  7211. Fflags int32
  7212. }
  7213. type TFT_Outline_ = TFT_Outline
  7214. type TFT_Outline_MoveToFunc = uintptr
  7215. type TFT_Outline_LineToFunc = uintptr
  7216. type TFT_Outline_ConicToFunc = uintptr
  7217. type TFT_Outline_CubicToFunc = uintptr
  7218. type TFT_Outline_Funcs = struct {
  7219. Fmove_to TFT_Outline_MoveToFunc
  7220. Fline_to TFT_Outline_LineToFunc
  7221. Fconic_to TFT_Outline_ConicToFunc
  7222. Fcubic_to TFT_Outline_CubicToFunc
  7223. Fshift int32
  7224. Fdelta TFT_Pos
  7225. }
  7226. type TFT_Outline_Funcs_ = TFT_Outline_Funcs
  7227. type TFT_Glyph_Format = int32
  7228. type _FT_Glyph_Format_ = int32
  7229. const _FT_GLYPH_FORMAT_NONE = 0
  7230. const _FT_GLYPH_FORMAT_COMPOSITE = 1668246896
  7231. const _FT_GLYPH_FORMAT_BITMAP = 1651078259
  7232. const _FT_GLYPH_FORMAT_OUTLINE = 1869968492
  7233. const _FT_GLYPH_FORMAT_PLOTTER = 1886154612
  7234. type TFT_Raster = uintptr
  7235. type TFT_Span = struct {
  7236. Fx int16
  7237. Flen1 uint16
  7238. Fcoverage uint8
  7239. }
  7240. type TFT_Span_ = TFT_Span
  7241. type TFT_SpanFunc = uintptr
  7242. type TFT_Raster_BitTest_Func = uintptr
  7243. type TFT_Raster_BitSet_Func = uintptr
  7244. type TFT_Raster_Params = struct {
  7245. Ftarget uintptr
  7246. Fsource uintptr
  7247. Fflags int32
  7248. Fgray_spans TFT_SpanFunc
  7249. Fblack_spans TFT_SpanFunc
  7250. Fbit_test TFT_Raster_BitTest_Func
  7251. Fbit_set TFT_Raster_BitSet_Func
  7252. Fuser uintptr
  7253. Fclip_box TFT_BBox
  7254. }
  7255. type TFT_Raster_Params_ = TFT_Raster_Params
  7256. type TFT_Raster_NewFunc = uintptr
  7257. type TFT_Raster_DoneFunc = uintptr
  7258. type TFT_Raster_ResetFunc = uintptr
  7259. type TFT_Raster_SetModeFunc = uintptr
  7260. type TFT_Raster_RenderFunc = uintptr
  7261. type TFT_Raster_Funcs = struct {
  7262. Fglyph_format TFT_Glyph_Format
  7263. Fraster_new TFT_Raster_NewFunc
  7264. Fraster_reset TFT_Raster_ResetFunc
  7265. Fraster_set_mode TFT_Raster_SetModeFunc
  7266. Fraster_render TFT_Raster_RenderFunc
  7267. Fraster_done TFT_Raster_DoneFunc
  7268. }
  7269. type TFT_Raster_Funcs_ = TFT_Raster_Funcs
  7270. type TFT_Bool = uint8
  7271. type TFT_FWord = int16
  7272. type TFT_UFWord = uint16
  7273. type TFT_Char = int8
  7274. type TFT_Byte = uint8
  7275. type TFT_Bytes = uintptr
  7276. type TFT_Tag = uint32
  7277. type TFT_String = uint8
  7278. type TFT_Short = int16
  7279. type TFT_UShort = uint16
  7280. type TFT_Int = int32
  7281. type TFT_UInt = uint32
  7282. type TFT_Long = int64
  7283. type TFT_ULong = uint64
  7284. type TFT_F2Dot14 = int16
  7285. type TFT_F26Dot6 = int64
  7286. type TFT_Fixed = int64
  7287. type TFT_Error = int32
  7288. type TFT_Pointer = uintptr
  7289. type TFT_Offset = uint64
  7290. type TFT_PtrDist = int64
  7291. type TFT_UnitVector = struct {
  7292. Fx TFT_F2Dot14
  7293. Fy TFT_F2Dot14
  7294. }
  7295. type TFT_UnitVector_ = TFT_UnitVector
  7296. type TFT_Matrix = struct {
  7297. Fxx TFT_Fixed
  7298. Fxy TFT_Fixed
  7299. Fyx TFT_Fixed
  7300. Fyy TFT_Fixed
  7301. }
  7302. type TFT_Matrix_ = TFT_Matrix
  7303. type TFT_Data = struct {
  7304. Fpointer uintptr
  7305. Flength TFT_Int
  7306. }
  7307. type TFT_Data_ = TFT_Data
  7308. type TFT_Generic_Finalizer = uintptr
  7309. type TFT_Generic = struct {
  7310. Fdata uintptr
  7311. Ffinalizer TFT_Generic_Finalizer
  7312. }
  7313. type TFT_Generic_ = TFT_Generic
  7314. type TFT_ListNode = uintptr
  7315. type TFT_ListNodeRec_ = struct {
  7316. Fprev TFT_ListNode
  7317. Fnext TFT_ListNode
  7318. Fdata uintptr
  7319. }
  7320. type TFT_List = uintptr
  7321. type TFT_ListRec_ = struct {
  7322. Fhead TFT_ListNode
  7323. Ftail TFT_ListNode
  7324. }
  7325. type TFT_ListNodeRec = struct {
  7326. Fprev TFT_ListNode
  7327. Fnext TFT_ListNode
  7328. Fdata uintptr
  7329. }
  7330. type TFT_ListRec = struct {
  7331. Fhead TFT_ListNode
  7332. Ftail TFT_ListNode
  7333. }
  7334. const _FT_Mod_Err_Base = 0
  7335. const _FT_Mod_Err_Autofit = 0
  7336. const _FT_Mod_Err_BDF = 0
  7337. const _FT_Mod_Err_Bzip2 = 0
  7338. const _FT_Mod_Err_Cache = 0
  7339. const _FT_Mod_Err_CFF = 0
  7340. const _FT_Mod_Err_CID = 0
  7341. const _FT_Mod_Err_Gzip = 0
  7342. const _FT_Mod_Err_LZW = 0
  7343. const _FT_Mod_Err_OTvalid = 0
  7344. const _FT_Mod_Err_PCF = 0
  7345. const _FT_Mod_Err_PFR = 0
  7346. const _FT_Mod_Err_PSaux = 0
  7347. const _FT_Mod_Err_PShinter = 0
  7348. const _FT_Mod_Err_PSnames = 0
  7349. const _FT_Mod_Err_Raster = 0
  7350. const _FT_Mod_Err_SFNT = 0
  7351. const _FT_Mod_Err_Smooth = 0
  7352. const _FT_Mod_Err_TrueType = 0
  7353. const _FT_Mod_Err_Type1 = 0
  7354. const _FT_Mod_Err_Type42 = 0
  7355. const _FT_Mod_Err_Winfonts = 0
  7356. const _FT_Mod_Err_GXvalid = 0
  7357. const _FT_Mod_Err_Max = 1
  7358. const _FT_Err_Ok = 0
  7359. const _FT_Err_Cannot_Open_Resource = 1
  7360. const _FT_Err_Unknown_File_Format = 2
  7361. const _FT_Err_Invalid_File_Format = 3
  7362. const _FT_Err_Invalid_Version = 4
  7363. const _FT_Err_Lower_Module_Version = 5
  7364. const _FT_Err_Invalid_Argument = 6
  7365. const _FT_Err_Unimplemented_Feature = 7
  7366. const _FT_Err_Invalid_Table = 8
  7367. const _FT_Err_Invalid_Offset = 9
  7368. const _FT_Err_Array_Too_Large = 10
  7369. const _FT_Err_Missing_Module = 11
  7370. const _FT_Err_Missing_Property = 12
  7371. const _FT_Err_Invalid_Glyph_Index = 16
  7372. const _FT_Err_Invalid_Character_Code = 17
  7373. const _FT_Err_Invalid_Glyph_Format = 18
  7374. const _FT_Err_Cannot_Render_Glyph = 19
  7375. const _FT_Err_Invalid_Outline = 20
  7376. const _FT_Err_Invalid_Composite = 21
  7377. const _FT_Err_Too_Many_Hints = 22
  7378. const _FT_Err_Invalid_Pixel_Size = 23
  7379. const _FT_Err_Invalid_Handle = 32
  7380. const _FT_Err_Invalid_Library_Handle = 33
  7381. const _FT_Err_Invalid_Driver_Handle = 34
  7382. const _FT_Err_Invalid_Face_Handle = 35
  7383. const _FT_Err_Invalid_Size_Handle = 36
  7384. const _FT_Err_Invalid_Slot_Handle = 37
  7385. const _FT_Err_Invalid_CharMap_Handle = 38
  7386. const _FT_Err_Invalid_Cache_Handle = 39
  7387. const _FT_Err_Invalid_Stream_Handle = 40
  7388. const _FT_Err_Too_Many_Drivers = 48
  7389. const _FT_Err_Too_Many_Extensions = 49
  7390. const _FT_Err_Out_Of_Memory = 64
  7391. const _FT_Err_Unlisted_Object = 65
  7392. const _FT_Err_Cannot_Open_Stream = 81
  7393. const _FT_Err_Invalid_Stream_Seek = 82
  7394. const _FT_Err_Invalid_Stream_Skip = 83
  7395. const _FT_Err_Invalid_Stream_Read = 84
  7396. const _FT_Err_Invalid_Stream_Operation = 85
  7397. const _FT_Err_Invalid_Frame_Operation = 86
  7398. const _FT_Err_Nested_Frame_Access = 87
  7399. const _FT_Err_Invalid_Frame_Read = 88
  7400. const _FT_Err_Raster_Uninitialized = 96
  7401. const _FT_Err_Raster_Corrupted = 97
  7402. const _FT_Err_Raster_Overflow = 98
  7403. const _FT_Err_Raster_Negative_Height = 99
  7404. const _FT_Err_Too_Many_Caches = 112
  7405. const _FT_Err_Invalid_Opcode = 128
  7406. const _FT_Err_Too_Few_Arguments = 129
  7407. const _FT_Err_Stack_Overflow = 130
  7408. const _FT_Err_Code_Overflow = 131
  7409. const _FT_Err_Bad_Argument = 132
  7410. const _FT_Err_Divide_By_Zero = 133
  7411. const _FT_Err_Invalid_Reference = 134
  7412. const _FT_Err_Debug_OpCode = 135
  7413. const _FT_Err_ENDF_In_Exec_Stream = 136
  7414. const _FT_Err_Nested_DEFS = 137
  7415. const _FT_Err_Invalid_CodeRange = 138
  7416. const _FT_Err_Execution_Too_Long = 139
  7417. const _FT_Err_Too_Many_Function_Defs = 140
  7418. const _FT_Err_Too_Many_Instruction_Defs = 141
  7419. const _FT_Err_Table_Missing = 142
  7420. const _FT_Err_Horiz_Header_Missing = 143
  7421. const _FT_Err_Locations_Missing = 144
  7422. const _FT_Err_Name_Table_Missing = 145
  7423. const _FT_Err_CMap_Table_Missing = 146
  7424. const _FT_Err_Hmtx_Table_Missing = 147
  7425. const _FT_Err_Post_Table_Missing = 148
  7426. const _FT_Err_Invalid_Horiz_Metrics = 149
  7427. const _FT_Err_Invalid_CharMap_Format = 150
  7428. const _FT_Err_Invalid_PPem = 151
  7429. const _FT_Err_Invalid_Vert_Metrics = 152
  7430. const _FT_Err_Could_Not_Find_Context = 153
  7431. const _FT_Err_Invalid_Post_Table_Format = 154
  7432. const _FT_Err_Invalid_Post_Table = 155
  7433. const _FT_Err_DEF_In_Glyf_Bytecode = 156
  7434. const _FT_Err_Missing_Bitmap = 157
  7435. const _FT_Err_Syntax_Error = 160
  7436. const _FT_Err_Stack_Underflow = 161
  7437. const _FT_Err_Ignore = 162
  7438. const _FT_Err_No_Unicode_Glyph_Name = 163
  7439. const _FT_Err_Glyph_Too_Big = 164
  7440. const _FT_Err_Missing_Startfont_Field = 176
  7441. const _FT_Err_Missing_Font_Field = 177
  7442. const _FT_Err_Missing_Size_Field = 178
  7443. const _FT_Err_Missing_Fontboundingbox_Field = 179
  7444. const _FT_Err_Missing_Chars_Field = 180
  7445. const _FT_Err_Missing_Startchar_Field = 181
  7446. const _FT_Err_Missing_Encoding_Field = 182
  7447. const _FT_Err_Missing_Bbx_Field = 183
  7448. const _FT_Err_Bbx_Too_Big = 184
  7449. const _FT_Err_Corrupted_Font_Header = 185
  7450. const _FT_Err_Corrupted_Font_Glyphs = 186
  7451. const _FT_Err_Max = 187
  7452. type TFT_Glyph_Metrics = struct {
  7453. Fwidth TFT_Pos
  7454. Fheight TFT_Pos
  7455. FhoriBearingX TFT_Pos
  7456. FhoriBearingY TFT_Pos
  7457. FhoriAdvance TFT_Pos
  7458. FvertBearingX TFT_Pos
  7459. FvertBearingY TFT_Pos
  7460. FvertAdvance TFT_Pos
  7461. }
  7462. type TFT_Glyph_Metrics_ = TFT_Glyph_Metrics
  7463. type TFT_Bitmap_Size = struct {
  7464. Fheight TFT_Short
  7465. Fwidth TFT_Short
  7466. Fsize TFT_Pos
  7467. Fx_ppem TFT_Pos
  7468. Fy_ppem TFT_Pos
  7469. }
  7470. type TFT_Bitmap_Size_ = TFT_Bitmap_Size
  7471. type TFT_Library = uintptr
  7472. type TFT_Module = uintptr
  7473. type TFT_Driver = uintptr
  7474. type TFT_Renderer = uintptr
  7475. type TFT_Face = uintptr
  7476. type TFT_FaceRec_ = struct {
  7477. Fnum_faces TFT_Long
  7478. Fface_index TFT_Long
  7479. Fface_flags TFT_Long
  7480. Fstyle_flags TFT_Long
  7481. Fnum_glyphs TFT_Long
  7482. Ffamily_name uintptr
  7483. Fstyle_name uintptr
  7484. Fnum_fixed_sizes TFT_Int
  7485. Favailable_sizes uintptr
  7486. Fnum_charmaps TFT_Int
  7487. Fcharmaps uintptr
  7488. Fgeneric TFT_Generic
  7489. Fbbox TFT_BBox
  7490. Funits_per_EM TFT_UShort
  7491. Fascender TFT_Short
  7492. Fdescender TFT_Short
  7493. Fheight TFT_Short
  7494. Fmax_advance_width TFT_Short
  7495. Fmax_advance_height TFT_Short
  7496. Funderline_position TFT_Short
  7497. Funderline_thickness TFT_Short
  7498. Fglyph TFT_GlyphSlot
  7499. Fsize TFT_Size
  7500. Fcharmap TFT_CharMap
  7501. Fdriver TFT_Driver
  7502. Fmemory TFT_Memory
  7503. Fstream TFT_Stream
  7504. Fsizes_list TFT_ListRec
  7505. Fautohint TFT_Generic
  7506. Fextensions uintptr
  7507. Finternal TFT_Face_Internal
  7508. }
  7509. type TFT_Size = uintptr
  7510. type TFT_SizeRec_ = struct {
  7511. Fface TFT_Face
  7512. Fgeneric TFT_Generic
  7513. Fmetrics TFT_Size_Metrics
  7514. Finternal TFT_Size_Internal
  7515. }
  7516. type TFT_GlyphSlot = uintptr
  7517. type TFT_GlyphSlotRec_ = struct {
  7518. Flibrary TFT_Library
  7519. Fface TFT_Face
  7520. Fnext TFT_GlyphSlot
  7521. Fglyph_index TFT_UInt
  7522. Fgeneric TFT_Generic
  7523. Fmetrics TFT_Glyph_Metrics
  7524. FlinearHoriAdvance TFT_Fixed
  7525. FlinearVertAdvance TFT_Fixed
  7526. Fadvance TFT_Vector
  7527. Fformat TFT_Glyph_Format
  7528. Fbitmap TFT_Bitmap
  7529. Fbitmap_left TFT_Int
  7530. Fbitmap_top TFT_Int
  7531. Foutline TFT_Outline
  7532. Fnum_subglyphs TFT_UInt
  7533. Fsubglyphs TFT_SubGlyph
  7534. Fcontrol_data uintptr
  7535. Fcontrol_len int64
  7536. Flsb_delta TFT_Pos
  7537. Frsb_delta TFT_Pos
  7538. Fother uintptr
  7539. Finternal TFT_Slot_Internal
  7540. }
  7541. type TFT_CharMap = uintptr
  7542. type TFT_CharMapRec_ = struct {
  7543. Fface TFT_Face
  7544. Fencoding TFT_Encoding
  7545. Fplatform_id TFT_UShort
  7546. Fencoding_id TFT_UShort
  7547. }
  7548. type _FT_Encoding_ = int32
  7549. const _FT_ENCODING_NONE = 0
  7550. const _FT_ENCODING_MS_SYMBOL = 1937337698
  7551. const _FT_ENCODING_UNICODE = 1970170211
  7552. const _FT_ENCODING_SJIS = 1936353651
  7553. const _FT_ENCODING_PRC = 1734484000
  7554. const _FT_ENCODING_BIG5 = 1651074869
  7555. const _FT_ENCODING_WANSUNG = 2002873971
  7556. const _FT_ENCODING_JOHAB = 1785686113
  7557. const _FT_ENCODING_GB2312 = 1734484000
  7558. const _FT_ENCODING_MS_SJIS = 1936353651
  7559. const _FT_ENCODING_MS_GB2312 = 1734484000
  7560. const _FT_ENCODING_MS_BIG5 = 1651074869
  7561. const _FT_ENCODING_MS_WANSUNG = 2002873971
  7562. const _FT_ENCODING_MS_JOHAB = 1785686113
  7563. const _FT_ENCODING_ADOBE_STANDARD = 1094995778
  7564. const _FT_ENCODING_ADOBE_EXPERT = 1094992453
  7565. const _FT_ENCODING_ADOBE_CUSTOM = 1094992451
  7566. const _FT_ENCODING_ADOBE_LATIN_1 = 1818326065
  7567. const _FT_ENCODING_OLD_LATIN_2 = 1818326066
  7568. const _FT_ENCODING_APPLE_ROMAN = 1634889070
  7569. type TFT_Encoding = int32
  7570. type TFT_CharMapRec = struct {
  7571. Fface TFT_Face
  7572. Fencoding TFT_Encoding
  7573. Fplatform_id TFT_UShort
  7574. Fencoding_id TFT_UShort
  7575. }
  7576. type TFT_Face_Internal = uintptr
  7577. type TFT_FaceRec = struct {
  7578. Fnum_faces TFT_Long
  7579. Fface_index TFT_Long
  7580. Fface_flags TFT_Long
  7581. Fstyle_flags TFT_Long
  7582. Fnum_glyphs TFT_Long
  7583. Ffamily_name uintptr
  7584. Fstyle_name uintptr
  7585. Fnum_fixed_sizes TFT_Int
  7586. Favailable_sizes uintptr
  7587. Fnum_charmaps TFT_Int
  7588. Fcharmaps uintptr
  7589. Fgeneric TFT_Generic
  7590. Fbbox TFT_BBox
  7591. Funits_per_EM TFT_UShort
  7592. Fascender TFT_Short
  7593. Fdescender TFT_Short
  7594. Fheight TFT_Short
  7595. Fmax_advance_width TFT_Short
  7596. Fmax_advance_height TFT_Short
  7597. Funderline_position TFT_Short
  7598. Funderline_thickness TFT_Short
  7599. Fglyph TFT_GlyphSlot
  7600. Fsize TFT_Size
  7601. Fcharmap TFT_CharMap
  7602. Fdriver TFT_Driver
  7603. Fmemory TFT_Memory
  7604. Fstream TFT_Stream
  7605. Fsizes_list TFT_ListRec
  7606. Fautohint TFT_Generic
  7607. Fextensions uintptr
  7608. Finternal TFT_Face_Internal
  7609. }
  7610. type TFT_Size_Internal = uintptr
  7611. type TFT_Size_Metrics = struct {
  7612. Fx_ppem TFT_UShort
  7613. Fy_ppem TFT_UShort
  7614. Fx_scale TFT_Fixed
  7615. Fy_scale TFT_Fixed
  7616. Fascender TFT_Pos
  7617. Fdescender TFT_Pos
  7618. Fheight TFT_Pos
  7619. Fmax_advance TFT_Pos
  7620. }
  7621. type TFT_Size_Metrics_ = TFT_Size_Metrics
  7622. type TFT_SizeRec = struct {
  7623. Fface TFT_Face
  7624. Fgeneric TFT_Generic
  7625. Fmetrics TFT_Size_Metrics
  7626. Finternal TFT_Size_Internal
  7627. }
  7628. type TFT_SubGlyph = uintptr
  7629. type TFT_Slot_Internal = uintptr
  7630. type TFT_GlyphSlotRec = struct {
  7631. Flibrary TFT_Library
  7632. Fface TFT_Face
  7633. Fnext TFT_GlyphSlot
  7634. Fglyph_index TFT_UInt
  7635. Fgeneric TFT_Generic
  7636. Fmetrics TFT_Glyph_Metrics
  7637. FlinearHoriAdvance TFT_Fixed
  7638. FlinearVertAdvance TFT_Fixed
  7639. Fadvance TFT_Vector
  7640. Fformat TFT_Glyph_Format
  7641. Fbitmap TFT_Bitmap
  7642. Fbitmap_left TFT_Int
  7643. Fbitmap_top TFT_Int
  7644. Foutline TFT_Outline
  7645. Fnum_subglyphs TFT_UInt
  7646. Fsubglyphs TFT_SubGlyph
  7647. Fcontrol_data uintptr
  7648. Fcontrol_len int64
  7649. Flsb_delta TFT_Pos
  7650. Frsb_delta TFT_Pos
  7651. Fother uintptr
  7652. Finternal TFT_Slot_Internal
  7653. }
  7654. type TFT_Parameter = struct {
  7655. Ftag TFT_ULong
  7656. Fdata TFT_Pointer
  7657. }
  7658. type TFT_Parameter_ = TFT_Parameter
  7659. type TFT_Open_Args = struct {
  7660. Fflags TFT_UInt
  7661. Fmemory_base uintptr
  7662. Fmemory_size TFT_Long
  7663. Fpathname uintptr
  7664. Fstream TFT_Stream
  7665. Fdriver TFT_Module
  7666. Fnum_params TFT_Int
  7667. Fparams uintptr
  7668. }
  7669. type TFT_Open_Args_ = TFT_Open_Args
  7670. type TFT_Size_Request_Type = int32
  7671. type _FT_Size_Request_Type_ = int32
  7672. const _FT_SIZE_REQUEST_TYPE_NOMINAL = 0
  7673. const _FT_SIZE_REQUEST_TYPE_REAL_DIM = 1
  7674. const _FT_SIZE_REQUEST_TYPE_BBOX = 2
  7675. const _FT_SIZE_REQUEST_TYPE_CELL = 3
  7676. const _FT_SIZE_REQUEST_TYPE_SCALES = 4
  7677. const _FT_SIZE_REQUEST_TYPE_MAX = 5
  7678. type TFT_Size_RequestRec = struct {
  7679. Ftype1 TFT_Size_Request_Type
  7680. Fwidth TFT_Long
  7681. Fheight TFT_Long
  7682. FhoriResolution TFT_UInt
  7683. FvertResolution TFT_UInt
  7684. }
  7685. type TFT_Size_RequestRec_ = TFT_Size_RequestRec
  7686. type TFT_Size_Request = uintptr
  7687. type TFT_Render_Mode = int32
  7688. type _FT_Render_Mode_ = int32
  7689. const _FT_RENDER_MODE_NORMAL = 0
  7690. const _FT_RENDER_MODE_LIGHT = 1
  7691. const _FT_RENDER_MODE_MONO = 2
  7692. const _FT_RENDER_MODE_LCD = 3
  7693. const _FT_RENDER_MODE_LCD_V = 4
  7694. const _FT_RENDER_MODE_MAX = 5
  7695. type TFT_Kerning_Mode = int32
  7696. type _FT_Kerning_Mode_ = int32
  7697. const _FT_KERNING_DEFAULT = 0
  7698. const _FT_KERNING_UNFITTED = 1
  7699. const _FT_KERNING_UNSCALED = 2
  7700. type TFT_LayerIterator = struct {
  7701. Fnum_layers TFT_UInt
  7702. Flayer TFT_UInt
  7703. Fp uintptr
  7704. }
  7705. type TFT_LayerIterator_ = TFT_LayerIterator
  7706. type Tstat = struct {
  7707. Fst_dev Tdev_t
  7708. Fst_ino Tino_t
  7709. Fst_nlink Tnlink_t
  7710. Fst_mode Tmode_t
  7711. Fst_uid Tuid_t
  7712. Fst_gid Tgid_t
  7713. Fst_rdev Tdev_t
  7714. Fst_size Toff_t
  7715. Fst_blksize Tblksize_t
  7716. Fst_blocks Tblkcnt_t
  7717. Fst_atim Ttimespec
  7718. Fst_mtim Ttimespec
  7719. Fst_ctim Ttimespec
  7720. F__unused [3]uint64
  7721. }
  7722. type Tstatx_timestamp = struct {
  7723. Ftv_sec Tint64_t
  7724. Ftv_nsec Tuint32_t
  7725. F__pad Tuint32_t
  7726. }
  7727. type Tstatx = struct {
  7728. Fstx_mask Tuint32_t
  7729. Fstx_blksize Tuint32_t
  7730. Fstx_attributes Tuint64_t
  7731. Fstx_nlink Tuint32_t
  7732. Fstx_uid Tuint32_t
  7733. Fstx_gid Tuint32_t
  7734. Fstx_mode Tuint16_t
  7735. F__pad0 [1]Tuint16_t
  7736. Fstx_ino Tuint64_t
  7737. Fstx_size Tuint64_t
  7738. Fstx_blocks Tuint64_t
  7739. Fstx_attributes_mask Tuint64_t
  7740. Fstx_atime Tstatx_timestamp
  7741. Fstx_btime Tstatx_timestamp
  7742. Fstx_ctime Tstatx_timestamp
  7743. Fstx_mtime Tstatx_timestamp
  7744. Fstx_rdev_major Tuint32_t
  7745. Fstx_rdev_minor Tuint32_t
  7746. Fstx_dev_major Tuint32_t
  7747. Fstx_dev_minor Tuint32_t
  7748. F__pad1 [14]Tuint64_t
  7749. }
  7750. type TFcChar8 = uint8
  7751. type TFcChar16 = uint16
  7752. type TFcChar32 = uint32
  7753. type TFcBool = int32
  7754. type TFcType = int32
  7755. type __FcType = int32
  7756. const _FcTypeUnknown = -1
  7757. const _FcTypeVoid = 0
  7758. const _FcTypeInteger = 1
  7759. const _FcTypeDouble = 2
  7760. const _FcTypeString = 3
  7761. const _FcTypeBool = 4
  7762. const _FcTypeMatrix = 5
  7763. const _FcTypeCharSet = 6
  7764. const _FcTypeFTFace = 7
  7765. const _FcTypeLangSet = 8
  7766. const _FcTypeRange = 9
  7767. type TFcMatrix = struct {
  7768. Fxx float64
  7769. Fxy float64
  7770. Fyx float64
  7771. Fyy float64
  7772. }
  7773. type T_FcMatrix = TFcMatrix
  7774. type TFcObjectType = struct {
  7775. Fobject uintptr
  7776. Ftype1 TFcType
  7777. }
  7778. type T_FcObjectType = TFcObjectType
  7779. type TFcConstant = struct {
  7780. Fname uintptr
  7781. Fobject uintptr
  7782. Fvalue int32
  7783. }
  7784. type T_FcConstant = TFcConstant
  7785. type TFcResult = int32
  7786. type __FcResult = int32
  7787. const _FcResultMatch = 0
  7788. const _FcResultNoMatch = 1
  7789. const _FcResultTypeMismatch = 2
  7790. const _FcResultNoId = 3
  7791. const _FcResultOutOfMemory = 4
  7792. type TFcValueBinding = int32
  7793. type __FcValueBinding = int32
  7794. const _FcValueBindingWeak = 0
  7795. const _FcValueBindingStrong = 1
  7796. const _FcValueBindingSame = 2
  7797. const _FcValueBindingEnd = 2147483647
  7798. type TFcPatternIter = struct {
  7799. Fdummy1 uintptr
  7800. Fdummy2 uintptr
  7801. }
  7802. type T_FcPatternIter = TFcPatternIter
  7803. type TFcValue = struct {
  7804. Ftype1 TFcType
  7805. Fu struct {
  7806. Fi [0]int32
  7807. Fb [0]TFcBool
  7808. Fd [0]float64
  7809. Fm [0]uintptr
  7810. Fc [0]uintptr
  7811. Ff [0]uintptr
  7812. Fl [0]uintptr
  7813. Fr [0]uintptr
  7814. Fs uintptr
  7815. }
  7816. }
  7817. type T_FcValue = TFcValue
  7818. type TFcFontSet = struct {
  7819. Fnfont int32
  7820. Fsfont int32
  7821. Ffonts uintptr
  7822. }
  7823. type T_FcFontSet = TFcFontSet
  7824. type TFcObjectSet = struct {
  7825. Fnobject int32
  7826. Fsobject int32
  7827. Fobjects uintptr
  7828. }
  7829. type T_FcObjectSet = TFcObjectSet
  7830. type TFcMatchKind = int32
  7831. type __FcMatchKind = int32
  7832. const _FcMatchPattern = 0
  7833. const _FcMatchFont = 1
  7834. const _FcMatchScan = 2
  7835. const _FcMatchKindEnd = 3
  7836. const _FcMatchKindBegin = 0
  7837. type TFcLangResult = int32
  7838. type __FcLangResult = int32
  7839. const _FcLangEqual = 0
  7840. const _FcLangDifferentCountry = 1
  7841. const _FcLangDifferentTerritory = 1
  7842. const _FcLangDifferentLang = 2
  7843. type TFcSetName = int32
  7844. type __FcSetName = int32
  7845. const _FcSetSystem = 0
  7846. const _FcSetApplication = 1
  7847. type TFcConfigFileInfoIter = struct {
  7848. Fdummy1 uintptr
  7849. Fdummy2 uintptr
  7850. Fdummy3 uintptr
  7851. }
  7852. type T_FcConfigFileInfoIter = TFcConfigFileInfoIter
  7853. type TFcEndian = int32
  7854. const _FcEndianBig = 0
  7855. const _FcEndianLittle = 1
  7856. type Tpointer = uintptr
  7857. type TClientPtr = uintptr
  7858. type TFontPtr = uintptr
  7859. type TFSID = uint64
  7860. type TAccContext = uint64
  7861. type TOSTimePtr = uintptr
  7862. type TBlockHandlerProcPtr = uintptr
  7863. type TGlyph = uint64
  7864. type TGlyphSet = uint64
  7865. type TPicture = uint64
  7866. type TPictFormat = uint64
  7867. type TXRenderDirectFormat = struct {
  7868. Fred int16
  7869. FredMask int16
  7870. Fgreen int16
  7871. FgreenMask int16
  7872. Fblue int16
  7873. FblueMask int16
  7874. Falpha int16
  7875. FalphaMask int16
  7876. }
  7877. type TXRenderPictFormat = struct {
  7878. Fid TPictFormat
  7879. Ftype1 int32
  7880. Fdepth int32
  7881. Fdirect TXRenderDirectFormat
  7882. Fcolormap TColormap
  7883. }
  7884. type TXRenderPictureAttributes = struct {
  7885. Frepeat int32
  7886. Falpha_map TPicture
  7887. Falpha_x_origin int32
  7888. Falpha_y_origin int32
  7889. Fclip_x_origin int32
  7890. Fclip_y_origin int32
  7891. Fclip_mask TPixmap
  7892. Fgraphics_exposures int32
  7893. Fsubwindow_mode int32
  7894. Fpoly_edge int32
  7895. Fpoly_mode int32
  7896. Fdither TAtom
  7897. Fcomponent_alpha int32
  7898. }
  7899. type T_XRenderPictureAttributes = TXRenderPictureAttributes
  7900. type TXRenderColor = struct {
  7901. Fred uint16
  7902. Fgreen uint16
  7903. Fblue uint16
  7904. Falpha uint16
  7905. }
  7906. type TXGlyphInfo = struct {
  7907. Fwidth uint16
  7908. Fheight uint16
  7909. Fx int16
  7910. Fy int16
  7911. FxOff int16
  7912. FyOff int16
  7913. }
  7914. type T_XGlyphInfo = TXGlyphInfo
  7915. type TXGlyphElt8 = struct {
  7916. Fglyphset TGlyphSet
  7917. Fchars uintptr
  7918. Fnchars int32
  7919. FxOff int32
  7920. FyOff int32
  7921. }
  7922. type T_XGlyphElt8 = TXGlyphElt8
  7923. type TXGlyphElt16 = struct {
  7924. Fglyphset TGlyphSet
  7925. Fchars uintptr
  7926. Fnchars int32
  7927. FxOff int32
  7928. FyOff int32
  7929. }
  7930. type T_XGlyphElt16 = TXGlyphElt16
  7931. type TXGlyphElt32 = struct {
  7932. Fglyphset TGlyphSet
  7933. Fchars uintptr
  7934. Fnchars int32
  7935. FxOff int32
  7936. FyOff int32
  7937. }
  7938. type T_XGlyphElt32 = TXGlyphElt32
  7939. type TXDouble = float64
  7940. type TXPointDouble = struct {
  7941. Fx TXDouble
  7942. Fy TXDouble
  7943. }
  7944. type T_XPointDouble = TXPointDouble
  7945. type TXFixed = int32
  7946. type TXPointFixed = struct {
  7947. Fx TXFixed
  7948. Fy TXFixed
  7949. }
  7950. type T_XPointFixed = TXPointFixed
  7951. type TXLineFixed = struct {
  7952. Fp1 TXPointFixed
  7953. Fp2 TXPointFixed
  7954. }
  7955. type T_XLineFixed = TXLineFixed
  7956. type TXTriangle = struct {
  7957. Fp1 TXPointFixed
  7958. Fp2 TXPointFixed
  7959. Fp3 TXPointFixed
  7960. }
  7961. type T_XTriangle = TXTriangle
  7962. type TXCircle = struct {
  7963. Fx TXFixed
  7964. Fy TXFixed
  7965. Fradius TXFixed
  7966. }
  7967. type T_XCircle = TXCircle
  7968. type TXTrapezoid = struct {
  7969. Ftop TXFixed
  7970. Fbottom TXFixed
  7971. Fleft TXLineFixed
  7972. Fright TXLineFixed
  7973. }
  7974. type T_XTrapezoid = TXTrapezoid
  7975. type TXTransform = struct {
  7976. Fmatrix [3][3]TXFixed
  7977. }
  7978. type T_XTransform = TXTransform
  7979. type TXFilters = struct {
  7980. Fnfilter int32
  7981. Ffilter uintptr
  7982. Fnalias int32
  7983. Falias uintptr
  7984. }
  7985. type T_XFilters = TXFilters
  7986. type TXIndexValue = struct {
  7987. Fpixel uint64
  7988. Fred uint16
  7989. Fgreen uint16
  7990. Fblue uint16
  7991. Falpha uint16
  7992. }
  7993. type T_XIndexValue = TXIndexValue
  7994. type TXAnimCursor = struct {
  7995. Fcursor TCursor
  7996. Fdelay uint64
  7997. }
  7998. type T_XAnimCursor = TXAnimCursor
  7999. type TXSpanFix = struct {
  8000. Fleft TXFixed
  8001. Fright TXFixed
  8002. Fy TXFixed
  8003. }
  8004. type T_XSpanFix = TXSpanFix
  8005. type TXTrap = struct {
  8006. Ftop TXSpanFix
  8007. Fbottom TXSpanFix
  8008. }
  8009. type T_XTrap = TXTrap
  8010. type TXLinearGradient = struct {
  8011. Fp1 TXPointFixed
  8012. Fp2 TXPointFixed
  8013. }
  8014. type T_XLinearGradient = TXLinearGradient
  8015. type TXRadialGradient = struct {
  8016. Finner TXCircle
  8017. Fouter TXCircle
  8018. }
  8019. type T_XRadialGradient = TXRadialGradient
  8020. type TXConicalGradient = struct {
  8021. Fcenter TXPointFixed
  8022. Fangle TXFixed
  8023. }
  8024. type T_XConicalGradient = TXConicalGradient
  8025. type TXftFontInfo = struct {
  8026. Fhash TFcChar32
  8027. Ffile uintptr
  8028. Fxsize TFT_F26Dot6
  8029. Fysize TFT_F26Dot6
  8030. Fantialias TFcBool
  8031. Fembolden TFcBool
  8032. Frgba int32
  8033. Flcd_filter int32
  8034. Fmatrix TFT_Matrix
  8035. Ftransform TFcBool
  8036. Fload_flags TFT_Int
  8037. Frender TFcBool
  8038. Fspacing int32
  8039. Fminspace TFcBool
  8040. Fchar_width int32
  8041. }
  8042. type T_XftFontInfo = TXftFontInfo
  8043. type TXftFont = struct {
  8044. Fascent int32
  8045. Fdescent int32
  8046. Fheight int32
  8047. Fmax_advance_width int32
  8048. Fcharset uintptr
  8049. Fpattern uintptr
  8050. }
  8051. type T_XftFont = TXftFont
  8052. type TXftDraw = struct {
  8053. Fdpy uintptr
  8054. Fscreen int32
  8055. Fbits_per_pixel uint32
  8056. Fdepth uint32
  8057. Fdrawable TDrawable
  8058. Fvisual uintptr
  8059. Fcolormap TColormap
  8060. Fclip_type TXftClipType
  8061. Fclip TXftClip
  8062. Fsubwindow_mode int32
  8063. Frender struct {
  8064. Fpict TPicture
  8065. }
  8066. Fcore struct {
  8067. Fgc TGC
  8068. Fuse_pixmap int32
  8069. }
  8070. }
  8071. type T_XftDraw = TXftDraw
  8072. type __XftClipType = int32
  8073. const _XftClipTypeNone = 0
  8074. const _XftClipTypeRegion = 1
  8075. const _XftClipTypeRectangles = 2
  8076. type TXftColor = struct {
  8077. Fpixel uint64
  8078. Fcolor TXRenderColor
  8079. }
  8080. type T_XftColor = TXftColor
  8081. type TXftCharSpec = struct {
  8082. Fucs4 TFcChar32
  8083. Fx int16
  8084. Fy int16
  8085. }
  8086. type T_XftCharSpec = TXftCharSpec
  8087. type TXftCharFontSpec = struct {
  8088. Ffont uintptr
  8089. Fucs4 TFcChar32
  8090. Fx int16
  8091. Fy int16
  8092. }
  8093. type T_XftCharFontSpec = TXftCharFontSpec
  8094. type TXftGlyphSpec = struct {
  8095. Fglyph TFT_UInt
  8096. Fx int16
  8097. Fy int16
  8098. }
  8099. type T_XftGlyphSpec = TXftGlyphSpec
  8100. type TXftGlyphFontSpec = struct {
  8101. Ffont uintptr
  8102. Fglyph TFT_UInt
  8103. Fx int16
  8104. Fy int16
  8105. }
  8106. type T_XftGlyphFontSpec = TXftGlyphFontSpec
  8107. type TXftMatcher = struct {
  8108. Fobject uintptr
  8109. Fcompare uintptr
  8110. }
  8111. type T_XftMatcher = TXftMatcher
  8112. type TXftSymbolic = struct {
  8113. Fname uintptr
  8114. Fvalue int32
  8115. }
  8116. type T_XftSymbolic = TXftSymbolic
  8117. type TXftGlyph = struct {
  8118. Fmetrics TXGlyphInfo
  8119. Fbitmap uintptr
  8120. Fglyph_memory uint64
  8121. }
  8122. type T_XftGlyph = TXftGlyph
  8123. type TXftUcsHash = struct {
  8124. Fucs4 TFcChar32
  8125. Fglyph TFT_UInt
  8126. }
  8127. type T_XftUcsHash = TXftUcsHash
  8128. type TXftFtFile = struct {
  8129. Fnext uintptr
  8130. Fref int32
  8131. Ffile uintptr
  8132. Fid int32
  8133. Fxsize TFT_F26Dot6
  8134. Fysize TFT_F26Dot6
  8135. Fmatrix TFT_Matrix
  8136. Flock int32
  8137. Fface TFT_Face
  8138. }
  8139. type T_XftFtFile = TXftFtFile
  8140. type TXftFontInt = struct {
  8141. Fpublic TXftFont
  8142. Fnext uintptr
  8143. Fhash_next uintptr
  8144. Finfo TXftFontInfo
  8145. Fref int32
  8146. Fglyphs uintptr
  8147. Fnum_glyphs int32
  8148. Fhash_table uintptr
  8149. Fhash_value int32
  8150. Frehash_value int32
  8151. Fglyphset TGlyphSet
  8152. Fformat uintptr
  8153. Fglyph_memory uint64
  8154. Fmax_glyph_memory uint64
  8155. Fuse_free_glyphs TFcBool
  8156. }
  8157. type T_XftFontInt = TXftFontInt
  8158. type TXftClipType = int32
  8159. type TXftClipRect = struct {
  8160. FxOrigin int32
  8161. FyOrigin int32
  8162. Fn int32
  8163. }
  8164. type T_XftClipRect = TXftClipRect
  8165. type TXftClip = struct {
  8166. Fregion [0]TRegion
  8167. Frect uintptr
  8168. }
  8169. type T_XftClip = TXftClip
  8170. type TXftSolidColor = struct {
  8171. Fcolor TXRenderColor
  8172. Fscreen int32
  8173. Fpict TPicture
  8174. }
  8175. type T_XftSolidColor = TXftSolidColor
  8176. type TXftDisplayInfo = struct {
  8177. Fnext uintptr
  8178. Fdisplay uintptr
  8179. Fcodes uintptr
  8180. Fdefaults uintptr
  8181. FhasRender TFcBool
  8182. Ffonts uintptr
  8183. FsolidFormat uintptr
  8184. Fglyph_memory uint64
  8185. Fmax_glyph_memory uint64
  8186. Fuse_free_glyphs TFcBool
  8187. Fnum_unref_fonts int32
  8188. Fmax_unref_fonts int32
  8189. Fcolors [16]TXftSolidColor
  8190. FfontHash [127]uintptr
  8191. }
  8192. type T_XftDisplayInfo = TXftDisplayInfo
  8193. /* xftxlfd.c */
  8194. func XXftColorAllocName(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, name uintptr, result uintptr) (r int32) {
  8195. bp := tls.Alloc(32)
  8196. defer tls.Free(32)
  8197. var _ /* exact at bp+16 */ TXColor
  8198. var _ /* screen at bp+0 */ TXColor
  8199. if !(libx11.XXAllocNamedColor(tls, dpy, cmap, name, bp, bp+16) != 0) {
  8200. /* XXX stick standard colormap stuff here */
  8201. return m_False
  8202. }
  8203. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8204. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fred
  8205. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fgreen
  8206. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fblue
  8207. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = uint16(0xffff)
  8208. return int32(m_True)
  8209. }
  8210. func _maskbase(tls *libc.TLS, m uint64) (r int16) {
  8211. var i int16
  8212. _ = i
  8213. if !(m != 0) {
  8214. return 0
  8215. }
  8216. i = 0
  8217. for !(m&libc.Uint64FromInt32(1) != 0) {
  8218. m >>= uint64(1)
  8219. i++
  8220. }
  8221. return i
  8222. }
  8223. func _masklen(tls *libc.TLS, m uint64) (r int16) {
  8224. var y uint64
  8225. _ = y
  8226. y = m >> int32(1) & uint64(033333333333)
  8227. y = m - y - y>>int32(1)&uint64(033333333333)
  8228. return libc.Int16FromUint64((y + y>>libc.Int32FromInt32(3)) & libc.Uint64FromUint32(030707070707) % libc.Uint64FromInt32(077))
  8229. }
  8230. func XXftColorAllocValue(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr, result uintptr) (r int32) {
  8231. bp := tls.Alloc(16)
  8232. defer tls.Free(16)
  8233. var blue_len, blue_shift, green_len, green_shift, red_len, red_shift int32
  8234. var _ /* xcolor at bp+0 */ TXColor
  8235. _, _, _, _, _, _ = blue_len, blue_shift, green_len, green_shift, red_len, red_shift
  8236. if (*TVisual)(unsafe.Pointer(visual)).Fclass == int32(m_TrueColor) {
  8237. red_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8238. red_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8239. green_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8240. green_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8241. blue_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8242. blue_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8243. (*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)
  8244. } else {
  8245. (*(*TXColor)(unsafe.Pointer(bp))).Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8246. (*(*TXColor)(unsafe.Pointer(bp))).Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8247. (*(*TXColor)(unsafe.Pointer(bp))).Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8248. if !(libx11.XXAllocColor(tls, dpy, cmap, bp) != 0) {
  8249. return m_False
  8250. }
  8251. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8252. }
  8253. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8254. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8255. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8256. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = (*TXRenderColor)(unsafe.Pointer(color)).Falpha
  8257. return int32(m_True)
  8258. }
  8259. func XXftColorFree(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr) {
  8260. if (*TVisual)(unsafe.Pointer(visual)).Fclass != int32(m_TrueColor) {
  8261. libx11.XXFreeColors(tls, dpy, cmap, color, int32(1), uint64(0))
  8262. }
  8263. }
  8264. type Tfuncs = struct {
  8265. Fcreate_image uintptr
  8266. Fdestroy_image uintptr
  8267. Fget_pixel uintptr
  8268. Fput_pixel uintptr
  8269. Fsub_image uintptr
  8270. Fadd_pixel uintptr
  8271. }
  8272. const m_NUM_LOCAL = 1024
  8273. /* xftxlfd.c */
  8274. func XXftRectCore(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  8275. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  8276. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  8277. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  8278. }
  8279. }
  8280. /*
  8281. * Use the core protocol to draw the glyphs
  8282. */
  8283. func __XftSharpGlyphMono(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8284. var bits, bitsMask uint8
  8285. var height, lenspan, stride, w, width, xspan, v1 int32
  8286. var src, srcLine, v2, v3, v4 uintptr
  8287. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8288. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8289. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8290. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8291. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8292. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8293. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8294. for {
  8295. v1 = height
  8296. height--
  8297. if !(v1 != 0) {
  8298. break
  8299. }
  8300. src = srcLine
  8301. srcLine += uintptr(stride)
  8302. w = width
  8303. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8304. v2 = src
  8305. src++
  8306. bits = *(*uint8)(unsafe.Pointer(v2))
  8307. xspan = x
  8308. for w != 0 {
  8309. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8310. lenspan = 0
  8311. for cond := true; cond; cond = libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8312. lenspan++
  8313. if lenspan == w {
  8314. break
  8315. }
  8316. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8317. if !(bitsMask != 0) {
  8318. v3 = src
  8319. src++
  8320. bits = *(*uint8)(unsafe.Pointer(v3))
  8321. bitsMask = uint8(0x80)
  8322. }
  8323. }
  8324. 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))
  8325. xspan += lenspan
  8326. w -= lenspan
  8327. } else {
  8328. for cond := true; cond; cond = !(libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0) {
  8329. w--
  8330. xspan++
  8331. if !(w != 0) {
  8332. break
  8333. }
  8334. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8335. if !(bitsMask != 0) {
  8336. v4 = src
  8337. src++
  8338. bits = *(*uint8)(unsafe.Pointer(v4))
  8339. bitsMask = uint8(0x80)
  8340. }
  8341. }
  8342. }
  8343. }
  8344. y++
  8345. }
  8346. }
  8347. // C documentation
  8348. //
  8349. // /*
  8350. // * Draw solid color text from an anti-aliased bitmap. This is a
  8351. // * fallback for cases where a particular drawable has no AA code
  8352. // */
  8353. func __XftSharpGlyphGray(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8354. var bits uint8
  8355. var height, lenspan, stride, w, width, xspan, v1 int32
  8356. var src, srcLine, v2, v3, v4 uintptr
  8357. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8358. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8359. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8360. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8361. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8362. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8363. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8364. for {
  8365. v1 = height
  8366. height--
  8367. if !(v1 != 0) {
  8368. break
  8369. }
  8370. src = srcLine
  8371. srcLine += uintptr(stride)
  8372. w = width
  8373. v2 = src
  8374. src++
  8375. bits = *(*uint8)(unsafe.Pointer(v2))
  8376. xspan = x
  8377. for w != 0 {
  8378. if libc.Int32FromUint8(bits) >= int32(0x80) {
  8379. lenspan = 0
  8380. for cond := true; cond; cond = libc.Int32FromUint8(bits) >= int32(0x80) {
  8381. lenspan++
  8382. if lenspan == w {
  8383. break
  8384. }
  8385. v3 = src
  8386. src++
  8387. bits = *(*uint8)(unsafe.Pointer(v3))
  8388. }
  8389. 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))
  8390. xspan += lenspan
  8391. w -= lenspan
  8392. } else {
  8393. for cond := true; cond; cond = libc.Int32FromUint8(bits) < int32(0x80) {
  8394. w--
  8395. xspan++
  8396. if !(w != 0) {
  8397. break
  8398. }
  8399. v4 = src
  8400. src++
  8401. bits = *(*uint8)(unsafe.Pointer(v4))
  8402. }
  8403. }
  8404. }
  8405. y++
  8406. }
  8407. }
  8408. func __XftSharpGlyphRgba(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8409. var bits TCARD32
  8410. var height, lenspan, stride, w, width, xspan, v1 int32
  8411. var src, srcLine, v2, v3, v4 uintptr
  8412. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8413. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8414. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8415. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8416. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8417. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8418. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8419. for {
  8420. v1 = height
  8421. height--
  8422. if !(v1 != 0) {
  8423. break
  8424. }
  8425. src = srcLine
  8426. srcLine += uintptr(stride) * 4
  8427. w = width
  8428. v2 = src
  8429. src += 4
  8430. bits = *(*TCARD32)(unsafe.Pointer(v2))
  8431. xspan = x
  8432. for w != 0 {
  8433. if bits >= uint32(0x80000000) {
  8434. lenspan = 0
  8435. for cond := true; cond; cond = bits >= uint32(0x80000000) {
  8436. lenspan++
  8437. if lenspan == w {
  8438. break
  8439. }
  8440. v3 = src
  8441. src += 4
  8442. bits = *(*TCARD32)(unsafe.Pointer(v3))
  8443. }
  8444. 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))
  8445. xspan += lenspan
  8446. w -= lenspan
  8447. } else {
  8448. for cond := true; cond; cond = bits < uint32(0x80000000) {
  8449. w--
  8450. xspan++
  8451. if !(w != 0) {
  8452. break
  8453. }
  8454. v4 = src
  8455. src += 4
  8456. bits = *(*TCARD32)(unsafe.Pointer(v4))
  8457. }
  8458. }
  8459. }
  8460. y++
  8461. }
  8462. }
  8463. type TXftSharpGlyph = uintptr
  8464. func __XftSharpGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSharpGlyph) {
  8465. var font uintptr
  8466. _ = font
  8467. font = public
  8468. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  8469. return __ccgo_fp(__XftSharpGlyphMono)
  8470. } else {
  8471. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  8472. case int32(m_FC_RGBA_RGB):
  8473. fallthrough
  8474. case int32(m_FC_RGBA_BGR):
  8475. fallthrough
  8476. case int32(m_FC_RGBA_VRGB):
  8477. fallthrough
  8478. case int32(m_FC_RGBA_VBGR):
  8479. return __ccgo_fp(__XftSharpGlyphRgba)
  8480. default:
  8481. return __ccgo_fp(__XftSharpGlyphGray)
  8482. }
  8483. }
  8484. return r
  8485. }
  8486. /*
  8487. * Draw glyphs to a target that supports anti-aliasing
  8488. */
  8489. /*
  8490. * Primitives for converting between RGB values and TrueColor pixels
  8491. */
  8492. func __XftExamineBitfield(tls *libc.TLS, mask uint64, shift uintptr, len1 uintptr) {
  8493. var l, s int32
  8494. _, _ = l, s
  8495. s = 0
  8496. for mask&uint64(1) == uint64(0) {
  8497. mask >>= uint64(1)
  8498. s++
  8499. }
  8500. l = 0
  8501. for mask&uint64(1) == uint64(1) {
  8502. mask >>= uint64(1)
  8503. l++
  8504. }
  8505. *(*int32)(unsafe.Pointer(shift)) = s
  8506. *(*int32)(unsafe.Pointer(len1)) = l
  8507. }
  8508. func __XftGetField(tls *libc.TLS, l_pixel uint64, shift int32, len1 int32) (r TCARD32) {
  8509. var pixel TCARD32
  8510. _ = pixel
  8511. pixel = uint32(l_pixel)
  8512. pixel = pixel & libc.Uint32FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<shift)
  8513. pixel = pixel << (int32(32) - (shift + len1)) >> int32(24)
  8514. for len1 < int32(8) {
  8515. pixel |= pixel >> len1
  8516. len1 <<= int32(1)
  8517. }
  8518. return pixel
  8519. }
  8520. func __XftPutField(tls *libc.TLS, pixel TCARD32, shift int32, len1 int32) (r uint64) {
  8521. var l_pixel uint64
  8522. _ = l_pixel
  8523. l_pixel = uint64(pixel)
  8524. shift = shift - (int32(8) - len1)
  8525. if len1 <= int32(8) {
  8526. l_pixel &= libc.Uint64FromInt32((libc.Int32FromInt32(1)<<len1 - libc.Int32FromInt32(1)) << (libc.Int32FromInt32(8) - len1))
  8527. }
  8528. if shift < 0 {
  8529. l_pixel >>= libc.Uint64FromInt32(-shift)
  8530. } else {
  8531. l_pixel <<= libc.Uint64FromInt32(shift)
  8532. }
  8533. return l_pixel
  8534. }
  8535. // C documentation
  8536. //
  8537. // /*
  8538. // * This is used when doing XftCharFontSpec/XftGlyphFontSpec where
  8539. // * some of the fonts are bitmaps and some are anti-aliased to handle
  8540. // * the bitmap portions
  8541. // */
  8542. func __XftSmoothGlyphMono(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8543. bp := tls.Alloc(32)
  8544. defer tls.Free(32)
  8545. var bits, bitsMask uint8
  8546. var height, stride, w, width, xspan, v1, v3 int32
  8547. var pixel uint64
  8548. var src, srcLine, v2, v4 uintptr
  8549. var _ /* b_len at bp+20 */ int32
  8550. var _ /* b_shift at bp+16 */ int32
  8551. var _ /* g_len at bp+12 */ int32
  8552. var _ /* g_shift at bp+8 */ int32
  8553. var _ /* r_len at bp+4 */ int32
  8554. var _ /* r_shift at bp+0 */ int32
  8555. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, pixel, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8556. srcLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8557. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8558. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8559. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8560. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8561. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8562. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8563. 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)))
  8564. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8565. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8566. for {
  8567. v1 = height
  8568. height--
  8569. if !(v1 != 0) {
  8570. break
  8571. }
  8572. src = srcLine
  8573. srcLine += uintptr(stride)
  8574. w = width
  8575. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8576. v2 = src
  8577. src++
  8578. bits = *(*uint8)(unsafe.Pointer(v2))
  8579. xspan = x
  8580. for {
  8581. v3 = w
  8582. w--
  8583. if !(v3 != 0) {
  8584. break
  8585. }
  8586. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8587. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, xspan, y, pixel)
  8588. }
  8589. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8590. if !(bitsMask != 0) {
  8591. v4 = src
  8592. src++
  8593. bits = *(*uint8)(unsafe.Pointer(v4))
  8594. bitsMask = uint8(0x80)
  8595. }
  8596. xspan++
  8597. }
  8598. y++
  8599. }
  8600. }
  8601. /*
  8602. * As simple anti-aliasing is likely to be common, there are three
  8603. * optimized versions for the usual true color pixel formats (888, 565, 555).
  8604. * Other formats are handled by the general case
  8605. */
  8606. /*
  8607. * There are two ways of handling alpha -- either as a single unified value or
  8608. * a separate value for each component, hence each macro must have two
  8609. * versions. The unified alpha version has a 'U' at the end of the name,
  8610. * the component version has a 'C'. Similarly, functions which deal with
  8611. * this difference will have two versions using the same convention.
  8612. */
  8613. func _fbOver24(tls *libc.TLS, x TCARD32, y TCARD32) (r TCARD32) {
  8614. var a, t TCARD16
  8615. var m, n, o TCARD32
  8616. _, _, _, _, _ = a, m, n, o, t
  8617. a = uint16(^x >> int32(24))
  8618. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + int32(0x80))
  8619. t = libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(0)))))
  8620. m = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(0)
  8621. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + int32(0x80))
  8622. t = libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(8)))))
  8623. n = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(8)
  8624. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + int32(0x80))
  8625. t = libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(16)))))
  8626. o = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(16)
  8627. return m | n | o
  8628. }
  8629. func _fbIn(tls *libc.TLS, x TCARD32, y TCARD8) (r TCARD32) {
  8630. var a, t TCARD16
  8631. var m, n, o, p TCARD32
  8632. _, _, _, _, _, _ = a, m, n, o, p, t
  8633. a = uint16(y)
  8634. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + int32(0x80))
  8635. m = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << 0
  8636. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + int32(0x80))
  8637. n = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(8)
  8638. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + int32(0x80))
  8639. o = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(16)
  8640. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(24))))*libc.Int32FromUint16(a) + int32(0x80))
  8641. p = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(24)
  8642. return m | n | o | p
  8643. }
  8644. func __XftSmoothGlyphGray8888(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8645. var b, d, g, r, src, srca TCARD32
  8646. var dst, dstLine, mask, maskLine, v3 uintptr
  8647. var dstStride, height, maskStride, w, width, v1, v2 int32
  8648. var m TCARD8
  8649. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8650. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8651. /* This handles only RGB and BGR */
  8652. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8653. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xff0000) {
  8654. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8655. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8656. } else {
  8657. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8658. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8659. }
  8660. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8661. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8662. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8663. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8664. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8665. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(2))
  8666. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(2)
  8667. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8668. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8669. for {
  8670. v1 = height
  8671. height--
  8672. if !(v1 != 0) {
  8673. break
  8674. }
  8675. dst = dstLine
  8676. dstLine += uintptr(dstStride) * 4
  8677. mask = maskLine
  8678. maskLine += uintptr(maskStride)
  8679. w = width
  8680. for {
  8681. v2 = w
  8682. w--
  8683. if !(v2 != 0) {
  8684. break
  8685. }
  8686. v3 = mask
  8687. mask++
  8688. m = *(*TCARD8)(unsafe.Pointer(v3))
  8689. if libc.Int32FromUint8(m) == int32(0xff) {
  8690. if srca == uint32(0xff) {
  8691. *(*TCARD32)(unsafe.Pointer(dst)) = src
  8692. } else {
  8693. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, src, *(*TCARD32)(unsafe.Pointer(dst)))
  8694. }
  8695. } else {
  8696. if m != 0 {
  8697. d = _fbIn(tls, src, m)
  8698. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, d, *(*TCARD32)(unsafe.Pointer(dst)))
  8699. }
  8700. }
  8701. dst += 4
  8702. }
  8703. }
  8704. }
  8705. func __XftSmoothGlyphGray565(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8706. var b, d, g, r, src, srca TCARD32
  8707. var dst, dstLine, mask, maskLine, v3 uintptr
  8708. var dstStride, height, maskStride, w, width, v1, v2 int32
  8709. var m TCARD8
  8710. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8711. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8712. /* This handles only RGB and BGR */
  8713. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8714. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8715. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8716. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8717. } else {
  8718. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8719. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8720. }
  8721. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8722. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8723. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8724. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8725. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8726. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8727. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8728. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8729. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8730. for {
  8731. v1 = height
  8732. height--
  8733. if !(v1 != 0) {
  8734. break
  8735. }
  8736. dst = dstLine
  8737. dstLine += uintptr(dstStride) * 2
  8738. mask = maskLine
  8739. maskLine += uintptr(maskStride)
  8740. w = width
  8741. for {
  8742. v2 = w
  8743. w--
  8744. if !(v2 != 0) {
  8745. break
  8746. }
  8747. v3 = mask
  8748. mask++
  8749. m = *(*TCARD8)(unsafe.Pointer(v3))
  8750. if libc.Int32FromUint8(m) == int32(0xff) {
  8751. if srca == uint32(0xff) {
  8752. d = src
  8753. } else {
  8754. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8755. 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)))
  8756. }
  8757. *(*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))
  8758. } else {
  8759. if m != 0 {
  8760. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8761. 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)))
  8762. *(*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))
  8763. }
  8764. }
  8765. dst += 2
  8766. }
  8767. }
  8768. }
  8769. func __XftSmoothGlyphGray555(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8770. var b, d, g, r, src, srca TCARD32
  8771. var dst, dstLine, mask, maskLine, v3 uintptr
  8772. var dstStride, height, maskStride, w, width, v1, v2 int32
  8773. var m TCARD8
  8774. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8775. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8776. /* This handles only RGB and BGR */
  8777. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8778. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8779. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8780. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8781. } else {
  8782. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8783. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8784. }
  8785. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8786. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8787. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8788. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8789. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8790. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8791. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8792. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8793. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8794. for {
  8795. v1 = height
  8796. height--
  8797. if !(v1 != 0) {
  8798. break
  8799. }
  8800. dst = dstLine
  8801. dstLine += uintptr(dstStride) * 2
  8802. mask = maskLine
  8803. maskLine += uintptr(maskStride)
  8804. w = width
  8805. for {
  8806. v2 = w
  8807. w--
  8808. if !(v2 != 0) {
  8809. break
  8810. }
  8811. v3 = mask
  8812. mask++
  8813. m = *(*TCARD8)(unsafe.Pointer(v3))
  8814. if libc.Int32FromUint8(m) == int32(0xff) {
  8815. if srca == uint32(0xff) {
  8816. d = src
  8817. } else {
  8818. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8819. 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)))
  8820. }
  8821. *(*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))
  8822. } else {
  8823. if m != 0 {
  8824. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8825. 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)))
  8826. *(*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))
  8827. }
  8828. }
  8829. dst += 2
  8830. }
  8831. }
  8832. }
  8833. func __XftSmoothGlyphGray(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8834. bp := tls.Alloc(32)
  8835. defer tls.Free(32)
  8836. var d, src, srca TCARD32
  8837. var height, maskStride, tx, w, width, v1, v2 int32
  8838. var m TCARD8
  8839. var mask, maskLine, v3 uintptr
  8840. var pixel uint64
  8841. var _ /* b_len at bp+20 */ int32
  8842. var _ /* b_shift at bp+16 */ int32
  8843. var _ /* g_len at bp+12 */ int32
  8844. var _ /* g_shift at bp+8 */ int32
  8845. var _ /* r_len at bp+4 */ int32
  8846. var _ /* r_shift at bp+0 */ int32
  8847. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, height, m, mask, maskLine, maskStride, pixel, src, srca, tx, w, width, v1, v2, v3
  8848. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8849. 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))
  8850. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8851. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8852. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8853. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8854. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8855. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8856. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8857. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8858. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8859. for {
  8860. v1 = height
  8861. height--
  8862. if !(v1 != 0) {
  8863. break
  8864. }
  8865. mask = maskLine
  8866. maskLine += uintptr(maskStride)
  8867. w = width
  8868. tx = x
  8869. for {
  8870. v2 = w
  8871. w--
  8872. if !(v2 != 0) {
  8873. break
  8874. }
  8875. v3 = mask
  8876. mask++
  8877. m = *(*TCARD8)(unsafe.Pointer(v3))
  8878. if libc.Int32FromUint8(m) == int32(0xff) {
  8879. if srca == uint32(0xff) {
  8880. d = src
  8881. } else {
  8882. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  8883. 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)))
  8884. d = _fbOver24(tls, src, d)
  8885. }
  8886. 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)))
  8887. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  8888. } else {
  8889. if m != 0 {
  8890. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  8891. 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)))
  8892. d = _fbOver24(tls, _fbIn(tls, src, m), d)
  8893. 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)))
  8894. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  8895. }
  8896. }
  8897. tx++
  8898. }
  8899. y++
  8900. }
  8901. }
  8902. func __XftSmoothGlyphRgba(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8903. bp := tls.Alloc(32)
  8904. defer tls.Free(32)
  8905. var __a, __a1, __a2 TCARD16
  8906. var __i, __i1, __i2, __t, __t1, __t2, __ta, __ta1, __ta2, d, m, ma, n, o, src, srca TCARD32
  8907. var height, tx, w, width, v1, v2 int32
  8908. var mask, v3 uintptr
  8909. var pixel uint64
  8910. var _ /* b_len at bp+20 */ int32
  8911. var _ /* b_shift at bp+16 */ int32
  8912. var _ /* g_len at bp+12 */ int32
  8913. var _ /* g_shift at bp+8 */ int32
  8914. var _ /* r_len at bp+4 */ int32
  8915. var _ /* r_shift at bp+0 */ int32
  8916. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = __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
  8917. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8918. 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))
  8919. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8920. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8921. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8922. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8923. mask = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8924. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8925. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8926. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8927. for {
  8928. v1 = height
  8929. height--
  8930. if !(v1 != 0) {
  8931. break
  8932. }
  8933. w = width
  8934. tx = x
  8935. for {
  8936. v2 = w
  8937. w--
  8938. if !(v2 != 0) {
  8939. break
  8940. }
  8941. v3 = mask
  8942. mask += 4
  8943. ma = *(*TCARD32)(unsafe.Pointer(v3))
  8944. if ma == uint32(0xffffffff) {
  8945. if srca == uint32(0xff) {
  8946. d = src
  8947. } else {
  8948. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  8949. 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)))
  8950. d = _fbOver24(tls, src, d)
  8951. }
  8952. 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)))
  8953. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  8954. } else {
  8955. if ma != 0 {
  8956. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  8957. 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)))
  8958. __a = uint16(uint8(ma >> libc.Int32FromInt32(0)))
  8959. __i = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(__a) + int32(0x80))
  8960. __t = (__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8)
  8961. __i = srca*uint32(__a) + uint32(0x80)
  8962. __ta = uint32(uint8(^((__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8))))
  8963. __i = uint32(uint16(uint8(d>>libc.Int32FromInt32(0))))*__ta + uint32(0x80)
  8964. __t = __t + (__i>>libc.Int32FromInt32(8)+__i)>>libc.Int32FromInt32(8)
  8965. __t = uint32(uint8(__t | -(__t >> libc.Int32FromInt32(8))))
  8966. m = __t << 0
  8967. __a1 = uint16(uint8(ma >> libc.Int32FromInt32(8)))
  8968. __i1 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(__a1) + int32(0x80))
  8969. __t1 = (__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8)
  8970. __i1 = srca*uint32(__a1) + uint32(0x80)
  8971. __ta1 = uint32(uint8(^((__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8))))
  8972. __i1 = uint32(uint16(uint8(d>>libc.Int32FromInt32(8))))*__ta1 + uint32(0x80)
  8973. __t1 = __t1 + (__i1>>libc.Int32FromInt32(8)+__i1)>>libc.Int32FromInt32(8)
  8974. __t1 = uint32(uint8(__t1 | -(__t1 >> libc.Int32FromInt32(8))))
  8975. n = __t1 << int32(8)
  8976. __a2 = uint16(uint8(ma >> libc.Int32FromInt32(16)))
  8977. __i2 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(__a2) + int32(0x80))
  8978. __t2 = (__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8)
  8979. __i2 = srca*uint32(__a2) + uint32(0x80)
  8980. __ta2 = uint32(uint8(^((__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8))))
  8981. __i2 = uint32(uint16(uint8(d>>libc.Int32FromInt32(16))))*__ta2 + uint32(0x80)
  8982. __t2 = __t2 + (__i2>>libc.Int32FromInt32(8)+__i2)>>libc.Int32FromInt32(8)
  8983. __t2 = uint32(uint8(__t2 | -(__t2 >> libc.Int32FromInt32(8))))
  8984. o = __t2 << int32(16)
  8985. d = m | n | o
  8986. 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)))
  8987. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  8988. }
  8989. }
  8990. tx++
  8991. }
  8992. y++
  8993. }
  8994. }
  8995. func __XftSmoothGlyphPossible(tls *libc.TLS, draw uintptr) (r TFcBool) {
  8996. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) {
  8997. return m_FcFalse
  8998. }
  8999. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fclass != int32(m_TrueColor) {
  9000. return m_FcFalse
  9001. }
  9002. return int32(m_FcTrue)
  9003. }
  9004. type TXftSmoothGlyph = uintptr
  9005. func __XftSmoothGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSmoothGlyph) {
  9006. var font uintptr
  9007. _ = font
  9008. font = public
  9009. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  9010. return __ccgo_fp(__XftSmoothGlyphMono)
  9011. } else {
  9012. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  9013. case int32(m_FC_RGBA_RGB):
  9014. fallthrough
  9015. case int32(m_FC_RGBA_BGR):
  9016. fallthrough
  9017. case int32(m_FC_RGBA_VRGB):
  9018. fallthrough
  9019. case int32(m_FC_RGBA_VBGR):
  9020. return __ccgo_fp(__XftSmoothGlyphRgba)
  9021. default:
  9022. switch XXftDrawBitsPerPixel(tls, draw) {
  9023. case uint32(32):
  9024. 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) {
  9025. return __ccgo_fp(__XftSmoothGlyphGray8888)
  9026. }
  9027. case uint32(16):
  9028. 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) {
  9029. return __ccgo_fp(__XftSmoothGlyphGray565)
  9030. }
  9031. 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) {
  9032. return __ccgo_fp(__XftSmoothGlyphGray555)
  9033. }
  9034. default:
  9035. break
  9036. }
  9037. return __ccgo_fp(__XftSmoothGlyphGray)
  9038. }
  9039. }
  9040. return r
  9041. }
  9042. func __XftGlyphDefault(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  9043. bp := tls.Alloc(1040)
  9044. defer tls.Free(1040)
  9045. var font uintptr
  9046. var glyphs_loaded TFcBool
  9047. var _ /* missing at bp+0 */ [256]TFT_UInt
  9048. var _ /* nmissing at bp+1024 */ int32
  9049. _, _ = font, glyphs_loaded
  9050. font = public
  9051. glyphs_loaded = m_FcFalse
  9052. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), uint32(0), bp, bp+1024) != 0 {
  9053. glyphs_loaded = int32(m_FcTrue)
  9054. }
  9055. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9056. XXftFontLoadGlyphs(tls, dpy, public, glyphs_loaded, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9057. }
  9058. return *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs))
  9059. }
  9060. func _XftGetImageErrorHandler(tls *libc.TLS, dpy uintptr, error_event uintptr) (r int32) {
  9061. return 0
  9062. }
  9063. func XXftGlyphCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  9064. bp := tls.Alloc(1168)
  9065. defer tls.Free(1168)
  9066. var depth, v3 uint32
  9067. var dpy, font, g, image, xftg, v10, v11, v2, v6, v7 uintptr
  9068. var gc TGC
  9069. var glyph TFT_UInt
  9070. var glyphs_loaded TFcBool
  9071. var n, ox, oy, v1, v5, v9 int32
  9072. var pix TPixmap
  9073. var prev_error TXErrorHandler
  9074. var sharp TXftSharpGlyph
  9075. var smooth TXftSmoothGlyph
  9076. var v12, v4, v8 bool
  9077. var _ /* gcv at bp+1040 */ TXGCValues
  9078. var _ /* gi at bp+1028 */ TXGlyphInfo
  9079. var _ /* missing at bp+0 */ [256]TFT_UInt
  9080. var _ /* nmissing at bp+1024 */ int32
  9081. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9082. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9083. font = public
  9084. /*
  9085. * Load missing glyphs
  9086. */
  9087. g = glyphs
  9088. n = nglyphs
  9089. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9090. glyphs_loaded = m_FcFalse
  9091. for {
  9092. v1 = n
  9093. n--
  9094. if !(v1 != 0) {
  9095. break
  9096. }
  9097. v2 = g
  9098. g += 4
  9099. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  9100. glyphs_loaded = int32(m_FcTrue)
  9101. }
  9102. }
  9103. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9104. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9105. }
  9106. g = glyphs
  9107. n = nglyphs
  9108. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9109. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9110. XXftGlyphExtents(tls, dpy, public, glyphs, nglyphs, bp+1028)
  9111. if !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth != 0) || !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight != 0) {
  9112. goto bail1
  9113. }
  9114. ox = x - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9115. oy = y - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9116. /*
  9117. * Try to get bits directly from the drawable; if that fails,
  9118. * use a temporary pixmap. When it does fail, assume it
  9119. * will probably fail for a while and keep using temporary
  9120. * pixmaps for a while to avoid double round trips.
  9121. */
  9122. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9123. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9124. 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))
  9125. libx11.XXSetErrorHandler(tls, prev_error)
  9126. if !(image != 0) {
  9127. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9128. }
  9129. } else {
  9130. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9131. image = libc.UintptrFromInt32(0)
  9132. }
  9133. if v4 = !(image != 0); v4 {
  9134. v3 = XXftDrawDepth(tls, draw)
  9135. depth = v3
  9136. }
  9137. if v4 && v3 != 0 {
  9138. 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)
  9139. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9140. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9141. 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)
  9142. libx11.XXFreeGC(tls, dpy, gc)
  9143. 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))
  9144. libx11.XXFreePixmap(tls, dpy, pix)
  9145. }
  9146. if !(image != 0) {
  9147. goto bail1
  9148. }
  9149. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9150. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9151. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9152. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9153. XXftSwapImage(tls, image)
  9154. }
  9155. for {
  9156. v5 = n
  9157. n--
  9158. if !(v5 != 0) {
  9159. break
  9160. }
  9161. v6 = g
  9162. g += 4
  9163. glyph = *(*TFT_UInt)(unsafe.Pointer(v6))
  9164. if v8 = glyph >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v8 {
  9165. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9166. xftg = v7
  9167. }
  9168. if v8 || !(v7 != 0) {
  9169. xftg = __XftGlyphDefault(tls, dpy, public)
  9170. }
  9171. if xftg != 0 {
  9172. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, x-ox, y-oy, color)
  9173. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9174. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9175. }
  9176. }
  9177. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9178. XXftSwapImage(tls, image)
  9179. }
  9180. 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))
  9181. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9182. } else {
  9183. sharp = __XftSharpGlyphFind(tls, draw, public)
  9184. for {
  9185. v9 = n
  9186. n--
  9187. if !(v9 != 0) {
  9188. break
  9189. }
  9190. v10 = g
  9191. g += 4
  9192. glyph = *(*TFT_UInt)(unsafe.Pointer(v10))
  9193. if v12 = glyph >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v12 {
  9194. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9195. xftg = v11
  9196. }
  9197. if v12 || !(v11 != 0) {
  9198. xftg = __XftGlyphDefault(tls, dpy, public)
  9199. }
  9200. if xftg != 0 {
  9201. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, x, y)
  9202. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9203. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9204. }
  9205. }
  9206. }
  9207. goto bail1
  9208. bail1:
  9209. ;
  9210. if glyphs_loaded != 0 {
  9211. X_XftFontManageMemory(tls, dpy, public)
  9212. }
  9213. }
  9214. func XXftGlyphSpecCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, glyphs uintptr, nglyphs int32) {
  9215. bp := tls.Alloc(1168)
  9216. defer tls.Free(1168)
  9217. var depth, v5 uint32
  9218. var dpy, font, image, xftg, v11, v8 uintptr
  9219. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9220. var gc TGC
  9221. var glyph, glyph1 TFT_UInt
  9222. var glyphs_loaded TFcBool
  9223. var pix TPixmap
  9224. var prev_error TXErrorHandler
  9225. var sharp TXftSharpGlyph
  9226. var smooth TXftSmoothGlyph
  9227. var v12, v6, v9 bool
  9228. var _ /* gcv at bp+1040 */ TXGCValues
  9229. var _ /* gi at bp+1028 */ TXGlyphInfo
  9230. var _ /* missing at bp+0 */ [256]TFT_UInt
  9231. var _ /* nmissing at bp+1024 */ int32
  9232. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9233. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9234. font = public
  9235. /*
  9236. * Load missing glyphs
  9237. */
  9238. glyphs_loaded = m_FcFalse
  9239. v3 = libc.Int32FromInt32(0)
  9240. y2 = v3
  9241. v2 = v3
  9242. x2 = v2
  9243. v1 = v2
  9244. y1 = v1
  9245. x1 = v1
  9246. i = 0
  9247. for {
  9248. if !(i < nglyphs) {
  9249. break
  9250. }
  9251. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9252. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph, bp, bp+1024) != 0 {
  9253. glyphs_loaded = int32(m_FcTrue)
  9254. }
  9255. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9256. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9257. }
  9258. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*8, int32(1), bp+1028)
  9259. g_x1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9260. g_y1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9261. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9262. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9263. if i != 0 {
  9264. if g_x1 < x1 {
  9265. x1 = g_x1
  9266. }
  9267. if g_y1 < y1 {
  9268. y1 = g_y1
  9269. }
  9270. if g_x2 > x2 {
  9271. x2 = g_x2
  9272. }
  9273. if g_y2 > y2 {
  9274. y2 = g_y2
  9275. }
  9276. } else {
  9277. x1 = g_x1
  9278. y1 = g_y1
  9279. x2 = g_x2
  9280. y2 = g_y2
  9281. }
  9282. goto _4
  9283. _4:
  9284. ;
  9285. i++
  9286. }
  9287. if x1 == x2 || y1 == y2 {
  9288. goto bail1
  9289. }
  9290. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9291. width = x2 - x1
  9292. height = y2 - y1
  9293. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9294. /*
  9295. * Try to get bits directly from the drawable; if that fails,
  9296. * use a temporary pixmap. When it does fail, assume it
  9297. * will probably fail for a while and keep using temporary
  9298. * pixmaps for a while to avoid double round trips.
  9299. */
  9300. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9301. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9302. 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))
  9303. libx11.XXSetErrorHandler(tls, prev_error)
  9304. if !(image != 0) {
  9305. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9306. }
  9307. } else {
  9308. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9309. image = libc.UintptrFromInt32(0)
  9310. }
  9311. if v6 = !(image != 0); v6 {
  9312. v5 = XXftDrawDepth(tls, draw)
  9313. depth = v5
  9314. }
  9315. if v6 && v5 != 0 {
  9316. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9317. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9318. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9319. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9320. libx11.XXFreeGC(tls, dpy, gc)
  9321. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9322. libx11.XXFreePixmap(tls, dpy, pix)
  9323. }
  9324. if !(image != 0) {
  9325. goto bail1
  9326. }
  9327. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9328. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9329. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9330. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9331. XXftSwapImage(tls, image)
  9332. }
  9333. i = 0
  9334. for {
  9335. if !(i < nglyphs) {
  9336. break
  9337. }
  9338. glyph = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9339. if v9 = glyph >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v9 {
  9340. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9341. xftg = v8
  9342. }
  9343. if v9 || !(v8 != 0) {
  9344. xftg = __XftGlyphDefault(tls, dpy, public)
  9345. }
  9346. if xftg != 0 {
  9347. (*(*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)
  9348. }
  9349. goto _7
  9350. _7:
  9351. ;
  9352. i++
  9353. }
  9354. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9355. XXftSwapImage(tls, image)
  9356. }
  9357. 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))
  9358. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9359. } else {
  9360. sharp = __XftSharpGlyphFind(tls, draw, public)
  9361. i = 0
  9362. for {
  9363. if !(i < nglyphs) {
  9364. break
  9365. }
  9366. glyph1 = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9367. if v12 = glyph1 >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v12 {
  9368. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph1)*8))
  9369. xftg = v11
  9370. }
  9371. if v12 || !(v11 != 0) {
  9372. xftg = __XftGlyphDefault(tls, dpy, public)
  9373. }
  9374. if xftg != 0 {
  9375. (*(*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))
  9376. }
  9377. goto _10
  9378. _10:
  9379. ;
  9380. i++
  9381. }
  9382. }
  9383. goto bail1
  9384. bail1:
  9385. ;
  9386. if glyphs_loaded != 0 {
  9387. X_XftFontManageMemory(tls, dpy, public)
  9388. }
  9389. }
  9390. func XXftGlyphFontSpecCore(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, nglyphs int32) {
  9391. bp := tls.Alloc(1168)
  9392. defer tls.Free(1168)
  9393. var depth, v6 uint32
  9394. var dpy, font, font1, image, public, public1, public2, xftg, v12, v9 uintptr
  9395. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9396. var gc TGC
  9397. var glyph, glyph1 TFT_UInt
  9398. var glyphs_loaded TFcBool
  9399. var pix TPixmap
  9400. var prev_error TXErrorHandler
  9401. var sharp TXftSharpGlyph
  9402. var smooth TXftSmoothGlyph
  9403. var t int16
  9404. var v10, v13, v7 bool
  9405. var _ /* gcv at bp+1040 */ TXGCValues
  9406. var _ /* gi at bp+1028 */ TXGlyphInfo
  9407. var _ /* missing at bp+0 */ [256]TFT_UInt
  9408. var _ /* nmissing at bp+1024 */ int32
  9409. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9410. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9411. /*
  9412. * Load missing glyphs
  9413. */
  9414. glyphs_loaded = m_FcFalse
  9415. v3 = libc.Int32FromInt32(0)
  9416. y2 = v3
  9417. v2 = v3
  9418. x2 = v2
  9419. v1 = v2
  9420. y1 = v1
  9421. x1 = v1
  9422. i = 0
  9423. for {
  9424. if !(i < nglyphs) {
  9425. break
  9426. }
  9427. public = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9428. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9429. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph, bp, bp+1024) != 0 {
  9430. glyphs_loaded = int32(m_FcTrue)
  9431. }
  9432. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9433. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9434. }
  9435. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*16+8, int32(1), bp+1028)
  9436. g_x1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9437. g_y1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9438. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9439. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9440. if i != 0 {
  9441. if g_x1 < x1 {
  9442. if g_x1 < 0 {
  9443. /* do nothing if the given glyphs are out of range */
  9444. 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))
  9445. if int32(t) < 0 && int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*16))).Fx) > 0 {
  9446. goto bail1
  9447. }
  9448. }
  9449. x1 = g_x1
  9450. }
  9451. if g_y1 < y1 {
  9452. y1 = g_y1
  9453. }
  9454. if g_x2 > x2 {
  9455. x2 = g_x2
  9456. }
  9457. if g_y2 > y2 {
  9458. y2 = g_y2
  9459. }
  9460. } else {
  9461. x1 = g_x1
  9462. y1 = g_y1
  9463. x2 = g_x2
  9464. y2 = g_y2
  9465. }
  9466. goto _4
  9467. _4:
  9468. ;
  9469. i++
  9470. }
  9471. if x1 == x2 || y1 == y2 {
  9472. goto bail1
  9473. }
  9474. i = 0
  9475. for {
  9476. if !(i < nglyphs) {
  9477. break
  9478. }
  9479. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Finfo.Fantialias != 0 {
  9480. break
  9481. }
  9482. goto _5
  9483. _5:
  9484. ;
  9485. i++
  9486. }
  9487. if (i != nglyphs || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9488. width = x2 - x1
  9489. height = y2 - y1
  9490. /*
  9491. * Try to get bits directly from the drawable; if that fails,
  9492. * use a temporary pixmap. When it does fail, assume it
  9493. * will probably fail for a while and keep using temporary
  9494. * pixmaps for a while to avoid double round trips.
  9495. */
  9496. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9497. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9498. 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))
  9499. libx11.XXSetErrorHandler(tls, prev_error)
  9500. if !(image != 0) {
  9501. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9502. }
  9503. } else {
  9504. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9505. image = libc.UintptrFromInt32(0)
  9506. }
  9507. if v7 = !(image != 0); v7 {
  9508. v6 = XXftDrawDepth(tls, draw)
  9509. depth = v6
  9510. }
  9511. if v7 && v6 != 0 {
  9512. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9513. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9514. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9515. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9516. libx11.XXFreeGC(tls, dpy, gc)
  9517. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9518. libx11.XXFreePixmap(tls, dpy, pix)
  9519. }
  9520. if !(image != 0) {
  9521. goto bail1
  9522. }
  9523. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9524. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9525. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9526. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9527. XXftSwapImage(tls, image)
  9528. }
  9529. i = 0
  9530. for {
  9531. if !(i < nglyphs) {
  9532. break
  9533. }
  9534. public1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9535. font = public1
  9536. smooth = __XftSmoothGlyphFind(tls, draw, public1)
  9537. glyph = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9538. if v10 = glyph >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v10 {
  9539. v9 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9540. xftg = v9
  9541. }
  9542. if v10 || !(v9 != 0) {
  9543. xftg = __XftGlyphDefault(tls, dpy, public1)
  9544. }
  9545. if xftg != 0 {
  9546. (*(*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)
  9547. }
  9548. goto _8
  9549. _8:
  9550. ;
  9551. i++
  9552. }
  9553. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9554. XXftSwapImage(tls, image)
  9555. }
  9556. 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))
  9557. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9558. } else {
  9559. i = 0
  9560. for {
  9561. if !(i < nglyphs) {
  9562. break
  9563. }
  9564. public2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9565. font1 = public2
  9566. sharp = __XftSharpGlyphFind(tls, draw, public2)
  9567. glyph1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9568. if v13 = glyph1 >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs); !v13 {
  9569. v12 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(glyph1)*8))
  9570. xftg = v12
  9571. }
  9572. if v13 || !(v12 != 0) {
  9573. xftg = __XftGlyphDefault(tls, dpy, public2)
  9574. }
  9575. if xftg != 0 {
  9576. (*(*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))
  9577. }
  9578. goto _11
  9579. _11:
  9580. ;
  9581. i++
  9582. }
  9583. }
  9584. goto bail1
  9585. bail1:
  9586. ;
  9587. if glyphs_loaded != 0 {
  9588. i = 0
  9589. for {
  9590. if !(i < nglyphs) {
  9591. break
  9592. }
  9593. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  9594. goto _14
  9595. _14:
  9596. ;
  9597. i++
  9598. }
  9599. }
  9600. }
  9601. /* xftxlfd.c */
  9602. func XXftDebug(tls *libc.TLS) (r int32) {
  9603. bp := tls.Alloc(16)
  9604. defer tls.Free(16)
  9605. var e uintptr
  9606. _ = e
  9607. if !(_initialized != 0) {
  9608. _initialized = int32(1)
  9609. e = libc.Xgetenv(tls, __ccgo_ts)
  9610. if e != 0 {
  9611. libc.Xprintf(tls, __ccgo_ts+10, libc.VaList(bp+8, e))
  9612. _debug = libc.Xatoi(tls, e)
  9613. if _debug <= 0 {
  9614. _debug = int32(1)
  9615. }
  9616. }
  9617. }
  9618. return _debug
  9619. }
  9620. var _initialized int32
  9621. var _debug int32
  9622. func __XftCloseDisplay(tls *libc.TLS, dpy uintptr, codes uintptr) (r int32) {
  9623. var info, prev, v2 uintptr
  9624. _, _, _ = info, prev, v2
  9625. info = X_XftDisplayInfoGet(tls, dpy, m_FcFalse)
  9626. if !(info != 0) {
  9627. return 0
  9628. }
  9629. /*
  9630. * Get rid of any dangling unreferenced fonts
  9631. */
  9632. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = 0
  9633. XXftFontManageMemory(tls, dpy)
  9634. /*
  9635. * Clean up the default values
  9636. */
  9637. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  9638. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  9639. }
  9640. /*
  9641. * Unhook from the global list
  9642. */
  9643. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9644. for {
  9645. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9646. info = v2
  9647. if !(v2 != 0) {
  9648. break
  9649. }
  9650. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9651. break
  9652. }
  9653. goto _1
  9654. _1:
  9655. ;
  9656. prev = *(*uintptr)(unsafe.Pointer(prev))
  9657. }
  9658. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9659. libc.Xfree(tls, info)
  9660. return 0
  9661. }
  9662. func X_XftDisplayInfoGet(tls *libc.TLS, dpy uintptr, createIfNecessary TFcBool) (r uintptr) {
  9663. bp := tls.Alloc(96)
  9664. defer tls.Free(96)
  9665. var format, info, prev, visual, v2, v3 uintptr
  9666. var i int32
  9667. var _ /* error_base at bp+44 */ int32
  9668. var _ /* event_base at bp+40 */ int32
  9669. var _ /* major at bp+48 */ int32
  9670. var _ /* minor at bp+52 */ int32
  9671. var _ /* pf at bp+0 */ TXRenderPictFormat
  9672. _, _, _, _, _, _, _ = format, i, info, prev, visual, v2, v3
  9673. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9674. for {
  9675. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9676. info = v2
  9677. if !(v2 != 0) {
  9678. break
  9679. }
  9680. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9681. /*
  9682. * MRU the list
  9683. */
  9684. if prev != uintptr(unsafe.Pointer(&X_XftDisplayInfo)) {
  9685. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9686. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  9687. X_XftDisplayInfo = info
  9688. }
  9689. return info
  9690. }
  9691. goto _1
  9692. _1:
  9693. ;
  9694. prev = *(*uintptr)(unsafe.Pointer(prev))
  9695. }
  9696. if !(createIfNecessary != 0) {
  9697. return libc.UintptrFromInt32(0)
  9698. }
  9699. info = libc.Xmalloc(tls, uint64(1488))
  9700. if !(info != 0) {
  9701. goto bail0
  9702. }
  9703. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes = libx11.XXAddExtension(tls, dpy)
  9704. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes != 0) {
  9705. goto bail1
  9706. }
  9707. libx11.XXESetCloseDisplay(tls, dpy, (*TXExtCodes)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes)).Fextension, __ccgo_fp(__XftCloseDisplay))
  9708. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay = dpy
  9709. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = libc.UintptrFromInt32(0)
  9710. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libc.UintptrFromInt32(0)
  9711. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender = libc.BoolInt32(libxrender.XXRenderQueryExtension(tls, dpy, bp+40, bp+44) != 0 && libxrender.XXRenderFindVisualFormat(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  9712. Fext_data uintptr
  9713. Fprivate1 uintptr
  9714. Ffd int32
  9715. Fprivate2 int32
  9716. Fproto_major_version int32
  9717. Fproto_minor_version int32
  9718. Fvendor uintptr
  9719. Fprivate3 TXID
  9720. Fprivate4 TXID
  9721. Fprivate5 TXID
  9722. Fprivate6 int32
  9723. Fresource_alloc uintptr
  9724. Fbyte_order int32
  9725. Fbitmap_unit int32
  9726. Fbitmap_pad int32
  9727. Fbitmap_bit_order int32
  9728. Fnformats int32
  9729. Fpixmap_format uintptr
  9730. Fprivate8 int32
  9731. Frelease int32
  9732. Fprivate9 uintptr
  9733. Fprivate10 uintptr
  9734. Fqlen int32
  9735. Flast_request_read uint64
  9736. Frequest uint64
  9737. Fprivate11 TXPointer
  9738. Fprivate12 TXPointer
  9739. Fprivate13 TXPointer
  9740. Fprivate14 TXPointer
  9741. Fmax_request_size uint32
  9742. Fdb uintptr
  9743. Fprivate15 uintptr
  9744. Fdisplay_name uintptr
  9745. Fdefault_screen int32
  9746. Fnscreens int32
  9747. Fscreens uintptr
  9748. Fmotion_buffer uint64
  9749. Fprivate16 uint64
  9750. Fmin_keycode int32
  9751. Fmax_keycode int32
  9752. Fprivate17 TXPointer
  9753. Fprivate18 TXPointer
  9754. Fprivate19 int32
  9755. Fxdefaults uintptr
  9756. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  9757. Fext_data uintptr
  9758. Fprivate1 uintptr
  9759. Ffd int32
  9760. Fprivate2 int32
  9761. Fproto_major_version int32
  9762. Fproto_minor_version int32
  9763. Fvendor uintptr
  9764. Fprivate3 TXID
  9765. Fprivate4 TXID
  9766. Fprivate5 TXID
  9767. Fprivate6 int32
  9768. Fresource_alloc uintptr
  9769. Fbyte_order int32
  9770. Fbitmap_unit int32
  9771. Fbitmap_pad int32
  9772. Fbitmap_bit_order int32
  9773. Fnformats int32
  9774. Fpixmap_format uintptr
  9775. Fprivate8 int32
  9776. Frelease int32
  9777. Fprivate9 uintptr
  9778. Fprivate10 uintptr
  9779. Fqlen int32
  9780. Flast_request_read uint64
  9781. Frequest uint64
  9782. Fprivate11 TXPointer
  9783. Fprivate12 TXPointer
  9784. Fprivate13 TXPointer
  9785. Fprivate14 TXPointer
  9786. Fmax_request_size uint32
  9787. Fdb uintptr
  9788. Fprivate15 uintptr
  9789. Fdisplay_name uintptr
  9790. Fdefault_screen int32
  9791. Fnscreens int32
  9792. Fscreens uintptr
  9793. Fmotion_buffer uint64
  9794. Fprivate16 uint64
  9795. Fmin_keycode int32
  9796. Fmax_keycode int32
  9797. Fprivate17 TXPointer
  9798. Fprivate18 TXPointer
  9799. Fprivate19 int32
  9800. Fxdefaults uintptr
  9801. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual) != libc.UintptrFromInt32(0))
  9802. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = int32(m_FcTrue)
  9803. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  9804. libxrender.XXRenderQueryVersion(tls, dpy, bp+48, bp+52)
  9805. if *(*int32)(unsafe.Pointer(bp + 48)) < 0 || *(*int32)(unsafe.Pointer(bp + 48)) == 0 && *(*int32)(unsafe.Pointer(bp + 52)) <= int32(2) {
  9806. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = m_FcFalse
  9807. }
  9808. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  9809. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = int32(32)
  9810. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FredMask = int16(0xff)
  9811. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FgreenMask = int16(0xff)
  9812. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FblueMask = int16(0xff)
  9813. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(0xff)
  9814. (*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)
  9815. }
  9816. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  9817. visual = (*TScreen)(unsafe.Pointer((*struct {
  9818. Fext_data uintptr
  9819. Fprivate1 uintptr
  9820. Ffd int32
  9821. Fprivate2 int32
  9822. Fproto_major_version int32
  9823. Fproto_minor_version int32
  9824. Fvendor uintptr
  9825. Fprivate3 TXID
  9826. Fprivate4 TXID
  9827. Fprivate5 TXID
  9828. Fprivate6 int32
  9829. Fresource_alloc uintptr
  9830. Fbyte_order int32
  9831. Fbitmap_unit int32
  9832. Fbitmap_pad int32
  9833. Fbitmap_bit_order int32
  9834. Fnformats int32
  9835. Fpixmap_format uintptr
  9836. Fprivate8 int32
  9837. Frelease int32
  9838. Fprivate9 uintptr
  9839. Fprivate10 uintptr
  9840. Fqlen int32
  9841. Flast_request_read uint64
  9842. Frequest uint64
  9843. Fprivate11 TXPointer
  9844. Fprivate12 TXPointer
  9845. Fprivate13 TXPointer
  9846. Fprivate14 TXPointer
  9847. Fmax_request_size uint32
  9848. Fdb uintptr
  9849. Fprivate15 uintptr
  9850. Fdisplay_name uintptr
  9851. Fdefault_screen int32
  9852. Fnscreens int32
  9853. Fscreens uintptr
  9854. Fmotion_buffer uint64
  9855. Fprivate16 uint64
  9856. Fmin_keycode int32
  9857. Fmax_keycode int32
  9858. Fprivate17 TXPointer
  9859. Fprivate18 TXPointer
  9860. Fprivate19 int32
  9861. Fxdefaults uintptr
  9862. })(unsafe.Pointer(dpy)).Fscreens + uintptr((*struct {
  9863. Fext_data uintptr
  9864. Fprivate1 uintptr
  9865. Ffd int32
  9866. Fprivate2 int32
  9867. Fproto_major_version int32
  9868. Fproto_minor_version int32
  9869. Fvendor uintptr
  9870. Fprivate3 TXID
  9871. Fprivate4 TXID
  9872. Fprivate5 TXID
  9873. Fprivate6 int32
  9874. Fresource_alloc uintptr
  9875. Fbyte_order int32
  9876. Fbitmap_unit int32
  9877. Fbitmap_pad int32
  9878. Fbitmap_bit_order int32
  9879. Fnformats int32
  9880. Fpixmap_format uintptr
  9881. Fprivate8 int32
  9882. Frelease int32
  9883. Fprivate9 uintptr
  9884. Fprivate10 uintptr
  9885. Fqlen int32
  9886. Flast_request_read uint64
  9887. Frequest uint64
  9888. Fprivate11 TXPointer
  9889. Fprivate12 TXPointer
  9890. Fprivate13 TXPointer
  9891. Fprivate14 TXPointer
  9892. Fmax_request_size uint32
  9893. Fdb uintptr
  9894. Fprivate15 uintptr
  9895. Fdisplay_name uintptr
  9896. Fdefault_screen int32
  9897. Fnscreens int32
  9898. Fscreens uintptr
  9899. Fmotion_buffer uint64
  9900. Fprivate16 uint64
  9901. Fmin_keycode int32
  9902. Fmax_keycode int32
  9903. Fprivate17 TXPointer
  9904. Fprivate18 TXPointer
  9905. Fprivate19 int32
  9906. Fxdefaults uintptr
  9907. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual
  9908. format = libxrender.XXRenderFindVisualFormat(tls, dpy, visual)
  9909. libc.Xprintf(tls, __ccgo_ts+24, libc.VaList(bp+64, libc.Int32FromUint64((*TVisual)(unsafe.Pointer(visual)).Fvisualid)))
  9910. if format != 0 {
  9911. if (*TXRenderPictFormat)(unsafe.Pointer(format)).Ftype1 == int32(m_PictTypeDirect) {
  9912. 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)))
  9913. } else {
  9914. libc.Xprintf(tls, __ccgo_ts+83, 0)
  9915. }
  9916. } else {
  9917. libc.Xprintf(tls, __ccgo_ts+99, 0)
  9918. }
  9919. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  9920. v3 = __ccgo_ts + 136
  9921. } else {
  9922. v3 = __ccgo_ts + 141
  9923. }
  9924. libc.Xprintf(tls, __ccgo_ts+147, libc.VaList(bp+64, v3))
  9925. }
  9926. i = 0
  9927. for {
  9928. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  9929. break
  9930. }
  9931. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = -int32(1)
  9932. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  9933. goto _4
  9934. _4:
  9935. ;
  9936. i++
  9937. }
  9938. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = libc.UintptrFromInt32(0)
  9939. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  9940. X_XftDisplayInfo = info
  9941. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory = uint64(0)
  9942. (*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)))
  9943. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  9944. libc.Xprintf(tls, __ccgo_ts+216, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  9945. }
  9946. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts = 0
  9947. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, int32(m_XFT_DPY_MAX_UNREF_FONTS))
  9948. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  9949. libc.Xprintf(tls, __ccgo_ts+259, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  9950. }
  9951. libc.Xmemset(tls, info+472, int32('\000'), libc.Uint64FromInt64(8)*libc.Uint64FromInt32(m_XFT_NUM_FONT_HASH))
  9952. return info
  9953. goto bail1
  9954. bail1:
  9955. ;
  9956. libc.Xfree(tls, info)
  9957. goto bail0
  9958. bail0:
  9959. ;
  9960. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  9961. libc.Xprintf(tls, __ccgo_ts+286, 0)
  9962. }
  9963. return libc.UintptrFromInt32(0)
  9964. }
  9965. /*
  9966. * Reduce memory usage in X server
  9967. */
  9968. func __XftDisplayValidateMemory(tls *libc.TLS, info uintptr) {
  9969. bp := tls.Alloc(32)
  9970. defer tls.Free(32)
  9971. var font, public uintptr
  9972. var glyph_memory uint64
  9973. _, _, _ = font, glyph_memory, public
  9974. glyph_memory = uint64(0)
  9975. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  9976. for {
  9977. if !(public != 0) {
  9978. break
  9979. }
  9980. font = public
  9981. glyph_memory += (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  9982. goto _1
  9983. _1:
  9984. ;
  9985. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  9986. }
  9987. if glyph_memory != (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory {
  9988. libc.Xprintf(tls, __ccgo_ts+339, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, glyph_memory))
  9989. }
  9990. }
  9991. func X_XftDisplayManageMemory(tls *libc.TLS, dpy uintptr) {
  9992. bp := tls.Alloc(32)
  9993. defer tls.Free(32)
  9994. var font, info, public uintptr
  9995. var glyph_memory uint64
  9996. _, _, _, _ = font, glyph_memory, info, public
  9997. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  9998. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  9999. return
  10000. }
  10001. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10002. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10003. libc.Xprintf(tls, __ccgo_ts+401, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10004. }
  10005. __XftDisplayValidateMemory(tls, info)
  10006. }
  10007. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10008. glyph_memory = libc.Uint64FromInt32(libc.Xrand(tls)) % (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory
  10009. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10010. for public != 0 {
  10011. font = public
  10012. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > glyph_memory {
  10013. X_XftFontUncacheGlyph(tls, dpy, public)
  10014. break
  10015. }
  10016. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10017. glyph_memory -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10018. }
  10019. }
  10020. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10021. __XftDisplayValidateMemory(tls, info)
  10022. }
  10023. }
  10024. func XXftDefaultHasRender(tls *libc.TLS, dpy uintptr) (r int32) {
  10025. var info uintptr
  10026. _ = info
  10027. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10028. if !(info != 0) {
  10029. return m_False
  10030. }
  10031. return (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  10032. }
  10033. func XXftDefaultSet(tls *libc.TLS, dpy uintptr, defaults uintptr) (r int32) {
  10034. var info uintptr
  10035. _ = info
  10036. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10037. if !(info != 0) {
  10038. return m_False
  10039. }
  10040. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  10041. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  10042. }
  10043. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = defaults
  10044. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10045. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint64FromInt32(libc.Int32FromInt32(4) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  10046. }
  10047. (*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)))
  10048. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts != 0) {
  10049. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = int32(m_XFT_DPY_MAX_UNREF_FONTS)
  10050. }
  10051. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts)
  10052. return int32(m_True)
  10053. }
  10054. func XXftDefaultParseBool(tls *libc.TLS, v uintptr) (r int32) {
  10055. var c0, c1 uint8
  10056. _, _ = c0, c1
  10057. c0 = *(*uint8)(unsafe.Pointer(v))
  10058. if libc.BoolInt32(libc.Uint32FromInt32(libc.Int32FromUint8(c0))-uint32('A') < uint32(26)) != 0 {
  10059. c0 = libc.Uint8FromInt32(libc.Xtolower(tls, libc.Int32FromUint8(c0)))
  10060. }
  10061. if libc.Int32FromUint8(c0) == int32('t') || libc.Int32FromUint8(c0) == int32('y') || libc.Int32FromUint8(c0) == int32('1') {
  10062. return int32(1)
  10063. }
  10064. if libc.Int32FromUint8(c0) == int32('f') || libc.Int32FromUint8(c0) == int32('n') || libc.Int32FromUint8(c0) == int32('0') {
  10065. return 0
  10066. }
  10067. if libc.Int32FromUint8(c0) == int32('o') {
  10068. c1 = *(*uint8)(unsafe.Pointer(v + 1))
  10069. if libc.BoolInt32(libc.Uint32FromInt32(libc.Int32FromUint8(c1))-uint32('A') < uint32(26)) != 0 {
  10070. c1 = libc.Uint8FromInt32(libc.Xtolower(tls, libc.Int32FromUint8(c1)))
  10071. }
  10072. if libc.Int32FromUint8(c1) == int32('n') {
  10073. return int32(1)
  10074. }
  10075. if libc.Int32FromUint8(c1) == int32('f') {
  10076. return 0
  10077. }
  10078. }
  10079. return -int32(1)
  10080. }
  10081. func __XftDefaultInitBool(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10082. var i, v1 int32
  10083. var v uintptr
  10084. var v2 bool
  10085. _, _, _, _ = i, v, v1, v2
  10086. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+439, option)
  10087. if v2 = v != 0; v2 {
  10088. v1 = XXftDefaultParseBool(tls, v)
  10089. i = v1
  10090. }
  10091. if v2 && v1 >= 0 {
  10092. return libfontconfig.XFcPatternAddBool(tls, pat, option, libc.BoolInt32(i != 0))
  10093. }
  10094. return int32(m_True)
  10095. }
  10096. func __XftDefaultInitDouble(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10097. bp := tls.Alloc(16)
  10098. defer tls.Free(16)
  10099. var d float64
  10100. var v uintptr
  10101. var _ /* e at bp+0 */ uintptr
  10102. _, _ = d, v
  10103. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+439, option)
  10104. if v != 0 {
  10105. d = libc.Xstrtod(tls, v, bp)
  10106. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10107. return libfontconfig.XFcPatternAddDouble(tls, pat, option, d)
  10108. }
  10109. }
  10110. return int32(m_True)
  10111. }
  10112. func __XftDefaultInitInteger(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10113. bp := tls.Alloc(16)
  10114. defer tls.Free(16)
  10115. var v uintptr
  10116. var _ /* e at bp+0 */ uintptr
  10117. var _ /* i at bp+8 */ int32
  10118. _ = v
  10119. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+439, option)
  10120. if v != 0 {
  10121. if libfontconfig.XFcNameConstant(tls, v, bp+8) != 0 {
  10122. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10123. }
  10124. *(*int32)(unsafe.Pointer(bp + 8)) = int32(libc.Xstrtol(tls, v, bp, 0))
  10125. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10126. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10127. }
  10128. }
  10129. return int32(m_True)
  10130. }
  10131. func __XftDefaultInit(tls *libc.TLS, dpy uintptr) (r uintptr) {
  10132. var pat uintptr
  10133. _ = pat
  10134. pat = libfontconfig.XFcPatternCreate(tls)
  10135. if !(pat != 0) {
  10136. goto bail0
  10137. }
  10138. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+443) != 0) {
  10139. goto bail1
  10140. }
  10141. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+449) != 0) {
  10142. goto bail1
  10143. }
  10144. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+453) != 0) {
  10145. goto bail1
  10146. }
  10147. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+460) != 0) {
  10148. goto bail1
  10149. }
  10150. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+465) != 0) {
  10151. goto bail1
  10152. }
  10153. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+475) != 0) {
  10154. goto bail1
  10155. }
  10156. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+485) != 0) {
  10157. goto bail1
  10158. }
  10159. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+494) != 0) {
  10160. goto bail1
  10161. }
  10162. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+503) != 0) {
  10163. goto bail1
  10164. }
  10165. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+513) != 0) {
  10166. goto bail1
  10167. }
  10168. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+521) != 0) {
  10169. goto bail1
  10170. }
  10171. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+201) != 0) {
  10172. goto bail1
  10173. }
  10174. return pat
  10175. goto bail1
  10176. bail1:
  10177. ;
  10178. libfontconfig.XFcPatternDestroy(tls, pat)
  10179. goto bail0
  10180. bail0:
  10181. ;
  10182. return libc.UintptrFromInt32(0)
  10183. return r
  10184. }
  10185. func __XftDefaultGet(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, v uintptr) (r1 TFcResult) {
  10186. var info uintptr
  10187. var r TFcResult
  10188. _, _ = info, r
  10189. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10190. if !(info != 0) {
  10191. return int32(_FcResultNoMatch)
  10192. }
  10193. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10194. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = __XftDefaultInit(tls, dpy)
  10195. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10196. return int32(_FcResultNoMatch)
  10197. }
  10198. }
  10199. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, screen, v)
  10200. if r == int32(_FcResultNoId) && screen > 0 {
  10201. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, 0, v)
  10202. }
  10203. return r
  10204. }
  10205. func XXftDefaultGetBool(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10206. bp := tls.Alloc(16)
  10207. defer tls.Free(16)
  10208. var r TFcResult
  10209. var _ /* v at bp+0 */ TFcValue
  10210. _ = r
  10211. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10212. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeBool) {
  10213. return def
  10214. }
  10215. return *(*TFcBool)(unsafe.Pointer(bp + 8))
  10216. }
  10217. func XXftDefaultGetInteger(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10218. bp := tls.Alloc(16)
  10219. defer tls.Free(16)
  10220. var r TFcResult
  10221. var _ /* v at bp+0 */ TFcValue
  10222. _ = r
  10223. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10224. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeInteger) {
  10225. return def
  10226. }
  10227. return *(*int32)(unsafe.Pointer(bp + 8))
  10228. }
  10229. func XXftDefaultGetDouble(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def float64) (r1 float64) {
  10230. bp := tls.Alloc(16)
  10231. defer tls.Free(16)
  10232. var r TFcResult
  10233. var _ /* v at bp+0 */ TFcValue
  10234. _ = r
  10235. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10236. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeDouble) {
  10237. return def
  10238. }
  10239. return *(*float64)(unsafe.Pointer(bp + 8))
  10240. }
  10241. func XXftDefaultSubstitute(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr) {
  10242. bp := tls.Alloc(16)
  10243. defer tls.Free(16)
  10244. var dpi float64
  10245. var render_order, subpixel int32
  10246. var _ /* v at bp+0 */ TFcValue
  10247. _, _, _ = dpi, render_order, subpixel
  10248. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+453, 0, bp) == int32(_FcResultNoMatch) {
  10249. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+453, XXftDefaultGetBool(tls, dpy, __ccgo_ts+453, screen, XXftDefaultHasRender(tls, dpy)))
  10250. }
  10251. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+475, 0, bp) == int32(_FcResultNoMatch) {
  10252. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+475, XXftDefaultGetBool(tls, dpy, __ccgo_ts+475, screen, int32(m_True)))
  10253. }
  10254. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+485, 0, bp) == int32(_FcResultNoMatch) {
  10255. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+485, XXftDefaultGetBool(tls, dpy, __ccgo_ts+485, screen, m_False))
  10256. }
  10257. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+513, 0, bp) == int32(_FcResultNoMatch) {
  10258. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+513, XXftDefaultGetBool(tls, dpy, __ccgo_ts+513, screen, int32(m_True)))
  10259. }
  10260. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+503, 0, bp) == int32(_FcResultNoMatch) {
  10261. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+503, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+503, screen, int32(m_FC_HINT_FULL)))
  10262. }
  10263. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+494, 0, bp) == int32(_FcResultNoMatch) {
  10264. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+494, XXftDefaultGetBool(tls, dpy, __ccgo_ts+494, screen, m_False))
  10265. }
  10266. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+460, 0, bp) == int32(_FcResultNoMatch) {
  10267. subpixel = m_FC_RGBA_UNKNOWN
  10268. if XXftDefaultHasRender(tls, dpy) != 0 {
  10269. render_order = libxrender.XXRenderQuerySubpixelOrder(tls, dpy, screen)
  10270. switch render_order {
  10271. default:
  10272. fallthrough
  10273. case m_SubPixelUnknown:
  10274. subpixel = m_FC_RGBA_UNKNOWN
  10275. case int32(m_SubPixelHorizontalRGB):
  10276. subpixel = int32(m_FC_RGBA_RGB)
  10277. case int32(m_SubPixelHorizontalBGR):
  10278. subpixel = int32(m_FC_RGBA_BGR)
  10279. case int32(m_SubPixelVerticalRGB):
  10280. subpixel = int32(m_FC_RGBA_VRGB)
  10281. case int32(m_SubPixelVerticalBGR):
  10282. subpixel = int32(m_FC_RGBA_VBGR)
  10283. case int32(m_SubPixelNone):
  10284. subpixel = int32(m_FC_RGBA_NONE)
  10285. break
  10286. }
  10287. }
  10288. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+460, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+460, screen, subpixel))
  10289. }
  10290. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+465, 0, bp) == int32(_FcResultNoMatch) {
  10291. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+465, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+465, screen, int32(m_FC_LCD_DEFAULT)))
  10292. }
  10293. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+521, 0, bp) == int32(_FcResultNoMatch) {
  10294. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+521, XXftDefaultGetBool(tls, dpy, __ccgo_ts+521, screen, m_False))
  10295. }
  10296. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+449, 0, bp) == int32(_FcResultNoMatch) {
  10297. dpi = float64(float64((*TScreen)(unsafe.Pointer((*struct {
  10298. Fext_data uintptr
  10299. Fprivate1 uintptr
  10300. Ffd int32
  10301. Fprivate2 int32
  10302. Fproto_major_version int32
  10303. Fproto_minor_version int32
  10304. Fvendor uintptr
  10305. Fprivate3 TXID
  10306. Fprivate4 TXID
  10307. Fprivate5 TXID
  10308. Fprivate6 int32
  10309. Fresource_alloc uintptr
  10310. Fbyte_order int32
  10311. Fbitmap_unit int32
  10312. Fbitmap_pad int32
  10313. Fbitmap_bit_order int32
  10314. Fnformats int32
  10315. Fpixmap_format uintptr
  10316. Fprivate8 int32
  10317. Frelease int32
  10318. Fprivate9 uintptr
  10319. Fprivate10 uintptr
  10320. Fqlen int32
  10321. Flast_request_read uint64
  10322. Frequest uint64
  10323. Fprivate11 TXPointer
  10324. Fprivate12 TXPointer
  10325. Fprivate13 TXPointer
  10326. Fprivate14 TXPointer
  10327. Fmax_request_size uint32
  10328. Fdb uintptr
  10329. Fprivate15 uintptr
  10330. Fdisplay_name uintptr
  10331. Fdefault_screen int32
  10332. Fnscreens int32
  10333. Fscreens uintptr
  10334. Fmotion_buffer uint64
  10335. Fprivate16 uint64
  10336. Fmin_keycode int32
  10337. Fmax_keycode int32
  10338. Fprivate17 TXPointer
  10339. Fprivate18 TXPointer
  10340. Fprivate19 int32
  10341. Fxdefaults uintptr
  10342. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fheight)*float64(25.4)) / float64((*TScreen)(unsafe.Pointer((*struct {
  10343. Fext_data uintptr
  10344. Fprivate1 uintptr
  10345. Ffd int32
  10346. Fprivate2 int32
  10347. Fproto_major_version int32
  10348. Fproto_minor_version int32
  10349. Fvendor uintptr
  10350. Fprivate3 TXID
  10351. Fprivate4 TXID
  10352. Fprivate5 TXID
  10353. Fprivate6 int32
  10354. Fresource_alloc uintptr
  10355. Fbyte_order int32
  10356. Fbitmap_unit int32
  10357. Fbitmap_pad int32
  10358. Fbitmap_bit_order int32
  10359. Fnformats int32
  10360. Fpixmap_format uintptr
  10361. Fprivate8 int32
  10362. Frelease int32
  10363. Fprivate9 uintptr
  10364. Fprivate10 uintptr
  10365. Fqlen int32
  10366. Flast_request_read uint64
  10367. Frequest uint64
  10368. Fprivate11 TXPointer
  10369. Fprivate12 TXPointer
  10370. Fprivate13 TXPointer
  10371. Fprivate14 TXPointer
  10372. Fmax_request_size uint32
  10373. Fdb uintptr
  10374. Fprivate15 uintptr
  10375. Fdisplay_name uintptr
  10376. Fdefault_screen int32
  10377. Fnscreens int32
  10378. Fscreens uintptr
  10379. Fmotion_buffer uint64
  10380. Fprivate16 uint64
  10381. Fmin_keycode int32
  10382. Fmax_keycode int32
  10383. Fprivate17 TXPointer
  10384. Fprivate18 TXPointer
  10385. Fprivate19 int32
  10386. Fxdefaults uintptr
  10387. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fmheight)
  10388. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+449, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+449, screen, dpi))
  10389. }
  10390. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+443, 0, bp) == int32(_FcResultNoMatch) {
  10391. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+443, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+443, screen, float64(1)))
  10392. }
  10393. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+201, 0, bp) == int32(_FcResultNoMatch) {
  10394. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+201, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, screen, libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  10395. }
  10396. libfontconfig.XFcDefaultSubstitute(tls, pattern)
  10397. }
  10398. const m_VisualIDMask1 = 1
  10399. const m_VisualScreenMask1 = 2
  10400. /* xftxlfd.c */
  10401. /*
  10402. * Ok, this is a pain. To share source pictures across multiple destinations,
  10403. * the screen for each drawable must be discovered.
  10404. */
  10405. func __XftDrawScreen(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr) (r int32) {
  10406. bp := tls.Alloc(112)
  10407. defer tls.Free(112)
  10408. var ret uintptr
  10409. var s int32
  10410. var _ /* borderWidth at bp+24 */ uint32
  10411. var _ /* depth at bp+28 */ uint32
  10412. var _ /* height at bp+20 */ uint32
  10413. var _ /* nret at bp+96 */ int32
  10414. var _ /* root at bp+0 */ TWindow
  10415. var _ /* template at bp+32 */ TXVisualInfo
  10416. var _ /* width at bp+16 */ uint32
  10417. var _ /* x at bp+8 */ int32
  10418. var _ /* y at bp+12 */ int32
  10419. _, _ = ret, s
  10420. /* Special case the most common environment */
  10421. if (*struct {
  10422. Fext_data uintptr
  10423. Fprivate1 uintptr
  10424. Ffd int32
  10425. Fprivate2 int32
  10426. Fproto_major_version int32
  10427. Fproto_minor_version int32
  10428. Fvendor uintptr
  10429. Fprivate3 TXID
  10430. Fprivate4 TXID
  10431. Fprivate5 TXID
  10432. Fprivate6 int32
  10433. Fresource_alloc uintptr
  10434. Fbyte_order int32
  10435. Fbitmap_unit int32
  10436. Fbitmap_pad int32
  10437. Fbitmap_bit_order int32
  10438. Fnformats int32
  10439. Fpixmap_format uintptr
  10440. Fprivate8 int32
  10441. Frelease int32
  10442. Fprivate9 uintptr
  10443. Fprivate10 uintptr
  10444. Fqlen int32
  10445. Flast_request_read uint64
  10446. Frequest uint64
  10447. Fprivate11 TXPointer
  10448. Fprivate12 TXPointer
  10449. Fprivate13 TXPointer
  10450. Fprivate14 TXPointer
  10451. Fmax_request_size uint32
  10452. Fdb uintptr
  10453. Fprivate15 uintptr
  10454. Fdisplay_name uintptr
  10455. Fdefault_screen int32
  10456. Fnscreens int32
  10457. Fscreens uintptr
  10458. Fmotion_buffer uint64
  10459. Fprivate16 uint64
  10460. Fmin_keycode int32
  10461. Fmax_keycode int32
  10462. Fprivate17 TXPointer
  10463. Fprivate18 TXPointer
  10464. Fprivate19 int32
  10465. Fxdefaults uintptr
  10466. })(unsafe.Pointer(dpy)).Fnscreens == int32(1) {
  10467. return 0
  10468. }
  10469. /*
  10470. * If we've got a visual, look for the screen that points at it.
  10471. * This requires no round trip.
  10472. */
  10473. if visual != 0 {
  10474. s = 0
  10475. for {
  10476. if !(s < (*struct {
  10477. Fext_data uintptr
  10478. Fprivate1 uintptr
  10479. Ffd int32
  10480. Fprivate2 int32
  10481. Fproto_major_version int32
  10482. Fproto_minor_version int32
  10483. Fvendor uintptr
  10484. Fprivate3 TXID
  10485. Fprivate4 TXID
  10486. Fprivate5 TXID
  10487. Fprivate6 int32
  10488. Fresource_alloc uintptr
  10489. Fbyte_order int32
  10490. Fbitmap_unit int32
  10491. Fbitmap_pad int32
  10492. Fbitmap_bit_order int32
  10493. Fnformats int32
  10494. Fpixmap_format uintptr
  10495. Fprivate8 int32
  10496. Frelease int32
  10497. Fprivate9 uintptr
  10498. Fprivate10 uintptr
  10499. Fqlen int32
  10500. Flast_request_read uint64
  10501. Frequest uint64
  10502. Fprivate11 TXPointer
  10503. Fprivate12 TXPointer
  10504. Fprivate13 TXPointer
  10505. Fprivate14 TXPointer
  10506. Fmax_request_size uint32
  10507. Fdb uintptr
  10508. Fprivate15 uintptr
  10509. Fdisplay_name uintptr
  10510. Fdefault_screen int32
  10511. Fnscreens int32
  10512. Fscreens uintptr
  10513. Fmotion_buffer uint64
  10514. Fprivate16 uint64
  10515. Fmin_keycode int32
  10516. Fmax_keycode int32
  10517. Fprivate17 TXPointer
  10518. Fprivate18 TXPointer
  10519. Fprivate19 int32
  10520. Fxdefaults uintptr
  10521. })(unsafe.Pointer(dpy)).Fnscreens) {
  10522. break
  10523. }
  10524. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fvisualid = (*TVisual)(unsafe.Pointer(visual)).Fvisualid
  10525. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fscreen = s
  10526. ret = libx11.XXGetVisualInfo(tls, dpy, int64(libc.Int32FromInt32(m_VisualIDMask1)|libc.Int32FromInt32(m_VisualScreenMask1)), bp+32, bp+96)
  10527. if ret != 0 {
  10528. libx11.XXFree(tls, ret)
  10529. return s
  10530. }
  10531. goto _1
  10532. _1:
  10533. ;
  10534. s++
  10535. }
  10536. }
  10537. /*
  10538. * Otherwise, as the server for the drawable geometry and find
  10539. * the screen from the root window.
  10540. * This takes a round trip.
  10541. */
  10542. if libx11.XXGetGeometry(tls, dpy, drawable, bp, bp+8, bp+12, bp+16, bp+20, bp+24, bp+28) != 0 {
  10543. s = 0
  10544. for {
  10545. if !(s < (*struct {
  10546. Fext_data uintptr
  10547. Fprivate1 uintptr
  10548. Ffd int32
  10549. Fprivate2 int32
  10550. Fproto_major_version int32
  10551. Fproto_minor_version int32
  10552. Fvendor uintptr
  10553. Fprivate3 TXID
  10554. Fprivate4 TXID
  10555. Fprivate5 TXID
  10556. Fprivate6 int32
  10557. Fresource_alloc uintptr
  10558. Fbyte_order int32
  10559. Fbitmap_unit int32
  10560. Fbitmap_pad int32
  10561. Fbitmap_bit_order int32
  10562. Fnformats int32
  10563. Fpixmap_format uintptr
  10564. Fprivate8 int32
  10565. Frelease int32
  10566. Fprivate9 uintptr
  10567. Fprivate10 uintptr
  10568. Fqlen int32
  10569. Flast_request_read uint64
  10570. Frequest uint64
  10571. Fprivate11 TXPointer
  10572. Fprivate12 TXPointer
  10573. Fprivate13 TXPointer
  10574. Fprivate14 TXPointer
  10575. Fmax_request_size uint32
  10576. Fdb uintptr
  10577. Fprivate15 uintptr
  10578. Fdisplay_name uintptr
  10579. Fdefault_screen int32
  10580. Fnscreens int32
  10581. Fscreens uintptr
  10582. Fmotion_buffer uint64
  10583. Fprivate16 uint64
  10584. Fmin_keycode int32
  10585. Fmax_keycode int32
  10586. Fprivate17 TXPointer
  10587. Fprivate18 TXPointer
  10588. Fprivate19 int32
  10589. Fxdefaults uintptr
  10590. })(unsafe.Pointer(dpy)).Fnscreens) {
  10591. break
  10592. }
  10593. if (*TScreen)(unsafe.Pointer((*struct {
  10594. Fext_data uintptr
  10595. Fprivate1 uintptr
  10596. Ffd int32
  10597. Fprivate2 int32
  10598. Fproto_major_version int32
  10599. Fproto_minor_version int32
  10600. Fvendor uintptr
  10601. Fprivate3 TXID
  10602. Fprivate4 TXID
  10603. Fprivate5 TXID
  10604. Fprivate6 int32
  10605. Fresource_alloc uintptr
  10606. Fbyte_order int32
  10607. Fbitmap_unit int32
  10608. Fbitmap_pad int32
  10609. Fbitmap_bit_order int32
  10610. Fnformats int32
  10611. Fpixmap_format uintptr
  10612. Fprivate8 int32
  10613. Frelease int32
  10614. Fprivate9 uintptr
  10615. Fprivate10 uintptr
  10616. Fqlen int32
  10617. Flast_request_read uint64
  10618. Frequest uint64
  10619. Fprivate11 TXPointer
  10620. Fprivate12 TXPointer
  10621. Fprivate13 TXPointer
  10622. Fprivate14 TXPointer
  10623. Fmax_request_size uint32
  10624. Fdb uintptr
  10625. Fprivate15 uintptr
  10626. Fdisplay_name uintptr
  10627. Fdefault_screen int32
  10628. Fnscreens int32
  10629. Fscreens uintptr
  10630. Fmotion_buffer uint64
  10631. Fprivate16 uint64
  10632. Fmin_keycode int32
  10633. Fmax_keycode int32
  10634. Fprivate17 TXPointer
  10635. Fprivate18 TXPointer
  10636. Fprivate19 int32
  10637. Fxdefaults uintptr
  10638. })(unsafe.Pointer(dpy)).Fscreens+uintptr(s)*128)).Froot == *(*TWindow)(unsafe.Pointer(bp)) {
  10639. return s
  10640. }
  10641. goto _2
  10642. _2:
  10643. ;
  10644. s++
  10645. }
  10646. }
  10647. /*
  10648. * Make a guess -- it's probably wrong, but then the app probably
  10649. * handed us a bogus drawable in this case
  10650. */
  10651. return 0
  10652. }
  10653. func XXftDrawDepth(tls *libc.TLS, draw uintptr) (r uint32) {
  10654. bp := tls.Alloc(32)
  10655. defer tls.Free(32)
  10656. var _ /* borderWidth at bp+24 */ uint32
  10657. var _ /* depth at bp+28 */ uint32
  10658. var _ /* height at bp+20 */ uint32
  10659. var _ /* root at bp+0 */ TWindow
  10660. var _ /* width at bp+16 */ uint32
  10661. var _ /* x at bp+8 */ int32
  10662. var _ /* y at bp+12 */ int32
  10663. if !((*TXftDraw)(unsafe.Pointer(draw)).Fdepth != 0) {
  10664. 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 {
  10665. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = *(*uint32)(unsafe.Pointer(bp + 28))
  10666. }
  10667. }
  10668. return (*TXftDraw)(unsafe.Pointer(draw)).Fdepth
  10669. }
  10670. func XXftDrawBitsPerPixel(tls *libc.TLS, draw uintptr) (r uint32) {
  10671. bp := tls.Alloc(16)
  10672. defer tls.Free(16)
  10673. var depth, v1 uint32
  10674. var formats, v2 uintptr
  10675. var i int32
  10676. var v3 bool
  10677. var _ /* nformats at bp+0 */ int32
  10678. _, _, _, _, _, _ = depth, formats, i, v1, v2, v3
  10679. if !((*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel != 0) {
  10680. v1 = XXftDrawDepth(tls, draw)
  10681. depth = v1
  10682. if v3 = v1 != 0; v3 {
  10683. v2 = libx11.XXListPixmapFormats(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, bp)
  10684. formats = v2
  10685. }
  10686. if v3 && v2 != 0 {
  10687. i = 0
  10688. for {
  10689. if !(i < *(*int32)(unsafe.Pointer(bp))) {
  10690. break
  10691. }
  10692. if libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fdepth) == depth {
  10693. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fbits_per_pixel)
  10694. break
  10695. }
  10696. goto _4
  10697. _4:
  10698. ;
  10699. i++
  10700. }
  10701. libx11.XXFree(tls, formats)
  10702. }
  10703. }
  10704. return (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel
  10705. }
  10706. func XXftDrawCreate(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr, colormap TColormap) (r uintptr) {
  10707. var draw uintptr
  10708. _ = draw
  10709. draw = libc.Xmalloc(tls, uint64(96))
  10710. if !(draw != 0) {
  10711. return libc.UintptrFromInt32(0)
  10712. }
  10713. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10714. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10715. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, drawable, visual)
  10716. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(0) /* don't find out unless we need to know */
  10717. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out unless we need to know */
  10718. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = visual
  10719. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = colormap
  10720. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10721. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10722. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10723. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10724. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10725. XXftMemAlloc(tls, m_XFT_MEM_DRAW, int32(96))
  10726. return draw
  10727. }
  10728. func XXftDrawCreateBitmap(tls *libc.TLS, dpy uintptr, bitmap TPixmap) (r uintptr) {
  10729. var draw uintptr
  10730. _ = draw
  10731. draw = libc.Xmalloc(tls, uint64(96))
  10732. if !(draw != 0) {
  10733. return libc.UintptrFromInt32(0)
  10734. }
  10735. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10736. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = bitmap
  10737. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, bitmap, libc.UintptrFromInt32(0))
  10738. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(1)
  10739. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(1)
  10740. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10741. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10742. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10743. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10744. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10745. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10746. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10747. XXftMemAlloc(tls, m_XFT_MEM_DRAW, int32(96))
  10748. return draw
  10749. }
  10750. func XXftDrawCreateAlpha(tls *libc.TLS, dpy uintptr, pixmap TPixmap, depth int32) (r uintptr) {
  10751. var draw uintptr
  10752. _ = draw
  10753. draw = libc.Xmalloc(tls, uint64(96))
  10754. if !(draw != 0) {
  10755. return libc.UintptrFromInt32(0)
  10756. }
  10757. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10758. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = pixmap
  10759. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, pixmap, libc.UintptrFromInt32(0))
  10760. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = libc.Uint32FromInt32(depth)
  10761. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out until we need it */
  10762. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10763. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10764. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10765. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10766. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10767. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10768. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10769. XXftMemAlloc(tls, m_XFT_MEM_DRAW, int32(96))
  10770. return draw
  10771. }
  10772. func __XftDrawFormat(tls *libc.TLS, draw uintptr) (r uintptr) {
  10773. bp := tls.Alloc(48)
  10774. defer tls.Free(48)
  10775. var info uintptr
  10776. var _ /* pf at bp+0 */ TXRenderPictFormat
  10777. _ = info
  10778. info = X_XftDisplayInfoGet(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_True))
  10779. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0) {
  10780. return libc.UintptrFromInt32(0)
  10781. }
  10782. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual == libc.UintptrFromInt32(0) {
  10783. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  10784. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = libc.Int32FromUint32(XXftDrawDepth(tls, draw))
  10785. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.Falpha = 0
  10786. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(int32(1)<<(*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth - int32(1))
  10787. 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)
  10788. } else {
  10789. return libxrender.XXRenderFindVisualFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fvisual)
  10790. }
  10791. return r
  10792. }
  10793. func XXftDrawChange(tls *libc.TLS, draw uintptr, drawable TDrawable) {
  10794. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10795. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10796. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10797. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10798. }
  10799. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10800. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10801. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10802. }
  10803. }
  10804. func XXftDrawDisplay(tls *libc.TLS, draw uintptr) (r uintptr) {
  10805. return (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  10806. }
  10807. func XXftDrawDrawable(tls *libc.TLS, draw uintptr) (r TDrawable) {
  10808. return (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable
  10809. }
  10810. func XXftDrawColormap(tls *libc.TLS, draw uintptr) (r TColormap) {
  10811. return (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap
  10812. }
  10813. func XXftDrawVisual(tls *libc.TLS, draw uintptr) (r uintptr) {
  10814. return (*TXftDraw)(unsafe.Pointer(draw)).Fvisual
  10815. }
  10816. func XXftDrawDestroy(tls *libc.TLS, draw uintptr) {
  10817. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10818. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10819. }
  10820. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10821. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10822. }
  10823. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  10824. case int32(_XftClipTypeRegion):
  10825. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  10826. case int32(_XftClipTypeRectangles):
  10827. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  10828. case int32(_XftClipTypeNone):
  10829. break
  10830. }
  10831. XXftMemFree(tls, m_XFT_MEM_DRAW, int32(96))
  10832. libc.Xfree(tls, draw)
  10833. }
  10834. func XXftDrawSrcPicture(tls *libc.TLS, draw uintptr, color uintptr) (r TPicture) {
  10835. bp := tls.Alloc(96)
  10836. defer tls.Free(96)
  10837. var dpy, info uintptr
  10838. var i int32
  10839. var pix TPixmap
  10840. var _ /* bitmapColor at bp+0 */ TXftColor
  10841. var _ /* pa at bp+16 */ TXRenderPictureAttributes
  10842. _, _, _, _ = dpy, i, info, pix
  10843. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  10844. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10845. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat != 0) {
  10846. return uint64(0)
  10847. }
  10848. /*
  10849. * Monochrome targets require special handling; the PictOp controls
  10850. * the color, and the color must be opaque
  10851. */
  10852. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fdepth == uint32(1) {
  10853. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Falpha = uint16(0xffff)
  10854. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fred = uint16(0xffff)
  10855. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fgreen = uint16(0xffff)
  10856. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fblue = uint16(0xffff)
  10857. color = bp
  10858. }
  10859. /*
  10860. * See if there's one already available
  10861. */
  10862. i = 0
  10863. for {
  10864. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  10865. break
  10866. }
  10867. 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) {
  10868. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  10869. }
  10870. goto _1
  10871. _1:
  10872. ;
  10873. i++
  10874. }
  10875. /*
  10876. * Pick one to replace at random
  10877. */
  10878. i = libc.Int32FromUint32(libc.Uint32FromInt32(libc.Xrand(tls)) % uint32(m_XFT_NUM_SOLID_COLOR))
  10879. /*
  10880. * Recreate if it was for the wrong screen
  10881. */
  10882. 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 {
  10883. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict)
  10884. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  10885. }
  10886. /*
  10887. * Create picture if necessary
  10888. */
  10889. if !((*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0) {
  10890. pix = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  10891. Fext_data uintptr
  10892. Fprivate1 uintptr
  10893. Ffd int32
  10894. Fprivate2 int32
  10895. Fproto_major_version int32
  10896. Fproto_minor_version int32
  10897. Fvendor uintptr
  10898. Fprivate3 TXID
  10899. Fprivate4 TXID
  10900. Fprivate5 TXID
  10901. Fprivate6 int32
  10902. Fresource_alloc uintptr
  10903. Fbyte_order int32
  10904. Fbitmap_unit int32
  10905. Fbitmap_pad int32
  10906. Fbitmap_bit_order int32
  10907. Fnformats int32
  10908. Fpixmap_format uintptr
  10909. Fprivate8 int32
  10910. Frelease int32
  10911. Fprivate9 uintptr
  10912. Fprivate10 uintptr
  10913. Fqlen int32
  10914. Flast_request_read uint64
  10915. Frequest uint64
  10916. Fprivate11 TXPointer
  10917. Fprivate12 TXPointer
  10918. Fprivate13 TXPointer
  10919. Fprivate14 TXPointer
  10920. Fmax_request_size uint32
  10921. Fdb uintptr
  10922. Fprivate15 uintptr
  10923. Fdisplay_name uintptr
  10924. Fdefault_screen int32
  10925. Fnscreens int32
  10926. Fscreens uintptr
  10927. Fmotion_buffer uint64
  10928. Fprivate16 uint64
  10929. Fmin_keycode int32
  10930. Fmax_keycode int32
  10931. Fprivate17 TXPointer
  10932. Fprivate18 TXPointer
  10933. Fprivate19 int32
  10934. Fxdefaults uintptr
  10935. })(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))
  10936. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp + 16))).Frepeat = int32(m_True)
  10937. (*(*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)
  10938. libx11.XXFreePixmap(tls, dpy, pix)
  10939. }
  10940. /*
  10941. * Set to the new color
  10942. */
  10943. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  10944. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  10945. libxrender.XXRenderFillRectangle(tls, dpy, int32(m_PictOpSrc), (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict, color+8, 0, 0, uint32(1), uint32(1))
  10946. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  10947. }
  10948. func __XftDrawOp(tls *libc.TLS, draw uintptr, color uintptr) (r int32) {
  10949. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0 || (*TXftDraw)(unsafe.Pointer(draw)).Fdepth != uint32(1) {
  10950. return int32(m_PictOpOver)
  10951. }
  10952. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  10953. return int32(m_PictOpOver)
  10954. }
  10955. return int32(m_PictOpOutReverse)
  10956. }
  10957. func __XftDrawRenderPrepare(tls *libc.TLS, draw uintptr) (r TFcBool) {
  10958. bp := tls.Alloc(80)
  10959. defer tls.Free(80)
  10960. var format uintptr
  10961. var mask uint64
  10962. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  10963. _, _ = format, mask
  10964. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  10965. mask = uint64(0)
  10966. format = __XftDrawFormat(tls, draw)
  10967. if !(format != 0) {
  10968. return m_FcFalse
  10969. }
  10970. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  10971. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  10972. mask |= libc.Uint64FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(8))
  10973. }
  10974. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, format, mask, bp)
  10975. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  10976. return m_FcFalse
  10977. }
  10978. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  10979. case int32(_XftClipTypeRegion):
  10980. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, *(*TRegion)(unsafe.Pointer(draw + 56)))
  10981. case int32(_XftClipTypeRectangles):
  10982. 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)
  10983. case int32(_XftClipTypeNone):
  10984. break
  10985. }
  10986. }
  10987. return int32(m_FcTrue)
  10988. }
  10989. func __XftDrawCorePrepare(tls *libc.TLS, draw uintptr, color uintptr) (r TFcBool) {
  10990. bp := tls.Alloc(128)
  10991. defer tls.Free(128)
  10992. var mask uint64
  10993. var _ /* gcv at bp+0 */ TXGCValues
  10994. _ = mask
  10995. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  10996. mask = uint64(0)
  10997. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  10998. (*(*TXGCValues)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  10999. mask |= libc.Uint64FromInt64(libc.Int64FromInt64(1) << libc.Int32FromInt32(15))
  11000. }
  11001. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libx11.XXCreateGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, mask, bp)
  11002. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11003. return m_FcFalse
  11004. }
  11005. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11006. case int32(_XftClipTypeRegion):
  11007. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11008. case int32(_XftClipTypeRectangles):
  11009. 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)
  11010. case int32(_XftClipTypeNone):
  11011. break
  11012. }
  11013. }
  11014. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11015. return int32(m_FcTrue)
  11016. }
  11017. func XXftDrawPicture(tls *libc.TLS, draw uintptr) (r TPicture) {
  11018. if !(__XftDrawRenderPrepare(tls, draw) != 0) {
  11019. return uint64(0)
  11020. }
  11021. return (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict
  11022. }
  11023. func XXftDrawGlyphs(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  11024. var font uintptr
  11025. var src, v1 TPicture
  11026. var v2 bool
  11027. _, _, _, _ = font, src, v1, v2
  11028. font = pub
  11029. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11030. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11031. v1 = XXftDrawSrcPicture(tls, draw, color)
  11032. src = v1
  11033. }
  11034. if v2 && v1 != 0 {
  11035. 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)
  11036. }
  11037. } else {
  11038. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11039. XXftGlyphCore(tls, draw, color, pub, x, y, glyphs, nglyphs)
  11040. }
  11041. }
  11042. }
  11043. func XXftDrawString8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11044. bp := tls.Alloc(4128)
  11045. defer tls.Free(4128)
  11046. var glyphs uintptr
  11047. var i int32
  11048. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11049. _, _ = glyphs, i
  11050. if XXftDebug(tls)&int32(m_XFT_DBG_DRAW) != 0 {
  11051. libc.Xprintf(tls, __ccgo_ts+530, libc.VaList(bp+4104, len1, len1, string1))
  11052. }
  11053. if len1 <= int32(m_NUM_LOCAL) {
  11054. glyphs = bp
  11055. } else {
  11056. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11057. if !(glyphs != 0) {
  11058. return
  11059. }
  11060. }
  11061. i = 0
  11062. for {
  11063. if !(i < len1) {
  11064. break
  11065. }
  11066. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11067. goto _1
  11068. _1:
  11069. ;
  11070. i++
  11071. }
  11072. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11073. if glyphs != bp {
  11074. libc.Xfree(tls, glyphs)
  11075. }
  11076. }
  11077. func XXftDrawString16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11078. bp := tls.Alloc(4096)
  11079. defer tls.Free(4096)
  11080. var glyphs uintptr
  11081. var i int32
  11082. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11083. _, _ = glyphs, i
  11084. if len1 <= int32(m_NUM_LOCAL) {
  11085. glyphs = bp
  11086. } else {
  11087. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11088. if !(glyphs != 0) {
  11089. return
  11090. }
  11091. }
  11092. i = 0
  11093. for {
  11094. if !(i < len1) {
  11095. break
  11096. }
  11097. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11098. goto _1
  11099. _1:
  11100. ;
  11101. i++
  11102. }
  11103. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11104. if glyphs != bp {
  11105. libc.Xfree(tls, glyphs)
  11106. }
  11107. }
  11108. func XXftDrawString32(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11109. bp := tls.Alloc(4096)
  11110. defer tls.Free(4096)
  11111. var glyphs uintptr
  11112. var i int32
  11113. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11114. _, _ = glyphs, i
  11115. if len1 <= int32(m_NUM_LOCAL) {
  11116. glyphs = bp
  11117. } else {
  11118. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11119. if !(glyphs != 0) {
  11120. return
  11121. }
  11122. }
  11123. i = 0
  11124. for {
  11125. if !(i < len1) {
  11126. break
  11127. }
  11128. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11129. goto _1
  11130. _1:
  11131. ;
  11132. i++
  11133. }
  11134. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11135. if glyphs != bp {
  11136. libc.Xfree(tls, glyphs)
  11137. }
  11138. }
  11139. func XXftDrawStringUtf8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11140. bp := tls.Alloc(4112)
  11141. defer tls.Free(4112)
  11142. var glyphs, glyphs_new uintptr
  11143. var i, l, size, v1, v3 int32
  11144. var v2 bool
  11145. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11146. var _ /* ucs4 at bp+4096 */ TFcChar32
  11147. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11148. i = 0
  11149. glyphs = bp
  11150. size = int32(m_NUM_LOCAL)
  11151. for {
  11152. if v2 = len1 != 0; v2 {
  11153. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11154. l = v1
  11155. }
  11156. if !(v2 && v1 > 0) {
  11157. break
  11158. }
  11159. if i == size {
  11160. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  11161. if !(glyphs_new != 0) {
  11162. if glyphs != bp {
  11163. libc.Xfree(tls, glyphs)
  11164. }
  11165. return
  11166. }
  11167. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11168. size *= int32(2)
  11169. if glyphs != bp {
  11170. libc.Xfree(tls, glyphs)
  11171. }
  11172. glyphs = glyphs_new
  11173. }
  11174. v3 = i
  11175. i++
  11176. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11177. string1 += uintptr(l)
  11178. len1 -= l
  11179. }
  11180. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11181. if glyphs != bp {
  11182. libc.Xfree(tls, glyphs)
  11183. }
  11184. }
  11185. func XXftDrawStringUtf16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, endian TFcEndian, len1 int32) {
  11186. bp := tls.Alloc(4112)
  11187. defer tls.Free(4112)
  11188. var glyphs, glyphs_new uintptr
  11189. var i, l, size, v1, v3 int32
  11190. var v2 bool
  11191. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11192. var _ /* ucs4 at bp+4096 */ TFcChar32
  11193. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11194. i = 0
  11195. glyphs = bp
  11196. size = int32(m_NUM_LOCAL)
  11197. for {
  11198. if v2 = len1 != 0; v2 {
  11199. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11200. l = v1
  11201. }
  11202. if !(v2 && v1 > 0) {
  11203. break
  11204. }
  11205. if i == size {
  11206. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  11207. if !(glyphs_new != 0) {
  11208. if glyphs != bp {
  11209. libc.Xfree(tls, glyphs)
  11210. }
  11211. return
  11212. }
  11213. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11214. size *= int32(2)
  11215. if glyphs != bp {
  11216. libc.Xfree(tls, glyphs)
  11217. }
  11218. glyphs = glyphs_new
  11219. }
  11220. v3 = i
  11221. i++
  11222. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11223. string1 += uintptr(l)
  11224. len1 -= l
  11225. }
  11226. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11227. if glyphs != bp {
  11228. libc.Xfree(tls, glyphs)
  11229. }
  11230. }
  11231. func XXftDrawGlyphSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, glyphs uintptr, len1 int32) {
  11232. var font uintptr
  11233. var src, v1 TPicture
  11234. var v2 bool
  11235. _, _, _, _ = font, src, v1, v2
  11236. font = pub
  11237. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11238. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11239. v1 = XXftDrawSrcPicture(tls, draw, color)
  11240. src = v1
  11241. }
  11242. if v2 && v1 != 0 {
  11243. XXftGlyphSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, pub, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs, len1)
  11244. }
  11245. } else {
  11246. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11247. XXftGlyphSpecCore(tls, draw, color, pub, glyphs, len1)
  11248. }
  11249. }
  11250. }
  11251. func XXftDrawGlyphFontSpec(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, len1 int32) {
  11252. var i, start int32
  11253. var src, v1 TPicture
  11254. var v2 bool
  11255. _, _, _, _, _ = i, src, start, v1, v2
  11256. i = 0
  11257. for i < len1 {
  11258. start = i
  11259. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11260. for i < len1 && (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11261. i++
  11262. }
  11263. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11264. v1 = XXftDrawSrcPicture(tls, draw, color)
  11265. src = v1
  11266. }
  11267. if v2 && v1 != 0 {
  11268. 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)
  11269. }
  11270. } else {
  11271. for i < len1 && !((*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0) {
  11272. i++
  11273. }
  11274. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11275. XXftGlyphFontSpecCore(tls, draw, color, glyphs+uintptr(start)*16, i-start)
  11276. }
  11277. }
  11278. }
  11279. }
  11280. func XXftDrawCharSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, chars uintptr, len1 int32) {
  11281. bp := tls.Alloc(8192)
  11282. defer tls.Free(8192)
  11283. var glyphs uintptr
  11284. var i int32
  11285. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  11286. _, _ = glyphs, i
  11287. if len1 <= int32(m_NUM_LOCAL) {
  11288. glyphs = bp
  11289. } else {
  11290. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(8))
  11291. if !(glyphs != 0) {
  11292. return
  11293. }
  11294. }
  11295. i = 0
  11296. for {
  11297. if !(i < len1) {
  11298. break
  11299. }
  11300. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  11301. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  11302. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  11303. goto _1
  11304. _1:
  11305. ;
  11306. i++
  11307. }
  11308. XXftDrawGlyphSpec(tls, draw, color, pub, glyphs, len1)
  11309. if glyphs != bp {
  11310. libc.Xfree(tls, glyphs)
  11311. }
  11312. }
  11313. func XXftDrawCharFontSpec(tls *libc.TLS, draw uintptr, color uintptr, chars uintptr, len1 int32) {
  11314. bp := tls.Alloc(16384)
  11315. defer tls.Free(16384)
  11316. var glyphs uintptr
  11317. var i int32
  11318. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  11319. _, _ = glyphs, i
  11320. if len1 <= int32(m_NUM_LOCAL) {
  11321. glyphs = bp
  11322. } else {
  11323. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(16))
  11324. if !(glyphs != 0) {
  11325. return
  11326. }
  11327. }
  11328. i = 0
  11329. for {
  11330. if !(i < len1) {
  11331. break
  11332. }
  11333. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  11334. (*(*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)
  11335. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  11336. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  11337. goto _1
  11338. _1:
  11339. ;
  11340. i++
  11341. }
  11342. XXftDrawGlyphFontSpec(tls, draw, color, glyphs, len1)
  11343. if glyphs != bp {
  11344. libc.Xfree(tls, glyphs)
  11345. }
  11346. }
  11347. func XXftDrawRect(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  11348. if __XftDrawRenderPrepare(tls, draw) != 0 {
  11349. libxrender.XXRenderFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_PictOpSrc), (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, color+8, x, y, width, height)
  11350. } else {
  11351. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11352. /* note: not XftRectCore() */
  11353. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11354. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  11355. }
  11356. }
  11357. }
  11358. func XXftDrawSetClip(tls *libc.TLS, draw uintptr, r TRegion) (r1 int32) {
  11359. bp := tls.Alloc(80)
  11360. defer tls.Free(80)
  11361. var n TRegion
  11362. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11363. _ = n
  11364. n = libc.UintptrFromInt32(0)
  11365. /*
  11366. * Check for quick exits
  11367. */
  11368. if !(r != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeNone) {
  11369. return int32(m_True)
  11370. }
  11371. if r != 0 && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRegion) && libx11.XXEqualRegion(tls, r, *(*TRegion)(unsafe.Pointer(draw + 56))) != 0 {
  11372. return int32(m_True)
  11373. }
  11374. /*
  11375. * Duplicate the region so future changes can be short circuited
  11376. */
  11377. if r != 0 {
  11378. n = libx11.XXCreateRegion(tls)
  11379. if n != 0 {
  11380. if !(libx11.XXUnionRegion(tls, n, r, n) != 0) {
  11381. libx11.XXDestroyRegion(tls, n)
  11382. return m_False
  11383. }
  11384. }
  11385. }
  11386. /*
  11387. * Destroy existing clip
  11388. */
  11389. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11390. case int32(_XftClipTypeRegion):
  11391. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11392. case int32(_XftClipTypeRectangles):
  11393. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11394. case int32(_XftClipTypeNone):
  11395. break
  11396. }
  11397. /*
  11398. * Set the clip
  11399. */
  11400. if n != 0 {
  11401. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRegion)
  11402. *(*TRegion)(unsafe.Pointer(draw + 56)) = n
  11403. } else {
  11404. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  11405. }
  11406. /*
  11407. * Apply new clip to existing objects
  11408. */
  11409. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11410. if n != 0 {
  11411. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, n)
  11412. } else {
  11413. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fclip_mask = uint64(0)
  11414. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(6)), bp)
  11415. }
  11416. }
  11417. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11418. if n != 0 {
  11419. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11420. } else {
  11421. libx11.XXSetClipMask(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, uint64(0))
  11422. }
  11423. }
  11424. return int32(m_True)
  11425. }
  11426. func XXftDrawSetClipRectangles(tls *libc.TLS, draw uintptr, xOrigin int32, yOrigin int32, rects uintptr, n int32) (r int32) {
  11427. var new1 uintptr
  11428. _ = new1
  11429. new1 = libc.UintptrFromInt32(0)
  11430. /*
  11431. * Check for quick exit
  11432. */
  11433. 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) {
  11434. return int32(m_True)
  11435. }
  11436. /*
  11437. * Duplicate the region so future changes can be short circuited
  11438. */
  11439. new1 = libc.Xmalloc(tls, uint64(12)+libc.Uint64FromInt32(n)*uint64(8))
  11440. if !(new1 != 0) {
  11441. return m_False
  11442. }
  11443. (*TXftClipRect)(unsafe.Pointer(new1)).Fn = n
  11444. (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin = xOrigin
  11445. (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin = yOrigin
  11446. libc.Xmemcpy(tls, new1+libc.UintptrFromInt32(1)*12, rects, libc.Uint64FromInt32(n)*uint64(8))
  11447. /*
  11448. * Destroy existing clip
  11449. */
  11450. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11451. case int32(_XftClipTypeRegion):
  11452. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11453. case int32(_XftClipTypeRectangles):
  11454. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11455. case int32(_XftClipTypeNone):
  11456. break
  11457. }
  11458. /*
  11459. * Set the clip
  11460. */
  11461. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRectangles)
  11462. *(*uintptr)(unsafe.Pointer(draw + 56)) = new1
  11463. /*
  11464. * Apply new clip to existing objects
  11465. */
  11466. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11467. 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)
  11468. }
  11469. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11470. 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)
  11471. }
  11472. return int32(m_True)
  11473. }
  11474. func XXftDrawSetSubwindowMode(tls *libc.TLS, draw uintptr, mode int32) {
  11475. bp := tls.Alloc(80)
  11476. defer tls.Free(80)
  11477. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11478. if mode == (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode {
  11479. return
  11480. }
  11481. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = mode
  11482. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11483. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = mode
  11484. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)), bp)
  11485. }
  11486. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11487. libx11.XXSetSubwindowMode(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, mode)
  11488. }
  11489. }
  11490. const m_VisualIDMask2 = 0x1
  11491. const m_VisualScreenMask2 = 0x2
  11492. /* xftxlfd.c */
  11493. func XXftGlyphExtents(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyphs int32, extents uintptr) {
  11494. bp := tls.Alloc(1040)
  11495. defer tls.Free(1040)
  11496. var bottom, left, n, overall_bottom, overall_left, overall_right, overall_top, right, top, x, y, v1, v6 int32
  11497. var font, g, xftg, v2, v3, v4, v7, v8 uintptr
  11498. var glyph TFT_UInt
  11499. var glyphs_loaded TFcBool
  11500. var v5, v9 bool
  11501. var _ /* missing at bp+0 */ [256]TFT_UInt
  11502. var _ /* nmissing at bp+1024 */ int32
  11503. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  11504. font = pub
  11505. g = glyphs
  11506. n = nglyphs
  11507. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  11508. glyphs_loaded = m_FcFalse
  11509. for {
  11510. v1 = n
  11511. n--
  11512. if !(v1 != 0) {
  11513. break
  11514. }
  11515. v2 = g
  11516. g += 4
  11517. if XXftFontCheckGlyph(tls, dpy, pub, m_FcFalse, *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  11518. glyphs_loaded = int32(m_FcTrue)
  11519. }
  11520. }
  11521. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  11522. XXftFontLoadGlyphs(tls, dpy, pub, m_FcFalse, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  11523. }
  11524. g = glyphs
  11525. n = nglyphs
  11526. xftg = libc.UintptrFromInt32(0)
  11527. for n != 0 {
  11528. v3 = g
  11529. g += 4
  11530. glyph = *(*TFT_UInt)(unsafe.Pointer(v3))
  11531. n--
  11532. if v5 = glyph < libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); v5 {
  11533. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11534. xftg = v4
  11535. }
  11536. if v5 && v4 != 0 {
  11537. break
  11538. }
  11539. }
  11540. if n == 0 {
  11541. if xftg != 0 {
  11542. *(*TXGlyphInfo)(unsafe.Pointer(extents)) = (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics
  11543. } else {
  11544. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11545. }
  11546. } else {
  11547. x = 0
  11548. y = 0
  11549. overall_left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11550. overall_top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11551. overall_right = overall_left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11552. overall_bottom = overall_top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11553. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11554. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11555. for {
  11556. v6 = n
  11557. n--
  11558. if !(v6 != 0) {
  11559. break
  11560. }
  11561. v7 = g
  11562. g += 4
  11563. glyph = *(*TFT_UInt)(unsafe.Pointer(v7))
  11564. if v9 = glyph < libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); v9 {
  11565. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11566. xftg = v8
  11567. }
  11568. if v9 && v8 != 0 {
  11569. left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11570. top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11571. right = left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11572. bottom = top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11573. if left < overall_left {
  11574. overall_left = left
  11575. }
  11576. if top < overall_top {
  11577. overall_top = top
  11578. }
  11579. if right > overall_right {
  11580. overall_right = right
  11581. }
  11582. if bottom > overall_bottom {
  11583. overall_bottom = bottom
  11584. }
  11585. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11586. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11587. }
  11588. }
  11589. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fx = int16(-overall_left)
  11590. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fy = int16(-overall_top)
  11591. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fwidth = libc.Uint16FromInt32(overall_right - overall_left)
  11592. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fheight = libc.Uint16FromInt32(overall_bottom - overall_top)
  11593. (*TXGlyphInfo)(unsafe.Pointer(extents)).FxOff = int16(x)
  11594. (*TXGlyphInfo)(unsafe.Pointer(extents)).FyOff = int16(y)
  11595. }
  11596. if glyphs_loaded != 0 {
  11597. X_XftFontManageMemory(tls, dpy, pub)
  11598. }
  11599. }
  11600. func XXftTextExtents8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11601. bp := tls.Alloc(4096)
  11602. defer tls.Free(4096)
  11603. var glyphs uintptr
  11604. var i int32
  11605. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11606. _, _ = glyphs, i
  11607. if len1 <= int32(m_NUM_LOCAL) {
  11608. glyphs = bp
  11609. } else {
  11610. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11611. if !(glyphs != 0) {
  11612. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11613. return
  11614. }
  11615. }
  11616. i = 0
  11617. for {
  11618. if !(i < len1) {
  11619. break
  11620. }
  11621. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11622. goto _1
  11623. _1:
  11624. ;
  11625. i++
  11626. }
  11627. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11628. if glyphs != bp {
  11629. libc.Xfree(tls, glyphs)
  11630. }
  11631. }
  11632. func XXftTextExtents16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11633. bp := tls.Alloc(4096)
  11634. defer tls.Free(4096)
  11635. var glyphs uintptr
  11636. var i int32
  11637. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11638. _, _ = glyphs, i
  11639. if len1 <= int32(m_NUM_LOCAL) {
  11640. glyphs = bp
  11641. } else {
  11642. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11643. if !(glyphs != 0) {
  11644. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11645. return
  11646. }
  11647. }
  11648. i = 0
  11649. for {
  11650. if !(i < len1) {
  11651. break
  11652. }
  11653. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11654. goto _1
  11655. _1:
  11656. ;
  11657. i++
  11658. }
  11659. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11660. if glyphs != bp {
  11661. libc.Xfree(tls, glyphs)
  11662. }
  11663. }
  11664. func XXftTextExtents32(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11665. bp := tls.Alloc(4096)
  11666. defer tls.Free(4096)
  11667. var glyphs uintptr
  11668. var i int32
  11669. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11670. _, _ = glyphs, i
  11671. if len1 <= int32(m_NUM_LOCAL) {
  11672. glyphs = bp
  11673. } else {
  11674. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11675. if !(glyphs != 0) {
  11676. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11677. return
  11678. }
  11679. }
  11680. i = 0
  11681. for {
  11682. if !(i < len1) {
  11683. break
  11684. }
  11685. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11686. goto _1
  11687. _1:
  11688. ;
  11689. i++
  11690. }
  11691. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11692. if glyphs != bp {
  11693. libc.Xfree(tls, glyphs)
  11694. }
  11695. }
  11696. func XXftTextExtentsUtf8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11697. bp := tls.Alloc(4112)
  11698. defer tls.Free(4112)
  11699. var glyphs, glyphs_new uintptr
  11700. var i, l, size, v1, v3 int32
  11701. var v2 bool
  11702. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11703. var _ /* ucs4 at bp+4096 */ TFcChar32
  11704. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11705. i = 0
  11706. glyphs = bp
  11707. size = int32(m_NUM_LOCAL)
  11708. for {
  11709. if v2 = len1 != 0; v2 {
  11710. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11711. l = v1
  11712. }
  11713. if !(v2 && v1 > 0) {
  11714. break
  11715. }
  11716. if i == size {
  11717. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  11718. if !(glyphs_new != 0) {
  11719. if glyphs != bp {
  11720. libc.Xfree(tls, glyphs)
  11721. }
  11722. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11723. return
  11724. }
  11725. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11726. size *= int32(2)
  11727. if glyphs != bp {
  11728. libc.Xfree(tls, glyphs)
  11729. }
  11730. glyphs = glyphs_new
  11731. }
  11732. v3 = i
  11733. i++
  11734. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11735. string1 += uintptr(l)
  11736. len1 -= l
  11737. }
  11738. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  11739. if glyphs != bp {
  11740. libc.Xfree(tls, glyphs)
  11741. }
  11742. }
  11743. func XXftTextExtentsUtf16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, endian TFcEndian, len1 int32, extents uintptr) {
  11744. bp := tls.Alloc(4112)
  11745. defer tls.Free(4112)
  11746. var glyphs, glyphs_new uintptr
  11747. var i, l, size, v1, v3 int32
  11748. var v2 bool
  11749. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11750. var _ /* ucs4 at bp+4096 */ TFcChar32
  11751. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11752. i = 0
  11753. glyphs = bp
  11754. size = int32(m_NUM_LOCAL)
  11755. for {
  11756. if v2 = len1 != 0; v2 {
  11757. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11758. l = v1
  11759. }
  11760. if !(v2 && v1 > 0) {
  11761. break
  11762. }
  11763. if i == size {
  11764. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  11765. if !(glyphs_new != 0) {
  11766. if glyphs != bp {
  11767. libc.Xfree(tls, glyphs)
  11768. }
  11769. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11770. return
  11771. }
  11772. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11773. size *= int32(2)
  11774. if glyphs != bp {
  11775. libc.Xfree(tls, glyphs)
  11776. }
  11777. glyphs = glyphs_new
  11778. }
  11779. v3 = i
  11780. i++
  11781. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11782. string1 += uintptr(l)
  11783. len1 -= l
  11784. }
  11785. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  11786. if glyphs != bp {
  11787. libc.Xfree(tls, glyphs)
  11788. }
  11789. }
  11790. /* xftxlfd.c */
  11791. func XXftFontMatch(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, result uintptr) (r uintptr) {
  11792. var match, new1 uintptr
  11793. _, _ = match, new1
  11794. if !(XXftInit(tls, libc.UintptrFromInt32(0)) != 0) {
  11795. return libc.UintptrFromInt32(0)
  11796. }
  11797. new1 = libfontconfig.XFcPatternDuplicate(tls, pattern)
  11798. if !(new1 != 0) {
  11799. return libc.UintptrFromInt32(0)
  11800. }
  11801. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11802. libc.Xprintf(tls, __ccgo_ts+550, 0)
  11803. libfontconfig.XFcPatternPrint(tls, new1)
  11804. }
  11805. libfontconfig.XFcConfigSubstitute(tls, libc.UintptrFromInt32(0), new1, int32(_FcMatchPattern))
  11806. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11807. libc.Xprintf(tls, __ccgo_ts+572, 0)
  11808. libfontconfig.XFcPatternPrint(tls, new1)
  11809. }
  11810. XXftDefaultSubstitute(tls, dpy, screen, new1)
  11811. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11812. libc.Xprintf(tls, __ccgo_ts+615, 0)
  11813. libfontconfig.XFcPatternPrint(tls, new1)
  11814. }
  11815. match = libfontconfig.XFcFontMatch(tls, libc.UintptrFromInt32(0), new1, result)
  11816. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11817. libc.Xprintf(tls, __ccgo_ts+660, 0)
  11818. libfontconfig.XFcPatternPrint(tls, match)
  11819. }
  11820. libfontconfig.XFcPatternDestroy(tls, new1)
  11821. return match
  11822. }
  11823. func XXftFontOpen(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  11824. bp := tls.Alloc(16)
  11825. defer tls.Free(16)
  11826. var font, match, pat uintptr
  11827. var va Tva_list
  11828. var _ /* result at bp+0 */ TFcResult
  11829. _, _, _, _ = font, match, pat, va
  11830. va = va1
  11831. pat = libfontconfig.XFcPatternVaBuild(tls, libc.UintptrFromInt32(0), va)
  11832. _ = va
  11833. if !(pat != 0) {
  11834. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11835. libc.Xprintf(tls, __ccgo_ts+681, 0)
  11836. }
  11837. return libc.UintptrFromInt32(0)
  11838. }
  11839. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  11840. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11841. libc.Xprintf(tls, __ccgo_ts+720, 0)
  11842. libfontconfig.XFcPatternPrint(tls, pat)
  11843. if match != 0 {
  11844. libc.Xprintf(tls, __ccgo_ts+729, 0)
  11845. libfontconfig.XFcPatternPrint(tls, match)
  11846. } else {
  11847. libc.Xprintf(tls, __ccgo_ts+736, 0)
  11848. }
  11849. }
  11850. libfontconfig.XFcPatternDestroy(tls, pat)
  11851. if !(match != 0) {
  11852. return libc.UintptrFromInt32(0)
  11853. }
  11854. font = XXftFontOpenPattern(tls, dpy, match)
  11855. if !(font != 0) {
  11856. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11857. libc.Xprintf(tls, __ccgo_ts+746, 0)
  11858. }
  11859. libfontconfig.XFcPatternDestroy(tls, match)
  11860. }
  11861. return font
  11862. }
  11863. func XXftFontOpenName(tls *libc.TLS, dpy uintptr, screen int32, name uintptr) (r uintptr) {
  11864. bp := tls.Alloc(32)
  11865. defer tls.Free(32)
  11866. var font, match, pat uintptr
  11867. var _ /* result at bp+0 */ TFcResult
  11868. _, _, _ = font, match, pat
  11869. pat = libfontconfig.XFcNameParse(tls, name)
  11870. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11871. libc.Xprintf(tls, __ccgo_ts+755, libc.VaList(bp+16, name))
  11872. if pat != 0 {
  11873. libfontconfig.XFcPatternPrint(tls, pat)
  11874. } else {
  11875. libc.Xprintf(tls, __ccgo_ts+778, 0)
  11876. }
  11877. }
  11878. if !(pat != 0) {
  11879. return libc.UintptrFromInt32(0)
  11880. }
  11881. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  11882. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11883. if match != 0 {
  11884. libc.Xprintf(tls, __ccgo_ts+729, 0)
  11885. libfontconfig.XFcPatternPrint(tls, match)
  11886. } else {
  11887. libc.Xprintf(tls, __ccgo_ts+736, 0)
  11888. }
  11889. }
  11890. libfontconfig.XFcPatternDestroy(tls, pat)
  11891. if !(match != 0) {
  11892. return libc.UintptrFromInt32(0)
  11893. }
  11894. font = XXftFontOpenPattern(tls, dpy, match)
  11895. if !(font != 0) {
  11896. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11897. libc.Xprintf(tls, __ccgo_ts+746, 0)
  11898. }
  11899. libfontconfig.XFcPatternDestroy(tls, match)
  11900. }
  11901. return font
  11902. }
  11903. func XXftFontOpenXlfd(tls *libc.TLS, dpy uintptr, screen int32, xlfd uintptr) (r uintptr) {
  11904. bp := tls.Alloc(32)
  11905. defer tls.Free(32)
  11906. var font, match, pat uintptr
  11907. var _ /* result at bp+0 */ TFcResult
  11908. _, _, _ = font, match, pat
  11909. pat = XXftXlfdParse(tls, xlfd, m_FcFalse, m_FcFalse)
  11910. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11911. libc.Xprintf(tls, __ccgo_ts+792, libc.VaList(bp+16, xlfd))
  11912. if pat != 0 {
  11913. libc.Xprintf(tls, __ccgo_ts+815, 0)
  11914. } else {
  11915. libfontconfig.XFcPatternPrint(tls, pat)
  11916. }
  11917. }
  11918. if !(pat != 0) {
  11919. return libc.UintptrFromInt32(0)
  11920. }
  11921. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  11922. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11923. if match != 0 {
  11924. libc.Xprintf(tls, __ccgo_ts+729, 0)
  11925. libfontconfig.XFcPatternPrint(tls, match)
  11926. } else {
  11927. libc.Xprintf(tls, __ccgo_ts+736, 0)
  11928. }
  11929. }
  11930. libfontconfig.XFcPatternDestroy(tls, pat)
  11931. if !(match != 0) {
  11932. return libc.UintptrFromInt32(0)
  11933. }
  11934. font = XXftFontOpenPattern(tls, dpy, match)
  11935. if !(font != 0) {
  11936. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11937. libc.Xprintf(tls, __ccgo_ts+746, 0)
  11938. }
  11939. libfontconfig.XFcPatternDestroy(tls, match)
  11940. }
  11941. return font
  11942. }
  11943. const m_FT_LOAD_DEFAULT1 = 0
  11944. const m_XFT_EMBEDDED_BITMAP = "embeddedbitmap"
  11945. /*
  11946. * List of all open files (each face in a file is managed separately)
  11947. */
  11948. var __XftFtFiles uintptr
  11949. var _XftMaxFreeTypeFiles = int32(5)
  11950. func __XftGetFile(tls *libc.TLS, file uintptr, id int32) (r uintptr) {
  11951. bp := tls.Alloc(32)
  11952. defer tls.Free(32)
  11953. var f uintptr
  11954. var v2, v3, v4 TFT_Fixed
  11955. _, _, _, _ = f, v2, v3, v4
  11956. if !(XXftInitFtLibrary(tls) != 0) {
  11957. return libc.UintptrFromInt32(0)
  11958. }
  11959. f = __XftFtFiles
  11960. for {
  11961. if !(f != 0) {
  11962. break
  11963. }
  11964. if !(libc.Xstrcmp(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file) != 0) && (*TXftFtFile)(unsafe.Pointer(f)).Fid == id {
  11965. (*TXftFtFile)(unsafe.Pointer(f)).Fref++
  11966. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  11967. libc.Xprintf(tls, __ccgo_ts+829, libc.VaList(bp+8, file, id, (*TXftFtFile)(unsafe.Pointer(f)).Fref))
  11968. }
  11969. return f
  11970. }
  11971. goto _1
  11972. _1:
  11973. ;
  11974. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  11975. }
  11976. f = libc.Xmalloc(tls, uint64(96)+libc.Xstrlen(tls, file)+uint64(1))
  11977. if !(f != 0) {
  11978. return libc.UintptrFromInt32(0)
  11979. }
  11980. XXftMemAlloc(tls, int32(m_XFT_MEM_FILE), libc.Int32FromUint64(uint64(96)+libc.Xstrlen(tls, file)+uint64(1)))
  11981. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  11982. libc.Xprintf(tls, __ccgo_ts+867, libc.VaList(bp+8, file, id))
  11983. }
  11984. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = __XftFtFiles
  11985. __XftFtFiles = f
  11986. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  11987. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = f + libc.UintptrFromInt32(1)*96
  11988. libc.Xstrcpy(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file)
  11989. (*TXftFtFile)(unsafe.Pointer(f)).Fid = id
  11990. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  11991. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  11992. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  11993. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  11994. v4 = libc.Int64FromInt32(0)
  11995. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v4
  11996. v3 = v4
  11997. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v3
  11998. v2 = v3
  11999. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v2
  12000. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v2
  12001. return f
  12002. }
  12003. func __XftGetFaceFile(tls *libc.TLS, face TFT_Face) (r uintptr) {
  12004. var f uintptr
  12005. var v1, v2, v3 TFT_Fixed
  12006. _, _, _, _ = f, v1, v2, v3
  12007. f = libc.Xmalloc(tls, uint64(96))
  12008. if !(f != 0) {
  12009. return libc.UintptrFromInt32(0)
  12010. }
  12011. XXftMemAlloc(tls, int32(m_XFT_MEM_FILE), int32(96))
  12012. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = libc.UintptrFromInt32(0)
  12013. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12014. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = libc.UintptrFromInt32(0)
  12015. (*TXftFtFile)(unsafe.Pointer(f)).Fid = 0
  12016. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12017. (*TXftFtFile)(unsafe.Pointer(f)).Fface = face
  12018. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12019. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12020. v3 = libc.Int64FromInt32(0)
  12021. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12022. v2 = v3
  12023. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12024. v1 = v2
  12025. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12026. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12027. return f
  12028. }
  12029. func __XftNumFiles(tls *libc.TLS) (r int32) {
  12030. var count int32
  12031. var f uintptr
  12032. _, _ = count, f
  12033. count = 0
  12034. f = __XftFtFiles
  12035. for {
  12036. if !(f != 0) {
  12037. break
  12038. }
  12039. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12040. count++
  12041. }
  12042. goto _1
  12043. _1:
  12044. ;
  12045. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12046. }
  12047. return count
  12048. }
  12049. func __XftNthFile(tls *libc.TLS, n int32) (r uintptr) {
  12050. var count, v2 int32
  12051. var f uintptr
  12052. _, _, _ = count, f, v2
  12053. count = 0
  12054. f = __XftFtFiles
  12055. for {
  12056. if !(f != 0) {
  12057. break
  12058. }
  12059. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12060. v2 = count
  12061. count++
  12062. if v2 == n {
  12063. break
  12064. }
  12065. }
  12066. goto _1
  12067. _1:
  12068. ;
  12069. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12070. }
  12071. return f
  12072. }
  12073. func __XftUncacheFiles(tls *libc.TLS) {
  12074. bp := tls.Alloc(32)
  12075. defer tls.Free(32)
  12076. var f uintptr
  12077. var n, v1 int32
  12078. _, _, _ = f, n, v1
  12079. for {
  12080. v1 = __XftNumFiles(tls)
  12081. n = v1
  12082. if !(v1 > _XftMaxFreeTypeFiles) {
  12083. break
  12084. }
  12085. f = __XftNthFile(tls, libc.Xrand(tls)%n)
  12086. if f != 0 {
  12087. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12088. libc.Xprintf(tls, __ccgo_ts+895, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12089. }
  12090. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12091. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12092. }
  12093. }
  12094. }
  12095. func __XftLockFile(tls *libc.TLS, f uintptr) (r TFT_Face) {
  12096. bp := tls.Alloc(32)
  12097. defer tls.Free(32)
  12098. var v1, v2, v3 TFT_Fixed
  12099. _, _, _ = v1, v2, v3
  12100. (*TXftFtFile)(unsafe.Pointer(f)).Flock++
  12101. if !((*TXftFtFile)(unsafe.Pointer(f)).Fface != 0) {
  12102. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12103. libc.Xprintf(tls, __ccgo_ts+926, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12104. }
  12105. if libfreetype.XFT_New_Face(tls, X_XftFTlibrary, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, int64((*TXftFtFile)(unsafe.Pointer(f)).Fid), f+88) != 0 {
  12106. (*TXftFtFile)(unsafe.Pointer(f)).Flock--
  12107. }
  12108. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12109. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12110. v3 = libc.Int64FromInt32(0)
  12111. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12112. v2 = v3
  12113. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12114. v1 = v2
  12115. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12116. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12117. __XftUncacheFiles(tls)
  12118. }
  12119. return (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12120. }
  12121. func __XftLockError(tls *libc.TLS, reason uintptr) {
  12122. bp := tls.Alloc(16)
  12123. defer tls.Free(16)
  12124. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+946, libc.VaList(bp+8, reason))
  12125. }
  12126. func __XftUnlockFile(tls *libc.TLS, f uintptr) {
  12127. var v1 int32
  12128. var v2 uintptr
  12129. _, _ = v1, v2
  12130. v2 = f + 80
  12131. *(*int32)(unsafe.Pointer(v2))--
  12132. v1 = *(*int32)(unsafe.Pointer(v2))
  12133. if v1 < 0 {
  12134. __XftLockError(tls, __ccgo_ts+969)
  12135. }
  12136. }
  12137. func X_XftSetFace(tls *libc.TLS, f uintptr, xsize TFT_F26Dot6, ysize TFT_F26Dot6, matrix uintptr) (r TFcBool) {
  12138. bp := tls.Alloc(48)
  12139. defer tls.Free(48)
  12140. var best, i int32
  12141. var face TFT_Face
  12142. var v2, v3, v4, v5, v6, v7 int64
  12143. var v8, v9 bool
  12144. _, _, _, _, _, _, _, _, _, _, _ = best, face, i, v2, v3, v4, v5, v6, v7, v8, v9
  12145. face = (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12146. if (*TXftFtFile)(unsafe.Pointer(f)).Fxsize != xsize || (*TXftFtFile)(unsafe.Pointer(f)).Fysize != ysize {
  12147. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12148. libc.Xprintf(tls, __ccgo_ts+991, libc.VaList(bp+8, int32(xsize>>libc.Int32FromInt32(6)), int32(ysize>>libc.Int32FromInt32(6)), int32(xsize), int32(ysize)))
  12149. }
  12150. /*
  12151. * Bitmap only faces must match exactly, so find the closest
  12152. * one (height dominant search)
  12153. */
  12154. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  12155. best = 0
  12156. i = int32(1)
  12157. for {
  12158. if !(i < (*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_fixed_sizes) {
  12159. break
  12160. }
  12161. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12162. v2 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12163. } else {
  12164. v2 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem
  12165. }
  12166. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem < 0 {
  12167. v3 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12168. } else {
  12169. v3 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12170. }
  12171. if v9 = v2 < v3; !v9 {
  12172. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12173. v4 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12174. } else {
  12175. v4 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem
  12176. }
  12177. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem < 0 {
  12178. v5 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12179. } else {
  12180. v5 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12181. }
  12182. if v8 = v4 == v5; v8 {
  12183. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem < 0 {
  12184. v6 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem)
  12185. } else {
  12186. v6 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem
  12187. }
  12188. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem < 0 {
  12189. v7 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem)
  12190. } else {
  12191. v7 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem
  12192. }
  12193. }
  12194. }
  12195. if v9 || v8 && v6 < v7 {
  12196. best = i
  12197. }
  12198. goto _1
  12199. _1:
  12200. ;
  12201. i++
  12202. }
  12203. /*
  12204. * Freetype 2.1.7 and earlier used width/height
  12205. * for matching sizes in the BDF and PCF loaders.
  12206. * This has been fixed for 2.1.8. Because BDF and PCF
  12207. * files have but a single strike per file, we can
  12208. * simply try both sizes.
  12209. */
  12210. 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 {
  12211. return m_False
  12212. }
  12213. } else {
  12214. if libfreetype.XFT_Set_Char_Size(tls, face, xsize, ysize, uint32(0), uint32(0)) != 0 {
  12215. return m_False
  12216. }
  12217. }
  12218. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = xsize
  12219. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = ysize
  12220. }
  12221. 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) {
  12222. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12223. libc.Xprintf(tls, __ccgo_ts+1023, 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)))
  12224. }
  12225. libfreetype.XFT_Set_Transform(tls, face, matrix, libc.UintptrFromInt32(0))
  12226. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  12227. }
  12228. return int32(m_True)
  12229. }
  12230. func __XftReleaseFile(tls *libc.TLS, f uintptr) {
  12231. var prev, v2 uintptr
  12232. var v1 int32
  12233. var v4 uint64
  12234. _, _, _, _ = prev, v1, v2, v4
  12235. v2 = f + 8
  12236. *(*int32)(unsafe.Pointer(v2))--
  12237. v1 = *(*int32)(unsafe.Pointer(v2))
  12238. if v1 != 0 {
  12239. return
  12240. }
  12241. if (*TXftFtFile)(unsafe.Pointer(f)).Flock != 0 {
  12242. __XftLockError(tls, __ccgo_ts+1057)
  12243. }
  12244. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12245. prev = uintptr(unsafe.Pointer(&__XftFtFiles))
  12246. for {
  12247. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  12248. break
  12249. }
  12250. if *(*uintptr)(unsafe.Pointer(prev)) == f {
  12251. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12252. break
  12253. }
  12254. goto _3
  12255. _3:
  12256. ;
  12257. prev = *(*uintptr)(unsafe.Pointer(prev))
  12258. }
  12259. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 {
  12260. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12261. }
  12262. }
  12263. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12264. v4 = libc.Xstrlen(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile) + uint64(1)
  12265. } else {
  12266. v4 = uint64(0)
  12267. }
  12268. XXftMemFree(tls, int32(m_XFT_MEM_FILE), libc.Int32FromUint64(uint64(96)+v4))
  12269. libc.Xfree(tls, f)
  12270. }
  12271. /*
  12272. * Find a prime larger than the minimum reasonable hash size
  12273. */
  12274. func __XftSqrt(tls *libc.TLS, a TFcChar32) (r TFcChar32) {
  12275. var h, l, m TFcChar32
  12276. _, _, _ = h, l, m
  12277. l = uint32(2)
  12278. h = a / uint32(2)
  12279. for h-l > uint32(1) {
  12280. m = (h + l) >> int32(1)
  12281. if m*m < a {
  12282. l = m
  12283. } else {
  12284. h = m
  12285. }
  12286. }
  12287. return h
  12288. }
  12289. func __XftIsPrime(tls *libc.TLS, i TFcChar32) (r TFcBool) {
  12290. var l, t TFcChar32
  12291. _, _ = l, t
  12292. if i < uint32(2) {
  12293. return m_FcFalse
  12294. }
  12295. if i&uint32(1) == uint32(0) {
  12296. if i == uint32(2) {
  12297. return int32(m_FcTrue)
  12298. }
  12299. return m_FcFalse
  12300. }
  12301. l = __XftSqrt(tls, i) + uint32(1)
  12302. t = uint32(3)
  12303. for {
  12304. if !(t <= l) {
  12305. break
  12306. }
  12307. if i%t == uint32(0) {
  12308. return m_FcFalse
  12309. }
  12310. goto _1
  12311. _1:
  12312. ;
  12313. t += uint32(2)
  12314. }
  12315. return int32(m_FcTrue)
  12316. }
  12317. func __XftHashSize(tls *libc.TLS, num_unicode TFcChar32) (r TFcChar32) {
  12318. var hash TFcChar32
  12319. _ = hash
  12320. /* at least 31.25 % extra space */
  12321. hash = num_unicode + num_unicode>>libc.Int32FromInt32(2) + num_unicode>>libc.Int32FromInt32(4)
  12322. if hash&uint32(1) == uint32(0) {
  12323. hash++
  12324. }
  12325. for !(__XftIsPrime(tls, hash) != 0) {
  12326. hash += uint32(2)
  12327. }
  12328. return hash
  12329. }
  12330. func XXftLockFace(tls *libc.TLS, public uintptr) (r TFT_Face) {
  12331. var face TFT_Face
  12332. var fi, font uintptr
  12333. _, _, _ = face, fi, font
  12334. font = public
  12335. fi = font + 48
  12336. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12337. /*
  12338. * Make sure the face is usable at the requested size
  12339. */
  12340. if face != 0 && !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+48) != 0) {
  12341. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12342. face = libc.UintptrFromInt32(0)
  12343. }
  12344. return face
  12345. }
  12346. func XXftUnlockFace(tls *libc.TLS, public uintptr) {
  12347. var font uintptr
  12348. _ = font
  12349. font = public
  12350. __XftUnlockFile(tls, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)
  12351. }
  12352. func _XftFontInfoFill(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r TFcBool) {
  12353. bp := tls.Alloc(112)
  12354. defer tls.Free(112)
  12355. var hash TFcChar32
  12356. var hashp, info, v1, v10, p4, p5, p6, p7, p8 uintptr
  12357. var nhash, v9 int32
  12358. var v2, v3 TFT_Fixed
  12359. var _ /* aspect at bp+24 */ float64
  12360. var _ /* autohint at bp+48 */ TFcBool
  12361. var _ /* bitmap at bp+72 */ TFcBool
  12362. var _ /* dsize at bp+16 */ float64
  12363. var _ /* face at bp+64 */ TFT_Face
  12364. var _ /* filename at bp+0 */ uintptr
  12365. var _ /* font_matrix at bp+32 */ uintptr
  12366. var _ /* global_advance at bp+52 */ TFcBool
  12367. var _ /* hint_style at bp+56 */ int32
  12368. var _ /* hinting at bp+40 */ TFcBool
  12369. var _ /* id at bp+8 */ int32
  12370. var _ /* vertical_layout at bp+44 */ TFcBool
  12371. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hash, hashp, info, nhash, v1, v10, v2, v3, v9, p4, p5, p6, p7, p8
  12372. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12373. if !(info != 0) {
  12374. return m_FcFalse
  12375. }
  12376. /*
  12377. * Initialize the whole XftFontInfo so that padding doesn't interfere with
  12378. * hash or XftFontInfoEqual().
  12379. */
  12380. libc.Xmemset(tls, fi, int32('\000'), uint64(104))
  12381. /*
  12382. * Find the associated file
  12383. */
  12384. switch libfontconfig.XFcPatternGetString(tls, pattern, __ccgo_ts+1086, 0, bp) {
  12385. case int32(_FcResultNoMatch):
  12386. *(*uintptr)(unsafe.Pointer(bp)) = libc.UintptrFromInt32(0)
  12387. case int32(_FcResultMatch):
  12388. default:
  12389. goto bail0
  12390. }
  12391. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1091, 0, bp+8) {
  12392. case int32(_FcResultNoMatch):
  12393. *(*int32)(unsafe.Pointer(bp + 8)) = 0
  12394. case int32(_FcResultMatch):
  12395. default:
  12396. goto bail0
  12397. }
  12398. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12399. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFile(tls, *(*uintptr)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 8)))
  12400. } else {
  12401. if libfontconfig.XFcPatternGetFTFace(tls, pattern, __ccgo_ts+1097, 0, bp+64) == int32(_FcResultMatch) && *(*TFT_Face)(unsafe.Pointer(bp + 64)) != 0 {
  12402. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFaceFile(tls, *(*TFT_Face)(unsafe.Pointer(bp + 64)))
  12403. }
  12404. }
  12405. if !((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0) {
  12406. goto bail0
  12407. }
  12408. /*
  12409. * Compute pixel size
  12410. */
  12411. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1104, 0, bp+16) != int32(_FcResultMatch) {
  12412. goto bail1
  12413. }
  12414. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1114, 0, bp+24) != int32(_FcResultMatch) {
  12415. *(*float64)(unsafe.Pointer(bp + 24)) = float64(1)
  12416. }
  12417. (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize = int64(float64(*(*float64)(unsafe.Pointer(bp + 16)) * libc.Float64FromFloat64(64)))
  12418. (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize = int64(float64(float64(*(*float64)(unsafe.Pointer(bp + 16))**(*float64)(unsafe.Pointer(bp + 24))) * libc.Float64FromFloat64(64)))
  12419. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12420. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12421. v1 = *(*uintptr)(unsafe.Pointer(bp))
  12422. } else {
  12423. v1 = __ccgo_ts + 1121
  12424. }
  12425. libc.Xprintf(tls, __ccgo_ts+1128, libc.VaList(bp+88, v1, *(*int32)(unsafe.Pointer(bp + 8)), *(*float64)(unsafe.Pointer(bp + 16))))
  12426. }
  12427. /*
  12428. * Get antialias value
  12429. */
  12430. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+475, 0, fi+32) {
  12431. case int32(_FcResultNoMatch):
  12432. (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias = int32(m_True)
  12433. case int32(_FcResultMatch):
  12434. default:
  12435. goto bail1
  12436. }
  12437. /*
  12438. * Get rgba value
  12439. */
  12440. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+460, 0, fi+40) {
  12441. case int32(_FcResultNoMatch):
  12442. (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba = m_FC_RGBA_UNKNOWN
  12443. case int32(_FcResultMatch):
  12444. default:
  12445. goto bail1
  12446. }
  12447. /*
  12448. * Get lcd_filter value
  12449. */
  12450. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+465, 0, fi+44) {
  12451. case int32(_FcResultNoMatch):
  12452. (*TXftFontInfo)(unsafe.Pointer(fi)).Flcd_filter = int32(m_FC_LCD_DEFAULT)
  12453. case int32(_FcResultMatch):
  12454. default:
  12455. goto bail1
  12456. }
  12457. /*
  12458. * Get matrix and transform values
  12459. */
  12460. switch libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1165, 0, bp+32) {
  12461. case int32(_FcResultNoMatch):
  12462. v2 = libc.Int64FromInt32(0x10000)
  12463. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = v2
  12464. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = v2
  12465. v3 = libc.Int64FromInt32(0)
  12466. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = v3
  12467. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = v3
  12468. case int32(_FcResultMatch):
  12469. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxx)
  12470. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyy)
  12471. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxy)
  12472. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyx)
  12473. default:
  12474. goto bail1
  12475. }
  12476. (*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))
  12477. /*
  12478. * Get render value, set to false if no Render extension present
  12479. */
  12480. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  12481. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+453, 0, fi+88) {
  12482. case int32(_FcResultNoMatch):
  12483. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  12484. case int32(_FcResultMatch):
  12485. default:
  12486. goto bail1
  12487. }
  12488. } else {
  12489. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = m_FcFalse
  12490. }
  12491. /*
  12492. * Compute glyph load flags
  12493. */
  12494. (*TXftFontInfo)(unsafe.Pointer(fi)).Fload_flags = m_FT_LOAD_DEFAULT1
  12495. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1172, 0, bp+72) {
  12496. case int32(_FcResultNoMatch):
  12497. *(*TFcBool)(unsafe.Pointer(bp + 72)) = m_FcFalse
  12498. case int32(_FcResultMatch):
  12499. default:
  12500. goto bail1
  12501. }
  12502. /* disable bitmaps when anti-aliasing or transforming glyphs */
  12503. if !(*(*TFcBool)(unsafe.Pointer(bp + 72)) != 0) && (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12504. p4 = fi + 84
  12505. *(*TFT_Int)(unsafe.Pointer(p4)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p4))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))
  12506. }
  12507. /* disable hinting if requested */
  12508. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+513, 0, bp+40) {
  12509. case int32(_FcResultNoMatch):
  12510. *(*TFcBool)(unsafe.Pointer(bp + 40)) = int32(m_FcTrue)
  12511. case int32(_FcResultMatch):
  12512. default:
  12513. goto bail1
  12514. }
  12515. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+485, 0, fi+36) {
  12516. case int32(_FcResultNoMatch):
  12517. (*TXftFontInfo)(unsafe.Pointer(fi)).Fembolden = m_FcFalse
  12518. case int32(_FcResultMatch):
  12519. default:
  12520. goto bail1
  12521. }
  12522. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+503, 0, bp+56) {
  12523. case int32(_FcResultNoMatch):
  12524. *(*int32)(unsafe.Pointer(bp + 56)) = int32(m_FC_HINT_FULL)
  12525. case int32(_FcResultMatch):
  12526. default:
  12527. goto bail1
  12528. }
  12529. if !(*(*TFcBool)(unsafe.Pointer(bp + 40)) != 0) || *(*int32)(unsafe.Pointer(bp + 56)) == m_FC_HINT_NONE {
  12530. p5 = fi + 84
  12531. *(*TFT_Int)(unsafe.Pointer(p5)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p5))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(1))
  12532. }
  12533. /* Figure out the load target, which modifies the hinting
  12534. * behavior of FreeType based on the intended use of the glyphs.
  12535. */
  12536. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 {
  12537. if m_FC_HINT_NONE < *(*int32)(unsafe.Pointer(bp + 56)) && *(*int32)(unsafe.Pointer(bp + 56)) < int32(m_FC_HINT_FULL) {
  12538. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_LIGHT) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12539. } else {
  12540. /* autohinter will snap stems to integer widths, when
  12541. * the LCD targets are used.
  12542. */
  12543. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  12544. case int32(m_FC_RGBA_RGB):
  12545. fallthrough
  12546. case int32(m_FC_RGBA_BGR):
  12547. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_LCD) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12548. case int32(m_FC_RGBA_VRGB):
  12549. fallthrough
  12550. case int32(m_FC_RGBA_VBGR):
  12551. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_LCD_V) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12552. break
  12553. }
  12554. }
  12555. } else {
  12556. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_MONO) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12557. }
  12558. /* set vertical layout if requested */
  12559. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1187, 0, bp+44) {
  12560. case int32(_FcResultNoMatch):
  12561. *(*TFcBool)(unsafe.Pointer(bp + 44)) = m_FcFalse
  12562. case int32(_FcResultMatch):
  12563. default:
  12564. goto bail1
  12565. }
  12566. if *(*TFcBool)(unsafe.Pointer(bp + 44)) != 0 {
  12567. p6 = fi + 84
  12568. *(*TFT_Int)(unsafe.Pointer(p6)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p6))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(4))
  12569. }
  12570. /* force autohinting if requested */
  12571. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+494, 0, bp+48) {
  12572. case int32(_FcResultNoMatch):
  12573. *(*TFcBool)(unsafe.Pointer(bp + 48)) = m_FcFalse
  12574. case int32(_FcResultMatch):
  12575. default:
  12576. goto bail1
  12577. }
  12578. if *(*TFcBool)(unsafe.Pointer(bp + 48)) != 0 {
  12579. p7 = fi + 84
  12580. *(*TFT_Int)(unsafe.Pointer(p7)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p7))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(5))
  12581. }
  12582. /* disable global advance width (for broken DynaLab TT CJK fonts) */
  12583. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1202, 0, bp+52) {
  12584. case int32(_FcResultNoMatch):
  12585. *(*TFcBool)(unsafe.Pointer(bp + 52)) = int32(m_FcTrue)
  12586. case int32(_FcResultMatch):
  12587. default:
  12588. goto bail1
  12589. }
  12590. if !(*(*TFcBool)(unsafe.Pointer(bp + 52)) != 0) {
  12591. p8 = fi + 84
  12592. *(*TFT_Int)(unsafe.Pointer(p8)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p8))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(9))
  12593. }
  12594. /*
  12595. * Get requested spacing value
  12596. */
  12597. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1216, 0, fi+92) {
  12598. case int32(_FcResultNoMatch):
  12599. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = m_FC_PROPORTIONAL
  12600. case int32(_FcResultMatch):
  12601. default:
  12602. goto bail1
  12603. }
  12604. /*
  12605. * Check for minspace
  12606. */
  12607. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+521, 0, fi+96) {
  12608. case int32(_FcResultNoMatch):
  12609. (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace = m_FcFalse
  12610. case int32(_FcResultMatch):
  12611. default:
  12612. goto bail1
  12613. }
  12614. /*
  12615. * Check for fixed pixel spacing
  12616. */
  12617. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1224, 0, fi+100) {
  12618. case int32(_FcResultNoMatch):
  12619. (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width = 0
  12620. case int32(_FcResultMatch):
  12621. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  12622. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = int32(m_FC_MONO)
  12623. }
  12624. default:
  12625. goto bail1
  12626. }
  12627. /*
  12628. * Step over hash value in the structure
  12629. */
  12630. hash = uint32(0)
  12631. hashp = fi + uintptr(1)*4
  12632. nhash = libc.Int32FromUint64(libc.Uint64FromInt64(104)/libc.Uint64FromInt64(4) - libc.Uint64FromInt32(1))
  12633. for {
  12634. v9 = nhash
  12635. nhash--
  12636. if !(v9 != 0) {
  12637. break
  12638. }
  12639. v10 = hashp
  12640. hashp += 4
  12641. hash += *(*TFcChar32)(unsafe.Pointer(v10))
  12642. }
  12643. (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash = hash
  12644. /*
  12645. * All done
  12646. */
  12647. return int32(m_FcTrue)
  12648. goto bail1
  12649. bail1:
  12650. ;
  12651. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12652. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = libc.UintptrFromInt32(0)
  12653. goto bail0
  12654. bail0:
  12655. ;
  12656. return m_FcFalse
  12657. return r
  12658. }
  12659. func _XftFontInfoEmpty(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12660. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0 {
  12661. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12662. }
  12663. }
  12664. func XXftFontInfoCreate(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  12665. var fi uintptr
  12666. _ = fi
  12667. fi = libc.Xmalloc(tls, uint64(104))
  12668. if !(fi != 0) {
  12669. return libc.UintptrFromInt32(0)
  12670. }
  12671. if !(_XftFontInfoFill(tls, dpy, pattern, fi) != 0) {
  12672. libc.Xfree(tls, fi)
  12673. fi = libc.UintptrFromInt32(0)
  12674. }
  12675. XXftMemAlloc(tls, int32(m_XFT_MEM_FONT), int32(104))
  12676. return fi
  12677. }
  12678. func XXftFontInfoDestroy(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12679. _XftFontInfoEmpty(tls, dpy, fi)
  12680. XXftMemFree(tls, int32(m_XFT_MEM_FONT), int32(104))
  12681. libc.Xfree(tls, fi)
  12682. }
  12683. func XXftFontInfoHash(tls *libc.TLS, fi uintptr) (r TFcChar32) {
  12684. return (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash
  12685. }
  12686. func XXftFontInfoEqual(tls *libc.TLS, a uintptr, b uintptr) (r TFcBool) {
  12687. return libc.BoolInt32(libc.Xmemcmp(tls, a, b, uint64(104)) == 0)
  12688. }
  12689. func XXftFontOpenInfo(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r uintptr) {
  12690. bp := tls.Alloc(96)
  12691. defer tls.Free(96)
  12692. var alloc_size, ascent, descent, height, i, num_glyphs, v2 int32
  12693. var antialias TFcBool
  12694. var bucket, font, format, info, v3 uintptr
  12695. var face TFT_Face
  12696. var hash_value, num_unicode, rehash_value TFcChar32
  12697. var _ /* charset at bp+0 */ uintptr
  12698. var _ /* max_glyph_memory at bp+8 */ int32
  12699. var _ /* vector at bp+16 */ TFT_Vector
  12700. var _ /* vector at bp+32 */ TFT_Vector
  12701. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = alloc_size, antialias, ascent, bucket, descent, face, font, format, hash_value, height, i, info, num_glyphs, num_unicode, rehash_value, v2, v3
  12702. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12703. if !(info != 0) {
  12704. return libc.UintptrFromInt32(0)
  12705. }
  12706. /*
  12707. * Find a matching previously opened font
  12708. */
  12709. bucket = info + 472 + uintptr((*TXftFontInfo)(unsafe.Pointer(fi)).Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  12710. font = *(*uintptr)(unsafe.Pointer(bucket))
  12711. for {
  12712. if !(font != 0) {
  12713. break
  12714. }
  12715. if XXftFontInfoEqual(tls, font+48, fi) != 0 {
  12716. v3 = font + 152
  12717. v2 = *(*int32)(unsafe.Pointer(v3))
  12718. *(*int32)(unsafe.Pointer(v3))++
  12719. if !(v2 != 0) {
  12720. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  12721. }
  12722. libfontconfig.XFcPatternDestroy(tls, pattern)
  12723. return font
  12724. }
  12725. goto _1
  12726. _1:
  12727. ;
  12728. font = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  12729. }
  12730. /*
  12731. * No existing font, create another.
  12732. */
  12733. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  12734. libc.Xprintf(tls, __ccgo_ts+1234, 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)))
  12735. }
  12736. if libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+201, 0, bp+8) != int32(_FcResultMatch) {
  12737. *(*int32)(unsafe.Pointer(bp + 8)) = libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024)
  12738. }
  12739. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12740. if !(face != 0) {
  12741. goto bail0
  12742. }
  12743. if !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+48) != 0) {
  12744. goto bail1
  12745. }
  12746. /*
  12747. * Get the set of Unicode codepoints covered by the font.
  12748. * If the incoming pattern doesn't provide this data, go
  12749. * off and compute it. Yes, this is expensive, but it's
  12750. * required to map Unicode to glyph indices.
  12751. */
  12752. if libfontconfig.XFcPatternGetCharSet(tls, pattern, __ccgo_ts+1261, 0, bp) == int32(_FcResultMatch) {
  12753. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcCharSetCopy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  12754. } else {
  12755. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcFreeTypeCharSet(tls, face, libfontconfig.XFcConfigGetBlanks(tls, libc.UintptrFromInt32(0)))
  12756. }
  12757. antialias = (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias
  12758. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  12759. antialias = m_FcFalse
  12760. }
  12761. /*
  12762. * Find the appropriate picture format
  12763. */
  12764. if (*TXftFontInfo)(unsafe.Pointer(fi)).Frender != 0 {
  12765. if antialias != 0 {
  12766. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  12767. case int32(m_FC_RGBA_RGB):
  12768. fallthrough
  12769. case int32(m_FC_RGBA_BGR):
  12770. fallthrough
  12771. case int32(m_FC_RGBA_VRGB):
  12772. fallthrough
  12773. case int32(m_FC_RGBA_VBGR):
  12774. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  12775. default:
  12776. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  12777. break
  12778. }
  12779. } else {
  12780. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA1))
  12781. }
  12782. if !(format != 0) {
  12783. goto bail2
  12784. }
  12785. } else {
  12786. format = libc.UintptrFromInt32(0)
  12787. }
  12788. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12789. num_unicode = libfontconfig.XFcCharSetCount(tls, *(*uintptr)(unsafe.Pointer(bp)))
  12790. hash_value = __XftHashSize(tls, num_unicode)
  12791. rehash_value = hash_value - uint32(2)
  12792. } else {
  12793. num_unicode = uint32(0)
  12794. hash_value = uint32(0)
  12795. rehash_value = uint32(0)
  12796. }
  12797. /*
  12798. * Sometimes the glyphs are numbered 1..n, other times 0..n-1,
  12799. * accept either numbering scheme by making room in the table
  12800. */
  12801. num_glyphs = int32((*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_glyphs + int64(1))
  12802. alloc_size = libc.Int32FromUint64(libc.Uint64FromInt64(232) + libc.Uint64FromInt32(num_glyphs)*libc.Uint64FromInt64(8) + uint64(hash_value)*libc.Uint64FromInt64(8))
  12803. font = libc.Xmalloc(tls, libc.Uint64FromInt32(alloc_size))
  12804. if !(font != 0) {
  12805. goto bail2
  12806. }
  12807. XXftMemAlloc(tls, int32(m_XFT_MEM_FONT), alloc_size)
  12808. /*
  12809. * Public fields
  12810. */
  12811. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12812. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  12813. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender
  12814. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+48)
  12815. descent = int32(-((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> int32(6)))
  12816. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  12817. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender
  12818. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+48)
  12819. ascent = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> int32(6))
  12820. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  12821. height = ascent + descent
  12822. } else {
  12823. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  12824. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight
  12825. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+48)
  12826. height = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> int32(6))
  12827. }
  12828. } else {
  12829. descent = int32(-((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender >> int32(6)))
  12830. ascent = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender >> int32(6))
  12831. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  12832. height = ascent + descent
  12833. } else {
  12834. height = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight >> int32(6))
  12835. }
  12836. }
  12837. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fascent = ascent
  12838. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fdescent = descent
  12839. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fheight = height
  12840. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  12841. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width
  12842. } else {
  12843. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12844. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  12845. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = 0
  12846. libfreetype.XFT_Vector_Transform(tls, bp+32, fi+48)
  12847. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx >> int32(6))
  12848. } else {
  12849. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance >> int32(6))
  12850. }
  12851. }
  12852. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset = *(*uintptr)(unsafe.Pointer(bp))
  12853. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern = pattern
  12854. /*
  12855. * Management fields
  12856. */
  12857. (*TXftFontInt)(unsafe.Pointer(font)).Fref = int32(1)
  12858. (*TXftFontInt)(unsafe.Pointer(font)).Fnext = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  12859. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = font
  12860. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next = *(*uintptr)(unsafe.Pointer(bucket))
  12861. *(*uintptr)(unsafe.Pointer(bucket)) = font
  12862. /*
  12863. * Copy the info over
  12864. */
  12865. (*TXftFontInt)(unsafe.Pointer(font)).Finfo = *(*TXftFontInfo)(unsafe.Pointer(fi))
  12866. /*
  12867. * reset the antialias field. It can't
  12868. * be set correctly until the font is opened,
  12869. * which doesn't happen in XftFontInfoFill
  12870. */
  12871. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias = antialias
  12872. /*
  12873. * bump XftFile reference count
  12874. */
  12875. (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Fref++
  12876. /*
  12877. * Per glyph information
  12878. */
  12879. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs = font + libc.UintptrFromInt32(1)*232
  12880. libc.Xmemset(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs, int32('\000'), libc.Uint64FromInt32(num_glyphs)*uint64(8))
  12881. (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs = num_glyphs
  12882. /*
  12883. * Unicode hash table information
  12884. */
  12885. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_table = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*8
  12886. i = 0
  12887. for {
  12888. if !(libc.Uint32FromInt32(i) < hash_value) {
  12889. break
  12890. }
  12891. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fucs4 = libc.Uint32FromInt32(^libc.Int32FromInt32(0))
  12892. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fglyph = uint32(0)
  12893. goto _4
  12894. _4:
  12895. ;
  12896. i++
  12897. }
  12898. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_value = libc.Int32FromUint32(hash_value)
  12899. (*TXftFontInt)(unsafe.Pointer(font)).Frehash_value = libc.Int32FromUint32(rehash_value)
  12900. /*
  12901. * X specific fields
  12902. */
  12903. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  12904. (*TXftFontInt)(unsafe.Pointer(font)).Fformat = format
  12905. /*
  12906. * Glyph memory management fields
  12907. */
  12908. (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory = uint64(0)
  12909. (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory = libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 8)))
  12910. (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs
  12911. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12912. return font
  12913. goto bail2
  12914. bail2:
  12915. ;
  12916. libfontconfig.XFcCharSetDestroy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  12917. goto bail1
  12918. bail1:
  12919. ;
  12920. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12921. goto bail0
  12922. bail0:
  12923. ;
  12924. return libc.UintptrFromInt32(0)
  12925. return r
  12926. }
  12927. func XXftFontOpenPattern(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  12928. bp := tls.Alloc(112)
  12929. defer tls.Free(112)
  12930. var font uintptr
  12931. var _ /* info at bp+0 */ TXftFontInfo
  12932. _ = font
  12933. if !(_XftFontInfoFill(tls, dpy, pattern, bp) != 0) {
  12934. return libc.UintptrFromInt32(0)
  12935. }
  12936. font = XXftFontOpenInfo(tls, dpy, pattern, bp)
  12937. _XftFontInfoEmpty(tls, dpy, bp)
  12938. return font
  12939. }
  12940. func XXftFontCopy(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  12941. var font uintptr
  12942. _ = font
  12943. font = public
  12944. (*TXftFontInt)(unsafe.Pointer(font)).Fref++
  12945. return public
  12946. }
  12947. func _XftFontDestroy(tls *libc.TLS, dpy uintptr, public uintptr) {
  12948. var font, info, xftg uintptr
  12949. var i int32
  12950. _, _, _, _ = font, i, info, xftg
  12951. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  12952. font = public
  12953. /* note reduction in memory use */
  12954. if info != 0 {
  12955. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  12956. }
  12957. /* Clean up the info */
  12958. _XftFontInfoEmpty(tls, dpy, font+48)
  12959. /* Free the glyphset */
  12960. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  12961. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  12962. }
  12963. /* Free the glyphs */
  12964. i = 0
  12965. for {
  12966. if !(i < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  12967. break
  12968. }
  12969. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(i)*8))
  12970. if xftg != 0 {
  12971. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  12972. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  12973. }
  12974. libc.Xfree(tls, xftg)
  12975. }
  12976. goto _1
  12977. _1:
  12978. ;
  12979. i++
  12980. }
  12981. /* Free the pattern and the charset */
  12982. libfontconfig.XFcPatternDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern)
  12983. libfontconfig.XFcCharSetDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset)
  12984. /* Finally, free the font structure */
  12985. XXftMemFree(tls, int32(m_XFT_MEM_FONT), libc.Int32FromUint64(uint64(232)+libc.Uint64FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*uint64(8)+libc.Uint64FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)*uint64(8)))
  12986. libc.Xfree(tls, font)
  12987. }
  12988. func _XftFontFindNthUnref(tls *libc.TLS, info uintptr, n int32) (r uintptr) {
  12989. var font, public uintptr
  12990. var v2 int32
  12991. var v3 bool
  12992. _, _, _, _ = font, public, v2, v3
  12993. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  12994. for {
  12995. if !(public != 0) {
  12996. break
  12997. }
  12998. font = public
  12999. if v3 = !((*TXftFontInt)(unsafe.Pointer(font)).Fref != 0); v3 {
  13000. v2 = n
  13001. n--
  13002. }
  13003. if v3 && !(v2 != 0) {
  13004. break
  13005. }
  13006. goto _1
  13007. _1:
  13008. ;
  13009. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13010. }
  13011. return public
  13012. }
  13013. func XXftFontManageMemory(tls *libc.TLS, dpy uintptr) {
  13014. bp := tls.Alloc(48)
  13015. defer tls.Free(48)
  13016. var font, info, prev, public uintptr
  13017. _, _, _, _ = font, info, prev, public
  13018. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13019. if !(info != 0) {
  13020. return
  13021. }
  13022. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts {
  13023. public = _XftFontFindNthUnref(tls, info, libc.Xrand(tls)%(*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts)
  13024. font = public
  13025. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13026. libc.Xprintf(tls, __ccgo_ts+1269, 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)))
  13027. }
  13028. /* Unhook from display list */
  13029. prev = info + 40
  13030. for {
  13031. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13032. break
  13033. }
  13034. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13035. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13036. break
  13037. }
  13038. goto _1
  13039. _1:
  13040. ;
  13041. prev = *(*uintptr)(unsafe.Pointer(prev)) + 32
  13042. }
  13043. /* Unhook from hash list */
  13044. prev = info + 472 + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  13045. for {
  13046. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13047. break
  13048. }
  13049. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13050. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  13051. break
  13052. }
  13053. goto _2
  13054. _2:
  13055. ;
  13056. prev = *(*uintptr)(unsafe.Pointer(prev)) + 40
  13057. }
  13058. /* Destroy the font */
  13059. _XftFontDestroy(tls, dpy, public)
  13060. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  13061. }
  13062. }
  13063. func XXftFontClose(tls *libc.TLS, dpy uintptr, public uintptr) {
  13064. var font, info, v2 uintptr
  13065. var v1 int32
  13066. _, _, _, _ = font, info, v1, v2
  13067. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13068. font = public
  13069. v2 = font + 152
  13070. *(*int32)(unsafe.Pointer(v2))--
  13071. v1 = *(*int32)(unsafe.Pointer(v2))
  13072. if v1 != 0 {
  13073. return
  13074. }
  13075. if info != 0 {
  13076. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts++
  13077. XXftFontManageMemory(tls, dpy)
  13078. } else {
  13079. _XftFontDestroy(tls, dpy, public)
  13080. }
  13081. }
  13082. func XXftInitFtLibrary(tls *libc.TLS) (r TFcBool) {
  13083. if X_XftFTlibrary != 0 {
  13084. return int32(m_FcTrue)
  13085. }
  13086. if libfreetype.XFT_Init_FreeType(tls, uintptr(unsafe.Pointer(&X_XftFTlibrary))) != 0 {
  13087. return m_FcFalse
  13088. }
  13089. return int32(m_FcTrue)
  13090. }
  13091. const m_FT_LCD_FILTER_FIVE_TAPS = 5
  13092. const m_FT_LOAD_DEFAULT2 = 0x0
  13093. const m_FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY"
  13094. const m_FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY"
  13095. type TFT_Orientation = int32
  13096. type _FT_Orientation_ = int32
  13097. const _FT_ORIENTATION_TRUETYPE = 0
  13098. const _FT_ORIENTATION_POSTSCRIPT = 1
  13099. const _FT_ORIENTATION_FILL_RIGHT = 0
  13100. const _FT_ORIENTATION_FILL_LEFT = 1
  13101. const _FT_ORIENTATION_NONE = 2
  13102. type TFT_LcdFilter = int32
  13103. type _FT_LcdFilter_ = int32
  13104. const _FT_LCD_FILTER_NONE = 0
  13105. const _FT_LCD_FILTER_DEFAULT = 1
  13106. const _FT_LCD_FILTER_LIGHT = 2
  13107. const _FT_LCD_FILTER_LEGACY1 = 3
  13108. const _FT_LCD_FILTER_LEGACY = 16
  13109. const _FT_LCD_FILTER_MAX = 17
  13110. type TFT_LcdFiveTapFilter = [5]TFT_Byte
  13111. /* */
  13112. /* END */
  13113. /*
  13114. * Validate the memory info for a font
  13115. */
  13116. func __XftFontValidateMemory(tls *libc.TLS, dpy uintptr, public uintptr) {
  13117. bp := tls.Alloc(32)
  13118. defer tls.Free(32)
  13119. var font, xftg uintptr
  13120. var glyph_memory uint64
  13121. var glyphindex TFT_UInt
  13122. _, _, _, _ = font, glyph_memory, glyphindex, xftg
  13123. font = public
  13124. glyph_memory = uint64(0)
  13125. glyphindex = uint32(0)
  13126. for {
  13127. if !(glyphindex < libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)) {
  13128. break
  13129. }
  13130. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  13131. if xftg != 0 {
  13132. glyph_memory += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13133. }
  13134. goto _1
  13135. _1:
  13136. ;
  13137. glyphindex++
  13138. }
  13139. if glyph_memory != (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory {
  13140. libc.Xprintf(tls, __ccgo_ts+1313, libc.VaList(bp+8, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, glyph_memory))
  13141. }
  13142. }
  13143. // C documentation
  13144. //
  13145. // /* we sometimes need to convert the glyph bitmap in a FT_GlyphSlot
  13146. // * into a different format. For example, we want to convert a
  13147. // * FT_PIXEL_MODE_LCD or FT_PIXEL_MODE_LCD_V bitmap into a 32-bit
  13148. // * ARGB or ABGR bitmap.
  13149. // *
  13150. // * this function prepares a target descriptor for this operation.
  13151. // *
  13152. // * input :: target bitmap descriptor. The function will set its
  13153. // * 'width', 'rows' and 'pitch' fields, and only these
  13154. // *
  13155. // * slot :: the glyph slot containing the source bitmap. this
  13156. // * function assumes that slot->format == FT_GLYPH_FORMAT_BITMAP
  13157. // *
  13158. // * mode :: the requested final rendering mode. supported values are
  13159. // * MONO, NORMAL (i.e. gray), LCD and LCD_V
  13160. // *
  13161. // * the function returns the size in bytes of the corresponding buffer,
  13162. // * it's up to the caller to allocate the corresponding memory block
  13163. // * before calling _fill_xrender_bitmap
  13164. // *
  13165. // * it also returns -1 in case of error (e.g. incompatible arguments,
  13166. // * like trying to convert a gray bitmap into a monochrome one)
  13167. // */
  13168. func __compute_xrender_bitmap_size(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode) (r int32) {
  13169. var ftbit uintptr
  13170. var height, pitch, width int32
  13171. _, _, _, _ = ftbit, height, pitch, width
  13172. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(slot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13173. return -int32(1)
  13174. }
  13175. // compute the size of the final bitmap
  13176. ftbit = slot + 152
  13177. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13178. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13179. pitch = (width + int32(3)) & ^libc.Int32FromInt32(3)
  13180. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13181. case int32(_FT_PIXEL_MODE_MONO):
  13182. if mode == int32(_FT_RENDER_MODE_MONO) {
  13183. pitch = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  13184. break
  13185. }
  13186. /* fall-through */
  13187. fallthrough
  13188. case int32(_FT_PIXEL_MODE_GRAY):
  13189. if mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V) {
  13190. /* each pixel is replicated into a 32-bit ARGB value */
  13191. pitch = width * int32(4)
  13192. }
  13193. case int32(_FT_PIXEL_MODE_LCD):
  13194. if mode != int32(_FT_RENDER_MODE_LCD) {
  13195. return -int32(1)
  13196. }
  13197. /* horz pixel triplets are packed into 32-bit ARGB values */
  13198. width /= int32(3)
  13199. pitch = width * int32(4)
  13200. case int32(_FT_PIXEL_MODE_LCD_V):
  13201. if mode != int32(_FT_RENDER_MODE_LCD_V) {
  13202. return -int32(1)
  13203. }
  13204. /* vert pixel triplets are packed into 32-bit ARGB values */
  13205. height /= int32(3)
  13206. pitch = width * int32(4)
  13207. default: /* unsupported source format */
  13208. return -int32(1)
  13209. }
  13210. (*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth = libc.Uint32FromInt32(width)
  13211. (*TFT_Bitmap)(unsafe.Pointer(target)).Frows = libc.Uint32FromInt32(height)
  13212. (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch = pitch
  13213. (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer = libc.UintptrFromInt32(0)
  13214. return pitch * height
  13215. }
  13216. // C documentation
  13217. //
  13218. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13219. // * into a different format (see _compute_xrender_bitmap_size)
  13220. // *
  13221. // * you should call this function after _compute_xrender_bitmap_size
  13222. // *
  13223. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13224. // * must point to memory allocated by the caller
  13225. // *
  13226. // * slot :: the glyph slot containing the source bitmap
  13227. // *
  13228. // * mode :: the requested final rendering mode
  13229. // *
  13230. // * bgr :: boolean, set if BGR or VBGR pixel ordering is needed
  13231. // */
  13232. func __fill_xrender_bitmap(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, bgr int32) {
  13233. var bytes, h, height, pitch, src_pitch, subpixel, width, x, x1, x2, x3, x4, x5, x6 int32
  13234. var dst, dst1, dst2, dst3, dst4, dstLine, ftbit, src, src1, src2, src3, srcLine uintptr
  13235. var pix, pix1, pix2, pix3, pix4 uint32
  13236. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13237. ftbit = slot + 152
  13238. srcLine = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  13239. dstLine = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13240. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch
  13241. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13242. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13243. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13244. subpixel = libc.BoolInt32(mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V))
  13245. if src_pitch < 0 {
  13246. srcLine -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows - uint32(1)))
  13247. }
  13248. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13249. case int32(_FT_PIXEL_MODE_MONO):
  13250. if subpixel != 0 { /* convert mono to ARGB32 values */
  13251. h = height
  13252. for {
  13253. if !(h > 0) {
  13254. break
  13255. }
  13256. x = 0
  13257. for {
  13258. if !(x < width) {
  13259. break
  13260. }
  13261. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x&int32(7))) != 0 {
  13262. *(*uint32)(unsafe.Pointer(dstLine + uintptr(x)*4)) = uint32(0xffffffff)
  13263. }
  13264. goto _2
  13265. _2:
  13266. ;
  13267. x++
  13268. }
  13269. goto _1
  13270. _1:
  13271. ;
  13272. h--
  13273. srcLine += uintptr(src_pitch)
  13274. dstLine += uintptr(pitch)
  13275. }
  13276. } else {
  13277. if mode == int32(_FT_RENDER_MODE_NORMAL) { /* convert mono to 8-bit gray */
  13278. h = height
  13279. for {
  13280. if !(h > 0) {
  13281. break
  13282. }
  13283. x1 = 0
  13284. for {
  13285. if !(x1 < width) {
  13286. break
  13287. }
  13288. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x1>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x1&int32(7))) != 0 {
  13289. *(*uint8)(unsafe.Pointer(dstLine + uintptr(x1))) = uint8(0xff)
  13290. }
  13291. goto _4
  13292. _4:
  13293. ;
  13294. x1++
  13295. }
  13296. goto _3
  13297. _3:
  13298. ;
  13299. h--
  13300. srcLine += uintptr(src_pitch)
  13301. dstLine += uintptr(pitch)
  13302. }
  13303. } else { /* copy mono to mono */
  13304. bytes = (width + int32(7)) >> int32(3)
  13305. h = height
  13306. for {
  13307. if !(h > 0) {
  13308. break
  13309. }
  13310. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(bytes))
  13311. goto _5
  13312. _5:
  13313. ;
  13314. h--
  13315. srcLine += uintptr(src_pitch)
  13316. dstLine += uintptr(pitch)
  13317. }
  13318. }
  13319. }
  13320. case int32(_FT_PIXEL_MODE_GRAY):
  13321. if subpixel != 0 { /* convert gray to ARGB32 values */
  13322. h = height
  13323. for {
  13324. if !(h > 0) {
  13325. break
  13326. }
  13327. dst = dstLine
  13328. x2 = 0
  13329. for {
  13330. if !(x2 < width) {
  13331. break
  13332. }
  13333. pix = uint32(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x2))))
  13334. pix |= pix << int32(8)
  13335. pix |= pix << int32(16)
  13336. *(*uint32)(unsafe.Pointer(dst + uintptr(x2)*4)) = pix
  13337. goto _7
  13338. _7:
  13339. ;
  13340. x2++
  13341. }
  13342. goto _6
  13343. _6:
  13344. ;
  13345. h--
  13346. srcLine += uintptr(src_pitch)
  13347. dstLine += uintptr(pitch)
  13348. }
  13349. } else { /* copy gray into gray */
  13350. h = height
  13351. for {
  13352. if !(h > 0) {
  13353. break
  13354. }
  13355. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(width))
  13356. goto _8
  13357. _8:
  13358. ;
  13359. h--
  13360. srcLine += uintptr(src_pitch)
  13361. dstLine += uintptr(pitch)
  13362. }
  13363. }
  13364. case int32(_FT_PIXEL_MODE_LCD):
  13365. if !(bgr != 0) {
  13366. /* convert horizontal RGB into ARGB32 */
  13367. h = height
  13368. for {
  13369. if !(h > 0) {
  13370. break
  13371. }
  13372. src = srcLine
  13373. dst1 = dstLine
  13374. x3 = 0
  13375. for {
  13376. if !(x3 < width) {
  13377. break
  13378. }
  13379. 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)
  13380. *(*uint32)(unsafe.Pointer(dst1 + uintptr(x3)*4)) = pix1
  13381. goto _10
  13382. _10:
  13383. ;
  13384. x3++
  13385. src += uintptr(3)
  13386. }
  13387. goto _9
  13388. _9:
  13389. ;
  13390. h--
  13391. srcLine += uintptr(src_pitch)
  13392. dstLine += uintptr(pitch)
  13393. }
  13394. } else {
  13395. /* convert horizontal BGR into ARGB32 */
  13396. h = height
  13397. for {
  13398. if !(h > 0) {
  13399. break
  13400. }
  13401. src1 = srcLine
  13402. dst2 = dstLine
  13403. x4 = 0
  13404. for {
  13405. if !(x4 < width) {
  13406. break
  13407. }
  13408. 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)
  13409. *(*uint32)(unsafe.Pointer(dst2 + uintptr(x4)*4)) = pix2
  13410. goto _12
  13411. _12:
  13412. ;
  13413. x4++
  13414. src1 += uintptr(3)
  13415. }
  13416. goto _11
  13417. _11:
  13418. ;
  13419. h--
  13420. srcLine += uintptr(src_pitch)
  13421. dstLine += uintptr(pitch)
  13422. }
  13423. }
  13424. default: /* FT_PIXEL_MODE_LCD_V */
  13425. /* convert vertical RGB into ARGB32 */
  13426. if !(bgr != 0) {
  13427. h = height
  13428. for {
  13429. if !(h > 0) {
  13430. break
  13431. }
  13432. src2 = srcLine
  13433. dst3 = dstLine
  13434. x5 = 0
  13435. for {
  13436. if !(x5 < width) {
  13437. break
  13438. }
  13439. 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)
  13440. *(*uint32)(unsafe.Pointer(dst3 + uintptr(x5)*4)) = pix3
  13441. goto _14
  13442. _14:
  13443. ;
  13444. x5++
  13445. src2 += uintptr(1)
  13446. }
  13447. goto _13
  13448. _13:
  13449. ;
  13450. h--
  13451. srcLine += uintptr(int32(3) * src_pitch)
  13452. dstLine += uintptr(pitch)
  13453. }
  13454. } else {
  13455. h = height
  13456. for {
  13457. if !(h > 0) {
  13458. break
  13459. }
  13460. src3 = srcLine
  13461. dst4 = dstLine
  13462. x6 = 0
  13463. for {
  13464. if !(x6 < width) {
  13465. break
  13466. }
  13467. 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)
  13468. *(*uint32)(unsafe.Pointer(dst4 + uintptr(x6)*4)) = pix4
  13469. goto _16
  13470. _16:
  13471. ;
  13472. x6++
  13473. src3 += uintptr(1)
  13474. }
  13475. goto _15
  13476. _15:
  13477. ;
  13478. h--
  13479. srcLine += uintptr(int32(3) * src_pitch)
  13480. dstLine += uintptr(pitch)
  13481. }
  13482. }
  13483. }
  13484. }
  13485. func XXftFontLoadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyphs uintptr, nglyph int32) {
  13486. bp := tls.Alloc(4256)
  13487. defer tls.Free(4256)
  13488. var adjust, adjust1, bottom, bufSize, c, height, i, left, right, size, top, width, x, xc, y, yc, v1, v13, v14, v3, v4, v5, v8, v9 int32
  13489. var bufBitmap, font, ftbit, info, line, line1, xftg, v15, v2 uintptr
  13490. var error1 TFT_Error
  13491. var face TFT_Face
  13492. var glyphindex TFT_UInt
  13493. var glyphslot TFT_GlyphSlot
  13494. var mode TFT_Render_Mode
  13495. var _ /* bufLocal at bp+8 */ [4096]uint8
  13496. var _ /* glyph at bp+0 */ TGlyph
  13497. var _ /* local at bp+4104 */ TFT_Bitmap
  13498. var _ /* vector at bp+4144 */ TFT_Vector
  13499. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = adjust, adjust1, bottom, bufBitmap, bufSize, c, error1, face, font, ftbit, glyphindex, glyphslot, height, i, info, left, line, line1, mode, right, size, top, width, x, xc, xftg, y, yc, v1, v13, v14, v15, v2, v3, v4, v5, v8, v9
  13500. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  13501. font = pub
  13502. bufBitmap = bp + 8
  13503. bufSize = int32(4096)
  13504. mode = int32(_FT_RENDER_MODE_MONO)
  13505. if !(info != 0) {
  13506. return
  13507. }
  13508. face = XXftLockFace(tls, font)
  13509. if !(face != 0) {
  13510. return
  13511. }
  13512. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  13513. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  13514. case int32(m_FC_RGBA_RGB):
  13515. fallthrough
  13516. case int32(m_FC_RGBA_BGR):
  13517. mode = int32(_FT_RENDER_MODE_LCD)
  13518. case int32(m_FC_RGBA_VRGB):
  13519. fallthrough
  13520. case int32(m_FC_RGBA_VBGR):
  13521. mode = int32(_FT_RENDER_MODE_LCD_V)
  13522. default:
  13523. mode = int32(_FT_RENDER_MODE_NORMAL)
  13524. }
  13525. }
  13526. for {
  13527. v1 = nglyph
  13528. nglyph--
  13529. if !(v1 != 0) {
  13530. break
  13531. }
  13532. v2 = glyphs
  13533. glyphs += 4
  13534. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  13535. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  13536. if !(xftg != 0) {
  13537. continue
  13538. }
  13539. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13540. __XftFontValidateMemory(tls, dpy, pub)
  13541. }
  13542. /*
  13543. * Check to see if this glyph has just been loaded,
  13544. * this happens when drawing the same glyph twice
  13545. * in a single string
  13546. */
  13547. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  13548. continue
  13549. }
  13550. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Flcd_filter)
  13551. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)
  13552. if error1 != 0 {
  13553. /*
  13554. * If anti-aliasing or transforming glyphs and
  13555. * no outline version exists, fallback to the
  13556. * bitmap and let things look bad instead of
  13557. * missing the glyph
  13558. */
  13559. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3)) != 0 {
  13560. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, int32(int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags) & ^(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))))
  13561. }
  13562. if error1 != 0 {
  13563. continue
  13564. }
  13565. }
  13566. glyphslot = (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph
  13567. /*
  13568. * Embolden if required
  13569. */
  13570. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fembolden != 0 {
  13571. libfreetype.XFT_GlyphSlot_Embolden(tls, glyphslot)
  13572. }
  13573. /*
  13574. * Compute glyph metrics from FreeType information
  13575. */
  13576. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0 && (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13577. v5 = libc.Int32FromInt32(0)
  13578. bottom = v5
  13579. v4 = v5
  13580. top = v4
  13581. v3 = v4
  13582. right = v3
  13583. left = v3
  13584. xc = 0
  13585. for {
  13586. if !(xc <= int32(1)) {
  13587. break
  13588. }
  13589. yc = 0
  13590. for {
  13591. if !(yc <= int32(1)) {
  13592. break
  13593. }
  13594. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + int64(xc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth
  13595. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - int64(yc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight
  13596. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+48)
  13597. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  13598. libc.Xprintf(tls, __ccgo_ts+1372, libc.VaList(bp+4168, xc, yc, int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx), int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)))
  13599. }
  13600. if xc == 0 && yc == 0 {
  13601. v8 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  13602. right = v8
  13603. left = v8
  13604. v9 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  13605. bottom = v9
  13606. top = v9
  13607. } else {
  13608. if int64(left) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  13609. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  13610. }
  13611. if int64(right) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  13612. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  13613. }
  13614. if int64(bottom) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  13615. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  13616. }
  13617. if int64(top) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  13618. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  13619. }
  13620. }
  13621. goto _7
  13622. _7:
  13623. ;
  13624. yc++
  13625. }
  13626. goto _6
  13627. _6:
  13628. ;
  13629. xc++
  13630. }
  13631. left = left & -int32(64)
  13632. right = (right + int32(63)) & -int32(64)
  13633. bottom = bottom & -int32(64)
  13634. top = (top + int32(63)) & -int32(64)
  13635. } else {
  13636. left = int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX & int64(-libc.Int32FromInt32(64)))
  13637. right = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  13638. top = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  13639. bottom = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight) & int64(-libc.Int32FromInt32(64)))
  13640. }
  13641. width = (right - left) >> int32(6)
  13642. height = (top - bottom) >> int32(6)
  13643. /*
  13644. * Clip charcell glyphs to the bounding box
  13645. * XXX transformed?
  13646. */
  13647. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_CHARCELL) && !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0) {
  13648. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  13649. if bottom>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  13650. adjust = bottom - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  13651. if adjust > top {
  13652. adjust = top
  13653. }
  13654. top -= adjust
  13655. bottom -= adjust
  13656. height = (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width
  13657. }
  13658. } else {
  13659. if right>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  13660. adjust1 = right - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  13661. if adjust1 > left {
  13662. adjust1 = left
  13663. }
  13664. left -= adjust1
  13665. right -= adjust1
  13666. width = (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width
  13667. }
  13668. }
  13669. }
  13670. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13671. error1 = libfreetype.XFT_Render_Glyph(tls, (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph, mode)
  13672. if error1 != 0 {
  13673. continue
  13674. }
  13675. }
  13676. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, int32(_FT_LCD_FILTER_NONE))
  13677. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_MONO) {
  13678. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0 {
  13679. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  13680. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = 0
  13681. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = -(*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  13682. } else {
  13683. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  13684. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = 0
  13685. }
  13686. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+48)
  13687. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx >> int32(6))
  13688. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy >> int32(6)))
  13689. } else {
  13690. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  13691. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = 0
  13692. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  13693. } else {
  13694. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16((*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  13695. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = 0
  13696. }
  13697. }
  13698. } else {
  13699. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fx + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  13700. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fy + int64(32)) & int64(-int32(64)) >> int32(6)))
  13701. }
  13702. // compute the size of the final bitmap
  13703. ftbit = glyphslot + 152
  13704. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13705. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13706. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  13707. libc.Xprintf(tls, __ccgo_ts+1392, libc.VaList(bp+4168, libc.Int32FromUint32(glyphindex)))
  13708. libc.Xprintf(tls, __ccgo_ts+1403, libc.VaList(bp+4168, 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))
  13709. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPHV) != 0 {
  13710. line = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  13711. if (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch < 0 {
  13712. line -= uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch * (height - int32(1)))
  13713. }
  13714. y = 0
  13715. for {
  13716. if !(y < height) {
  13717. break
  13718. }
  13719. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  13720. x = 0
  13721. for {
  13722. if !(x < width) {
  13723. break
  13724. }
  13725. libc.Xprintf(tls, __ccgo_ts+1456, libc.VaList(bp+4168, libc.Int32FromUint8(_den[libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x))))>>int32(5)])))
  13726. goto _11
  13727. _11:
  13728. ;
  13729. x++
  13730. }
  13731. } else {
  13732. x = 0
  13733. for {
  13734. if !(x < width*int32(8)) {
  13735. break
  13736. }
  13737. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x>>int32(3)))))&(int32(1)<<(x&int32(7))) != 0 {
  13738. v13 = int32('#')
  13739. } else {
  13740. v13 = int32(' ')
  13741. }
  13742. libc.Xprintf(tls, __ccgo_ts+1456, libc.VaList(bp+4168, v13))
  13743. goto _12
  13744. _12:
  13745. ;
  13746. x++
  13747. }
  13748. }
  13749. libc.Xprintf(tls, __ccgo_ts+1459, 0)
  13750. line += uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch)
  13751. goto _10
  13752. _10:
  13753. ;
  13754. y++
  13755. }
  13756. libc.Xprintf(tls, __ccgo_ts+1462, 0)
  13757. }
  13758. }
  13759. size = __compute_xrender_bitmap_size(tls, bp+4104, glyphslot, mode)
  13760. if size < 0 {
  13761. continue
  13762. }
  13763. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth)
  13764. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows)
  13765. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16(-(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left)
  13766. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top)
  13767. /*
  13768. * If the glyph is relatively large (> 1% of server memory),
  13769. * don't send it until necessary.
  13770. */
  13771. if !(need_bitmaps != 0) && libc.Uint64FromInt32(size) > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory/uint64(100) {
  13772. continue
  13773. }
  13774. /*
  13775. * Make sure there is enough buffer space for the glyph.
  13776. */
  13777. if size > bufSize {
  13778. if bufBitmap != bp+8 {
  13779. libc.Xfree(tls, bufBitmap)
  13780. }
  13781. bufBitmap = libc.Xmalloc(tls, libc.Uint64FromInt32(size))
  13782. if !(bufBitmap != 0) {
  13783. continue
  13784. }
  13785. bufSize = size
  13786. }
  13787. libc.Xmemset(tls, bufBitmap, 0, libc.Uint64FromInt32(size))
  13788. (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fbuffer = bufBitmap
  13789. __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)))
  13790. /*
  13791. * Copy or convert into local buffer.
  13792. */
  13793. /*
  13794. * Use the glyph index as the wire encoding; it
  13795. * might be more efficient for some locales to map
  13796. * these by first usage to smaller values, but that
  13797. * would require persistently storing the map when
  13798. * glyphs were freed.
  13799. */
  13800. *(*TGlyph)(unsafe.Pointer(bp)) = uint64(glyphindex)
  13801. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = libc.Uint64FromInt32(size) + uint64(32)
  13802. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  13803. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  13804. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = libxrender.XXRenderCreateGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fformat)
  13805. }
  13806. if mode == int32(_FT_RENDER_MODE_MONO) {
  13807. /* swap bits in each byte */
  13808. if (*struct {
  13809. Fext_data uintptr
  13810. Fprivate1 uintptr
  13811. Ffd int32
  13812. Fprivate2 int32
  13813. Fproto_major_version int32
  13814. Fproto_minor_version int32
  13815. Fvendor uintptr
  13816. Fprivate3 TXID
  13817. Fprivate4 TXID
  13818. Fprivate5 TXID
  13819. Fprivate6 int32
  13820. Fresource_alloc uintptr
  13821. Fbyte_order int32
  13822. Fbitmap_unit int32
  13823. Fbitmap_pad int32
  13824. Fbitmap_bit_order int32
  13825. Fnformats int32
  13826. Fpixmap_format uintptr
  13827. Fprivate8 int32
  13828. Frelease int32
  13829. Fprivate9 uintptr
  13830. Fprivate10 uintptr
  13831. Fqlen int32
  13832. Flast_request_read uint64
  13833. Frequest uint64
  13834. Fprivate11 TXPointer
  13835. Fprivate12 TXPointer
  13836. Fprivate13 TXPointer
  13837. Fprivate14 TXPointer
  13838. Fmax_request_size uint32
  13839. Fdb uintptr
  13840. Fprivate15 uintptr
  13841. Fdisplay_name uintptr
  13842. Fdefault_screen int32
  13843. Fnscreens int32
  13844. Fscreens uintptr
  13845. Fmotion_buffer uint64
  13846. Fprivate16 uint64
  13847. Fmin_keycode int32
  13848. Fmax_keycode int32
  13849. Fprivate17 TXPointer
  13850. Fprivate18 TXPointer
  13851. Fprivate19 int32
  13852. Fxdefaults uintptr
  13853. })(unsafe.Pointer(dpy)).Fbitmap_bit_order != int32(m_MSBFirst) {
  13854. line1 = bufBitmap
  13855. i = size
  13856. for {
  13857. v14 = i
  13858. i--
  13859. if !(v14 != 0) {
  13860. break
  13861. }
  13862. c = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line1)))
  13863. c = c<<int32(1)&int32(0xaa) | c>>int32(1)&int32(0x55)
  13864. c = c<<int32(2)&int32(0xcc) | c>>int32(2)&int32(0x33)
  13865. c = c<<int32(4)&int32(0xf0) | c>>int32(4)&int32(0x0f)
  13866. v15 = line1
  13867. line1++
  13868. *(*uint8)(unsafe.Pointer(v15)) = libc.Uint8FromInt32(c)
  13869. }
  13870. }
  13871. } else {
  13872. if mode != int32(_FT_RENDER_MODE_NORMAL) {
  13873. /* invert ARGB <=> BGRA */
  13874. if (*struct {
  13875. Fext_data uintptr
  13876. Fprivate1 uintptr
  13877. Ffd int32
  13878. Fprivate2 int32
  13879. Fproto_major_version int32
  13880. Fproto_minor_version int32
  13881. Fvendor uintptr
  13882. Fprivate3 TXID
  13883. Fprivate4 TXID
  13884. Fprivate5 TXID
  13885. Fprivate6 int32
  13886. Fresource_alloc uintptr
  13887. Fbyte_order int32
  13888. Fbitmap_unit int32
  13889. Fbitmap_pad int32
  13890. Fbitmap_bit_order int32
  13891. Fnformats int32
  13892. Fpixmap_format uintptr
  13893. Fprivate8 int32
  13894. Frelease int32
  13895. Fprivate9 uintptr
  13896. Fprivate10 uintptr
  13897. Fqlen int32
  13898. Flast_request_read uint64
  13899. Frequest uint64
  13900. Fprivate11 TXPointer
  13901. Fprivate12 TXPointer
  13902. Fprivate13 TXPointer
  13903. Fprivate14 TXPointer
  13904. Fmax_request_size uint32
  13905. Fdb uintptr
  13906. Fprivate15 uintptr
  13907. Fdisplay_name uintptr
  13908. Fdefault_screen int32
  13909. Fnscreens int32
  13910. Fscreens uintptr
  13911. Fmotion_buffer uint64
  13912. Fprivate16 uint64
  13913. Fmin_keycode int32
  13914. Fmax_keycode int32
  13915. Fprivate17 TXPointer
  13916. Fprivate18 TXPointer
  13917. Fprivate19 int32
  13918. Fxdefaults uintptr
  13919. })(unsafe.Pointer(dpy)).Fbyte_order != XXftNativeByteOrder(tls) {
  13920. XXftSwapCARD32(tls, bufBitmap, size>>int32(2))
  13921. }
  13922. }
  13923. }
  13924. libxrender.XXRenderAddGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, xftg, int32(1), bufBitmap, size)
  13925. } else {
  13926. if size != 0 {
  13927. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.Xmalloc(tls, libc.Uint64FromInt32(size))
  13928. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  13929. libc.Xmemcpy(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap, bufBitmap, libc.Uint64FromInt32(size))
  13930. }
  13931. } else {
  13932. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  13933. }
  13934. }
  13935. *(*uint64)(unsafe.Pointer(font + 208)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13936. *(*uint64)(unsafe.Pointer(info + 56)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13937. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13938. __XftFontValidateMemory(tls, dpy, pub)
  13939. }
  13940. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  13941. libc.Xprintf(tls, __ccgo_ts+1464, libc.VaList(bp+4168, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  13942. }
  13943. }
  13944. if bufBitmap != bp+8 {
  13945. libc.Xfree(tls, bufBitmap)
  13946. }
  13947. XXftUnlockFace(tls, font)
  13948. }
  13949. var _den = [9]uint8{' ', '.', ':', ';', '=', '+', '*', '#'}
  13950. func XXftFontUnloadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyph int32) {
  13951. bp := tls.Alloc(8192)
  13952. defer tls.Free(8192)
  13953. var font, info, xftg, v2 uintptr
  13954. var glyphindex TFT_UInt
  13955. var nused, v1, v3 int32
  13956. var _ /* glyphBuf at bp+0 */ [1024]TGlyph
  13957. _, _, _, _, _, _, _, _ = font, glyphindex, info, nused, xftg, v1, v2, v3
  13958. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13959. font = pub
  13960. nused = 0
  13961. for {
  13962. v1 = nglyph
  13963. nglyph--
  13964. if !(v1 != 0) {
  13965. break
  13966. }
  13967. v2 = glyphs
  13968. glyphs += 4
  13969. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  13970. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  13971. if !(xftg != 0) {
  13972. continue
  13973. }
  13974. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  13975. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  13976. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  13977. v3 = nused
  13978. nused++
  13979. (*(*[1024]TGlyph)(unsafe.Pointer(bp)))[v3] = uint64(glyphindex)
  13980. if libc.Uint64FromInt32(nused) == libc.Uint64FromInt64(8192)/libc.Uint64FromInt64(8) {
  13981. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  13982. nused = 0
  13983. }
  13984. }
  13985. } else {
  13986. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  13987. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  13988. }
  13989. }
  13990. *(*uint64)(unsafe.Pointer(font + 208)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13991. if info != 0 {
  13992. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13993. }
  13994. }
  13995. libc.Xfree(tls, xftg)
  13996. XXftMemFree(tls, int32(m_XFT_MEM_GLYPH), int32(32))
  13997. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8)) = libc.UintptrFromInt32(0)
  13998. }
  13999. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 && nused != 0 {
  14000. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  14001. }
  14002. }
  14003. func XXftFontCheckGlyph(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyph TFT_UInt, missing uintptr, nmissing uintptr) (r TFcBool) {
  14004. var font, xftg uintptr
  14005. var n, v1 int32
  14006. _, _, _, _ = font, n, xftg, v1
  14007. font = pub
  14008. if glyph >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  14009. return m_FcFalse
  14010. }
  14011. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  14012. if !(xftg != 0) || need_bitmaps != 0 && !((*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0) {
  14013. if !(xftg != 0) {
  14014. xftg = libc.Xmalloc(tls, uint64(32))
  14015. if !(xftg != 0) {
  14016. return m_FcFalse
  14017. }
  14018. XXftMemAlloc(tls, int32(m_XFT_MEM_GLYPH), int32(32))
  14019. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  14020. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = uint64(0)
  14021. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8)) = xftg
  14022. }
  14023. n = *(*int32)(unsafe.Pointer(nmissing))
  14024. v1 = n
  14025. n++
  14026. *(*TFT_UInt)(unsafe.Pointer(missing + uintptr(v1)*4)) = glyph
  14027. if n == int32(m_XFT_NMISSING) {
  14028. XXftFontLoadGlyphs(tls, dpy, pub, need_bitmaps, missing, n)
  14029. n = 0
  14030. }
  14031. *(*int32)(unsafe.Pointer(nmissing)) = n
  14032. return int32(m_FcTrue)
  14033. } else {
  14034. return m_FcFalse
  14035. }
  14036. return r
  14037. }
  14038. func XXftCharExists(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFcBool) {
  14039. if (*TXftFont)(unsafe.Pointer(pub)).Fcharset != 0 {
  14040. return libfontconfig.XFcCharSetHasChar(tls, (*TXftFont)(unsafe.Pointer(pub)).Fcharset, ucs4)
  14041. }
  14042. return m_FcFalse
  14043. }
  14044. func XXftCharIndex(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFT_UInt) {
  14045. var ent, offset TFcChar32
  14046. var face TFT_Face
  14047. var font uintptr
  14048. _, _, _, _ = ent, face, font, offset
  14049. font = pub
  14050. if !((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value != 0) {
  14051. return uint32(0)
  14052. }
  14053. ent = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  14054. offset = uint32(0)
  14055. for (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 != ucs4 {
  14056. if (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 == libc.Uint32FromInt32(^libc.Int32FromInt32(0)) {
  14057. if !(XXftCharExists(tls, dpy, pub, ucs4) != 0) {
  14058. return uint32(0)
  14059. }
  14060. face = XXftLockFace(tls, pub)
  14061. if !(face != 0) {
  14062. return uint32(0)
  14063. }
  14064. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 = ucs4
  14065. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph = libfontconfig.XFcFreeTypeCharIndex(tls, face, ucs4)
  14066. XXftUnlockFace(tls, pub)
  14067. break
  14068. }
  14069. if !(offset != 0) {
  14070. offset = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Frehash_value)
  14071. if !(offset != 0) {
  14072. offset = uint32(1)
  14073. }
  14074. }
  14075. ent = ent + offset
  14076. if ent >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value) {
  14077. ent -= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  14078. }
  14079. }
  14080. return (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph
  14081. }
  14082. // C documentation
  14083. //
  14084. // /*
  14085. // * Pick a random glyph from the font and remove it from the cache
  14086. // */
  14087. func X_XftFontUncacheGlyph(tls *libc.TLS, dpy uintptr, pub uintptr) {
  14088. bp := tls.Alloc(32)
  14089. defer tls.Free(32)
  14090. var font, xftg uintptr
  14091. var glyph_memory uint64
  14092. var _ /* glyphindex at bp+0 */ TFT_UInt
  14093. _, _, _ = font, glyph_memory, xftg
  14094. font = pub
  14095. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory != 0) {
  14096. return
  14097. }
  14098. if (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs != 0 {
  14099. glyph_memory = libc.Uint64FromInt32(libc.Xrand(tls)) % (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  14100. } else {
  14101. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  14102. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  14103. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  14104. }
  14105. glyph_memory = uint64(0)
  14106. }
  14107. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14108. __XftFontValidateMemory(tls, dpy, pub)
  14109. }
  14110. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  14111. for {
  14112. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)) {
  14113. break
  14114. }
  14115. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*8))
  14116. if xftg != 0 {
  14117. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > glyph_memory {
  14118. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14119. libc.Xprintf(tls, __ccgo_ts+1493, libc.VaList(bp+16, *(*TFT_UInt)(unsafe.Pointer(bp)), (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14120. }
  14121. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  14122. if !((*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs != 0) {
  14123. goto _1
  14124. }
  14125. break
  14126. }
  14127. glyph_memory -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14128. }
  14129. goto _1
  14130. _1:
  14131. ;
  14132. *(*TFT_UInt)(unsafe.Pointer(bp))++
  14133. }
  14134. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14135. __XftFontValidateMemory(tls, dpy, pub)
  14136. }
  14137. }
  14138. func X_XftFontManageMemory(tls *libc.TLS, dpy uintptr, pub uintptr) {
  14139. bp := tls.Alloc(32)
  14140. defer tls.Free(32)
  14141. var font uintptr
  14142. var v1 uint64
  14143. _, _ = font, v1
  14144. font = pub
  14145. if (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory != 0 {
  14146. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14147. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  14148. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  14149. v1 = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  14150. } else {
  14151. v1 = uint64(font)
  14152. }
  14153. libc.Xprintf(tls, __ccgo_ts+1524, libc.VaList(bp+8, v1, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory))
  14154. }
  14155. }
  14156. for (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  14157. X_XftFontUncacheGlyph(tls, dpy, pub)
  14158. }
  14159. }
  14160. X_XftDisplayManageMemory(tls, dpy)
  14161. }
  14162. /* xftxlfd.c */
  14163. var __XftConfigInitialized int32
  14164. func XXftInit(tls *libc.TLS, config uintptr) (r int32) {
  14165. if __XftConfigInitialized != 0 {
  14166. return int32(m_True)
  14167. }
  14168. __XftConfigInitialized = int32(m_True)
  14169. if !(libfontconfig.XFcInit(tls) != 0) {
  14170. return m_False
  14171. }
  14172. X_XftNameInit(tls)
  14173. return int32(m_True)
  14174. }
  14175. func XXftGetVersion(tls *libc.TLS) (r int32) {
  14176. return libc.Int32FromInt32(m_XFT_MAJOR)*libc.Int32FromInt32(10000) + libc.Int32FromInt32(m_XFT_MINOR)*libc.Int32FromInt32(100) + libc.Int32FromInt32(m_XFT_REVISION)
  14177. }
  14178. var _XftInUse = [4]struct {
  14179. Fname uintptr
  14180. Falloc_count int32
  14181. Falloc_mem int32
  14182. Ffree_count int32
  14183. Ffree_mem int32
  14184. }{
  14185. 0: {
  14186. Fname: __ccgo_ts + 1570,
  14187. },
  14188. 1: {
  14189. Fname: __ccgo_ts + 1578,
  14190. },
  14191. 2: {
  14192. Fname: __ccgo_ts + 1586,
  14193. },
  14194. 3: {
  14195. Fname: __ccgo_ts + 1596,
  14196. },
  14197. }
  14198. var _XftAllocCount int32
  14199. var _XftAllocMem int32
  14200. var _XftFreeCount int32
  14201. var _XftFreeMem int32
  14202. var _XftMemNotice = libc.Int32FromInt32(1) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024)
  14203. var _XftAllocNotify int32
  14204. var _XftFreeNotify int32
  14205. func XXftMemReport(tls *libc.TLS) {
  14206. bp := tls.Alloc(48)
  14207. defer tls.Free(48)
  14208. var i int32
  14209. _ = i
  14210. libc.Xprintf(tls, __ccgo_ts+1605, 0)
  14211. libc.Xprintf(tls, __ccgo_ts+1624, 0)
  14212. libc.Xprintf(tls, __ccgo_ts+1662, 0)
  14213. i = 0
  14214. for {
  14215. if !(i < int32(m_XFT_MEM_NUM)) {
  14216. break
  14217. }
  14218. libc.Xprintf(tls, __ccgo_ts+1705, libc.VaList(bp+8, _XftInUse[i].Fname, _XftInUse[i].Falloc_count, _XftInUse[i].Falloc_mem, _XftInUse[i].Ffree_count, _XftInUse[i].Ffree_mem))
  14219. goto _1
  14220. _1:
  14221. ;
  14222. i++
  14223. }
  14224. libc.Xprintf(tls, __ccgo_ts+1705, libc.VaList(bp+8, __ccgo_ts+1725, _XftAllocCount, _XftAllocMem, _XftFreeCount, _XftFreeMem))
  14225. _XftAllocNotify = 0
  14226. _XftFreeNotify = 0
  14227. }
  14228. func XXftMemAlloc(tls *libc.TLS, kind int32, size int32) {
  14229. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  14230. _XftInUse[kind].Falloc_count++
  14231. _XftInUse[kind].Falloc_mem += size
  14232. _XftAllocCount++
  14233. _XftAllocMem += size
  14234. _XftAllocNotify += size
  14235. if _XftAllocNotify > _XftMemNotice {
  14236. XXftMemReport(tls)
  14237. }
  14238. }
  14239. }
  14240. func XXftMemFree(tls *libc.TLS, kind int32, size int32) {
  14241. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  14242. _XftInUse[kind].Ffree_count++
  14243. _XftInUse[kind].Ffree_mem += size
  14244. _XftFreeCount++
  14245. _XftFreeMem += size
  14246. _XftFreeNotify += size
  14247. if _XftFreeNotify > _XftMemNotice {
  14248. XXftMemReport(tls)
  14249. }
  14250. }
  14251. }
  14252. /* xftxlfd.c */
  14253. func XXftListFontsPatternObjects(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, os uintptr) (r uintptr) {
  14254. return libfontconfig.XFcFontList(tls, libc.UintptrFromInt32(0), pattern, os)
  14255. }
  14256. func XXftListFonts(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  14257. bp := tls.Alloc(16)
  14258. defer tls.Free(16)
  14259. var __o__, __ob__, __os__, __p__, first, fs, os, pattern uintptr
  14260. var va Tva_list
  14261. var _ /* __v__ at bp+0 */ TFcValue
  14262. _, _, _, _, _, _, _, _, _ = __o__, __ob__, __os__, __p__, first, fs, os, pattern, va
  14263. va = va1
  14264. __p__ = libc.UintptrFromInt32(0)
  14265. if !(__p__ != 0) {
  14266. __p__ = libfontconfig.XFcPatternCreate(tls)
  14267. if !(__p__ != 0) {
  14268. goto _FcPatternVapBuild_bail0
  14269. }
  14270. }
  14271. for {
  14272. __o__ = libc.VaUintptr(&va)
  14273. if !(__o__ != 0) {
  14274. break
  14275. }
  14276. (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 = libc.VaInt32(&va)
  14277. switch (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 {
  14278. case int32(_FcTypeUnknown):
  14279. fallthrough
  14280. case int32(_FcTypeVoid):
  14281. goto _FcPatternVapBuild_bail1
  14282. case int32(_FcTypeInteger):
  14283. *(*int32)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  14284. case int32(_FcTypeDouble):
  14285. *(*float64)(unsafe.Pointer(bp + 8)) = libc.VaFloat64(&va)
  14286. case int32(_FcTypeString):
  14287. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14288. case int32(_FcTypeBool):
  14289. *(*TFcBool)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  14290. case int32(_FcTypeMatrix):
  14291. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14292. case int32(_FcTypeCharSet):
  14293. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14294. case int32(_FcTypeFTFace):
  14295. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14296. case int32(_FcTypeLangSet):
  14297. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14298. case int32(_FcTypeRange):
  14299. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14300. break
  14301. }
  14302. if !(libfontconfig.XFcPatternAdd(tls, __p__, __o__, *(*TFcValue)(unsafe.Pointer(bp)), int32(m_FcTrue)) != 0) {
  14303. goto _FcPatternVapBuild_bail1
  14304. }
  14305. goto _1
  14306. _1:
  14307. }
  14308. pattern = __p__
  14309. goto _FcPatternVapBuild_return
  14310. goto _FcPatternVapBuild_bail1
  14311. _FcPatternVapBuild_bail1:
  14312. ;
  14313. if !(libc.UintptrFromInt32(0) != 0) {
  14314. libfontconfig.XFcPatternDestroy(tls, __p__)
  14315. }
  14316. goto _FcPatternVapBuild_bail0
  14317. _FcPatternVapBuild_bail0:
  14318. ;
  14319. pattern = libc.UintptrFromInt32(0)
  14320. goto _FcPatternVapBuild_return
  14321. _FcPatternVapBuild_return:
  14322. ;
  14323. first = libc.VaUintptr(&va)
  14324. os = uintptr(0)
  14325. __os__ = libfontconfig.XFcObjectSetCreate(tls)
  14326. if !(__os__ != 0) {
  14327. goto _FcObjectSetVapBuild_bail0
  14328. }
  14329. __ob__ = first
  14330. for __ob__ != 0 {
  14331. if !(libfontconfig.XFcObjectSetAdd(tls, __os__, __ob__) != 0) {
  14332. goto _FcObjectSetVapBuild_bail1
  14333. }
  14334. __ob__ = libc.VaUintptr(&va)
  14335. }
  14336. os = __os__
  14337. goto _FcObjectSetVapBuild_bail1
  14338. _FcObjectSetVapBuild_bail1:
  14339. ;
  14340. if !(os != 0) && __os__ != 0 {
  14341. libfontconfig.XFcObjectSetDestroy(tls, __os__)
  14342. }
  14343. goto _FcObjectSetVapBuild_bail0
  14344. _FcObjectSetVapBuild_bail0:
  14345. ;
  14346. _ = va
  14347. fs = XXftListFontsPatternObjects(tls, dpy, screen, pattern, os)
  14348. libfontconfig.XFcPatternDestroy(tls, pattern)
  14349. libfontconfig.XFcObjectSetDestroy(tls, os)
  14350. return fs
  14351. }
  14352. /* xftxlfd.c */
  14353. var __XftObjectTypes = [4]TFcObjectType{
  14354. 0: {
  14355. Fobject: __ccgo_ts + 1731,
  14356. Ftype1: int32(_FcTypeBool),
  14357. },
  14358. 1: {
  14359. Fobject: __ccgo_ts + 1736,
  14360. Ftype1: int32(_FcTypeString),
  14361. },
  14362. 2: {
  14363. Fobject: __ccgo_ts + 453,
  14364. Ftype1: int32(_FcTypeBool),
  14365. },
  14366. 3: {
  14367. Fobject: __ccgo_ts + 201,
  14368. Ftype1: int32(_FcTypeInteger),
  14369. },
  14370. }
  14371. var __XftNameInitialized TFcBool
  14372. func X_XftNameInit(tls *libc.TLS) {
  14373. if __XftNameInitialized != 0 {
  14374. return
  14375. }
  14376. __XftNameInitialized = int32(m_FcTrue)
  14377. libfontconfig.XFcNameRegisterObjectTypes(tls, uintptr(unsafe.Pointer(&__XftObjectTypes)), libc.Int32FromUint64(libc.Uint64FromInt64(64)/libc.Uint64FromInt64(16)))
  14378. }
  14379. func XXftNameParse(tls *libc.TLS, name uintptr) (r uintptr) {
  14380. X_XftNameInit(tls)
  14381. return libfontconfig.XFcNameParse(tls, name)
  14382. }
  14383. func XXftNameUnparse(tls *libc.TLS, pat uintptr, dest uintptr, len1 int32) (r TFcBool) {
  14384. var name, new1 uintptr
  14385. _, _ = name, new1
  14386. X_XftNameInit(tls)
  14387. name = libfontconfig.XFcNameUnparse(tls, pat)
  14388. if !(name != 0) {
  14389. return m_FcFalse
  14390. }
  14391. if libc.Xstrlen(tls, name)+uint64(1) > libc.Uint64FromInt32(len1) {
  14392. new1 = libfontconfig.XFcPatternDuplicate(tls, pat)
  14393. libc.Xfree(tls, name)
  14394. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+1741)
  14395. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+1261)
  14396. name = libfontconfig.XFcNameUnparse(tls, new1)
  14397. libfontconfig.XFcPatternDestroy(tls, new1)
  14398. if !(name != 0) {
  14399. return m_FcFalse
  14400. }
  14401. if libc.Xstrlen(tls, name)+uint64(1) > libc.Uint64FromInt32(len1) {
  14402. libc.Xstrncpy(tls, dest, name, libc.Uint64FromInt32(len1)-uint64(1))
  14403. *(*uint8)(unsafe.Pointer(dest + uintptr(len1-int32(1)))) = uint8('\000')
  14404. libc.Xfree(tls, name)
  14405. return m_FcFalse
  14406. }
  14407. }
  14408. libc.Xstrcpy(tls, dest, name)
  14409. libc.Xfree(tls, name)
  14410. return int32(m_FcTrue)
  14411. }
  14412. const m_NUM_ELT_LOCAL = 128
  14413. /* xftxlfd.c */
  14414. /*
  14415. * Use the Render extension to draw the glyphs
  14416. */
  14417. 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) {
  14418. bp := tls.Alloc(5136)
  14419. defer tls.Free(5136)
  14420. var char16, char32, char8, chars, font uintptr
  14421. var g, max TFT_UInt
  14422. var glyphs_loaded TFcBool
  14423. var i, size, width int32
  14424. var wire TGlyph
  14425. var _ /* char_local at bp+1028 */ [1024]uint32
  14426. var _ /* missing at bp+0 */ [256]TFT_UInt
  14427. var _ /* nmissing at bp+1024 */ int32
  14428. _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, font, g, glyphs_loaded, i, max, size, width, wire
  14429. font = pub
  14430. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  14431. return
  14432. }
  14433. /*
  14434. * Load missing glyphs
  14435. */
  14436. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  14437. max = uint32(0)
  14438. glyphs_loaded = m_FcFalse
  14439. i = 0
  14440. for {
  14441. if !(i < nglyphs) {
  14442. break
  14443. }
  14444. g = *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4))
  14445. if g > max {
  14446. max = g
  14447. }
  14448. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  14449. glyphs_loaded = int32(m_FcTrue)
  14450. }
  14451. goto _1
  14452. _1:
  14453. ;
  14454. i++
  14455. }
  14456. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  14457. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  14458. }
  14459. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14460. goto bail1
  14461. }
  14462. if max < uint32(0x100) {
  14463. width = int32(1)
  14464. size = int32(1)
  14465. } else {
  14466. if max < uint32(0x10000) {
  14467. width = int32(2)
  14468. size = int32(2)
  14469. } else {
  14470. width = int32(4)
  14471. size = int32(4)
  14472. }
  14473. }
  14474. chars = bp + 1028
  14475. if libc.Uint64FromInt32(nglyphs*size) > uint64(4096) {
  14476. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  14477. if !(chars != 0) {
  14478. goto bail1
  14479. }
  14480. }
  14481. char8 = chars
  14482. char16 = chars
  14483. char32 = chars
  14484. i = 0
  14485. for {
  14486. if !(i < nglyphs) {
  14487. break
  14488. }
  14489. wire = uint64(*(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)))
  14490. if wire >= libc.Uint64FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*8)) != 0) {
  14491. wire = uint64(0)
  14492. }
  14493. switch width {
  14494. case int32(1):
  14495. *(*uint8)(unsafe.Pointer(char8 + uintptr(i))) = uint8(wire)
  14496. case int32(2):
  14497. *(*uint16)(unsafe.Pointer(char16 + uintptr(i)*2)) = uint16(wire)
  14498. case int32(4):
  14499. *(*uint32)(unsafe.Pointer(char32 + uintptr(i)*4)) = uint32(wire)
  14500. break
  14501. }
  14502. goto _2
  14503. _2:
  14504. ;
  14505. i++
  14506. }
  14507. switch width {
  14508. case int32(1):
  14509. fallthrough
  14510. default:
  14511. libxrender.XXRenderCompositeString8(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, char8, nglyphs)
  14512. case int32(2):
  14513. libxrender.XXRenderCompositeString16(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, char16, nglyphs)
  14514. case int32(4):
  14515. libxrender.XXRenderCompositeString32(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, char32, nglyphs)
  14516. break
  14517. }
  14518. if chars != bp+1028 {
  14519. libc.Xfree(tls, chars)
  14520. }
  14521. goto bail1
  14522. bail1:
  14523. ;
  14524. if glyphs_loaded != 0 {
  14525. X_XftFontManageMemory(tls, dpy, pub)
  14526. }
  14527. }
  14528. func XXftGlyphSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  14529. bp := tls.Alloc(9232)
  14530. defer tls.Free(9232)
  14531. var char16, char32, char8, chars, elts, font, glyph, v4, v7 uintptr
  14532. var g, max TFT_UInt
  14533. var glyphs_loaded TFcBool
  14534. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  14535. var _ /* char_local at bp+1028 */ [1024]uint32
  14536. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  14537. var _ /* missing at bp+0 */ [256]TFT_UInt
  14538. var _ /* nmissing at bp+1024 */ int32
  14539. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, elts, font, g, glyph, glyphs_loaded, i, j, max, n, nelt, size, width, x, y, v3, v4, v5, v7
  14540. font = pub
  14541. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  14542. return
  14543. }
  14544. if !(nglyphs != 0) {
  14545. return
  14546. }
  14547. /*
  14548. * Load missing glyphs
  14549. */
  14550. max = uint32(0)
  14551. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  14552. glyphs_loaded = m_FcFalse
  14553. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fglyph
  14554. i = 0
  14555. for {
  14556. if !(i < nglyphs) {
  14557. break
  14558. }
  14559. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14560. if g > max {
  14561. max = g
  14562. }
  14563. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  14564. glyphs_loaded = int32(m_FcTrue)
  14565. }
  14566. goto _1
  14567. _1:
  14568. ;
  14569. i++
  14570. }
  14571. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  14572. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  14573. }
  14574. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14575. goto bail1
  14576. }
  14577. /*
  14578. * See what encoding size is needed
  14579. */
  14580. if max < uint32(0x100) {
  14581. size = int32(1)
  14582. width = int32(1)
  14583. } else {
  14584. if max < uint32(0x10000) {
  14585. size = int32(2)
  14586. width = int32(2)
  14587. } else {
  14588. size = int32(4)
  14589. width = int32(4)
  14590. }
  14591. }
  14592. chars = bp + 1028
  14593. if nglyphs*size > int32(m_NUM_LOCAL) {
  14594. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  14595. if !(chars != 0) {
  14596. goto bail1
  14597. }
  14598. }
  14599. char8 = chars
  14600. char16 = chars
  14601. char32 = chars
  14602. /*
  14603. * Compute the number of glyph elts needed
  14604. */
  14605. nelt = int32(1)
  14606. i = 0
  14607. for {
  14608. if !(i < nglyphs) {
  14609. break
  14610. }
  14611. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14612. /* Substitute default for non-existant glyphs */
  14613. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  14614. g = uint32(0)
  14615. }
  14616. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0 {
  14617. break
  14618. }
  14619. goto _2
  14620. _2:
  14621. ;
  14622. i++
  14623. }
  14624. if i == nglyphs {
  14625. goto bail2
  14626. }
  14627. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  14628. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14629. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14630. for {
  14631. i++
  14632. v3 = i
  14633. if !(v3 < nglyphs) {
  14634. break
  14635. }
  14636. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14637. /* Substitute default for non-existant glyphs */
  14638. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  14639. g = uint32(0)
  14640. }
  14641. /*
  14642. * check to see if the glyph is placed where it would
  14643. * fall using the normal spacing
  14644. */
  14645. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  14646. glyph = v4
  14647. if v4 != 0 {
  14648. if x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  14649. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  14650. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  14651. nelt++
  14652. }
  14653. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14654. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14655. }
  14656. }
  14657. elts = bp + 5128
  14658. if nelt > int32(m_NUM_ELT_LOCAL) {
  14659. elts = libc.Xmalloc(tls, libc.Uint64FromInt32(nelt)*uint64(32))
  14660. if !(elts != 0) {
  14661. goto bail2
  14662. }
  14663. }
  14664. /*
  14665. * Generate the list of glyph elts
  14666. */
  14667. nelt = 0
  14668. v5 = libc.Int32FromInt32(0)
  14669. y = v5
  14670. x = v5
  14671. n = 0
  14672. j = 0
  14673. i = 0
  14674. for {
  14675. if !(i < nglyphs) {
  14676. break
  14677. }
  14678. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14679. /* Substitute default for non-existant glyphs */
  14680. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  14681. g = uint32(0)
  14682. }
  14683. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  14684. glyph = v7
  14685. if v7 != 0 {
  14686. if !(i != 0) || x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  14687. if n != 0 {
  14688. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  14689. nelt++
  14690. }
  14691. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  14692. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  14693. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - x
  14694. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - y
  14695. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  14696. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  14697. n = 0
  14698. }
  14699. switch width {
  14700. case int32(1):
  14701. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(g)
  14702. case int32(2):
  14703. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  14704. case int32(4):
  14705. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  14706. break
  14707. }
  14708. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14709. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14710. j++
  14711. n++
  14712. }
  14713. goto _6
  14714. _6:
  14715. ;
  14716. i++
  14717. }
  14718. if n != 0 {
  14719. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  14720. nelt++
  14721. }
  14722. switch width {
  14723. case int32(1):
  14724. libxrender.XXRenderCompositeText8(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, srcx, srcy, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  14725. case int32(2):
  14726. libxrender.XXRenderCompositeText16(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, srcx, srcy, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  14727. case int32(4):
  14728. libxrender.XXRenderCompositeText32(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, srcx, srcy, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  14729. break
  14730. }
  14731. if elts != bp+5128 {
  14732. libc.Xfree(tls, elts)
  14733. }
  14734. goto bail2
  14735. bail2:
  14736. ;
  14737. if chars != bp+1028 {
  14738. libc.Xfree(tls, chars)
  14739. }
  14740. goto bail1
  14741. bail1:
  14742. ;
  14743. if glyphs_loaded != 0 {
  14744. X_XftFontManageMemory(tls, dpy, pub)
  14745. }
  14746. }
  14747. func XXftCharSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  14748. bp := tls.Alloc(8192)
  14749. defer tls.Free(8192)
  14750. var glyphs uintptr
  14751. var i int32
  14752. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  14753. _, _ = glyphs, i
  14754. if len1 <= int32(m_NUM_LOCAL) {
  14755. glyphs = bp
  14756. } else {
  14757. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(8))
  14758. if !(glyphs != 0) {
  14759. return
  14760. }
  14761. }
  14762. i = 0
  14763. for {
  14764. if !(i < len1) {
  14765. break
  14766. }
  14767. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, dpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  14768. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  14769. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  14770. goto _1
  14771. _1:
  14772. ;
  14773. i++
  14774. }
  14775. XXftGlyphSpecRender(tls, dpy, op, src, pub, dst, srcx, srcy, glyphs, len1)
  14776. if glyphs != bp {
  14777. libc.Xfree(tls, glyphs)
  14778. }
  14779. }
  14780. /*
  14781. * Choose which format to draw text in when drawing with fonts
  14782. * of different formats. The trick is that ARGB formats aren't
  14783. * compatible with A formats as PictOpAdd does the wrong thing, so
  14784. * fall back to an A format when presented with an ARGB and A format
  14785. */
  14786. func _XftPreferFormat(tls *libc.TLS, dpy uintptr, a uintptr, b uintptr) (r uintptr) {
  14787. var prefer uintptr
  14788. _ = prefer
  14789. prefer = libc.UintptrFromInt32(0)
  14790. if a == b {
  14791. prefer = a
  14792. } else {
  14793. if libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth == int32(32)) != libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth == int32(32)) {
  14794. prefer = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  14795. } else {
  14796. if (*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth > (*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth {
  14797. prefer = a
  14798. } else {
  14799. prefer = b
  14800. }
  14801. }
  14802. }
  14803. return prefer
  14804. }
  14805. func XXftGlyphFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  14806. bp := tls.Alloc(9232)
  14807. defer tls.Free(9232)
  14808. var char16, char32, char8, chars, elts, firstFont, font, font1, font2, font3, format, glyph, prevPublic, pub, pub1, pub2, pub3, v4, v7 uintptr
  14809. var g, max TFT_UInt
  14810. var glyphs_loaded TFcBool
  14811. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  14812. var _ /* char_local at bp+1028 */ [1024]uint32
  14813. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  14814. var _ /* missing at bp+0 */ [256]TFT_UInt
  14815. var _ /* nmissing at bp+1024 */ int32
  14816. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  14817. if !(nglyphs != 0) {
  14818. return
  14819. }
  14820. /*
  14821. * Load missing glyphs. Have to load them
  14822. * one at a time in case the font changes
  14823. */
  14824. max = uint32(0)
  14825. glyphs_loaded = m_FcFalse
  14826. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fglyph
  14827. i = 0
  14828. for {
  14829. if !(i < nglyphs) {
  14830. break
  14831. }
  14832. pub = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  14833. font = pub
  14834. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  14835. if g > max {
  14836. max = g
  14837. }
  14838. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  14839. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  14840. glyphs_loaded = int32(m_FcTrue)
  14841. }
  14842. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  14843. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  14844. }
  14845. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  14846. goto bail1
  14847. }
  14848. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14849. goto bail1
  14850. }
  14851. goto _1
  14852. _1:
  14853. ;
  14854. i++
  14855. }
  14856. /*
  14857. * See what encoding size is needed
  14858. */
  14859. if max < uint32(0x100) {
  14860. size = int32(1)
  14861. width = int32(1)
  14862. } else {
  14863. if max < uint32(0x10000) {
  14864. size = int32(2)
  14865. width = int32(2)
  14866. } else {
  14867. size = int32(4)
  14868. width = int32(4)
  14869. }
  14870. }
  14871. chars = bp + 1028
  14872. if nglyphs*size > int32(m_NUM_LOCAL) {
  14873. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  14874. if !(chars != 0) {
  14875. goto bail1
  14876. }
  14877. }
  14878. char8 = chars
  14879. char16 = chars
  14880. char32 = chars
  14881. /*
  14882. * Compute the number of glyph elts needed
  14883. */
  14884. nelt = int32(1)
  14885. firstFont = libc.UintptrFromInt32(0)
  14886. i = 0
  14887. for {
  14888. if !(i < nglyphs) {
  14889. break
  14890. }
  14891. pub1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  14892. font1 = pub1
  14893. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  14894. /* Substitute default for non-existant glyphs */
  14895. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0) {
  14896. g = uint32(0)
  14897. }
  14898. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0 {
  14899. firstFont = font1
  14900. break
  14901. }
  14902. goto _2
  14903. _2:
  14904. ;
  14905. i++
  14906. }
  14907. if i == nglyphs || !(firstFont != 0) {
  14908. goto bail2
  14909. }
  14910. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(firstFont)).Fglyphs + uintptr(g)*8))
  14911. format = (*TXftFontInt)(unsafe.Pointer(firstFont)).Fformat
  14912. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14913. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14914. prevPublic = libc.UintptrFromInt32(0)
  14915. for {
  14916. i++
  14917. v3 = i
  14918. if !(v3 < nglyphs) {
  14919. break
  14920. }
  14921. pub2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  14922. font2 = pub2
  14923. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  14924. /* Substitute default for non-existant glyphs */
  14925. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font2)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8)) != 0) {
  14926. g = uint32(0)
  14927. }
  14928. /*
  14929. * check to see if the glyph is placed where it would
  14930. * fall using the normal spacing
  14931. */
  14932. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8))
  14933. glyph = v4
  14934. if v4 != 0 {
  14935. if pub2 != prevPublic || x != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) || y != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) {
  14936. prevPublic = pub2
  14937. if (*TXftFontInt)(unsafe.Pointer(font2)).Fformat != format {
  14938. format = _XftPreferFormat(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font2)).Fformat, format)
  14939. }
  14940. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  14941. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  14942. nelt++
  14943. }
  14944. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14945. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14946. }
  14947. }
  14948. elts = bp + 5128
  14949. if nelt > int32(m_NUM_ELT_LOCAL) {
  14950. elts = libc.Xmalloc(tls, libc.Uint64FromInt32(nelt)*uint64(32))
  14951. if !(elts != 0) {
  14952. goto bail2
  14953. }
  14954. }
  14955. /*
  14956. * Generate the list of glyph elts
  14957. */
  14958. nelt = 0
  14959. v5 = libc.Int32FromInt32(0)
  14960. y = v5
  14961. x = v5
  14962. n = 0
  14963. j = 0
  14964. prevPublic = libc.UintptrFromInt32(0)
  14965. i = 0
  14966. for {
  14967. if !(i < nglyphs) {
  14968. break
  14969. }
  14970. pub3 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  14971. font3 = pub3
  14972. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  14973. /* Substitute default for non-existant glyphs */
  14974. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font3)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8)) != 0) {
  14975. g = uint32(0)
  14976. }
  14977. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8))
  14978. glyph = v7
  14979. if v7 != 0 {
  14980. 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) {
  14981. if n != 0 {
  14982. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  14983. nelt++
  14984. }
  14985. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font3)).Fglyphset
  14986. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  14987. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - x
  14988. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - y
  14989. prevPublic = pub3
  14990. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  14991. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  14992. n = 0
  14993. }
  14994. switch width {
  14995. case int32(1):
  14996. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(g)
  14997. case int32(2):
  14998. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  14999. case int32(4):
  15000. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  15001. break
  15002. }
  15003. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15004. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15005. j++
  15006. n++
  15007. }
  15008. goto _6
  15009. _6:
  15010. ;
  15011. i++
  15012. }
  15013. if n != 0 {
  15014. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  15015. nelt++
  15016. }
  15017. switch width {
  15018. case int32(1):
  15019. libxrender.XXRenderCompositeText8(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  15020. case int32(2):
  15021. libxrender.XXRenderCompositeText16(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  15022. case int32(4):
  15023. libxrender.XXRenderCompositeText32(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  15024. break
  15025. }
  15026. if elts != bp+5128 {
  15027. libc.Xfree(tls, elts)
  15028. }
  15029. goto bail2
  15030. bail2:
  15031. ;
  15032. if chars != bp+1028 {
  15033. libc.Xfree(tls, chars)
  15034. }
  15035. goto bail1
  15036. bail1:
  15037. ;
  15038. if glyphs_loaded != 0 {
  15039. i = 0
  15040. for {
  15041. if !(i < nglyphs) {
  15042. break
  15043. }
  15044. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  15045. goto _8
  15046. _8:
  15047. ;
  15048. i++
  15049. }
  15050. }
  15051. }
  15052. func XXftCharFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  15053. bp := tls.Alloc(16384)
  15054. defer tls.Free(16384)
  15055. var glyphs uintptr
  15056. var i int32
  15057. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  15058. _, _ = glyphs, i
  15059. if len1 <= int32(m_NUM_LOCAL) {
  15060. glyphs = bp
  15061. } else {
  15062. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(16))
  15063. if !(glyphs != 0) {
  15064. return
  15065. }
  15066. }
  15067. i = 0
  15068. for {
  15069. if !(i < len1) {
  15070. break
  15071. }
  15072. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  15073. (*(*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)
  15074. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  15075. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  15076. goto _1
  15077. _1:
  15078. ;
  15079. i++
  15080. }
  15081. XXftGlyphFontSpecRender(tls, dpy, op, src, dst, srcx, srcy, glyphs, len1)
  15082. if glyphs != bp {
  15083. libc.Xfree(tls, glyphs)
  15084. }
  15085. }
  15086. 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) {
  15087. bp := tls.Alloc(4096)
  15088. defer tls.Free(4096)
  15089. var glyphs uintptr
  15090. var i int32
  15091. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15092. _, _ = glyphs, i
  15093. if len1 <= int32(m_NUM_LOCAL) {
  15094. glyphs = bp
  15095. } else {
  15096. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15097. if !(glyphs != 0) {
  15098. return
  15099. }
  15100. }
  15101. i = 0
  15102. for {
  15103. if !(i < len1) {
  15104. break
  15105. }
  15106. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  15107. goto _1
  15108. _1:
  15109. ;
  15110. i++
  15111. }
  15112. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15113. if glyphs != bp {
  15114. libc.Xfree(tls, glyphs)
  15115. }
  15116. }
  15117. 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) {
  15118. bp := tls.Alloc(4096)
  15119. defer tls.Free(4096)
  15120. var glyphs uintptr
  15121. var i int32
  15122. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15123. _, _ = glyphs, i
  15124. if len1 <= int32(m_NUM_LOCAL) {
  15125. glyphs = bp
  15126. } else {
  15127. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15128. if !(glyphs != 0) {
  15129. return
  15130. }
  15131. }
  15132. i = 0
  15133. for {
  15134. if !(i < len1) {
  15135. break
  15136. }
  15137. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  15138. goto _1
  15139. _1:
  15140. ;
  15141. i++
  15142. }
  15143. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15144. if glyphs != bp {
  15145. libc.Xfree(tls, glyphs)
  15146. }
  15147. }
  15148. 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) {
  15149. bp := tls.Alloc(4096)
  15150. defer tls.Free(4096)
  15151. var glyphs uintptr
  15152. var i int32
  15153. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15154. _, _ = glyphs, i
  15155. if len1 <= int32(m_NUM_LOCAL) {
  15156. glyphs = bp
  15157. } else {
  15158. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15159. if !(glyphs != 0) {
  15160. return
  15161. }
  15162. }
  15163. i = 0
  15164. for {
  15165. if !(i < len1) {
  15166. break
  15167. }
  15168. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, libc.Uint32FromInt32(libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(2)))))<<int32(8)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(2)+int32(1)))))))
  15169. goto _1
  15170. _1:
  15171. ;
  15172. i++
  15173. }
  15174. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15175. if glyphs != bp {
  15176. libc.Xfree(tls, glyphs)
  15177. }
  15178. }
  15179. 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) {
  15180. bp := tls.Alloc(4096)
  15181. defer tls.Free(4096)
  15182. var glyphs uintptr
  15183. var i int32
  15184. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15185. _, _ = glyphs, i
  15186. if len1 <= int32(m_NUM_LOCAL) {
  15187. glyphs = bp
  15188. } else {
  15189. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15190. if !(glyphs != 0) {
  15191. return
  15192. }
  15193. }
  15194. i = 0
  15195. for {
  15196. if !(i < len1) {
  15197. break
  15198. }
  15199. *(*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)))))<<int32(8)))
  15200. goto _1
  15201. _1:
  15202. ;
  15203. i++
  15204. }
  15205. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15206. if glyphs != bp {
  15207. libc.Xfree(tls, glyphs)
  15208. }
  15209. }
  15210. 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) {
  15211. bp := tls.Alloc(4096)
  15212. defer tls.Free(4096)
  15213. var glyphs uintptr
  15214. var i int32
  15215. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15216. _, _ = glyphs, i
  15217. if len1 <= int32(m_NUM_LOCAL) {
  15218. glyphs = bp
  15219. } else {
  15220. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15221. if !(glyphs != 0) {
  15222. return
  15223. }
  15224. }
  15225. i = 0
  15226. for {
  15227. if !(i < len1) {
  15228. break
  15229. }
  15230. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  15231. goto _1
  15232. _1:
  15233. ;
  15234. i++
  15235. }
  15236. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15237. if glyphs != bp {
  15238. libc.Xfree(tls, glyphs)
  15239. }
  15240. }
  15241. 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) {
  15242. bp := tls.Alloc(4096)
  15243. defer tls.Free(4096)
  15244. var glyphs uintptr
  15245. var i int32
  15246. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15247. _, _ = glyphs, i
  15248. if len1 <= int32(m_NUM_LOCAL) {
  15249. glyphs = bp
  15250. } else {
  15251. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15252. if !(glyphs != 0) {
  15253. return
  15254. }
  15255. }
  15256. i = 0
  15257. for {
  15258. if !(i < len1) {
  15259. break
  15260. }
  15261. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, libc.Uint32FromInt32(libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)))))<<int32(24)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(1)))))<<int32(16)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(2)))))<<int32(8)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(3)))))))
  15262. goto _1
  15263. _1:
  15264. ;
  15265. i++
  15266. }
  15267. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15268. if glyphs != bp {
  15269. libc.Xfree(tls, glyphs)
  15270. }
  15271. }
  15272. 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) {
  15273. bp := tls.Alloc(4096)
  15274. defer tls.Free(4096)
  15275. var glyphs uintptr
  15276. var i int32
  15277. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15278. _, _ = glyphs, i
  15279. if len1 <= int32(m_NUM_LOCAL) {
  15280. glyphs = bp
  15281. } else {
  15282. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15283. if !(glyphs != 0) {
  15284. return
  15285. }
  15286. }
  15287. i = 0
  15288. for {
  15289. if !(i < len1) {
  15290. break
  15291. }
  15292. *(*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)))))<<int32(8)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(2)))))<<int32(16)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(3)))))<<int32(24)))
  15293. goto _1
  15294. _1:
  15295. ;
  15296. i++
  15297. }
  15298. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15299. if glyphs != bp {
  15300. libc.Xfree(tls, glyphs)
  15301. }
  15302. }
  15303. 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) {
  15304. bp := tls.Alloc(4112)
  15305. defer tls.Free(4112)
  15306. var glyphs, glyphs_new uintptr
  15307. var i, l, size, v1, v3 int32
  15308. var v2 bool
  15309. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15310. var _ /* ucs4 at bp+4096 */ TFcChar32
  15311. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  15312. i = 0
  15313. glyphs = bp
  15314. size = int32(m_NUM_LOCAL)
  15315. for {
  15316. if v2 = len1 != 0; v2 {
  15317. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  15318. l = v1
  15319. }
  15320. if !(v2 && v1 > 0) {
  15321. break
  15322. }
  15323. if i == size {
  15324. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  15325. if !(glyphs_new != 0) {
  15326. if glyphs != bp {
  15327. libc.Xfree(tls, glyphs)
  15328. }
  15329. return
  15330. }
  15331. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  15332. size *= int32(2)
  15333. if glyphs != bp {
  15334. libc.Xfree(tls, glyphs)
  15335. }
  15336. glyphs = glyphs_new
  15337. }
  15338. v3 = i
  15339. i++
  15340. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  15341. string1 += uintptr(l)
  15342. len1 -= l
  15343. }
  15344. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, i)
  15345. if glyphs != bp {
  15346. libc.Xfree(tls, glyphs)
  15347. }
  15348. }
  15349. 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) {
  15350. bp := tls.Alloc(4112)
  15351. defer tls.Free(4112)
  15352. var glyphs, glyphs_new uintptr
  15353. var i, l, size, v1, v3 int32
  15354. var v2 bool
  15355. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15356. var _ /* ucs4 at bp+4096 */ TFcChar32
  15357. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  15358. i = 0
  15359. glyphs = bp
  15360. size = int32(m_NUM_LOCAL)
  15361. for {
  15362. if v2 = len1 != 0; v2 {
  15363. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  15364. l = v1
  15365. }
  15366. if !(v2 && v1 > 0) {
  15367. break
  15368. }
  15369. if i == size {
  15370. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  15371. if !(glyphs_new != 0) {
  15372. if glyphs != bp {
  15373. libc.Xfree(tls, glyphs)
  15374. }
  15375. return
  15376. }
  15377. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  15378. size *= int32(2)
  15379. if glyphs != bp {
  15380. libc.Xfree(tls, glyphs)
  15381. }
  15382. glyphs = glyphs_new
  15383. }
  15384. v3 = i
  15385. i++
  15386. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  15387. string1 += uintptr(l)
  15388. len1 -= l
  15389. }
  15390. XXftGlyphRender(tls, dpy, int32(m_PictOpOver), src, pub, dst, srcx, srcy, x, y, glyphs, i)
  15391. if glyphs != bp {
  15392. libc.Xfree(tls, glyphs)
  15393. }
  15394. }
  15395. /* xftxlfd.c */
  15396. func X_XftMatchSymbolic(tls *libc.TLS, s uintptr, n int32, name uintptr, def int32) (r int32) {
  15397. var v1 int32
  15398. _ = v1
  15399. for {
  15400. v1 = n
  15401. n--
  15402. if !(v1 != 0) {
  15403. break
  15404. }
  15405. if !(libfontconfig.XFcStrCmpIgnoreCase(tls, (*TXftSymbolic)(unsafe.Pointer(s)).Fname, name) != 0) {
  15406. return (*TXftSymbolic)(unsafe.Pointer(s)).Fvalue
  15407. }
  15408. s += 16
  15409. }
  15410. return def
  15411. }
  15412. /* xftxlfd.c */
  15413. func XXftNativeByteOrder(tls *libc.TLS) (r int32) {
  15414. bp := tls.Alloc(16)
  15415. defer tls.Free(16)
  15416. var _ /* whichbyte at bp+0 */ int32
  15417. *(*int32)(unsafe.Pointer(bp)) = int32(1)
  15418. if *(*uint8)(unsafe.Pointer(bp)) != 0 {
  15419. return m_LSBFirst
  15420. }
  15421. return int32(m_MSBFirst)
  15422. }
  15423. /* byte swap a 32-bit value */
  15424. /* byte swap a short */
  15425. /* byte swap a three-byte unit */
  15426. func XXftSwapCARD32(tls *libc.TLS, data uintptr, u int32) {
  15427. var n uint8
  15428. var v1 int32
  15429. _, _ = n, v1
  15430. for {
  15431. v1 = u
  15432. u--
  15433. if !(v1 != 0) {
  15434. break
  15435. }
  15436. n = *(*uint8)(unsafe.Pointer(data))
  15437. *(*uint8)(unsafe.Pointer(data)) = *(*uint8)(unsafe.Pointer(data + 3))
  15438. *(*uint8)(unsafe.Pointer(data + 3)) = n
  15439. n = *(*uint8)(unsafe.Pointer(data + 1))
  15440. *(*uint8)(unsafe.Pointer(data + 1)) = *(*uint8)(unsafe.Pointer(data + 2))
  15441. *(*uint8)(unsafe.Pointer(data + 2)) = n
  15442. data += 4
  15443. }
  15444. }
  15445. func XXftSwapCARD24(tls *libc.TLS, data uintptr, width int32, height int32) {
  15446. var d uintptr
  15447. var n uint8
  15448. var u, units, v1, v2 int32
  15449. _, _, _, _, _, _ = d, n, u, units, v1, v2
  15450. units = width / int32(3)
  15451. for {
  15452. v1 = height
  15453. height--
  15454. if !(v1 != 0) {
  15455. break
  15456. }
  15457. d = data
  15458. data += uintptr(width)
  15459. u = units
  15460. for {
  15461. v2 = u
  15462. u--
  15463. if !(v2 != 0) {
  15464. break
  15465. }
  15466. n = *(*uint8)(unsafe.Pointer(d))
  15467. *(*uint8)(unsafe.Pointer(d)) = *(*uint8)(unsafe.Pointer(d + 2))
  15468. *(*uint8)(unsafe.Pointer(d + 2)) = n
  15469. d += uintptr(3)
  15470. }
  15471. }
  15472. }
  15473. func XXftSwapCARD16(tls *libc.TLS, data uintptr, u int32) {
  15474. var n uint8
  15475. var v1 int32
  15476. _, _ = n, v1
  15477. for {
  15478. v1 = u
  15479. u--
  15480. if !(v1 != 0) {
  15481. break
  15482. }
  15483. n = *(*uint8)(unsafe.Pointer(data))
  15484. *(*uint8)(unsafe.Pointer(data)) = *(*uint8)(unsafe.Pointer(data + 1))
  15485. *(*uint8)(unsafe.Pointer(data + 1)) = n
  15486. data += 2
  15487. }
  15488. }
  15489. func XXftSwapImage(tls *libc.TLS, image uintptr) {
  15490. switch (*TXImage)(unsafe.Pointer(image)).Fbits_per_pixel {
  15491. case int32(32):
  15492. XXftSwapCARD32(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(2))
  15493. case int32(24):
  15494. XXftSwapCARD24(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line, (*TXImage)(unsafe.Pointer(image)).Fheight)
  15495. case int32(16):
  15496. XXftSwapCARD16(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(1))
  15497. default:
  15498. break
  15499. }
  15500. }
  15501. /* xftxlfd.c */
  15502. var _XftXlfdWeights = [6]TXftSymbolic{
  15503. 0: {
  15504. Fname: __ccgo_ts + 1746,
  15505. Fvalue: int32(m_FC_WEIGHT_LIGHT),
  15506. },
  15507. 1: {
  15508. Fname: __ccgo_ts + 1752,
  15509. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  15510. },
  15511. 2: {
  15512. Fname: __ccgo_ts + 1759,
  15513. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  15514. },
  15515. 3: {
  15516. Fname: __ccgo_ts + 1767,
  15517. Fvalue: int32(m_FC_WEIGHT_DEMIBOLD),
  15518. },
  15519. 4: {
  15520. Fname: __ccgo_ts + 1776,
  15521. Fvalue: int32(m_FC_WEIGHT_BOLD),
  15522. },
  15523. 5: {
  15524. Fname: __ccgo_ts + 1781,
  15525. Fvalue: int32(m_FC_WEIGHT_BLACK),
  15526. },
  15527. }
  15528. var _XftXlfdSlants = [3]TXftSymbolic{
  15529. 0: {
  15530. Fname: __ccgo_ts + 1787,
  15531. },
  15532. 1: {
  15533. Fname: __ccgo_ts + 1789,
  15534. Fvalue: int32(m_FC_SLANT_ITALIC),
  15535. },
  15536. 2: {
  15537. Fname: __ccgo_ts + 1791,
  15538. Fvalue: int32(m_FC_SLANT_OBLIQUE),
  15539. },
  15540. }
  15541. // C documentation
  15542. //
  15543. // /*
  15544. // * Cut out one XLFD field, placing it in 'save' and return
  15545. // * the start of 'save'
  15546. // */
  15547. func _XftSplitStr(tls *libc.TLS, field uintptr, save uintptr) (r uintptr) {
  15548. var c uint8
  15549. var s, v1, v2 uintptr
  15550. _, _, _, _ = c, s, v1, v2
  15551. s = save
  15552. for *(*uint8)(unsafe.Pointer(field)) != 0 {
  15553. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(field))) == int32('-') {
  15554. break
  15555. }
  15556. v1 = field
  15557. field++
  15558. c = *(*uint8)(unsafe.Pointer(v1))
  15559. v2 = save
  15560. save++
  15561. *(*uint8)(unsafe.Pointer(v2)) = c
  15562. }
  15563. *(*uint8)(unsafe.Pointer(save)) = uint8(0)
  15564. return s
  15565. }
  15566. /*
  15567. * convert one XLFD numeric field. Return -1 if the field is '*'
  15568. */
  15569. func _XftGetInt(tls *libc.TLS, ptr uintptr, val uintptr) (r uintptr) {
  15570. var v2 uintptr
  15571. _ = v2
  15572. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) == int32('*') {
  15573. *(*int32)(unsafe.Pointer(val)) = -int32(1)
  15574. ptr++
  15575. } else {
  15576. *(*int32)(unsafe.Pointer(val)) = 0
  15577. for {
  15578. if !(libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) >= int32('0') && libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) <= int32('9')) {
  15579. break
  15580. }
  15581. v2 = ptr
  15582. ptr++
  15583. *(*int32)(unsafe.Pointer(val)) = *(*int32)(unsafe.Pointer(val))*int32(10) + libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) - int32('0')
  15584. goto _1
  15585. _1:
  15586. }
  15587. }
  15588. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) == int32('-') {
  15589. return ptr
  15590. }
  15591. return libc.UintptrFromInt32(0)
  15592. }
  15593. func XXftXlfdParse(tls *libc.TLS, xlfd_orig uintptr, ignore_scalable TFcBool, complete TFcBool) (r uintptr) {
  15594. bp := tls.Alloc(16)
  15595. defer tls.Free(16)
  15596. var dpixel float64
  15597. var encoding, family, foundry, pat, registry, 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, v32, v33, v34, v4, v5, v6, v7, v8, v9 uintptr
  15598. var slant_value, weight_value int32
  15599. var _ /* pixel at bp+0 */ int32
  15600. var _ /* point at bp+4 */ int32
  15601. var _ /* resx at bp+8 */ int32
  15602. var _ /* resy at bp+12 */ int32
  15603. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = dpixel, encoding, family, foundry, pat, registry, 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, v32, v33, v34, v4, v5, v6, v7, v8, v9
  15604. xlfd = xlfd_orig
  15605. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(xlfd))) != int32('-') {
  15606. return libc.UintptrFromInt32(0)
  15607. }
  15608. xlfd++
  15609. v3 = xlfd
  15610. v2 = v3
  15611. foundry = v2
  15612. v1 = libc.Xstrchr(tls, v2, int32('-'))
  15613. xlfd = v1
  15614. if !(v1 != 0) {
  15615. return libc.UintptrFromInt32(0)
  15616. }
  15617. xlfd++
  15618. v6 = xlfd
  15619. v5 = v6
  15620. family = v5
  15621. v4 = libc.Xstrchr(tls, v5, int32('-'))
  15622. xlfd = v4
  15623. if !(v4 != 0) {
  15624. return libc.UintptrFromInt32(0)
  15625. }
  15626. xlfd++
  15627. v9 = xlfd
  15628. v8 = v9
  15629. weight_name = v8
  15630. v7 = libc.Xstrchr(tls, v8, int32('-'))
  15631. xlfd = v7
  15632. if !(v7 != 0) {
  15633. return libc.UintptrFromInt32(0)
  15634. }
  15635. xlfd++
  15636. v12 = xlfd
  15637. v11 = v12
  15638. slant = v11
  15639. v10 = libc.Xstrchr(tls, v11, int32('-'))
  15640. xlfd = v10
  15641. if !(v10 != 0) {
  15642. return libc.UintptrFromInt32(0)
  15643. }
  15644. xlfd++
  15645. v14 = xlfd
  15646. v13 = libc.Xstrchr(tls, v14, int32('-'))
  15647. xlfd = v13
  15648. if !(v13 != 0) {
  15649. return libc.UintptrFromInt32(0)
  15650. }
  15651. xlfd++
  15652. v16 = xlfd
  15653. v15 = libc.Xstrchr(tls, v16, int32('-'))
  15654. xlfd = v15
  15655. if !(v15 != 0) {
  15656. return libc.UintptrFromInt32(0)
  15657. }
  15658. xlfd++
  15659. v18 = xlfd
  15660. v17 = _XftGetInt(tls, v18, bp)
  15661. xlfd = v17
  15662. if !(v17 != 0) {
  15663. return libc.UintptrFromInt32(0)
  15664. }
  15665. xlfd++
  15666. v20 = xlfd
  15667. v19 = _XftGetInt(tls, v20, bp+4)
  15668. xlfd = v19
  15669. if !(v19 != 0) {
  15670. return libc.UintptrFromInt32(0)
  15671. }
  15672. xlfd++
  15673. v22 = xlfd
  15674. v21 = _XftGetInt(tls, v22, bp+8)
  15675. xlfd = v21
  15676. if !(v21 != 0) {
  15677. return libc.UintptrFromInt32(0)
  15678. }
  15679. xlfd++
  15680. v24 = xlfd
  15681. v23 = _XftGetInt(tls, v24, bp+12)
  15682. xlfd = v23
  15683. if !(v23 != 0) {
  15684. return libc.UintptrFromInt32(0)
  15685. }
  15686. xlfd++
  15687. v26 = xlfd
  15688. v25 = libc.Xstrchr(tls, v26, int32('-'))
  15689. xlfd = v25
  15690. if !(v25 != 0) {
  15691. return libc.UintptrFromInt32(0)
  15692. }
  15693. xlfd++
  15694. v28 = xlfd
  15695. v27 = libc.Xstrchr(tls, v28, int32('-'))
  15696. xlfd = v27
  15697. if !(v27 != 0) {
  15698. return libc.UintptrFromInt32(0)
  15699. }
  15700. xlfd++
  15701. v31 = xlfd
  15702. v30 = v31
  15703. registry = v30
  15704. v29 = libc.Xstrchr(tls, v30, int32('-'))
  15705. xlfd = v29
  15706. if !(v29 != 0) {
  15707. return libc.UintptrFromInt32(0)
  15708. }
  15709. /* make sure no fields follow this one */
  15710. xlfd++
  15711. v34 = xlfd
  15712. v33 = v34
  15713. encoding = v33
  15714. v32 = libc.Xstrchr(tls, v33, int32('-'))
  15715. xlfd = v32
  15716. if v32 != 0 {
  15717. return libc.UintptrFromInt32(0)
  15718. }
  15719. if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
  15720. return libc.UintptrFromInt32(0)
  15721. }
  15722. pat = libfontconfig.XFcPatternCreate(tls)
  15723. if !(pat != 0) {
  15724. return libc.UintptrFromInt32(0)
  15725. }
  15726. save = libc.Xmalloc(tls, libc.Xstrlen(tls, foundry)+uint64(1))
  15727. if !(save != 0) {
  15728. libfontconfig.XFcPatternDestroy(tls, pat)
  15729. return libc.UintptrFromInt32(0)
  15730. }
  15731. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+1736, xlfd_orig) != 0) {
  15732. goto bail
  15733. }
  15734. _XftSplitStr(tls, foundry, save)
  15735. if *(*uint8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+1793) != 0 {
  15736. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+1795, save) != 0) {
  15737. goto bail
  15738. }
  15739. }
  15740. _XftSplitStr(tls, family, save)
  15741. if *(*uint8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+1793) != 0 {
  15742. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+1803, save) != 0) {
  15743. goto bail
  15744. }
  15745. }
  15746. 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))
  15747. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+1810, weight_value) != 0) {
  15748. goto bail
  15749. }
  15750. 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)
  15751. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+1817, slant_value) != 0) {
  15752. goto bail
  15753. }
  15754. dpixel = float64(*(*int32)(unsafe.Pointer(bp)))
  15755. if *(*int32)(unsafe.Pointer(bp + 4)) > 0 {
  15756. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+1823, float64(*(*int32)(unsafe.Pointer(bp + 4)))/float64(10)) != 0) {
  15757. goto bail
  15758. }
  15759. if *(*int32)(unsafe.Pointer(bp)) <= 0 && *(*int32)(unsafe.Pointer(bp + 12)) > 0 {
  15760. dpixel = float64(float64(*(*int32)(unsafe.Pointer(bp + 4)))*float64(*(*int32)(unsafe.Pointer(bp + 12)))) / float64(720)
  15761. }
  15762. }
  15763. if dpixel > libc.Float64FromInt32(0) {
  15764. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+1104, dpixel) != 0) {
  15765. goto bail
  15766. }
  15767. }
  15768. libc.Xfree(tls, save)
  15769. return pat
  15770. goto bail
  15771. bail:
  15772. ;
  15773. libc.Xfree(tls, save)
  15774. libfontconfig.XFcPatternDestroy(tls, pat)
  15775. return libc.UintptrFromInt32(0)
  15776. }
  15777. func __ccgo_fp(f interface{}) uintptr {
  15778. type iface [2]uintptr
  15779. return (*iface)(unsafe.Pointer(&f))[1]
  15780. }
  15781. /* xftxlfd.c */
  15782. var X_XftDisplayInfo uintptr
  15783. /* xftxlfd.c */
  15784. var X_XftFTlibrary TFT_Library
  15785. var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data
  15786. 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 %ld\n\x00maxunreffonts\x00global max unref fonts %d\n\x00XftDisplayInfoGet failed to initialize, Xft unhappy\n\x00Display glyph cache incorrect has %ld bytes, should have %ld\n\x00Reduce global memory from %ld to %ld\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 %ld bytes, should have %ld\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 %ld\n\x00Uncaching glyph 0x%x size %ld\n\x00Reduce memory for font 0x%lx from %ld to %ld\n\x00XftDraw\x00XftFont\x00XftFtFile\x00XftGlyph\x00Xft Memory Usage:\n\x00\t Which Alloc Free\n\x00\t count bytes count bytes\n\x00\t%8.8s%8d%8d%8d%8d\n\x00Total\x00core\x00xlfd\x00lang\x00light\x00medium\x00regular\x00demibold\x00bold\x00black\x00r\x00i\x00o\x00*\x00foundry\x00family\x00weight\x00slant\x00size\x00"