ccgo_linux_loong64.go 496 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823
  1. // Code generated for linux/loong64 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/cznic/src/modernc.org/libfontconfig/include/linux/loong64 -I /home/cznic/src/modernc.org/libfreetype/include/linux/loong64 -I /home/cznic/src/modernc.org/libX11/include/linux/loong64 -I /home/cznic/src/modernc.org/libXrender/include/linux/loong64 -lfontconfig -lfreetype -lX11 -lXrender -o libxft.go --package-name libxft src/.libs/libXft.a', DO NOT EDIT.
  2. //go:build linux && loong64
  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 (
  14. _ reflect.Type
  15. _ unsafe.Pointer
  16. )
  17. const m_ARG_MAX = 131072
  18. const m_Above = 0
  19. const m_AllTemporary = 0
  20. const m_AllValues = 0x000F
  21. const m_AllocAll = 1
  22. const m_AllocNone = 0
  23. const m_AllowExposures = 1
  24. const m_AlreadyGrabbed = 1
  25. const m_Always = 2
  26. const m_AnyButton = 0
  27. const m_AnyKey = 0
  28. const m_AnyPropertyType = 0
  29. const m_ArcChord = 0
  30. const m_ArcPieSlice = 1
  31. const m_AsyncBoth = 6
  32. const m_AsyncKeyboard = 3
  33. const m_AsyncPointer = 0
  34. const m_AutoRepeatModeDefault = 2
  35. const m_AutoRepeatModeOff = 0
  36. const m_AutoRepeatModeOn = 1
  37. const m_BC_BASE_MAX = 99
  38. const m_BC_DIM_MAX = 2048
  39. const m_BC_SCALE_MAX = 99
  40. const m_BC_STRING_MAX = 1000
  41. const m_BIG_ENDIAN = "__BIG_ENDIAN"
  42. const m_BUFSIZ = 1024
  43. const m_BUFSIZE = 2048
  44. const m_BYTE_ORDER = "__BYTE_ORDER"
  45. const m_BadAccess = 10
  46. const m_BadAlloc = 11
  47. const m_BadAtom = 5
  48. const m_BadColor = 12
  49. const m_BadCursor = 6
  50. const m_BadDrawable = 9
  51. const m_BadFont = 7
  52. const m_BadGC = 13
  53. const m_BadGlyph = 4
  54. const m_BadGlyphSet = 3
  55. const m_BadIDChoice = 14
  56. const m_BadImplementation = 17
  57. const m_BadLength = 16
  58. const m_BadMatch = 8
  59. const m_BadName = 15
  60. const m_BadPictFormat = 0
  61. const m_BadPictOp = 2
  62. const m_BadPicture = 1
  63. const m_BadPixmap = 4
  64. const m_BadRequest = 1
  65. const m_BadValue = 2
  66. const m_BadWindow = 3
  67. const m_Below = 1
  68. const m_BitmapFileInvalid = 2
  69. const m_BitmapNoMemory = 3
  70. const m_BitmapOpenFailed = 1
  71. const m_BitmapSuccess = 0
  72. const m_Bool = "int"
  73. const m_BottomIf = 3
  74. const m_Button1 = 1
  75. const m_Button2 = 2
  76. const m_Button3 = 3
  77. const m_Button4 = 4
  78. const m_Button5 = 5
  79. const m_ButtonPress = 4
  80. const m_ButtonRelease = 5
  81. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 = 500
  82. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 = 1000
  83. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 = 1667
  84. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 = 2333
  85. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 = 400
  86. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 = 275
  87. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 = 275
  88. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 = 0
  89. const m_CHARCLASS_NAME_MAX = 14
  90. const m_CHAR_BIT = 8
  91. const m_CHAR_MAX = 255
  92. const m_CHAR_MIN = 0
  93. const m_COLL_WEIGHTS_MAX = 2
  94. const m_CPLastBit = 12
  95. const m_CURSORFONT = "cursor"
  96. const m_CapButt = 1
  97. const m_CapNotLast = 0
  98. const m_CapProjecting = 3
  99. const m_CapRound = 2
  100. const m_CenterGravity = 5
  101. const m_CirculateNotify = 26
  102. const m_CirculateRequest = 27
  103. const m_ClientMessage = 33
  104. const m_ClipByChildren = 0
  105. const m_ColormapInstalled = 1
  106. const m_ColormapNotify = 32
  107. const m_ColormapUninstalled = 0
  108. const m_Complex = 0
  109. const m_ConfigureNotify = 22
  110. const m_ConfigureRequest = 23
  111. const m_ControlMapIndex = 2
  112. const m_Convex = 2
  113. const m_CoordModeOrigin = 0
  114. const m_CoordModePrevious = 1
  115. const m_CopyFromParent = 0
  116. const m_CreateNotify = 16
  117. const m_CurrentTime = 0
  118. const m_CursorShape = 0
  119. const m_DELAYTIMER_MAX = 0x7fffffff
  120. const m_DefaultBlanking = 2
  121. const m_DefaultExposures = 2
  122. const m_DestroyAll = 0
  123. const m_DestroyNotify = 17
  124. const m_DirectColor = 5
  125. const m_DisableAccess = 0
  126. const m_DisableScreenInterval = 0
  127. const m_DisableScreenSaver = 0
  128. const m_DontAllowExposures = 0
  129. const m_DontCareState = 0
  130. const m_DontPreferBlanking = 0
  131. const m_E2BIG = 7
  132. const m_EACCES = 13
  133. const m_EADDRINUSE = 98
  134. const m_EADDRNOTAVAIL = 99
  135. const m_EADV = 68
  136. const m_EAFNOSUPPORT = 97
  137. const m_EAGAIN = 11
  138. const m_EALREADY = 114
  139. const m_EBADE = 52
  140. const m_EBADF = 9
  141. const m_EBADFD = 77
  142. const m_EBADMSG = 74
  143. const m_EBADR = 53
  144. const m_EBADRQC = 56
  145. const m_EBADSLT = 57
  146. const m_EBFONT = 59
  147. const m_EBUSY = 16
  148. const m_ECANCELED = 125
  149. const m_ECHILD = 10
  150. const m_ECHRNG = 44
  151. const m_ECOMM = 70
  152. const m_ECONNABORTED = 103
  153. const m_ECONNREFUSED = 111
  154. const m_ECONNRESET = 104
  155. const m_EDEADLK = 35
  156. const m_EDEADLOCK = "EDEADLK"
  157. const m_EDESTADDRREQ = 89
  158. const m_EDOM = 33
  159. const m_EDOTDOT = 73
  160. const m_EDQUOT = 122
  161. const m_EEXIST = 17
  162. const m_EFAULT = 14
  163. const m_EFBIG = 27
  164. const m_EHOSTDOWN = 112
  165. const m_EHOSTUNREACH = 113
  166. const m_EHWPOISON = 133
  167. const m_EIDRM = 43
  168. const m_EILSEQ = 84
  169. const m_EINPROGRESS = 115
  170. const m_EINTR = 4
  171. const m_EINVAL = 22
  172. const m_EIO = 5
  173. const m_EISCONN = 106
  174. const m_EISDIR = 21
  175. const m_EISNAM = 120
  176. const m_EKEYEXPIRED = 127
  177. const m_EKEYREJECTED = 129
  178. const m_EKEYREVOKED = 128
  179. const m_EL2HLT = 51
  180. const m_EL2NSYNC = 45
  181. const m_EL3HLT = 46
  182. const m_EL3RST = 47
  183. const m_ELIBACC = 79
  184. const m_ELIBBAD = 80
  185. const m_ELIBEXEC = 83
  186. const m_ELIBMAX = 82
  187. const m_ELIBSCN = 81
  188. const m_ELNRNG = 48
  189. const m_ELOOP = 40
  190. const m_EMEDIUMTYPE = 124
  191. const m_EMFILE = 24
  192. const m_EMLINK = 31
  193. const m_EMSGSIZE = 90
  194. const m_EMULTIHOP = 72
  195. const m_ENAMETOOLONG = 36
  196. const m_ENAVAIL = 119
  197. const m_ENETDOWN = 100
  198. const m_ENETRESET = 102
  199. const m_ENETUNREACH = 101
  200. const m_ENFILE = 23
  201. const m_ENOANO = 55
  202. const m_ENOBUFS = 105
  203. const m_ENOCSI = 50
  204. const m_ENODATA = 61
  205. const m_ENODEV = 19
  206. const m_ENOENT = 2
  207. const m_ENOEXEC = 8
  208. const m_ENOKEY = 126
  209. const m_ENOLCK = 37
  210. const m_ENOLINK = 67
  211. const m_ENOMEDIUM = 123
  212. const m_ENOMEM = 12
  213. const m_ENOMSG = 42
  214. const m_ENONET = 64
  215. const m_ENOPKG = 65
  216. const m_ENOPROTOOPT = 92
  217. const m_ENOSPC = 28
  218. const m_ENOSR = 63
  219. const m_ENOSTR = 60
  220. const m_ENOSYS = 38
  221. const m_ENOTBLK = 15
  222. const m_ENOTCONN = 107
  223. const m_ENOTDIR = 20
  224. const m_ENOTEMPTY = 39
  225. const m_ENOTNAM = 118
  226. const m_ENOTRECOVERABLE = 131
  227. const m_ENOTSOCK = 88
  228. const m_ENOTSUP = "EOPNOTSUPP"
  229. const m_ENOTTY = 25
  230. const m_ENOTUNIQ = 76
  231. const m_ENXIO = 6
  232. const m_EOPNOTSUPP = 95
  233. const m_EOVERFLOW = 75
  234. const m_EOWNERDEAD = 130
  235. const m_EPERM = 1
  236. const m_EPFNOSUPPORT = 96
  237. const m_EPIPE = 32
  238. const m_EPROTO = 71
  239. const m_EPROTONOSUPPORT = 93
  240. const m_EPROTOTYPE = 91
  241. const m_ERANGE = 34
  242. const m_EREMCHG = 78
  243. const m_EREMOTE = 66
  244. const m_EREMOTEIO = 121
  245. const m_ERESTART = 85
  246. const m_ERFKILL = 132
  247. const m_EROFS = 30
  248. const m_ESHUTDOWN = 108
  249. const m_ESOCKTNOSUPPORT = 94
  250. const m_ESPIPE = 29
  251. const m_ESRCH = 3
  252. const m_ESRMNT = 69
  253. const m_ESTALE = 116
  254. const m_ESTRPIPE = 86
  255. const m_ETIME = 62
  256. const m_ETIMEDOUT = 110
  257. const m_ETOOMANYREFS = 109
  258. const m_ETXTBSY = 26
  259. const m_EUCLEAN = 117
  260. const m_EUNATCH = 49
  261. const m_EUSERS = 87
  262. const m_EWOULDBLOCK = "EAGAIN"
  263. const m_EXDEV = 18
  264. const m_EXFULL = 54
  265. const m_EXIT_FAILURE = 1
  266. const m_EXIT_SUCCESS = 0
  267. const m_EXPR_NEST_MAX = 32
  268. const m_EastGravity = 6
  269. const m_EnableAccess = 1
  270. const m_EnterNotify = 7
  271. const m_EvenOddRule = 0
  272. const m_Expose = 12
  273. const m_FARCSPERBATCH = 256
  274. const m_FC_ANTIALIAS = "antialias"
  275. const m_FC_ASPECT = "aspect"
  276. const m_FC_AUTOHINT = "autohint"
  277. const m_FC_CACHE_VERSION_NUMBER = 8
  278. const m_FC_CAPABILITY = "capability"
  279. const m_FC_CHARCELL = 110
  280. const m_FC_CHARSET = "charset"
  281. const m_FC_CHARWIDTH = "charwidth"
  282. const m_FC_CHAR_HEIGHT = "charheight"
  283. const m_FC_CHAR_WIDTH = "FC_CHARWIDTH"
  284. const m_FC_COLOR = "color"
  285. const m_FC_DECORATIVE = "decorative"
  286. const m_FC_DPI = "dpi"
  287. const m_FC_DUAL = 90
  288. const m_FC_EMBEDDED_BITMAP = "embeddedbitmap"
  289. const m_FC_EMBOLDEN = "embolden"
  290. const m_FC_FAMILY = "family"
  291. const m_FC_FAMILYLANG = "familylang"
  292. const m_FC_FILE = "file"
  293. const m_FC_FONTFORMAT = "fontformat"
  294. const m_FC_FONTVERSION = "fontversion"
  295. const m_FC_FONT_FEATURES = "fontfeatures"
  296. const m_FC_FONT_HAS_HINT = "fonthashint"
  297. const m_FC_FONT_VARIATIONS = "fontvariations"
  298. const m_FC_FOUNDRY = "foundry"
  299. const m_FC_FT_FACE = "ftface"
  300. const m_FC_FULLNAME = "fullname"
  301. const m_FC_FULLNAMELANG = "fullnamelang"
  302. const m_FC_GLOBAL_ADVANCE = "globaladvance"
  303. const m_FC_HASH = "hash"
  304. const m_FC_HINTING = "hinting"
  305. const m_FC_HINT_FULL = 3
  306. const m_FC_HINT_MEDIUM = 2
  307. const m_FC_HINT_NONE = 0
  308. const m_FC_HINT_SLIGHT = 1
  309. const m_FC_HINT_STYLE = "hintstyle"
  310. const m_FC_INDEX = "index"
  311. const m_FC_LANG = "lang"
  312. const m_FC_LCD_DEFAULT = 1
  313. const m_FC_LCD_FILTER = "lcdfilter"
  314. const m_FC_LCD_LEGACY = 3
  315. const m_FC_LCD_LIGHT = 2
  316. const m_FC_LCD_NONE = 0
  317. const m_FC_MAJOR = 2
  318. const m_FC_MATRIX = "matrix"
  319. const m_FC_MINOR = 14
  320. const m_FC_MINSPACE = "minspace"
  321. const m_FC_MONO = 100
  322. const m_FC_NAMELANG = "namelang"
  323. const m_FC_ORDER = "order"
  324. const m_FC_OUTLINE = "outline"
  325. const m_FC_PIXEL_SIZE = "pixelsize"
  326. const m_FC_POSTSCRIPT_NAME = "postscriptname"
  327. const m_FC_PRGNAME = "prgname"
  328. const m_FC_PROPORTIONAL = 0
  329. const m_FC_RASTERIZER = "rasterizer"
  330. const m_FC_REVISION = 1
  331. const m_FC_RGBA = "rgba"
  332. const m_FC_RGBA_BGR = 2
  333. const m_FC_RGBA_NONE = 5
  334. const m_FC_RGBA_RGB = 1
  335. const m_FC_RGBA_UNKNOWN = 0
  336. const m_FC_RGBA_VBGR = 4
  337. const m_FC_RGBA_VRGB = 3
  338. const m_FC_SCALABLE = "scalable"
  339. const m_FC_SCALE = "scale"
  340. const m_FC_SIZE = "size"
  341. const m_FC_SLANT = "slant"
  342. const m_FC_SLANT_ITALIC = 100
  343. const m_FC_SLANT_OBLIQUE = 110
  344. const m_FC_SLANT_ROMAN = 0
  345. const m_FC_SOURCE = "source"
  346. const m_FC_SPACING = "spacing"
  347. const m_FC_STYLE = "style"
  348. const m_FC_STYLELANG = "stylelang"
  349. const m_FC_SYMBOL = "symbol"
  350. const m_FC_UTF8_MAX_LEN = 6
  351. const m_FC_VARIABLE = "variable"
  352. const m_FC_VERTICAL_LAYOUT = "verticallayout"
  353. const m_FC_WEIGHT = "weight"
  354. const m_FC_WEIGHT_BLACK = 210
  355. const m_FC_WEIGHT_BOLD = 200
  356. const m_FC_WEIGHT_BOOK = 75
  357. const m_FC_WEIGHT_DEMIBOLD = 180
  358. const m_FC_WEIGHT_DEMILIGHT = 55
  359. const m_FC_WEIGHT_EXTRABLACK = 215
  360. const m_FC_WEIGHT_EXTRABOLD = 205
  361. const m_FC_WEIGHT_EXTRALIGHT = 40
  362. const m_FC_WEIGHT_HEAVY = "FC_WEIGHT_BLACK"
  363. const m_FC_WEIGHT_LIGHT = 50
  364. const m_FC_WEIGHT_MEDIUM = 100
  365. const m_FC_WEIGHT_NORMAL = "FC_WEIGHT_REGULAR"
  366. const m_FC_WEIGHT_REGULAR = 80
  367. const m_FC_WEIGHT_SEMIBOLD = "FC_WEIGHT_DEMIBOLD"
  368. const m_FC_WEIGHT_SEMILIGHT = "FC_WEIGHT_DEMILIGHT"
  369. const m_FC_WEIGHT_THIN = 0
  370. const m_FC_WEIGHT_ULTRABLACK = "FC_WEIGHT_EXTRABLACK"
  371. const m_FC_WEIGHT_ULTRABOLD = "FC_WEIGHT_EXTRABOLD"
  372. const m_FC_WEIGHT_ULTRALIGHT = "FC_WEIGHT_EXTRALIGHT"
  373. const m_FC_WIDTH = "width"
  374. const m_FC_WIDTH_CONDENSED = 75
  375. const m_FC_WIDTH_EXPANDED = 125
  376. const m_FC_WIDTH_EXTRACONDENSED = 63
  377. const m_FC_WIDTH_EXTRAEXPANDED = 150
  378. const m_FC_WIDTH_NORMAL = 100
  379. const m_FC_WIDTH_SEMICONDENSED = 87
  380. const m_FC_WIDTH_SEMIEXPANDED = 113
  381. const m_FC_WIDTH_ULTRACONDENSED = 50
  382. const m_FC_WIDTH_ULTRAEXPANDED = 200
  383. const m_FD_SETSIZE = 1024
  384. const m_FILENAME_MAX = 4096
  385. const m_FILESIZEBITS = 64
  386. const m_FOPEN_MAX = 1000
  387. const m_FRCTSPERBATCH = 256
  388. const m_FREETYPE_MAJOR = 2
  389. const m_FREETYPE_MINOR = 12
  390. const m_FREETYPE_PATCH = 1
  391. const m_FT_AUTOHINTER_H = "FT_DRIVER_H"
  392. const m_FT_CACHE_CHARMAP_H = "FT_CACHE_H"
  393. const m_FT_CACHE_IMAGE_H = "FT_CACHE_H"
  394. const m_FT_CACHE_INTERNAL_CACHE_H = "FT_CACHE_H"
  395. const m_FT_CACHE_INTERNAL_GLYPH_H = "FT_CACHE_H"
  396. const m_FT_CACHE_INTERNAL_IMAGE_H = "FT_CACHE_H"
  397. const m_FT_CACHE_INTERNAL_MANAGER_H = "FT_CACHE_H"
  398. const m_FT_CACHE_INTERNAL_MRU_H = "FT_CACHE_H"
  399. const m_FT_CACHE_INTERNAL_SBITS_H = "FT_CACHE_H"
  400. const m_FT_CACHE_MANAGER_H = "FT_CACHE_H"
  401. const m_FT_CACHE_SMALL_BITMAPS_H = "FT_CACHE_H"
  402. const m_FT_CFF_DRIVER_H = "FT_DRIVER_H"
  403. const m_FT_CHAR_BIT = "CHAR_BIT"
  404. const m_FT_CURVE_TAG_CONIC = 0x00
  405. const m_FT_CURVE_TAG_CUBIC = 0x02
  406. const m_FT_CURVE_TAG_HAS_SCANMODE = 0x04
  407. const m_FT_CURVE_TAG_ON = 0x01
  408. const m_FT_CURVE_TAG_TOUCH_X = 0x08
  409. const m_FT_CURVE_TAG_TOUCH_Y = 0x10
  410. const m_FT_Curve_Tag_Conic = "FT_CURVE_TAG_CONIC"
  411. const m_FT_Curve_Tag_Cubic = "FT_CURVE_TAG_CUBIC"
  412. const m_FT_Curve_Tag_On = "FT_CURVE_TAG_ON"
  413. const m_FT_Curve_Tag_Touch_X = "FT_CURVE_TAG_TOUCH_X"
  414. const m_FT_Curve_Tag_Touch_Y = "FT_CURVE_TAG_TOUCH_Y"
  415. const m_FT_FILE = "FILE"
  416. const m_FT_FSTYPE_BITMAP_EMBEDDING_ONLY = 0x0200
  417. const m_FT_FSTYPE_EDITABLE_EMBEDDING = 0x0008
  418. const m_FT_FSTYPE_INSTALLABLE_EMBEDDING = 0x0000
  419. const m_FT_FSTYPE_NO_SUBSETTING = 0x0100
  420. const m_FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING = 0x0004
  421. const m_FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING = 0x0002
  422. const m_FT_INT64 = "long"
  423. const m_FT_INT_MAX = "INT_MAX"
  424. const m_FT_INT_MIN = "INT_MIN"
  425. const m_FT_LLONG_MAX = "LLONG_MAX"
  426. const m_FT_LLONG_MIN = "LLONG_MIN"
  427. const m_FT_LOAD_DEFAULT = 0x0
  428. const m_FT_LONG_MAX = "LONG_MAX"
  429. const m_FT_LONG_MIN = "LONG_MIN"
  430. const m_FT_MAX_MODULES = 32
  431. const m_FT_OPEN_DRIVER = 0x8
  432. const m_FT_OPEN_MEMORY = 0x1
  433. const m_FT_OPEN_PARAMS = 0x10
  434. const m_FT_OPEN_PATHNAME = 0x4
  435. const m_FT_OPEN_STREAM = 0x2
  436. const m_FT_OUTLINE_CONTOURS_MAX = "SHRT_MAX"
  437. const m_FT_OUTLINE_EVEN_ODD_FILL = 0x2
  438. const m_FT_OUTLINE_HIGH_PRECISION = 0x100
  439. const m_FT_OUTLINE_IGNORE_DROPOUTS = 0x8
  440. const m_FT_OUTLINE_INCLUDE_STUBS = 0x20
  441. const m_FT_OUTLINE_NONE = 0x0
  442. const m_FT_OUTLINE_OVERLAP = 0x40
  443. const m_FT_OUTLINE_OWNER = 0x1
  444. const m_FT_OUTLINE_POINTS_MAX = "SHRT_MAX"
  445. const m_FT_OUTLINE_REVERSE_FILL = 0x4
  446. const m_FT_OUTLINE_SINGLE_PASS = 0x200
  447. const m_FT_OUTLINE_SMART_DROPOUTS = 0x10
  448. const m_FT_Outline_ConicTo_Func = "FT_Outline_ConicToFunc"
  449. const m_FT_Outline_CubicTo_Func = "FT_Outline_CubicToFunc"
  450. const m_FT_Outline_LineTo_Func = "FT_Outline_LineToFunc"
  451. const m_FT_Outline_MoveTo_Func = "FT_Outline_MoveToFunc"
  452. const m_FT_PCF_DRIVER_H = "FT_DRIVER_H"
  453. const m_FT_RASTER_FLAG_AA = 0x1
  454. const m_FT_RASTER_FLAG_CLIP = 0x4
  455. const m_FT_RASTER_FLAG_DEFAULT = 0x0
  456. const m_FT_RASTER_FLAG_DIRECT = 0x2
  457. const m_FT_RASTER_FLAG_SDF = 0x8
  458. const m_FT_RENDER_POOL_SIZE = 16384
  459. const m_FT_Raster_Done_Func = "FT_Raster_DoneFunc"
  460. const m_FT_Raster_New_Func = "FT_Raster_NewFunc"
  461. const m_FT_Raster_Render_Func = "FT_Raster_RenderFunc"
  462. const m_FT_Raster_Reset_Func = "FT_Raster_ResetFunc"
  463. const m_FT_Raster_Set_Mode_Func = "FT_Raster_SetModeFunc"
  464. const m_FT_Raster_Span_Func = "FT_SpanFunc"
  465. const m_FT_SUBGLYPH_FLAG_2X2 = 0x80
  466. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS = 1
  467. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES = 2
  468. const m_FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID = 4
  469. const m_FT_SUBGLYPH_FLAG_SCALE = 8
  470. const m_FT_SUBGLYPH_FLAG_USE_MY_METRICS = 0x200
  471. const m_FT_SUBGLYPH_FLAG_XY_SCALE = 0x40
  472. const m_FT_TRUETYPE_DRIVER_H = "FT_DRIVER_H"
  473. const m_FT_UINT_MAX = "UINT_MAX"
  474. const m_FT_ULLONG_MAX = "ULLONG_MAX"
  475. const m_FT_ULONG_MAX = "ULONG_MAX"
  476. const m_FT_USHORT_MAX = "USHRT_MAX"
  477. const m_FT_XFREE86_H = "FT_FONT_FORMATS_H"
  478. const m_FUNCPROTO = 15
  479. const m_False = 0
  480. const m_FamilyChaos = 2
  481. const m_FamilyDECnet = 1
  482. const m_FamilyInternet = 0
  483. const m_FamilyInternet6 = 6
  484. const m_FamilyServerInterpreted = 5
  485. const m_FcConfigGetRescanInverval = "FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval"
  486. const m_FcConfigSetRescanInverval = "FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval"
  487. const m_FcDontCare = 2
  488. const m_FcFalse = 0
  489. const m_FcTrue = 1
  490. const m_FillOpaqueStippled = 3
  491. const m_FillSolid = 0
  492. const m_FillStippled = 2
  493. const m_FillTiled = 1
  494. const m_FilterBest = "best"
  495. const m_FilterBilinear = "bilinear"
  496. const m_FilterConvolution = "convolution"
  497. const m_FilterFast = "fast"
  498. const m_FilterGood = "good"
  499. const m_FilterNearest = "nearest"
  500. const m_FirstExtensionError = 128
  501. const m_FocusIn = 9
  502. const m_FocusOut = 10
  503. const m_FontChange = 255
  504. const m_FontLeftToRight = 0
  505. const m_FontRightToLeft = 1
  506. const m_ForgetGravity = 0
  507. const m_GCLastBit = 22
  508. const m_GXand = 0x1
  509. const m_GXandInverted = 0x4
  510. const m_GXandReverse = 0x2
  511. const m_GXclear = 0x0
  512. const m_GXcopy = 0x3
  513. const m_GXcopyInverted = 0xc
  514. const m_GXequiv = 0x9
  515. const m_GXinvert = 0xa
  516. const m_GXnand = 0xe
  517. const m_GXnoop = 0x5
  518. const m_GXnor = 0x8
  519. const m_GXor = 0x7
  520. const m_GXorInverted = 0xd
  521. const m_GXorReverse = 0xb
  522. const m_GXset = 0xf
  523. const m_GXxor = 0x6
  524. const m_GenericEvent = 35
  525. const m_GrabFrozen = 4
  526. const m_GrabInvalidTime = 2
  527. const m_GrabModeAsync = 1
  528. const m_GrabModeSync = 0
  529. const m_GrabNotViewable = 3
  530. const m_GrabSuccess = 0
  531. const m_GraphicsExpose = 13
  532. const m_GravityNotify = 24
  533. const m_GrayScale = 1
  534. const m_HAVE_CONFIG_H = 1
  535. const m_HAVE_DLFCN_H = 1
  536. const m_HAVE_INTTYPES_H = 1
  537. const m_HAVE_STDINT_H = 1
  538. const m_HAVE_STDIO_H = 1
  539. const m_HAVE_STDLIB_H = 1
  540. const m_HAVE_STRINGS_H = 1
  541. const m_HAVE_STRING_H = 1
  542. const m_HAVE_SYS_STAT_H = 1
  543. const m_HAVE_SYS_TYPES_H = 1
  544. const m_HAVE_UNISTD_H = 1
  545. const m_HOST_NAME_MAX = 255
  546. const m_HeightValue = 0x0008
  547. const m_HostDelete = 1
  548. const m_HostInsert = 0
  549. const m_INT16_MAX = 0x7fff
  550. const m_INT32_MAX = 0x7fffffff
  551. const m_INT64_MAX = 0x7fffffffffffffff
  552. const m_INT8_MAX = 0x7f
  553. const m_INTMAX_MAX = "INT64_MAX"
  554. const m_INTMAX_MIN = "INT64_MIN"
  555. const m_INTPTR_MAX = "INT64_MAX"
  556. const m_INTPTR_MIN = "INT64_MIN"
  557. const m_INT_FAST16_MAX = "INT32_MAX"
  558. const m_INT_FAST16_MIN = "INT32_MIN"
  559. const m_INT_FAST32_MAX = "INT32_MAX"
  560. const m_INT_FAST32_MIN = "INT32_MIN"
  561. const m_INT_FAST64_MAX = "INT64_MAX"
  562. const m_INT_FAST64_MIN = "INT64_MIN"
  563. const m_INT_FAST8_MAX = "INT8_MAX"
  564. const m_INT_FAST8_MIN = "INT8_MIN"
  565. const m_INT_LEAST16_MAX = "INT16_MAX"
  566. const m_INT_LEAST16_MIN = "INT16_MIN"
  567. const m_INT_LEAST32_MAX = "INT32_MAX"
  568. const m_INT_LEAST32_MIN = "INT32_MIN"
  569. const m_INT_LEAST64_MAX = "INT64_MAX"
  570. const m_INT_LEAST64_MIN = "INT64_MIN"
  571. const m_INT_LEAST8_MAX = "INT8_MAX"
  572. const m_INT_LEAST8_MIN = "INT8_MIN"
  573. const m_INT_MAX = 2147483647
  574. const m_IOV_MAX = 1024
  575. const m_IconicState = 3
  576. const m_InactiveState = 4
  577. const m_IncludeInferiors = 1
  578. const m_InputFocus = 1
  579. const m_InputOnly = 2
  580. const m_InputOutput = 1
  581. const m_IsUnmapped = 0
  582. const m_IsUnviewable = 1
  583. const m_IsViewable = 2
  584. const m_JoinBevel = 2
  585. const m_JoinMiter = 0
  586. const m_JoinRound = 1
  587. const m_KeyPress = 2
  588. const m_KeyRelease = 3
  589. const m_KeymapNotify = 11
  590. const m_LASTEvent = 36
  591. const m_LINE_MAX = 4096
  592. const m_LITTLE_ENDIAN = "__LITTLE_ENDIAN"
  593. const m_LLONG_MAX = 0x7fffffffffffffff
  594. const m_LOCKED = 1
  595. const m_LOGIN_NAME_MAX = 256
  596. const m_LONG_BIT = 64
  597. const m_LONG_MAX = "__LONG_MAX"
  598. const m_LSBFirst = 0
  599. const m_LT_OBJDIR = ".libs/"
  600. const m_L_ctermid = 20
  601. const m_L_cuserid = 20
  602. const m_L_tmpnam = 20
  603. const m_LastExtensionError = 255
  604. const m_LeaveNotify = 8
  605. const m_LedModeOff = 0
  606. const m_LedModeOn = 1
  607. const m_LineDoubleDash = 2
  608. const m_LineOnOffDash = 1
  609. const m_LineSolid = 0
  610. const m_LockMapIndex = 1
  611. const m_LowerHighest = 1
  612. const m_MB_LEN_MAX = 4
  613. const m_MQ_PRIO_MAX = 32768
  614. const m_MSBFirst = 1
  615. const m_MapNotify = 19
  616. const m_MapRequest = 20
  617. const m_MappingBusy = 1
  618. const m_MappingFailed = 2
  619. const m_MappingKeyboard = 1
  620. const m_MappingModifier = 0
  621. const m_MappingNotify = 34
  622. const m_MappingPointer = 2
  623. const m_MappingSuccess = 0
  624. const m_Mod1MapIndex = 3
  625. const m_Mod2MapIndex = 4
  626. const m_Mod3MapIndex = 5
  627. const m_Mod4MapIndex = 6
  628. const m_Mod5MapIndex = 7
  629. const m_MotionNotify = 6
  630. const m_NAME_MAX = 255
  631. const m_NDEBUG = 1
  632. const m_NGROUPS_MAX = 32
  633. const m_NL_ARGMAX = 9
  634. const m_NL_LANGMAX = 32
  635. const m_NL_MSGMAX = 32767
  636. const m_NL_NMAX = 16
  637. const m_NL_SETMAX = 255
  638. const m_NL_TEXTMAX = 2048
  639. const m_NZERO = 20
  640. const m_NeedFunctionPrototypes = 1
  641. const m_NeedNestedPrototypes = 1
  642. const m_NeedVarargsPrototypes = 1
  643. const m_NeedWidePrototypes = 0
  644. const m_NoEventMask = 0
  645. const m_NoExpose = 14
  646. const m_NoSymbol = 0
  647. const m_NoValue = 0x0000
  648. const m_Nonconvex = 1
  649. const m_None = 0
  650. const m_NormalState = 1
  651. const m_NorthEastGravity = 3
  652. const m_NorthGravity = 2
  653. const m_NorthWestGravity = 1
  654. const m_NotUseful = 0
  655. const m_NotifyAncestor = 0
  656. const m_NotifyDetailNone = 7
  657. const m_NotifyGrab = 1
  658. const m_NotifyHint = 1
  659. const m_NotifyInferior = 2
  660. const m_NotifyNonlinear = 3
  661. const m_NotifyNonlinearVirtual = 4
  662. const m_NotifyNormal = 0
  663. const m_NotifyPointer = 5
  664. const m_NotifyPointerRoot = 6
  665. const m_NotifyUngrab = 2
  666. const m_NotifyVirtual = 1
  667. const m_NotifyWhileGrabbed = 3
  668. const m_Opposite = 4
  669. const m_PACKAGE = "libXft"
  670. const m_PACKAGE_BUGREPORT = "https://gitlab.freedesktop.org/xorg/lib/libXft/issues"
  671. const m_PACKAGE_NAME = "libXft"
  672. const m_PACKAGE_STRING = "libXft 2.3.4"
  673. const m_PACKAGE_TARNAME = "libXft"
  674. const m_PACKAGE_URL = ""
  675. const m_PACKAGE_VERSION = "2.3.4"
  676. const m_PACKAGE_VERSION_MAJOR = 2
  677. const m_PACKAGE_VERSION_MINOR = 3
  678. const m_PACKAGE_VERSION_PATCHLEVEL = 4
  679. const m_PATH_MAX = 4096
  680. const m_PDP_ENDIAN = "__PDP_ENDIAN"
  681. const m_PIPE_BUF = 4096
  682. const m_PTHREAD_DESTRUCTOR_ITERATIONS = 4
  683. const m_PTHREAD_KEYS_MAX = 128
  684. const m_PTHREAD_STACK_MIN = 2048
  685. const m_PTRDIFF_MAX = "INT64_MAX"
  686. const m_PTRDIFF_MIN = "INT64_MIN"
  687. const m_PTSPERBATCH = 1024
  688. const m_P_tmpdir = "/tmp"
  689. const m_ParentRelative = 1
  690. const m_PictOpAdd = 12
  691. const m_PictOpAtop = 9
  692. const m_PictOpAtopReverse = 10
  693. const m_PictOpBlendMaximum = 0x3e
  694. const m_PictOpBlendMinimum = 0x30
  695. const m_PictOpClear = 0
  696. const m_PictOpColorBurn = 0x36
  697. const m_PictOpColorDodge = 0x35
  698. const m_PictOpConjointAtop = 0x29
  699. const m_PictOpConjointAtopReverse = 0x2a
  700. const m_PictOpConjointClear = 0x20
  701. const m_PictOpConjointDst = 0x22
  702. const m_PictOpConjointIn = 0x25
  703. const m_PictOpConjointInReverse = 0x26
  704. const m_PictOpConjointMaximum = 0x2b
  705. const m_PictOpConjointMinimum = 0x20
  706. const m_PictOpConjointOut = 0x27
  707. const m_PictOpConjointOutReverse = 0x28
  708. const m_PictOpConjointOver = 0x23
  709. const m_PictOpConjointOverReverse = 0x24
  710. const m_PictOpConjointSrc = 0x21
  711. const m_PictOpConjointXor = 0x2b
  712. const m_PictOpDarken = 0x33
  713. const m_PictOpDifference = 0x39
  714. const m_PictOpDisjointAtop = 0x19
  715. const m_PictOpDisjointAtopReverse = 0x1a
  716. const m_PictOpDisjointClear = 0x10
  717. const m_PictOpDisjointDst = 0x12
  718. const m_PictOpDisjointIn = 0x15
  719. const m_PictOpDisjointInReverse = 0x16
  720. const m_PictOpDisjointMaximum = 0x1b
  721. const m_PictOpDisjointMinimum = 0x10
  722. const m_PictOpDisjointOut = 0x17
  723. const m_PictOpDisjointOutReverse = 0x18
  724. const m_PictOpDisjointOver = 0x13
  725. const m_PictOpDisjointOverReverse = 0x14
  726. const m_PictOpDisjointSrc = 0x11
  727. const m_PictOpDisjointXor = 0x1b
  728. const m_PictOpDst = 2
  729. const m_PictOpExclusion = 0x3a
  730. const m_PictOpHSLColor = 0x3d
  731. const m_PictOpHSLHue = 0x3b
  732. const m_PictOpHSLLuminosity = 0x3e
  733. const m_PictOpHSLSaturation = 0x3c
  734. const m_PictOpHardLight = 0x37
  735. const m_PictOpIn = 5
  736. const m_PictOpInReverse = 6
  737. const m_PictOpLighten = 0x34
  738. const m_PictOpMaximum = 13
  739. const m_PictOpMinimum = 0
  740. const m_PictOpMultiply = 0x30
  741. const m_PictOpOut = 7
  742. const m_PictOpOutReverse = 8
  743. const m_PictOpOver = 3
  744. const m_PictOpOverReverse = 4
  745. const m_PictOpOverlay = 0x32
  746. const m_PictOpSaturate = 13
  747. const m_PictOpScreen = 0x31
  748. const m_PictOpSoftLight = 0x38
  749. const m_PictOpSrc = 1
  750. const m_PictOpXor = 11
  751. const m_PictStandardA1 = 4
  752. const m_PictStandardA4 = 3
  753. const m_PictStandardA8 = 2
  754. const m_PictStandardARGB32 = 0
  755. const m_PictStandardNUM = 5
  756. const m_PictStandardRGB24 = 1
  757. const m_PictTypeDirect = 1
  758. const m_PictTypeIndexed = 0
  759. const m_PlaceOnBottom = 1
  760. const m_PlaceOnTop = 0
  761. const m_PointerRoot = 1
  762. const m_PointerWindow = 0
  763. const m_PolyEdgeSharp = 0
  764. const m_PolyEdgeSmooth = 1
  765. const m_PolyModeImprecise = 1
  766. const m_PolyModePrecise = 0
  767. const m_PreferBlanking = 1
  768. const m_PropModeAppend = 2
  769. const m_PropModePrepend = 1
  770. const m_PropModeReplace = 0
  771. const m_PropertyDelete = 1
  772. const m_PropertyNewValue = 0
  773. const m_PropertyNotify = 28
  774. const m_PseudoColor = 3
  775. const m_QueuedAfterFlush = 2
  776. const m_QueuedAfterReading = 1
  777. const m_QueuedAlready = 0
  778. const m_RAND_MAX = 0x7fffffff
  779. const m_RENDER_MAJOR = 0
  780. const m_RENDER_MINOR = 11
  781. const m_RENDER_NAME = "RENDER"
  782. const m_RE_DUP_MAX = 255
  783. const m_RaiseLowest = 0
  784. const m_RectangleIn = 1
  785. const m_RectangleOut = 0
  786. const m_RectanglePart = 2
  787. const m_ReparentNotify = 21
  788. const m_RepeatNone = 0
  789. const m_RepeatNormal = 1
  790. const m_RepeatPad = 2
  791. const m_RepeatReflect = 3
  792. const m_ReplayKeyboard = 5
  793. const m_ReplayPointer = 2
  794. const m_ResizeRequest = 25
  795. const m_RetainPermanent = 1
  796. const m_RetainTemporary = 2
  797. const m_RevertToParent = 2
  798. const m_SCHAR_MAX = 127
  799. const m_SEM_NSEMS_MAX = 256
  800. const m_SEM_VALUE_MAX = 0x7fffffff
  801. const m_SHRT_MAX = 0x7fff
  802. const m_SIG_ATOMIC_MAX = "INT32_MAX"
  803. const m_SIG_ATOMIC_MIN = "INT32_MIN"
  804. const m_SIZE_MAX = "UINT64_MAX"
  805. const m_SSIZE_MAX = "LONG_MAX"
  806. const m_STATX_ALL = 0xfff
  807. const m_STATX_ATIME = 0x20
  808. const m_STATX_BASIC_STATS = 0x7ff
  809. const m_STATX_BLOCKS = 0x400
  810. const m_STATX_BTIME = 0x800
  811. const m_STATX_CTIME = 0x80
  812. const m_STATX_GID = 0x10
  813. const m_STATX_INO = 0x100
  814. const m_STATX_MODE = 2
  815. const m_STATX_MTIME = 0x40
  816. const m_STATX_NLINK = 4
  817. const m_STATX_SIZE = 0x200
  818. const m_STATX_TYPE = 1
  819. const m_STATX_UID = 8
  820. const m_STDC_HEADERS = 1
  821. const m_SYMLOOP_MAX = 40
  822. const m_S_IEXEC = "S_IXUSR"
  823. const m_S_IFBLK = 0060000
  824. const m_S_IFCHR = 0020000
  825. const m_S_IFDIR = 0040000
  826. const m_S_IFIFO = 0010000
  827. const m_S_IFLNK = 0120000
  828. const m_S_IFMT = 0170000
  829. const m_S_IFREG = 0100000
  830. const m_S_IFSOCK = 0140000
  831. const m_S_IREAD = "S_IRUSR"
  832. const m_S_IRGRP = 0040
  833. const m_S_IROTH = 0004
  834. const m_S_IRUSR = 0400
  835. const m_S_IRWXG = 0070
  836. const m_S_IRWXO = 0007
  837. const m_S_IRWXU = 0700
  838. const m_S_ISGID = 02000
  839. const m_S_ISUID = 04000
  840. const m_S_ISVTX = 01000
  841. const m_S_IWGRP = 0020
  842. const m_S_IWOTH = 0002
  843. const m_S_IWRITE = "S_IWUSR"
  844. const m_S_IWUSR = 0200
  845. const m_S_IXGRP = 0010
  846. const m_S_IXOTH = 0001
  847. const m_S_IXUSR = 0100
  848. const m_ScreenSaverActive = 1
  849. const m_ScreenSaverReset = 0
  850. const m_SelectionClear = 29
  851. const m_SelectionNotify = 31
  852. const m_SelectionRequest = 30
  853. const m_SetModeDelete = 1
  854. const m_SetModeInsert = 0
  855. const m_ShiftMapIndex = 0
  856. const m_SouthEastGravity = 9
  857. const m_SouthGravity = 8
  858. const m_SouthWestGravity = 7
  859. const m_StaticColor = 2
  860. const m_StaticGravity = 10
  861. const m_StaticGray = 0
  862. const m_Status = "int"
  863. const m_StippleShape = 2
  864. const m_SubPixelHorizontalBGR = 2
  865. const m_SubPixelHorizontalRGB = 1
  866. const m_SubPixelNone = 5
  867. const m_SubPixelUnknown = 0
  868. const m_SubPixelVerticalBGR = 4
  869. const m_SubPixelVerticalRGB = 3
  870. const m_Success = 0
  871. const m_SyncBoth = 7
  872. const m_SyncKeyboard = 4
  873. const m_SyncPointer = 1
  874. const m_T1_MAX_CHARSTRINGS_OPERANDS = 256
  875. const m_T1_MAX_DICT_DEPTH = 5
  876. const m_T1_MAX_SUBRS_CALLS = 16
  877. const m_TMP_MAX = 10000
  878. const m_TTY_NAME_MAX = 32
  879. const m_TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES = 1000000
  880. const m_TT_CONFIG_OPTION_SUBPIXEL_HINTING = 2
  881. const m_TZNAME_MAX = 6
  882. const m_TileShape = 1
  883. const m_TopIf = 2
  884. const m_True = 1
  885. const m_TrueColor = 4
  886. const m_UCHAR_MAX = 255
  887. const m_UINT16_MAX = 0xffff
  888. const m_UINT32_MAX = "0xffffffffu"
  889. const m_UINT64_MAX = "0xffffffffffffffffu"
  890. const m_UINT8_MAX = 0xff
  891. const m_UINTMAX_MAX = "UINT64_MAX"
  892. const m_UINTPTR_MAX = "UINT64_MAX"
  893. const m_UINT_FAST16_MAX = "UINT32_MAX"
  894. const m_UINT_FAST32_MAX = "UINT32_MAX"
  895. const m_UINT_FAST64_MAX = "UINT64_MAX"
  896. const m_UINT_FAST8_MAX = "UINT8_MAX"
  897. const m_UINT_LEAST16_MAX = "UINT16_MAX"
  898. const m_UINT_LEAST32_MAX = "UINT32_MAX"
  899. const m_UINT_LEAST64_MAX = "UINT64_MAX"
  900. const m_UINT_LEAST8_MAX = "UINT8_MAX"
  901. const m_UINT_MAX = 0xffffffff
  902. const m_UNLOCKED = 0
  903. const m_USHRT_MAX = 0xffff
  904. const m_UTIME_NOW = 0x3fffffff
  905. const m_UTIME_OMIT = 0x3ffffffe
  906. const m_UnmapGravity = 0
  907. const m_UnmapNotify = 18
  908. const m_Unsorted = 0
  909. const m_VERSION = "2.3.4"
  910. const m_VisibilityFullyObscured = 2
  911. const m_VisibilityNotify = 15
  912. const m_VisibilityPartiallyObscured = 1
  913. const m_VisibilityUnobscured = 0
  914. const m_VisualAllMask = 0x1FF
  915. const m_VisualBitsPerRGBMask = 0x100
  916. const m_VisualBlueMaskMask = 0x40
  917. const m_VisualClassMask = 0x8
  918. const m_VisualColormapSizeMask = 0x80
  919. const m_VisualDepthMask = 0x4
  920. const m_VisualGreenMaskMask = 0x20
  921. const m_VisualIDMask = 0x1
  922. const m_VisualNoMask = 0x0
  923. const m_VisualRedMaskMask = 0x10
  924. const m_VisualScreenMask = 0x2
  925. const m_WINT_MAX = "UINT32_MAX"
  926. const m_WINT_MIN = 0
  927. const m_WLNSPERBATCH = 50
  928. const m_WNOHANG = 1
  929. const m_WORD_BIT = 32
  930. const m_WRCTSPERBATCH = 10
  931. const m_WUNTRACED = 2
  932. const m_WestGravity = 4
  933. const m_WhenMapped = 1
  934. const m_WidthValue = 0x0004
  935. const m_WindingRule = 1
  936. const m_WithdrawnState = 0
  937. const m_XCNOENT = 2
  938. const m_XCNOMEM = 1
  939. const m_XCSUCCESS = 0
  940. const m_XFT_ASSUME_PIXMAP = 20
  941. const m_XFT_CORE = "core"
  942. const m_XFT_DBG_CACHE = 128
  943. const m_XFT_DBG_CACHEV = 256
  944. const m_XFT_DBG_DRAW = 8
  945. const m_XFT_DBG_GLYPH = 32
  946. const m_XFT_DBG_GLYPHV = 64
  947. const m_XFT_DBG_MEMORY = 512
  948. const m_XFT_DBG_OPEN = 1
  949. const m_XFT_DBG_OPENV = 2
  950. const m_XFT_DBG_REF = 16
  951. const m_XFT_DBG_RENDER = 4
  952. const m_XFT_DPY_MAX_UNREF_FONTS = 16
  953. const m_XFT_MAJOR = 2
  954. const m_XFT_MAX_GLYPH_MEMORY = "maxglyphmemory"
  955. const m_XFT_MAX_UNREF_FONTS = "maxunreffonts"
  956. const m_XFT_MEM_DRAW = 0
  957. const m_XFT_MEM_FILE = 2
  958. const m_XFT_MEM_FONT = 1
  959. const m_XFT_MEM_GLYPH = 3
  960. const m_XFT_MEM_NUM = 4
  961. const m_XFT_MINOR = 3
  962. const m_XFT_NMISSING = 256
  963. const m_XFT_NUM_FONT_HASH = 127
  964. const m_XFT_NUM_SOLID_COLOR = 16
  965. const m_XFT_RENDER = "render"
  966. const m_XFT_REVISION = 4
  967. const m_XFT_XLFD = "xlfd"
  968. const m_XIMHotKeyStateOFF = 0x0002
  969. const m_XIMHotKeyStateON = 0x0001
  970. const m_XIMInitialState = 1
  971. const m_XIMPreeditArea = 0x0001
  972. const m_XIMPreeditCallbacks = 0x0002
  973. const m_XIMPreeditEnable = 1
  974. const m_XIMPreeditNone = 0x0010
  975. const m_XIMPreeditNothing = 0x0008
  976. const m_XIMPreeditPosition = 0x0004
  977. const m_XIMPreeditUnKnown = 0
  978. const m_XIMReverse = 1
  979. const m_XIMStatusArea = 0x0100
  980. const m_XIMStatusCallbacks = 0x0200
  981. const m_XIMStatusNone = 0x0800
  982. const m_XIMStatusNothing = 0x0400
  983. const m_XIMStringConversionBottomEdge = 0x00000008
  984. const m_XIMStringConversionBuffer = 0x0001
  985. const m_XIMStringConversionChar = 0x0004
  986. const m_XIMStringConversionConcealed = 0x00000010
  987. const m_XIMStringConversionLeftEdge = 0x00000001
  988. const m_XIMStringConversionLine = 0x0002
  989. const m_XIMStringConversionRetrieval = 0x0002
  990. const m_XIMStringConversionRightEdge = 0x00000002
  991. const m_XIMStringConversionSubstitution = 0x0001
  992. const m_XIMStringConversionTopEdge = 0x00000004
  993. const m_XIMStringConversionWord = 0x0003
  994. const m_XIMStringConversionWrapped = 0x00000020
  995. const m_XK_0 = 0x0030
  996. const m_XK_1 = 0x0031
  997. const m_XK_2 = 0x0032
  998. const m_XK_3 = 0x0033
  999. const m_XK_4 = 0x0034
  1000. const m_XK_5 = 0x0035
  1001. const m_XK_6 = 0x0036
  1002. const m_XK_7 = 0x0037
  1003. const m_XK_8 = 0x0038
  1004. const m_XK_9 = 0x0039
  1005. const m_XK_A = 0x0041
  1006. const m_XK_AE = 0x00c6
  1007. const m_XK_Aacute = 0x00c1
  1008. const m_XK_Abelowdot = 0x1001ea0
  1009. const m_XK_Abreve = 0x01c3
  1010. const m_XK_Abreveacute = 0x1001eae
  1011. const m_XK_Abrevebelowdot = 0x1001eb6
  1012. const m_XK_Abrevegrave = 0x1001eb0
  1013. const m_XK_Abrevehook = 0x1001eb2
  1014. const m_XK_Abrevetilde = 0x1001eb4
  1015. const m_XK_AccessX_Enable = 0xfe70
  1016. const m_XK_AccessX_Feedback_Enable = 0xfe71
  1017. const m_XK_Acircumflex = 0x00c2
  1018. const m_XK_Acircumflexacute = 0x1001ea4
  1019. const m_XK_Acircumflexbelowdot = 0x1001eac
  1020. const m_XK_Acircumflexgrave = 0x1001ea6
  1021. const m_XK_Acircumflexhook = 0x1001ea8
  1022. const m_XK_Acircumflextilde = 0x1001eaa
  1023. const m_XK_Adiaeresis = 0x00c4
  1024. const m_XK_Agrave = 0x00c0
  1025. const m_XK_Ahook = 0x1001ea2
  1026. const m_XK_Alt_L = 0xffe9
  1027. const m_XK_Alt_R = 0xffea
  1028. const m_XK_Amacron = 0x03c0
  1029. const m_XK_Aogonek = 0x01a1
  1030. const m_XK_Arabic_0 = 0x1000660
  1031. const m_XK_Arabic_1 = 0x1000661
  1032. const m_XK_Arabic_2 = 0x1000662
  1033. const m_XK_Arabic_3 = 0x1000663
  1034. const m_XK_Arabic_4 = 0x1000664
  1035. const m_XK_Arabic_5 = 0x1000665
  1036. const m_XK_Arabic_6 = 0x1000666
  1037. const m_XK_Arabic_7 = 0x1000667
  1038. const m_XK_Arabic_8 = 0x1000668
  1039. const m_XK_Arabic_9 = 0x1000669
  1040. const m_XK_Arabic_ain = 0x05d9
  1041. const m_XK_Arabic_alef = 0x05c7
  1042. const m_XK_Arabic_alefmaksura = 0x05e9
  1043. const m_XK_Arabic_beh = 0x05c8
  1044. const m_XK_Arabic_comma = 0x05ac
  1045. const m_XK_Arabic_dad = 0x05d6
  1046. const m_XK_Arabic_dal = 0x05cf
  1047. const m_XK_Arabic_damma = 0x05ef
  1048. const m_XK_Arabic_dammatan = 0x05ec
  1049. const m_XK_Arabic_ddal = 0x1000688
  1050. const m_XK_Arabic_farsi_yeh = 0x10006cc
  1051. const m_XK_Arabic_fatha = 0x05ee
  1052. const m_XK_Arabic_fathatan = 0x05eb
  1053. const m_XK_Arabic_feh = 0x05e1
  1054. const m_XK_Arabic_fullstop = 0x10006d4
  1055. const m_XK_Arabic_gaf = 0x10006af
  1056. const m_XK_Arabic_ghain = 0x05da
  1057. const m_XK_Arabic_ha = 0x05e7
  1058. const m_XK_Arabic_hah = 0x05cd
  1059. const m_XK_Arabic_hamza = 0x05c1
  1060. const m_XK_Arabic_hamza_above = 0x1000654
  1061. const m_XK_Arabic_hamza_below = 0x1000655
  1062. const m_XK_Arabic_hamzaonalef = 0x05c3
  1063. const m_XK_Arabic_hamzaonwaw = 0x05c4
  1064. const m_XK_Arabic_hamzaonyeh = 0x05c6
  1065. const m_XK_Arabic_hamzaunderalef = 0x05c5
  1066. const m_XK_Arabic_heh = 0x05e7
  1067. const m_XK_Arabic_heh_doachashmee = 0x10006be
  1068. const m_XK_Arabic_heh_goal = 0x10006c1
  1069. const m_XK_Arabic_jeem = 0x05cc
  1070. const m_XK_Arabic_jeh = 0x1000698
  1071. const m_XK_Arabic_kaf = 0x05e3
  1072. const m_XK_Arabic_kasra = 0x05f0
  1073. const m_XK_Arabic_kasratan = 0x05ed
  1074. const m_XK_Arabic_keheh = 0x10006a9
  1075. const m_XK_Arabic_khah = 0x05ce
  1076. const m_XK_Arabic_lam = 0x05e4
  1077. const m_XK_Arabic_madda_above = 0x1000653
  1078. const m_XK_Arabic_maddaonalef = 0x05c2
  1079. const m_XK_Arabic_meem = 0x05e5
  1080. const m_XK_Arabic_noon = 0x05e6
  1081. const m_XK_Arabic_noon_ghunna = 0x10006ba
  1082. const m_XK_Arabic_peh = 0x100067e
  1083. const m_XK_Arabic_percent = 0x100066a
  1084. const m_XK_Arabic_qaf = 0x05e2
  1085. const m_XK_Arabic_question_mark = 0x05bf
  1086. const m_XK_Arabic_ra = 0x05d1
  1087. const m_XK_Arabic_rreh = 0x1000691
  1088. const m_XK_Arabic_sad = 0x05d5
  1089. const m_XK_Arabic_seen = 0x05d3
  1090. const m_XK_Arabic_semicolon = 0x05bb
  1091. const m_XK_Arabic_shadda = 0x05f1
  1092. const m_XK_Arabic_sheen = 0x05d4
  1093. const m_XK_Arabic_sukun = 0x05f2
  1094. const m_XK_Arabic_superscript_alef = 0x1000670
  1095. const m_XK_Arabic_switch = 0xff7e
  1096. const m_XK_Arabic_tah = 0x05d7
  1097. const m_XK_Arabic_tatweel = 0x05e0
  1098. const m_XK_Arabic_tcheh = 0x1000686
  1099. const m_XK_Arabic_teh = 0x05ca
  1100. const m_XK_Arabic_tehmarbuta = 0x05c9
  1101. const m_XK_Arabic_thal = 0x05d0
  1102. const m_XK_Arabic_theh = 0x05cb
  1103. const m_XK_Arabic_tteh = 0x1000679
  1104. const m_XK_Arabic_veh = 0x10006a4
  1105. const m_XK_Arabic_waw = 0x05e8
  1106. const m_XK_Arabic_yeh = 0x05ea
  1107. const m_XK_Arabic_yeh_baree = 0x10006d2
  1108. const m_XK_Arabic_zah = 0x05d8
  1109. const m_XK_Arabic_zain = 0x05d2
  1110. const m_XK_Aring = 0x00c5
  1111. const m_XK_Armenian_AT = 0x1000538
  1112. const m_XK_Armenian_AYB = 0x1000531
  1113. const m_XK_Armenian_BEN = 0x1000532
  1114. const m_XK_Armenian_CHA = 0x1000549
  1115. const m_XK_Armenian_DA = 0x1000534
  1116. const m_XK_Armenian_DZA = 0x1000541
  1117. const m_XK_Armenian_E = 0x1000537
  1118. const m_XK_Armenian_FE = 0x1000556
  1119. const m_XK_Armenian_GHAT = 0x1000542
  1120. const m_XK_Armenian_GIM = 0x1000533
  1121. const m_XK_Armenian_HI = 0x1000545
  1122. const m_XK_Armenian_HO = 0x1000540
  1123. const m_XK_Armenian_INI = 0x100053b
  1124. const m_XK_Armenian_JE = 0x100054b
  1125. const m_XK_Armenian_KE = 0x1000554
  1126. const m_XK_Armenian_KEN = 0x100053f
  1127. const m_XK_Armenian_KHE = 0x100053d
  1128. const m_XK_Armenian_LYUN = 0x100053c
  1129. const m_XK_Armenian_MEN = 0x1000544
  1130. const m_XK_Armenian_NU = 0x1000546
  1131. const m_XK_Armenian_O = 0x1000555
  1132. const m_XK_Armenian_PE = 0x100054a
  1133. const m_XK_Armenian_PYUR = 0x1000553
  1134. const m_XK_Armenian_RA = 0x100054c
  1135. const m_XK_Armenian_RE = 0x1000550
  1136. const m_XK_Armenian_SE = 0x100054d
  1137. const m_XK_Armenian_SHA = 0x1000547
  1138. const m_XK_Armenian_TCHE = 0x1000543
  1139. const m_XK_Armenian_TO = 0x1000539
  1140. const m_XK_Armenian_TSA = 0x100053e
  1141. const m_XK_Armenian_TSO = 0x1000551
  1142. const m_XK_Armenian_TYUN = 0x100054f
  1143. const m_XK_Armenian_VEV = 0x100054e
  1144. const m_XK_Armenian_VO = 0x1000548
  1145. const m_XK_Armenian_VYUN = 0x1000552
  1146. const m_XK_Armenian_YECH = 0x1000535
  1147. const m_XK_Armenian_ZA = 0x1000536
  1148. const m_XK_Armenian_ZHE = 0x100053a
  1149. const m_XK_Armenian_accent = 0x100055b
  1150. const m_XK_Armenian_amanak = 0x100055c
  1151. const m_XK_Armenian_apostrophe = 0x100055a
  1152. const m_XK_Armenian_at = 0x1000568
  1153. const m_XK_Armenian_ayb = 0x1000561
  1154. const m_XK_Armenian_ben = 0x1000562
  1155. const m_XK_Armenian_but = 0x100055d
  1156. const m_XK_Armenian_cha = 0x1000579
  1157. const m_XK_Armenian_da = 0x1000564
  1158. const m_XK_Armenian_dza = 0x1000571
  1159. const m_XK_Armenian_e = 0x1000567
  1160. const m_XK_Armenian_exclam = 0x100055c
  1161. const m_XK_Armenian_fe = 0x1000586
  1162. const m_XK_Armenian_full_stop = 0x1000589
  1163. const m_XK_Armenian_ghat = 0x1000572
  1164. const m_XK_Armenian_gim = 0x1000563
  1165. const m_XK_Armenian_hi = 0x1000575
  1166. const m_XK_Armenian_ho = 0x1000570
  1167. const m_XK_Armenian_hyphen = 0x100058a
  1168. const m_XK_Armenian_ini = 0x100056b
  1169. const m_XK_Armenian_je = 0x100057b
  1170. const m_XK_Armenian_ke = 0x1000584
  1171. const m_XK_Armenian_ken = 0x100056f
  1172. const m_XK_Armenian_khe = 0x100056d
  1173. const m_XK_Armenian_ligature_ew = 0x1000587
  1174. const m_XK_Armenian_lyun = 0x100056c
  1175. const m_XK_Armenian_men = 0x1000574
  1176. const m_XK_Armenian_nu = 0x1000576
  1177. const m_XK_Armenian_o = 0x1000585
  1178. const m_XK_Armenian_paruyk = 0x100055e
  1179. const m_XK_Armenian_pe = 0x100057a
  1180. const m_XK_Armenian_pyur = 0x1000583
  1181. const m_XK_Armenian_question = 0x100055e
  1182. const m_XK_Armenian_ra = 0x100057c
  1183. const m_XK_Armenian_re = 0x1000580
  1184. const m_XK_Armenian_se = 0x100057d
  1185. const m_XK_Armenian_separation_mark = 0x100055d
  1186. const m_XK_Armenian_sha = 0x1000577
  1187. const m_XK_Armenian_shesht = 0x100055b
  1188. const m_XK_Armenian_tche = 0x1000573
  1189. const m_XK_Armenian_to = 0x1000569
  1190. const m_XK_Armenian_tsa = 0x100056e
  1191. const m_XK_Armenian_tso = 0x1000581
  1192. const m_XK_Armenian_tyun = 0x100057f
  1193. const m_XK_Armenian_verjaket = 0x1000589
  1194. const m_XK_Armenian_vev = 0x100057e
  1195. const m_XK_Armenian_vo = 0x1000578
  1196. const m_XK_Armenian_vyun = 0x1000582
  1197. const m_XK_Armenian_yech = 0x1000565
  1198. const m_XK_Armenian_yentamna = 0x100058a
  1199. const m_XK_Armenian_za = 0x1000566
  1200. const m_XK_Armenian_zhe = 0x100056a
  1201. const m_XK_Atilde = 0x00c3
  1202. const m_XK_AudibleBell_Enable = 0xfe7a
  1203. const m_XK_B = 0x0042
  1204. const m_XK_Babovedot = 0x1001e02
  1205. const m_XK_BackSpace = 0xff08
  1206. const m_XK_Begin = 0xff58
  1207. const m_XK_BounceKeys_Enable = 0xfe74
  1208. const m_XK_Break = 0xff6b
  1209. const m_XK_Byelorussian_SHORTU = 0x06be
  1210. const m_XK_Byelorussian_shortu = 0x06ae
  1211. const m_XK_C = 0x0043
  1212. const m_XK_CH = 0xfea2
  1213. const m_XK_C_H = 0xfea5
  1214. const m_XK_C_h = 0xfea4
  1215. const m_XK_Cabovedot = 0x02c5
  1216. const m_XK_Cacute = 0x01c6
  1217. const m_XK_Cancel = 0xff69
  1218. const m_XK_Caps_Lock = 0xffe5
  1219. const m_XK_Ccaron = 0x01c8
  1220. const m_XK_Ccedilla = 0x00c7
  1221. const m_XK_Ccircumflex = 0x02c6
  1222. const m_XK_Ch = 0xfea1
  1223. const m_XK_Clear = 0xff0b
  1224. const m_XK_Codeinput = 0xff37
  1225. const m_XK_ColonSign = 0x10020a1
  1226. const m_XK_Control_L = 0xffe3
  1227. const m_XK_Control_R = 0xffe4
  1228. const m_XK_CruzeiroSign = 0x10020a2
  1229. const m_XK_Cyrillic_A = 0x06e1
  1230. const m_XK_Cyrillic_BE = 0x06e2
  1231. const m_XK_Cyrillic_CHE = 0x06fe
  1232. const m_XK_Cyrillic_CHE_descender = 0x10004b6
  1233. const m_XK_Cyrillic_CHE_vertstroke = 0x10004b8
  1234. const m_XK_Cyrillic_DE = 0x06e4
  1235. const m_XK_Cyrillic_DZHE = 0x06bf
  1236. const m_XK_Cyrillic_E = 0x06fc
  1237. const m_XK_Cyrillic_EF = 0x06e6
  1238. const m_XK_Cyrillic_EL = 0x06ec
  1239. const m_XK_Cyrillic_EM = 0x06ed
  1240. const m_XK_Cyrillic_EN = 0x06ee
  1241. const m_XK_Cyrillic_EN_descender = 0x10004a2
  1242. const m_XK_Cyrillic_ER = 0x06f2
  1243. const m_XK_Cyrillic_ES = 0x06f3
  1244. const m_XK_Cyrillic_GHE = 0x06e7
  1245. const m_XK_Cyrillic_GHE_bar = 0x1000492
  1246. const m_XK_Cyrillic_HA = 0x06e8
  1247. const m_XK_Cyrillic_HARDSIGN = 0x06ff
  1248. const m_XK_Cyrillic_HA_descender = 0x10004b2
  1249. const m_XK_Cyrillic_I = 0x06e9
  1250. const m_XK_Cyrillic_IE = 0x06e5
  1251. const m_XK_Cyrillic_IO = 0x06b3
  1252. const m_XK_Cyrillic_I_macron = 0x10004e2
  1253. const m_XK_Cyrillic_JE = 0x06b8
  1254. const m_XK_Cyrillic_KA = 0x06eb
  1255. const m_XK_Cyrillic_KA_descender = 0x100049a
  1256. const m_XK_Cyrillic_KA_vertstroke = 0x100049c
  1257. const m_XK_Cyrillic_LJE = 0x06b9
  1258. const m_XK_Cyrillic_NJE = 0x06ba
  1259. const m_XK_Cyrillic_O = 0x06ef
  1260. const m_XK_Cyrillic_O_bar = 0x10004e8
  1261. const m_XK_Cyrillic_PE = 0x06f0
  1262. const m_XK_Cyrillic_SCHWA = 0x10004d8
  1263. const m_XK_Cyrillic_SHA = 0x06fb
  1264. const m_XK_Cyrillic_SHCHA = 0x06fd
  1265. const m_XK_Cyrillic_SHHA = 0x10004ba
  1266. const m_XK_Cyrillic_SHORTI = 0x06ea
  1267. const m_XK_Cyrillic_SOFTSIGN = 0x06f8
  1268. const m_XK_Cyrillic_TE = 0x06f4
  1269. const m_XK_Cyrillic_TSE = 0x06e3
  1270. const m_XK_Cyrillic_U = 0x06f5
  1271. const m_XK_Cyrillic_U_macron = 0x10004ee
  1272. const m_XK_Cyrillic_U_straight = 0x10004ae
  1273. const m_XK_Cyrillic_U_straight_bar = 0x10004b0
  1274. const m_XK_Cyrillic_VE = 0x06f7
  1275. const m_XK_Cyrillic_YA = 0x06f1
  1276. const m_XK_Cyrillic_YERU = 0x06f9
  1277. const m_XK_Cyrillic_YU = 0x06e0
  1278. const m_XK_Cyrillic_ZE = 0x06fa
  1279. const m_XK_Cyrillic_ZHE = 0x06f6
  1280. const m_XK_Cyrillic_ZHE_descender = 0x1000496
  1281. const m_XK_Cyrillic_a = 0x06c1
  1282. const m_XK_Cyrillic_be = 0x06c2
  1283. const m_XK_Cyrillic_che = 0x06de
  1284. const m_XK_Cyrillic_che_descender = 0x10004b7
  1285. const m_XK_Cyrillic_che_vertstroke = 0x10004b9
  1286. const m_XK_Cyrillic_de = 0x06c4
  1287. const m_XK_Cyrillic_dzhe = 0x06af
  1288. const m_XK_Cyrillic_e = 0x06dc
  1289. const m_XK_Cyrillic_ef = 0x06c6
  1290. const m_XK_Cyrillic_el = 0x06cc
  1291. const m_XK_Cyrillic_em = 0x06cd
  1292. const m_XK_Cyrillic_en = 0x06ce
  1293. const m_XK_Cyrillic_en_descender = 0x10004a3
  1294. const m_XK_Cyrillic_er = 0x06d2
  1295. const m_XK_Cyrillic_es = 0x06d3
  1296. const m_XK_Cyrillic_ghe = 0x06c7
  1297. const m_XK_Cyrillic_ghe_bar = 0x1000493
  1298. const m_XK_Cyrillic_ha = 0x06c8
  1299. const m_XK_Cyrillic_ha_descender = 0x10004b3
  1300. const m_XK_Cyrillic_hardsign = 0x06df
  1301. const m_XK_Cyrillic_i = 0x06c9
  1302. const m_XK_Cyrillic_i_macron = 0x10004e3
  1303. const m_XK_Cyrillic_ie = 0x06c5
  1304. const m_XK_Cyrillic_io = 0x06a3
  1305. const m_XK_Cyrillic_je = 0x06a8
  1306. const m_XK_Cyrillic_ka = 0x06cb
  1307. const m_XK_Cyrillic_ka_descender = 0x100049b
  1308. const m_XK_Cyrillic_ka_vertstroke = 0x100049d
  1309. const m_XK_Cyrillic_lje = 0x06a9
  1310. const m_XK_Cyrillic_nje = 0x06aa
  1311. const m_XK_Cyrillic_o = 0x06cf
  1312. const m_XK_Cyrillic_o_bar = 0x10004e9
  1313. const m_XK_Cyrillic_pe = 0x06d0
  1314. const m_XK_Cyrillic_schwa = 0x10004d9
  1315. const m_XK_Cyrillic_sha = 0x06db
  1316. const m_XK_Cyrillic_shcha = 0x06dd
  1317. const m_XK_Cyrillic_shha = 0x10004bb
  1318. const m_XK_Cyrillic_shorti = 0x06ca
  1319. const m_XK_Cyrillic_softsign = 0x06d8
  1320. const m_XK_Cyrillic_te = 0x06d4
  1321. const m_XK_Cyrillic_tse = 0x06c3
  1322. const m_XK_Cyrillic_u = 0x06d5
  1323. const m_XK_Cyrillic_u_macron = 0x10004ef
  1324. const m_XK_Cyrillic_u_straight = 0x10004af
  1325. const m_XK_Cyrillic_u_straight_bar = 0x10004b1
  1326. const m_XK_Cyrillic_ve = 0x06d7
  1327. const m_XK_Cyrillic_ya = 0x06d1
  1328. const m_XK_Cyrillic_yeru = 0x06d9
  1329. const m_XK_Cyrillic_yu = 0x06c0
  1330. const m_XK_Cyrillic_ze = 0x06da
  1331. const m_XK_Cyrillic_zhe = 0x06d6
  1332. const m_XK_Cyrillic_zhe_descender = 0x1000497
  1333. const m_XK_D = 0x0044
  1334. const m_XK_Dabovedot = 0x1001e0a
  1335. const m_XK_Dcaron = 0x01cf
  1336. const m_XK_Delete = 0xffff
  1337. const m_XK_DongSign = 0x10020ab
  1338. const m_XK_Down = 0xff54
  1339. const m_XK_Dstroke = 0x01d0
  1340. const m_XK_E = 0x0045
  1341. const m_XK_ENG = 0x03bd
  1342. const m_XK_ETH = 0x00d0
  1343. const m_XK_EZH = 0x10001b7
  1344. const m_XK_Eabovedot = 0x03cc
  1345. const m_XK_Eacute = 0x00c9
  1346. const m_XK_Ebelowdot = 0x1001eb8
  1347. const m_XK_Ecaron = 0x01cc
  1348. const m_XK_Ecircumflex = 0x00ca
  1349. const m_XK_Ecircumflexacute = 0x1001ebe
  1350. const m_XK_Ecircumflexbelowdot = 0x1001ec6
  1351. const m_XK_Ecircumflexgrave = 0x1001ec0
  1352. const m_XK_Ecircumflexhook = 0x1001ec2
  1353. const m_XK_Ecircumflextilde = 0x1001ec4
  1354. const m_XK_EcuSign = 0x10020a0
  1355. const m_XK_Ediaeresis = 0x00cb
  1356. const m_XK_Egrave = 0x00c8
  1357. const m_XK_Ehook = 0x1001eba
  1358. const m_XK_Eisu_Shift = 0xff2f
  1359. const m_XK_Eisu_toggle = 0xff30
  1360. const m_XK_Emacron = 0x03aa
  1361. const m_XK_End = 0xff57
  1362. const m_XK_Eogonek = 0x01ca
  1363. const m_XK_Escape = 0xff1b
  1364. const m_XK_Eth = 0x00d0
  1365. const m_XK_Etilde = 0x1001ebc
  1366. const m_XK_EuroSign = 0x20ac
  1367. const m_XK_Execute = 0xff62
  1368. const m_XK_F = 0x0046
  1369. const m_XK_F1 = 0xffbe
  1370. const m_XK_F10 = 0xffc7
  1371. const m_XK_F11 = 0xffc8
  1372. const m_XK_F12 = 0xffc9
  1373. const m_XK_F13 = 0xffca
  1374. const m_XK_F14 = 0xffcb
  1375. const m_XK_F15 = 0xffcc
  1376. const m_XK_F16 = 0xffcd
  1377. const m_XK_F17 = 0xffce
  1378. const m_XK_F18 = 0xffcf
  1379. const m_XK_F19 = 0xffd0
  1380. const m_XK_F2 = 0xffbf
  1381. const m_XK_F20 = 0xffd1
  1382. const m_XK_F21 = 0xffd2
  1383. const m_XK_F22 = 0xffd3
  1384. const m_XK_F23 = 0xffd4
  1385. const m_XK_F24 = 0xffd5
  1386. const m_XK_F25 = 0xffd6
  1387. const m_XK_F26 = 0xffd7
  1388. const m_XK_F27 = 0xffd8
  1389. const m_XK_F28 = 0xffd9
  1390. const m_XK_F29 = 0xffda
  1391. const m_XK_F3 = 0xffc0
  1392. const m_XK_F30 = 0xffdb
  1393. const m_XK_F31 = 0xffdc
  1394. const m_XK_F32 = 0xffdd
  1395. const m_XK_F33 = 0xffde
  1396. const m_XK_F34 = 0xffdf
  1397. const m_XK_F35 = 0xffe0
  1398. const m_XK_F4 = 0xffc1
  1399. const m_XK_F5 = 0xffc2
  1400. const m_XK_F6 = 0xffc3
  1401. const m_XK_F7 = 0xffc4
  1402. const m_XK_F8 = 0xffc5
  1403. const m_XK_F9 = 0xffc6
  1404. const m_XK_FFrancSign = 0x10020a3
  1405. const m_XK_Fabovedot = 0x1001e1e
  1406. const m_XK_Farsi_0 = 0x10006f0
  1407. const m_XK_Farsi_1 = 0x10006f1
  1408. const m_XK_Farsi_2 = 0x10006f2
  1409. const m_XK_Farsi_3 = 0x10006f3
  1410. const m_XK_Farsi_4 = 0x10006f4
  1411. const m_XK_Farsi_5 = 0x10006f5
  1412. const m_XK_Farsi_6 = 0x10006f6
  1413. const m_XK_Farsi_7 = 0x10006f7
  1414. const m_XK_Farsi_8 = 0x10006f8
  1415. const m_XK_Farsi_9 = 0x10006f9
  1416. const m_XK_Farsi_yeh = 0x10006cc
  1417. const m_XK_Find = 0xff68
  1418. const m_XK_First_Virtual_Screen = 0xfed0
  1419. const m_XK_G = 0x0047
  1420. const m_XK_Gabovedot = 0x02d5
  1421. const m_XK_Gbreve = 0x02ab
  1422. const m_XK_Gcaron = 0x10001e6
  1423. const m_XK_Gcedilla = 0x03ab
  1424. const m_XK_Gcircumflex = 0x02d8
  1425. const m_XK_Georgian_an = 0x10010d0
  1426. const m_XK_Georgian_ban = 0x10010d1
  1427. const m_XK_Georgian_can = 0x10010ea
  1428. const m_XK_Georgian_char = 0x10010ed
  1429. const m_XK_Georgian_chin = 0x10010e9
  1430. const m_XK_Georgian_cil = 0x10010ec
  1431. const m_XK_Georgian_don = 0x10010d3
  1432. const m_XK_Georgian_en = 0x10010d4
  1433. const m_XK_Georgian_fi = 0x10010f6
  1434. const m_XK_Georgian_gan = 0x10010d2
  1435. const m_XK_Georgian_ghan = 0x10010e6
  1436. const m_XK_Georgian_hae = 0x10010f0
  1437. const m_XK_Georgian_har = 0x10010f4
  1438. const m_XK_Georgian_he = 0x10010f1
  1439. const m_XK_Georgian_hie = 0x10010f2
  1440. const m_XK_Georgian_hoe = 0x10010f5
  1441. const m_XK_Georgian_in = 0x10010d8
  1442. const m_XK_Georgian_jhan = 0x10010ef
  1443. const m_XK_Georgian_jil = 0x10010eb
  1444. const m_XK_Georgian_kan = 0x10010d9
  1445. const m_XK_Georgian_khar = 0x10010e5
  1446. const m_XK_Georgian_las = 0x10010da
  1447. const m_XK_Georgian_man = 0x10010db
  1448. const m_XK_Georgian_nar = 0x10010dc
  1449. const m_XK_Georgian_on = 0x10010dd
  1450. const m_XK_Georgian_par = 0x10010de
  1451. const m_XK_Georgian_phar = 0x10010e4
  1452. const m_XK_Georgian_qar = 0x10010e7
  1453. const m_XK_Georgian_rae = 0x10010e0
  1454. const m_XK_Georgian_san = 0x10010e1
  1455. const m_XK_Georgian_shin = 0x10010e8
  1456. const m_XK_Georgian_tan = 0x10010d7
  1457. const m_XK_Georgian_tar = 0x10010e2
  1458. const m_XK_Georgian_un = 0x10010e3
  1459. const m_XK_Georgian_vin = 0x10010d5
  1460. const m_XK_Georgian_we = 0x10010f3
  1461. const m_XK_Georgian_xan = 0x10010ee
  1462. const m_XK_Georgian_zen = 0x10010d6
  1463. const m_XK_Georgian_zhar = 0x10010df
  1464. const m_XK_Greek_ALPHA = 0x07c1
  1465. const m_XK_Greek_ALPHAaccent = 0x07a1
  1466. const m_XK_Greek_BETA = 0x07c2
  1467. const m_XK_Greek_CHI = 0x07d7
  1468. const m_XK_Greek_DELTA = 0x07c4
  1469. const m_XK_Greek_EPSILON = 0x07c5
  1470. const m_XK_Greek_EPSILONaccent = 0x07a2
  1471. const m_XK_Greek_ETA = 0x07c7
  1472. const m_XK_Greek_ETAaccent = 0x07a3
  1473. const m_XK_Greek_GAMMA = 0x07c3
  1474. const m_XK_Greek_IOTA = 0x07c9
  1475. const m_XK_Greek_IOTAaccent = 0x07a4
  1476. const m_XK_Greek_IOTAdiaeresis = 0x07a5
  1477. const m_XK_Greek_IOTAdieresis = 0x07a5
  1478. const m_XK_Greek_KAPPA = 0x07ca
  1479. const m_XK_Greek_LAMBDA = 0x07cb
  1480. const m_XK_Greek_LAMDA = 0x07cb
  1481. const m_XK_Greek_MU = 0x07cc
  1482. const m_XK_Greek_NU = 0x07cd
  1483. const m_XK_Greek_OMEGA = 0x07d9
  1484. const m_XK_Greek_OMEGAaccent = 0x07ab
  1485. const m_XK_Greek_OMICRON = 0x07cf
  1486. const m_XK_Greek_OMICRONaccent = 0x07a7
  1487. const m_XK_Greek_PHI = 0x07d6
  1488. const m_XK_Greek_PI = 0x07d0
  1489. const m_XK_Greek_PSI = 0x07d8
  1490. const m_XK_Greek_RHO = 0x07d1
  1491. const m_XK_Greek_SIGMA = 0x07d2
  1492. const m_XK_Greek_TAU = 0x07d4
  1493. const m_XK_Greek_THETA = 0x07c8
  1494. const m_XK_Greek_UPSILON = 0x07d5
  1495. const m_XK_Greek_UPSILONaccent = 0x07a8
  1496. const m_XK_Greek_UPSILONdieresis = 0x07a9
  1497. const m_XK_Greek_XI = 0x07ce
  1498. const m_XK_Greek_ZETA = 0x07c6
  1499. const m_XK_Greek_accentdieresis = 0x07ae
  1500. const m_XK_Greek_alpha = 0x07e1
  1501. const m_XK_Greek_alphaaccent = 0x07b1
  1502. const m_XK_Greek_beta = 0x07e2
  1503. const m_XK_Greek_chi = 0x07f7
  1504. const m_XK_Greek_delta = 0x07e4
  1505. const m_XK_Greek_epsilon = 0x07e5
  1506. const m_XK_Greek_epsilonaccent = 0x07b2
  1507. const m_XK_Greek_eta = 0x07e7
  1508. const m_XK_Greek_etaaccent = 0x07b3
  1509. const m_XK_Greek_finalsmallsigma = 0x07f3
  1510. const m_XK_Greek_gamma = 0x07e3
  1511. const m_XK_Greek_horizbar = 0x07af
  1512. const m_XK_Greek_iota = 0x07e9
  1513. const m_XK_Greek_iotaaccent = 0x07b4
  1514. const m_XK_Greek_iotaaccentdieresis = 0x07b6
  1515. const m_XK_Greek_iotadieresis = 0x07b5
  1516. const m_XK_Greek_kappa = 0x07ea
  1517. const m_XK_Greek_lambda = 0x07eb
  1518. const m_XK_Greek_lamda = 0x07eb
  1519. const m_XK_Greek_mu = 0x07ec
  1520. const m_XK_Greek_nu = 0x07ed
  1521. const m_XK_Greek_omega = 0x07f9
  1522. const m_XK_Greek_omegaaccent = 0x07bb
  1523. const m_XK_Greek_omicron = 0x07ef
  1524. const m_XK_Greek_omicronaccent = 0x07b7
  1525. const m_XK_Greek_phi = 0x07f6
  1526. const m_XK_Greek_pi = 0x07f0
  1527. const m_XK_Greek_psi = 0x07f8
  1528. const m_XK_Greek_rho = 0x07f1
  1529. const m_XK_Greek_sigma = 0x07f2
  1530. const m_XK_Greek_switch = 0xff7e
  1531. const m_XK_Greek_tau = 0x07f4
  1532. const m_XK_Greek_theta = 0x07e8
  1533. const m_XK_Greek_upsilon = 0x07f5
  1534. const m_XK_Greek_upsilonaccent = 0x07b8
  1535. const m_XK_Greek_upsilonaccentdieresis = 0x07ba
  1536. const m_XK_Greek_upsilondieresis = 0x07b9
  1537. const m_XK_Greek_xi = 0x07ee
  1538. const m_XK_Greek_zeta = 0x07e6
  1539. const m_XK_H = 0x0048
  1540. const m_XK_Hangul = 0xff31
  1541. const m_XK_Hangul_A = 0x0ebf
  1542. const m_XK_Hangul_AE = 0x0ec0
  1543. const m_XK_Hangul_AraeA = 0x0ef6
  1544. const m_XK_Hangul_AraeAE = 0x0ef7
  1545. const m_XK_Hangul_Banja = 0xff39
  1546. const m_XK_Hangul_Cieuc = 0x0eba
  1547. const m_XK_Hangul_Codeinput = 0xff37
  1548. const m_XK_Hangul_Dikeud = 0x0ea7
  1549. const m_XK_Hangul_E = 0x0ec4
  1550. const m_XK_Hangul_EO = 0x0ec3
  1551. const m_XK_Hangul_EU = 0x0ed1
  1552. const m_XK_Hangul_End = 0xff33
  1553. const m_XK_Hangul_Hanja = 0xff34
  1554. const m_XK_Hangul_Hieuh = 0x0ebe
  1555. const m_XK_Hangul_I = 0x0ed3
  1556. const m_XK_Hangul_Ieung = 0x0eb7
  1557. const m_XK_Hangul_J_Cieuc = 0x0eea
  1558. const m_XK_Hangul_J_Dikeud = 0x0eda
  1559. const m_XK_Hangul_J_Hieuh = 0x0eee
  1560. const m_XK_Hangul_J_Ieung = 0x0ee8
  1561. const m_XK_Hangul_J_Jieuj = 0x0ee9
  1562. const m_XK_Hangul_J_Khieuq = 0x0eeb
  1563. const m_XK_Hangul_J_Kiyeog = 0x0ed4
  1564. const m_XK_Hangul_J_KiyeogSios = 0x0ed6
  1565. const m_XK_Hangul_J_KkogjiDalrinIeung = 0x0ef9
  1566. const m_XK_Hangul_J_Mieum = 0x0ee3
  1567. const m_XK_Hangul_J_Nieun = 0x0ed7
  1568. const m_XK_Hangul_J_NieunHieuh = 0x0ed9
  1569. const m_XK_Hangul_J_NieunJieuj = 0x0ed8
  1570. const m_XK_Hangul_J_PanSios = 0x0ef8
  1571. const m_XK_Hangul_J_Phieuf = 0x0eed
  1572. const m_XK_Hangul_J_Pieub = 0x0ee4
  1573. const m_XK_Hangul_J_PieubSios = 0x0ee5
  1574. const m_XK_Hangul_J_Rieul = 0x0edb
  1575. const m_XK_Hangul_J_RieulHieuh = 0x0ee2
  1576. const m_XK_Hangul_J_RieulKiyeog = 0x0edc
  1577. const m_XK_Hangul_J_RieulMieum = 0x0edd
  1578. const m_XK_Hangul_J_RieulPhieuf = 0x0ee1
  1579. const m_XK_Hangul_J_RieulPieub = 0x0ede
  1580. const m_XK_Hangul_J_RieulSios = 0x0edf
  1581. const m_XK_Hangul_J_RieulTieut = 0x0ee0
  1582. const m_XK_Hangul_J_Sios = 0x0ee6
  1583. const m_XK_Hangul_J_SsangKiyeog = 0x0ed5
  1584. const m_XK_Hangul_J_SsangSios = 0x0ee7
  1585. const m_XK_Hangul_J_Tieut = 0x0eec
  1586. const m_XK_Hangul_J_YeorinHieuh = 0x0efa
  1587. const m_XK_Hangul_Jamo = 0xff35
  1588. const m_XK_Hangul_Jeonja = 0xff38
  1589. const m_XK_Hangul_Jieuj = 0x0eb8
  1590. const m_XK_Hangul_Khieuq = 0x0ebb
  1591. const m_XK_Hangul_Kiyeog = 0x0ea1
  1592. const m_XK_Hangul_KiyeogSios = 0x0ea3
  1593. const m_XK_Hangul_KkogjiDalrinIeung = 0x0ef3
  1594. const m_XK_Hangul_Mieum = 0x0eb1
  1595. const m_XK_Hangul_MultipleCandidate = 0xff3d
  1596. const m_XK_Hangul_Nieun = 0x0ea4
  1597. const m_XK_Hangul_NieunHieuh = 0x0ea6
  1598. const m_XK_Hangul_NieunJieuj = 0x0ea5
  1599. const m_XK_Hangul_O = 0x0ec7
  1600. const m_XK_Hangul_OE = 0x0eca
  1601. const m_XK_Hangul_PanSios = 0x0ef2
  1602. const m_XK_Hangul_Phieuf = 0x0ebd
  1603. const m_XK_Hangul_Pieub = 0x0eb2
  1604. const m_XK_Hangul_PieubSios = 0x0eb4
  1605. const m_XK_Hangul_PostHanja = 0xff3b
  1606. const m_XK_Hangul_PreHanja = 0xff3a
  1607. const m_XK_Hangul_PreviousCandidate = 0xff3e
  1608. const m_XK_Hangul_Rieul = 0x0ea9
  1609. const m_XK_Hangul_RieulHieuh = 0x0eb0
  1610. const m_XK_Hangul_RieulKiyeog = 0x0eaa
  1611. const m_XK_Hangul_RieulMieum = 0x0eab
  1612. const m_XK_Hangul_RieulPhieuf = 0x0eaf
  1613. const m_XK_Hangul_RieulPieub = 0x0eac
  1614. const m_XK_Hangul_RieulSios = 0x0ead
  1615. const m_XK_Hangul_RieulTieut = 0x0eae
  1616. const m_XK_Hangul_RieulYeorinHieuh = 0x0eef
  1617. const m_XK_Hangul_Romaja = 0xff36
  1618. const m_XK_Hangul_SingleCandidate = 0xff3c
  1619. const m_XK_Hangul_Sios = 0x0eb5
  1620. const m_XK_Hangul_Special = 0xff3f
  1621. const m_XK_Hangul_SsangDikeud = 0x0ea8
  1622. const m_XK_Hangul_SsangJieuj = 0x0eb9
  1623. const m_XK_Hangul_SsangKiyeog = 0x0ea2
  1624. const m_XK_Hangul_SsangPieub = 0x0eb3
  1625. const m_XK_Hangul_SsangSios = 0x0eb6
  1626. const m_XK_Hangul_Start = 0xff32
  1627. const m_XK_Hangul_SunkyeongeumMieum = 0x0ef0
  1628. const m_XK_Hangul_SunkyeongeumPhieuf = 0x0ef4
  1629. const m_XK_Hangul_SunkyeongeumPieub = 0x0ef1
  1630. const m_XK_Hangul_Tieut = 0x0ebc
  1631. const m_XK_Hangul_U = 0x0ecc
  1632. const m_XK_Hangul_WA = 0x0ec8
  1633. const m_XK_Hangul_WAE = 0x0ec9
  1634. const m_XK_Hangul_WE = 0x0ece
  1635. const m_XK_Hangul_WEO = 0x0ecd
  1636. const m_XK_Hangul_WI = 0x0ecf
  1637. const m_XK_Hangul_YA = 0x0ec1
  1638. const m_XK_Hangul_YAE = 0x0ec2
  1639. const m_XK_Hangul_YE = 0x0ec6
  1640. const m_XK_Hangul_YEO = 0x0ec5
  1641. const m_XK_Hangul_YI = 0x0ed2
  1642. const m_XK_Hangul_YO = 0x0ecb
  1643. const m_XK_Hangul_YU = 0x0ed0
  1644. const m_XK_Hangul_YeorinHieuh = 0x0ef5
  1645. const m_XK_Hangul_switch = 0xff7e
  1646. const m_XK_Hankaku = 0xff29
  1647. const m_XK_Hcircumflex = 0x02a6
  1648. const m_XK_Hebrew_switch = 0xff7e
  1649. const m_XK_Help = 0xff6a
  1650. const m_XK_Henkan = 0xff23
  1651. const m_XK_Henkan_Mode = 0xff23
  1652. const m_XK_Hiragana = 0xff25
  1653. const m_XK_Hiragana_Katakana = 0xff27
  1654. const m_XK_Home = 0xff50
  1655. const m_XK_Hstroke = 0x02a1
  1656. const m_XK_Hyper_L = 0xffed
  1657. const m_XK_Hyper_R = 0xffee
  1658. const m_XK_I = 0x0049
  1659. const m_XK_ISO_Center_Object = 0xfe33
  1660. const m_XK_ISO_Continuous_Underline = 0xfe30
  1661. const m_XK_ISO_Discontinuous_Underline = 0xfe31
  1662. const m_XK_ISO_Emphasize = 0xfe32
  1663. const m_XK_ISO_Enter = 0xfe34
  1664. const m_XK_ISO_Fast_Cursor_Down = 0xfe2f
  1665. const m_XK_ISO_Fast_Cursor_Left = 0xfe2c
  1666. const m_XK_ISO_Fast_Cursor_Right = 0xfe2d
  1667. const m_XK_ISO_Fast_Cursor_Up = 0xfe2e
  1668. const m_XK_ISO_First_Group = 0xfe0c
  1669. const m_XK_ISO_First_Group_Lock = 0xfe0d
  1670. const m_XK_ISO_Group_Latch = 0xfe06
  1671. const m_XK_ISO_Group_Lock = 0xfe07
  1672. const m_XK_ISO_Group_Shift = 0xff7e
  1673. const m_XK_ISO_Last_Group = 0xfe0e
  1674. const m_XK_ISO_Last_Group_Lock = 0xfe0f
  1675. const m_XK_ISO_Left_Tab = 0xfe20
  1676. const m_XK_ISO_Level2_Latch = 0xfe02
  1677. const m_XK_ISO_Level3_Latch = 0xfe04
  1678. const m_XK_ISO_Level3_Lock = 0xfe05
  1679. const m_XK_ISO_Level3_Shift = 0xfe03
  1680. const m_XK_ISO_Level5_Latch = 0xfe12
  1681. const m_XK_ISO_Level5_Lock = 0xfe13
  1682. const m_XK_ISO_Level5_Shift = 0xfe11
  1683. const m_XK_ISO_Lock = 0xfe01
  1684. const m_XK_ISO_Move_Line_Down = 0xfe22
  1685. const m_XK_ISO_Move_Line_Up = 0xfe21
  1686. const m_XK_ISO_Next_Group = 0xfe08
  1687. const m_XK_ISO_Next_Group_Lock = 0xfe09
  1688. const m_XK_ISO_Partial_Line_Down = 0xfe24
  1689. const m_XK_ISO_Partial_Line_Up = 0xfe23
  1690. const m_XK_ISO_Partial_Space_Left = 0xfe25
  1691. const m_XK_ISO_Partial_Space_Right = 0xfe26
  1692. const m_XK_ISO_Prev_Group = 0xfe0a
  1693. const m_XK_ISO_Prev_Group_Lock = 0xfe0b
  1694. const m_XK_ISO_Release_Both_Margins = 0xfe2b
  1695. const m_XK_ISO_Release_Margin_Left = 0xfe29
  1696. const m_XK_ISO_Release_Margin_Right = 0xfe2a
  1697. const m_XK_ISO_Set_Margin_Left = 0xfe27
  1698. const m_XK_ISO_Set_Margin_Right = 0xfe28
  1699. const m_XK_Iabovedot = 0x02a9
  1700. const m_XK_Iacute = 0x00cd
  1701. const m_XK_Ibelowdot = 0x1001eca
  1702. const m_XK_Ibreve = 0x100012c
  1703. const m_XK_Icircumflex = 0x00ce
  1704. const m_XK_Idiaeresis = 0x00cf
  1705. const m_XK_Igrave = 0x00cc
  1706. const m_XK_Ihook = 0x1001ec8
  1707. const m_XK_Imacron = 0x03cf
  1708. const m_XK_Insert = 0xff63
  1709. const m_XK_Iogonek = 0x03c7
  1710. const m_XK_Itilde = 0x03a5
  1711. const m_XK_J = 0x004a
  1712. const m_XK_Jcircumflex = 0x02ac
  1713. const m_XK_K = 0x004b
  1714. const m_XK_KP_0 = 0xffb0
  1715. const m_XK_KP_1 = 0xffb1
  1716. const m_XK_KP_2 = 0xffb2
  1717. const m_XK_KP_3 = 0xffb3
  1718. const m_XK_KP_4 = 0xffb4
  1719. const m_XK_KP_5 = 0xffb5
  1720. const m_XK_KP_6 = 0xffb6
  1721. const m_XK_KP_7 = 0xffb7
  1722. const m_XK_KP_8 = 0xffb8
  1723. const m_XK_KP_9 = 0xffb9
  1724. const m_XK_KP_Add = 0xffab
  1725. const m_XK_KP_Begin = 0xff9d
  1726. const m_XK_KP_Decimal = 0xffae
  1727. const m_XK_KP_Delete = 0xff9f
  1728. const m_XK_KP_Divide = 0xffaf
  1729. const m_XK_KP_Down = 0xff99
  1730. const m_XK_KP_End = 0xff9c
  1731. const m_XK_KP_Enter = 0xff8d
  1732. const m_XK_KP_Equal = 0xffbd
  1733. const m_XK_KP_F1 = 0xff91
  1734. const m_XK_KP_F2 = 0xff92
  1735. const m_XK_KP_F3 = 0xff93
  1736. const m_XK_KP_F4 = 0xff94
  1737. const m_XK_KP_Home = 0xff95
  1738. const m_XK_KP_Insert = 0xff9e
  1739. const m_XK_KP_Left = 0xff96
  1740. const m_XK_KP_Multiply = 0xffaa
  1741. const m_XK_KP_Next = 0xff9b
  1742. const m_XK_KP_Page_Down = 0xff9b
  1743. const m_XK_KP_Page_Up = 0xff9a
  1744. const m_XK_KP_Prior = 0xff9a
  1745. const m_XK_KP_Right = 0xff98
  1746. const m_XK_KP_Separator = 0xffac
  1747. const m_XK_KP_Space = 0xff80
  1748. const m_XK_KP_Subtract = 0xffad
  1749. const m_XK_KP_Tab = 0xff89
  1750. const m_XK_KP_Up = 0xff97
  1751. const m_XK_Kana_Lock = 0xff2d
  1752. const m_XK_Kana_Shift = 0xff2e
  1753. const m_XK_Kanji = 0xff21
  1754. const m_XK_Kanji_Bangou = 0xff37
  1755. const m_XK_Katakana = 0xff26
  1756. const m_XK_Kcedilla = 0x03d3
  1757. const m_XK_Korean_Won = 0x0eff
  1758. const m_XK_L = 0x004c
  1759. const m_XK_L1 = 0xffc8
  1760. const m_XK_L10 = 0xffd1
  1761. const m_XK_L2 = 0xffc9
  1762. const m_XK_L3 = 0xffca
  1763. const m_XK_L4 = 0xffcb
  1764. const m_XK_L5 = 0xffcc
  1765. const m_XK_L6 = 0xffcd
  1766. const m_XK_L7 = 0xffce
  1767. const m_XK_L8 = 0xffcf
  1768. const m_XK_L9 = 0xffd0
  1769. const m_XK_Lacute = 0x01c5
  1770. const m_XK_Last_Virtual_Screen = 0xfed4
  1771. const m_XK_Lbelowdot = 0x1001e36
  1772. const m_XK_Lcaron = 0x01a5
  1773. const m_XK_Lcedilla = 0x03a6
  1774. const m_XK_Left = 0xff51
  1775. const m_XK_Linefeed = 0xff0a
  1776. const m_XK_LiraSign = 0x10020a4
  1777. const m_XK_Lstroke = 0x01a3
  1778. const m_XK_M = 0x004d
  1779. const m_XK_Mabovedot = 0x1001e40
  1780. const m_XK_Macedonia_DSE = 0x06b5
  1781. const m_XK_Macedonia_GJE = 0x06b2
  1782. const m_XK_Macedonia_KJE = 0x06bc
  1783. const m_XK_Macedonia_dse = 0x06a5
  1784. const m_XK_Macedonia_gje = 0x06a2
  1785. const m_XK_Macedonia_kje = 0x06ac
  1786. const m_XK_Mae_Koho = 0xff3e
  1787. const m_XK_Massyo = 0xff2c
  1788. const m_XK_Menu = 0xff67
  1789. const m_XK_Meta_L = 0xffe7
  1790. const m_XK_Meta_R = 0xffe8
  1791. const m_XK_MillSign = 0x10020a5
  1792. const m_XK_Mode_switch = 0xff7e
  1793. const m_XK_MouseKeys_Accel_Enable = 0xfe77
  1794. const m_XK_MouseKeys_Enable = 0xfe76
  1795. const m_XK_Muhenkan = 0xff22
  1796. const m_XK_Multi_key = 0xff20
  1797. const m_XK_MultipleCandidate = 0xff3d
  1798. const m_XK_N = 0x004e
  1799. const m_XK_Nacute = 0x01d1
  1800. const m_XK_NairaSign = 0x10020a6
  1801. const m_XK_Ncaron = 0x01d2
  1802. const m_XK_Ncedilla = 0x03d1
  1803. const m_XK_NewSheqelSign = 0x10020aa
  1804. const m_XK_Next = 0xff56
  1805. const m_XK_Next_Virtual_Screen = 0xfed2
  1806. const m_XK_Ntilde = 0x00d1
  1807. const m_XK_Num_Lock = 0xff7f
  1808. const m_XK_O = 0x004f
  1809. const m_XK_OE = 0x13bc
  1810. const m_XK_Oacute = 0x00d3
  1811. const m_XK_Obarred = 0x100019f
  1812. const m_XK_Obelowdot = 0x1001ecc
  1813. const m_XK_Ocaron = 0x10001d1
  1814. const m_XK_Ocircumflex = 0x00d4
  1815. const m_XK_Ocircumflexacute = 0x1001ed0
  1816. const m_XK_Ocircumflexbelowdot = 0x1001ed8
  1817. const m_XK_Ocircumflexgrave = 0x1001ed2
  1818. const m_XK_Ocircumflexhook = 0x1001ed4
  1819. const m_XK_Ocircumflextilde = 0x1001ed6
  1820. const m_XK_Odiaeresis = 0x00d6
  1821. const m_XK_Odoubleacute = 0x01d5
  1822. const m_XK_Ograve = 0x00d2
  1823. const m_XK_Ohook = 0x1001ece
  1824. const m_XK_Ohorn = 0x10001a0
  1825. const m_XK_Ohornacute = 0x1001eda
  1826. const m_XK_Ohornbelowdot = 0x1001ee2
  1827. const m_XK_Ohorngrave = 0x1001edc
  1828. const m_XK_Ohornhook = 0x1001ede
  1829. const m_XK_Ohorntilde = 0x1001ee0
  1830. const m_XK_Omacron = 0x03d2
  1831. const m_XK_Ooblique = 0x00d8
  1832. const m_XK_Oslash = 0x00d8
  1833. const m_XK_Otilde = 0x00d5
  1834. const m_XK_Overlay1_Enable = 0xfe78
  1835. const m_XK_Overlay2_Enable = 0xfe79
  1836. const m_XK_P = 0x0050
  1837. const m_XK_Pabovedot = 0x1001e56
  1838. const m_XK_Page_Down = 0xff56
  1839. const m_XK_Page_Up = 0xff55
  1840. const m_XK_Pause = 0xff13
  1841. const m_XK_PesetaSign = 0x10020a7
  1842. const m_XK_Pointer_Accelerate = 0xfefa
  1843. const m_XK_Pointer_Button1 = 0xfee9
  1844. const m_XK_Pointer_Button2 = 0xfeea
  1845. const m_XK_Pointer_Button3 = 0xfeeb
  1846. const m_XK_Pointer_Button4 = 0xfeec
  1847. const m_XK_Pointer_Button5 = 0xfeed
  1848. const m_XK_Pointer_Button_Dflt = 0xfee8
  1849. const m_XK_Pointer_DblClick1 = 0xfeef
  1850. const m_XK_Pointer_DblClick2 = 0xfef0
  1851. const m_XK_Pointer_DblClick3 = 0xfef1
  1852. const m_XK_Pointer_DblClick4 = 0xfef2
  1853. const m_XK_Pointer_DblClick5 = 0xfef3
  1854. const m_XK_Pointer_DblClick_Dflt = 0xfeee
  1855. const m_XK_Pointer_DfltBtnNext = 0xfefb
  1856. const m_XK_Pointer_DfltBtnPrev = 0xfefc
  1857. const m_XK_Pointer_Down = 0xfee3
  1858. const m_XK_Pointer_DownLeft = 0xfee6
  1859. const m_XK_Pointer_DownRight = 0xfee7
  1860. const m_XK_Pointer_Drag1 = 0xfef5
  1861. const m_XK_Pointer_Drag2 = 0xfef6
  1862. const m_XK_Pointer_Drag3 = 0xfef7
  1863. const m_XK_Pointer_Drag4 = 0xfef8
  1864. const m_XK_Pointer_Drag5 = 0xfefd
  1865. const m_XK_Pointer_Drag_Dflt = 0xfef4
  1866. const m_XK_Pointer_EnableKeys = 0xfef9
  1867. const m_XK_Pointer_Left = 0xfee0
  1868. const m_XK_Pointer_Right = 0xfee1
  1869. const m_XK_Pointer_Up = 0xfee2
  1870. const m_XK_Pointer_UpLeft = 0xfee4
  1871. const m_XK_Pointer_UpRight = 0xfee5
  1872. const m_XK_Prev_Virtual_Screen = 0xfed1
  1873. const m_XK_PreviousCandidate = 0xff3e
  1874. const m_XK_Print = 0xff61
  1875. const m_XK_Prior = 0xff55
  1876. const m_XK_Q = 0x0051
  1877. const m_XK_R = 0x0052
  1878. const m_XK_R1 = 0xffd2
  1879. const m_XK_R10 = 0xffdb
  1880. const m_XK_R11 = 0xffdc
  1881. const m_XK_R12 = 0xffdd
  1882. const m_XK_R13 = 0xffde
  1883. const m_XK_R14 = 0xffdf
  1884. const m_XK_R15 = 0xffe0
  1885. const m_XK_R2 = 0xffd3
  1886. const m_XK_R3 = 0xffd4
  1887. const m_XK_R4 = 0xffd5
  1888. const m_XK_R5 = 0xffd6
  1889. const m_XK_R6 = 0xffd7
  1890. const m_XK_R7 = 0xffd8
  1891. const m_XK_R8 = 0xffd9
  1892. const m_XK_R9 = 0xffda
  1893. const m_XK_Racute = 0x01c0
  1894. const m_XK_Rcaron = 0x01d8
  1895. const m_XK_Rcedilla = 0x03a3
  1896. const m_XK_Redo = 0xff66
  1897. const m_XK_RepeatKeys_Enable = 0xfe72
  1898. const m_XK_Return = 0xff0d
  1899. const m_XK_Right = 0xff53
  1900. const m_XK_Romaji = 0xff24
  1901. const m_XK_RupeeSign = 0x10020a8
  1902. const m_XK_S = 0x0053
  1903. const m_XK_SCHWA = 0x100018f
  1904. const m_XK_Sabovedot = 0x1001e60
  1905. const m_XK_Sacute = 0x01a6
  1906. const m_XK_Scaron = 0x01a9
  1907. const m_XK_Scedilla = 0x01aa
  1908. const m_XK_Scircumflex = 0x02de
  1909. const m_XK_Scroll_Lock = 0xff14
  1910. const m_XK_Select = 0xff60
  1911. const m_XK_Serbian_DJE = 0x06b1
  1912. const m_XK_Serbian_DZE = 0x06bf
  1913. const m_XK_Serbian_JE = 0x06b8
  1914. const m_XK_Serbian_LJE = 0x06b9
  1915. const m_XK_Serbian_NJE = 0x06ba
  1916. const m_XK_Serbian_TSHE = 0x06bb
  1917. const m_XK_Serbian_dje = 0x06a1
  1918. const m_XK_Serbian_dze = 0x06af
  1919. const m_XK_Serbian_je = 0x06a8
  1920. const m_XK_Serbian_lje = 0x06a9
  1921. const m_XK_Serbian_nje = 0x06aa
  1922. const m_XK_Serbian_tshe = 0x06ab
  1923. const m_XK_Shift_L = 0xffe1
  1924. const m_XK_Shift_Lock = 0xffe6
  1925. const m_XK_Shift_R = 0xffe2
  1926. const m_XK_SingleCandidate = 0xff3c
  1927. const m_XK_Sinh_a = 0x1000d85
  1928. const m_XK_Sinh_aa = 0x1000d86
  1929. const m_XK_Sinh_aa2 = 0x1000dcf
  1930. const m_XK_Sinh_ae = 0x1000d87
  1931. const m_XK_Sinh_ae2 = 0x1000dd0
  1932. const m_XK_Sinh_aee = 0x1000d88
  1933. const m_XK_Sinh_aee2 = 0x1000dd1
  1934. const m_XK_Sinh_ai = 0x1000d93
  1935. const m_XK_Sinh_ai2 = 0x1000ddb
  1936. const m_XK_Sinh_al = 0x1000dca
  1937. const m_XK_Sinh_au = 0x1000d96
  1938. const m_XK_Sinh_au2 = 0x1000dde
  1939. const m_XK_Sinh_ba = 0x1000db6
  1940. const m_XK_Sinh_bha = 0x1000db7
  1941. const m_XK_Sinh_ca = 0x1000da0
  1942. const m_XK_Sinh_cha = 0x1000da1
  1943. const m_XK_Sinh_dda = 0x1000da9
  1944. const m_XK_Sinh_ddha = 0x1000daa
  1945. const m_XK_Sinh_dha = 0x1000daf
  1946. const m_XK_Sinh_dhha = 0x1000db0
  1947. const m_XK_Sinh_e = 0x1000d91
  1948. const m_XK_Sinh_e2 = 0x1000dd9
  1949. const m_XK_Sinh_ee = 0x1000d92
  1950. const m_XK_Sinh_ee2 = 0x1000dda
  1951. const m_XK_Sinh_fa = 0x1000dc6
  1952. const m_XK_Sinh_ga = 0x1000d9c
  1953. const m_XK_Sinh_gha = 0x1000d9d
  1954. const m_XK_Sinh_h2 = 0x1000d83
  1955. const m_XK_Sinh_ha = 0x1000dc4
  1956. const m_XK_Sinh_i = 0x1000d89
  1957. const m_XK_Sinh_i2 = 0x1000dd2
  1958. const m_XK_Sinh_ii = 0x1000d8a
  1959. const m_XK_Sinh_ii2 = 0x1000dd3
  1960. const m_XK_Sinh_ja = 0x1000da2
  1961. const m_XK_Sinh_jha = 0x1000da3
  1962. const m_XK_Sinh_jnya = 0x1000da5
  1963. const m_XK_Sinh_ka = 0x1000d9a
  1964. const m_XK_Sinh_kha = 0x1000d9b
  1965. const m_XK_Sinh_kunddaliya = 0x1000df4
  1966. const m_XK_Sinh_la = 0x1000dbd
  1967. const m_XK_Sinh_lla = 0x1000dc5
  1968. const m_XK_Sinh_lu = 0x1000d8f
  1969. const m_XK_Sinh_lu2 = 0x1000ddf
  1970. const m_XK_Sinh_luu = 0x1000d90
  1971. const m_XK_Sinh_luu2 = 0x1000df3
  1972. const m_XK_Sinh_ma = 0x1000db8
  1973. const m_XK_Sinh_mba = 0x1000db9
  1974. const m_XK_Sinh_na = 0x1000db1
  1975. const m_XK_Sinh_ndda = 0x1000dac
  1976. const m_XK_Sinh_ndha = 0x1000db3
  1977. const m_XK_Sinh_ng = 0x1000d82
  1978. const m_XK_Sinh_ng2 = 0x1000d9e
  1979. const m_XK_Sinh_nga = 0x1000d9f
  1980. const m_XK_Sinh_nja = 0x1000da6
  1981. const m_XK_Sinh_nna = 0x1000dab
  1982. const m_XK_Sinh_nya = 0x1000da4
  1983. const m_XK_Sinh_o = 0x1000d94
  1984. const m_XK_Sinh_o2 = 0x1000ddc
  1985. const m_XK_Sinh_oo = 0x1000d95
  1986. const m_XK_Sinh_oo2 = 0x1000ddd
  1987. const m_XK_Sinh_pa = 0x1000db4
  1988. const m_XK_Sinh_pha = 0x1000db5
  1989. const m_XK_Sinh_ra = 0x1000dbb
  1990. const m_XK_Sinh_ri = 0x1000d8d
  1991. const m_XK_Sinh_rii = 0x1000d8e
  1992. const m_XK_Sinh_ru2 = 0x1000dd8
  1993. const m_XK_Sinh_ruu2 = 0x1000df2
  1994. const m_XK_Sinh_sa = 0x1000dc3
  1995. const m_XK_Sinh_sha = 0x1000dc1
  1996. const m_XK_Sinh_ssha = 0x1000dc2
  1997. const m_XK_Sinh_tha = 0x1000dad
  1998. const m_XK_Sinh_thha = 0x1000dae
  1999. const m_XK_Sinh_tta = 0x1000da7
  2000. const m_XK_Sinh_ttha = 0x1000da8
  2001. const m_XK_Sinh_u = 0x1000d8b
  2002. const m_XK_Sinh_u2 = 0x1000dd4
  2003. const m_XK_Sinh_uu = 0x1000d8c
  2004. const m_XK_Sinh_uu2 = 0x1000dd6
  2005. const m_XK_Sinh_va = 0x1000dc0
  2006. const m_XK_Sinh_ya = 0x1000dba
  2007. const m_XK_SlowKeys_Enable = 0xfe73
  2008. const m_XK_StickyKeys_Enable = 0xfe75
  2009. const m_XK_Super_L = 0xffeb
  2010. const m_XK_Super_R = 0xffec
  2011. const m_XK_Sys_Req = 0xff15
  2012. const m_XK_T = 0x0054
  2013. const m_XK_THORN = 0x00de
  2014. const m_XK_Tab = 0xff09
  2015. const m_XK_Tabovedot = 0x1001e6a
  2016. const m_XK_Tcaron = 0x01ab
  2017. const m_XK_Tcedilla = 0x01de
  2018. const m_XK_Terminate_Server = 0xfed5
  2019. const m_XK_Thai_baht = 0x0ddf
  2020. const m_XK_Thai_bobaimai = 0x0dba
  2021. const m_XK_Thai_chochan = 0x0da8
  2022. const m_XK_Thai_chochang = 0x0daa
  2023. const m_XK_Thai_choching = 0x0da9
  2024. const m_XK_Thai_chochoe = 0x0dac
  2025. const m_XK_Thai_dochada = 0x0dae
  2026. const m_XK_Thai_dodek = 0x0db4
  2027. const m_XK_Thai_fofa = 0x0dbd
  2028. const m_XK_Thai_fofan = 0x0dbf
  2029. const m_XK_Thai_hohip = 0x0dcb
  2030. const m_XK_Thai_honokhuk = 0x0dce
  2031. const m_XK_Thai_khokhai = 0x0da2
  2032. const m_XK_Thai_khokhon = 0x0da5
  2033. const m_XK_Thai_khokhuat = 0x0da3
  2034. const m_XK_Thai_khokhwai = 0x0da4
  2035. const m_XK_Thai_khorakhang = 0x0da6
  2036. const m_XK_Thai_kokai = 0x0da1
  2037. const m_XK_Thai_lakkhangyao = 0x0de5
  2038. const m_XK_Thai_lekchet = 0x0df7
  2039. const m_XK_Thai_lekha = 0x0df5
  2040. const m_XK_Thai_lekhok = 0x0df6
  2041. const m_XK_Thai_lekkao = 0x0df9
  2042. const m_XK_Thai_leknung = 0x0df1
  2043. const m_XK_Thai_lekpaet = 0x0df8
  2044. const m_XK_Thai_leksam = 0x0df3
  2045. const m_XK_Thai_leksi = 0x0df4
  2046. const m_XK_Thai_leksong = 0x0df2
  2047. const m_XK_Thai_leksun = 0x0df0
  2048. const m_XK_Thai_lochula = 0x0dcc
  2049. const m_XK_Thai_loling = 0x0dc5
  2050. const m_XK_Thai_lu = 0x0dc6
  2051. const m_XK_Thai_maichattawa = 0x0deb
  2052. const m_XK_Thai_maiek = 0x0de8
  2053. const m_XK_Thai_maihanakat = 0x0dd1
  2054. const m_XK_Thai_maihanakat_maitho = 0x0dde
  2055. const m_XK_Thai_maitaikhu = 0x0de7
  2056. const m_XK_Thai_maitho = 0x0de9
  2057. const m_XK_Thai_maitri = 0x0dea
  2058. const m_XK_Thai_maiyamok = 0x0de6
  2059. const m_XK_Thai_moma = 0x0dc1
  2060. const m_XK_Thai_ngongu = 0x0da7
  2061. const m_XK_Thai_nikhahit = 0x0ded
  2062. const m_XK_Thai_nonen = 0x0db3
  2063. const m_XK_Thai_nonu = 0x0db9
  2064. const m_XK_Thai_oang = 0x0dcd
  2065. const m_XK_Thai_paiyannoi = 0x0dcf
  2066. const m_XK_Thai_phinthu = 0x0dda
  2067. const m_XK_Thai_phophan = 0x0dbe
  2068. const m_XK_Thai_phophung = 0x0dbc
  2069. const m_XK_Thai_phosamphao = 0x0dc0
  2070. const m_XK_Thai_popla = 0x0dbb
  2071. const m_XK_Thai_rorua = 0x0dc3
  2072. const m_XK_Thai_ru = 0x0dc4
  2073. const m_XK_Thai_saraa = 0x0dd0
  2074. const m_XK_Thai_saraaa = 0x0dd2
  2075. const m_XK_Thai_saraae = 0x0de1
  2076. const m_XK_Thai_saraaimaimalai = 0x0de4
  2077. const m_XK_Thai_saraaimaimuan = 0x0de3
  2078. const m_XK_Thai_saraam = 0x0dd3
  2079. const m_XK_Thai_sarae = 0x0de0
  2080. const m_XK_Thai_sarai = 0x0dd4
  2081. const m_XK_Thai_saraii = 0x0dd5
  2082. const m_XK_Thai_sarao = 0x0de2
  2083. const m_XK_Thai_sarau = 0x0dd8
  2084. const m_XK_Thai_saraue = 0x0dd6
  2085. const m_XK_Thai_sarauee = 0x0dd7
  2086. const m_XK_Thai_sarauu = 0x0dd9
  2087. const m_XK_Thai_sorusi = 0x0dc9
  2088. const m_XK_Thai_sosala = 0x0dc8
  2089. const m_XK_Thai_soso = 0x0dab
  2090. const m_XK_Thai_sosua = 0x0dca
  2091. const m_XK_Thai_thanthakhat = 0x0dec
  2092. const m_XK_Thai_thonangmontho = 0x0db1
  2093. const m_XK_Thai_thophuthao = 0x0db2
  2094. const m_XK_Thai_thothahan = 0x0db7
  2095. const m_XK_Thai_thothan = 0x0db0
  2096. const m_XK_Thai_thothong = 0x0db8
  2097. const m_XK_Thai_thothung = 0x0db6
  2098. const m_XK_Thai_topatak = 0x0daf
  2099. const m_XK_Thai_totao = 0x0db5
  2100. const m_XK_Thai_wowaen = 0x0dc7
  2101. const m_XK_Thai_yoyak = 0x0dc2
  2102. const m_XK_Thai_yoying = 0x0dad
  2103. const m_XK_Thorn = 0x00de
  2104. const m_XK_Touroku = 0xff2b
  2105. const m_XK_Tslash = 0x03ac
  2106. const m_XK_U = 0x0055
  2107. const m_XK_Uacute = 0x00da
  2108. const m_XK_Ubelowdot = 0x1001ee4
  2109. const m_XK_Ubreve = 0x02dd
  2110. const m_XK_Ucircumflex = 0x00db
  2111. const m_XK_Udiaeresis = 0x00dc
  2112. const m_XK_Udoubleacute = 0x01db
  2113. const m_XK_Ugrave = 0x00d9
  2114. const m_XK_Uhook = 0x1001ee6
  2115. const m_XK_Uhorn = 0x10001af
  2116. const m_XK_Uhornacute = 0x1001ee8
  2117. const m_XK_Uhornbelowdot = 0x1001ef0
  2118. const m_XK_Uhorngrave = 0x1001eea
  2119. const m_XK_Uhornhook = 0x1001eec
  2120. const m_XK_Uhorntilde = 0x1001eee
  2121. const m_XK_Ukrainian_GHE_WITH_UPTURN = 0x06bd
  2122. const m_XK_Ukrainian_I = 0x06b6
  2123. const m_XK_Ukrainian_IE = 0x06b4
  2124. const m_XK_Ukrainian_YI = 0x06b7
  2125. const m_XK_Ukrainian_ghe_with_upturn = 0x06ad
  2126. const m_XK_Ukrainian_i = 0x06a6
  2127. const m_XK_Ukrainian_ie = 0x06a4
  2128. const m_XK_Ukrainian_yi = 0x06a7
  2129. const m_XK_Ukranian_I = 0x06b6
  2130. const m_XK_Ukranian_JE = 0x06b4
  2131. const m_XK_Ukranian_YI = 0x06b7
  2132. const m_XK_Ukranian_i = 0x06a6
  2133. const m_XK_Ukranian_je = 0x06a4
  2134. const m_XK_Ukranian_yi = 0x06a7
  2135. const m_XK_Umacron = 0x03de
  2136. const m_XK_Undo = 0xff65
  2137. const m_XK_Uogonek = 0x03d9
  2138. const m_XK_Up = 0xff52
  2139. const m_XK_Uring = 0x01d9
  2140. const m_XK_Utilde = 0x03dd
  2141. const m_XK_V = 0x0056
  2142. const m_XK_VoidSymbol = 0xffffff
  2143. const m_XK_W = 0x0057
  2144. const m_XK_Wacute = 0x1001e82
  2145. const m_XK_Wcircumflex = 0x1000174
  2146. const m_XK_Wdiaeresis = 0x1001e84
  2147. const m_XK_Wgrave = 0x1001e80
  2148. const m_XK_WonSign = 0x10020a9
  2149. const m_XK_X = 0x0058
  2150. const m_XK_Xabovedot = 0x1001e8a
  2151. const m_XK_Y = 0x0059
  2152. const m_XK_Yacute = 0x00dd
  2153. const m_XK_Ybelowdot = 0x1001ef4
  2154. const m_XK_Ycircumflex = 0x1000176
  2155. const m_XK_Ydiaeresis = 0x13be
  2156. const m_XK_Ygrave = 0x1001ef2
  2157. const m_XK_Yhook = 0x1001ef6
  2158. const m_XK_Ytilde = 0x1001ef8
  2159. const m_XK_Z = 0x005a
  2160. const m_XK_Zabovedot = 0x01af
  2161. const m_XK_Zacute = 0x01ac
  2162. const m_XK_Zcaron = 0x01ae
  2163. const m_XK_Zen_Koho = 0xff3d
  2164. const m_XK_Zenkaku = 0xff28
  2165. const m_XK_Zenkaku_Hankaku = 0xff2a
  2166. const m_XK_Zstroke = 0x10001b5
  2167. const m_XK_a = 0x0061
  2168. const m_XK_aacute = 0x00e1
  2169. const m_XK_abelowdot = 0x1001ea1
  2170. const m_XK_abovedot = 0x01ff
  2171. const m_XK_abreve = 0x01e3
  2172. const m_XK_abreveacute = 0x1001eaf
  2173. const m_XK_abrevebelowdot = 0x1001eb7
  2174. const m_XK_abrevegrave = 0x1001eb1
  2175. const m_XK_abrevehook = 0x1001eb3
  2176. const m_XK_abrevetilde = 0x1001eb5
  2177. const m_XK_acircumflex = 0x00e2
  2178. const m_XK_acircumflexacute = 0x1001ea5
  2179. const m_XK_acircumflexbelowdot = 0x1001ead
  2180. const m_XK_acircumflexgrave = 0x1001ea7
  2181. const m_XK_acircumflexhook = 0x1001ea9
  2182. const m_XK_acircumflextilde = 0x1001eab
  2183. const m_XK_acute = 0x00b4
  2184. const m_XK_adiaeresis = 0x00e4
  2185. const m_XK_ae = 0x00e6
  2186. const m_XK_agrave = 0x00e0
  2187. const m_XK_ahook = 0x1001ea3
  2188. const m_XK_amacron = 0x03e0
  2189. const m_XK_ampersand = 0x0026
  2190. const m_XK_aogonek = 0x01b1
  2191. const m_XK_apostrophe = 0x0027
  2192. const m_XK_approxeq = 0x1002248
  2193. const m_XK_aring = 0x00e5
  2194. const m_XK_asciicircum = 0x005e
  2195. const m_XK_asciitilde = 0x007e
  2196. const m_XK_asterisk = 0x002a
  2197. const m_XK_at = 0x0040
  2198. const m_XK_atilde = 0x00e3
  2199. const m_XK_b = 0x0062
  2200. const m_XK_babovedot = 0x1001e03
  2201. const m_XK_backslash = 0x005c
  2202. const m_XK_bar = 0x007c
  2203. const m_XK_because = 0x1002235
  2204. const m_XK_braceleft = 0x007b
  2205. const m_XK_braceright = 0x007d
  2206. const m_XK_bracketleft = 0x005b
  2207. const m_XK_bracketright = 0x005d
  2208. const m_XK_braille_blank = 0x1002800
  2209. const m_XK_braille_dot_1 = 0xfff1
  2210. const m_XK_braille_dot_10 = 0xfffa
  2211. const m_XK_braille_dot_2 = 0xfff2
  2212. const m_XK_braille_dot_3 = 0xfff3
  2213. const m_XK_braille_dot_4 = 0xfff4
  2214. const m_XK_braille_dot_5 = 0xfff5
  2215. const m_XK_braille_dot_6 = 0xfff6
  2216. const m_XK_braille_dot_7 = 0xfff7
  2217. const m_XK_braille_dot_8 = 0xfff8
  2218. const m_XK_braille_dot_9 = 0xfff9
  2219. const m_XK_braille_dots_1 = 0x1002801
  2220. const m_XK_braille_dots_12 = 0x1002803
  2221. const m_XK_braille_dots_123 = 0x1002807
  2222. const m_XK_braille_dots_1234 = 0x100280f
  2223. const m_XK_braille_dots_12345 = 0x100281f
  2224. const m_XK_braille_dots_123456 = 0x100283f
  2225. const m_XK_braille_dots_1234567 = 0x100287f
  2226. const m_XK_braille_dots_12345678 = 0x10028ff
  2227. const m_XK_braille_dots_1234568 = 0x10028bf
  2228. const m_XK_braille_dots_123457 = 0x100285f
  2229. const m_XK_braille_dots_1234578 = 0x10028df
  2230. const m_XK_braille_dots_123458 = 0x100289f
  2231. const m_XK_braille_dots_12346 = 0x100282f
  2232. const m_XK_braille_dots_123467 = 0x100286f
  2233. const m_XK_braille_dots_1234678 = 0x10028ef
  2234. const m_XK_braille_dots_123468 = 0x10028af
  2235. const m_XK_braille_dots_12347 = 0x100284f
  2236. const m_XK_braille_dots_123478 = 0x10028cf
  2237. const m_XK_braille_dots_12348 = 0x100288f
  2238. const m_XK_braille_dots_1235 = 0x1002817
  2239. const m_XK_braille_dots_12356 = 0x1002837
  2240. const m_XK_braille_dots_123567 = 0x1002877
  2241. const m_XK_braille_dots_1235678 = 0x10028f7
  2242. const m_XK_braille_dots_123568 = 0x10028b7
  2243. const m_XK_braille_dots_12357 = 0x1002857
  2244. const m_XK_braille_dots_123578 = 0x10028d7
  2245. const m_XK_braille_dots_12358 = 0x1002897
  2246. const m_XK_braille_dots_1236 = 0x1002827
  2247. const m_XK_braille_dots_12367 = 0x1002867
  2248. const m_XK_braille_dots_123678 = 0x10028e7
  2249. const m_XK_braille_dots_12368 = 0x10028a7
  2250. const m_XK_braille_dots_1237 = 0x1002847
  2251. const m_XK_braille_dots_12378 = 0x10028c7
  2252. const m_XK_braille_dots_1238 = 0x1002887
  2253. const m_XK_braille_dots_124 = 0x100280b
  2254. const m_XK_braille_dots_1245 = 0x100281b
  2255. const m_XK_braille_dots_12456 = 0x100283b
  2256. const m_XK_braille_dots_124567 = 0x100287b
  2257. const m_XK_braille_dots_1245678 = 0x10028fb
  2258. const m_XK_braille_dots_124568 = 0x10028bb
  2259. const m_XK_braille_dots_12457 = 0x100285b
  2260. const m_XK_braille_dots_124578 = 0x10028db
  2261. const m_XK_braille_dots_12458 = 0x100289b
  2262. const m_XK_braille_dots_1246 = 0x100282b
  2263. const m_XK_braille_dots_12467 = 0x100286b
  2264. const m_XK_braille_dots_124678 = 0x10028eb
  2265. const m_XK_braille_dots_12468 = 0x10028ab
  2266. const m_XK_braille_dots_1247 = 0x100284b
  2267. const m_XK_braille_dots_12478 = 0x10028cb
  2268. const m_XK_braille_dots_1248 = 0x100288b
  2269. const m_XK_braille_dots_125 = 0x1002813
  2270. const m_XK_braille_dots_1256 = 0x1002833
  2271. const m_XK_braille_dots_12567 = 0x1002873
  2272. const m_XK_braille_dots_125678 = 0x10028f3
  2273. const m_XK_braille_dots_12568 = 0x10028b3
  2274. const m_XK_braille_dots_1257 = 0x1002853
  2275. const m_XK_braille_dots_12578 = 0x10028d3
  2276. const m_XK_braille_dots_1258 = 0x1002893
  2277. const m_XK_braille_dots_126 = 0x1002823
  2278. const m_XK_braille_dots_1267 = 0x1002863
  2279. const m_XK_braille_dots_12678 = 0x10028e3
  2280. const m_XK_braille_dots_1268 = 0x10028a3
  2281. const m_XK_braille_dots_127 = 0x1002843
  2282. const m_XK_braille_dots_1278 = 0x10028c3
  2283. const m_XK_braille_dots_128 = 0x1002883
  2284. const m_XK_braille_dots_13 = 0x1002805
  2285. const m_XK_braille_dots_134 = 0x100280d
  2286. const m_XK_braille_dots_1345 = 0x100281d
  2287. const m_XK_braille_dots_13456 = 0x100283d
  2288. const m_XK_braille_dots_134567 = 0x100287d
  2289. const m_XK_braille_dots_1345678 = 0x10028fd
  2290. const m_XK_braille_dots_134568 = 0x10028bd
  2291. const m_XK_braille_dots_13457 = 0x100285d
  2292. const m_XK_braille_dots_134578 = 0x10028dd
  2293. const m_XK_braille_dots_13458 = 0x100289d
  2294. const m_XK_braille_dots_1346 = 0x100282d
  2295. const m_XK_braille_dots_13467 = 0x100286d
  2296. const m_XK_braille_dots_134678 = 0x10028ed
  2297. const m_XK_braille_dots_13468 = 0x10028ad
  2298. const m_XK_braille_dots_1347 = 0x100284d
  2299. const m_XK_braille_dots_13478 = 0x10028cd
  2300. const m_XK_braille_dots_1348 = 0x100288d
  2301. const m_XK_braille_dots_135 = 0x1002815
  2302. const m_XK_braille_dots_1356 = 0x1002835
  2303. const m_XK_braille_dots_13567 = 0x1002875
  2304. const m_XK_braille_dots_135678 = 0x10028f5
  2305. const m_XK_braille_dots_13568 = 0x10028b5
  2306. const m_XK_braille_dots_1357 = 0x1002855
  2307. const m_XK_braille_dots_13578 = 0x10028d5
  2308. const m_XK_braille_dots_1358 = 0x1002895
  2309. const m_XK_braille_dots_136 = 0x1002825
  2310. const m_XK_braille_dots_1367 = 0x1002865
  2311. const m_XK_braille_dots_13678 = 0x10028e5
  2312. const m_XK_braille_dots_1368 = 0x10028a5
  2313. const m_XK_braille_dots_137 = 0x1002845
  2314. const m_XK_braille_dots_1378 = 0x10028c5
  2315. const m_XK_braille_dots_138 = 0x1002885
  2316. const m_XK_braille_dots_14 = 0x1002809
  2317. const m_XK_braille_dots_145 = 0x1002819
  2318. const m_XK_braille_dots_1456 = 0x1002839
  2319. const m_XK_braille_dots_14567 = 0x1002879
  2320. const m_XK_braille_dots_145678 = 0x10028f9
  2321. const m_XK_braille_dots_14568 = 0x10028b9
  2322. const m_XK_braille_dots_1457 = 0x1002859
  2323. const m_XK_braille_dots_14578 = 0x10028d9
  2324. const m_XK_braille_dots_1458 = 0x1002899
  2325. const m_XK_braille_dots_146 = 0x1002829
  2326. const m_XK_braille_dots_1467 = 0x1002869
  2327. const m_XK_braille_dots_14678 = 0x10028e9
  2328. const m_XK_braille_dots_1468 = 0x10028a9
  2329. const m_XK_braille_dots_147 = 0x1002849
  2330. const m_XK_braille_dots_1478 = 0x10028c9
  2331. const m_XK_braille_dots_148 = 0x1002889
  2332. const m_XK_braille_dots_15 = 0x1002811
  2333. const m_XK_braille_dots_156 = 0x1002831
  2334. const m_XK_braille_dots_1567 = 0x1002871
  2335. const m_XK_braille_dots_15678 = 0x10028f1
  2336. const m_XK_braille_dots_1568 = 0x10028b1
  2337. const m_XK_braille_dots_157 = 0x1002851
  2338. const m_XK_braille_dots_1578 = 0x10028d1
  2339. const m_XK_braille_dots_158 = 0x1002891
  2340. const m_XK_braille_dots_16 = 0x1002821
  2341. const m_XK_braille_dots_167 = 0x1002861
  2342. const m_XK_braille_dots_1678 = 0x10028e1
  2343. const m_XK_braille_dots_168 = 0x10028a1
  2344. const m_XK_braille_dots_17 = 0x1002841
  2345. const m_XK_braille_dots_178 = 0x10028c1
  2346. const m_XK_braille_dots_18 = 0x1002881
  2347. const m_XK_braille_dots_2 = 0x1002802
  2348. const m_XK_braille_dots_23 = 0x1002806
  2349. const m_XK_braille_dots_234 = 0x100280e
  2350. const m_XK_braille_dots_2345 = 0x100281e
  2351. const m_XK_braille_dots_23456 = 0x100283e
  2352. const m_XK_braille_dots_234567 = 0x100287e
  2353. const m_XK_braille_dots_2345678 = 0x10028fe
  2354. const m_XK_braille_dots_234568 = 0x10028be
  2355. const m_XK_braille_dots_23457 = 0x100285e
  2356. const m_XK_braille_dots_234578 = 0x10028de
  2357. const m_XK_braille_dots_23458 = 0x100289e
  2358. const m_XK_braille_dots_2346 = 0x100282e
  2359. const m_XK_braille_dots_23467 = 0x100286e
  2360. const m_XK_braille_dots_234678 = 0x10028ee
  2361. const m_XK_braille_dots_23468 = 0x10028ae
  2362. const m_XK_braille_dots_2347 = 0x100284e
  2363. const m_XK_braille_dots_23478 = 0x10028ce
  2364. const m_XK_braille_dots_2348 = 0x100288e
  2365. const m_XK_braille_dots_235 = 0x1002816
  2366. const m_XK_braille_dots_2356 = 0x1002836
  2367. const m_XK_braille_dots_23567 = 0x1002876
  2368. const m_XK_braille_dots_235678 = 0x10028f6
  2369. const m_XK_braille_dots_23568 = 0x10028b6
  2370. const m_XK_braille_dots_2357 = 0x1002856
  2371. const m_XK_braille_dots_23578 = 0x10028d6
  2372. const m_XK_braille_dots_2358 = 0x1002896
  2373. const m_XK_braille_dots_236 = 0x1002826
  2374. const m_XK_braille_dots_2367 = 0x1002866
  2375. const m_XK_braille_dots_23678 = 0x10028e6
  2376. const m_XK_braille_dots_2368 = 0x10028a6
  2377. const m_XK_braille_dots_237 = 0x1002846
  2378. const m_XK_braille_dots_2378 = 0x10028c6
  2379. const m_XK_braille_dots_238 = 0x1002886
  2380. const m_XK_braille_dots_24 = 0x100280a
  2381. const m_XK_braille_dots_245 = 0x100281a
  2382. const m_XK_braille_dots_2456 = 0x100283a
  2383. const m_XK_braille_dots_24567 = 0x100287a
  2384. const m_XK_braille_dots_245678 = 0x10028fa
  2385. const m_XK_braille_dots_24568 = 0x10028ba
  2386. const m_XK_braille_dots_2457 = 0x100285a
  2387. const m_XK_braille_dots_24578 = 0x10028da
  2388. const m_XK_braille_dots_2458 = 0x100289a
  2389. const m_XK_braille_dots_246 = 0x100282a
  2390. const m_XK_braille_dots_2467 = 0x100286a
  2391. const m_XK_braille_dots_24678 = 0x10028ea
  2392. const m_XK_braille_dots_2468 = 0x10028aa
  2393. const m_XK_braille_dots_247 = 0x100284a
  2394. const m_XK_braille_dots_2478 = 0x10028ca
  2395. const m_XK_braille_dots_248 = 0x100288a
  2396. const m_XK_braille_dots_25 = 0x1002812
  2397. const m_XK_braille_dots_256 = 0x1002832
  2398. const m_XK_braille_dots_2567 = 0x1002872
  2399. const m_XK_braille_dots_25678 = 0x10028f2
  2400. const m_XK_braille_dots_2568 = 0x10028b2
  2401. const m_XK_braille_dots_257 = 0x1002852
  2402. const m_XK_braille_dots_2578 = 0x10028d2
  2403. const m_XK_braille_dots_258 = 0x1002892
  2404. const m_XK_braille_dots_26 = 0x1002822
  2405. const m_XK_braille_dots_267 = 0x1002862
  2406. const m_XK_braille_dots_2678 = 0x10028e2
  2407. const m_XK_braille_dots_268 = 0x10028a2
  2408. const m_XK_braille_dots_27 = 0x1002842
  2409. const m_XK_braille_dots_278 = 0x10028c2
  2410. const m_XK_braille_dots_28 = 0x1002882
  2411. const m_XK_braille_dots_3 = 0x1002804
  2412. const m_XK_braille_dots_34 = 0x100280c
  2413. const m_XK_braille_dots_345 = 0x100281c
  2414. const m_XK_braille_dots_3456 = 0x100283c
  2415. const m_XK_braille_dots_34567 = 0x100287c
  2416. const m_XK_braille_dots_345678 = 0x10028fc
  2417. const m_XK_braille_dots_34568 = 0x10028bc
  2418. const m_XK_braille_dots_3457 = 0x100285c
  2419. const m_XK_braille_dots_34578 = 0x10028dc
  2420. const m_XK_braille_dots_3458 = 0x100289c
  2421. const m_XK_braille_dots_346 = 0x100282c
  2422. const m_XK_braille_dots_3467 = 0x100286c
  2423. const m_XK_braille_dots_34678 = 0x10028ec
  2424. const m_XK_braille_dots_3468 = 0x10028ac
  2425. const m_XK_braille_dots_347 = 0x100284c
  2426. const m_XK_braille_dots_3478 = 0x10028cc
  2427. const m_XK_braille_dots_348 = 0x100288c
  2428. const m_XK_braille_dots_35 = 0x1002814
  2429. const m_XK_braille_dots_356 = 0x1002834
  2430. const m_XK_braille_dots_3567 = 0x1002874
  2431. const m_XK_braille_dots_35678 = 0x10028f4
  2432. const m_XK_braille_dots_3568 = 0x10028b4
  2433. const m_XK_braille_dots_357 = 0x1002854
  2434. const m_XK_braille_dots_3578 = 0x10028d4
  2435. const m_XK_braille_dots_358 = 0x1002894
  2436. const m_XK_braille_dots_36 = 0x1002824
  2437. const m_XK_braille_dots_367 = 0x1002864
  2438. const m_XK_braille_dots_3678 = 0x10028e4
  2439. const m_XK_braille_dots_368 = 0x10028a4
  2440. const m_XK_braille_dots_37 = 0x1002844
  2441. const m_XK_braille_dots_378 = 0x10028c4
  2442. const m_XK_braille_dots_38 = 0x1002884
  2443. const m_XK_braille_dots_4 = 0x1002808
  2444. const m_XK_braille_dots_45 = 0x1002818
  2445. const m_XK_braille_dots_456 = 0x1002838
  2446. const m_XK_braille_dots_4567 = 0x1002878
  2447. const m_XK_braille_dots_45678 = 0x10028f8
  2448. const m_XK_braille_dots_4568 = 0x10028b8
  2449. const m_XK_braille_dots_457 = 0x1002858
  2450. const m_XK_braille_dots_4578 = 0x10028d8
  2451. const m_XK_braille_dots_458 = 0x1002898
  2452. const m_XK_braille_dots_46 = 0x1002828
  2453. const m_XK_braille_dots_467 = 0x1002868
  2454. const m_XK_braille_dots_4678 = 0x10028e8
  2455. const m_XK_braille_dots_468 = 0x10028a8
  2456. const m_XK_braille_dots_47 = 0x1002848
  2457. const m_XK_braille_dots_478 = 0x10028c8
  2458. const m_XK_braille_dots_48 = 0x1002888
  2459. const m_XK_braille_dots_5 = 0x1002810
  2460. const m_XK_braille_dots_56 = 0x1002830
  2461. const m_XK_braille_dots_567 = 0x1002870
  2462. const m_XK_braille_dots_5678 = 0x10028f0
  2463. const m_XK_braille_dots_568 = 0x10028b0
  2464. const m_XK_braille_dots_57 = 0x1002850
  2465. const m_XK_braille_dots_578 = 0x10028d0
  2466. const m_XK_braille_dots_58 = 0x1002890
  2467. const m_XK_braille_dots_6 = 0x1002820
  2468. const m_XK_braille_dots_67 = 0x1002860
  2469. const m_XK_braille_dots_678 = 0x10028e0
  2470. const m_XK_braille_dots_68 = 0x10028a0
  2471. const m_XK_braille_dots_7 = 0x1002840
  2472. const m_XK_braille_dots_78 = 0x10028c0
  2473. const m_XK_braille_dots_8 = 0x1002880
  2474. const m_XK_breve = 0x01a2
  2475. const m_XK_brokenbar = 0x00a6
  2476. const m_XK_c = 0x0063
  2477. const m_XK_c_h = 0xfea3
  2478. const m_XK_cabovedot = 0x02e5
  2479. const m_XK_cacute = 0x01e6
  2480. const m_XK_caron = 0x01b7
  2481. const m_XK_ccaron = 0x01e8
  2482. const m_XK_ccedilla = 0x00e7
  2483. const m_XK_ccircumflex = 0x02e6
  2484. const m_XK_cedilla = 0x00b8
  2485. const m_XK_cent = 0x00a2
  2486. const m_XK_ch = 0xfea0
  2487. const m_XK_colon = 0x003a
  2488. const m_XK_combining_acute = 0x1000301
  2489. const m_XK_combining_belowdot = 0x1000323
  2490. const m_XK_combining_grave = 0x1000300
  2491. const m_XK_combining_hook = 0x1000309
  2492. const m_XK_combining_tilde = 0x1000303
  2493. const m_XK_comma = 0x002c
  2494. const m_XK_containsas = 0x100220B
  2495. const m_XK_copyright = 0x00a9
  2496. const m_XK_cuberoot = 0x100221B
  2497. const m_XK_currency = 0x00a4
  2498. const m_XK_d = 0x0064
  2499. const m_XK_dabovedot = 0x1001e0b
  2500. const m_XK_dcaron = 0x01ef
  2501. const m_XK_dead_A = 0xfe81
  2502. const m_XK_dead_E = 0xfe83
  2503. const m_XK_dead_I = 0xfe85
  2504. const m_XK_dead_O = 0xfe87
  2505. const m_XK_dead_U = 0xfe89
  2506. const m_XK_dead_a = 0xfe80
  2507. const m_XK_dead_abovecomma = 0xfe64
  2508. const m_XK_dead_abovedot = 0xfe56
  2509. const m_XK_dead_abovereversedcomma = 0xfe65
  2510. const m_XK_dead_abovering = 0xfe58
  2511. const m_XK_dead_aboveverticalline = 0xfe91
  2512. const m_XK_dead_acute = 0xfe51
  2513. const m_XK_dead_belowbreve = 0xfe6b
  2514. const m_XK_dead_belowcircumflex = 0xfe69
  2515. const m_XK_dead_belowcomma = 0xfe6e
  2516. const m_XK_dead_belowdiaeresis = 0xfe6c
  2517. const m_XK_dead_belowdot = 0xfe60
  2518. const m_XK_dead_belowmacron = 0xfe68
  2519. const m_XK_dead_belowring = 0xfe67
  2520. const m_XK_dead_belowtilde = 0xfe6a
  2521. const m_XK_dead_belowverticalline = 0xfe92
  2522. const m_XK_dead_breve = 0xfe55
  2523. const m_XK_dead_capital_schwa = 0xfe8b
  2524. const m_XK_dead_caron = 0xfe5a
  2525. const m_XK_dead_cedilla = 0xfe5b
  2526. const m_XK_dead_circumflex = 0xfe52
  2527. const m_XK_dead_currency = 0xfe6f
  2528. const m_XK_dead_dasia = 0xfe65
  2529. const m_XK_dead_diaeresis = 0xfe57
  2530. const m_XK_dead_doubleacute = 0xfe59
  2531. const m_XK_dead_doublegrave = 0xfe66
  2532. const m_XK_dead_e = 0xfe82
  2533. const m_XK_dead_grave = 0xfe50
  2534. const m_XK_dead_greek = 0xfe8c
  2535. const m_XK_dead_hook = 0xfe61
  2536. const m_XK_dead_horn = 0xfe62
  2537. const m_XK_dead_i = 0xfe84
  2538. const m_XK_dead_invertedbreve = 0xfe6d
  2539. const m_XK_dead_iota = 0xfe5d
  2540. const m_XK_dead_longsolidusoverlay = 0xfe93
  2541. const m_XK_dead_lowline = 0xfe90
  2542. const m_XK_dead_macron = 0xfe54
  2543. const m_XK_dead_o = 0xfe86
  2544. const m_XK_dead_ogonek = 0xfe5c
  2545. const m_XK_dead_perispomeni = 0xfe53
  2546. const m_XK_dead_psili = 0xfe64
  2547. const m_XK_dead_semivoiced_sound = 0xfe5f
  2548. const m_XK_dead_small_schwa = 0xfe8a
  2549. const m_XK_dead_stroke = 0xfe63
  2550. const m_XK_dead_tilde = 0xfe53
  2551. const m_XK_dead_u = 0xfe88
  2552. const m_XK_dead_voiced_sound = 0xfe5e
  2553. const m_XK_degree = 0x00b0
  2554. const m_XK_diaeresis = 0x00a8
  2555. const m_XK_dintegral = 0x100222C
  2556. const m_XK_division = 0x00f7
  2557. const m_XK_dollar = 0x0024
  2558. const m_XK_doubleacute = 0x01bd
  2559. const m_XK_dstroke = 0x01f0
  2560. const m_XK_e = 0x0065
  2561. const m_XK_eabovedot = 0x03ec
  2562. const m_XK_eacute = 0x00e9
  2563. const m_XK_ebelowdot = 0x1001eb9
  2564. const m_XK_ecaron = 0x01ec
  2565. const m_XK_ecircumflex = 0x00ea
  2566. const m_XK_ecircumflexacute = 0x1001ebf
  2567. const m_XK_ecircumflexbelowdot = 0x1001ec7
  2568. const m_XK_ecircumflexgrave = 0x1001ec1
  2569. const m_XK_ecircumflexhook = 0x1001ec3
  2570. const m_XK_ecircumflextilde = 0x1001ec5
  2571. const m_XK_ediaeresis = 0x00eb
  2572. const m_XK_egrave = 0x00e8
  2573. const m_XK_ehook = 0x1001ebb
  2574. const m_XK_eightsubscript = 0x1002088
  2575. const m_XK_eightsuperior = 0x1002078
  2576. const m_XK_elementof = 0x1002208
  2577. const m_XK_emacron = 0x03ba
  2578. const m_XK_emptyset = 0x1002205
  2579. const m_XK_eng = 0x03bf
  2580. const m_XK_eogonek = 0x01ea
  2581. const m_XK_equal = 0x003d
  2582. const m_XK_eth = 0x00f0
  2583. const m_XK_etilde = 0x1001ebd
  2584. const m_XK_exclam = 0x0021
  2585. const m_XK_exclamdown = 0x00a1
  2586. const m_XK_ezh = 0x1000292
  2587. const m_XK_f = 0x0066
  2588. const m_XK_fabovedot = 0x1001e1f
  2589. const m_XK_fivesubscript = 0x1002085
  2590. const m_XK_fivesuperior = 0x1002075
  2591. const m_XK_foursubscript = 0x1002084
  2592. const m_XK_foursuperior = 0x1002074
  2593. const m_XK_fourthroot = 0x100221C
  2594. const m_XK_g = 0x0067
  2595. const m_XK_gabovedot = 0x02f5
  2596. const m_XK_gbreve = 0x02bb
  2597. const m_XK_gcaron = 0x10001e7
  2598. const m_XK_gcedilla = 0x03bb
  2599. const m_XK_gcircumflex = 0x02f8
  2600. const m_XK_grave = 0x0060
  2601. const m_XK_greater = 0x003e
  2602. const m_XK_guillemotleft = 0x00ab
  2603. const m_XK_guillemotright = 0x00bb
  2604. const m_XK_h = 0x0068
  2605. const m_XK_hcircumflex = 0x02b6
  2606. const m_XK_hebrew_aleph = 0x0ce0
  2607. const m_XK_hebrew_ayin = 0x0cf2
  2608. const m_XK_hebrew_bet = 0x0ce1
  2609. const m_XK_hebrew_beth = 0x0ce1
  2610. const m_XK_hebrew_chet = 0x0ce7
  2611. const m_XK_hebrew_dalet = 0x0ce3
  2612. const m_XK_hebrew_daleth = 0x0ce3
  2613. const m_XK_hebrew_doublelowline = 0x0cdf
  2614. const m_XK_hebrew_finalkaph = 0x0cea
  2615. const m_XK_hebrew_finalmem = 0x0ced
  2616. const m_XK_hebrew_finalnun = 0x0cef
  2617. const m_XK_hebrew_finalpe = 0x0cf3
  2618. const m_XK_hebrew_finalzade = 0x0cf5
  2619. const m_XK_hebrew_finalzadi = 0x0cf5
  2620. const m_XK_hebrew_gimel = 0x0ce2
  2621. const m_XK_hebrew_gimmel = 0x0ce2
  2622. const m_XK_hebrew_he = 0x0ce4
  2623. const m_XK_hebrew_het = 0x0ce7
  2624. const m_XK_hebrew_kaph = 0x0ceb
  2625. const m_XK_hebrew_kuf = 0x0cf7
  2626. const m_XK_hebrew_lamed = 0x0cec
  2627. const m_XK_hebrew_mem = 0x0cee
  2628. const m_XK_hebrew_nun = 0x0cf0
  2629. const m_XK_hebrew_pe = 0x0cf4
  2630. const m_XK_hebrew_qoph = 0x0cf7
  2631. const m_XK_hebrew_resh = 0x0cf8
  2632. const m_XK_hebrew_samech = 0x0cf1
  2633. const m_XK_hebrew_samekh = 0x0cf1
  2634. const m_XK_hebrew_shin = 0x0cf9
  2635. const m_XK_hebrew_taf = 0x0cfa
  2636. const m_XK_hebrew_taw = 0x0cfa
  2637. const m_XK_hebrew_tet = 0x0ce8
  2638. const m_XK_hebrew_teth = 0x0ce8
  2639. const m_XK_hebrew_waw = 0x0ce5
  2640. const m_XK_hebrew_yod = 0x0ce9
  2641. const m_XK_hebrew_zade = 0x0cf6
  2642. const m_XK_hebrew_zadi = 0x0cf6
  2643. const m_XK_hebrew_zain = 0x0ce6
  2644. const m_XK_hebrew_zayin = 0x0ce6
  2645. const m_XK_hstroke = 0x02b1
  2646. const m_XK_hyphen = 0x00ad
  2647. const m_XK_i = 0x0069
  2648. const m_XK_iacute = 0x00ed
  2649. const m_XK_ibelowdot = 0x1001ecb
  2650. const m_XK_ibreve = 0x100012d
  2651. const m_XK_icircumflex = 0x00ee
  2652. const m_XK_idiaeresis = 0x00ef
  2653. const m_XK_idotless = 0x02b9
  2654. const m_XK_igrave = 0x00ec
  2655. const m_XK_ihook = 0x1001ec9
  2656. const m_XK_imacron = 0x03ef
  2657. const m_XK_iogonek = 0x03e7
  2658. const m_XK_itilde = 0x03b5
  2659. const m_XK_j = 0x006a
  2660. const m_XK_jcircumflex = 0x02bc
  2661. const m_XK_k = 0x006b
  2662. const m_XK_kana_A = 0x04b1
  2663. const m_XK_kana_CHI = 0x04c1
  2664. const m_XK_kana_E = 0x04b4
  2665. const m_XK_kana_FU = 0x04cc
  2666. const m_XK_kana_HA = 0x04ca
  2667. const m_XK_kana_HE = 0x04cd
  2668. const m_XK_kana_HI = 0x04cb
  2669. const m_XK_kana_HO = 0x04ce
  2670. const m_XK_kana_HU = 0x04cc
  2671. const m_XK_kana_I = 0x04b2
  2672. const m_XK_kana_KA = 0x04b6
  2673. const m_XK_kana_KE = 0x04b9
  2674. const m_XK_kana_KI = 0x04b7
  2675. const m_XK_kana_KO = 0x04ba
  2676. const m_XK_kana_KU = 0x04b8
  2677. const m_XK_kana_MA = 0x04cf
  2678. const m_XK_kana_ME = 0x04d2
  2679. const m_XK_kana_MI = 0x04d0
  2680. const m_XK_kana_MO = 0x04d3
  2681. const m_XK_kana_MU = 0x04d1
  2682. const m_XK_kana_N = 0x04dd
  2683. const m_XK_kana_NA = 0x04c5
  2684. const m_XK_kana_NE = 0x04c8
  2685. const m_XK_kana_NI = 0x04c6
  2686. const m_XK_kana_NO = 0x04c9
  2687. const m_XK_kana_NU = 0x04c7
  2688. const m_XK_kana_O = 0x04b5
  2689. const m_XK_kana_RA = 0x04d7
  2690. const m_XK_kana_RE = 0x04da
  2691. const m_XK_kana_RI = 0x04d8
  2692. const m_XK_kana_RO = 0x04db
  2693. const m_XK_kana_RU = 0x04d9
  2694. const m_XK_kana_SA = 0x04bb
  2695. const m_XK_kana_SE = 0x04be
  2696. const m_XK_kana_SHI = 0x04bc
  2697. const m_XK_kana_SO = 0x04bf
  2698. const m_XK_kana_SU = 0x04bd
  2699. const m_XK_kana_TA = 0x04c0
  2700. const m_XK_kana_TE = 0x04c3
  2701. const m_XK_kana_TI = 0x04c1
  2702. const m_XK_kana_TO = 0x04c4
  2703. const m_XK_kana_TSU = 0x04c2
  2704. const m_XK_kana_TU = 0x04c2
  2705. const m_XK_kana_U = 0x04b3
  2706. const m_XK_kana_WA = 0x04dc
  2707. const m_XK_kana_WO = 0x04a6
  2708. const m_XK_kana_YA = 0x04d4
  2709. const m_XK_kana_YO = 0x04d6
  2710. const m_XK_kana_YU = 0x04d5
  2711. const m_XK_kana_a = 0x04a7
  2712. const m_XK_kana_closingbracket = 0x04a3
  2713. const m_XK_kana_comma = 0x04a4
  2714. const m_XK_kana_conjunctive = 0x04a5
  2715. const m_XK_kana_e = 0x04aa
  2716. const m_XK_kana_fullstop = 0x04a1
  2717. const m_XK_kana_i = 0x04a8
  2718. const m_XK_kana_middledot = 0x04a5
  2719. const m_XK_kana_o = 0x04ab
  2720. const m_XK_kana_openingbracket = 0x04a2
  2721. const m_XK_kana_switch = 0xff7e
  2722. const m_XK_kana_tsu = 0x04af
  2723. const m_XK_kana_tu = 0x04af
  2724. const m_XK_kana_u = 0x04a9
  2725. const m_XK_kana_ya = 0x04ac
  2726. const m_XK_kana_yo = 0x04ae
  2727. const m_XK_kana_yu = 0x04ad
  2728. const m_XK_kappa = 0x03a2
  2729. const m_XK_kcedilla = 0x03f3
  2730. const m_XK_kra = 0x03a2
  2731. const m_XK_l = 0x006c
  2732. const m_XK_lacute = 0x01e5
  2733. const m_XK_lbelowdot = 0x1001e37
  2734. const m_XK_lcaron = 0x01b5
  2735. const m_XK_lcedilla = 0x03b6
  2736. const m_XK_less = 0x003c
  2737. const m_XK_lstroke = 0x01b3
  2738. const m_XK_m = 0x006d
  2739. const m_XK_mabovedot = 0x1001e41
  2740. const m_XK_macron = 0x00af
  2741. const m_XK_masculine = 0x00ba
  2742. const m_XK_minus = 0x002d
  2743. const m_XK_mu = 0x00b5
  2744. const m_XK_multiply = 0x00d7
  2745. const m_XK_n = 0x006e
  2746. const m_XK_nacute = 0x01f1
  2747. const m_XK_ncaron = 0x01f2
  2748. const m_XK_ncedilla = 0x03f1
  2749. const m_XK_ninesubscript = 0x1002089
  2750. const m_XK_ninesuperior = 0x1002079
  2751. const m_XK_nobreakspace = 0x00a0
  2752. const m_XK_notapproxeq = 0x1002247
  2753. const m_XK_notelementof = 0x1002209
  2754. const m_XK_notidentical = 0x1002262
  2755. const m_XK_notsign = 0x00ac
  2756. const m_XK_ntilde = 0x00f1
  2757. const m_XK_numbersign = 0x0023
  2758. const m_XK_numerosign = 0x06b0
  2759. const m_XK_o = 0x006f
  2760. const m_XK_oacute = 0x00f3
  2761. const m_XK_obarred = 0x1000275
  2762. const m_XK_obelowdot = 0x1001ecd
  2763. const m_XK_ocaron = 0x10001d2
  2764. const m_XK_ocircumflex = 0x00f4
  2765. const m_XK_ocircumflexacute = 0x1001ed1
  2766. const m_XK_ocircumflexbelowdot = 0x1001ed9
  2767. const m_XK_ocircumflexgrave = 0x1001ed3
  2768. const m_XK_ocircumflexhook = 0x1001ed5
  2769. const m_XK_ocircumflextilde = 0x1001ed7
  2770. const m_XK_odiaeresis = 0x00f6
  2771. const m_XK_odoubleacute = 0x01f5
  2772. const m_XK_oe = 0x13bd
  2773. const m_XK_ogonek = 0x01b2
  2774. const m_XK_ograve = 0x00f2
  2775. const m_XK_ohook = 0x1001ecf
  2776. const m_XK_ohorn = 0x10001a1
  2777. const m_XK_ohornacute = 0x1001edb
  2778. const m_XK_ohornbelowdot = 0x1001ee3
  2779. const m_XK_ohorngrave = 0x1001edd
  2780. const m_XK_ohornhook = 0x1001edf
  2781. const m_XK_ohorntilde = 0x1001ee1
  2782. const m_XK_omacron = 0x03f2
  2783. const m_XK_onehalf = 0x00bd
  2784. const m_XK_onequarter = 0x00bc
  2785. const m_XK_onesubscript = 0x1002081
  2786. const m_XK_onesuperior = 0x00b9
  2787. const m_XK_ooblique = 0x00f8
  2788. const m_XK_ordfeminine = 0x00aa
  2789. const m_XK_oslash = 0x00f8
  2790. const m_XK_otilde = 0x00f5
  2791. const m_XK_overline = 0x047e
  2792. const m_XK_p = 0x0070
  2793. const m_XK_pabovedot = 0x1001e57
  2794. const m_XK_paragraph = 0x00b6
  2795. const m_XK_parenleft = 0x0028
  2796. const m_XK_parenright = 0x0029
  2797. const m_XK_partdifferential = 0x1002202
  2798. const m_XK_percent = 0x0025
  2799. const m_XK_period = 0x002e
  2800. const m_XK_periodcentered = 0x00b7
  2801. const m_XK_plus = 0x002b
  2802. const m_XK_plusminus = 0x00b1
  2803. const m_XK_prolongedsound = 0x04b0
  2804. const m_XK_q = 0x0071
  2805. const m_XK_question = 0x003f
  2806. const m_XK_questiondown = 0x00bf
  2807. const m_XK_quotedbl = 0x0022
  2808. const m_XK_quoteleft = 0x0060
  2809. const m_XK_quoteright = 0x0027
  2810. const m_XK_r = 0x0072
  2811. const m_XK_racute = 0x01e0
  2812. const m_XK_rcaron = 0x01f8
  2813. const m_XK_rcedilla = 0x03b3
  2814. const m_XK_registered = 0x00ae
  2815. const m_XK_s = 0x0073
  2816. const m_XK_sabovedot = 0x1001e61
  2817. const m_XK_sacute = 0x01b6
  2818. const m_XK_scaron = 0x01b9
  2819. const m_XK_scedilla = 0x01ba
  2820. const m_XK_schwa = 0x1000259
  2821. const m_XK_scircumflex = 0x02fe
  2822. const m_XK_script_switch = 0xff7e
  2823. const m_XK_section = 0x00a7
  2824. const m_XK_semicolon = 0x003b
  2825. const m_XK_semivoicedsound = 0x04df
  2826. const m_XK_sevensubscript = 0x1002087
  2827. const m_XK_sevensuperior = 0x1002077
  2828. const m_XK_sixsubscript = 0x1002086
  2829. const m_XK_sixsuperior = 0x1002076
  2830. const m_XK_slash = 0x002f
  2831. const m_XK_space = 0x0020
  2832. const m_XK_squareroot = 0x100221A
  2833. const m_XK_ssharp = 0x00df
  2834. const m_XK_sterling = 0x00a3
  2835. const m_XK_stricteq = 0x1002263
  2836. const m_XK_t = 0x0074
  2837. const m_XK_tabovedot = 0x1001e6b
  2838. const m_XK_tcaron = 0x01bb
  2839. const m_XK_tcedilla = 0x01fe
  2840. const m_XK_thorn = 0x00fe
  2841. const m_XK_threequarters = 0x00be
  2842. const m_XK_threesubscript = 0x1002083
  2843. const m_XK_threesuperior = 0x00b3
  2844. const m_XK_tintegral = 0x100222D
  2845. const m_XK_tslash = 0x03bc
  2846. const m_XK_twosubscript = 0x1002082
  2847. const m_XK_twosuperior = 0x00b2
  2848. const m_XK_u = 0x0075
  2849. const m_XK_uacute = 0x00fa
  2850. const m_XK_ubelowdot = 0x1001ee5
  2851. const m_XK_ubreve = 0x02fd
  2852. const m_XK_ucircumflex = 0x00fb
  2853. const m_XK_udiaeresis = 0x00fc
  2854. const m_XK_udoubleacute = 0x01fb
  2855. const m_XK_ugrave = 0x00f9
  2856. const m_XK_uhook = 0x1001ee7
  2857. const m_XK_uhorn = 0x10001b0
  2858. const m_XK_uhornacute = 0x1001ee9
  2859. const m_XK_uhornbelowdot = 0x1001ef1
  2860. const m_XK_uhorngrave = 0x1001eeb
  2861. const m_XK_uhornhook = 0x1001eed
  2862. const m_XK_uhorntilde = 0x1001eef
  2863. const m_XK_umacron = 0x03fe
  2864. const m_XK_underscore = 0x005f
  2865. const m_XK_uogonek = 0x03f9
  2866. const m_XK_uring = 0x01f9
  2867. const m_XK_utilde = 0x03fd
  2868. const m_XK_v = 0x0076
  2869. const m_XK_voicedsound = 0x04de
  2870. const m_XK_w = 0x0077
  2871. const m_XK_wacute = 0x1001e83
  2872. const m_XK_wcircumflex = 0x1000175
  2873. const m_XK_wdiaeresis = 0x1001e85
  2874. const m_XK_wgrave = 0x1001e81
  2875. const m_XK_x = 0x0078
  2876. const m_XK_xabovedot = 0x1001e8b
  2877. const m_XK_y = 0x0079
  2878. const m_XK_yacute = 0x00fd
  2879. const m_XK_ybelowdot = 0x1001ef5
  2880. const m_XK_ycircumflex = 0x1000177
  2881. const m_XK_ydiaeresis = 0x00ff
  2882. const m_XK_yen = 0x00a5
  2883. const m_XK_ygrave = 0x1001ef3
  2884. const m_XK_yhook = 0x1001ef7
  2885. const m_XK_ytilde = 0x1001ef9
  2886. const m_XK_z = 0x007a
  2887. const m_XK_zabovedot = 0x01bf
  2888. const m_XK_zacute = 0x01bc
  2889. const m_XK_zcaron = 0x01be
  2890. const m_XK_zerosubscript = 0x1002080
  2891. const m_XK_zerosuperior = 0x1002070
  2892. const m_XK_zstroke = 0x10001b6
  2893. const m_XLookupBoth = 4
  2894. const m_XLookupChars = 2
  2895. const m_XLookupKeySym = 3
  2896. const m_XLookupNone = 1
  2897. const m_XMD_H = 1
  2898. const m_XNArea = "area"
  2899. const m_XNAreaNeeded = "areaNeeded"
  2900. const m_XNBackground = "background"
  2901. const m_XNBackgroundPixmap = "backgroundPixmap"
  2902. const m_XNBaseFontName = "baseFontName"
  2903. const m_XNClientWindow = "clientWindow"
  2904. const m_XNColormap = "colorMap"
  2905. const m_XNContextualDrawing = "contextualDrawing"
  2906. const m_XNCursor = "cursor"
  2907. const m_XNDefaultString = "defaultString"
  2908. const m_XNDestroyCallback = "destroyCallback"
  2909. const m_XNDirectionalDependentDrawing = "directionalDependentDrawing"
  2910. const m_XNFilterEvents = "filterEvents"
  2911. const m_XNFocusWindow = "focusWindow"
  2912. const m_XNFontInfo = "fontInfo"
  2913. const m_XNFontSet = "fontSet"
  2914. const m_XNForeground = "foreground"
  2915. const m_XNGeometryCallback = "geometryCallback"
  2916. const m_XNHotKey = "hotKey"
  2917. const m_XNHotKeyState = "hotKeyState"
  2918. const m_XNInputStyle = "inputStyle"
  2919. const m_XNLineSpace = "lineSpace"
  2920. const m_XNMissingCharSet = "missingCharSet"
  2921. const m_XNOMAutomatic = "omAutomatic"
  2922. const m_XNOrientation = "orientation"
  2923. const m_XNPreeditAttributes = "preeditAttributes"
  2924. const m_XNPreeditCaretCallback = "preeditCaretCallback"
  2925. const m_XNPreeditDoneCallback = "preeditDoneCallback"
  2926. const m_XNPreeditDrawCallback = "preeditDrawCallback"
  2927. const m_XNPreeditStartCallback = "preeditStartCallback"
  2928. const m_XNPreeditState = "preeditState"
  2929. const m_XNPreeditStateNotifyCallback = "preeditStateNotifyCallback"
  2930. const m_XNQueryICValuesList = "queryICValuesList"
  2931. const m_XNQueryIMValuesList = "queryIMValuesList"
  2932. const m_XNQueryInputStyle = "queryInputStyle"
  2933. const m_XNQueryOrientation = "queryOrientation"
  2934. const m_XNR6PreeditCallback = "r6PreeditCallback"
  2935. const m_XNRequiredCharSet = "requiredCharSet"
  2936. const m_XNResetState = "resetState"
  2937. const m_XNResourceClass = "resourceClass"
  2938. const m_XNResourceName = "resourceName"
  2939. const m_XNSeparatorofNestedList = "separatorofNestedList"
  2940. const m_XNSpotLocation = "spotLocation"
  2941. const m_XNStatusAttributes = "statusAttributes"
  2942. const m_XNStatusDoneCallback = "statusDoneCallback"
  2943. const m_XNStatusDrawCallback = "statusDrawCallback"
  2944. const m_XNStatusStartCallback = "statusStartCallback"
  2945. const m_XNStdColormap = "stdColorMap"
  2946. const m_XNStringConversion = "stringConversion"
  2947. const m_XNStringConversionCallback = "stringConversionCallback"
  2948. const m_XNVaNestedList = "XNVaNestedList"
  2949. const m_XNVisiblePosition = "visiblePosition"
  2950. const m_XNegative = 0x0010
  2951. const m_XTHREADS = 1
  2952. const m_XUSE_MTSAFE_API = 1
  2953. const m_XValue = 0x0001
  2954. const m_XYBitmap = 0
  2955. const m_XYPixmap = 1
  2956. const m_X_AllocColor = 84
  2957. const m_X_AllocColorCells = 86
  2958. const m_X_AllocColorPlanes = 87
  2959. const m_X_AllocNamedColor = 85
  2960. const m_X_AllowEvents = 35
  2961. const m_X_Bell = 104
  2962. const m_X_ChangeActivePointerGrab = 30
  2963. const m_X_ChangeGC = 56
  2964. const m_X_ChangeHosts = 109
  2965. const m_X_ChangeKeyboardControl = 102
  2966. const m_X_ChangeKeyboardMapping = 100
  2967. const m_X_ChangePointerControl = 105
  2968. const m_X_ChangeProperty = 18
  2969. const m_X_ChangeSaveSet = 6
  2970. const m_X_ChangeWindowAttributes = 2
  2971. const m_X_CirculateWindow = 13
  2972. const m_X_ClearArea = 61
  2973. const m_X_CloseFont = 46
  2974. const m_X_ConfigureWindow = 12
  2975. const m_X_ConvertSelection = 24
  2976. const m_X_CopyArea = 62
  2977. const m_X_CopyColormapAndFree = 80
  2978. const m_X_CopyGC = 57
  2979. const m_X_CopyPlane = 63
  2980. const m_X_CreateColormap = 78
  2981. const m_X_CreateCursor = 93
  2982. const m_X_CreateGC = 55
  2983. const m_X_CreateGlyphCursor = 94
  2984. const m_X_CreatePixmap = 53
  2985. const m_X_CreateWindow = 1
  2986. const m_X_DeleteProperty = 19
  2987. const m_X_DestroySubwindows = 5
  2988. const m_X_DestroyWindow = 4
  2989. const m_X_Error = 0
  2990. const m_X_FillPoly = 69
  2991. const m_X_ForceScreenSaver = 115
  2992. const m_X_FreeColormap = 79
  2993. const m_X_FreeColors = 88
  2994. const m_X_FreeCursor = 95
  2995. const m_X_FreeGC = 60
  2996. const m_X_FreePixmap = 54
  2997. const m_X_GetAtomName = 17
  2998. const m_X_GetFontPath = 52
  2999. const m_X_GetGeometry = 14
  3000. const m_X_GetImage = 73
  3001. const m_X_GetInputFocus = 43
  3002. const m_X_GetKeyboardControl = 103
  3003. const m_X_GetKeyboardMapping = 101
  3004. const m_X_GetModifierMapping = 119
  3005. const m_X_GetMotionEvents = 39
  3006. const m_X_GetPointerControl = 106
  3007. const m_X_GetPointerMapping = 117
  3008. const m_X_GetProperty = 20
  3009. const m_X_GetScreenSaver = 108
  3010. const m_X_GetSelectionOwner = 23
  3011. const m_X_GetWindowAttributes = 3
  3012. const m_X_GrabButton = 28
  3013. const m_X_GrabKey = 33
  3014. const m_X_GrabKeyboard = 31
  3015. const m_X_GrabPointer = 26
  3016. const m_X_GrabServer = 36
  3017. const m_X_HAVE_UTF8_STRING = 1
  3018. const m_X_ImageText16 = 77
  3019. const m_X_ImageText8 = 76
  3020. const m_X_InstallColormap = 81
  3021. const m_X_InternAtom = 16
  3022. const m_X_KillClient = 113
  3023. const m_X_ListExtensions = 99
  3024. const m_X_ListFonts = 49
  3025. const m_X_ListFontsWithInfo = 50
  3026. const m_X_ListHosts = 110
  3027. const m_X_ListInstalledColormaps = 83
  3028. const m_X_ListProperties = 21
  3029. const m_X_LookupColor = 92
  3030. const m_X_MapSubwindows = 9
  3031. const m_X_MapWindow = 8
  3032. const m_X_NoOperation = 127
  3033. const m_X_OpenFont = 45
  3034. const m_X_PROTOCOL = 11
  3035. const m_X_PROTOCOL_REVISION = 0
  3036. const m_X_PolyArc = 68
  3037. const m_X_PolyFillArc = 71
  3038. const m_X_PolyFillRectangle = 70
  3039. const m_X_PolyLine = 65
  3040. const m_X_PolyPoint = 64
  3041. const m_X_PolyRectangle = 67
  3042. const m_X_PolySegment = 66
  3043. const m_X_PolyText16 = 75
  3044. const m_X_PolyText8 = 74
  3045. const m_X_PutImage = 72
  3046. const m_X_QueryBestSize = 97
  3047. const m_X_QueryColors = 91
  3048. const m_X_QueryExtension = 98
  3049. const m_X_QueryFont = 47
  3050. const m_X_QueryKeymap = 44
  3051. const m_X_QueryPointer = 38
  3052. const m_X_QueryTextExtents = 48
  3053. const m_X_QueryTree = 15
  3054. const m_X_RecolorCursor = 96
  3055. const m_X_RenderAddGlyphs = 20
  3056. const m_X_RenderAddGlyphsFromPicture = 21
  3057. const m_X_RenderAddTraps = 32
  3058. const m_X_RenderChangePicture = 5
  3059. const m_X_RenderColorTrapezoids = 14
  3060. const m_X_RenderColorTriangles = 15
  3061. const m_X_RenderComposite = 8
  3062. const m_X_RenderCompositeGlyphs16 = 24
  3063. const m_X_RenderCompositeGlyphs32 = 25
  3064. const m_X_RenderCompositeGlyphs8 = 23
  3065. const m_X_RenderCreateAnimCursor = 31
  3066. const m_X_RenderCreateConicalGradient = 36
  3067. const m_X_RenderCreateCursor = 27
  3068. const m_X_RenderCreateGlyphSet = 17
  3069. const m_X_RenderCreateLinearGradient = 34
  3070. const m_X_RenderCreatePicture = 4
  3071. const m_X_RenderCreateRadialGradient = 35
  3072. const m_X_RenderCreateSolidFill = 33
  3073. const m_X_RenderFillRectangles = 26
  3074. const m_X_RenderFreeGlyphSet = 19
  3075. const m_X_RenderFreeGlyphs = 22
  3076. const m_X_RenderFreePicture = 7
  3077. const m_X_RenderQueryDithers = 3
  3078. const m_X_RenderQueryFilters = 29
  3079. const m_X_RenderQueryPictFormats = 1
  3080. const m_X_RenderQueryPictIndexValues = 2
  3081. const m_X_RenderQueryVersion = 0
  3082. const m_X_RenderReferenceGlyphSet = 18
  3083. const m_X_RenderScale = 9
  3084. const m_X_RenderSetPictureClipRectangles = 6
  3085. const m_X_RenderSetPictureFilter = 30
  3086. const m_X_RenderSetPictureTransform = 28
  3087. const m_X_RenderTrapezoids = 10
  3088. const m_X_RenderTriFan = 13
  3089. const m_X_RenderTriStrip = 12
  3090. const m_X_RenderTriangles = 11
  3091. const m_X_ReparentWindow = 7
  3092. const m_X_Reply = 1
  3093. const m_X_RotateProperties = 114
  3094. const m_X_SendEvent = 25
  3095. const m_X_SetAccessControl = 111
  3096. const m_X_SetClipRectangles = 59
  3097. const m_X_SetCloseDownMode = 112
  3098. const m_X_SetDashes = 58
  3099. const m_X_SetFontPath = 51
  3100. const m_X_SetInputFocus = 42
  3101. const m_X_SetModifierMapping = 118
  3102. const m_X_SetPointerMapping = 116
  3103. const m_X_SetScreenSaver = 107
  3104. const m_X_SetSelectionOwner = 22
  3105. const m_X_StoreColors = 89
  3106. const m_X_StoreNamedColor = 90
  3107. const m_X_TCP_PORT = 6000
  3108. const m_X_TranslateCoords = 40
  3109. const m_X_UngrabButton = 29
  3110. const m_X_UngrabKey = 34
  3111. const m_X_UngrabKeyboard = 32
  3112. const m_X_UngrabPointer = 27
  3113. const m_X_UngrabServer = 37
  3114. const m_X_UninstallColormap = 82
  3115. const m_X_UnmapSubwindows = 11
  3116. const m_X_UnmapWindow = 10
  3117. const m_X_WarpPointer = 41
  3118. const m_XftVersion = "XFT_VERSION"
  3119. const m_XlibSpecificationRelease = 6
  3120. const m_YNegative = 0x0020
  3121. const m_YSorted = 1
  3122. const m_YValue = 0x0002
  3123. const m_YXBanded = 3
  3124. const m_YXSorted = 2
  3125. const m_ZLNSPERBATCH = 1024
  3126. const m_ZPixmap = 2
  3127. const m_ZRCTSPERBATCH = 256
  3128. const m_ZoomState = 2
  3129. const m__ABILP64 = 3
  3130. const m__GNU_SOURCE = 1
  3131. const m__IOFBF = 0
  3132. const m__IOLBF = 1
  3133. const m__IONBF = 2
  3134. const m__LOONGARCH_ARCH = "la64v1.0"
  3135. const m__LOONGARCH_FPSET = 32
  3136. const m__LOONGARCH_SIM = "_ABILP64"
  3137. const m__LOONGARCH_SPFPSET = 32
  3138. const m__LOONGARCH_SZINT = 32
  3139. const m__LOONGARCH_SZLONG = 64
  3140. const m__LOONGARCH_SZPTR = 64
  3141. const m__LOONGARCH_TUNE = "generic"
  3142. const m__LP64 = 1
  3143. const m__POSIX2_BC_BASE_MAX = 99
  3144. const m__POSIX2_BC_DIM_MAX = 2048
  3145. const m__POSIX2_BC_SCALE_MAX = 99
  3146. const m__POSIX2_BC_STRING_MAX = 1000
  3147. const m__POSIX2_CHARCLASS_NAME_MAX = 14
  3148. const m__POSIX2_COLL_WEIGHTS_MAX = 2
  3149. const m__POSIX2_EXPR_NEST_MAX = 32
  3150. const m__POSIX2_LINE_MAX = 2048
  3151. const m__POSIX2_RE_DUP_MAX = 255
  3152. const m__POSIX_AIO_LISTIO_MAX = 2
  3153. const m__POSIX_AIO_MAX = 1
  3154. const m__POSIX_ARG_MAX = 4096
  3155. const m__POSIX_CHILD_MAX = 25
  3156. const m__POSIX_CLOCKRES_MIN = 20000000
  3157. const m__POSIX_DELAYTIMER_MAX = 32
  3158. const m__POSIX_HOST_NAME_MAX = 255
  3159. const m__POSIX_LINK_MAX = 8
  3160. const m__POSIX_LOGIN_NAME_MAX = 9
  3161. const m__POSIX_MAX_CANON = 255
  3162. const m__POSIX_MAX_INPUT = 255
  3163. const m__POSIX_MQ_OPEN_MAX = 8
  3164. const m__POSIX_MQ_PRIO_MAX = 32
  3165. const m__POSIX_NAME_MAX = 14
  3166. const m__POSIX_NGROUPS_MAX = 8
  3167. const m__POSIX_OPEN_MAX = 20
  3168. const m__POSIX_PATH_MAX = 256
  3169. const m__POSIX_PIPE_BUF = 512
  3170. const m__POSIX_RE_DUP_MAX = 255
  3171. const m__POSIX_RTSIG_MAX = 8
  3172. const m__POSIX_SEM_NSEMS_MAX = 256
  3173. const m__POSIX_SEM_VALUE_MAX = 32767
  3174. const m__POSIX_SIGQUEUE_MAX = 32
  3175. const m__POSIX_SSIZE_MAX = 32767
  3176. const m__POSIX_SS_REPL_MAX = 4
  3177. const m__POSIX_STREAM_MAX = 8
  3178. const m__POSIX_SYMLINK_MAX = 255
  3179. const m__POSIX_SYMLOOP_MAX = 8
  3180. const m__POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
  3181. const m__POSIX_THREAD_KEYS_MAX = 128
  3182. const m__POSIX_THREAD_THREADS_MAX = 64
  3183. const m__POSIX_TIMER_MAX = 32
  3184. const m__POSIX_TRACE_EVENT_NAME_MAX = 30
  3185. const m__POSIX_TRACE_NAME_MAX = 8
  3186. const m__POSIX_TRACE_SYS_MAX = 8
  3187. const m__POSIX_TRACE_USER_EVENT_MAX = 32
  3188. const m__POSIX_TTY_NAME_MAX = 9
  3189. const m__POSIX_TZNAME_MAX = 6
  3190. const m__REENTRANT = 1
  3191. const m__STDC_PREDEF_H = 1
  3192. const m__X11_XLIBINT_H_ = 1
  3193. const m__XBCOPYFUNC = "_Xbcopy"
  3194. const m__XOPEN_IOV_MAX = 16
  3195. const m__XOPEN_NAME_MAX = 255
  3196. const m__XOPEN_PATH_MAX = 1024
  3197. const m__X_INLINE = "inline"
  3198. const m__X_RESTRICT_KYWD = "restrict"
  3199. const m__Xconst = "const"
  3200. const m___ACCUM_EPSILON__ = "0x1P-15K"
  3201. const m___ACCUM_FBIT__ = 15
  3202. const m___ACCUM_IBIT__ = 16
  3203. const m___ACCUM_MAX__ = "0X7FFFFFFFP-15K"
  3204. const m___ATOMIC_ACQUIRE = 2
  3205. const m___ATOMIC_ACQ_REL = 4
  3206. const m___ATOMIC_CONSUME = 1
  3207. const m___ATOMIC_RELAXED = 0
  3208. const m___ATOMIC_RELEASE = 3
  3209. const m___ATOMIC_SEQ_CST = 5
  3210. const m___BIGGEST_ALIGNMENT__ = 16
  3211. const m___BIG_ENDIAN = 4321
  3212. const m___BYTE_ORDER = 1234
  3213. const m___BYTE_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3214. const m___CCGO__ = 1
  3215. const m___CHAR_BIT__ = 8
  3216. const m___DA_FBIT__ = 31
  3217. const m___DA_IBIT__ = 32
  3218. const m___DBL_DECIMAL_DIG__ = 17
  3219. const m___DBL_DIG__ = 15
  3220. const m___DBL_HAS_DENORM__ = 1
  3221. const m___DBL_HAS_INFINITY__ = 1
  3222. const m___DBL_HAS_QUIET_NAN__ = 1
  3223. const m___DBL_IS_IEC_60559__ = 1
  3224. const m___DBL_MANT_DIG__ = 53
  3225. const m___DBL_MAX_10_EXP__ = 308
  3226. const m___DBL_MAX_EXP__ = 1024
  3227. const m___DECIMAL_DIG__ = 36
  3228. const m___DEC_EVAL_METHOD__ = 2
  3229. const m___DQ_FBIT__ = 63
  3230. const m___DQ_IBIT__ = 0
  3231. const m___ELF__ = 1
  3232. const m___FINITE_MATH_ONLY__ = 0
  3233. const m___FLOAT128_TYPE__ = 1
  3234. const m___FLOAT_WORD_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3235. const m___FLT128_DECIMAL_DIG__ = 36
  3236. const m___FLT128_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3237. const m___FLT128_DIG__ = 33
  3238. const m___FLT128_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3239. const m___FLT128_HAS_DENORM__ = 1
  3240. const m___FLT128_HAS_INFINITY__ = 1
  3241. const m___FLT128_HAS_QUIET_NAN__ = 1
  3242. const m___FLT128_IS_IEC_60559__ = 1
  3243. const m___FLT128_MANT_DIG__ = 113
  3244. const m___FLT128_MAX_10_EXP__ = 4932
  3245. const m___FLT128_MAX_EXP__ = 16384
  3246. const m___FLT128_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3247. const m___FLT128_MIN__ = 3.36210314311209350626267781732175260e-4932
  3248. const m___FLT128_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3249. const m___FLT32X_DECIMAL_DIG__ = 17
  3250. const m___FLT32X_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3251. const m___FLT32X_DIG__ = 15
  3252. const m___FLT32X_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3253. const m___FLT32X_HAS_DENORM__ = 1
  3254. const m___FLT32X_HAS_INFINITY__ = 1
  3255. const m___FLT32X_HAS_QUIET_NAN__ = 1
  3256. const m___FLT32X_IS_IEC_60559__ = 1
  3257. const m___FLT32X_MANT_DIG__ = 53
  3258. const m___FLT32X_MAX_10_EXP__ = 308
  3259. const m___FLT32X_MAX_EXP__ = 1024
  3260. const m___FLT32X_MAX__ = 1.79769313486231570814527423731704357e+308
  3261. const m___FLT32X_MIN__ = 2.22507385850720138309023271733240406e-308
  3262. const m___FLT32X_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3263. const m___FLT32_DECIMAL_DIG__ = 9
  3264. const m___FLT32_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3265. const m___FLT32_DIG__ = 6
  3266. const m___FLT32_EPSILON__ = 1.19209289550781250000000000000000000e-7
  3267. const m___FLT32_HAS_DENORM__ = 1
  3268. const m___FLT32_HAS_INFINITY__ = 1
  3269. const m___FLT32_HAS_QUIET_NAN__ = 1
  3270. const m___FLT32_IS_IEC_60559__ = 1
  3271. const m___FLT32_MANT_DIG__ = 24
  3272. const m___FLT32_MAX_10_EXP__ = 38
  3273. const m___FLT32_MAX_EXP__ = 128
  3274. const m___FLT32_MAX__ = 3.40282346638528859811704183484516925e+38
  3275. const m___FLT32_MIN__ = 1.17549435082228750796873653722224568e-38
  3276. const m___FLT32_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  3277. const m___FLT64X_DECIMAL_DIG__ = 36
  3278. const m___FLT64X_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3279. const m___FLT64X_DIG__ = 33
  3280. const m___FLT64X_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3281. const m___FLT64X_HAS_DENORM__ = 1
  3282. const m___FLT64X_HAS_INFINITY__ = 1
  3283. const m___FLT64X_HAS_QUIET_NAN__ = 1
  3284. const m___FLT64X_IS_IEC_60559__ = 1
  3285. const m___FLT64X_MANT_DIG__ = 113
  3286. const m___FLT64X_MAX_10_EXP__ = 4932
  3287. const m___FLT64X_MAX_EXP__ = 16384
  3288. const m___FLT64X_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3289. const m___FLT64X_MIN__ = 3.36210314311209350626267781732175260e-4932
  3290. const m___FLT64X_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3291. const m___FLT64_DECIMAL_DIG__ = 17
  3292. const m___FLT64_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3293. const m___FLT64_DIG__ = 15
  3294. const m___FLT64_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3295. const m___FLT64_HAS_DENORM__ = 1
  3296. const m___FLT64_HAS_INFINITY__ = 1
  3297. const m___FLT64_HAS_QUIET_NAN__ = 1
  3298. const m___FLT64_IS_IEC_60559__ = 1
  3299. const m___FLT64_MANT_DIG__ = 53
  3300. const m___FLT64_MAX_10_EXP__ = 308
  3301. const m___FLT64_MAX_EXP__ = 1024
  3302. const m___FLT64_MAX__ = 1.79769313486231570814527423731704357e+308
  3303. const m___FLT64_MIN__ = 2.22507385850720138309023271733240406e-308
  3304. const m___FLT64_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3305. const m___FLT_DECIMAL_DIG__ = 9
  3306. const m___FLT_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3307. const m___FLT_DIG__ = 6
  3308. const m___FLT_EPSILON__ = 1.19209289550781250000000000000000000e-7
  3309. const m___FLT_EVAL_METHOD_TS_18661_3__ = 0
  3310. const m___FLT_EVAL_METHOD__ = 0
  3311. const m___FLT_HAS_DENORM__ = 1
  3312. const m___FLT_HAS_INFINITY__ = 1
  3313. const m___FLT_HAS_QUIET_NAN__ = 1
  3314. const m___FLT_IS_IEC_60559__ = 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___FRACT_EPSILON__ = "0x1P-15R"
  3328. const m___FRACT_FBIT__ = 15
  3329. const m___FRACT_IBIT__ = 0
  3330. const m___FRACT_MAX__ = "0X7FFFP-15R"
  3331. const m___FUNCTION__ = "__func__"
  3332. const m___GCC_ATOMIC_BOOL_LOCK_FREE = 2
  3333. const m___GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2
  3334. const m___GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2
  3335. const m___GCC_ATOMIC_CHAR_LOCK_FREE = 2
  3336. const m___GCC_ATOMIC_INT_LOCK_FREE = 2
  3337. const m___GCC_ATOMIC_LLONG_LOCK_FREE = 2
  3338. const m___GCC_ATOMIC_LONG_LOCK_FREE = 2
  3339. const m___GCC_ATOMIC_POINTER_LOCK_FREE = 2
  3340. const m___GCC_ATOMIC_SHORT_LOCK_FREE = 2
  3341. const m___GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1
  3342. const m___GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2
  3343. const m___GCC_HAVE_DWARF2_CFI_ASM = 1
  3344. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1
  3345. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1
  3346. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1
  3347. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1
  3348. const m___GCC_IEC_559 = 2
  3349. const m___GCC_IEC_559_COMPLEX = 2
  3350. const m___GNUC_EXECUTION_CHARSET_NAME = "UTF-8"
  3351. const m___GNUC_MINOR__ = 1
  3352. const m___GNUC_PATCHLEVEL__ = 0
  3353. const m___GNUC_STDC_INLINE__ = 1
  3354. const m___GNUC_WIDE_EXECUTION_CHARSET_NAME = "UTF-32LE"
  3355. const m___GNUC__ = 14
  3356. const m___GXX_ABI_VERSION = 1019
  3357. const m___HAVE_SPECULATION_SAFE_VALUE = 1
  3358. const m___HA_FBIT__ = 7
  3359. const m___HA_IBIT__ = 8
  3360. const m___HQ_FBIT__ = 15
  3361. const m___HQ_IBIT__ = 0
  3362. const m___INT16_MAX__ = 0x7fff
  3363. const m___INT32_MAX__ = 0x7fffffff
  3364. const m___INT32_TYPE__ = "int"
  3365. const m___INT64_MAX__ = 0x7fffffffffffffff
  3366. const m___INT8_MAX__ = 0x7f
  3367. const m___INTMAX_MAX__ = 0x7fffffffffffffff
  3368. const m___INTMAX_WIDTH__ = 64
  3369. const m___INTPTR_MAX__ = 0x7fffffffffffffff
  3370. const m___INTPTR_WIDTH__ = 64
  3371. const m___INT_FAST16_MAX__ = 0x7fffffffffffffff
  3372. const m___INT_FAST16_WIDTH__ = 64
  3373. const m___INT_FAST32_MAX__ = 0x7fffffffffffffff
  3374. const m___INT_FAST32_WIDTH__ = 64
  3375. const m___INT_FAST64_MAX__ = 0x7fffffffffffffff
  3376. const m___INT_FAST64_WIDTH__ = 64
  3377. const m___INT_FAST8_MAX__ = 0x7f
  3378. const m___INT_FAST8_WIDTH__ = 8
  3379. const m___INT_LEAST16_MAX__ = 0x7fff
  3380. const m___INT_LEAST16_WIDTH__ = 16
  3381. const m___INT_LEAST32_MAX__ = 0x7fffffff
  3382. const m___INT_LEAST32_TYPE__ = "int"
  3383. const m___INT_LEAST32_WIDTH__ = 32
  3384. const m___INT_LEAST64_MAX__ = 0x7fffffffffffffff
  3385. const m___INT_LEAST64_WIDTH__ = 64
  3386. const m___INT_LEAST8_MAX__ = 0x7f
  3387. const m___INT_LEAST8_WIDTH__ = 8
  3388. const m___INT_MAX__ = 0x7fffffff
  3389. const m___INT_WIDTH__ = 32
  3390. const m___LACCUM_EPSILON__ = "0x1P-31LK"
  3391. const m___LACCUM_FBIT__ = 31
  3392. const m___LACCUM_IBIT__ = 32
  3393. const m___LACCUM_MAX__ = "0X7FFFFFFFFFFFFFFFP-31LK"
  3394. const m___LDBL_DECIMAL_DIG__ = 36
  3395. const m___LDBL_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3396. const m___LDBL_DIG__ = 33
  3397. const m___LDBL_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3398. const m___LDBL_HAS_DENORM__ = 1
  3399. const m___LDBL_HAS_INFINITY__ = 1
  3400. const m___LDBL_HAS_QUIET_NAN__ = 1
  3401. const m___LDBL_IS_IEC_60559__ = 1
  3402. const m___LDBL_MANT_DIG__ = 113
  3403. const m___LDBL_MAX_10_EXP__ = 4932
  3404. const m___LDBL_MAX_EXP__ = 16384
  3405. const m___LDBL_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3406. const m___LDBL_MIN__ = 3.36210314311209350626267781732175260e-4932
  3407. const m___LDBL_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3408. const m___LFRACT_EPSILON__ = "0x1P-31LR"
  3409. const m___LFRACT_FBIT__ = 31
  3410. const m___LFRACT_IBIT__ = 0
  3411. const m___LFRACT_MAX__ = "0X7FFFFFFFP-31LR"
  3412. const m___LITTLE_ENDIAN = 1234
  3413. const m___LLACCUM_EPSILON__ = "0x1P-63LLK"
  3414. const m___LLACCUM_FBIT__ = 63
  3415. const m___LLACCUM_IBIT__ = 64
  3416. const m___LLACCUM_MAX__ = "0X7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFP-63LLK"
  3417. const m___LLFRACT_EPSILON__ = "0x1P-63LLR"
  3418. const m___LLFRACT_FBIT__ = 63
  3419. const m___LLFRACT_IBIT__ = 0
  3420. const m___LLFRACT_MAX__ = "0X7FFFFFFFFFFFFFFFP-63LLR"
  3421. const m___LONG_LONG_MAX__ = 0x7fffffffffffffff
  3422. const m___LONG_LONG_WIDTH__ = 64
  3423. const m___LONG_MAX = 0x7fffffffffffffff
  3424. const m___LONG_MAX__ = 0x7fffffffffffffff
  3425. const m___LONG_WIDTH__ = 64
  3426. const m___LP64__ = 1
  3427. const m___NO_INLINE__ = 1
  3428. const m___ORDER_BIG_ENDIAN__ = 4321
  3429. const m___ORDER_LITTLE_ENDIAN__ = 1234
  3430. const m___ORDER_PDP_ENDIAN__ = 3412
  3431. const m___PDP_ENDIAN = 3412
  3432. const m___PRAGMA_REDEFINE_EXTNAME = 1
  3433. const m___PRETTY_FUNCTION__ = "__func__"
  3434. const m___PTRDIFF_MAX__ = 0x7fffffffffffffff
  3435. const m___PTRDIFF_WIDTH__ = 64
  3436. const m___QQ_FBIT__ = 7
  3437. const m___QQ_IBIT__ = 0
  3438. const m___REGISTER_PREFIX__ = "$"
  3439. const m___SACCUM_EPSILON__ = "0x1P-7HK"
  3440. const m___SACCUM_FBIT__ = 7
  3441. const m___SACCUM_IBIT__ = 8
  3442. const m___SACCUM_MAX__ = "0X7FFFP-7HK"
  3443. const m___SA_FBIT__ = 15
  3444. const m___SA_IBIT__ = 16
  3445. const m___SCHAR_MAX__ = 0x7f
  3446. const m___SCHAR_WIDTH__ = 8
  3447. const m___SFRACT_EPSILON__ = "0x1P-7HR"
  3448. const m___SFRACT_FBIT__ = 7
  3449. const m___SFRACT_IBIT__ = 0
  3450. const m___SFRACT_MAX__ = "0X7FP-7HR"
  3451. const m___SHRT_MAX__ = 0x7fff
  3452. const m___SHRT_WIDTH__ = 16
  3453. const m___SIG_ATOMIC_MAX__ = 0x7fffffff
  3454. const m___SIG_ATOMIC_TYPE__ = "int"
  3455. const m___SIG_ATOMIC_WIDTH__ = 32
  3456. const m___SIZEOF_DOUBLE__ = 8
  3457. const m___SIZEOF_FLOAT__ = 4
  3458. const m___SIZEOF_INT128__ = 16
  3459. const m___SIZEOF_INT__ = 4
  3460. const m___SIZEOF_LONG_DOUBLE__ = 8
  3461. const m___SIZEOF_LONG_LONG__ = 8
  3462. const m___SIZEOF_LONG__ = 8
  3463. const m___SIZEOF_POINTER__ = 8
  3464. const m___SIZEOF_PTRDIFF_T__ = 8
  3465. const m___SIZEOF_SHORT__ = 2
  3466. const m___SIZEOF_SIZE_T__ = 8
  3467. const m___SIZEOF_WCHAR_T__ = 4
  3468. const m___SIZEOF_WINT_T__ = 4
  3469. const m___SIZE_MAX__ = 0xffffffffffffffff
  3470. const m___SIZE_WIDTH__ = 64
  3471. const m___SQ_FBIT__ = 31
  3472. const m___SQ_IBIT__ = 0
  3473. const m___STDC_HOSTED__ = 1
  3474. const m___STDC_IEC_559_COMPLEX__ = 1
  3475. const m___STDC_IEC_559__ = 1
  3476. const m___STDC_IEC_60559_BFP__ = 201404
  3477. const m___STDC_IEC_60559_COMPLEX__ = 201404
  3478. const m___STDC_ISO_10646__ = 201706
  3479. const m___STDC_UTF_16__ = 1
  3480. const m___STDC_UTF_32__ = 1
  3481. const m___STDC_VERSION__ = 201710
  3482. const m___STDC__ = 1
  3483. const m___TA_FBIT__ = 63
  3484. const m___TA_IBIT__ = 64
  3485. const m___TQ_FBIT__ = 127
  3486. const m___TQ_IBIT__ = 0
  3487. const m___UACCUM_EPSILON__ = "0x1P-16UK"
  3488. const m___UACCUM_FBIT__ = 16
  3489. const m___UACCUM_IBIT__ = 16
  3490. const m___UACCUM_MAX__ = "0XFFFFFFFFP-16UK"
  3491. const m___UACCUM_MIN__ = "0.0UK"
  3492. const m___UDA_FBIT__ = 32
  3493. const m___UDA_IBIT__ = 32
  3494. const m___UDQ_FBIT__ = 64
  3495. const m___UDQ_IBIT__ = 0
  3496. const m___UFRACT_EPSILON__ = "0x1P-16UR"
  3497. const m___UFRACT_FBIT__ = 16
  3498. const m___UFRACT_IBIT__ = 0
  3499. const m___UFRACT_MAX__ = "0XFFFFP-16UR"
  3500. const m___UFRACT_MIN__ = "0.0UR"
  3501. const m___UHA_FBIT__ = 8
  3502. const m___UHA_IBIT__ = 8
  3503. const m___UHQ_FBIT__ = 16
  3504. const m___UHQ_IBIT__ = 0
  3505. const m___UINT16_MAX__ = 0xffff
  3506. const m___UINT32_MAX__ = 0xffffffff
  3507. const m___UINT64_MAX__ = 0xffffffffffffffff
  3508. const m___UINT8_MAX__ = 0xff
  3509. const m___UINTMAX_MAX__ = 0xffffffffffffffff
  3510. const m___UINTPTR_MAX__ = 0xffffffffffffffff
  3511. const m___UINT_FAST16_MAX__ = 0xffffffffffffffff
  3512. const m___UINT_FAST32_MAX__ = 0xffffffffffffffff
  3513. const m___UINT_FAST64_MAX__ = 0xffffffffffffffff
  3514. const m___UINT_FAST8_MAX__ = 0xff
  3515. const m___UINT_LEAST16_MAX__ = 0xffff
  3516. const m___UINT_LEAST32_MAX__ = 0xffffffff
  3517. const m___UINT_LEAST64_MAX__ = 0xffffffffffffffff
  3518. const m___UINT_LEAST8_MAX__ = 0xff
  3519. const m___ULACCUM_EPSILON__ = "0x1P-32ULK"
  3520. const m___ULACCUM_FBIT__ = 32
  3521. const m___ULACCUM_IBIT__ = 32
  3522. const m___ULACCUM_MAX__ = "0XFFFFFFFFFFFFFFFFP-32ULK"
  3523. const m___ULACCUM_MIN__ = "0.0ULK"
  3524. const m___ULFRACT_EPSILON__ = "0x1P-32ULR"
  3525. const m___ULFRACT_FBIT__ = 32
  3526. const m___ULFRACT_IBIT__ = 0
  3527. const m___ULFRACT_MAX__ = "0XFFFFFFFFP-32ULR"
  3528. const m___ULFRACT_MIN__ = "0.0ULR"
  3529. const m___ULLACCUM_EPSILON__ = "0x1P-64ULLK"
  3530. const m___ULLACCUM_FBIT__ = 64
  3531. const m___ULLACCUM_IBIT__ = 64
  3532. const m___ULLACCUM_MAX__ = "0XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFP-64ULLK"
  3533. const m___ULLACCUM_MIN__ = "0.0ULLK"
  3534. const m___ULLFRACT_EPSILON__ = "0x1P-64ULLR"
  3535. const m___ULLFRACT_FBIT__ = 64
  3536. const m___ULLFRACT_IBIT__ = 0
  3537. const m___ULLFRACT_MAX__ = "0XFFFFFFFFFFFFFFFFP-64ULLR"
  3538. const m___ULLFRACT_MIN__ = "0.0ULLR"
  3539. const m___UQQ_FBIT__ = 8
  3540. const m___UQQ_IBIT__ = 0
  3541. const m___USACCUM_EPSILON__ = "0x1P-8UHK"
  3542. const m___USACCUM_FBIT__ = 8
  3543. const m___USACCUM_IBIT__ = 8
  3544. const m___USACCUM_MAX__ = "0XFFFFP-8UHK"
  3545. const m___USACCUM_MIN__ = "0.0UHK"
  3546. const m___USA_FBIT__ = 16
  3547. const m___USA_IBIT__ = 16
  3548. const m___USE_TIME_BITS64 = 1
  3549. const m___USFRACT_EPSILON__ = "0x1P-8UHR"
  3550. const m___USFRACT_FBIT__ = 8
  3551. const m___USFRACT_IBIT__ = 0
  3552. const m___USFRACT_MAX__ = "0XFFP-8UHR"
  3553. const m___USFRACT_MIN__ = "0.0UHR"
  3554. const m___USQ_FBIT__ = 32
  3555. const m___USQ_IBIT__ = 0
  3556. const m___UTA_FBIT__ = 64
  3557. const m___UTA_IBIT__ = 64
  3558. const m___UTQ_FBIT__ = 128
  3559. const m___UTQ_IBIT__ = 0
  3560. const m___VERSION__ = "14.1.0 20240507 (Red Hat 14.1.0-1)"
  3561. const m___WCHAR_MAX__ = 0x7fffffff
  3562. const m___WCHAR_TYPE__ = "int"
  3563. const m___WCHAR_WIDTH__ = 32
  3564. const m___WINT_MAX__ = 0xffffffff
  3565. const m___WINT_MIN__ = 0
  3566. const m___WINT_WIDTH__ = 32
  3567. const m___builtin_copysignq = "__builtin_copysignf128"
  3568. const m___builtin_fabsq = "__builtin_fabsf128"
  3569. const m___builtin_huge_valq = "__builtin_huge_valf128"
  3570. const m___builtin_infq = "__builtin_inff128"
  3571. const m___builtin_nanq = "__builtin_nanf128"
  3572. const m___builtin_nansq = "__builtin_nansf128"
  3573. const m___gnu_linux__ = 1
  3574. const m___inline = "inline"
  3575. const m___linux = 1
  3576. const m___linux__ = 1
  3577. const m___loongarch64 = 1
  3578. const m___loongarch__ = 1
  3579. const m___loongarch_arch = "la64v1.0"
  3580. const m___loongarch_double_float = 1
  3581. const m___loongarch_frlen = 64
  3582. const m___loongarch_grlen = 64
  3583. const m___loongarch_hard_float = 1
  3584. const m___loongarch_lp64 = 1
  3585. const m___loongarch_simd = 1
  3586. const m___loongarch_simd_width = 128
  3587. const m___loongarch_sx = 1
  3588. const m___loongarch_tune = "generic"
  3589. const m___loongarch_version_major = 1
  3590. const m___loongarch_version_minor = 0
  3591. const m___restrict = "restrict"
  3592. const m___restrict_arr = "restrict"
  3593. const m___unix = 1
  3594. const m___unix__ = 1
  3595. const m_alloca = "__builtin_alloca"
  3596. const m_ft_encoding_adobe_custom = "FT_ENCODING_ADOBE_CUSTOM"
  3597. const m_ft_encoding_adobe_expert = "FT_ENCODING_ADOBE_EXPERT"
  3598. const m_ft_encoding_adobe_standard = "FT_ENCODING_ADOBE_STANDARD"
  3599. const m_ft_encoding_apple_roman = "FT_ENCODING_APPLE_ROMAN"
  3600. const m_ft_encoding_big5 = "FT_ENCODING_BIG5"
  3601. const m_ft_encoding_gb2312 = "FT_ENCODING_PRC"
  3602. const m_ft_encoding_johab = "FT_ENCODING_JOHAB"
  3603. const m_ft_encoding_latin_1 = "FT_ENCODING_ADOBE_LATIN_1"
  3604. const m_ft_encoding_latin_2 = "FT_ENCODING_OLD_LATIN_2"
  3605. const m_ft_encoding_none = "FT_ENCODING_NONE"
  3606. const m_ft_encoding_sjis = "FT_ENCODING_SJIS"
  3607. const m_ft_encoding_symbol = "FT_ENCODING_MS_SYMBOL"
  3608. const m_ft_encoding_unicode = "FT_ENCODING_UNICODE"
  3609. const m_ft_encoding_wansung = "FT_ENCODING_WANSUNG"
  3610. const m_ft_fclose = "fclose"
  3611. const m_ft_fopen = "fopen"
  3612. const m_ft_fread = "fread"
  3613. const m_ft_fseek = "fseek"
  3614. const m_ft_ftell = "ftell"
  3615. const m_ft_getenv = "getenv"
  3616. const m_ft_glyph_format_bitmap = "FT_GLYPH_FORMAT_BITMAP"
  3617. const m_ft_glyph_format_composite = "FT_GLYPH_FORMAT_COMPOSITE"
  3618. const m_ft_glyph_format_none = "FT_GLYPH_FORMAT_NONE"
  3619. const m_ft_glyph_format_outline = "FT_GLYPH_FORMAT_OUTLINE"
  3620. const m_ft_glyph_format_plotter = "FT_GLYPH_FORMAT_PLOTTER"
  3621. const m_ft_jmp_buf = "jmp_buf"
  3622. const m_ft_kerning_default = "FT_KERNING_DEFAULT"
  3623. const m_ft_kerning_unfitted = "FT_KERNING_UNFITTED"
  3624. const m_ft_kerning_unscaled = "FT_KERNING_UNSCALED"
  3625. const m_ft_longjmp = "longjmp"
  3626. const m_ft_memchr = "memchr"
  3627. const m_ft_memcmp = "memcmp"
  3628. const m_ft_memcpy = "memcpy"
  3629. const m_ft_memmove = "memmove"
  3630. const m_ft_memset = "memset"
  3631. const m_ft_open_driver = "FT_OPEN_DRIVER"
  3632. const m_ft_open_memory = "FT_OPEN_MEMORY"
  3633. const m_ft_open_params = "FT_OPEN_PARAMS"
  3634. const m_ft_open_pathname = "FT_OPEN_PATHNAME"
  3635. const m_ft_open_stream = "FT_OPEN_STREAM"
  3636. const m_ft_outline_even_odd_fill = "FT_OUTLINE_EVEN_ODD_FILL"
  3637. const m_ft_outline_high_precision = "FT_OUTLINE_HIGH_PRECISION"
  3638. const m_ft_outline_ignore_dropouts = "FT_OUTLINE_IGNORE_DROPOUTS"
  3639. const m_ft_outline_none = "FT_OUTLINE_NONE"
  3640. const m_ft_outline_owner = "FT_OUTLINE_OWNER"
  3641. const m_ft_outline_reverse_fill = "FT_OUTLINE_REVERSE_FILL"
  3642. const m_ft_outline_single_pass = "FT_OUTLINE_SINGLE_PASS"
  3643. const m_ft_pixel_mode_grays = "FT_PIXEL_MODE_GRAY"
  3644. const m_ft_pixel_mode_mono = "FT_PIXEL_MODE_MONO"
  3645. const m_ft_pixel_mode_none = "FT_PIXEL_MODE_NONE"
  3646. const m_ft_pixel_mode_pal2 = "FT_PIXEL_MODE_GRAY2"
  3647. const m_ft_pixel_mode_pal4 = "FT_PIXEL_MODE_GRAY4"
  3648. const m_ft_ptrdiff_t = "ptrdiff_t"
  3649. const m_ft_qsort = "qsort"
  3650. const m_ft_raster_flag_aa = "FT_RASTER_FLAG_AA"
  3651. const m_ft_raster_flag_clip = "FT_RASTER_FLAG_CLIP"
  3652. const m_ft_raster_flag_default = "FT_RASTER_FLAG_DEFAULT"
  3653. const m_ft_raster_flag_direct = "FT_RASTER_FLAG_DIRECT"
  3654. const m_ft_render_mode_mono = "FT_RENDER_MODE_MONO"
  3655. const m_ft_render_mode_normal = "FT_RENDER_MODE_NORMAL"
  3656. const m_ft_scalloc = "calloc"
  3657. const m_ft_sfree = "free"
  3658. const m_ft_smalloc = "malloc"
  3659. const m_ft_sprintf = "sprintf"
  3660. const m_ft_srealloc = "realloc"
  3661. const m_ft_strcat = "strcat"
  3662. const m_ft_strcmp = "strcmp"
  3663. const m_ft_strcpy = "strcpy"
  3664. const m_ft_strlen = "strlen"
  3665. const m_ft_strncmp = "strncmp"
  3666. const m_ft_strncpy = "strncpy"
  3667. const m_ft_strrchr = "strrchr"
  3668. const m_ft_strstr = "strstr"
  3669. const m_ft_strtol = "strtol"
  3670. const m_linux = 1
  3671. const m_sz_xAllocColorCellsReply = 32
  3672. const m_sz_xAllocColorCellsReq = 12
  3673. const m_sz_xAllocColorPlanesReply = 32
  3674. const m_sz_xAllocColorPlanesReq = 16
  3675. const m_sz_xAllocColorReply = 32
  3676. const m_sz_xAllocColorReq = 16
  3677. const m_sz_xAllocNamedColorReply = 32
  3678. const m_sz_xAllocNamedColorReq = 12
  3679. const m_sz_xAllowEventsReq = 8
  3680. const m_sz_xArc = 12
  3681. const m_sz_xBellReq = 4
  3682. const m_sz_xChangeActivePointerGrabReq = 16
  3683. const m_sz_xChangeGCReq = 12
  3684. const m_sz_xChangeHostsReq = 8
  3685. const m_sz_xChangeKeyboardControlReq = 8
  3686. const m_sz_xChangeKeyboardMappingReq = 8
  3687. const m_sz_xChangeModeReq = 4
  3688. const m_sz_xChangePointerControlReq = 12
  3689. const m_sz_xChangePropertyReq = 24
  3690. const m_sz_xChangeSaveSetReq = 8
  3691. const m_sz_xChangeWindowAttributesReq = 12
  3692. const m_sz_xCharInfo = 12
  3693. const m_sz_xCirculateWindowReq = 8
  3694. const m_sz_xClearAreaReq = 16
  3695. const m_sz_xColorItem = 12
  3696. const m_sz_xConfigureWindowReq = 12
  3697. const m_sz_xConnClientPrefix = 12
  3698. const m_sz_xConnSetup = 32
  3699. const m_sz_xConnSetupPrefix = 8
  3700. const m_sz_xConvertSelectionReq = 24
  3701. const m_sz_xCopyAreaReq = 28
  3702. const m_sz_xCopyColormapAndFreeReq = 12
  3703. const m_sz_xCopyGCReq = 16
  3704. const m_sz_xCopyPlaneReq = 32
  3705. const m_sz_xCreateColormapReq = 16
  3706. const m_sz_xCreateCursorReq = 32
  3707. const m_sz_xCreateGCReq = 16
  3708. const m_sz_xCreateGlyphCursorReq = 32
  3709. const m_sz_xCreatePixmapReq = 16
  3710. const m_sz_xCreateWindowReq = 32
  3711. const m_sz_xDeletePropertyReq = 12
  3712. const m_sz_xDepth = 8
  3713. const m_sz_xError = 32
  3714. const m_sz_xEvent = 32
  3715. const m_sz_xFillPolyReq = 16
  3716. const m_sz_xFontProp = 8
  3717. const m_sz_xForceScreenSaverReq = 4
  3718. const m_sz_xFreeColorsReq = 12
  3719. const m_sz_xGenericReply = 32
  3720. const m_sz_xGetAtomNameReply = 32
  3721. const m_sz_xGetFontPathReply = 32
  3722. const m_sz_xGetGeometryReply = 32
  3723. const m_sz_xGetImageReply = 32
  3724. const m_sz_xGetImageReq = 20
  3725. const m_sz_xGetInputFocusReply = 32
  3726. const m_sz_xGetKeyboardControlReply = 52
  3727. const m_sz_xGetKeyboardMappingReply = 32
  3728. const m_sz_xGetKeyboardMappingReq = 8
  3729. const m_sz_xGetModifierMappingReply = 32
  3730. const m_sz_xGetMotionEventsReply = 32
  3731. const m_sz_xGetMotionEventsReq = 16
  3732. const m_sz_xGetPointerControlReply = 32
  3733. const m_sz_xGetPointerMappingReply = 32
  3734. const m_sz_xGetPropertyReply = 32
  3735. const m_sz_xGetPropertyReq = 24
  3736. const m_sz_xGetScreenSaverReply = 32
  3737. const m_sz_xGetSelectionOwnerReply = 32
  3738. const m_sz_xGetWindowAttributesReply = 44
  3739. const m_sz_xGrabButtonReq = 24
  3740. const m_sz_xGrabKeyReq = 16
  3741. const m_sz_xGrabKeyboardReply = 32
  3742. const m_sz_xGrabKeyboardReq = 16
  3743. const m_sz_xGrabPointerReply = 32
  3744. const m_sz_xGrabPointerReq = 24
  3745. const m_sz_xHostEntry = 4
  3746. const m_sz_xImageText16Req = 16
  3747. const m_sz_xImageText8Req = 16
  3748. const m_sz_xImageTextReq = 16
  3749. const m_sz_xInternAtomReply = 32
  3750. const m_sz_xInternAtomReq = 8
  3751. const m_sz_xKeymapEvent = 32
  3752. const m_sz_xListExtensionsReply = 32
  3753. const m_sz_xListFontsReply = 32
  3754. const m_sz_xListFontsReq = 8
  3755. const m_sz_xListFontsWithInfoReply = 60
  3756. const m_sz_xListFontsWithInfoReq = 8
  3757. const m_sz_xListHostsReply = 32
  3758. const m_sz_xListHostsReq = 4
  3759. const m_sz_xListInstalledColormapsReply = 32
  3760. const m_sz_xListPropertiesReply = 32
  3761. const m_sz_xLookupColorReply = 32
  3762. const m_sz_xLookupColorReq = 12
  3763. const m_sz_xOpenFontReq = 12
  3764. const m_sz_xPixmapFormat = 8
  3765. const m_sz_xPoint = 4
  3766. const m_sz_xPolyArcReq = 12
  3767. const m_sz_xPolyFillArcReq = 12
  3768. const m_sz_xPolyFillRectangleReq = 12
  3769. const m_sz_xPolyLineReq = 12
  3770. const m_sz_xPolyPointReq = 12
  3771. const m_sz_xPolyRectangleReq = 12
  3772. const m_sz_xPolySegmentReq = 12
  3773. const m_sz_xPolyText16Req = 16
  3774. const m_sz_xPolyText8Req = 16
  3775. const m_sz_xPolyTextReq = 16
  3776. const m_sz_xPropIconSize = 24
  3777. const m_sz_xPutImageReq = 24
  3778. const m_sz_xQueryBestSizeReply = 32
  3779. const m_sz_xQueryBestSizeReq = 12
  3780. const m_sz_xQueryColorsReply = 32
  3781. const m_sz_xQueryColorsReq = 8
  3782. const m_sz_xQueryExtensionReply = 32
  3783. const m_sz_xQueryExtensionReq = 8
  3784. const m_sz_xQueryFontReply = 60
  3785. const m_sz_xQueryKeymapReply = 40
  3786. const m_sz_xQueryPointerReply = 32
  3787. const m_sz_xQueryTextExtentsReply = 32
  3788. const m_sz_xQueryTextExtentsReq = 8
  3789. const m_sz_xQueryTreeReply = 32
  3790. const m_sz_xRecolorCursorReq = 20
  3791. const m_sz_xRectangle = 8
  3792. const m_sz_xReparentWindowReq = 16
  3793. const m_sz_xReply = 32
  3794. const m_sz_xReq = 4
  3795. const m_sz_xResourceReq = 8
  3796. const m_sz_xRotatePropertiesReq = 12
  3797. const m_sz_xSegment = 8
  3798. const m_sz_xSendEventReq = 44
  3799. const m_sz_xSetAccessControlReq = 4
  3800. const m_sz_xSetClipRectanglesReq = 12
  3801. const m_sz_xSetCloseDownModeReq = 4
  3802. const m_sz_xSetDashesReq = 12
  3803. const m_sz_xSetFontPathReq = 8
  3804. const m_sz_xSetInputFocusReq = 12
  3805. const m_sz_xSetMappingReply = 32
  3806. const m_sz_xSetModifierMappingReply = 32
  3807. const m_sz_xSetModifierMappingReq = 4
  3808. const m_sz_xSetPointerMappingReply = 32
  3809. const m_sz_xSetPointerMappingReq = 4
  3810. const m_sz_xSetScreenSaverReq = 12
  3811. const m_sz_xSetSelectionOwnerReq = 16
  3812. const m_sz_xStoreColorsReq = 8
  3813. const m_sz_xStoreNamedColorReq = 16
  3814. const m_sz_xTextElt = 2
  3815. const m_sz_xTimecoord = 8
  3816. const m_sz_xTranslateCoordsReply = 32
  3817. const m_sz_xTranslateCoordsReq = 16
  3818. const m_sz_xUngrabButtonReq = 12
  3819. const m_sz_xUngrabKeyReq = 12
  3820. const m_sz_xVisualType = 24
  3821. const m_sz_xWarpPointerReq = 24
  3822. const m_sz_xWindowRoot = 40
  3823. const m_sz_xrgb = 8
  3824. const m_unix = 1
  3825. const m_xFalse = 0
  3826. const m_xTrue = 1
  3827. type t__builtin_va_list = uintptr
  3828. type t__predefined_size_t = uint64
  3829. type t__predefined_wchar_t = int32
  3830. type t__predefined_ptrdiff_t = int64
  3831. type Tsize_t = uint64
  3832. type Tssize_t = int64
  3833. type Toff_t = int64
  3834. type Tva_list = uintptr
  3835. type t__isoc_va_list = uintptr
  3836. type Tfpos_t = struct {
  3837. F__lldata [0]int64
  3838. F__align [0]float64
  3839. F__opaque [16]int8
  3840. }
  3841. type T_G_fpos64_t = Tfpos_t
  3842. type Tcookie_io_functions_t = struct {
  3843. Fread uintptr
  3844. Fwrite uintptr
  3845. Fseek uintptr
  3846. Fclose1 uintptr
  3847. }
  3848. type T_IO_cookie_io_functions_t = Tcookie_io_functions_t
  3849. type Twchar_t = int32
  3850. type Tdiv_t = struct {
  3851. Fquot int32
  3852. Frem int32
  3853. }
  3854. type Tldiv_t = struct {
  3855. Fquot int64
  3856. Frem int64
  3857. }
  3858. type Tlldiv_t = struct {
  3859. Fquot int64
  3860. Frem int64
  3861. }
  3862. type Tlocale_t = uintptr
  3863. type Tnlink_t = uint32
  3864. type Tblksize_t = int32
  3865. type Tregister_t = int64
  3866. type Ttime_t = int64
  3867. type Tsuseconds_t = int64
  3868. type Tint8_t = int8
  3869. type Tint16_t = int16
  3870. type Tint32_t = int32
  3871. type Tint64_t = int64
  3872. type Tu_int64_t = uint64
  3873. type Tmode_t = uint32
  3874. type Tino_t = uint64
  3875. type Tdev_t = uint64
  3876. type Tblkcnt_t = int64
  3877. type Tfsblkcnt_t = uint64
  3878. type Tfsfilcnt_t = uint64
  3879. type Ttimer_t = uintptr
  3880. type Tclockid_t = int32
  3881. type Tclock_t = int64
  3882. type Tpid_t = int32
  3883. type Tid_t = uint32
  3884. type Tuid_t = uint32
  3885. type Tgid_t = uint32
  3886. type Tkey_t = int32
  3887. type Tuseconds_t = uint32
  3888. type Tpthread_t = uintptr
  3889. type Tpthread_once_t = int32
  3890. type Tpthread_key_t = uint32
  3891. type Tpthread_spinlock_t = int32
  3892. type Tpthread_mutexattr_t = struct {
  3893. F__attr uint32
  3894. }
  3895. type Tpthread_condattr_t = struct {
  3896. F__attr uint32
  3897. }
  3898. type Tpthread_barrierattr_t = struct {
  3899. F__attr uint32
  3900. }
  3901. type Tpthread_rwlockattr_t = struct {
  3902. F__attr [2]uint32
  3903. }
  3904. type Tpthread_attr_t = struct {
  3905. F__u struct {
  3906. F__vi [0][14]int32
  3907. F__s [0][7]uint64
  3908. F__i [14]int32
  3909. }
  3910. }
  3911. type Tpthread_mutex_t = struct {
  3912. F__u struct {
  3913. F__vi [0][10]int32
  3914. F__p [0][5]uintptr
  3915. F__i [10]int32
  3916. }
  3917. }
  3918. type Tpthread_cond_t = struct {
  3919. F__u struct {
  3920. F__vi [0][12]int32
  3921. F__p [0][6]uintptr
  3922. F__i [12]int32
  3923. }
  3924. }
  3925. type Tpthread_rwlock_t = struct {
  3926. F__u struct {
  3927. F__vi [0][14]int32
  3928. F__p [0][7]uintptr
  3929. F__i [14]int32
  3930. }
  3931. }
  3932. type Tpthread_barrier_t = struct {
  3933. F__u struct {
  3934. F__vi [0][8]int32
  3935. F__p [0][4]uintptr
  3936. F__i [8]int32
  3937. }
  3938. }
  3939. type Tu_int8_t = uint8
  3940. type Tu_int16_t = uint16
  3941. type Tu_int32_t = uint32
  3942. type Tcaddr_t = uintptr
  3943. type Tu_char = uint8
  3944. type Tu_short = uint16
  3945. type Tushort = uint16
  3946. type Tu_int = uint32
  3947. type Tuint = uint32
  3948. type Tu_long = uint64
  3949. type Tulong = uint64
  3950. type Tquad_t = int64
  3951. type Tu_quad_t = uint64
  3952. type Tuint16_t = uint16
  3953. type Tuint32_t = uint32
  3954. type Tuint64_t = uint64
  3955. type Ttimeval = struct {
  3956. Ftv_sec Ttime_t
  3957. Ftv_usec Tsuseconds_t
  3958. }
  3959. type Ttimespec = struct {
  3960. Ftv_sec Ttime_t
  3961. Ftv_nsec int64
  3962. }
  3963. type Tsigset_t = struct {
  3964. F__bits [16]uint64
  3965. }
  3966. type t__sigset_t = Tsigset_t
  3967. type Tfd_mask = uint64
  3968. type Tfd_set = struct {
  3969. Ffds_bits [16]uint64
  3970. }
  3971. type TXID = uint64
  3972. type TMask = uint64
  3973. type TAtom = uint64
  3974. type TVisualID = uint64
  3975. type TTime = uint64
  3976. type TWindow = uint64
  3977. type TDrawable = uint64
  3978. type TFont = uint64
  3979. type TPixmap = uint64
  3980. type TCursor = uint64
  3981. type TColormap = uint64
  3982. type TGContext = uint64
  3983. type TKeySym = uint64
  3984. type TKeyCode = uint8
  3985. type Tmax_align_t = struct {
  3986. F__ll int64
  3987. F__ld float64
  3988. }
  3989. type Tptrdiff_t = int64
  3990. type TXPointer = uintptr
  3991. type TXExtData = struct {
  3992. Fnumber int32
  3993. Fnext uintptr
  3994. Ffree_private uintptr
  3995. Fprivate_data TXPointer
  3996. }
  3997. type T_XExtData = TXExtData
  3998. type TXExtCodes = struct {
  3999. Fextension int32
  4000. Fmajor_opcode int32
  4001. Ffirst_event int32
  4002. Ffirst_error int32
  4003. }
  4004. type TXPixmapFormatValues = struct {
  4005. Fdepth int32
  4006. Fbits_per_pixel int32
  4007. Fscanline_pad int32
  4008. }
  4009. type TXGCValues = struct {
  4010. Ffunction int32
  4011. Fplane_mask uint64
  4012. Fforeground uint64
  4013. Fbackground uint64
  4014. Fline_width int32
  4015. Fline_style int32
  4016. Fcap_style int32
  4017. Fjoin_style int32
  4018. Ffill_style int32
  4019. Ffill_rule int32
  4020. Farc_mode int32
  4021. Ftile TPixmap
  4022. Fstipple TPixmap
  4023. Fts_x_origin int32
  4024. Fts_y_origin int32
  4025. Ffont TFont
  4026. Fsubwindow_mode int32
  4027. Fgraphics_exposures int32
  4028. Fclip_x_origin int32
  4029. Fclip_y_origin int32
  4030. Fclip_mask TPixmap
  4031. Fdash_offset int32
  4032. Fdashes int8
  4033. }
  4034. type TGC = uintptr
  4035. type T_XGC = struct {
  4036. Fext_data uintptr
  4037. Fgid TGContext
  4038. Frects int32
  4039. Fdashes int32
  4040. Fdirty uint64
  4041. Fvalues TXGCValues
  4042. }
  4043. type TVisual = struct {
  4044. Fext_data uintptr
  4045. Fvisualid TVisualID
  4046. Fclass int32
  4047. Fred_mask uint64
  4048. Fgreen_mask uint64
  4049. Fblue_mask uint64
  4050. Fbits_per_rgb int32
  4051. Fmap_entries int32
  4052. }
  4053. type TDepth = struct {
  4054. Fdepth int32
  4055. Fnvisuals int32
  4056. Fvisuals uintptr
  4057. }
  4058. type T_XDisplay = struct {
  4059. Fext_data uintptr
  4060. Ffree_funcs uintptr
  4061. Ffd int32
  4062. Fconn_checker int32
  4063. Fproto_major_version int32
  4064. Fproto_minor_version int32
  4065. Fvendor uintptr
  4066. Fresource_base TXID
  4067. Fresource_mask TXID
  4068. Fresource_id TXID
  4069. Fresource_shift int32
  4070. Fresource_alloc uintptr
  4071. Fbyte_order int32
  4072. Fbitmap_unit int32
  4073. Fbitmap_pad int32
  4074. Fbitmap_bit_order int32
  4075. Fnformats int32
  4076. Fpixmap_format uintptr
  4077. Fvnumber int32
  4078. Frelease int32
  4079. Fhead uintptr
  4080. Ftail uintptr
  4081. Fqlen int32
  4082. Flast_request_read uint64
  4083. Frequest uint64
  4084. Flast_req uintptr
  4085. Fbuffer uintptr
  4086. Fbufptr uintptr
  4087. Fbufmax uintptr
  4088. Fmax_request_size uint32
  4089. Fdb uintptr
  4090. Fsynchandler uintptr
  4091. Fdisplay_name uintptr
  4092. Fdefault_screen int32
  4093. Fnscreens int32
  4094. Fscreens uintptr
  4095. Fmotion_buffer uint64
  4096. Fflags uint64
  4097. Fmin_keycode int32
  4098. Fmax_keycode int32
  4099. Fkeysyms uintptr
  4100. Fmodifiermap uintptr
  4101. Fkeysyms_per_keycode int32
  4102. Fxdefaults uintptr
  4103. Fscratch_buffer uintptr
  4104. Fscratch_length uint64
  4105. Fext_number int32
  4106. Fext_procs uintptr
  4107. Fevent_vec [128]uintptr
  4108. Fwire_vec [128]uintptr
  4109. Flock_meaning TKeySym
  4110. Flock uintptr
  4111. Fasync_handlers uintptr
  4112. Fbigreq_size uint64
  4113. Flock_fns uintptr
  4114. Fidlist_alloc uintptr
  4115. Fkey_bindings uintptr
  4116. Fcursor_font TFont
  4117. Fatoms uintptr
  4118. Fmode_switch uint32
  4119. Fnum_lock uint32
  4120. Fcontext_db uintptr
  4121. Ferror_vec uintptr
  4122. Fcms struct {
  4123. FdefaultCCCs TXPointer
  4124. FclientCmaps TXPointer
  4125. FperVisualIntensityMaps TXPointer
  4126. }
  4127. Fim_filters uintptr
  4128. Fqfree uintptr
  4129. Fnext_event_serial_num uint64
  4130. Fflushes uintptr
  4131. Fim_fd_info uintptr
  4132. Fim_fd_length int32
  4133. Fconn_watchers uintptr
  4134. Fwatcher_count int32
  4135. Ffiledes TXPointer
  4136. Fsavedsynchandler uintptr
  4137. Fresource_max TXID
  4138. Fxcmisc_opcode int32
  4139. Fxkb_info uintptr
  4140. Ftrans_conn uintptr
  4141. Fxcb uintptr
  4142. Fnext_cookie uint32
  4143. Fgeneric_event_vec [128]uintptr
  4144. Fgeneric_event_copy_vec [128]uintptr
  4145. Fcookiejar uintptr
  4146. Ferror_threads uintptr
  4147. Fexit_handler TXIOErrorExitHandler
  4148. Fexit_handler_data uintptr
  4149. }
  4150. type TScreen = struct {
  4151. Fext_data uintptr
  4152. Fdisplay uintptr
  4153. Froot TWindow
  4154. Fwidth int32
  4155. Fheight int32
  4156. Fmwidth int32
  4157. Fmheight int32
  4158. Fndepths int32
  4159. Fdepths uintptr
  4160. Froot_depth int32
  4161. Froot_visual uintptr
  4162. Fdefault_gc TGC
  4163. Fcmap TColormap
  4164. Fwhite_pixel uint64
  4165. Fblack_pixel uint64
  4166. Fmax_maps int32
  4167. Fmin_maps int32
  4168. Fbacking_store int32
  4169. Fsave_unders int32
  4170. Froot_input_mask int64
  4171. }
  4172. type TScreenFormat = struct {
  4173. Fext_data uintptr
  4174. Fdepth int32
  4175. Fbits_per_pixel int32
  4176. Fscanline_pad int32
  4177. }
  4178. type TXSetWindowAttributes = struct {
  4179. Fbackground_pixmap TPixmap
  4180. Fbackground_pixel uint64
  4181. Fborder_pixmap TPixmap
  4182. Fborder_pixel uint64
  4183. Fbit_gravity int32
  4184. Fwin_gravity int32
  4185. Fbacking_store int32
  4186. Fbacking_planes uint64
  4187. Fbacking_pixel uint64
  4188. Fsave_under int32
  4189. Fevent_mask int64
  4190. Fdo_not_propagate_mask int64
  4191. Foverride_redirect int32
  4192. Fcolormap TColormap
  4193. Fcursor TCursor
  4194. }
  4195. type TXWindowAttributes = struct {
  4196. Fx int32
  4197. Fy int32
  4198. Fwidth int32
  4199. Fheight int32
  4200. Fborder_width int32
  4201. Fdepth int32
  4202. Fvisual uintptr
  4203. Froot TWindow
  4204. Fclass int32
  4205. Fbit_gravity int32
  4206. Fwin_gravity int32
  4207. Fbacking_store int32
  4208. Fbacking_planes uint64
  4209. Fbacking_pixel uint64
  4210. Fsave_under int32
  4211. Fcolormap TColormap
  4212. Fmap_installed int32
  4213. Fmap_state int32
  4214. Fall_event_masks int64
  4215. Fyour_event_mask int64
  4216. Fdo_not_propagate_mask int64
  4217. Foverride_redirect int32
  4218. Fscreen uintptr
  4219. }
  4220. type TXHostAddress = struct {
  4221. Ffamily int32
  4222. Flength int32
  4223. Faddress uintptr
  4224. }
  4225. type TXServerInterpretedAddress = struct {
  4226. Ftypelength int32
  4227. Fvaluelength int32
  4228. Ftype1 uintptr
  4229. Fvalue uintptr
  4230. }
  4231. type TXImage = struct {
  4232. Fwidth int32
  4233. Fheight int32
  4234. Fxoffset int32
  4235. Fformat int32
  4236. Fdata uintptr
  4237. Fbyte_order int32
  4238. Fbitmap_unit int32
  4239. Fbitmap_bit_order int32
  4240. Fbitmap_pad int32
  4241. Fdepth int32
  4242. Fbytes_per_line int32
  4243. Fbits_per_pixel int32
  4244. Fred_mask uint64
  4245. Fgreen_mask uint64
  4246. Fblue_mask uint64
  4247. Fobdata TXPointer
  4248. Ff Tfuncs
  4249. }
  4250. type T_XImage = TXImage
  4251. type TXWindowChanges = struct {
  4252. Fx int32
  4253. Fy int32
  4254. Fwidth int32
  4255. Fheight int32
  4256. Fborder_width int32
  4257. Fsibling TWindow
  4258. Fstack_mode int32
  4259. }
  4260. type TXColor = struct {
  4261. Fpixel uint64
  4262. Fred uint16
  4263. Fgreen uint16
  4264. Fblue uint16
  4265. Fflags int8
  4266. Fpad int8
  4267. }
  4268. type TXSegment = struct {
  4269. Fx1 int16
  4270. Fy1 int16
  4271. Fx2 int16
  4272. Fy2 int16
  4273. }
  4274. type TXPoint = struct {
  4275. Fx int16
  4276. Fy int16
  4277. }
  4278. type TXRectangle = struct {
  4279. Fx int16
  4280. Fy int16
  4281. Fwidth uint16
  4282. Fheight uint16
  4283. }
  4284. type TXArc = struct {
  4285. Fx int16
  4286. Fy int16
  4287. Fwidth uint16
  4288. Fheight uint16
  4289. Fangle1 int16
  4290. Fangle2 int16
  4291. }
  4292. type TXKeyboardControl = struct {
  4293. Fkey_click_percent int32
  4294. Fbell_percent int32
  4295. Fbell_pitch int32
  4296. Fbell_duration int32
  4297. Fled int32
  4298. Fled_mode int32
  4299. Fkey int32
  4300. Fauto_repeat_mode int32
  4301. }
  4302. type TXKeyboardState = struct {
  4303. Fkey_click_percent int32
  4304. Fbell_percent int32
  4305. Fbell_pitch uint32
  4306. Fbell_duration uint32
  4307. Fled_mask uint64
  4308. Fglobal_auto_repeat int32
  4309. Fauto_repeats [32]int8
  4310. }
  4311. type TXTimeCoord = struct {
  4312. Ftime TTime
  4313. Fx int16
  4314. Fy int16
  4315. }
  4316. type TXModifierKeymap = struct {
  4317. Fmax_keypermod int32
  4318. Fmodifiermap uintptr
  4319. }
  4320. type TDisplay = struct {
  4321. Fext_data uintptr
  4322. Ffree_funcs uintptr
  4323. Ffd int32
  4324. Fconn_checker int32
  4325. Fproto_major_version int32
  4326. Fproto_minor_version int32
  4327. Fvendor uintptr
  4328. Fresource_base TXID
  4329. Fresource_mask TXID
  4330. Fresource_id TXID
  4331. Fresource_shift int32
  4332. Fresource_alloc uintptr
  4333. Fbyte_order int32
  4334. Fbitmap_unit int32
  4335. Fbitmap_pad int32
  4336. Fbitmap_bit_order int32
  4337. Fnformats int32
  4338. Fpixmap_format uintptr
  4339. Fvnumber int32
  4340. Frelease int32
  4341. Fhead uintptr
  4342. Ftail uintptr
  4343. Fqlen int32
  4344. Flast_request_read uint64
  4345. Frequest uint64
  4346. Flast_req uintptr
  4347. Fbuffer uintptr
  4348. Fbufptr uintptr
  4349. Fbufmax uintptr
  4350. Fmax_request_size uint32
  4351. Fdb uintptr
  4352. Fsynchandler uintptr
  4353. Fdisplay_name uintptr
  4354. Fdefault_screen int32
  4355. Fnscreens int32
  4356. Fscreens uintptr
  4357. Fmotion_buffer uint64
  4358. Fflags uint64
  4359. Fmin_keycode int32
  4360. Fmax_keycode int32
  4361. Fkeysyms uintptr
  4362. Fmodifiermap uintptr
  4363. Fkeysyms_per_keycode int32
  4364. Fxdefaults uintptr
  4365. Fscratch_buffer uintptr
  4366. Fscratch_length uint64
  4367. Fext_number int32
  4368. Fext_procs uintptr
  4369. Fevent_vec [128]uintptr
  4370. Fwire_vec [128]uintptr
  4371. Flock_meaning TKeySym
  4372. Flock uintptr
  4373. Fasync_handlers uintptr
  4374. Fbigreq_size uint64
  4375. Flock_fns uintptr
  4376. Fidlist_alloc uintptr
  4377. Fkey_bindings uintptr
  4378. Fcursor_font TFont
  4379. Fatoms uintptr
  4380. Fmode_switch uint32
  4381. Fnum_lock uint32
  4382. Fcontext_db uintptr
  4383. Ferror_vec uintptr
  4384. Fcms struct {
  4385. FdefaultCCCs TXPointer
  4386. FclientCmaps TXPointer
  4387. FperVisualIntensityMaps TXPointer
  4388. }
  4389. Fim_filters uintptr
  4390. Fqfree uintptr
  4391. Fnext_event_serial_num uint64
  4392. Fflushes uintptr
  4393. Fim_fd_info uintptr
  4394. Fim_fd_length int32
  4395. Fconn_watchers uintptr
  4396. Fwatcher_count int32
  4397. Ffiledes TXPointer
  4398. Fsavedsynchandler uintptr
  4399. Fresource_max TXID
  4400. Fxcmisc_opcode int32
  4401. Fxkb_info uintptr
  4402. Ftrans_conn uintptr
  4403. Fxcb uintptr
  4404. Fnext_cookie uint32
  4405. Fgeneric_event_vec [128]uintptr
  4406. Fgeneric_event_copy_vec [128]uintptr
  4407. Fcookiejar uintptr
  4408. Ferror_threads uintptr
  4409. Fexit_handler TXIOErrorExitHandler
  4410. Fexit_handler_data uintptr
  4411. }
  4412. type T_XPrivDisplay = uintptr
  4413. type TXKeyEvent = struct {
  4414. Ftype1 int32
  4415. Fserial uint64
  4416. Fsend_event int32
  4417. Fdisplay uintptr
  4418. Fwindow TWindow
  4419. Froot TWindow
  4420. Fsubwindow TWindow
  4421. Ftime TTime
  4422. Fx int32
  4423. Fy int32
  4424. Fx_root int32
  4425. Fy_root int32
  4426. Fstate uint32
  4427. Fkeycode uint32
  4428. Fsame_screen int32
  4429. }
  4430. type TXKeyPressedEvent = struct {
  4431. Ftype1 int32
  4432. Fserial uint64
  4433. Fsend_event int32
  4434. Fdisplay uintptr
  4435. Fwindow TWindow
  4436. Froot TWindow
  4437. Fsubwindow TWindow
  4438. Ftime TTime
  4439. Fx int32
  4440. Fy int32
  4441. Fx_root int32
  4442. Fy_root int32
  4443. Fstate uint32
  4444. Fkeycode uint32
  4445. Fsame_screen int32
  4446. }
  4447. type TXKeyReleasedEvent = struct {
  4448. Ftype1 int32
  4449. Fserial uint64
  4450. Fsend_event int32
  4451. Fdisplay uintptr
  4452. Fwindow TWindow
  4453. Froot TWindow
  4454. Fsubwindow TWindow
  4455. Ftime TTime
  4456. Fx int32
  4457. Fy int32
  4458. Fx_root int32
  4459. Fy_root int32
  4460. Fstate uint32
  4461. Fkeycode uint32
  4462. Fsame_screen int32
  4463. }
  4464. type TXButtonEvent = struct {
  4465. Ftype1 int32
  4466. Fserial uint64
  4467. Fsend_event int32
  4468. Fdisplay uintptr
  4469. Fwindow TWindow
  4470. Froot TWindow
  4471. Fsubwindow TWindow
  4472. Ftime TTime
  4473. Fx int32
  4474. Fy int32
  4475. Fx_root int32
  4476. Fy_root int32
  4477. Fstate uint32
  4478. Fbutton uint32
  4479. Fsame_screen int32
  4480. }
  4481. type TXButtonPressedEvent = struct {
  4482. Ftype1 int32
  4483. Fserial uint64
  4484. Fsend_event int32
  4485. Fdisplay uintptr
  4486. Fwindow TWindow
  4487. Froot TWindow
  4488. Fsubwindow TWindow
  4489. Ftime TTime
  4490. Fx int32
  4491. Fy int32
  4492. Fx_root int32
  4493. Fy_root int32
  4494. Fstate uint32
  4495. Fbutton uint32
  4496. Fsame_screen int32
  4497. }
  4498. type TXButtonReleasedEvent = struct {
  4499. Ftype1 int32
  4500. Fserial uint64
  4501. Fsend_event int32
  4502. Fdisplay uintptr
  4503. Fwindow TWindow
  4504. Froot TWindow
  4505. Fsubwindow TWindow
  4506. Ftime TTime
  4507. Fx int32
  4508. Fy int32
  4509. Fx_root int32
  4510. Fy_root int32
  4511. Fstate uint32
  4512. Fbutton uint32
  4513. Fsame_screen int32
  4514. }
  4515. type TXMotionEvent = struct {
  4516. Ftype1 int32
  4517. Fserial uint64
  4518. Fsend_event int32
  4519. Fdisplay uintptr
  4520. Fwindow TWindow
  4521. Froot TWindow
  4522. Fsubwindow TWindow
  4523. Ftime TTime
  4524. Fx int32
  4525. Fy int32
  4526. Fx_root int32
  4527. Fy_root int32
  4528. Fstate uint32
  4529. Fis_hint int8
  4530. Fsame_screen int32
  4531. }
  4532. type TXPointerMovedEvent = struct {
  4533. Ftype1 int32
  4534. Fserial uint64
  4535. Fsend_event int32
  4536. Fdisplay uintptr
  4537. Fwindow TWindow
  4538. Froot TWindow
  4539. Fsubwindow TWindow
  4540. Ftime TTime
  4541. Fx int32
  4542. Fy int32
  4543. Fx_root int32
  4544. Fy_root int32
  4545. Fstate uint32
  4546. Fis_hint int8
  4547. Fsame_screen int32
  4548. }
  4549. type TXCrossingEvent = struct {
  4550. Ftype1 int32
  4551. Fserial uint64
  4552. Fsend_event int32
  4553. Fdisplay uintptr
  4554. Fwindow TWindow
  4555. Froot TWindow
  4556. Fsubwindow TWindow
  4557. Ftime TTime
  4558. Fx int32
  4559. Fy int32
  4560. Fx_root int32
  4561. Fy_root int32
  4562. Fmode int32
  4563. Fdetail int32
  4564. Fsame_screen int32
  4565. Ffocus int32
  4566. Fstate uint32
  4567. }
  4568. type TXEnterWindowEvent = struct {
  4569. Ftype1 int32
  4570. Fserial uint64
  4571. Fsend_event int32
  4572. Fdisplay uintptr
  4573. Fwindow TWindow
  4574. Froot TWindow
  4575. Fsubwindow TWindow
  4576. Ftime TTime
  4577. Fx int32
  4578. Fy int32
  4579. Fx_root int32
  4580. Fy_root int32
  4581. Fmode int32
  4582. Fdetail int32
  4583. Fsame_screen int32
  4584. Ffocus int32
  4585. Fstate uint32
  4586. }
  4587. type TXLeaveWindowEvent = struct {
  4588. Ftype1 int32
  4589. Fserial uint64
  4590. Fsend_event int32
  4591. Fdisplay uintptr
  4592. Fwindow TWindow
  4593. Froot TWindow
  4594. Fsubwindow TWindow
  4595. Ftime TTime
  4596. Fx int32
  4597. Fy int32
  4598. Fx_root int32
  4599. Fy_root int32
  4600. Fmode int32
  4601. Fdetail int32
  4602. Fsame_screen int32
  4603. Ffocus int32
  4604. Fstate uint32
  4605. }
  4606. type TXFocusChangeEvent = struct {
  4607. Ftype1 int32
  4608. Fserial uint64
  4609. Fsend_event int32
  4610. Fdisplay uintptr
  4611. Fwindow TWindow
  4612. Fmode int32
  4613. Fdetail int32
  4614. }
  4615. type TXFocusInEvent = struct {
  4616. Ftype1 int32
  4617. Fserial uint64
  4618. Fsend_event int32
  4619. Fdisplay uintptr
  4620. Fwindow TWindow
  4621. Fmode int32
  4622. Fdetail int32
  4623. }
  4624. type TXFocusOutEvent = struct {
  4625. Ftype1 int32
  4626. Fserial uint64
  4627. Fsend_event int32
  4628. Fdisplay uintptr
  4629. Fwindow TWindow
  4630. Fmode int32
  4631. Fdetail int32
  4632. }
  4633. type TXKeymapEvent = struct {
  4634. Ftype1 int32
  4635. Fserial uint64
  4636. Fsend_event int32
  4637. Fdisplay uintptr
  4638. Fwindow TWindow
  4639. Fkey_vector [32]int8
  4640. }
  4641. type TXExposeEvent = struct {
  4642. Ftype1 int32
  4643. Fserial uint64
  4644. Fsend_event int32
  4645. Fdisplay uintptr
  4646. Fwindow TWindow
  4647. Fx int32
  4648. Fy int32
  4649. Fwidth int32
  4650. Fheight int32
  4651. Fcount int32
  4652. }
  4653. type TXGraphicsExposeEvent = struct {
  4654. Ftype1 int32
  4655. Fserial uint64
  4656. Fsend_event int32
  4657. Fdisplay uintptr
  4658. Fdrawable TDrawable
  4659. Fx int32
  4660. Fy int32
  4661. Fwidth int32
  4662. Fheight int32
  4663. Fcount int32
  4664. Fmajor_code int32
  4665. Fminor_code int32
  4666. }
  4667. type TXNoExposeEvent = struct {
  4668. Ftype1 int32
  4669. Fserial uint64
  4670. Fsend_event int32
  4671. Fdisplay uintptr
  4672. Fdrawable TDrawable
  4673. Fmajor_code int32
  4674. Fminor_code int32
  4675. }
  4676. type TXVisibilityEvent = struct {
  4677. Ftype1 int32
  4678. Fserial uint64
  4679. Fsend_event int32
  4680. Fdisplay uintptr
  4681. Fwindow TWindow
  4682. Fstate int32
  4683. }
  4684. type TXCreateWindowEvent = struct {
  4685. Ftype1 int32
  4686. Fserial uint64
  4687. Fsend_event int32
  4688. Fdisplay uintptr
  4689. Fparent TWindow
  4690. Fwindow TWindow
  4691. Fx int32
  4692. Fy int32
  4693. Fwidth int32
  4694. Fheight int32
  4695. Fborder_width int32
  4696. Foverride_redirect int32
  4697. }
  4698. type TXDestroyWindowEvent = struct {
  4699. Ftype1 int32
  4700. Fserial uint64
  4701. Fsend_event int32
  4702. Fdisplay uintptr
  4703. Fevent TWindow
  4704. Fwindow TWindow
  4705. }
  4706. type TXUnmapEvent = struct {
  4707. Ftype1 int32
  4708. Fserial uint64
  4709. Fsend_event int32
  4710. Fdisplay uintptr
  4711. Fevent TWindow
  4712. Fwindow TWindow
  4713. Ffrom_configure int32
  4714. }
  4715. type TXMapEvent = struct {
  4716. Ftype1 int32
  4717. Fserial uint64
  4718. Fsend_event int32
  4719. Fdisplay uintptr
  4720. Fevent TWindow
  4721. Fwindow TWindow
  4722. Foverride_redirect int32
  4723. }
  4724. type TXMapRequestEvent = struct {
  4725. Ftype1 int32
  4726. Fserial uint64
  4727. Fsend_event int32
  4728. Fdisplay uintptr
  4729. Fparent TWindow
  4730. Fwindow TWindow
  4731. }
  4732. type TXReparentEvent = struct {
  4733. Ftype1 int32
  4734. Fserial uint64
  4735. Fsend_event int32
  4736. Fdisplay uintptr
  4737. Fevent TWindow
  4738. Fwindow TWindow
  4739. Fparent TWindow
  4740. Fx int32
  4741. Fy int32
  4742. Foverride_redirect int32
  4743. }
  4744. type TXConfigureEvent = struct {
  4745. Ftype1 int32
  4746. Fserial uint64
  4747. Fsend_event int32
  4748. Fdisplay uintptr
  4749. Fevent TWindow
  4750. Fwindow TWindow
  4751. Fx int32
  4752. Fy int32
  4753. Fwidth int32
  4754. Fheight int32
  4755. Fborder_width int32
  4756. Fabove TWindow
  4757. Foverride_redirect int32
  4758. }
  4759. type TXGravityEvent = struct {
  4760. Ftype1 int32
  4761. Fserial uint64
  4762. Fsend_event int32
  4763. Fdisplay uintptr
  4764. Fevent TWindow
  4765. Fwindow TWindow
  4766. Fx int32
  4767. Fy int32
  4768. }
  4769. type TXResizeRequestEvent = struct {
  4770. Ftype1 int32
  4771. Fserial uint64
  4772. Fsend_event int32
  4773. Fdisplay uintptr
  4774. Fwindow TWindow
  4775. Fwidth int32
  4776. Fheight int32
  4777. }
  4778. type TXConfigureRequestEvent = struct {
  4779. Ftype1 int32
  4780. Fserial uint64
  4781. Fsend_event int32
  4782. Fdisplay uintptr
  4783. Fparent TWindow
  4784. Fwindow TWindow
  4785. Fx int32
  4786. Fy int32
  4787. Fwidth int32
  4788. Fheight int32
  4789. Fborder_width int32
  4790. Fabove TWindow
  4791. Fdetail int32
  4792. Fvalue_mask uint64
  4793. }
  4794. type TXCirculateEvent = struct {
  4795. Ftype1 int32
  4796. Fserial uint64
  4797. Fsend_event int32
  4798. Fdisplay uintptr
  4799. Fevent TWindow
  4800. Fwindow TWindow
  4801. Fplace int32
  4802. }
  4803. type TXCirculateRequestEvent = struct {
  4804. Ftype1 int32
  4805. Fserial uint64
  4806. Fsend_event int32
  4807. Fdisplay uintptr
  4808. Fparent TWindow
  4809. Fwindow TWindow
  4810. Fplace int32
  4811. }
  4812. type TXPropertyEvent = struct {
  4813. Ftype1 int32
  4814. Fserial uint64
  4815. Fsend_event int32
  4816. Fdisplay uintptr
  4817. Fwindow TWindow
  4818. Fatom TAtom
  4819. Ftime TTime
  4820. Fstate int32
  4821. }
  4822. type TXSelectionClearEvent = struct {
  4823. Ftype1 int32
  4824. Fserial uint64
  4825. Fsend_event int32
  4826. Fdisplay uintptr
  4827. Fwindow TWindow
  4828. Fselection TAtom
  4829. Ftime TTime
  4830. }
  4831. type TXSelectionRequestEvent = struct {
  4832. Ftype1 int32
  4833. Fserial uint64
  4834. Fsend_event int32
  4835. Fdisplay uintptr
  4836. Fowner TWindow
  4837. Frequestor TWindow
  4838. Fselection TAtom
  4839. Ftarget TAtom
  4840. Fproperty TAtom
  4841. Ftime TTime
  4842. }
  4843. type TXSelectionEvent = struct {
  4844. Ftype1 int32
  4845. Fserial uint64
  4846. Fsend_event int32
  4847. Fdisplay uintptr
  4848. Frequestor TWindow
  4849. Fselection TAtom
  4850. Ftarget TAtom
  4851. Fproperty TAtom
  4852. Ftime TTime
  4853. }
  4854. type TXColormapEvent = struct {
  4855. Ftype1 int32
  4856. Fserial uint64
  4857. Fsend_event int32
  4858. Fdisplay uintptr
  4859. Fwindow TWindow
  4860. Fcolormap TColormap
  4861. Fnew1 int32
  4862. Fstate int32
  4863. }
  4864. type TXClientMessageEvent = struct {
  4865. Ftype1 int32
  4866. Fserial uint64
  4867. Fsend_event int32
  4868. Fdisplay uintptr
  4869. Fwindow TWindow
  4870. Fmessage_type TAtom
  4871. Fformat int32
  4872. Fdata struct {
  4873. Fs [0][10]int16
  4874. Fl [0][5]int64
  4875. Fb [20]int8
  4876. F__ccgo_pad3 [20]byte
  4877. }
  4878. }
  4879. type TXMappingEvent = struct {
  4880. Ftype1 int32
  4881. Fserial uint64
  4882. Fsend_event int32
  4883. Fdisplay uintptr
  4884. Fwindow TWindow
  4885. Frequest int32
  4886. Ffirst_keycode int32
  4887. Fcount int32
  4888. }
  4889. type TXErrorEvent = struct {
  4890. Ftype1 int32
  4891. Fdisplay uintptr
  4892. Fresourceid TXID
  4893. Fserial uint64
  4894. Ferror_code uint8
  4895. Frequest_code uint8
  4896. Fminor_code uint8
  4897. }
  4898. type TXAnyEvent = struct {
  4899. Ftype1 int32
  4900. Fserial uint64
  4901. Fsend_event int32
  4902. Fdisplay uintptr
  4903. Fwindow TWindow
  4904. }
  4905. type TXGenericEvent = struct {
  4906. Ftype1 int32
  4907. Fserial uint64
  4908. Fsend_event int32
  4909. Fdisplay uintptr
  4910. Fextension int32
  4911. Fevtype int32
  4912. }
  4913. type TXGenericEventCookie = struct {
  4914. Ftype1 int32
  4915. Fserial uint64
  4916. Fsend_event int32
  4917. Fdisplay uintptr
  4918. Fextension int32
  4919. Fevtype int32
  4920. Fcookie uint32
  4921. Fdata uintptr
  4922. }
  4923. type TXEvent = struct {
  4924. Fxany [0]TXAnyEvent
  4925. Fxkey [0]TXKeyEvent
  4926. Fxbutton [0]TXButtonEvent
  4927. Fxmotion [0]TXMotionEvent
  4928. Fxcrossing [0]TXCrossingEvent
  4929. Fxfocus [0]TXFocusChangeEvent
  4930. Fxexpose [0]TXExposeEvent
  4931. Fxgraphicsexpose [0]TXGraphicsExposeEvent
  4932. Fxnoexpose [0]TXNoExposeEvent
  4933. Fxvisibility [0]TXVisibilityEvent
  4934. Fxcreatewindow [0]TXCreateWindowEvent
  4935. Fxdestroywindow [0]TXDestroyWindowEvent
  4936. Fxunmap [0]TXUnmapEvent
  4937. Fxmap [0]TXMapEvent
  4938. Fxmaprequest [0]TXMapRequestEvent
  4939. Fxreparent [0]TXReparentEvent
  4940. Fxconfigure [0]TXConfigureEvent
  4941. Fxgravity [0]TXGravityEvent
  4942. Fxresizerequest [0]TXResizeRequestEvent
  4943. Fxconfigurerequest [0]TXConfigureRequestEvent
  4944. Fxcirculate [0]TXCirculateEvent
  4945. Fxcirculaterequest [0]TXCirculateRequestEvent
  4946. Fxproperty [0]TXPropertyEvent
  4947. Fxselectionclear [0]TXSelectionClearEvent
  4948. Fxselectionrequest [0]TXSelectionRequestEvent
  4949. Fxselection [0]TXSelectionEvent
  4950. Fxcolormap [0]TXColormapEvent
  4951. Fxclient [0]TXClientMessageEvent
  4952. Fxmapping [0]TXMappingEvent
  4953. Fxerror [0]TXErrorEvent
  4954. Fxkeymap [0]TXKeymapEvent
  4955. Fxgeneric [0]TXGenericEvent
  4956. Fxcookie [0]TXGenericEventCookie
  4957. Fpad [0][24]int64
  4958. Ftype1 int32
  4959. F__ccgo_pad35 [188]byte
  4960. }
  4961. type T_XEvent = TXEvent
  4962. type TXCharStruct = struct {
  4963. Flbearing int16
  4964. Frbearing int16
  4965. Fwidth int16
  4966. Fascent int16
  4967. Fdescent int16
  4968. Fattributes uint16
  4969. }
  4970. type TXFontProp = struct {
  4971. Fname TAtom
  4972. Fcard32 uint64
  4973. }
  4974. type TXFontStruct = struct {
  4975. Fext_data uintptr
  4976. Ffid TFont
  4977. Fdirection uint32
  4978. Fmin_char_or_byte2 uint32
  4979. Fmax_char_or_byte2 uint32
  4980. Fmin_byte1 uint32
  4981. Fmax_byte1 uint32
  4982. Fall_chars_exist int32
  4983. Fdefault_char uint32
  4984. Fn_properties int32
  4985. Fproperties uintptr
  4986. Fmin_bounds TXCharStruct
  4987. Fmax_bounds TXCharStruct
  4988. Fper_char uintptr
  4989. Fascent int32
  4990. Fdescent int32
  4991. }
  4992. type TXTextItem = struct {
  4993. Fchars uintptr
  4994. Fnchars int32
  4995. Fdelta int32
  4996. Ffont TFont
  4997. }
  4998. type TXChar2b = struct {
  4999. Fbyte1 uint8
  5000. Fbyte2 uint8
  5001. }
  5002. type TXTextItem16 = struct {
  5003. Fchars uintptr
  5004. Fnchars int32
  5005. Fdelta int32
  5006. Ffont TFont
  5007. }
  5008. type TXEDataObject = struct {
  5009. Fgc [0]TGC
  5010. Fvisual [0]uintptr
  5011. Fscreen [0]uintptr
  5012. Fpixmap_format [0]uintptr
  5013. Ffont [0]uintptr
  5014. Fdisplay uintptr
  5015. }
  5016. type TXFontSetExtents = struct {
  5017. Fmax_ink_extent TXRectangle
  5018. Fmax_logical_extent TXRectangle
  5019. }
  5020. type TXOM = uintptr
  5021. type TXOC = uintptr
  5022. type TXFontSet = uintptr
  5023. type TXmbTextItem = struct {
  5024. Fchars uintptr
  5025. Fnchars int32
  5026. Fdelta int32
  5027. Ffont_set TXFontSet
  5028. }
  5029. type TXwcTextItem = struct {
  5030. Fchars uintptr
  5031. Fnchars int32
  5032. Fdelta int32
  5033. Ffont_set TXFontSet
  5034. }
  5035. type TXOMCharSetList = struct {
  5036. Fcharset_count int32
  5037. Fcharset_list uintptr
  5038. }
  5039. type TXOrientation = int32
  5040. const _XOMOrientation_LTR_TTB = 0
  5041. const _XOMOrientation_RTL_TTB = 1
  5042. const _XOMOrientation_TTB_LTR = 2
  5043. const _XOMOrientation_TTB_RTL = 3
  5044. const _XOMOrientation_Context = 4
  5045. type TXOMOrientation = struct {
  5046. Fnum_orientation int32
  5047. Forientation uintptr
  5048. }
  5049. type TXOMFontInfo = struct {
  5050. Fnum_font int32
  5051. Ffont_struct_list uintptr
  5052. Ffont_name_list uintptr
  5053. }
  5054. type TXIM = uintptr
  5055. type TXIC = uintptr
  5056. type TXIMProc = uintptr
  5057. type TXICProc = uintptr
  5058. type TXIDProc = uintptr
  5059. type TXIMStyle = uint64
  5060. type TXIMStyles = struct {
  5061. Fcount_styles uint16
  5062. Fsupported_styles uintptr
  5063. }
  5064. type TXVaNestedList = uintptr
  5065. type TXIMCallback = struct {
  5066. Fclient_data TXPointer
  5067. Fcallback TXIMProc
  5068. }
  5069. type TXICCallback = struct {
  5070. Fclient_data TXPointer
  5071. Fcallback TXICProc
  5072. }
  5073. type TXIMFeedback = uint64
  5074. type TXIMText = struct {
  5075. Flength uint16
  5076. Ffeedback uintptr
  5077. Fencoding_is_wchar int32
  5078. Fstring1 struct {
  5079. Fwide_char [0]uintptr
  5080. Fmulti_byte uintptr
  5081. }
  5082. }
  5083. type T_XIMText = TXIMText
  5084. type TXIMPreeditState = uint64
  5085. type TXIMPreeditStateNotifyCallbackStruct = struct {
  5086. Fstate TXIMPreeditState
  5087. }
  5088. type T_XIMPreeditStateNotifyCallbackStruct = TXIMPreeditStateNotifyCallbackStruct
  5089. type TXIMResetState = uint64
  5090. type TXIMStringConversionFeedback = uint64
  5091. type TXIMStringConversionText = struct {
  5092. Flength uint16
  5093. Ffeedback uintptr
  5094. Fencoding_is_wchar int32
  5095. Fstring1 struct {
  5096. Fwcs [0]uintptr
  5097. Fmbs uintptr
  5098. }
  5099. }
  5100. type T_XIMStringConversionText = TXIMStringConversionText
  5101. type TXIMStringConversionPosition = uint16
  5102. type TXIMStringConversionType = uint16
  5103. type TXIMStringConversionOperation = uint16
  5104. type TXIMCaretDirection = int32
  5105. const _XIMForwardChar = 0
  5106. const _XIMBackwardChar = 1
  5107. const _XIMForwardWord = 2
  5108. const _XIMBackwardWord = 3
  5109. const _XIMCaretUp = 4
  5110. const _XIMCaretDown = 5
  5111. const _XIMNextLine = 6
  5112. const _XIMPreviousLine = 7
  5113. const _XIMLineStart = 8
  5114. const _XIMLineEnd = 9
  5115. const _XIMAbsolutePosition = 10
  5116. const _XIMDontChange = 11
  5117. type TXIMStringConversionCallbackStruct = struct {
  5118. Fposition TXIMStringConversionPosition
  5119. Fdirection TXIMCaretDirection
  5120. Foperation TXIMStringConversionOperation
  5121. Ffactor uint16
  5122. Ftext uintptr
  5123. }
  5124. type T_XIMStringConversionCallbackStruct = TXIMStringConversionCallbackStruct
  5125. type TXIMPreeditDrawCallbackStruct = struct {
  5126. Fcaret int32
  5127. Fchg_first int32
  5128. Fchg_length int32
  5129. Ftext uintptr
  5130. }
  5131. type T_XIMPreeditDrawCallbackStruct = TXIMPreeditDrawCallbackStruct
  5132. type TXIMCaretStyle = int32
  5133. const _XIMIsInvisible = 0
  5134. const _XIMIsPrimary = 1
  5135. const _XIMIsSecondary = 2
  5136. type TXIMPreeditCaretCallbackStruct = struct {
  5137. Fposition int32
  5138. Fdirection TXIMCaretDirection
  5139. Fstyle TXIMCaretStyle
  5140. }
  5141. type T_XIMPreeditCaretCallbackStruct = TXIMPreeditCaretCallbackStruct
  5142. type TXIMStatusDataType = int32
  5143. const _XIMTextType = 0
  5144. const _XIMBitmapType = 1
  5145. type TXIMStatusDrawCallbackStruct = struct {
  5146. Ftype1 TXIMStatusDataType
  5147. Fdata struct {
  5148. Fbitmap [0]TPixmap
  5149. Ftext uintptr
  5150. }
  5151. }
  5152. type T_XIMStatusDrawCallbackStruct = TXIMStatusDrawCallbackStruct
  5153. type TXIMHotKeyTrigger = struct {
  5154. Fkeysym TKeySym
  5155. Fmodifier int32
  5156. Fmodifier_mask int32
  5157. }
  5158. type T_XIMHotKeyTrigger = TXIMHotKeyTrigger
  5159. type TXIMHotKeyTriggers = struct {
  5160. Fnum_hot_key int32
  5161. Fkey uintptr
  5162. }
  5163. type T_XIMHotKeyTriggers = TXIMHotKeyTriggers
  5164. type TXIMHotKeyState = uint64
  5165. type TXIMValuesList = struct {
  5166. Fcount_values uint16
  5167. Fsupported_values uintptr
  5168. }
  5169. type TXErrorHandler = uintptr
  5170. type TXIOErrorHandler = uintptr
  5171. type TXIOErrorExitHandler = uintptr
  5172. type TXConnectionWatchProc = uintptr
  5173. type TXSizeHints = struct {
  5174. Fflags int64
  5175. Fx int32
  5176. Fy int32
  5177. Fwidth int32
  5178. Fheight int32
  5179. Fmin_width int32
  5180. Fmin_height int32
  5181. Fmax_width int32
  5182. Fmax_height int32
  5183. Fwidth_inc int32
  5184. Fheight_inc int32
  5185. Fmin_aspect struct {
  5186. Fx int32
  5187. Fy int32
  5188. }
  5189. Fmax_aspect struct {
  5190. Fx int32
  5191. Fy int32
  5192. }
  5193. Fbase_width int32
  5194. Fbase_height int32
  5195. Fwin_gravity int32
  5196. }
  5197. type TXWMHints = struct {
  5198. Fflags int64
  5199. Finput int32
  5200. Finitial_state int32
  5201. Ficon_pixmap TPixmap
  5202. Ficon_window TWindow
  5203. Ficon_x int32
  5204. Ficon_y int32
  5205. Ficon_mask TPixmap
  5206. Fwindow_group TXID
  5207. }
  5208. type TXTextProperty = struct {
  5209. Fvalue uintptr
  5210. Fencoding TAtom
  5211. Fformat int32
  5212. Fnitems uint64
  5213. }
  5214. type TXICCEncodingStyle = int32
  5215. const _XStringStyle = 0
  5216. const _XCompoundTextStyle = 1
  5217. const _XTextStyle = 2
  5218. const _XStdICCTextStyle = 3
  5219. const _XUTF8StringStyle = 4
  5220. type TXIconSize = struct {
  5221. Fmin_width int32
  5222. Fmin_height int32
  5223. Fmax_width int32
  5224. Fmax_height int32
  5225. Fwidth_inc int32
  5226. Fheight_inc int32
  5227. }
  5228. type TXClassHint = struct {
  5229. Fres_name uintptr
  5230. Fres_class uintptr
  5231. }
  5232. type TXComposeStatus = struct {
  5233. Fcompose_ptr TXPointer
  5234. Fchars_matched int32
  5235. }
  5236. type T_XComposeStatus = TXComposeStatus
  5237. type TRegion = uintptr
  5238. type TXVisualInfo = struct {
  5239. Fvisual uintptr
  5240. Fvisualid TVisualID
  5241. Fscreen int32
  5242. Fdepth int32
  5243. Fclass int32
  5244. Fred_mask uint64
  5245. Fgreen_mask uint64
  5246. Fblue_mask uint64
  5247. Fcolormap_size int32
  5248. Fbits_per_rgb int32
  5249. }
  5250. type TXStandardColormap = struct {
  5251. Fcolormap TColormap
  5252. Fred_max uint64
  5253. Fred_mult uint64
  5254. Fgreen_max uint64
  5255. Fgreen_mult uint64
  5256. Fblue_max uint64
  5257. Fblue_mult uint64
  5258. Fbase_pixel uint64
  5259. Fvisualid TVisualID
  5260. Fkillid TXID
  5261. }
  5262. type TXContext = int32
  5263. type TINT64 = int64
  5264. type TINT32 = int32
  5265. type TINT16 = int16
  5266. type TINT8 = int8
  5267. type TCARD64 = uint64
  5268. type TCARD32 = uint32
  5269. type TCARD16 = uint16
  5270. type TCARD8 = uint8
  5271. type TBITS32 = uint32
  5272. type TBITS16 = uint16
  5273. type TBYTE = uint8
  5274. type TBOOL = uint8
  5275. type Tuintptr_t = uint64
  5276. type Tintptr_t = int64
  5277. type Tintmax_t = int64
  5278. type Tuint8_t = uint8
  5279. type Tuintmax_t = uint64
  5280. type Tint_fast8_t = int8
  5281. type Tint_fast64_t = int64
  5282. type Tint_least8_t = int8
  5283. type Tint_least16_t = int16
  5284. type Tint_least32_t = int32
  5285. type Tint_least64_t = int64
  5286. type Tuint_fast8_t = uint8
  5287. type Tuint_fast64_t = uint64
  5288. type Tuint_least8_t = uint8
  5289. type Tuint_least16_t = uint16
  5290. type Tuint_least32_t = uint32
  5291. type Tuint_least64_t = uint64
  5292. type Tint_fast16_t = int32
  5293. type Tint_fast32_t = int32
  5294. type Tuint_fast16_t = uint32
  5295. type Tuint_fast32_t = uint32
  5296. type TxSegment = struct {
  5297. Fx1 TINT16
  5298. Fy1 TINT16
  5299. Fx2 TINT16
  5300. Fy2 TINT16
  5301. }
  5302. type T_xSegment = TxSegment
  5303. type TxPoint = struct {
  5304. Fx TINT16
  5305. Fy TINT16
  5306. }
  5307. type T_xPoint = TxPoint
  5308. type TxRectangle = struct {
  5309. Fx TINT16
  5310. Fy TINT16
  5311. Fwidth TCARD16
  5312. Fheight TCARD16
  5313. }
  5314. type T_xRectangle = TxRectangle
  5315. type TxArc = struct {
  5316. Fx TINT16
  5317. Fy TINT16
  5318. Fwidth TCARD16
  5319. Fheight TCARD16
  5320. Fangle1 TINT16
  5321. Fangle2 TINT16
  5322. }
  5323. type T_xArc = TxArc
  5324. type TKeyButMask = uint16
  5325. type TxConnClientPrefix = struct {
  5326. FbyteOrder TCARD8
  5327. Fpad TBYTE
  5328. FmajorVersion TCARD16
  5329. FminorVersion TCARD16
  5330. FnbytesAuthProto TCARD16
  5331. FnbytesAuthString TCARD16
  5332. Fpad2 TCARD16
  5333. }
  5334. type TxConnSetupPrefix = struct {
  5335. Fsuccess TCARD8
  5336. FlengthReason TBYTE
  5337. FmajorVersion TCARD16
  5338. FminorVersion TCARD16
  5339. Flength TCARD16
  5340. }
  5341. type TxConnSetup = struct {
  5342. Frelease TCARD32
  5343. FridBase TCARD32
  5344. FridMask TCARD32
  5345. FmotionBufferSize TCARD32
  5346. FnbytesVendor TCARD16
  5347. FmaxRequestSize TCARD16
  5348. FnumRoots TCARD8
  5349. FnumFormats TCARD8
  5350. FimageByteOrder TCARD8
  5351. FbitmapBitOrder TCARD8
  5352. FbitmapScanlineUnit TCARD8
  5353. FbitmapScanlinePad TCARD8
  5354. FminKeyCode TCARD8
  5355. FmaxKeyCode TCARD8
  5356. Fpad2 TCARD32
  5357. }
  5358. type TxPixmapFormat = struct {
  5359. Fdepth TCARD8
  5360. FbitsPerPixel TCARD8
  5361. FscanLinePad TCARD8
  5362. Fpad1 TCARD8
  5363. Fpad2 TCARD32
  5364. }
  5365. type TxDepth = struct {
  5366. Fdepth TCARD8
  5367. Fpad1 TCARD8
  5368. FnVisuals TCARD16
  5369. Fpad2 TCARD32
  5370. }
  5371. type TxVisualType = struct {
  5372. FvisualID TCARD32
  5373. Fclass TCARD8
  5374. FbitsPerRGB TCARD8
  5375. FcolormapEntries TCARD16
  5376. FredMask TCARD32
  5377. FgreenMask TCARD32
  5378. FblueMask TCARD32
  5379. Fpad TCARD32
  5380. }
  5381. type TxWindowRoot = struct {
  5382. FwindowId TCARD32
  5383. FdefaultColormap TCARD32
  5384. FwhitePixel TCARD32
  5385. FblackPixel TCARD32
  5386. FcurrentInputMask TCARD32
  5387. FpixWidth TCARD16
  5388. FpixHeight TCARD16
  5389. FmmWidth TCARD16
  5390. FmmHeight TCARD16
  5391. FminInstalledMaps TCARD16
  5392. FmaxInstalledMaps TCARD16
  5393. FrootVisualID TCARD32
  5394. FbackingStore TCARD8
  5395. FsaveUnders TBOOL
  5396. FrootDepth TCARD8
  5397. FnDepths TCARD8
  5398. }
  5399. type TxTimecoord = struct {
  5400. Ftime TCARD32
  5401. Fx TINT16
  5402. Fy TINT16
  5403. }
  5404. type TxHostEntry = struct {
  5405. Ffamily TCARD8
  5406. Fpad TBYTE
  5407. Flength TCARD16
  5408. }
  5409. type TxCharInfo = struct {
  5410. FleftSideBearing TINT16
  5411. FrightSideBearing TINT16
  5412. FcharacterWidth TINT16
  5413. Fascent TINT16
  5414. Fdescent TINT16
  5415. Fattributes TCARD16
  5416. }
  5417. type TxFontProp = struct {
  5418. Fname TCARD32
  5419. Fvalue TCARD32
  5420. }
  5421. type TxTextElt = struct {
  5422. Flen1 TCARD8
  5423. Fdelta TINT8
  5424. }
  5425. type TxColorItem = struct {
  5426. Fpixel TCARD32
  5427. Fred TCARD16
  5428. Fgreen TCARD16
  5429. Fblue TCARD16
  5430. Fflags TCARD8
  5431. Fpad TCARD8
  5432. }
  5433. type Txrgb = struct {
  5434. Fred TCARD16
  5435. Fgreen TCARD16
  5436. Fblue TCARD16
  5437. Fpad TCARD16
  5438. }
  5439. type TKEYCODE = uint8
  5440. type TxGenericReply = struct {
  5441. Ftype1 TBYTE
  5442. Fdata1 TBYTE
  5443. FsequenceNumber TCARD16
  5444. Flength TCARD32
  5445. Fdata00 TCARD32
  5446. Fdata01 TCARD32
  5447. Fdata02 TCARD32
  5448. Fdata03 TCARD32
  5449. Fdata04 TCARD32
  5450. Fdata05 TCARD32
  5451. }
  5452. type TxGetWindowAttributesReply = struct {
  5453. Ftype1 TBYTE
  5454. FbackingStore TCARD8
  5455. FsequenceNumber TCARD16
  5456. Flength TCARD32
  5457. FvisualID TCARD32
  5458. Fclass TCARD16
  5459. FbitGravity TCARD8
  5460. FwinGravity TCARD8
  5461. FbackingBitPlanes TCARD32
  5462. FbackingPixel TCARD32
  5463. FsaveUnder TBOOL
  5464. FmapInstalled TBOOL
  5465. FmapState TCARD8
  5466. Foverride TBOOL
  5467. Fcolormap TCARD32
  5468. FallEventMasks TCARD32
  5469. FyourEventMask TCARD32
  5470. FdoNotPropagateMask TCARD16
  5471. Fpad TCARD16
  5472. }
  5473. type TxGetGeometryReply = struct {
  5474. Ftype1 TBYTE
  5475. Fdepth TCARD8
  5476. FsequenceNumber TCARD16
  5477. Flength TCARD32
  5478. Froot TCARD32
  5479. Fx TINT16
  5480. Fy TINT16
  5481. Fwidth TCARD16
  5482. Fheight TCARD16
  5483. FborderWidth TCARD16
  5484. Fpad1 TCARD16
  5485. Fpad2 TCARD32
  5486. Fpad3 TCARD32
  5487. }
  5488. type TxQueryTreeReply = struct {
  5489. Ftype1 TBYTE
  5490. Fpad1 TBYTE
  5491. FsequenceNumber TCARD16
  5492. Flength TCARD32
  5493. Froot TCARD32
  5494. Fparent TCARD32
  5495. FnChildren TCARD16
  5496. Fpad2 TCARD16
  5497. Fpad3 TCARD32
  5498. Fpad4 TCARD32
  5499. Fpad5 TCARD32
  5500. }
  5501. type TxInternAtomReply = struct {
  5502. Ftype1 TBYTE
  5503. Fpad1 TBYTE
  5504. FsequenceNumber TCARD16
  5505. Flength TCARD32
  5506. Fatom TCARD32
  5507. Fpad2 TCARD32
  5508. Fpad3 TCARD32
  5509. Fpad4 TCARD32
  5510. Fpad5 TCARD32
  5511. Fpad6 TCARD32
  5512. }
  5513. type TxGetAtomNameReply = struct {
  5514. Ftype1 TBYTE
  5515. Fpad1 TBYTE
  5516. FsequenceNumber TCARD16
  5517. Flength TCARD32
  5518. FnameLength TCARD16
  5519. Fpad2 TCARD16
  5520. Fpad3 TCARD32
  5521. Fpad4 TCARD32
  5522. Fpad5 TCARD32
  5523. Fpad6 TCARD32
  5524. Fpad7 TCARD32
  5525. }
  5526. type TxGetPropertyReply = struct {
  5527. Ftype1 TBYTE
  5528. Fformat TCARD8
  5529. FsequenceNumber TCARD16
  5530. Flength TCARD32
  5531. FpropertyType TCARD32
  5532. FbytesAfter TCARD32
  5533. FnItems TCARD32
  5534. Fpad1 TCARD32
  5535. Fpad2 TCARD32
  5536. Fpad3 TCARD32
  5537. }
  5538. type TxListPropertiesReply = struct {
  5539. Ftype1 TBYTE
  5540. Fpad1 TBYTE
  5541. FsequenceNumber TCARD16
  5542. Flength TCARD32
  5543. FnProperties TCARD16
  5544. Fpad2 TCARD16
  5545. Fpad3 TCARD32
  5546. Fpad4 TCARD32
  5547. Fpad5 TCARD32
  5548. Fpad6 TCARD32
  5549. Fpad7 TCARD32
  5550. }
  5551. type TxGetSelectionOwnerReply = struct {
  5552. Ftype1 TBYTE
  5553. Fpad1 TBYTE
  5554. FsequenceNumber TCARD16
  5555. Flength TCARD32
  5556. Fowner TCARD32
  5557. Fpad2 TCARD32
  5558. Fpad3 TCARD32
  5559. Fpad4 TCARD32
  5560. Fpad5 TCARD32
  5561. Fpad6 TCARD32
  5562. }
  5563. type TxGrabPointerReply = struct {
  5564. Ftype1 TBYTE
  5565. Fstatus TBYTE
  5566. FsequenceNumber TCARD16
  5567. Flength TCARD32
  5568. Fpad1 TCARD32
  5569. Fpad2 TCARD32
  5570. Fpad3 TCARD32
  5571. Fpad4 TCARD32
  5572. Fpad5 TCARD32
  5573. Fpad6 TCARD32
  5574. }
  5575. type TxGrabKeyboardReply = struct {
  5576. Ftype1 TBYTE
  5577. Fstatus TBYTE
  5578. FsequenceNumber TCARD16
  5579. Flength TCARD32
  5580. Fpad1 TCARD32
  5581. Fpad2 TCARD32
  5582. Fpad3 TCARD32
  5583. Fpad4 TCARD32
  5584. Fpad5 TCARD32
  5585. Fpad6 TCARD32
  5586. }
  5587. type TxQueryPointerReply = struct {
  5588. Ftype1 TBYTE
  5589. FsameScreen TBOOL
  5590. FsequenceNumber TCARD16
  5591. Flength TCARD32
  5592. Froot TCARD32
  5593. Fchild TCARD32
  5594. FrootX TINT16
  5595. FrootY TINT16
  5596. FwinX TINT16
  5597. FwinY TINT16
  5598. Fmask TCARD16
  5599. Fpad1 TCARD16
  5600. Fpad TCARD32
  5601. }
  5602. type TxGetMotionEventsReply = struct {
  5603. Ftype1 TBYTE
  5604. Fpad1 TBYTE
  5605. FsequenceNumber TCARD16
  5606. Flength TCARD32
  5607. FnEvents TCARD32
  5608. Fpad2 TCARD32
  5609. Fpad3 TCARD32
  5610. Fpad4 TCARD32
  5611. Fpad5 TCARD32
  5612. Fpad6 TCARD32
  5613. }
  5614. type TxTranslateCoordsReply = struct {
  5615. Ftype1 TBYTE
  5616. FsameScreen TBOOL
  5617. FsequenceNumber TCARD16
  5618. Flength TCARD32
  5619. Fchild TCARD32
  5620. FdstX TINT16
  5621. FdstY TINT16
  5622. Fpad2 TCARD32
  5623. Fpad3 TCARD32
  5624. Fpad4 TCARD32
  5625. Fpad5 TCARD32
  5626. }
  5627. type TxGetInputFocusReply = struct {
  5628. Ftype1 TBYTE
  5629. FrevertTo TCARD8
  5630. FsequenceNumber TCARD16
  5631. Flength TCARD32
  5632. Ffocus TCARD32
  5633. Fpad1 TCARD32
  5634. Fpad2 TCARD32
  5635. Fpad3 TCARD32
  5636. Fpad4 TCARD32
  5637. Fpad5 TCARD32
  5638. }
  5639. type TxQueryKeymapReply = struct {
  5640. Ftype1 TBYTE
  5641. Fpad1 TBYTE
  5642. FsequenceNumber TCARD16
  5643. Flength TCARD32
  5644. Fmap1 [32]TBYTE
  5645. }
  5646. type TxQueryFontReply = struct {
  5647. Ftype1 TBYTE
  5648. Fpad1 TBYTE
  5649. FsequenceNumber TCARD16
  5650. Flength TCARD32
  5651. FminBounds TxCharInfo
  5652. Fwalign1 TCARD32
  5653. FmaxBounds TxCharInfo
  5654. Fwalign2 TCARD32
  5655. FminCharOrByte2 TCARD16
  5656. FmaxCharOrByte2 TCARD16
  5657. FdefaultChar TCARD16
  5658. FnFontProps TCARD16
  5659. FdrawDirection TCARD8
  5660. FminByte1 TCARD8
  5661. FmaxByte1 TCARD8
  5662. FallCharsExist TBOOL
  5663. FfontAscent TINT16
  5664. FfontDescent TINT16
  5665. FnCharInfos TCARD32
  5666. }
  5667. type T_xQueryFontReply = TxQueryFontReply
  5668. type TxQueryTextExtentsReply = struct {
  5669. Ftype1 TBYTE
  5670. FdrawDirection TCARD8
  5671. FsequenceNumber TCARD16
  5672. Flength TCARD32
  5673. FfontAscent TINT16
  5674. FfontDescent TINT16
  5675. FoverallAscent TINT16
  5676. FoverallDescent TINT16
  5677. FoverallWidth TINT32
  5678. FoverallLeft TINT32
  5679. FoverallRight TINT32
  5680. Fpad TCARD32
  5681. }
  5682. type TxListFontsReply = struct {
  5683. Ftype1 TBYTE
  5684. Fpad1 TBYTE
  5685. FsequenceNumber TCARD16
  5686. Flength TCARD32
  5687. FnFonts TCARD16
  5688. Fpad2 TCARD16
  5689. Fpad3 TCARD32
  5690. Fpad4 TCARD32
  5691. Fpad5 TCARD32
  5692. Fpad6 TCARD32
  5693. Fpad7 TCARD32
  5694. }
  5695. type TxListFontsWithInfoReply = struct {
  5696. Ftype1 TBYTE
  5697. FnameLength TCARD8
  5698. FsequenceNumber TCARD16
  5699. Flength TCARD32
  5700. FminBounds TxCharInfo
  5701. Fwalign1 TCARD32
  5702. FmaxBounds TxCharInfo
  5703. Fwalign2 TCARD32
  5704. FminCharOrByte2 TCARD16
  5705. FmaxCharOrByte2 TCARD16
  5706. FdefaultChar TCARD16
  5707. FnFontProps TCARD16
  5708. FdrawDirection TCARD8
  5709. FminByte1 TCARD8
  5710. FmaxByte1 TCARD8
  5711. FallCharsExist TBOOL
  5712. FfontAscent TINT16
  5713. FfontDescent TINT16
  5714. FnReplies TCARD32
  5715. }
  5716. type TxGetFontPathReply = struct {
  5717. Ftype1 TBYTE
  5718. Fpad1 TBYTE
  5719. FsequenceNumber TCARD16
  5720. Flength TCARD32
  5721. FnPaths TCARD16
  5722. Fpad2 TCARD16
  5723. Fpad3 TCARD32
  5724. Fpad4 TCARD32
  5725. Fpad5 TCARD32
  5726. Fpad6 TCARD32
  5727. Fpad7 TCARD32
  5728. }
  5729. type TxGetImageReply = struct {
  5730. Ftype1 TBYTE
  5731. Fdepth TCARD8
  5732. FsequenceNumber TCARD16
  5733. Flength TCARD32
  5734. Fvisual TCARD32
  5735. Fpad3 TCARD32
  5736. Fpad4 TCARD32
  5737. Fpad5 TCARD32
  5738. Fpad6 TCARD32
  5739. Fpad7 TCARD32
  5740. }
  5741. type TxListInstalledColormapsReply = struct {
  5742. Ftype1 TBYTE
  5743. Fpad1 TBYTE
  5744. FsequenceNumber TCARD16
  5745. Flength TCARD32
  5746. FnColormaps TCARD16
  5747. Fpad2 TCARD16
  5748. Fpad3 TCARD32
  5749. Fpad4 TCARD32
  5750. Fpad5 TCARD32
  5751. Fpad6 TCARD32
  5752. Fpad7 TCARD32
  5753. }
  5754. type TxAllocColorReply = struct {
  5755. Ftype1 TBYTE
  5756. Fpad1 TBYTE
  5757. FsequenceNumber TCARD16
  5758. Flength TCARD32
  5759. Fred TCARD16
  5760. Fgreen TCARD16
  5761. Fblue TCARD16
  5762. Fpad2 TCARD16
  5763. Fpixel TCARD32
  5764. Fpad3 TCARD32
  5765. Fpad4 TCARD32
  5766. Fpad5 TCARD32
  5767. }
  5768. type TxAllocNamedColorReply = struct {
  5769. Ftype1 TBYTE
  5770. Fpad1 TBYTE
  5771. FsequenceNumber TCARD16
  5772. Flength TCARD32
  5773. Fpixel TCARD32
  5774. FexactRed TCARD16
  5775. FexactGreen TCARD16
  5776. FexactBlue TCARD16
  5777. FscreenRed TCARD16
  5778. FscreenGreen TCARD16
  5779. FscreenBlue TCARD16
  5780. Fpad2 TCARD32
  5781. Fpad3 TCARD32
  5782. }
  5783. type TxAllocColorCellsReply = struct {
  5784. Ftype1 TBYTE
  5785. Fpad1 TBYTE
  5786. FsequenceNumber TCARD16
  5787. Flength TCARD32
  5788. FnPixels TCARD16
  5789. FnMasks TCARD16
  5790. Fpad3 TCARD32
  5791. Fpad4 TCARD32
  5792. Fpad5 TCARD32
  5793. Fpad6 TCARD32
  5794. Fpad7 TCARD32
  5795. }
  5796. type TxAllocColorPlanesReply = struct {
  5797. Ftype1 TBYTE
  5798. Fpad1 TBYTE
  5799. FsequenceNumber TCARD16
  5800. Flength TCARD32
  5801. FnPixels TCARD16
  5802. Fpad2 TCARD16
  5803. FredMask TCARD32
  5804. FgreenMask TCARD32
  5805. FblueMask TCARD32
  5806. Fpad3 TCARD32
  5807. Fpad4 TCARD32
  5808. }
  5809. type TxQueryColorsReply = struct {
  5810. Ftype1 TBYTE
  5811. Fpad1 TBYTE
  5812. FsequenceNumber TCARD16
  5813. Flength TCARD32
  5814. FnColors TCARD16
  5815. Fpad2 TCARD16
  5816. Fpad3 TCARD32
  5817. Fpad4 TCARD32
  5818. Fpad5 TCARD32
  5819. Fpad6 TCARD32
  5820. Fpad7 TCARD32
  5821. }
  5822. type TxLookupColorReply = struct {
  5823. Ftype1 TBYTE
  5824. Fpad1 TBYTE
  5825. FsequenceNumber TCARD16
  5826. Flength TCARD32
  5827. FexactRed TCARD16
  5828. FexactGreen TCARD16
  5829. FexactBlue TCARD16
  5830. FscreenRed TCARD16
  5831. FscreenGreen TCARD16
  5832. FscreenBlue TCARD16
  5833. Fpad3 TCARD32
  5834. Fpad4 TCARD32
  5835. Fpad5 TCARD32
  5836. }
  5837. type TxQueryBestSizeReply = struct {
  5838. Ftype1 TBYTE
  5839. Fpad1 TBYTE
  5840. FsequenceNumber TCARD16
  5841. Flength TCARD32
  5842. Fwidth TCARD16
  5843. Fheight TCARD16
  5844. Fpad3 TCARD32
  5845. Fpad4 TCARD32
  5846. Fpad5 TCARD32
  5847. Fpad6 TCARD32
  5848. Fpad7 TCARD32
  5849. }
  5850. type TxQueryExtensionReply = struct {
  5851. Ftype1 TBYTE
  5852. Fpad1 TBYTE
  5853. FsequenceNumber TCARD16
  5854. Flength TCARD32
  5855. Fpresent TBOOL
  5856. Fmajor_opcode TCARD8
  5857. Ffirst_event TCARD8
  5858. Ffirst_error TCARD8
  5859. Fpad3 TCARD32
  5860. Fpad4 TCARD32
  5861. Fpad5 TCARD32
  5862. Fpad6 TCARD32
  5863. Fpad7 TCARD32
  5864. }
  5865. type TxListExtensionsReply = struct {
  5866. Ftype1 TBYTE
  5867. FnExtensions TCARD8
  5868. FsequenceNumber TCARD16
  5869. Flength TCARD32
  5870. Fpad2 TCARD32
  5871. Fpad3 TCARD32
  5872. Fpad4 TCARD32
  5873. Fpad5 TCARD32
  5874. Fpad6 TCARD32
  5875. Fpad7 TCARD32
  5876. }
  5877. type TxSetMappingReply = struct {
  5878. Ftype1 TBYTE
  5879. Fsuccess TCARD8
  5880. FsequenceNumber TCARD16
  5881. Flength TCARD32
  5882. Fpad2 TCARD32
  5883. Fpad3 TCARD32
  5884. Fpad4 TCARD32
  5885. Fpad5 TCARD32
  5886. Fpad6 TCARD32
  5887. Fpad7 TCARD32
  5888. }
  5889. type TxSetPointerMappingReply = struct {
  5890. Ftype1 TBYTE
  5891. Fsuccess TCARD8
  5892. FsequenceNumber TCARD16
  5893. Flength TCARD32
  5894. Fpad2 TCARD32
  5895. Fpad3 TCARD32
  5896. Fpad4 TCARD32
  5897. Fpad5 TCARD32
  5898. Fpad6 TCARD32
  5899. Fpad7 TCARD32
  5900. }
  5901. type TxSetModifierMappingReply = struct {
  5902. Ftype1 TBYTE
  5903. Fsuccess TCARD8
  5904. FsequenceNumber TCARD16
  5905. Flength TCARD32
  5906. Fpad2 TCARD32
  5907. Fpad3 TCARD32
  5908. Fpad4 TCARD32
  5909. Fpad5 TCARD32
  5910. Fpad6 TCARD32
  5911. Fpad7 TCARD32
  5912. }
  5913. type TxGetPointerMappingReply = struct {
  5914. Ftype1 TBYTE
  5915. FnElts TCARD8
  5916. FsequenceNumber TCARD16
  5917. Flength TCARD32
  5918. Fpad2 TCARD32
  5919. Fpad3 TCARD32
  5920. Fpad4 TCARD32
  5921. Fpad5 TCARD32
  5922. Fpad6 TCARD32
  5923. Fpad7 TCARD32
  5924. }
  5925. type TxGetKeyboardMappingReply = struct {
  5926. Ftype1 TBYTE
  5927. FkeySymsPerKeyCode TCARD8
  5928. FsequenceNumber TCARD16
  5929. Flength TCARD32
  5930. Fpad2 TCARD32
  5931. Fpad3 TCARD32
  5932. Fpad4 TCARD32
  5933. Fpad5 TCARD32
  5934. Fpad6 TCARD32
  5935. Fpad7 TCARD32
  5936. }
  5937. type TxGetModifierMappingReply = struct {
  5938. Ftype1 TBYTE
  5939. FnumKeyPerModifier TCARD8
  5940. FsequenceNumber TCARD16
  5941. Flength TCARD32
  5942. Fpad1 TCARD32
  5943. Fpad2 TCARD32
  5944. Fpad3 TCARD32
  5945. Fpad4 TCARD32
  5946. Fpad5 TCARD32
  5947. Fpad6 TCARD32
  5948. }
  5949. type TxGetKeyboardControlReply = struct {
  5950. Ftype1 TBYTE
  5951. FglobalAutoRepeat TBOOL
  5952. FsequenceNumber TCARD16
  5953. Flength TCARD32
  5954. FledMask TCARD32
  5955. FkeyClickPercent TCARD8
  5956. FbellPercent TCARD8
  5957. FbellPitch TCARD16
  5958. FbellDuration TCARD16
  5959. Fpad TCARD16
  5960. Fmap1 [32]TBYTE
  5961. }
  5962. type TxGetPointerControlReply = struct {
  5963. Ftype1 TBYTE
  5964. Fpad1 TBYTE
  5965. FsequenceNumber TCARD16
  5966. Flength TCARD32
  5967. FaccelNumerator TCARD16
  5968. FaccelDenominator TCARD16
  5969. Fthreshold TCARD16
  5970. Fpad2 TCARD16
  5971. Fpad3 TCARD32
  5972. Fpad4 TCARD32
  5973. Fpad5 TCARD32
  5974. Fpad6 TCARD32
  5975. }
  5976. type TxGetScreenSaverReply = struct {
  5977. Ftype1 TBYTE
  5978. Fpad1 TBYTE
  5979. FsequenceNumber TCARD16
  5980. Flength TCARD32
  5981. Ftimeout TCARD16
  5982. Finterval TCARD16
  5983. FpreferBlanking TBOOL
  5984. FallowExposures TBOOL
  5985. Fpad2 TCARD16
  5986. Fpad3 TCARD32
  5987. Fpad4 TCARD32
  5988. Fpad5 TCARD32
  5989. Fpad6 TCARD32
  5990. }
  5991. type TxListHostsReply = struct {
  5992. Ftype1 TBYTE
  5993. Fenabled TBOOL
  5994. FsequenceNumber TCARD16
  5995. Flength TCARD32
  5996. FnHosts TCARD16
  5997. Fpad1 TCARD16
  5998. Fpad3 TCARD32
  5999. Fpad4 TCARD32
  6000. Fpad5 TCARD32
  6001. Fpad6 TCARD32
  6002. Fpad7 TCARD32
  6003. }
  6004. type TxError = struct {
  6005. Ftype1 TBYTE
  6006. FerrorCode TBYTE
  6007. FsequenceNumber TCARD16
  6008. FresourceID TCARD32
  6009. FminorCode TCARD16
  6010. FmajorCode TCARD8
  6011. Fpad1 TBYTE
  6012. Fpad3 TCARD32
  6013. Fpad4 TCARD32
  6014. Fpad5 TCARD32
  6015. Fpad6 TCARD32
  6016. Fpad7 TCARD32
  6017. }
  6018. type TxEvent = struct {
  6019. Fu struct {
  6020. FkeyButtonPointer [0]struct {
  6021. Fpad00 TCARD32
  6022. Ftime TCARD32
  6023. Froot TCARD32
  6024. Fevent TCARD32
  6025. Fchild TCARD32
  6026. FrootX TINT16
  6027. FrootY TINT16
  6028. FeventX TINT16
  6029. FeventY TINT16
  6030. Fstate TKeyButMask
  6031. FsameScreen TBOOL
  6032. Fpad1 TBYTE
  6033. }
  6034. FenterLeave [0]struct {
  6035. Fpad00 TCARD32
  6036. Ftime TCARD32
  6037. Froot TCARD32
  6038. Fevent TCARD32
  6039. Fchild TCARD32
  6040. FrootX TINT16
  6041. FrootY TINT16
  6042. FeventX TINT16
  6043. FeventY TINT16
  6044. Fstate TKeyButMask
  6045. Fmode TBYTE
  6046. Fflags TBYTE
  6047. }
  6048. Ffocus [0]struct {
  6049. Fpad00 TCARD32
  6050. Fwindow TCARD32
  6051. Fmode TBYTE
  6052. Fpad1 TBYTE
  6053. Fpad2 TBYTE
  6054. Fpad3 TBYTE
  6055. }
  6056. Fexpose [0]struct {
  6057. Fpad00 TCARD32
  6058. Fwindow TCARD32
  6059. Fx TCARD16
  6060. Fy TCARD16
  6061. Fwidth TCARD16
  6062. Fheight TCARD16
  6063. Fcount TCARD16
  6064. Fpad2 TCARD16
  6065. }
  6066. FgraphicsExposure [0]struct {
  6067. Fpad00 TCARD32
  6068. Fdrawable TCARD32
  6069. Fx TCARD16
  6070. Fy TCARD16
  6071. Fwidth TCARD16
  6072. Fheight TCARD16
  6073. FminorEvent TCARD16
  6074. Fcount TCARD16
  6075. FmajorEvent TBYTE
  6076. Fpad1 TBYTE
  6077. Fpad2 TBYTE
  6078. Fpad3 TBYTE
  6079. }
  6080. FnoExposure [0]struct {
  6081. Fpad00 TCARD32
  6082. Fdrawable TCARD32
  6083. FminorEvent TCARD16
  6084. FmajorEvent TBYTE
  6085. Fbpad TBYTE
  6086. }
  6087. Fvisibility [0]struct {
  6088. Fpad00 TCARD32
  6089. Fwindow TCARD32
  6090. Fstate TCARD8
  6091. Fpad1 TBYTE
  6092. Fpad2 TBYTE
  6093. Fpad3 TBYTE
  6094. }
  6095. FcreateNotify [0]struct {
  6096. Fpad00 TCARD32
  6097. Fparent TCARD32
  6098. Fwindow TCARD32
  6099. Fx TINT16
  6100. Fy TINT16
  6101. Fwidth TCARD16
  6102. Fheight TCARD16
  6103. FborderWidth TCARD16
  6104. Foverride TBOOL
  6105. Fbpad TBYTE
  6106. }
  6107. FdestroyNotify [0]struct {
  6108. Fpad00 TCARD32
  6109. Fevent TCARD32
  6110. Fwindow TCARD32
  6111. }
  6112. FunmapNotify [0]struct {
  6113. Fpad00 TCARD32
  6114. Fevent TCARD32
  6115. Fwindow TCARD32
  6116. FfromConfigure TBOOL
  6117. Fpad1 TBYTE
  6118. Fpad2 TBYTE
  6119. Fpad3 TBYTE
  6120. }
  6121. FmapNotify [0]struct {
  6122. Fpad00 TCARD32
  6123. Fevent TCARD32
  6124. Fwindow TCARD32
  6125. Foverride TBOOL
  6126. Fpad1 TBYTE
  6127. Fpad2 TBYTE
  6128. Fpad3 TBYTE
  6129. }
  6130. FmapRequest [0]struct {
  6131. Fpad00 TCARD32
  6132. Fparent TCARD32
  6133. Fwindow TCARD32
  6134. }
  6135. Freparent [0]struct {
  6136. Fpad00 TCARD32
  6137. Fevent TCARD32
  6138. Fwindow TCARD32
  6139. Fparent TCARD32
  6140. Fx TINT16
  6141. Fy TINT16
  6142. Foverride TBOOL
  6143. Fpad1 TBYTE
  6144. Fpad2 TBYTE
  6145. Fpad3 TBYTE
  6146. }
  6147. FconfigureNotify [0]struct {
  6148. Fpad00 TCARD32
  6149. Fevent TCARD32
  6150. Fwindow TCARD32
  6151. FaboveSibling TCARD32
  6152. Fx TINT16
  6153. Fy TINT16
  6154. Fwidth TCARD16
  6155. Fheight TCARD16
  6156. FborderWidth TCARD16
  6157. Foverride TBOOL
  6158. Fbpad TBYTE
  6159. }
  6160. FconfigureRequest [0]struct {
  6161. Fpad00 TCARD32
  6162. Fparent TCARD32
  6163. Fwindow TCARD32
  6164. Fsibling TCARD32
  6165. Fx TINT16
  6166. Fy TINT16
  6167. Fwidth TCARD16
  6168. Fheight TCARD16
  6169. FborderWidth TCARD16
  6170. FvalueMask TCARD16
  6171. Fpad1 TCARD32
  6172. }
  6173. Fgravity [0]struct {
  6174. Fpad00 TCARD32
  6175. Fevent TCARD32
  6176. Fwindow TCARD32
  6177. Fx TINT16
  6178. Fy TINT16
  6179. Fpad1 TCARD32
  6180. Fpad2 TCARD32
  6181. Fpad3 TCARD32
  6182. Fpad4 TCARD32
  6183. }
  6184. FresizeRequest [0]struct {
  6185. Fpad00 TCARD32
  6186. Fwindow TCARD32
  6187. Fwidth TCARD16
  6188. Fheight TCARD16
  6189. }
  6190. Fcirculate [0]struct {
  6191. Fpad00 TCARD32
  6192. Fevent TCARD32
  6193. Fwindow TCARD32
  6194. Fparent TCARD32
  6195. Fplace TBYTE
  6196. Fpad1 TBYTE
  6197. Fpad2 TBYTE
  6198. Fpad3 TBYTE
  6199. }
  6200. Fproperty [0]struct {
  6201. Fpad00 TCARD32
  6202. Fwindow TCARD32
  6203. Fatom TCARD32
  6204. Ftime TCARD32
  6205. Fstate TBYTE
  6206. Fpad1 TBYTE
  6207. Fpad2 TCARD16
  6208. }
  6209. FselectionClear [0]struct {
  6210. Fpad00 TCARD32
  6211. Ftime TCARD32
  6212. Fwindow TCARD32
  6213. Fatom TCARD32
  6214. }
  6215. FselectionRequest [0]struct {
  6216. Fpad00 TCARD32
  6217. Ftime TCARD32
  6218. Fowner TCARD32
  6219. Frequestor TCARD32
  6220. Fselection TCARD32
  6221. Ftarget TCARD32
  6222. Fproperty TCARD32
  6223. }
  6224. FselectionNotify [0]struct {
  6225. Fpad00 TCARD32
  6226. Ftime TCARD32
  6227. Frequestor TCARD32
  6228. Fselection TCARD32
  6229. Ftarget TCARD32
  6230. Fproperty TCARD32
  6231. }
  6232. Fcolormap [0]struct {
  6233. Fpad00 TCARD32
  6234. Fwindow TCARD32
  6235. Fcolormap TCARD32
  6236. Fnew1 TBOOL
  6237. Fstate TBYTE
  6238. Fpad1 TBYTE
  6239. Fpad2 TBYTE
  6240. }
  6241. FmappingNotify [0]struct {
  6242. Fpad00 TCARD32
  6243. Frequest TCARD8
  6244. FfirstKeyCode TCARD8
  6245. Fcount TCARD8
  6246. Fpad1 TBYTE
  6247. }
  6248. FclientMessage [0]struct {
  6249. Fpad00 TCARD32
  6250. Fwindow TCARD32
  6251. Fu struct {
  6252. Fs [0]struct {
  6253. Ftype1 TCARD32
  6254. Fshorts0 TINT16
  6255. Fshorts1 TINT16
  6256. Fshorts2 TINT16
  6257. Fshorts3 TINT16
  6258. Fshorts4 TINT16
  6259. Fshorts5 TINT16
  6260. Fshorts6 TINT16
  6261. Fshorts7 TINT16
  6262. Fshorts8 TINT16
  6263. Fshorts9 TINT16
  6264. }
  6265. Fb [0]struct {
  6266. Ftype1 TCARD32
  6267. Fbytes [20]TINT8
  6268. }
  6269. Fl struct {
  6270. Ftype1 TCARD32
  6271. Flongs0 TINT32
  6272. Flongs1 TINT32
  6273. Flongs2 TINT32
  6274. Flongs3 TINT32
  6275. Flongs4 TINT32
  6276. }
  6277. }
  6278. }
  6279. Fu struct {
  6280. Ftype1 TBYTE
  6281. Fdetail TBYTE
  6282. FsequenceNumber TCARD16
  6283. }
  6284. F__ccgo_pad26 [28]byte
  6285. }
  6286. }
  6287. type T_xEvent = TxEvent
  6288. type TxGenericEvent = struct {
  6289. Ftype1 TBYTE
  6290. Fextension TCARD8
  6291. FsequenceNumber TCARD16
  6292. Flength TCARD32
  6293. Fevtype TCARD16
  6294. Fpad2 TCARD16
  6295. Fpad3 TCARD32
  6296. Fpad4 TCARD32
  6297. Fpad5 TCARD32
  6298. Fpad6 TCARD32
  6299. Fpad7 TCARD32
  6300. }
  6301. type TxKeymapEvent = struct {
  6302. Ftype1 TBYTE
  6303. Fmap1 [31]TBYTE
  6304. }
  6305. type TxReply = struct {
  6306. Fgeom [0]TxGetGeometryReply
  6307. Ftree [0]TxQueryTreeReply
  6308. Fatom [0]TxInternAtomReply
  6309. FatomName [0]TxGetAtomNameReply
  6310. Fproperty [0]TxGetPropertyReply
  6311. FlistProperties [0]TxListPropertiesReply
  6312. Fselection [0]TxGetSelectionOwnerReply
  6313. FgrabPointer [0]TxGrabPointerReply
  6314. FgrabKeyboard [0]TxGrabKeyboardReply
  6315. Fpointer [0]TxQueryPointerReply
  6316. FmotionEvents [0]TxGetMotionEventsReply
  6317. Fcoords [0]TxTranslateCoordsReply
  6318. FinputFocus [0]TxGetInputFocusReply
  6319. FtextExtents [0]TxQueryTextExtentsReply
  6320. Ffonts [0]TxListFontsReply
  6321. FfontPath [0]TxGetFontPathReply
  6322. Fimage [0]TxGetImageReply
  6323. Fcolormaps [0]TxListInstalledColormapsReply
  6324. FallocColor [0]TxAllocColorReply
  6325. FallocNamedColor [0]TxAllocNamedColorReply
  6326. FcolorCells [0]TxAllocColorCellsReply
  6327. FcolorPlanes [0]TxAllocColorPlanesReply
  6328. Fcolors [0]TxQueryColorsReply
  6329. FlookupColor [0]TxLookupColorReply
  6330. FbestSize [0]TxQueryBestSizeReply
  6331. Fextension [0]TxQueryExtensionReply
  6332. Fextensions [0]TxListExtensionsReply
  6333. FsetModifierMapping [0]TxSetModifierMappingReply
  6334. FgetModifierMapping [0]TxGetModifierMappingReply
  6335. FsetPointerMapping [0]TxSetPointerMappingReply
  6336. FgetKeyboardMapping [0]TxGetKeyboardMappingReply
  6337. FgetPointerMapping [0]TxGetPointerMappingReply
  6338. FpointerControl [0]TxGetPointerControlReply
  6339. FscreenSaver [0]TxGetScreenSaverReply
  6340. Fhosts [0]TxListHostsReply
  6341. Ferror1 [0]TxError
  6342. Fevent [0]TxEvent
  6343. Fgeneric TxGenericReply
  6344. }
  6345. type TxReq = struct {
  6346. FreqType TCARD8
  6347. Fdata TCARD8
  6348. Flength TCARD16
  6349. }
  6350. type T_xReq = TxReq
  6351. type TxResourceReq = struct {
  6352. FreqType TCARD8
  6353. Fpad TBYTE
  6354. Flength TCARD16
  6355. Fid TCARD32
  6356. }
  6357. type TxCreateWindowReq = struct {
  6358. FreqType TCARD8
  6359. Fdepth TCARD8
  6360. Flength TCARD16
  6361. Fwid TCARD32
  6362. Fparent TCARD32
  6363. Fx TINT16
  6364. Fy TINT16
  6365. Fwidth TCARD16
  6366. Fheight TCARD16
  6367. FborderWidth TCARD16
  6368. Fclass TCARD16
  6369. Fvisual TCARD32
  6370. Fmask TCARD32
  6371. }
  6372. type TxChangeWindowAttributesReq = struct {
  6373. FreqType TCARD8
  6374. Fpad TBYTE
  6375. Flength TCARD16
  6376. Fwindow TCARD32
  6377. FvalueMask TCARD32
  6378. }
  6379. type TxChangeSaveSetReq = struct {
  6380. FreqType TCARD8
  6381. Fmode TBYTE
  6382. Flength TCARD16
  6383. Fwindow TCARD32
  6384. }
  6385. type TxReparentWindowReq = struct {
  6386. FreqType TCARD8
  6387. Fpad TBYTE
  6388. Flength TCARD16
  6389. Fwindow TCARD32
  6390. Fparent TCARD32
  6391. Fx TINT16
  6392. Fy TINT16
  6393. }
  6394. type TxConfigureWindowReq = struct {
  6395. FreqType TCARD8
  6396. Fpad TCARD8
  6397. Flength TCARD16
  6398. Fwindow TCARD32
  6399. Fmask TCARD16
  6400. Fpad2 TCARD16
  6401. }
  6402. type TxCirculateWindowReq = struct {
  6403. FreqType TCARD8
  6404. Fdirection TCARD8
  6405. Flength TCARD16
  6406. Fwindow TCARD32
  6407. }
  6408. type TxInternAtomReq = struct {
  6409. FreqType TCARD8
  6410. FonlyIfExists TBOOL
  6411. Flength TCARD16
  6412. Fnbytes TCARD16
  6413. Fpad TCARD16
  6414. }
  6415. type TxChangePropertyReq = struct {
  6416. FreqType TCARD8
  6417. Fmode TCARD8
  6418. Flength TCARD16
  6419. Fwindow TCARD32
  6420. Fproperty TCARD32
  6421. Ftype1 TCARD32
  6422. Fformat TCARD8
  6423. Fpad [3]TBYTE
  6424. FnUnits TCARD32
  6425. }
  6426. type TxDeletePropertyReq = struct {
  6427. FreqType TCARD8
  6428. Fpad TBYTE
  6429. Flength TCARD16
  6430. Fwindow TCARD32
  6431. Fproperty TCARD32
  6432. }
  6433. type TxGetPropertyReq = struct {
  6434. FreqType TCARD8
  6435. Fdelete1 TBOOL
  6436. Flength TCARD16
  6437. Fwindow TCARD32
  6438. Fproperty TCARD32
  6439. Ftype1 TCARD32
  6440. FlongOffset TCARD32
  6441. FlongLength TCARD32
  6442. }
  6443. type TxSetSelectionOwnerReq = struct {
  6444. FreqType TCARD8
  6445. Fpad TBYTE
  6446. Flength TCARD16
  6447. Fwindow TCARD32
  6448. Fselection TCARD32
  6449. Ftime TCARD32
  6450. }
  6451. type TxConvertSelectionReq = struct {
  6452. FreqType TCARD8
  6453. Fpad TBYTE
  6454. Flength TCARD16
  6455. Frequestor TCARD32
  6456. Fselection TCARD32
  6457. Ftarget TCARD32
  6458. Fproperty TCARD32
  6459. Ftime TCARD32
  6460. }
  6461. type TxSendEventReq = struct {
  6462. FreqType TCARD8
  6463. Fpropagate TBOOL
  6464. Flength TCARD16
  6465. Fdestination TCARD32
  6466. FeventMask TCARD32
  6467. Fevent TxEvent
  6468. }
  6469. type TxGrabPointerReq = struct {
  6470. FreqType TCARD8
  6471. FownerEvents TBOOL
  6472. Flength TCARD16
  6473. FgrabWindow TCARD32
  6474. FeventMask TCARD16
  6475. FpointerMode TBYTE
  6476. FkeyboardMode TBYTE
  6477. FconfineTo TCARD32
  6478. Fcursor TCARD32
  6479. Ftime TCARD32
  6480. }
  6481. type TxGrabButtonReq = struct {
  6482. FreqType TCARD8
  6483. FownerEvents TBOOL
  6484. Flength TCARD16
  6485. FgrabWindow TCARD32
  6486. FeventMask TCARD16
  6487. FpointerMode TBYTE
  6488. FkeyboardMode TBYTE
  6489. FconfineTo TCARD32
  6490. Fcursor TCARD32
  6491. Fbutton TCARD8
  6492. Fpad TBYTE
  6493. Fmodifiers TCARD16
  6494. }
  6495. type TxUngrabButtonReq = struct {
  6496. FreqType TCARD8
  6497. Fbutton TCARD8
  6498. Flength TCARD16
  6499. FgrabWindow TCARD32
  6500. Fmodifiers TCARD16
  6501. Fpad TCARD16
  6502. }
  6503. type TxChangeActivePointerGrabReq = struct {
  6504. FreqType TCARD8
  6505. Fpad TBYTE
  6506. Flength TCARD16
  6507. Fcursor TCARD32
  6508. Ftime TCARD32
  6509. FeventMask TCARD16
  6510. Fpad2 TCARD16
  6511. }
  6512. type TxGrabKeyboardReq = struct {
  6513. FreqType TCARD8
  6514. FownerEvents TBOOL
  6515. Flength TCARD16
  6516. FgrabWindow TCARD32
  6517. Ftime TCARD32
  6518. FpointerMode TBYTE
  6519. FkeyboardMode TBYTE
  6520. Fpad TCARD16
  6521. }
  6522. type TxGrabKeyReq = struct {
  6523. FreqType TCARD8
  6524. FownerEvents TBOOL
  6525. Flength TCARD16
  6526. FgrabWindow TCARD32
  6527. Fmodifiers TCARD16
  6528. Fkey TCARD8
  6529. FpointerMode TBYTE
  6530. FkeyboardMode TBYTE
  6531. Fpad1 TBYTE
  6532. Fpad2 TBYTE
  6533. Fpad3 TBYTE
  6534. }
  6535. type TxUngrabKeyReq = struct {
  6536. FreqType TCARD8
  6537. Fkey TCARD8
  6538. Flength TCARD16
  6539. FgrabWindow TCARD32
  6540. Fmodifiers TCARD16
  6541. Fpad TCARD16
  6542. }
  6543. type TxAllowEventsReq = struct {
  6544. FreqType TCARD8
  6545. Fmode TCARD8
  6546. Flength TCARD16
  6547. Ftime TCARD32
  6548. }
  6549. type TxGetMotionEventsReq = struct {
  6550. FreqType TCARD8
  6551. Fpad TBYTE
  6552. Flength TCARD16
  6553. Fwindow TCARD32
  6554. Fstart TCARD32
  6555. Fstop TCARD32
  6556. }
  6557. type TxTranslateCoordsReq = struct {
  6558. FreqType TCARD8
  6559. Fpad TBYTE
  6560. Flength TCARD16
  6561. FsrcWid TCARD32
  6562. FdstWid TCARD32
  6563. FsrcX TINT16
  6564. FsrcY TINT16
  6565. }
  6566. type TxWarpPointerReq = struct {
  6567. FreqType TCARD8
  6568. Fpad TBYTE
  6569. Flength TCARD16
  6570. FsrcWid TCARD32
  6571. FdstWid TCARD32
  6572. FsrcX TINT16
  6573. FsrcY TINT16
  6574. FsrcWidth TCARD16
  6575. FsrcHeight TCARD16
  6576. FdstX TINT16
  6577. FdstY TINT16
  6578. }
  6579. type TxSetInputFocusReq = struct {
  6580. FreqType TCARD8
  6581. FrevertTo TCARD8
  6582. Flength TCARD16
  6583. Ffocus TCARD32
  6584. Ftime TCARD32
  6585. }
  6586. type TxOpenFontReq = struct {
  6587. FreqType TCARD8
  6588. Fpad TBYTE
  6589. Flength TCARD16
  6590. Ffid TCARD32
  6591. Fnbytes TCARD16
  6592. Fpad1 TBYTE
  6593. Fpad2 TBYTE
  6594. }
  6595. type TxQueryTextExtentsReq = struct {
  6596. FreqType TCARD8
  6597. FoddLength TBOOL
  6598. Flength TCARD16
  6599. Ffid TCARD32
  6600. }
  6601. type TxListFontsReq = struct {
  6602. FreqType TCARD8
  6603. Fpad TBYTE
  6604. Flength TCARD16
  6605. FmaxNames TCARD16
  6606. Fnbytes TCARD16
  6607. }
  6608. type TxListFontsWithInfoReq = struct {
  6609. FreqType TCARD8
  6610. Fpad TBYTE
  6611. Flength TCARD16
  6612. FmaxNames TCARD16
  6613. Fnbytes TCARD16
  6614. }
  6615. type TxSetFontPathReq = struct {
  6616. FreqType TCARD8
  6617. Fpad TBYTE
  6618. Flength TCARD16
  6619. FnFonts TCARD16
  6620. Fpad1 TBYTE
  6621. Fpad2 TBYTE
  6622. }
  6623. type TxCreatePixmapReq = struct {
  6624. FreqType TCARD8
  6625. Fdepth TCARD8
  6626. Flength TCARD16
  6627. Fpid TCARD32
  6628. Fdrawable TCARD32
  6629. Fwidth TCARD16
  6630. Fheight TCARD16
  6631. }
  6632. type TxCreateGCReq = struct {
  6633. FreqType TCARD8
  6634. Fpad TBYTE
  6635. Flength TCARD16
  6636. Fgc TCARD32
  6637. Fdrawable TCARD32
  6638. Fmask TCARD32
  6639. }
  6640. type TxChangeGCReq = struct {
  6641. FreqType TCARD8
  6642. Fpad TBYTE
  6643. Flength TCARD16
  6644. Fgc TCARD32
  6645. Fmask TCARD32
  6646. }
  6647. type TxCopyGCReq = struct {
  6648. FreqType TCARD8
  6649. Fpad TBYTE
  6650. Flength TCARD16
  6651. FsrcGC TCARD32
  6652. FdstGC TCARD32
  6653. Fmask TCARD32
  6654. }
  6655. type TxSetDashesReq = struct {
  6656. FreqType TCARD8
  6657. Fpad TBYTE
  6658. Flength TCARD16
  6659. Fgc TCARD32
  6660. FdashOffset TCARD16
  6661. FnDashes TCARD16
  6662. }
  6663. type TxSetClipRectanglesReq = struct {
  6664. FreqType TCARD8
  6665. Fordering TBYTE
  6666. Flength TCARD16
  6667. Fgc TCARD32
  6668. FxOrigin TINT16
  6669. FyOrigin TINT16
  6670. }
  6671. type TxClearAreaReq = struct {
  6672. FreqType TCARD8
  6673. Fexposures TBOOL
  6674. Flength TCARD16
  6675. Fwindow TCARD32
  6676. Fx TINT16
  6677. Fy TINT16
  6678. Fwidth TCARD16
  6679. Fheight TCARD16
  6680. }
  6681. type TxCopyAreaReq = struct {
  6682. FreqType TCARD8
  6683. Fpad TBYTE
  6684. Flength TCARD16
  6685. FsrcDrawable TCARD32
  6686. FdstDrawable TCARD32
  6687. Fgc TCARD32
  6688. FsrcX TINT16
  6689. FsrcY TINT16
  6690. FdstX TINT16
  6691. FdstY TINT16
  6692. Fwidth TCARD16
  6693. Fheight TCARD16
  6694. }
  6695. type TxCopyPlaneReq = struct {
  6696. FreqType TCARD8
  6697. Fpad TBYTE
  6698. Flength TCARD16
  6699. FsrcDrawable TCARD32
  6700. FdstDrawable TCARD32
  6701. Fgc TCARD32
  6702. FsrcX TINT16
  6703. FsrcY TINT16
  6704. FdstX TINT16
  6705. FdstY TINT16
  6706. Fwidth TCARD16
  6707. Fheight TCARD16
  6708. FbitPlane TCARD32
  6709. }
  6710. type TxPolyPointReq = struct {
  6711. FreqType TCARD8
  6712. FcoordMode TBYTE
  6713. Flength TCARD16
  6714. Fdrawable TCARD32
  6715. Fgc TCARD32
  6716. }
  6717. type TxPolyLineReq = struct {
  6718. FreqType TCARD8
  6719. FcoordMode TBYTE
  6720. Flength TCARD16
  6721. Fdrawable TCARD32
  6722. Fgc TCARD32
  6723. }
  6724. type TxPolySegmentReq = struct {
  6725. FreqType TCARD8
  6726. Fpad TBYTE
  6727. Flength TCARD16
  6728. Fdrawable TCARD32
  6729. Fgc TCARD32
  6730. }
  6731. type TxPolyArcReq = struct {
  6732. FreqType TCARD8
  6733. Fpad TBYTE
  6734. Flength TCARD16
  6735. Fdrawable TCARD32
  6736. Fgc TCARD32
  6737. }
  6738. type TxPolyRectangleReq = struct {
  6739. FreqType TCARD8
  6740. Fpad TBYTE
  6741. Flength TCARD16
  6742. Fdrawable TCARD32
  6743. Fgc TCARD32
  6744. }
  6745. type TxPolyFillRectangleReq = struct {
  6746. FreqType TCARD8
  6747. Fpad TBYTE
  6748. Flength TCARD16
  6749. Fdrawable TCARD32
  6750. Fgc TCARD32
  6751. }
  6752. type TxPolyFillArcReq = struct {
  6753. FreqType TCARD8
  6754. Fpad TBYTE
  6755. Flength TCARD16
  6756. Fdrawable TCARD32
  6757. Fgc TCARD32
  6758. }
  6759. type TxFillPolyReq = struct {
  6760. FreqType TCARD8
  6761. Fpad TBYTE
  6762. Flength TCARD16
  6763. Fdrawable TCARD32
  6764. Fgc TCARD32
  6765. Fshape TBYTE
  6766. FcoordMode TBYTE
  6767. Fpad1 TCARD16
  6768. }
  6769. type T_FillPolyReq = TxFillPolyReq
  6770. type TxPutImageReq = struct {
  6771. FreqType TCARD8
  6772. Fformat TCARD8
  6773. Flength TCARD16
  6774. Fdrawable TCARD32
  6775. Fgc TCARD32
  6776. Fwidth TCARD16
  6777. Fheight TCARD16
  6778. FdstX TINT16
  6779. FdstY TINT16
  6780. FleftPad TCARD8
  6781. Fdepth TCARD8
  6782. Fpad TCARD16
  6783. }
  6784. type T_PutImageReq = TxPutImageReq
  6785. type TxGetImageReq = struct {
  6786. FreqType TCARD8
  6787. Fformat TCARD8
  6788. Flength TCARD16
  6789. Fdrawable TCARD32
  6790. Fx TINT16
  6791. Fy TINT16
  6792. Fwidth TCARD16
  6793. Fheight TCARD16
  6794. FplaneMask TCARD32
  6795. }
  6796. type TxPolyTextReq = struct {
  6797. FreqType TCARD8
  6798. Fpad TCARD8
  6799. Flength TCARD16
  6800. Fdrawable TCARD32
  6801. Fgc TCARD32
  6802. Fx TINT16
  6803. Fy TINT16
  6804. }
  6805. type TxPolyText8Req = struct {
  6806. FreqType TCARD8
  6807. Fpad TCARD8
  6808. Flength TCARD16
  6809. Fdrawable TCARD32
  6810. Fgc TCARD32
  6811. Fx TINT16
  6812. Fy TINT16
  6813. }
  6814. type TxPolyText16Req = struct {
  6815. FreqType TCARD8
  6816. Fpad TCARD8
  6817. Flength TCARD16
  6818. Fdrawable TCARD32
  6819. Fgc TCARD32
  6820. Fx TINT16
  6821. Fy TINT16
  6822. }
  6823. type TxImageTextReq = struct {
  6824. FreqType TCARD8
  6825. FnChars TBYTE
  6826. Flength TCARD16
  6827. Fdrawable TCARD32
  6828. Fgc TCARD32
  6829. Fx TINT16
  6830. Fy TINT16
  6831. }
  6832. type TxImageText8Req = struct {
  6833. FreqType TCARD8
  6834. FnChars TBYTE
  6835. Flength TCARD16
  6836. Fdrawable TCARD32
  6837. Fgc TCARD32
  6838. Fx TINT16
  6839. Fy TINT16
  6840. }
  6841. type TxImageText16Req = struct {
  6842. FreqType TCARD8
  6843. FnChars TBYTE
  6844. Flength TCARD16
  6845. Fdrawable TCARD32
  6846. Fgc TCARD32
  6847. Fx TINT16
  6848. Fy TINT16
  6849. }
  6850. type TxCreateColormapReq = struct {
  6851. FreqType TCARD8
  6852. Falloc TBYTE
  6853. Flength TCARD16
  6854. Fmid TCARD32
  6855. Fwindow TCARD32
  6856. Fvisual TCARD32
  6857. }
  6858. type TxCopyColormapAndFreeReq = struct {
  6859. FreqType TCARD8
  6860. Fpad TBYTE
  6861. Flength TCARD16
  6862. Fmid TCARD32
  6863. FsrcCmap TCARD32
  6864. }
  6865. type TxAllocColorReq = struct {
  6866. FreqType TCARD8
  6867. Fpad TBYTE
  6868. Flength TCARD16
  6869. Fcmap TCARD32
  6870. Fred TCARD16
  6871. Fgreen TCARD16
  6872. Fblue TCARD16
  6873. Fpad2 TCARD16
  6874. }
  6875. type TxAllocNamedColorReq = struct {
  6876. FreqType TCARD8
  6877. Fpad TBYTE
  6878. Flength TCARD16
  6879. Fcmap TCARD32
  6880. Fnbytes TCARD16
  6881. Fpad1 TBYTE
  6882. Fpad2 TBYTE
  6883. }
  6884. type TxAllocColorCellsReq = struct {
  6885. FreqType TCARD8
  6886. Fcontiguous TBOOL
  6887. Flength TCARD16
  6888. Fcmap TCARD32
  6889. Fcolors TCARD16
  6890. Fplanes TCARD16
  6891. }
  6892. type TxAllocColorPlanesReq = struct {
  6893. FreqType TCARD8
  6894. Fcontiguous TBOOL
  6895. Flength TCARD16
  6896. Fcmap TCARD32
  6897. Fcolors TCARD16
  6898. Fred TCARD16
  6899. Fgreen TCARD16
  6900. Fblue TCARD16
  6901. }
  6902. type TxFreeColorsReq = struct {
  6903. FreqType TCARD8
  6904. Fpad TBYTE
  6905. Flength TCARD16
  6906. Fcmap TCARD32
  6907. FplaneMask TCARD32
  6908. }
  6909. type TxStoreColorsReq = struct {
  6910. FreqType TCARD8
  6911. Fpad TBYTE
  6912. Flength TCARD16
  6913. Fcmap TCARD32
  6914. }
  6915. type TxStoreNamedColorReq = struct {
  6916. FreqType TCARD8
  6917. Fflags TCARD8
  6918. Flength TCARD16
  6919. Fcmap TCARD32
  6920. Fpixel TCARD32
  6921. Fnbytes TCARD16
  6922. Fpad1 TBYTE
  6923. Fpad2 TBYTE
  6924. }
  6925. type TxQueryColorsReq = struct {
  6926. FreqType TCARD8
  6927. Fpad TBYTE
  6928. Flength TCARD16
  6929. Fcmap TCARD32
  6930. }
  6931. type TxLookupColorReq = struct {
  6932. FreqType TCARD8
  6933. Fpad TBYTE
  6934. Flength TCARD16
  6935. Fcmap TCARD32
  6936. Fnbytes TCARD16
  6937. Fpad1 TBYTE
  6938. Fpad2 TBYTE
  6939. }
  6940. type TxCreateCursorReq = struct {
  6941. FreqType TCARD8
  6942. Fpad TBYTE
  6943. Flength TCARD16
  6944. Fcid TCARD32
  6945. Fsource TCARD32
  6946. Fmask TCARD32
  6947. FforeRed TCARD16
  6948. FforeGreen TCARD16
  6949. FforeBlue TCARD16
  6950. FbackRed TCARD16
  6951. FbackGreen TCARD16
  6952. FbackBlue TCARD16
  6953. Fx TCARD16
  6954. Fy TCARD16
  6955. }
  6956. type TxCreateGlyphCursorReq = struct {
  6957. FreqType TCARD8
  6958. Fpad TBYTE
  6959. Flength TCARD16
  6960. Fcid TCARD32
  6961. Fsource TCARD32
  6962. Fmask TCARD32
  6963. FsourceChar TCARD16
  6964. FmaskChar TCARD16
  6965. FforeRed TCARD16
  6966. FforeGreen TCARD16
  6967. FforeBlue TCARD16
  6968. FbackRed TCARD16
  6969. FbackGreen TCARD16
  6970. FbackBlue TCARD16
  6971. }
  6972. type TxRecolorCursorReq = struct {
  6973. FreqType TCARD8
  6974. Fpad TBYTE
  6975. Flength TCARD16
  6976. Fcursor TCARD32
  6977. FforeRed TCARD16
  6978. FforeGreen TCARD16
  6979. FforeBlue TCARD16
  6980. FbackRed TCARD16
  6981. FbackGreen TCARD16
  6982. FbackBlue TCARD16
  6983. }
  6984. type TxQueryBestSizeReq = struct {
  6985. FreqType TCARD8
  6986. Fclass TCARD8
  6987. Flength TCARD16
  6988. Fdrawable TCARD32
  6989. Fwidth TCARD16
  6990. Fheight TCARD16
  6991. }
  6992. type TxQueryExtensionReq = struct {
  6993. FreqType TCARD8
  6994. Fpad TBYTE
  6995. Flength TCARD16
  6996. Fnbytes TCARD16
  6997. Fpad1 TBYTE
  6998. Fpad2 TBYTE
  6999. }
  7000. type TxSetModifierMappingReq = struct {
  7001. FreqType TCARD8
  7002. FnumKeyPerModifier TCARD8
  7003. Flength TCARD16
  7004. }
  7005. type TxSetPointerMappingReq = struct {
  7006. FreqType TCARD8
  7007. FnElts TCARD8
  7008. Flength TCARD16
  7009. }
  7010. type TxGetKeyboardMappingReq = struct {
  7011. FreqType TCARD8
  7012. Fpad TBYTE
  7013. Flength TCARD16
  7014. FfirstKeyCode TCARD8
  7015. Fcount TCARD8
  7016. Fpad1 TCARD16
  7017. }
  7018. type TxChangeKeyboardMappingReq = struct {
  7019. FreqType TCARD8
  7020. FkeyCodes TCARD8
  7021. Flength TCARD16
  7022. FfirstKeyCode TCARD8
  7023. FkeySymsPerKeyCode TCARD8
  7024. Fpad1 TCARD16
  7025. }
  7026. type TxChangeKeyboardControlReq = struct {
  7027. FreqType TCARD8
  7028. Fpad TBYTE
  7029. Flength TCARD16
  7030. Fmask TCARD32
  7031. }
  7032. type TxBellReq = struct {
  7033. FreqType TCARD8
  7034. Fpercent TINT8
  7035. Flength TCARD16
  7036. }
  7037. type TxChangePointerControlReq = struct {
  7038. FreqType TCARD8
  7039. Fpad TBYTE
  7040. Flength TCARD16
  7041. FaccelNum TINT16
  7042. FaccelDenum TINT16
  7043. Fthreshold TINT16
  7044. FdoAccel TBOOL
  7045. FdoThresh TBOOL
  7046. }
  7047. type TxSetScreenSaverReq = struct {
  7048. FreqType TCARD8
  7049. Fpad TBYTE
  7050. Flength TCARD16
  7051. Ftimeout TINT16
  7052. Finterval TINT16
  7053. FpreferBlank TBYTE
  7054. FallowExpose TBYTE
  7055. Fpad2 TCARD16
  7056. }
  7057. type TxChangeHostsReq = struct {
  7058. FreqType TCARD8
  7059. Fmode TBYTE
  7060. Flength TCARD16
  7061. FhostFamily TCARD8
  7062. Fpad TBYTE
  7063. FhostLength TCARD16
  7064. }
  7065. type TxListHostsReq = struct {
  7066. FreqType TCARD8
  7067. Fpad TBYTE
  7068. Flength TCARD16
  7069. }
  7070. type TxChangeModeReq = struct {
  7071. FreqType TCARD8
  7072. Fmode TBYTE
  7073. Flength TCARD16
  7074. }
  7075. type TxSetAccessControlReq = struct {
  7076. FreqType TCARD8
  7077. Fmode TBYTE
  7078. Flength TCARD16
  7079. }
  7080. type TxSetCloseDownModeReq = struct {
  7081. FreqType TCARD8
  7082. Fmode TBYTE
  7083. Flength TCARD16
  7084. }
  7085. type TxForceScreenSaverReq = struct {
  7086. FreqType TCARD8
  7087. Fmode TBYTE
  7088. Flength TCARD16
  7089. }
  7090. type TxRotatePropertiesReq = struct {
  7091. FreqType TCARD8
  7092. Fpad TBYTE
  7093. Flength TCARD16
  7094. Fwindow TCARD32
  7095. FnAtoms TCARD16
  7096. FnPositions TINT16
  7097. }
  7098. type T_XQEvent = struct {
  7099. Fnext uintptr
  7100. Fevent TXEvent
  7101. Fqserial_num uint64
  7102. }
  7103. type T_XSQEvent = T_XQEvent
  7104. type TLockInfoPtr = uintptr
  7105. type T_XLockPtrs = struct {
  7106. Flock_display uintptr
  7107. Funlock_display uintptr
  7108. }
  7109. type T_XAsyncHandler = struct {
  7110. Fnext uintptr
  7111. Fhandler uintptr
  7112. Fdata TXPointer
  7113. }
  7114. type T_XInternalAsync = T_XAsyncHandler
  7115. type T_XAsyncErrorState = struct {
  7116. Fmin_sequence_number uint64
  7117. Fmax_sequence_number uint64
  7118. Ferror_code uint8
  7119. Fmajor_opcode uint8
  7120. Fminor_opcode uint16
  7121. Flast_error_received uint8
  7122. Ferror_count int32
  7123. }
  7124. type T_XAsyncEState = T_XAsyncErrorState
  7125. type TFreeFuncType = uintptr
  7126. type TFreeModmapType = uintptr
  7127. type T_XFreeFuncRec = struct {
  7128. Fatoms TFreeFuncType
  7129. Fmodifiermap TFreeModmapType
  7130. Fkey_bindings TFreeFuncType
  7131. Fcontext_db TFreeFuncType
  7132. FdefaultCCCs TFreeFuncType
  7133. FclientCmaps TFreeFuncType
  7134. FintensityMaps TFreeFuncType
  7135. Fim_filters TFreeFuncType
  7136. Fxkb TFreeFuncType
  7137. }
  7138. type T_XFreeFuncs = T_XFreeFuncRec
  7139. type TCreateGCType = uintptr
  7140. type TCopyGCType = uintptr
  7141. type TFlushGCType = uintptr
  7142. type TFreeGCType = uintptr
  7143. type TCreateFontType = uintptr
  7144. type TFreeFontType = uintptr
  7145. type TCloseDisplayType = uintptr
  7146. type TErrorType = uintptr
  7147. type TErrorStringType = uintptr
  7148. type TPrintErrorType = uintptr
  7149. type TBeforeFlushType = uintptr
  7150. type T_XExtension = struct {
  7151. Fnext uintptr
  7152. Fcodes TXExtCodes
  7153. Fcreate_GC TCreateGCType
  7154. Fcopy_GC TCopyGCType
  7155. Fflush_GC TFlushGCType
  7156. Ffree_GC TFreeGCType
  7157. Fcreate_Font TCreateFontType
  7158. Ffree_Font TFreeFontType
  7159. Fclose_display TCloseDisplayType
  7160. Ferror1 TErrorType
  7161. Ferror_string TErrorStringType
  7162. Fname uintptr
  7163. Ferror_values TPrintErrorType
  7164. Fbefore_flush TBeforeFlushType
  7165. Fnext_flush uintptr
  7166. }
  7167. type T_XExten = T_XExtension
  7168. type T_XInternalConnectionProc = uintptr
  7169. type T_XConnectionInfo = struct {
  7170. Ffd int32
  7171. Fread_callback T_XInternalConnectionProc
  7172. Fcall_data TXPointer
  7173. Fwatch_data uintptr
  7174. Fnext uintptr
  7175. }
  7176. type T_XConnWatchInfo = struct {
  7177. Ffn TXConnectionWatchProc
  7178. Fclient_data TXPointer
  7179. Fnext uintptr
  7180. }
  7181. type t__jmp_buf = [23]uint64
  7182. type Tjmp_buf = [1]t__jmp_buf_tag
  7183. type t__jmp_buf_tag = struct {
  7184. F__jb t__jmp_buf
  7185. F__fl uint64
  7186. F__ss [16]uint64
  7187. }
  7188. type Tsigjmp_buf = [1]t__jmp_buf_tag
  7189. type TFT_Int16 = int16
  7190. type TFT_UInt16 = uint16
  7191. type TFT_Int32 = int32
  7192. type TFT_UInt32 = uint32
  7193. type TFT_Fast = int32
  7194. type TFT_UFast = uint32
  7195. type TFT_Int64 = int64
  7196. type TFT_UInt64 = uint64
  7197. type TFT_Memory = uintptr
  7198. type TFT_MemoryRec_ = struct {
  7199. Fuser uintptr
  7200. Falloc TFT_Alloc_Func
  7201. Ffree TFT_Free_Func
  7202. Frealloc TFT_Realloc_Func
  7203. }
  7204. type TFT_Alloc_Func = uintptr
  7205. type TFT_Free_Func = uintptr
  7206. type TFT_Realloc_Func = uintptr
  7207. type TFT_Stream = uintptr
  7208. type TFT_StreamRec_ = struct {
  7209. Fbase uintptr
  7210. Fsize uint64
  7211. Fpos uint64
  7212. Fdescriptor TFT_StreamDesc
  7213. Fpathname TFT_StreamDesc
  7214. Fread TFT_Stream_IoFunc
  7215. Fclose1 TFT_Stream_CloseFunc
  7216. Fmemory TFT_Memory
  7217. Fcursor uintptr
  7218. Flimit uintptr
  7219. }
  7220. type TFT_StreamDesc = struct {
  7221. Fpointer [0]uintptr
  7222. Fvalue int64
  7223. }
  7224. type TFT_StreamDesc_ = TFT_StreamDesc
  7225. type TFT_Stream_IoFunc = uintptr
  7226. type TFT_Stream_CloseFunc = uintptr
  7227. type TFT_StreamRec = struct {
  7228. Fbase uintptr
  7229. Fsize uint64
  7230. Fpos uint64
  7231. Fdescriptor TFT_StreamDesc
  7232. Fpathname TFT_StreamDesc
  7233. Fread TFT_Stream_IoFunc
  7234. Fclose1 TFT_Stream_CloseFunc
  7235. Fmemory TFT_Memory
  7236. Fcursor uintptr
  7237. Flimit uintptr
  7238. }
  7239. type TFT_Pos = int64
  7240. type TFT_Vector = struct {
  7241. Fx TFT_Pos
  7242. Fy TFT_Pos
  7243. }
  7244. type TFT_Vector_ = TFT_Vector
  7245. type TFT_BBox = struct {
  7246. FxMin TFT_Pos
  7247. FyMin TFT_Pos
  7248. FxMax TFT_Pos
  7249. FyMax TFT_Pos
  7250. }
  7251. type TFT_BBox_ = TFT_BBox
  7252. type TFT_Pixel_Mode = int32
  7253. type _FT_Pixel_Mode_ = int32
  7254. const _FT_PIXEL_MODE_NONE = 0
  7255. const _FT_PIXEL_MODE_MONO = 1
  7256. const _FT_PIXEL_MODE_GRAY = 2
  7257. const _FT_PIXEL_MODE_GRAY2 = 3
  7258. const _FT_PIXEL_MODE_GRAY4 = 4
  7259. const _FT_PIXEL_MODE_LCD = 5
  7260. const _FT_PIXEL_MODE_LCD_V = 6
  7261. const _FT_PIXEL_MODE_BGRA = 7
  7262. const _FT_PIXEL_MODE_MAX = 8
  7263. type TFT_Bitmap = struct {
  7264. Frows uint32
  7265. Fwidth uint32
  7266. Fpitch int32
  7267. Fbuffer uintptr
  7268. Fnum_grays uint16
  7269. Fpixel_mode uint8
  7270. Fpalette_mode uint8
  7271. Fpalette uintptr
  7272. }
  7273. type TFT_Bitmap_ = TFT_Bitmap
  7274. type TFT_Outline = struct {
  7275. Fn_contours int16
  7276. Fn_points int16
  7277. Fpoints uintptr
  7278. Ftags uintptr
  7279. Fcontours uintptr
  7280. Fflags int32
  7281. }
  7282. type TFT_Outline_ = TFT_Outline
  7283. type TFT_Outline_MoveToFunc = uintptr
  7284. type TFT_Outline_LineToFunc = uintptr
  7285. type TFT_Outline_ConicToFunc = uintptr
  7286. type TFT_Outline_CubicToFunc = uintptr
  7287. type TFT_Outline_Funcs = struct {
  7288. Fmove_to TFT_Outline_MoveToFunc
  7289. Fline_to TFT_Outline_LineToFunc
  7290. Fconic_to TFT_Outline_ConicToFunc
  7291. Fcubic_to TFT_Outline_CubicToFunc
  7292. Fshift int32
  7293. Fdelta TFT_Pos
  7294. }
  7295. type TFT_Outline_Funcs_ = TFT_Outline_Funcs
  7296. type TFT_Glyph_Format = int32
  7297. type _FT_Glyph_Format_ = int32
  7298. const _FT_GLYPH_FORMAT_NONE = 0
  7299. const _FT_GLYPH_FORMAT_COMPOSITE = 1668246896
  7300. const _FT_GLYPH_FORMAT_BITMAP = 1651078259
  7301. const _FT_GLYPH_FORMAT_OUTLINE = 1869968492
  7302. const _FT_GLYPH_FORMAT_PLOTTER = 1886154612
  7303. const _FT_GLYPH_FORMAT_SVG = 1398163232
  7304. type TFT_Span = struct {
  7305. Fx int16
  7306. Flen1 uint16
  7307. Fcoverage uint8
  7308. }
  7309. type TFT_Span_ = TFT_Span
  7310. type TFT_SpanFunc = uintptr
  7311. type TFT_Raster_BitTest_Func = uintptr
  7312. type TFT_Raster_BitSet_Func = uintptr
  7313. type TFT_Raster_Params = struct {
  7314. Ftarget uintptr
  7315. Fsource uintptr
  7316. Fflags int32
  7317. Fgray_spans TFT_SpanFunc
  7318. Fblack_spans TFT_SpanFunc
  7319. Fbit_test TFT_Raster_BitTest_Func
  7320. Fbit_set TFT_Raster_BitSet_Func
  7321. Fuser uintptr
  7322. Fclip_box TFT_BBox
  7323. }
  7324. type TFT_Raster_Params_ = TFT_Raster_Params
  7325. type TFT_Raster = uintptr
  7326. type TFT_Raster_NewFunc = uintptr
  7327. type TFT_Raster_DoneFunc = uintptr
  7328. type TFT_Raster_ResetFunc = uintptr
  7329. type TFT_Raster_SetModeFunc = uintptr
  7330. type TFT_Raster_RenderFunc = uintptr
  7331. type TFT_Raster_Funcs = struct {
  7332. Fglyph_format TFT_Glyph_Format
  7333. Fraster_new TFT_Raster_NewFunc
  7334. Fraster_reset TFT_Raster_ResetFunc
  7335. Fraster_set_mode TFT_Raster_SetModeFunc
  7336. Fraster_render TFT_Raster_RenderFunc
  7337. Fraster_done TFT_Raster_DoneFunc
  7338. }
  7339. type TFT_Raster_Funcs_ = TFT_Raster_Funcs
  7340. type TFT_Bool = uint8
  7341. type TFT_FWord = int16
  7342. type TFT_UFWord = uint16
  7343. type TFT_Char = int8
  7344. type TFT_Byte = uint8
  7345. type TFT_Bytes = uintptr
  7346. type TFT_Tag = uint32
  7347. type TFT_String = int8
  7348. type TFT_Short = int16
  7349. type TFT_UShort = uint16
  7350. type TFT_Int = int32
  7351. type TFT_UInt = uint32
  7352. type TFT_Long = int64
  7353. type TFT_ULong = uint64
  7354. type TFT_F2Dot14 = int16
  7355. type TFT_F26Dot6 = int64
  7356. type TFT_Fixed = int64
  7357. type TFT_Error = int32
  7358. type TFT_Pointer = uintptr
  7359. type TFT_Offset = uint64
  7360. type TFT_PtrDist = int64
  7361. type TFT_UnitVector = struct {
  7362. Fx TFT_F2Dot14
  7363. Fy TFT_F2Dot14
  7364. }
  7365. type TFT_UnitVector_ = TFT_UnitVector
  7366. type TFT_Matrix = struct {
  7367. Fxx TFT_Fixed
  7368. Fxy TFT_Fixed
  7369. Fyx TFT_Fixed
  7370. Fyy TFT_Fixed
  7371. }
  7372. type TFT_Matrix_ = TFT_Matrix
  7373. type TFT_Data = struct {
  7374. Fpointer uintptr
  7375. Flength TFT_UInt
  7376. }
  7377. type TFT_Data_ = TFT_Data
  7378. type TFT_Generic_Finalizer = uintptr
  7379. type TFT_Generic = struct {
  7380. Fdata uintptr
  7381. Ffinalizer TFT_Generic_Finalizer
  7382. }
  7383. type TFT_Generic_ = TFT_Generic
  7384. type TFT_ListNode = uintptr
  7385. type TFT_ListNodeRec_ = struct {
  7386. Fprev TFT_ListNode
  7387. Fnext TFT_ListNode
  7388. Fdata uintptr
  7389. }
  7390. type TFT_List = uintptr
  7391. type TFT_ListRec_ = struct {
  7392. Fhead TFT_ListNode
  7393. Ftail TFT_ListNode
  7394. }
  7395. type TFT_ListNodeRec = struct {
  7396. Fprev TFT_ListNode
  7397. Fnext TFT_ListNode
  7398. Fdata uintptr
  7399. }
  7400. type TFT_ListRec = struct {
  7401. Fhead TFT_ListNode
  7402. Ftail TFT_ListNode
  7403. }
  7404. const _FT_Mod_Err_Base = 0
  7405. const _FT_Mod_Err_Autofit = 0
  7406. const _FT_Mod_Err_BDF = 0
  7407. const _FT_Mod_Err_Bzip2 = 0
  7408. const _FT_Mod_Err_Cache = 0
  7409. const _FT_Mod_Err_CFF = 0
  7410. const _FT_Mod_Err_CID = 0
  7411. const _FT_Mod_Err_Gzip = 0
  7412. const _FT_Mod_Err_LZW = 0
  7413. const _FT_Mod_Err_OTvalid = 0
  7414. const _FT_Mod_Err_PCF = 0
  7415. const _FT_Mod_Err_PFR = 0
  7416. const _FT_Mod_Err_PSaux = 0
  7417. const _FT_Mod_Err_PShinter = 0
  7418. const _FT_Mod_Err_PSnames = 0
  7419. const _FT_Mod_Err_Raster = 0
  7420. const _FT_Mod_Err_SFNT = 0
  7421. const _FT_Mod_Err_Smooth = 0
  7422. const _FT_Mod_Err_TrueType = 0
  7423. const _FT_Mod_Err_Type1 = 0
  7424. const _FT_Mod_Err_Type42 = 0
  7425. const _FT_Mod_Err_Winfonts = 0
  7426. const _FT_Mod_Err_GXvalid = 0
  7427. const _FT_Mod_Err_Sdf = 0
  7428. const _FT_Mod_Err_Max = 1
  7429. const _FT_Err_Ok = 0
  7430. const _FT_Err_Cannot_Open_Resource = 1
  7431. const _FT_Err_Unknown_File_Format = 2
  7432. const _FT_Err_Invalid_File_Format = 3
  7433. const _FT_Err_Invalid_Version = 4
  7434. const _FT_Err_Lower_Module_Version = 5
  7435. const _FT_Err_Invalid_Argument = 6
  7436. const _FT_Err_Unimplemented_Feature = 7
  7437. const _FT_Err_Invalid_Table = 8
  7438. const _FT_Err_Invalid_Offset = 9
  7439. const _FT_Err_Array_Too_Large = 10
  7440. const _FT_Err_Missing_Module = 11
  7441. const _FT_Err_Missing_Property = 12
  7442. const _FT_Err_Invalid_Glyph_Index = 16
  7443. const _FT_Err_Invalid_Character_Code = 17
  7444. const _FT_Err_Invalid_Glyph_Format = 18
  7445. const _FT_Err_Cannot_Render_Glyph = 19
  7446. const _FT_Err_Invalid_Outline = 20
  7447. const _FT_Err_Invalid_Composite = 21
  7448. const _FT_Err_Too_Many_Hints = 22
  7449. const _FT_Err_Invalid_Pixel_Size = 23
  7450. const _FT_Err_Invalid_SVG_Document = 24
  7451. const _FT_Err_Invalid_Handle = 32
  7452. const _FT_Err_Invalid_Library_Handle = 33
  7453. const _FT_Err_Invalid_Driver_Handle = 34
  7454. const _FT_Err_Invalid_Face_Handle = 35
  7455. const _FT_Err_Invalid_Size_Handle = 36
  7456. const _FT_Err_Invalid_Slot_Handle = 37
  7457. const _FT_Err_Invalid_CharMap_Handle = 38
  7458. const _FT_Err_Invalid_Cache_Handle = 39
  7459. const _FT_Err_Invalid_Stream_Handle = 40
  7460. const _FT_Err_Too_Many_Drivers = 48
  7461. const _FT_Err_Too_Many_Extensions = 49
  7462. const _FT_Err_Out_Of_Memory = 64
  7463. const _FT_Err_Unlisted_Object = 65
  7464. const _FT_Err_Cannot_Open_Stream = 81
  7465. const _FT_Err_Invalid_Stream_Seek = 82
  7466. const _FT_Err_Invalid_Stream_Skip = 83
  7467. const _FT_Err_Invalid_Stream_Read = 84
  7468. const _FT_Err_Invalid_Stream_Operation = 85
  7469. const _FT_Err_Invalid_Frame_Operation = 86
  7470. const _FT_Err_Nested_Frame_Access = 87
  7471. const _FT_Err_Invalid_Frame_Read = 88
  7472. const _FT_Err_Raster_Uninitialized = 96
  7473. const _FT_Err_Raster_Corrupted = 97
  7474. const _FT_Err_Raster_Overflow = 98
  7475. const _FT_Err_Raster_Negative_Height = 99
  7476. const _FT_Err_Too_Many_Caches = 112
  7477. const _FT_Err_Invalid_Opcode = 128
  7478. const _FT_Err_Too_Few_Arguments = 129
  7479. const _FT_Err_Stack_Overflow = 130
  7480. const _FT_Err_Code_Overflow = 131
  7481. const _FT_Err_Bad_Argument = 132
  7482. const _FT_Err_Divide_By_Zero = 133
  7483. const _FT_Err_Invalid_Reference = 134
  7484. const _FT_Err_Debug_OpCode = 135
  7485. const _FT_Err_ENDF_In_Exec_Stream = 136
  7486. const _FT_Err_Nested_DEFS = 137
  7487. const _FT_Err_Invalid_CodeRange = 138
  7488. const _FT_Err_Execution_Too_Long = 139
  7489. const _FT_Err_Too_Many_Function_Defs = 140
  7490. const _FT_Err_Too_Many_Instruction_Defs = 141
  7491. const _FT_Err_Table_Missing = 142
  7492. const _FT_Err_Horiz_Header_Missing = 143
  7493. const _FT_Err_Locations_Missing = 144
  7494. const _FT_Err_Name_Table_Missing = 145
  7495. const _FT_Err_CMap_Table_Missing = 146
  7496. const _FT_Err_Hmtx_Table_Missing = 147
  7497. const _FT_Err_Post_Table_Missing = 148
  7498. const _FT_Err_Invalid_Horiz_Metrics = 149
  7499. const _FT_Err_Invalid_CharMap_Format = 150
  7500. const _FT_Err_Invalid_PPem = 151
  7501. const _FT_Err_Invalid_Vert_Metrics = 152
  7502. const _FT_Err_Could_Not_Find_Context = 153
  7503. const _FT_Err_Invalid_Post_Table_Format = 154
  7504. const _FT_Err_Invalid_Post_Table = 155
  7505. const _FT_Err_DEF_In_Glyf_Bytecode = 156
  7506. const _FT_Err_Missing_Bitmap = 157
  7507. const _FT_Err_Missing_SVG_Hooks = 158
  7508. const _FT_Err_Syntax_Error = 160
  7509. const _FT_Err_Stack_Underflow = 161
  7510. const _FT_Err_Ignore = 162
  7511. const _FT_Err_No_Unicode_Glyph_Name = 163
  7512. const _FT_Err_Glyph_Too_Big = 164
  7513. const _FT_Err_Missing_Startfont_Field = 176
  7514. const _FT_Err_Missing_Font_Field = 177
  7515. const _FT_Err_Missing_Size_Field = 178
  7516. const _FT_Err_Missing_Fontboundingbox_Field = 179
  7517. const _FT_Err_Missing_Chars_Field = 180
  7518. const _FT_Err_Missing_Startchar_Field = 181
  7519. const _FT_Err_Missing_Encoding_Field = 182
  7520. const _FT_Err_Missing_Bbx_Field = 183
  7521. const _FT_Err_Bbx_Too_Big = 184
  7522. const _FT_Err_Corrupted_Font_Header = 185
  7523. const _FT_Err_Corrupted_Font_Glyphs = 186
  7524. const _FT_Err_Max = 187
  7525. type TFT_Glyph_Metrics = struct {
  7526. Fwidth TFT_Pos
  7527. Fheight TFT_Pos
  7528. FhoriBearingX TFT_Pos
  7529. FhoriBearingY TFT_Pos
  7530. FhoriAdvance TFT_Pos
  7531. FvertBearingX TFT_Pos
  7532. FvertBearingY TFT_Pos
  7533. FvertAdvance TFT_Pos
  7534. }
  7535. type TFT_Glyph_Metrics_ = TFT_Glyph_Metrics
  7536. type TFT_Bitmap_Size = struct {
  7537. Fheight TFT_Short
  7538. Fwidth TFT_Short
  7539. Fsize TFT_Pos
  7540. Fx_ppem TFT_Pos
  7541. Fy_ppem TFT_Pos
  7542. }
  7543. type TFT_Bitmap_Size_ = TFT_Bitmap_Size
  7544. type TFT_Library = uintptr
  7545. type TFT_Module = uintptr
  7546. type TFT_Driver = uintptr
  7547. type TFT_Renderer = uintptr
  7548. type TFT_Face = uintptr
  7549. type TFT_FaceRec_ = struct {
  7550. Fnum_faces TFT_Long
  7551. Fface_index TFT_Long
  7552. Fface_flags TFT_Long
  7553. Fstyle_flags TFT_Long
  7554. Fnum_glyphs TFT_Long
  7555. Ffamily_name uintptr
  7556. Fstyle_name uintptr
  7557. Fnum_fixed_sizes TFT_Int
  7558. Favailable_sizes uintptr
  7559. Fnum_charmaps TFT_Int
  7560. Fcharmaps uintptr
  7561. Fgeneric TFT_Generic
  7562. Fbbox TFT_BBox
  7563. Funits_per_EM TFT_UShort
  7564. Fascender TFT_Short
  7565. Fdescender TFT_Short
  7566. Fheight TFT_Short
  7567. Fmax_advance_width TFT_Short
  7568. Fmax_advance_height TFT_Short
  7569. Funderline_position TFT_Short
  7570. Funderline_thickness TFT_Short
  7571. Fglyph TFT_GlyphSlot
  7572. Fsize TFT_Size
  7573. Fcharmap TFT_CharMap
  7574. Fdriver TFT_Driver
  7575. Fmemory TFT_Memory
  7576. Fstream TFT_Stream
  7577. Fsizes_list TFT_ListRec
  7578. Fautohint TFT_Generic
  7579. Fextensions uintptr
  7580. Finternal TFT_Face_Internal
  7581. }
  7582. type TFT_Size = uintptr
  7583. type TFT_SizeRec_ = struct {
  7584. Fface TFT_Face
  7585. Fgeneric TFT_Generic
  7586. Fmetrics TFT_Size_Metrics
  7587. Finternal TFT_Size_Internal
  7588. }
  7589. type TFT_GlyphSlot = uintptr
  7590. type TFT_GlyphSlotRec_ = struct {
  7591. Flibrary TFT_Library
  7592. Fface TFT_Face
  7593. Fnext TFT_GlyphSlot
  7594. Fglyph_index TFT_UInt
  7595. Fgeneric TFT_Generic
  7596. Fmetrics TFT_Glyph_Metrics
  7597. FlinearHoriAdvance TFT_Fixed
  7598. FlinearVertAdvance TFT_Fixed
  7599. Fadvance TFT_Vector
  7600. Fformat TFT_Glyph_Format
  7601. Fbitmap TFT_Bitmap
  7602. Fbitmap_left TFT_Int
  7603. Fbitmap_top TFT_Int
  7604. Foutline TFT_Outline
  7605. Fnum_subglyphs TFT_UInt
  7606. Fsubglyphs TFT_SubGlyph
  7607. Fcontrol_data uintptr
  7608. Fcontrol_len int64
  7609. Flsb_delta TFT_Pos
  7610. Frsb_delta TFT_Pos
  7611. Fother uintptr
  7612. Finternal TFT_Slot_Internal
  7613. }
  7614. type TFT_CharMap = uintptr
  7615. type TFT_CharMapRec_ = struct {
  7616. Fface TFT_Face
  7617. Fencoding TFT_Encoding
  7618. Fplatform_id TFT_UShort
  7619. Fencoding_id TFT_UShort
  7620. }
  7621. type _FT_Encoding_ = int32
  7622. const _FT_ENCODING_NONE = 0
  7623. const _FT_ENCODING_MS_SYMBOL = 1937337698
  7624. const _FT_ENCODING_UNICODE = 1970170211
  7625. const _FT_ENCODING_SJIS = 1936353651
  7626. const _FT_ENCODING_PRC = 1734484000
  7627. const _FT_ENCODING_BIG5 = 1651074869
  7628. const _FT_ENCODING_WANSUNG = 2002873971
  7629. const _FT_ENCODING_JOHAB = 1785686113
  7630. const _FT_ENCODING_GB2312 = 1734484000
  7631. const _FT_ENCODING_MS_SJIS = 1936353651
  7632. const _FT_ENCODING_MS_GB2312 = 1734484000
  7633. const _FT_ENCODING_MS_BIG5 = 1651074869
  7634. const _FT_ENCODING_MS_WANSUNG = 2002873971
  7635. const _FT_ENCODING_MS_JOHAB = 1785686113
  7636. const _FT_ENCODING_ADOBE_STANDARD = 1094995778
  7637. const _FT_ENCODING_ADOBE_EXPERT = 1094992453
  7638. const _FT_ENCODING_ADOBE_CUSTOM = 1094992451
  7639. const _FT_ENCODING_ADOBE_LATIN_1 = 1818326065
  7640. const _FT_ENCODING_OLD_LATIN_2 = 1818326066
  7641. const _FT_ENCODING_APPLE_ROMAN = 1634889070
  7642. type TFT_Encoding = int32
  7643. type TFT_CharMapRec = struct {
  7644. Fface TFT_Face
  7645. Fencoding TFT_Encoding
  7646. Fplatform_id TFT_UShort
  7647. Fencoding_id TFT_UShort
  7648. }
  7649. type TFT_Face_Internal = uintptr
  7650. type TFT_FaceRec = struct {
  7651. Fnum_faces TFT_Long
  7652. Fface_index TFT_Long
  7653. Fface_flags TFT_Long
  7654. Fstyle_flags TFT_Long
  7655. Fnum_glyphs TFT_Long
  7656. Ffamily_name uintptr
  7657. Fstyle_name uintptr
  7658. Fnum_fixed_sizes TFT_Int
  7659. Favailable_sizes uintptr
  7660. Fnum_charmaps TFT_Int
  7661. Fcharmaps uintptr
  7662. Fgeneric TFT_Generic
  7663. Fbbox TFT_BBox
  7664. Funits_per_EM TFT_UShort
  7665. Fascender TFT_Short
  7666. Fdescender TFT_Short
  7667. Fheight TFT_Short
  7668. Fmax_advance_width TFT_Short
  7669. Fmax_advance_height TFT_Short
  7670. Funderline_position TFT_Short
  7671. Funderline_thickness TFT_Short
  7672. Fglyph TFT_GlyphSlot
  7673. Fsize TFT_Size
  7674. Fcharmap TFT_CharMap
  7675. Fdriver TFT_Driver
  7676. Fmemory TFT_Memory
  7677. Fstream TFT_Stream
  7678. Fsizes_list TFT_ListRec
  7679. Fautohint TFT_Generic
  7680. Fextensions uintptr
  7681. Finternal TFT_Face_Internal
  7682. }
  7683. type TFT_Size_Internal = uintptr
  7684. type TFT_Size_Metrics = struct {
  7685. Fx_ppem TFT_UShort
  7686. Fy_ppem TFT_UShort
  7687. Fx_scale TFT_Fixed
  7688. Fy_scale TFT_Fixed
  7689. Fascender TFT_Pos
  7690. Fdescender TFT_Pos
  7691. Fheight TFT_Pos
  7692. Fmax_advance TFT_Pos
  7693. }
  7694. type TFT_Size_Metrics_ = TFT_Size_Metrics
  7695. type TFT_SizeRec = struct {
  7696. Fface TFT_Face
  7697. Fgeneric TFT_Generic
  7698. Fmetrics TFT_Size_Metrics
  7699. Finternal TFT_Size_Internal
  7700. }
  7701. type TFT_SubGlyph = uintptr
  7702. type TFT_Slot_Internal = uintptr
  7703. type TFT_GlyphSlotRec = struct {
  7704. Flibrary TFT_Library
  7705. Fface TFT_Face
  7706. Fnext TFT_GlyphSlot
  7707. Fglyph_index TFT_UInt
  7708. Fgeneric TFT_Generic
  7709. Fmetrics TFT_Glyph_Metrics
  7710. FlinearHoriAdvance TFT_Fixed
  7711. FlinearVertAdvance TFT_Fixed
  7712. Fadvance TFT_Vector
  7713. Fformat TFT_Glyph_Format
  7714. Fbitmap TFT_Bitmap
  7715. Fbitmap_left TFT_Int
  7716. Fbitmap_top TFT_Int
  7717. Foutline TFT_Outline
  7718. Fnum_subglyphs TFT_UInt
  7719. Fsubglyphs TFT_SubGlyph
  7720. Fcontrol_data uintptr
  7721. Fcontrol_len int64
  7722. Flsb_delta TFT_Pos
  7723. Frsb_delta TFT_Pos
  7724. Fother uintptr
  7725. Finternal TFT_Slot_Internal
  7726. }
  7727. type TFT_Parameter = struct {
  7728. Ftag TFT_ULong
  7729. Fdata TFT_Pointer
  7730. }
  7731. type TFT_Parameter_ = TFT_Parameter
  7732. type TFT_Open_Args = struct {
  7733. Fflags TFT_UInt
  7734. Fmemory_base uintptr
  7735. Fmemory_size TFT_Long
  7736. Fpathname uintptr
  7737. Fstream TFT_Stream
  7738. Fdriver TFT_Module
  7739. Fnum_params TFT_Int
  7740. Fparams uintptr
  7741. }
  7742. type TFT_Open_Args_ = TFT_Open_Args
  7743. type TFT_Size_Request_Type = int32
  7744. type _FT_Size_Request_Type_ = int32
  7745. const _FT_SIZE_REQUEST_TYPE_NOMINAL = 0
  7746. const _FT_SIZE_REQUEST_TYPE_REAL_DIM = 1
  7747. const _FT_SIZE_REQUEST_TYPE_BBOX = 2
  7748. const _FT_SIZE_REQUEST_TYPE_CELL = 3
  7749. const _FT_SIZE_REQUEST_TYPE_SCALES = 4
  7750. const _FT_SIZE_REQUEST_TYPE_MAX = 5
  7751. type TFT_Size_RequestRec = struct {
  7752. Ftype1 TFT_Size_Request_Type
  7753. Fwidth TFT_Long
  7754. Fheight TFT_Long
  7755. FhoriResolution TFT_UInt
  7756. FvertResolution TFT_UInt
  7757. }
  7758. type TFT_Size_RequestRec_ = TFT_Size_RequestRec
  7759. type TFT_Size_Request = uintptr
  7760. type TFT_Render_Mode = int32
  7761. type _FT_Render_Mode_ = int32
  7762. const _FT_RENDER_MODE_NORMAL = 0
  7763. const _FT_RENDER_MODE_LIGHT = 1
  7764. const _FT_RENDER_MODE_MONO = 2
  7765. const _FT_RENDER_MODE_LCD = 3
  7766. const _FT_RENDER_MODE_LCD_V = 4
  7767. const _FT_RENDER_MODE_SDF = 5
  7768. const _FT_RENDER_MODE_MAX = 6
  7769. type TFT_Kerning_Mode = int32
  7770. type _FT_Kerning_Mode_ = int32
  7771. const _FT_KERNING_DEFAULT = 0
  7772. const _FT_KERNING_UNFITTED = 1
  7773. const _FT_KERNING_UNSCALED = 2
  7774. type Tstat = struct {
  7775. Fst_dev Tdev_t
  7776. Fst_ino Tino_t
  7777. Fst_mode Tmode_t
  7778. Fst_nlink Tnlink_t
  7779. Fst_uid Tuid_t
  7780. Fst_gid Tgid_t
  7781. Fst_rdev Tdev_t
  7782. F__pad uint64
  7783. Fst_size Toff_t
  7784. Fst_blksize Tblksize_t
  7785. F__pad2 int32
  7786. Fst_blocks Tblkcnt_t
  7787. Fst_atim Ttimespec
  7788. Fst_mtim Ttimespec
  7789. Fst_ctim Ttimespec
  7790. F__unused [2]uint32
  7791. }
  7792. type Tstatx_timestamp = struct {
  7793. Ftv_sec Tint64_t
  7794. Ftv_nsec Tuint32_t
  7795. F__pad Tuint32_t
  7796. }
  7797. type Tstatx = struct {
  7798. Fstx_mask Tuint32_t
  7799. Fstx_blksize Tuint32_t
  7800. Fstx_attributes Tuint64_t
  7801. Fstx_nlink Tuint32_t
  7802. Fstx_uid Tuint32_t
  7803. Fstx_gid Tuint32_t
  7804. Fstx_mode Tuint16_t
  7805. F__pad0 [1]Tuint16_t
  7806. Fstx_ino Tuint64_t
  7807. Fstx_size Tuint64_t
  7808. Fstx_blocks Tuint64_t
  7809. Fstx_attributes_mask Tuint64_t
  7810. Fstx_atime Tstatx_timestamp
  7811. Fstx_btime Tstatx_timestamp
  7812. Fstx_ctime Tstatx_timestamp
  7813. Fstx_mtime Tstatx_timestamp
  7814. Fstx_rdev_major Tuint32_t
  7815. Fstx_rdev_minor Tuint32_t
  7816. Fstx_dev_major Tuint32_t
  7817. Fstx_dev_minor Tuint32_t
  7818. F__pad1 [14]Tuint64_t
  7819. }
  7820. type TFcChar8 = uint8
  7821. type TFcChar16 = uint16
  7822. type TFcChar32 = uint32
  7823. type TFcBool = int32
  7824. type TFcType = int32
  7825. type __FcType = int32
  7826. const _FcTypeUnknown = -1
  7827. const _FcTypeVoid = 0
  7828. const _FcTypeInteger = 1
  7829. const _FcTypeDouble = 2
  7830. const _FcTypeString = 3
  7831. const _FcTypeBool = 4
  7832. const _FcTypeMatrix = 5
  7833. const _FcTypeCharSet = 6
  7834. const _FcTypeFTFace = 7
  7835. const _FcTypeLangSet = 8
  7836. const _FcTypeRange = 9
  7837. type TFcMatrix = struct {
  7838. Fxx float64
  7839. Fxy float64
  7840. Fyx float64
  7841. Fyy float64
  7842. }
  7843. type T_FcMatrix = TFcMatrix
  7844. type TFcObjectType = struct {
  7845. Fobject uintptr
  7846. Ftype1 TFcType
  7847. }
  7848. type T_FcObjectType = TFcObjectType
  7849. type TFcConstant = struct {
  7850. Fname uintptr
  7851. Fobject uintptr
  7852. Fvalue int32
  7853. }
  7854. type T_FcConstant = TFcConstant
  7855. type TFcResult = int32
  7856. type __FcResult = int32
  7857. const _FcResultMatch = 0
  7858. const _FcResultNoMatch = 1
  7859. const _FcResultTypeMismatch = 2
  7860. const _FcResultNoId = 3
  7861. const _FcResultOutOfMemory = 4
  7862. type TFcValueBinding = int32
  7863. type __FcValueBinding = int32
  7864. const _FcValueBindingWeak = 0
  7865. const _FcValueBindingStrong = 1
  7866. const _FcValueBindingSame = 2
  7867. const _FcValueBindingEnd = 2147483647
  7868. type TFcPatternIter = struct {
  7869. Fdummy1 uintptr
  7870. Fdummy2 uintptr
  7871. }
  7872. type T_FcPatternIter = TFcPatternIter
  7873. type TFcValue = struct {
  7874. Ftype1 TFcType
  7875. Fu struct {
  7876. Fi [0]int32
  7877. Fb [0]TFcBool
  7878. Fd [0]float64
  7879. Fm [0]uintptr
  7880. Fc [0]uintptr
  7881. Ff [0]uintptr
  7882. Fl [0]uintptr
  7883. Fr [0]uintptr
  7884. Fs uintptr
  7885. }
  7886. }
  7887. type T_FcValue = TFcValue
  7888. type TFcFontSet = struct {
  7889. Fnfont int32
  7890. Fsfont int32
  7891. Ffonts uintptr
  7892. }
  7893. type T_FcFontSet = TFcFontSet
  7894. type TFcObjectSet = struct {
  7895. Fnobject int32
  7896. Fsobject int32
  7897. Fobjects uintptr
  7898. }
  7899. type T_FcObjectSet = TFcObjectSet
  7900. type TFcMatchKind = int32
  7901. type __FcMatchKind = int32
  7902. const _FcMatchPattern = 0
  7903. const _FcMatchFont = 1
  7904. const _FcMatchScan = 2
  7905. const _FcMatchKindEnd = 3
  7906. const _FcMatchKindBegin = 0
  7907. type TFcLangResult = int32
  7908. type __FcLangResult = int32
  7909. const _FcLangEqual = 0
  7910. const _FcLangDifferentCountry = 1
  7911. const _FcLangDifferentTerritory = 1
  7912. const _FcLangDifferentLang = 2
  7913. type TFcSetName = int32
  7914. type __FcSetName = int32
  7915. const _FcSetSystem = 0
  7916. const _FcSetApplication = 1
  7917. type TFcConfigFileInfoIter = struct {
  7918. Fdummy1 uintptr
  7919. Fdummy2 uintptr
  7920. Fdummy3 uintptr
  7921. }
  7922. type T_FcConfigFileInfoIter = TFcConfigFileInfoIter
  7923. type TFcEndian = int32
  7924. const _FcEndianBig = 0
  7925. const _FcEndianLittle = 1
  7926. type Tpointer = uintptr
  7927. type TClientPtr = uintptr
  7928. type TFontPtr = uintptr
  7929. type TFSID = uint64
  7930. type TAccContext = uint64
  7931. type TOSTimePtr = uintptr
  7932. type TBlockHandlerProcPtr = uintptr
  7933. type TGlyph = uint64
  7934. type TGlyphSet = uint64
  7935. type TPicture = uint64
  7936. type TPictFormat = uint64
  7937. type TXRenderDirectFormat = struct {
  7938. Fred int16
  7939. FredMask int16
  7940. Fgreen int16
  7941. FgreenMask int16
  7942. Fblue int16
  7943. FblueMask int16
  7944. Falpha int16
  7945. FalphaMask int16
  7946. }
  7947. type TXRenderPictFormat = struct {
  7948. Fid TPictFormat
  7949. Ftype1 int32
  7950. Fdepth int32
  7951. Fdirect TXRenderDirectFormat
  7952. Fcolormap TColormap
  7953. }
  7954. type TXRenderPictureAttributes = struct {
  7955. Frepeat int32
  7956. Falpha_map TPicture
  7957. Falpha_x_origin int32
  7958. Falpha_y_origin int32
  7959. Fclip_x_origin int32
  7960. Fclip_y_origin int32
  7961. Fclip_mask TPixmap
  7962. Fgraphics_exposures int32
  7963. Fsubwindow_mode int32
  7964. Fpoly_edge int32
  7965. Fpoly_mode int32
  7966. Fdither TAtom
  7967. Fcomponent_alpha int32
  7968. }
  7969. type T_XRenderPictureAttributes = TXRenderPictureAttributes
  7970. type TXRenderColor = struct {
  7971. Fred uint16
  7972. Fgreen uint16
  7973. Fblue uint16
  7974. Falpha uint16
  7975. }
  7976. type TXGlyphInfo = struct {
  7977. Fwidth uint16
  7978. Fheight uint16
  7979. Fx int16
  7980. Fy int16
  7981. FxOff int16
  7982. FyOff int16
  7983. }
  7984. type T_XGlyphInfo = TXGlyphInfo
  7985. type TXGlyphElt8 = struct {
  7986. Fglyphset TGlyphSet
  7987. Fchars uintptr
  7988. Fnchars int32
  7989. FxOff int32
  7990. FyOff int32
  7991. }
  7992. type T_XGlyphElt8 = TXGlyphElt8
  7993. type TXGlyphElt16 = struct {
  7994. Fglyphset TGlyphSet
  7995. Fchars uintptr
  7996. Fnchars int32
  7997. FxOff int32
  7998. FyOff int32
  7999. }
  8000. type T_XGlyphElt16 = TXGlyphElt16
  8001. type TXGlyphElt32 = struct {
  8002. Fglyphset TGlyphSet
  8003. Fchars uintptr
  8004. Fnchars int32
  8005. FxOff int32
  8006. FyOff int32
  8007. }
  8008. type T_XGlyphElt32 = TXGlyphElt32
  8009. type TXDouble = float64
  8010. type TXPointDouble = struct {
  8011. Fx TXDouble
  8012. Fy TXDouble
  8013. }
  8014. type T_XPointDouble = TXPointDouble
  8015. type TXFixed = int32
  8016. type TXPointFixed = struct {
  8017. Fx TXFixed
  8018. Fy TXFixed
  8019. }
  8020. type T_XPointFixed = TXPointFixed
  8021. type TXLineFixed = struct {
  8022. Fp1 TXPointFixed
  8023. Fp2 TXPointFixed
  8024. }
  8025. type T_XLineFixed = TXLineFixed
  8026. type TXTriangle = struct {
  8027. Fp1 TXPointFixed
  8028. Fp2 TXPointFixed
  8029. Fp3 TXPointFixed
  8030. }
  8031. type T_XTriangle = TXTriangle
  8032. type TXCircle = struct {
  8033. Fx TXFixed
  8034. Fy TXFixed
  8035. Fradius TXFixed
  8036. }
  8037. type T_XCircle = TXCircle
  8038. type TXTrapezoid = struct {
  8039. Ftop TXFixed
  8040. Fbottom TXFixed
  8041. Fleft TXLineFixed
  8042. Fright TXLineFixed
  8043. }
  8044. type T_XTrapezoid = TXTrapezoid
  8045. type TXTransform = struct {
  8046. Fmatrix [3][3]TXFixed
  8047. }
  8048. type T_XTransform = TXTransform
  8049. type TXFilters = struct {
  8050. Fnfilter int32
  8051. Ffilter uintptr
  8052. Fnalias int32
  8053. Falias uintptr
  8054. }
  8055. type T_XFilters = TXFilters
  8056. type TXIndexValue = struct {
  8057. Fpixel uint64
  8058. Fred uint16
  8059. Fgreen uint16
  8060. Fblue uint16
  8061. Falpha uint16
  8062. }
  8063. type T_XIndexValue = TXIndexValue
  8064. type TXAnimCursor = struct {
  8065. Fcursor TCursor
  8066. Fdelay uint64
  8067. }
  8068. type T_XAnimCursor = TXAnimCursor
  8069. type TXSpanFix = struct {
  8070. Fleft TXFixed
  8071. Fright TXFixed
  8072. Fy TXFixed
  8073. }
  8074. type T_XSpanFix = TXSpanFix
  8075. type TXTrap = struct {
  8076. Ftop TXSpanFix
  8077. Fbottom TXSpanFix
  8078. }
  8079. type T_XTrap = TXTrap
  8080. type TXLinearGradient = struct {
  8081. Fp1 TXPointFixed
  8082. Fp2 TXPointFixed
  8083. }
  8084. type T_XLinearGradient = TXLinearGradient
  8085. type TXRadialGradient = struct {
  8086. Finner TXCircle
  8087. Fouter TXCircle
  8088. }
  8089. type T_XRadialGradient = TXRadialGradient
  8090. type TXConicalGradient = struct {
  8091. Fcenter TXPointFixed
  8092. Fangle TXFixed
  8093. }
  8094. type T_XConicalGradient = TXConicalGradient
  8095. type TXftFontInfo = struct {
  8096. Fhash TFcChar32
  8097. Ffile uintptr
  8098. Fxsize TFT_F26Dot6
  8099. Fysize TFT_F26Dot6
  8100. Fantialias TFcBool
  8101. Fembolden TFcBool
  8102. Frgba int32
  8103. Flcd_filter int32
  8104. Fmatrix TFT_Matrix
  8105. Ftransform TFcBool
  8106. Fload_flags TFT_Int
  8107. Frender TFcBool
  8108. Fspacing int32
  8109. Fminspace TFcBool
  8110. Fchar_width int32
  8111. }
  8112. type T_XftFontInfo = TXftFontInfo
  8113. type TXftFont = struct {
  8114. Fascent int32
  8115. Fdescent int32
  8116. Fheight int32
  8117. Fmax_advance_width int32
  8118. Fcharset uintptr
  8119. Fpattern uintptr
  8120. }
  8121. type T_XftFont = TXftFont
  8122. type TXftDraw = struct {
  8123. Fdpy uintptr
  8124. Fscreen int32
  8125. Fbits_per_pixel uint32
  8126. Fdepth uint32
  8127. Fdrawable TDrawable
  8128. Fvisual uintptr
  8129. Fcolormap TColormap
  8130. Fclip_type TXftClipType
  8131. Fclip TXftClip
  8132. Fsubwindow_mode int32
  8133. Frender struct {
  8134. Fpict TPicture
  8135. }
  8136. Fcore struct {
  8137. Fgc TGC
  8138. Fuse_pixmap int32
  8139. }
  8140. }
  8141. type T_XftDraw = TXftDraw
  8142. type __XftClipType = int32
  8143. const _XftClipTypeNone = 0
  8144. const _XftClipTypeRegion = 1
  8145. const _XftClipTypeRectangles = 2
  8146. type TXftColor = struct {
  8147. Fpixel uint64
  8148. Fcolor TXRenderColor
  8149. }
  8150. type T_XftColor = TXftColor
  8151. type TXftCharSpec = struct {
  8152. Fucs4 TFcChar32
  8153. Fx int16
  8154. Fy int16
  8155. }
  8156. type T_XftCharSpec = TXftCharSpec
  8157. type TXftCharFontSpec = struct {
  8158. Ffont uintptr
  8159. Fucs4 TFcChar32
  8160. Fx int16
  8161. Fy int16
  8162. }
  8163. type T_XftCharFontSpec = TXftCharFontSpec
  8164. type TXftGlyphSpec = struct {
  8165. Fglyph TFT_UInt
  8166. Fx int16
  8167. Fy int16
  8168. }
  8169. type T_XftGlyphSpec = TXftGlyphSpec
  8170. type TXftGlyphFontSpec = struct {
  8171. Ffont uintptr
  8172. Fglyph TFT_UInt
  8173. Fx int16
  8174. Fy int16
  8175. }
  8176. type T_XftGlyphFontSpec = TXftGlyphFontSpec
  8177. type TXftMatcher = struct {
  8178. Fobject uintptr
  8179. Fcompare uintptr
  8180. }
  8181. type T_XftMatcher = TXftMatcher
  8182. type TXftSymbolic = struct {
  8183. Fname uintptr
  8184. Fvalue int32
  8185. }
  8186. type T_XftSymbolic = TXftSymbolic
  8187. type TXftGlyph = struct {
  8188. Fmetrics TXGlyphInfo
  8189. Fbitmap uintptr
  8190. Fglyph_memory uint64
  8191. }
  8192. type T_XftGlyph = TXftGlyph
  8193. type TXftUcsHash = struct {
  8194. Fucs4 TFcChar32
  8195. Fglyph TFT_UInt
  8196. }
  8197. type T_XftUcsHash = TXftUcsHash
  8198. type TXftFtFile = struct {
  8199. Fnext uintptr
  8200. Fref int32
  8201. Ffile uintptr
  8202. Fid int32
  8203. Fxsize TFT_F26Dot6
  8204. Fysize TFT_F26Dot6
  8205. Fmatrix TFT_Matrix
  8206. Flock int32
  8207. Fface TFT_Face
  8208. }
  8209. type T_XftFtFile = TXftFtFile
  8210. type TXftFontInt = struct {
  8211. Fpublic TXftFont
  8212. Fnext uintptr
  8213. Fhash_next uintptr
  8214. Finfo TXftFontInfo
  8215. Fref int32
  8216. Fglyphs uintptr
  8217. Fnum_glyphs int32
  8218. Fhash_table uintptr
  8219. Fhash_value int32
  8220. Frehash_value int32
  8221. Fglyphset TGlyphSet
  8222. Fformat uintptr
  8223. Fglyph_memory uint64
  8224. Fmax_glyph_memory uint64
  8225. Fuse_free_glyphs TFcBool
  8226. }
  8227. type T_XftFontInt = TXftFontInt
  8228. type TXftClipType = int32
  8229. type TXftClipRect = struct {
  8230. FxOrigin int32
  8231. FyOrigin int32
  8232. Fn int32
  8233. }
  8234. type T_XftClipRect = TXftClipRect
  8235. type TXftClip = struct {
  8236. Fregion [0]TRegion
  8237. Frect uintptr
  8238. }
  8239. type T_XftClip = TXftClip
  8240. type TXftSolidColor = struct {
  8241. Fcolor TXRenderColor
  8242. Fscreen int32
  8243. Fpict TPicture
  8244. }
  8245. type T_XftSolidColor = TXftSolidColor
  8246. type TXftDisplayInfo = struct {
  8247. Fnext uintptr
  8248. Fdisplay uintptr
  8249. Fcodes uintptr
  8250. Fdefaults uintptr
  8251. FhasRender TFcBool
  8252. FhasSolid TFcBool
  8253. Ffonts uintptr
  8254. FsolidFormat uintptr
  8255. Fglyph_memory uint64
  8256. Fmax_glyph_memory uint64
  8257. Fuse_free_glyphs TFcBool
  8258. Fnum_unref_fonts int32
  8259. Fmax_unref_fonts int32
  8260. Fcolors [16]TXftSolidColor
  8261. FfontHash [127]uintptr
  8262. }
  8263. type T_XftDisplayInfo = TXftDisplayInfo
  8264. /* xftxlfd.c */
  8265. func XXftColorAllocName(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, name uintptr, result uintptr) (r int32) {
  8266. bp := tls.Alloc(32)
  8267. defer tls.Free(32)
  8268. var _ /* exact at bp+16 */ TXColor
  8269. var _ /* screen at bp+0 */ TXColor
  8270. if !(libx11.XXAllocNamedColor(tls, dpy, cmap, name, bp, bp+16) != 0) {
  8271. /* XXX stick standard colormap stuff here */
  8272. return m_False
  8273. }
  8274. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8275. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fred
  8276. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fgreen
  8277. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fblue
  8278. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = uint16(0xffff)
  8279. return int32(m_True)
  8280. }
  8281. func _maskbase(tls *libc.TLS, m uint64) (r int16) {
  8282. var i int16
  8283. _ = i
  8284. if !(m != 0) {
  8285. return 0
  8286. }
  8287. i = 0
  8288. for !(m&libc.Uint64FromInt32(1) != 0) {
  8289. m >>= uint64(1)
  8290. i++
  8291. }
  8292. return i
  8293. }
  8294. func _masklen(tls *libc.TLS, m uint64) (r int16) {
  8295. var y uint64
  8296. _ = y
  8297. y = m >> int32(1) & uint64(033333333333)
  8298. y = m - y - y>>int32(1)&uint64(033333333333)
  8299. return int16((y + y>>libc.Int32FromInt32(3)) & libc.Uint64FromUint32(030707070707) % libc.Uint64FromInt32(077))
  8300. }
  8301. func XXftColorAllocValue(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr, result uintptr) (r int32) {
  8302. bp := tls.Alloc(16)
  8303. defer tls.Free(16)
  8304. var blue_len, blue_shift, green_len, green_shift, red_len, red_shift int32
  8305. var _ /* xcolor at bp+0 */ TXColor
  8306. _, _, _, _, _, _ = blue_len, blue_shift, green_len, green_shift, red_len, red_shift
  8307. if (*TVisual)(unsafe.Pointer(visual)).Fclass == int32(m_TrueColor) {
  8308. red_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8309. red_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8310. green_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8311. green_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8312. blue_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8313. blue_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8314. (*TXftColor)(unsafe.Pointer(result)).Fpixel = uint64(int32((*TXRenderColor)(unsafe.Pointer(color)).Fred)>>(libc.Int32FromInt32(16)-red_len)<<red_shift | int32((*TXRenderColor)(unsafe.Pointer(color)).Fgreen)>>(libc.Int32FromInt32(16)-green_len)<<green_shift | int32((*TXRenderColor)(unsafe.Pointer(color)).Fblue)>>(libc.Int32FromInt32(16)-blue_len)<<blue_shift)
  8315. } else {
  8316. (*(*TXColor)(unsafe.Pointer(bp))).Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8317. (*(*TXColor)(unsafe.Pointer(bp))).Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8318. (*(*TXColor)(unsafe.Pointer(bp))).Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8319. if !(libx11.XXAllocColor(tls, dpy, cmap, bp) != 0) {
  8320. return m_False
  8321. }
  8322. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8323. }
  8324. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8325. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8326. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8327. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = (*TXRenderColor)(unsafe.Pointer(color)).Falpha
  8328. return int32(m_True)
  8329. }
  8330. func XXftColorFree(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr) {
  8331. if (*TVisual)(unsafe.Pointer(visual)).Fclass != int32(m_TrueColor) {
  8332. libx11.XXFreeColors(tls, dpy, cmap, color, int32(1), uint64(0))
  8333. }
  8334. }
  8335. type Tfuncs = struct {
  8336. Fcreate_image uintptr
  8337. Fdestroy_image uintptr
  8338. Fget_pixel uintptr
  8339. Fput_pixel uintptr
  8340. Fsub_image uintptr
  8341. Fadd_pixel uintptr
  8342. }
  8343. const m_NUM_LOCAL = 1024
  8344. /* xftxlfd.c */
  8345. func XXftRectCore(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  8346. if int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  8347. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  8348. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  8349. }
  8350. }
  8351. /*
  8352. * Use the core protocol to draw the glyphs
  8353. */
  8354. func __XftSharpGlyphMono(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8355. var bits, bitsMask uint8
  8356. var height, lenspan, stride, w, width, xspan, v1 int32
  8357. var src, srcLine, v2, v3, v4 uintptr
  8358. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8359. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8360. width = int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8361. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8362. height = int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8363. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8364. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8365. for {
  8366. v1 = height
  8367. height--
  8368. if !(v1 != 0) {
  8369. break
  8370. }
  8371. src = srcLine
  8372. srcLine += uintptr(stride)
  8373. w = width
  8374. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8375. v2 = src
  8376. src++
  8377. bits = *(*uint8)(unsafe.Pointer(v2))
  8378. xspan = x
  8379. for w != 0 {
  8380. if int32(bits)&int32(bitsMask) != 0 {
  8381. lenspan = 0
  8382. for cond := true; cond; cond = int32(bits)&int32(bitsMask) != 0 {
  8383. lenspan++
  8384. if lenspan == w {
  8385. break
  8386. }
  8387. bitsMask = uint8(int32(bitsMask) >> int32(1))
  8388. if !(bitsMask != 0) {
  8389. v3 = src
  8390. src++
  8391. bits = *(*uint8)(unsafe.Pointer(v3))
  8392. bitsMask = uint8(0x80)
  8393. }
  8394. }
  8395. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, xspan, y, uint32(lenspan), uint32(1))
  8396. xspan += lenspan
  8397. w -= lenspan
  8398. } else {
  8399. for cond := true; cond; cond = !(int32(bits)&int32(bitsMask) != 0) {
  8400. w--
  8401. xspan++
  8402. if !(w != 0) {
  8403. break
  8404. }
  8405. bitsMask = uint8(int32(bitsMask) >> int32(1))
  8406. if !(bitsMask != 0) {
  8407. v4 = src
  8408. src++
  8409. bits = *(*uint8)(unsafe.Pointer(v4))
  8410. bitsMask = uint8(0x80)
  8411. }
  8412. }
  8413. }
  8414. }
  8415. y++
  8416. }
  8417. }
  8418. // C documentation
  8419. //
  8420. // /*
  8421. // * Draw solid color text from an anti-aliased bitmap. This is a
  8422. // * fallback for cases where a particular drawable has no AA code
  8423. // */
  8424. func __XftSharpGlyphGray(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8425. var bits uint8
  8426. var height, lenspan, stride, w, width, xspan, v1 int32
  8427. var src, srcLine, v2, v3, v4 uintptr
  8428. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8429. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8430. width = int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8431. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8432. height = int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8433. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8434. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8435. for {
  8436. v1 = height
  8437. height--
  8438. if !(v1 != 0) {
  8439. break
  8440. }
  8441. src = srcLine
  8442. srcLine += uintptr(stride)
  8443. w = width
  8444. v2 = src
  8445. src++
  8446. bits = *(*uint8)(unsafe.Pointer(v2))
  8447. xspan = x
  8448. for w != 0 {
  8449. if int32(bits) >= int32(0x80) {
  8450. lenspan = 0
  8451. for cond := true; cond; cond = int32(bits) >= int32(0x80) {
  8452. lenspan++
  8453. if lenspan == w {
  8454. break
  8455. }
  8456. v3 = src
  8457. src++
  8458. bits = *(*uint8)(unsafe.Pointer(v3))
  8459. }
  8460. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, xspan, y, uint32(lenspan), uint32(1))
  8461. xspan += lenspan
  8462. w -= lenspan
  8463. } else {
  8464. for cond := true; cond; cond = int32(bits) < int32(0x80) {
  8465. w--
  8466. xspan++
  8467. if !(w != 0) {
  8468. break
  8469. }
  8470. v4 = src
  8471. src++
  8472. bits = *(*uint8)(unsafe.Pointer(v4))
  8473. }
  8474. }
  8475. }
  8476. y++
  8477. }
  8478. }
  8479. func __XftSharpGlyphRgba(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8480. var bits TCARD32
  8481. var height, lenspan, stride, w, width, xspan, v1 int32
  8482. var src, srcLine, v2, v3, v4 uintptr
  8483. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8484. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8485. width = int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8486. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8487. height = int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8488. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8489. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8490. for {
  8491. v1 = height
  8492. height--
  8493. if !(v1 != 0) {
  8494. break
  8495. }
  8496. src = srcLine
  8497. srcLine += uintptr(stride) * 4
  8498. w = width
  8499. v2 = src
  8500. src += 4
  8501. bits = *(*TCARD32)(unsafe.Pointer(v2))
  8502. xspan = x
  8503. for w != 0 {
  8504. if bits >= uint32(0x80000000) {
  8505. lenspan = 0
  8506. for cond := true; cond; cond = bits >= uint32(0x80000000) {
  8507. lenspan++
  8508. if lenspan == w {
  8509. break
  8510. }
  8511. v3 = src
  8512. src += 4
  8513. bits = *(*TCARD32)(unsafe.Pointer(v3))
  8514. }
  8515. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, xspan, y, uint32(lenspan), uint32(1))
  8516. xspan += lenspan
  8517. w -= lenspan
  8518. } else {
  8519. for cond := true; cond; cond = bits < uint32(0x80000000) {
  8520. w--
  8521. xspan++
  8522. if !(w != 0) {
  8523. break
  8524. }
  8525. v4 = src
  8526. src += 4
  8527. bits = *(*TCARD32)(unsafe.Pointer(v4))
  8528. }
  8529. }
  8530. }
  8531. y++
  8532. }
  8533. }
  8534. type TXftSharpGlyph = uintptr
  8535. func __XftSharpGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSharpGlyph) {
  8536. var font uintptr
  8537. _ = font
  8538. font = public
  8539. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  8540. return __ccgo_fp(__XftSharpGlyphMono)
  8541. } else {
  8542. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  8543. case int32(m_FC_RGBA_RGB):
  8544. fallthrough
  8545. case int32(m_FC_RGBA_BGR):
  8546. fallthrough
  8547. case int32(m_FC_RGBA_VRGB):
  8548. fallthrough
  8549. case int32(m_FC_RGBA_VBGR):
  8550. return __ccgo_fp(__XftSharpGlyphRgba)
  8551. default:
  8552. return __ccgo_fp(__XftSharpGlyphGray)
  8553. }
  8554. }
  8555. return r
  8556. }
  8557. /*
  8558. * Draw glyphs to a target that supports anti-aliasing
  8559. */
  8560. /*
  8561. * Primitives for converting between RGB values and TrueColor pixels
  8562. */
  8563. func __XftExamineBitfield(tls *libc.TLS, mask uint64, shift uintptr, len1 uintptr) {
  8564. var l, s int32
  8565. _, _ = l, s
  8566. s = 0
  8567. for mask&uint64(1) == uint64(0) {
  8568. mask >>= uint64(1)
  8569. s++
  8570. }
  8571. l = 0
  8572. for mask&uint64(1) == uint64(1) {
  8573. mask >>= uint64(1)
  8574. l++
  8575. }
  8576. *(*int32)(unsafe.Pointer(shift)) = s
  8577. *(*int32)(unsafe.Pointer(len1)) = l
  8578. }
  8579. func __XftGetField(tls *libc.TLS, l_pixel uint64, shift int32, len1 int32) (r TCARD32) {
  8580. var pixel TCARD32
  8581. _ = pixel
  8582. pixel = uint32(l_pixel)
  8583. pixel = pixel & uint32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<shift)
  8584. pixel = pixel << (int32(32) - (shift + len1)) >> int32(24)
  8585. for len1 < int32(8) {
  8586. pixel |= pixel >> len1
  8587. len1 <<= int32(1)
  8588. }
  8589. return pixel
  8590. }
  8591. func __XftPutField(tls *libc.TLS, pixel TCARD32, shift int32, len1 int32) (r uint64) {
  8592. var l_pixel uint64
  8593. _ = l_pixel
  8594. l_pixel = uint64(pixel)
  8595. shift = shift - (int32(8) - len1)
  8596. if len1 <= int32(8) {
  8597. l_pixel = l_pixel & uint64((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<(libc.Int32FromInt32(8)-len1))
  8598. }
  8599. if shift < 0 {
  8600. l_pixel >>= uint64(-shift)
  8601. } else {
  8602. l_pixel <<= uint64(shift)
  8603. }
  8604. return l_pixel
  8605. }
  8606. // C documentation
  8607. //
  8608. // /*
  8609. // * This is used when doing XftCharFontSpec/XftGlyphFontSpec where
  8610. // * some of the fonts are bitmaps and some are anti-aliased to handle
  8611. // * the bitmap portions
  8612. // */
  8613. func __XftSmoothGlyphMono(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8614. bp := tls.Alloc(32)
  8615. defer tls.Free(32)
  8616. var bits, bitsMask uint8
  8617. var height, stride, w, width, xspan, v1, v3 int32
  8618. var pixel uint64
  8619. var src, srcLine, v2, v4 uintptr
  8620. var _ /* b_len at bp+20 */ int32
  8621. var _ /* b_shift at bp+16 */ int32
  8622. var _ /* g_len at bp+12 */ int32
  8623. var _ /* g_shift at bp+8 */ int32
  8624. var _ /* r_len at bp+4 */ int32
  8625. var _ /* r_shift at bp+0 */ int32
  8626. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, pixel, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8627. srcLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8628. width = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8629. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8630. height = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8631. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8632. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8633. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8634. pixel = __XftPutField(tls, uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred)>>int32(8)), *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) | __XftPutField(tls, uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen)>>int32(8)), *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12))) | __XftPutField(tls, uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue)>>int32(8)), *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  8635. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8636. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8637. for {
  8638. v1 = height
  8639. height--
  8640. if !(v1 != 0) {
  8641. break
  8642. }
  8643. src = srcLine
  8644. srcLine += uintptr(stride)
  8645. w = width
  8646. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8647. v2 = src
  8648. src++
  8649. bits = *(*uint8)(unsafe.Pointer(v2))
  8650. xspan = x
  8651. for {
  8652. v3 = w
  8653. w--
  8654. if !(v3 != 0) {
  8655. break
  8656. }
  8657. if int32(bits)&int32(bitsMask) != 0 {
  8658. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, xspan, y, pixel)
  8659. }
  8660. bitsMask = uint8(int32(bitsMask) >> int32(1))
  8661. if !(bitsMask != 0) {
  8662. v4 = src
  8663. src++
  8664. bits = *(*uint8)(unsafe.Pointer(v4))
  8665. bitsMask = uint8(0x80)
  8666. }
  8667. xspan++
  8668. }
  8669. y++
  8670. }
  8671. }
  8672. /*
  8673. * As simple anti-aliasing is likely to be common, there are three
  8674. * optimized versions for the usual true color pixel formats (888, 565, 555).
  8675. * Other formats are handled by the general case
  8676. */
  8677. /*
  8678. * There are two ways of handling alpha -- either as a single unified value or
  8679. * a separate value for each component, hence each macro must have two
  8680. * versions. The unified alpha version has a 'U' at the end of the name,
  8681. * the component version has a 'C'. Similarly, functions which deal with
  8682. * this difference will have two versions using the same convention.
  8683. */
  8684. func _fbOver24(tls *libc.TLS, x TCARD32, y TCARD32) (r TCARD32) {
  8685. var a, t TCARD16
  8686. var m, n, o TCARD32
  8687. _, _, _, _, _ = a, m, n, o, t
  8688. a = uint16(^x >> libc.Int32FromInt32(24))
  8689. t = uint16(int32(uint16(uint8(y>>libc.Int32FromInt32(0))))*int32(a) + libc.Int32FromInt32(0x80))
  8690. t = uint16(int32(uint16((int32(t)>>libc.Int32FromInt32(8)+int32(t))>>libc.Int32FromInt32(8))) + int32(uint16(uint8(x>>libc.Int32FromInt32(0)))))
  8691. m = uint32(uint8(int32(t)|(libc.Int32FromInt32(0)-int32(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(0)
  8692. t = uint16(int32(uint16(uint8(y>>libc.Int32FromInt32(8))))*int32(a) + libc.Int32FromInt32(0x80))
  8693. t = uint16(int32(uint16((int32(t)>>libc.Int32FromInt32(8)+int32(t))>>libc.Int32FromInt32(8))) + int32(uint16(uint8(x>>libc.Int32FromInt32(8)))))
  8694. n = uint32(uint8(int32(t)|(libc.Int32FromInt32(0)-int32(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(8)
  8695. t = uint16(int32(uint16(uint8(y>>libc.Int32FromInt32(16))))*int32(a) + libc.Int32FromInt32(0x80))
  8696. t = uint16(int32(uint16((int32(t)>>libc.Int32FromInt32(8)+int32(t))>>libc.Int32FromInt32(8))) + int32(uint16(uint8(x>>libc.Int32FromInt32(16)))))
  8697. o = uint32(uint8(int32(t)|(libc.Int32FromInt32(0)-int32(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(16)
  8698. return m | n | o
  8699. }
  8700. func _fbIn(tls *libc.TLS, x TCARD32, y TCARD8) (r TCARD32) {
  8701. var a, t TCARD16
  8702. var m, n, o, p TCARD32
  8703. _, _, _, _, _, _ = a, m, n, o, p, t
  8704. a = uint16(y)
  8705. t = uint16(int32(uint16(uint8(x>>libc.Int32FromInt32(0))))*int32(a) + libc.Int32FromInt32(0x80))
  8706. m = uint32((int32(t)>>libc.Int32FromInt32(8)+int32(t))>>libc.Int32FromInt32(8)) << 0
  8707. t = uint16(int32(uint16(uint8(x>>libc.Int32FromInt32(8))))*int32(a) + libc.Int32FromInt32(0x80))
  8708. n = uint32((int32(t)>>libc.Int32FromInt32(8)+int32(t))>>libc.Int32FromInt32(8)) << int32(8)
  8709. t = uint16(int32(uint16(uint8(x>>libc.Int32FromInt32(16))))*int32(a) + libc.Int32FromInt32(0x80))
  8710. o = uint32((int32(t)>>libc.Int32FromInt32(8)+int32(t))>>libc.Int32FromInt32(8)) << int32(16)
  8711. t = uint16(int32(uint16(uint8(x>>libc.Int32FromInt32(24))))*int32(a) + libc.Int32FromInt32(0x80))
  8712. p = uint32((int32(t)>>libc.Int32FromInt32(8)+int32(t))>>libc.Int32FromInt32(8)) << int32(24)
  8713. return m | n | o | p
  8714. }
  8715. func __XftSmoothGlyphGray8888(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8716. var b, d, g, r, src, srca TCARD32
  8717. var dst, dstLine, mask, maskLine, v3 uintptr
  8718. var dstStride, height, maskStride, w, width, v1, v2 int32
  8719. var m TCARD8
  8720. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8721. srca = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8722. /* This handles only RGB and BGR */
  8723. g = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8724. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xff0000) {
  8725. r = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8726. b = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8727. } else {
  8728. r = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8729. b = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8730. }
  8731. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8732. width = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8733. height = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8734. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8735. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8736. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(2))
  8737. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(2)
  8738. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8739. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8740. for {
  8741. v1 = height
  8742. height--
  8743. if !(v1 != 0) {
  8744. break
  8745. }
  8746. dst = dstLine
  8747. dstLine += uintptr(dstStride) * 4
  8748. mask = maskLine
  8749. maskLine += uintptr(maskStride)
  8750. w = width
  8751. for {
  8752. v2 = w
  8753. w--
  8754. if !(v2 != 0) {
  8755. break
  8756. }
  8757. v3 = mask
  8758. mask++
  8759. m = *(*TCARD8)(unsafe.Pointer(v3))
  8760. if int32(m) == int32(0xff) {
  8761. if srca == uint32(0xff) {
  8762. *(*TCARD32)(unsafe.Pointer(dst)) = src
  8763. } else {
  8764. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, src, *(*TCARD32)(unsafe.Pointer(dst)))
  8765. }
  8766. } else {
  8767. if m != 0 {
  8768. d = _fbIn(tls, src, m)
  8769. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, d, *(*TCARD32)(unsafe.Pointer(dst)))
  8770. }
  8771. }
  8772. dst += 4
  8773. }
  8774. }
  8775. }
  8776. func __XftSmoothGlyphGray565(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8777. var b, d, g, r, src, srca TCARD32
  8778. var dst, dstLine, mask, maskLine, v3 uintptr
  8779. var dstStride, height, maskStride, w, width, v1, v2 int32
  8780. var m TCARD8
  8781. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8782. srca = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8783. /* This handles only RGB and BGR */
  8784. g = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8785. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8786. r = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8787. b = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8788. } else {
  8789. r = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8790. b = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8791. }
  8792. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8793. width = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8794. height = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8795. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8796. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8797. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8798. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8799. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8800. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8801. for {
  8802. v1 = height
  8803. height--
  8804. if !(v1 != 0) {
  8805. break
  8806. }
  8807. dst = dstLine
  8808. dstLine += uintptr(dstStride) * 2
  8809. mask = maskLine
  8810. maskLine += uintptr(maskStride)
  8811. w = width
  8812. for {
  8813. v2 = w
  8814. w--
  8815. if !(v2 != 0) {
  8816. break
  8817. }
  8818. v3 = mask
  8819. mask++
  8820. m = *(*TCARD8)(unsafe.Pointer(v3))
  8821. if int32(m) == int32(0xff) {
  8822. if srca == uint32(0xff) {
  8823. d = src
  8824. } else {
  8825. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8826. 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)))
  8827. }
  8828. *(*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))
  8829. } else {
  8830. if m != 0 {
  8831. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8832. 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)))
  8833. *(*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))
  8834. }
  8835. }
  8836. dst += 2
  8837. }
  8838. }
  8839. }
  8840. func __XftSmoothGlyphGray555(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8841. var b, d, g, r, src, srca TCARD32
  8842. var dst, dstLine, mask, maskLine, v3 uintptr
  8843. var dstStride, height, maskStride, w, width, v1, v2 int32
  8844. var m TCARD8
  8845. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8846. srca = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8847. /* This handles only RGB and BGR */
  8848. g = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8849. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8850. r = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8851. b = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8852. } else {
  8853. r = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8854. b = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8855. }
  8856. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8857. width = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8858. height = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8859. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8860. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8861. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8862. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8863. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8864. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8865. for {
  8866. v1 = height
  8867. height--
  8868. if !(v1 != 0) {
  8869. break
  8870. }
  8871. dst = dstLine
  8872. dstLine += uintptr(dstStride) * 2
  8873. mask = maskLine
  8874. maskLine += uintptr(maskStride)
  8875. w = width
  8876. for {
  8877. v2 = w
  8878. w--
  8879. if !(v2 != 0) {
  8880. break
  8881. }
  8882. v3 = mask
  8883. mask++
  8884. m = *(*TCARD8)(unsafe.Pointer(v3))
  8885. if int32(m) == int32(0xff) {
  8886. if srca == uint32(0xff) {
  8887. d = src
  8888. } else {
  8889. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8890. 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)))
  8891. }
  8892. *(*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))
  8893. } else {
  8894. if m != 0 {
  8895. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8896. 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)))
  8897. *(*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))
  8898. }
  8899. }
  8900. dst += 2
  8901. }
  8902. }
  8903. }
  8904. func __XftSmoothGlyphGray(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8905. bp := tls.Alloc(32)
  8906. defer tls.Free(32)
  8907. var d, src, srca TCARD32
  8908. var height, maskStride, tx, w, width, v1, v2 int32
  8909. var m TCARD8
  8910. var mask, maskLine, v3 uintptr
  8911. var pixel uint64
  8912. var _ /* b_len at bp+20 */ int32
  8913. var _ /* b_shift at bp+16 */ int32
  8914. var _ /* g_len at bp+12 */ int32
  8915. var _ /* g_shift at bp+8 */ int32
  8916. var _ /* r_len at bp+4 */ int32
  8917. var _ /* r_shift at bp+0 */ int32
  8918. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, height, m, mask, maskLine, maskStride, pixel, src, srca, tx, w, width, v1, v2, v3
  8919. srca = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8920. src = srca<<libc.Int32FromInt32(24) | uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred)&libc.Int32FromInt32(0xff00)<<libc.Int32FromInt32(8)) | uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen)&libc.Int32FromInt32(0xff00)) | uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue)>>libc.Int32FromInt32(8))
  8921. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8922. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8923. width = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8924. height = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8925. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8926. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8927. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8928. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8929. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8930. for {
  8931. v1 = height
  8932. height--
  8933. if !(v1 != 0) {
  8934. break
  8935. }
  8936. mask = maskLine
  8937. maskLine += uintptr(maskStride)
  8938. w = width
  8939. tx = x
  8940. for {
  8941. v2 = w
  8942. w--
  8943. if !(v2 != 0) {
  8944. break
  8945. }
  8946. v3 = mask
  8947. mask++
  8948. m = *(*TCARD8)(unsafe.Pointer(v3))
  8949. if int32(m) == int32(0xff) {
  8950. if srca == uint32(0xff) {
  8951. d = src
  8952. } else {
  8953. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  8954. 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)))
  8955. d = _fbOver24(tls, src, d)
  8956. }
  8957. 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)))
  8958. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  8959. } else {
  8960. if m != 0 {
  8961. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  8962. 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)))
  8963. d = _fbOver24(tls, _fbIn(tls, src, m), d)
  8964. 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)))
  8965. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  8966. }
  8967. }
  8968. tx++
  8969. }
  8970. y++
  8971. }
  8972. }
  8973. func __XftSmoothGlyphRgba(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8974. bp := tls.Alloc(32)
  8975. defer tls.Free(32)
  8976. var __a, __a1, __a2 TCARD16
  8977. var __i, __i1, __i2, __t, __t1, __t2, __ta, __ta1, __ta2, d, m, ma, n, o, src, srca TCARD32
  8978. var height, tx, w, width, v1, v2 int32
  8979. var mask, v3 uintptr
  8980. var pixel uint64
  8981. var _ /* b_len at bp+20 */ int32
  8982. var _ /* b_shift at bp+16 */ int32
  8983. var _ /* g_len at bp+12 */ int32
  8984. var _ /* g_shift at bp+8 */ int32
  8985. var _ /* r_len at bp+4 */ int32
  8986. var _ /* r_shift at bp+0 */ int32
  8987. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = __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
  8988. srca = uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8989. src = srca<<libc.Int32FromInt32(24) | uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred)&libc.Int32FromInt32(0xff00)<<libc.Int32FromInt32(8)) | uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen)&libc.Int32FromInt32(0xff00)) | uint32(int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue)>>libc.Int32FromInt32(8))
  8990. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8991. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8992. width = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8993. height = int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8994. mask = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8995. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8996. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8997. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8998. for {
  8999. v1 = height
  9000. height--
  9001. if !(v1 != 0) {
  9002. break
  9003. }
  9004. w = width
  9005. tx = x
  9006. for {
  9007. v2 = w
  9008. w--
  9009. if !(v2 != 0) {
  9010. break
  9011. }
  9012. v3 = mask
  9013. mask += 4
  9014. ma = *(*TCARD32)(unsafe.Pointer(v3))
  9015. if ma == uint32(0xffffffff) {
  9016. if srca == uint32(0xff) {
  9017. d = src
  9018. } else {
  9019. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9020. d = __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))<<libc.Int32FromInt32(16) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12)))<<libc.Int32FromInt32(8) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  9021. d = _fbOver24(tls, src, d)
  9022. }
  9023. 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)))
  9024. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9025. } else {
  9026. if ma != 0 {
  9027. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9028. 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)))
  9029. __a = uint16(uint8(ma >> libc.Int32FromInt32(0)))
  9030. __i = uint32(int32(uint16(uint8(src>>libc.Int32FromInt32(0))))*int32(__a) + libc.Int32FromInt32(0x80))
  9031. __t = (__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8)
  9032. __i = srca*uint32(__a) + libc.Uint32FromInt32(0x80)
  9033. __ta = uint32(uint8(^((__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8))))
  9034. __i = uint32(uint16(uint8(d>>libc.Int32FromInt32(0))))*__ta + libc.Uint32FromInt32(0x80)
  9035. __t = __t + (__i>>libc.Int32FromInt32(8)+__i)>>libc.Int32FromInt32(8)
  9036. __t = uint32(uint8(__t | -(__t >> libc.Int32FromInt32(8))))
  9037. m = __t << 0
  9038. __a1 = uint16(uint8(ma >> libc.Int32FromInt32(8)))
  9039. __i1 = uint32(int32(uint16(uint8(src>>libc.Int32FromInt32(8))))*int32(__a1) + libc.Int32FromInt32(0x80))
  9040. __t1 = (__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8)
  9041. __i1 = srca*uint32(__a1) + libc.Uint32FromInt32(0x80)
  9042. __ta1 = uint32(uint8(^((__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8))))
  9043. __i1 = uint32(uint16(uint8(d>>libc.Int32FromInt32(8))))*__ta1 + libc.Uint32FromInt32(0x80)
  9044. __t1 = __t1 + (__i1>>libc.Int32FromInt32(8)+__i1)>>libc.Int32FromInt32(8)
  9045. __t1 = uint32(uint8(__t1 | -(__t1 >> libc.Int32FromInt32(8))))
  9046. n = __t1 << int32(8)
  9047. __a2 = uint16(uint8(ma >> libc.Int32FromInt32(16)))
  9048. __i2 = uint32(int32(uint16(uint8(src>>libc.Int32FromInt32(16))))*int32(__a2) + libc.Int32FromInt32(0x80))
  9049. __t2 = (__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8)
  9050. __i2 = srca*uint32(__a2) + libc.Uint32FromInt32(0x80)
  9051. __ta2 = uint32(uint8(^((__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8))))
  9052. __i2 = uint32(uint16(uint8(d>>libc.Int32FromInt32(16))))*__ta2 + libc.Uint32FromInt32(0x80)
  9053. __t2 = __t2 + (__i2>>libc.Int32FromInt32(8)+__i2)>>libc.Int32FromInt32(8)
  9054. __t2 = uint32(uint8(__t2 | -(__t2 >> libc.Int32FromInt32(8))))
  9055. o = __t2 << int32(16)
  9056. d = m | n | o
  9057. 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)))
  9058. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9059. }
  9060. }
  9061. tx++
  9062. }
  9063. y++
  9064. }
  9065. }
  9066. func __XftSmoothGlyphPossible(tls *libc.TLS, draw uintptr) (r TFcBool) {
  9067. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) {
  9068. return m_FcFalse
  9069. }
  9070. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fclass != int32(m_TrueColor) {
  9071. return m_FcFalse
  9072. }
  9073. return int32(m_FcTrue)
  9074. }
  9075. type TXftSmoothGlyph = uintptr
  9076. func __XftSmoothGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSmoothGlyph) {
  9077. var font uintptr
  9078. _ = font
  9079. font = public
  9080. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  9081. return __ccgo_fp(__XftSmoothGlyphMono)
  9082. } else {
  9083. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  9084. case int32(m_FC_RGBA_RGB):
  9085. fallthrough
  9086. case int32(m_FC_RGBA_BGR):
  9087. fallthrough
  9088. case int32(m_FC_RGBA_VRGB):
  9089. fallthrough
  9090. case int32(m_FC_RGBA_VBGR):
  9091. return __ccgo_fp(__XftSmoothGlyphRgba)
  9092. default:
  9093. switch XXftDrawBitsPerPixel(tls, draw) {
  9094. case uint32(32):
  9095. 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) {
  9096. return __ccgo_fp(__XftSmoothGlyphGray8888)
  9097. }
  9098. case uint32(16):
  9099. 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) {
  9100. return __ccgo_fp(__XftSmoothGlyphGray565)
  9101. }
  9102. 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) {
  9103. return __ccgo_fp(__XftSmoothGlyphGray555)
  9104. }
  9105. default:
  9106. break
  9107. }
  9108. return __ccgo_fp(__XftSmoothGlyphGray)
  9109. }
  9110. }
  9111. return r
  9112. }
  9113. func __XftGlyphDefault(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  9114. bp := tls.Alloc(1040)
  9115. defer tls.Free(1040)
  9116. var font uintptr
  9117. var glyphs_loaded TFcBool
  9118. var _ /* missing at bp+0 */ [256]TFT_UInt
  9119. var _ /* nmissing at bp+1024 */ int32
  9120. _, _ = font, glyphs_loaded
  9121. font = public
  9122. glyphs_loaded = m_FcFalse
  9123. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), uint32(0), bp, bp+1024) != 0 {
  9124. glyphs_loaded = int32(m_FcTrue)
  9125. }
  9126. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9127. XXftFontLoadGlyphs(tls, dpy, public, glyphs_loaded, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9128. }
  9129. return *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs))
  9130. }
  9131. func _XftGetImageErrorHandler(tls *libc.TLS, dpy uintptr, error_event uintptr) (r int32) {
  9132. return 0
  9133. }
  9134. func XXftGlyphCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  9135. bp := tls.Alloc(1168)
  9136. defer tls.Free(1168)
  9137. var depth, v3 uint32
  9138. var dpy, font, g, image, xftg, v10, v11, v2, v6, v7 uintptr
  9139. var gc TGC
  9140. var glyph TFT_UInt
  9141. var glyphs_loaded TFcBool
  9142. var n, ox, oy, v1, v5, v9 int32
  9143. var pix TPixmap
  9144. var prev_error TXErrorHandler
  9145. var sharp TXftSharpGlyph
  9146. var smooth TXftSmoothGlyph
  9147. var v12, v4, v8 bool
  9148. var _ /* gcv at bp+1040 */ TXGCValues
  9149. var _ /* gi at bp+1028 */ TXGlyphInfo
  9150. var _ /* missing at bp+0 */ [256]TFT_UInt
  9151. var _ /* nmissing at bp+1024 */ int32
  9152. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9153. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9154. font = public
  9155. /*
  9156. * Load missing glyphs
  9157. */
  9158. g = glyphs
  9159. n = nglyphs
  9160. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9161. glyphs_loaded = m_FcFalse
  9162. for {
  9163. v1 = n
  9164. n--
  9165. if !(v1 != 0) {
  9166. break
  9167. }
  9168. v2 = g
  9169. g += 4
  9170. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  9171. glyphs_loaded = int32(m_FcTrue)
  9172. }
  9173. }
  9174. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9175. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9176. }
  9177. g = glyphs
  9178. n = nglyphs
  9179. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9180. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9181. XXftGlyphExtents(tls, dpy, public, glyphs, nglyphs, bp+1028)
  9182. if !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth != 0) || !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight != 0) {
  9183. goto bail1
  9184. }
  9185. ox = x - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9186. oy = y - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9187. /*
  9188. * Try to get bits directly from the drawable; if that fails,
  9189. * use a temporary pixmap. When it does fail, assume it
  9190. * will probably fail for a while and keep using temporary
  9191. * pixmaps for a while to avoid double round trips.
  9192. */
  9193. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9194. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9195. 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), uint64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9196. libx11.XXSetErrorHandler(tls, prev_error)
  9197. if !(image != 0) {
  9198. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9199. }
  9200. } else {
  9201. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9202. image = libc.UintptrFromInt32(0)
  9203. }
  9204. if v4 = !(image != 0); v4 {
  9205. v3 = XXftDrawDepth(tls, draw)
  9206. depth = v3
  9207. }
  9208. if v4 && v3 != 0 {
  9209. 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)
  9210. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9211. gc = libx11.XXCreateGC(tls, dpy, pix, uint64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9212. 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)
  9213. libx11.XXFreeGC(tls, dpy, gc)
  9214. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), uint64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9215. libx11.XXFreePixmap(tls, dpy, pix)
  9216. }
  9217. if !(image != 0) {
  9218. goto bail1
  9219. }
  9220. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9221. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9222. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9223. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9224. XXftSwapImage(tls, image)
  9225. }
  9226. for {
  9227. v5 = n
  9228. n--
  9229. if !(v5 != 0) {
  9230. break
  9231. }
  9232. v6 = g
  9233. g += 4
  9234. glyph = *(*TFT_UInt)(unsafe.Pointer(v6))
  9235. if v8 = glyph >= uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v8 {
  9236. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9237. xftg = v7
  9238. }
  9239. if v8 || !(v7 != 0) {
  9240. xftg = __XftGlyphDefault(tls, dpy, public)
  9241. }
  9242. if xftg != 0 {
  9243. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, x-ox, y-oy, color)
  9244. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9245. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9246. }
  9247. }
  9248. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9249. XXftSwapImage(tls, image)
  9250. }
  9251. 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))
  9252. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9253. } else {
  9254. sharp = __XftSharpGlyphFind(tls, draw, public)
  9255. for {
  9256. v9 = n
  9257. n--
  9258. if !(v9 != 0) {
  9259. break
  9260. }
  9261. v10 = g
  9262. g += 4
  9263. glyph = *(*TFT_UInt)(unsafe.Pointer(v10))
  9264. if v12 = glyph >= uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v12 {
  9265. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9266. xftg = v11
  9267. }
  9268. if v12 || !(v11 != 0) {
  9269. xftg = __XftGlyphDefault(tls, dpy, public)
  9270. }
  9271. if xftg != 0 {
  9272. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, x, y)
  9273. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9274. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9275. }
  9276. }
  9277. }
  9278. goto bail1
  9279. bail1:
  9280. ;
  9281. if glyphs_loaded != 0 {
  9282. X_XftFontManageMemory(tls, dpy, public)
  9283. }
  9284. }
  9285. func XXftGlyphSpecCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, glyphs uintptr, nglyphs int32) {
  9286. bp := tls.Alloc(1168)
  9287. defer tls.Free(1168)
  9288. var depth, v5 uint32
  9289. var dpy, font, image, xftg, v11, v8 uintptr
  9290. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9291. var gc TGC
  9292. var glyph, glyph1 TFT_UInt
  9293. var glyphs_loaded TFcBool
  9294. var pix TPixmap
  9295. var prev_error TXErrorHandler
  9296. var sharp TXftSharpGlyph
  9297. var smooth TXftSmoothGlyph
  9298. var v12, v6, v9 bool
  9299. var _ /* gcv at bp+1040 */ TXGCValues
  9300. var _ /* gi at bp+1028 */ TXGlyphInfo
  9301. var _ /* missing at bp+0 */ [256]TFT_UInt
  9302. var _ /* nmissing at bp+1024 */ int32
  9303. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9304. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9305. font = public
  9306. /*
  9307. * Load missing glyphs
  9308. */
  9309. glyphs_loaded = m_FcFalse
  9310. v3 = libc.Int32FromInt32(0)
  9311. y2 = v3
  9312. v2 = v3
  9313. x2 = v2
  9314. v1 = v2
  9315. y1 = v1
  9316. x1 = v1
  9317. i = 0
  9318. for {
  9319. if !(i < nglyphs) {
  9320. break
  9321. }
  9322. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9323. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph, bp, bp+1024) != 0 {
  9324. glyphs_loaded = int32(m_FcTrue)
  9325. }
  9326. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9327. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9328. }
  9329. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*8, int32(1), bp+1028)
  9330. g_x1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9331. g_y1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9332. g_x2 = g_x1 + int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9333. g_y2 = g_y1 + int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9334. if i != 0 {
  9335. if g_x1 < x1 {
  9336. x1 = g_x1
  9337. }
  9338. if g_y1 < y1 {
  9339. y1 = g_y1
  9340. }
  9341. if g_x2 > x2 {
  9342. x2 = g_x2
  9343. }
  9344. if g_y2 > y2 {
  9345. y2 = g_y2
  9346. }
  9347. } else {
  9348. x1 = g_x1
  9349. y1 = g_y1
  9350. x2 = g_x2
  9351. y2 = g_y2
  9352. }
  9353. goto _4
  9354. _4:
  9355. ;
  9356. i++
  9357. }
  9358. if x1 == x2 || y1 == y2 {
  9359. goto bail1
  9360. }
  9361. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9362. width = x2 - x1
  9363. height = y2 - y1
  9364. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9365. /*
  9366. * Try to get bits directly from the drawable; if that fails,
  9367. * use a temporary pixmap. When it does fail, assume it
  9368. * will probably fail for a while and keep using temporary
  9369. * pixmaps for a while to avoid double round trips.
  9370. */
  9371. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9372. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9373. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, x1, y1, uint32(width), uint32(height), uint64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9374. libx11.XXSetErrorHandler(tls, prev_error)
  9375. if !(image != 0) {
  9376. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9377. }
  9378. } else {
  9379. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9380. image = libc.UintptrFromInt32(0)
  9381. }
  9382. if v6 = !(image != 0); v6 {
  9383. v5 = XXftDrawDepth(tls, draw)
  9384. depth = v5
  9385. }
  9386. if v6 && v5 != 0 {
  9387. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, uint32(width), uint32(height), depth)
  9388. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9389. gc = libx11.XXCreateGC(tls, dpy, pix, uint64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9390. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, uint32(width), uint32(height), 0, 0)
  9391. libx11.XXFreeGC(tls, dpy, gc)
  9392. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, uint32(width), uint32(height), uint64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9393. libx11.XXFreePixmap(tls, dpy, pix)
  9394. }
  9395. if !(image != 0) {
  9396. goto bail1
  9397. }
  9398. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9399. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9400. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9401. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9402. XXftSwapImage(tls, image)
  9403. }
  9404. i = 0
  9405. for {
  9406. if !(i < nglyphs) {
  9407. break
  9408. }
  9409. glyph = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9410. if v9 = glyph >= uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v9 {
  9411. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9412. xftg = v8
  9413. }
  9414. if v9 || !(v8 != 0) {
  9415. xftg = __XftGlyphDefault(tls, dpy, public)
  9416. }
  9417. if xftg != 0 {
  9418. (*(*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)
  9419. }
  9420. goto _7
  9421. _7:
  9422. ;
  9423. i++
  9424. }
  9425. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9426. XXftSwapImage(tls, image)
  9427. }
  9428. libx11.XXPutImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, image, 0, 0, x1, y1, uint32(width), uint32(height))
  9429. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9430. } else {
  9431. sharp = __XftSharpGlyphFind(tls, draw, public)
  9432. i = 0
  9433. for {
  9434. if !(i < nglyphs) {
  9435. break
  9436. }
  9437. glyph1 = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9438. if v12 = glyph1 >= uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v12 {
  9439. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph1)*8))
  9440. xftg = v11
  9441. }
  9442. if v12 || !(v11 != 0) {
  9443. xftg = __XftGlyphDefault(tls, dpy, public)
  9444. }
  9445. if xftg != 0 {
  9446. (*(*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))
  9447. }
  9448. goto _10
  9449. _10:
  9450. ;
  9451. i++
  9452. }
  9453. }
  9454. goto bail1
  9455. bail1:
  9456. ;
  9457. if glyphs_loaded != 0 {
  9458. X_XftFontManageMemory(tls, dpy, public)
  9459. }
  9460. }
  9461. func XXftGlyphFontSpecCore(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, nglyphs int32) {
  9462. bp := tls.Alloc(1168)
  9463. defer tls.Free(1168)
  9464. var depth, v6 uint32
  9465. var dpy, font, font1, image, public, public1, public2, xftg, v12, v9 uintptr
  9466. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9467. var gc TGC
  9468. var glyph, glyph1 TFT_UInt
  9469. var glyphs_loaded TFcBool
  9470. var pix TPixmap
  9471. var prev_error TXErrorHandler
  9472. var sharp TXftSharpGlyph
  9473. var smooth TXftSmoothGlyph
  9474. var t int16
  9475. var v10, v13, v7 bool
  9476. var _ /* gcv at bp+1040 */ TXGCValues
  9477. var _ /* gi at bp+1028 */ TXGlyphInfo
  9478. var _ /* missing at bp+0 */ [256]TFT_UInt
  9479. var _ /* nmissing at bp+1024 */ int32
  9480. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9481. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9482. /*
  9483. * Load missing glyphs
  9484. */
  9485. glyphs_loaded = m_FcFalse
  9486. v3 = libc.Int32FromInt32(0)
  9487. y2 = v3
  9488. v2 = v3
  9489. x2 = v2
  9490. v1 = v2
  9491. y1 = v1
  9492. x1 = v1
  9493. i = 0
  9494. for {
  9495. if !(i < nglyphs) {
  9496. break
  9497. }
  9498. public = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9499. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9500. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph, bp, bp+1024) != 0 {
  9501. glyphs_loaded = int32(m_FcTrue)
  9502. }
  9503. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9504. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9505. }
  9506. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*16+8, int32(1), bp+1028)
  9507. g_x1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9508. g_y1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9509. g_x2 = g_x1 + int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9510. g_y2 = g_y1 + int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9511. if i != 0 {
  9512. if g_x1 < x1 {
  9513. if g_x1 < 0 {
  9514. /* do nothing if the given glyphs are out of range */
  9515. 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))
  9516. if int32(t) < 0 && int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*16))).Fx) > 0 {
  9517. goto bail1
  9518. }
  9519. }
  9520. x1 = g_x1
  9521. }
  9522. if g_y1 < y1 {
  9523. y1 = g_y1
  9524. }
  9525. if g_x2 > x2 {
  9526. x2 = g_x2
  9527. }
  9528. if g_y2 > y2 {
  9529. y2 = g_y2
  9530. }
  9531. } else {
  9532. x1 = g_x1
  9533. y1 = g_y1
  9534. x2 = g_x2
  9535. y2 = g_y2
  9536. }
  9537. goto _4
  9538. _4:
  9539. ;
  9540. i++
  9541. }
  9542. if x1 == x2 || y1 == y2 {
  9543. goto bail1
  9544. }
  9545. i = 0
  9546. for {
  9547. if !(i < nglyphs) {
  9548. break
  9549. }
  9550. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Finfo.Fantialias != 0 {
  9551. break
  9552. }
  9553. goto _5
  9554. _5:
  9555. ;
  9556. i++
  9557. }
  9558. if (i != nglyphs || int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9559. width = x2 - x1
  9560. height = y2 - y1
  9561. /*
  9562. * Try to get bits directly from the drawable; if that fails,
  9563. * use a temporary pixmap. When it does fail, assume it
  9564. * will probably fail for a while and keep using temporary
  9565. * pixmaps for a while to avoid double round trips.
  9566. */
  9567. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9568. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9569. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, x1, y1, uint32(width), uint32(height), uint64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9570. libx11.XXSetErrorHandler(tls, prev_error)
  9571. if !(image != 0) {
  9572. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9573. }
  9574. } else {
  9575. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9576. image = libc.UintptrFromInt32(0)
  9577. }
  9578. if v7 = !(image != 0); v7 {
  9579. v6 = XXftDrawDepth(tls, draw)
  9580. depth = v6
  9581. }
  9582. if v7 && v6 != 0 {
  9583. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, uint32(width), uint32(height), depth)
  9584. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9585. gc = libx11.XXCreateGC(tls, dpy, pix, uint64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9586. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, uint32(width), uint32(height), 0, 0)
  9587. libx11.XXFreeGC(tls, dpy, gc)
  9588. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, uint32(width), uint32(height), uint64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9589. libx11.XXFreePixmap(tls, dpy, pix)
  9590. }
  9591. if !(image != 0) {
  9592. goto bail1
  9593. }
  9594. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9595. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9596. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9597. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9598. XXftSwapImage(tls, image)
  9599. }
  9600. i = 0
  9601. for {
  9602. if !(i < nglyphs) {
  9603. break
  9604. }
  9605. public1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9606. font = public1
  9607. smooth = __XftSmoothGlyphFind(tls, draw, public1)
  9608. glyph = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9609. if v10 = glyph >= uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v10 {
  9610. v9 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9611. xftg = v9
  9612. }
  9613. if v10 || !(v9 != 0) {
  9614. xftg = __XftGlyphDefault(tls, dpy, public1)
  9615. }
  9616. if xftg != 0 {
  9617. (*(*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)
  9618. }
  9619. goto _8
  9620. _8:
  9621. ;
  9622. i++
  9623. }
  9624. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9625. XXftSwapImage(tls, image)
  9626. }
  9627. libx11.XXPutImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, image, 0, 0, x1, y1, uint32(width), uint32(height))
  9628. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9629. } else {
  9630. i = 0
  9631. for {
  9632. if !(i < nglyphs) {
  9633. break
  9634. }
  9635. public2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9636. font1 = public2
  9637. sharp = __XftSharpGlyphFind(tls, draw, public2)
  9638. glyph1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9639. if v13 = glyph1 >= uint32((*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs); !v13 {
  9640. v12 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(glyph1)*8))
  9641. xftg = v12
  9642. }
  9643. if v13 || !(v12 != 0) {
  9644. xftg = __XftGlyphDefault(tls, dpy, public2)
  9645. }
  9646. if xftg != 0 {
  9647. (*(*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))
  9648. }
  9649. goto _11
  9650. _11:
  9651. ;
  9652. i++
  9653. }
  9654. }
  9655. goto bail1
  9656. bail1:
  9657. ;
  9658. if glyphs_loaded != 0 {
  9659. i = 0
  9660. for {
  9661. if !(i < nglyphs) {
  9662. break
  9663. }
  9664. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  9665. goto _14
  9666. _14:
  9667. ;
  9668. i++
  9669. }
  9670. }
  9671. }
  9672. /* xftxlfd.c */
  9673. func XXftDebug(tls *libc.TLS) (r int32) {
  9674. bp := tls.Alloc(16)
  9675. defer tls.Free(16)
  9676. var e uintptr
  9677. _ = e
  9678. if !(_initialized != 0) {
  9679. _initialized = int32(1)
  9680. e = libc.Xgetenv(tls, __ccgo_ts)
  9681. if e != 0 {
  9682. libc.Xprintf(tls, __ccgo_ts+10, libc.VaList(bp+8, e))
  9683. _debug = libc.Xatoi(tls, e)
  9684. if _debug <= 0 {
  9685. _debug = int32(1)
  9686. }
  9687. }
  9688. }
  9689. return _debug
  9690. }
  9691. var _initialized int32
  9692. var _debug int32
  9693. func __XftCloseDisplay(tls *libc.TLS, dpy uintptr, codes uintptr) (r int32) {
  9694. var info, prev, v2 uintptr
  9695. _, _, _ = info, prev, v2
  9696. info = X_XftDisplayInfoGet(tls, dpy, m_FcFalse)
  9697. if !(info != 0) {
  9698. return 0
  9699. }
  9700. /*
  9701. * Get rid of any dangling unreferenced fonts
  9702. */
  9703. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = 0
  9704. XXftFontManageMemory(tls, dpy)
  9705. /*
  9706. * Clean up the default values
  9707. */
  9708. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  9709. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  9710. }
  9711. /*
  9712. * Unhook from the global list
  9713. */
  9714. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9715. for {
  9716. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9717. info = v2
  9718. if !(v2 != 0) {
  9719. break
  9720. }
  9721. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9722. break
  9723. }
  9724. goto _1
  9725. _1:
  9726. ;
  9727. prev = *(*uintptr)(unsafe.Pointer(prev))
  9728. }
  9729. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9730. libc.Xfree(tls, info)
  9731. return 0
  9732. }
  9733. func X_XftDisplayInfoGet(tls *libc.TLS, dpy uintptr, createIfNecessary TFcBool) (r uintptr) {
  9734. bp := tls.Alloc(96)
  9735. defer tls.Free(96)
  9736. var format, info, prev, visual, v2, v3 uintptr
  9737. var i int32
  9738. var _ /* error_base at bp+44 */ int32
  9739. var _ /* event_base at bp+40 */ int32
  9740. var _ /* major at bp+48 */ int32
  9741. var _ /* minor at bp+52 */ int32
  9742. var _ /* pf at bp+0 */ TXRenderPictFormat
  9743. _, _, _, _, _, _, _ = format, i, info, prev, visual, v2, v3
  9744. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9745. for {
  9746. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9747. info = v2
  9748. if !(v2 != 0) {
  9749. break
  9750. }
  9751. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9752. /*
  9753. * MRU the list
  9754. */
  9755. if prev != uintptr(unsafe.Pointer(&X_XftDisplayInfo)) {
  9756. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9757. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  9758. X_XftDisplayInfo = info
  9759. }
  9760. return info
  9761. }
  9762. goto _1
  9763. _1:
  9764. ;
  9765. prev = *(*uintptr)(unsafe.Pointer(prev))
  9766. }
  9767. if !(createIfNecessary != 0) {
  9768. return libc.UintptrFromInt32(0)
  9769. }
  9770. info = libc.Xmalloc(tls, uint64(1488))
  9771. if !(info != 0) {
  9772. goto bail0
  9773. }
  9774. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes = libx11.XXAddExtension(tls, dpy)
  9775. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes != 0) {
  9776. goto bail1
  9777. }
  9778. libx11.XXESetCloseDisplay(tls, dpy, (*TXExtCodes)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes)).Fextension, __ccgo_fp(__XftCloseDisplay))
  9779. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay = dpy
  9780. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = libc.UintptrFromInt32(0)
  9781. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libc.UintptrFromInt32(0)
  9782. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender = libc.BoolInt32(libxrender.XXRenderQueryExtension(tls, dpy, bp+40, bp+44) != 0 && libxrender.XXRenderFindVisualFormat(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  9783. Fext_data uintptr
  9784. Fprivate1 uintptr
  9785. Ffd int32
  9786. Fprivate2 int32
  9787. Fproto_major_version int32
  9788. Fproto_minor_version int32
  9789. Fvendor uintptr
  9790. Fprivate3 TXID
  9791. Fprivate4 TXID
  9792. Fprivate5 TXID
  9793. Fprivate6 int32
  9794. Fresource_alloc uintptr
  9795. Fbyte_order int32
  9796. Fbitmap_unit int32
  9797. Fbitmap_pad int32
  9798. Fbitmap_bit_order int32
  9799. Fnformats int32
  9800. Fpixmap_format uintptr
  9801. Fprivate8 int32
  9802. Frelease int32
  9803. Fprivate9 uintptr
  9804. Fprivate10 uintptr
  9805. Fqlen int32
  9806. Flast_request_read uint64
  9807. Frequest uint64
  9808. Fprivate11 TXPointer
  9809. Fprivate12 TXPointer
  9810. Fprivate13 TXPointer
  9811. Fprivate14 TXPointer
  9812. Fmax_request_size uint32
  9813. Fdb uintptr
  9814. Fprivate15 uintptr
  9815. Fdisplay_name uintptr
  9816. Fdefault_screen int32
  9817. Fnscreens int32
  9818. Fscreens uintptr
  9819. Fmotion_buffer uint64
  9820. Fprivate16 uint64
  9821. Fmin_keycode int32
  9822. Fmax_keycode int32
  9823. Fprivate17 TXPointer
  9824. Fprivate18 TXPointer
  9825. Fprivate19 int32
  9826. Fxdefaults uintptr
  9827. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  9828. Fext_data uintptr
  9829. Fprivate1 uintptr
  9830. Ffd int32
  9831. Fprivate2 int32
  9832. Fproto_major_version int32
  9833. Fproto_minor_version int32
  9834. Fvendor uintptr
  9835. Fprivate3 TXID
  9836. Fprivate4 TXID
  9837. Fprivate5 TXID
  9838. Fprivate6 int32
  9839. Fresource_alloc uintptr
  9840. Fbyte_order int32
  9841. Fbitmap_unit int32
  9842. Fbitmap_pad int32
  9843. Fbitmap_bit_order int32
  9844. Fnformats int32
  9845. Fpixmap_format uintptr
  9846. Fprivate8 int32
  9847. Frelease int32
  9848. Fprivate9 uintptr
  9849. Fprivate10 uintptr
  9850. Fqlen int32
  9851. Flast_request_read uint64
  9852. Frequest uint64
  9853. Fprivate11 TXPointer
  9854. Fprivate12 TXPointer
  9855. Fprivate13 TXPointer
  9856. Fprivate14 TXPointer
  9857. Fmax_request_size uint32
  9858. Fdb uintptr
  9859. Fprivate15 uintptr
  9860. Fdisplay_name uintptr
  9861. Fdefault_screen int32
  9862. Fnscreens int32
  9863. Fscreens uintptr
  9864. Fmotion_buffer uint64
  9865. Fprivate16 uint64
  9866. Fmin_keycode int32
  9867. Fmax_keycode int32
  9868. Fprivate17 TXPointer
  9869. Fprivate18 TXPointer
  9870. Fprivate19 int32
  9871. Fxdefaults uintptr
  9872. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual) != libc.UintptrFromInt32(0))
  9873. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = int32(m_FcTrue)
  9874. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  9875. libxrender.XXRenderQueryVersion(tls, dpy, bp+48, bp+52)
  9876. if *(*int32)(unsafe.Pointer(bp + 48)) < 0 || *(*int32)(unsafe.Pointer(bp + 48)) == 0 && *(*int32)(unsafe.Pointer(bp + 52)) <= int32(2) {
  9877. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = m_FcFalse
  9878. }
  9879. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = m_FcFalse
  9880. if *(*int32)(unsafe.Pointer(bp + 48)) > 0 || *(*int32)(unsafe.Pointer(bp + 48)) == 0 && *(*int32)(unsafe.Pointer(bp + 52)) >= int32(10) {
  9881. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = int32(m_FcTrue)
  9882. }
  9883. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  9884. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = int32(32)
  9885. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FredMask = int16(0xff)
  9886. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FgreenMask = int16(0xff)
  9887. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FblueMask = int16(0xff)
  9888. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(0xff)
  9889. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libxrender.XXRenderFindFormat(tls, dpy, uint64(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)
  9890. }
  9891. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  9892. visual = (*TScreen)(unsafe.Pointer((*struct {
  9893. Fext_data uintptr
  9894. Fprivate1 uintptr
  9895. Ffd int32
  9896. Fprivate2 int32
  9897. Fproto_major_version int32
  9898. Fproto_minor_version int32
  9899. Fvendor uintptr
  9900. Fprivate3 TXID
  9901. Fprivate4 TXID
  9902. Fprivate5 TXID
  9903. Fprivate6 int32
  9904. Fresource_alloc uintptr
  9905. Fbyte_order int32
  9906. Fbitmap_unit int32
  9907. Fbitmap_pad int32
  9908. Fbitmap_bit_order int32
  9909. Fnformats int32
  9910. Fpixmap_format uintptr
  9911. Fprivate8 int32
  9912. Frelease int32
  9913. Fprivate9 uintptr
  9914. Fprivate10 uintptr
  9915. Fqlen int32
  9916. Flast_request_read uint64
  9917. Frequest uint64
  9918. Fprivate11 TXPointer
  9919. Fprivate12 TXPointer
  9920. Fprivate13 TXPointer
  9921. Fprivate14 TXPointer
  9922. Fmax_request_size uint32
  9923. Fdb uintptr
  9924. Fprivate15 uintptr
  9925. Fdisplay_name uintptr
  9926. Fdefault_screen int32
  9927. Fnscreens int32
  9928. Fscreens uintptr
  9929. Fmotion_buffer uint64
  9930. Fprivate16 uint64
  9931. Fmin_keycode int32
  9932. Fmax_keycode int32
  9933. Fprivate17 TXPointer
  9934. Fprivate18 TXPointer
  9935. Fprivate19 int32
  9936. Fxdefaults uintptr
  9937. })(unsafe.Pointer(dpy)).Fscreens + uintptr((*struct {
  9938. Fext_data uintptr
  9939. Fprivate1 uintptr
  9940. Ffd int32
  9941. Fprivate2 int32
  9942. Fproto_major_version int32
  9943. Fproto_minor_version int32
  9944. Fvendor uintptr
  9945. Fprivate3 TXID
  9946. Fprivate4 TXID
  9947. Fprivate5 TXID
  9948. Fprivate6 int32
  9949. Fresource_alloc uintptr
  9950. Fbyte_order int32
  9951. Fbitmap_unit int32
  9952. Fbitmap_pad int32
  9953. Fbitmap_bit_order int32
  9954. Fnformats int32
  9955. Fpixmap_format uintptr
  9956. Fprivate8 int32
  9957. Frelease int32
  9958. Fprivate9 uintptr
  9959. Fprivate10 uintptr
  9960. Fqlen int32
  9961. Flast_request_read uint64
  9962. Frequest uint64
  9963. Fprivate11 TXPointer
  9964. Fprivate12 TXPointer
  9965. Fprivate13 TXPointer
  9966. Fprivate14 TXPointer
  9967. Fmax_request_size uint32
  9968. Fdb uintptr
  9969. Fprivate15 uintptr
  9970. Fdisplay_name uintptr
  9971. Fdefault_screen int32
  9972. Fnscreens int32
  9973. Fscreens uintptr
  9974. Fmotion_buffer uint64
  9975. Fprivate16 uint64
  9976. Fmin_keycode int32
  9977. Fmax_keycode int32
  9978. Fprivate17 TXPointer
  9979. Fprivate18 TXPointer
  9980. Fprivate19 int32
  9981. Fxdefaults uintptr
  9982. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual
  9983. format = libxrender.XXRenderFindVisualFormat(tls, dpy, visual)
  9984. libc.Xprintf(tls, __ccgo_ts+24, libc.VaList(bp+64, int32((*TVisual)(unsafe.Pointer(visual)).Fvisualid)))
  9985. if format != 0 {
  9986. if (*TXRenderPictFormat)(unsafe.Pointer(format)).Ftype1 == int32(m_PictTypeDirect) {
  9987. 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)))
  9988. } else {
  9989. libc.Xprintf(tls, __ccgo_ts+83, 0)
  9990. }
  9991. } else {
  9992. libc.Xprintf(tls, __ccgo_ts+99, 0)
  9993. }
  9994. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  9995. v3 = __ccgo_ts + 136
  9996. } else {
  9997. v3 = __ccgo_ts + 141
  9998. }
  9999. libc.Xprintf(tls, __ccgo_ts+147, libc.VaList(bp+64, v3))
  10000. }
  10001. i = 0
  10002. for {
  10003. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  10004. break
  10005. }
  10006. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = -int32(1)
  10007. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  10008. goto _4
  10009. _4:
  10010. ;
  10011. i++
  10012. }
  10013. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = libc.UintptrFromInt32(0)
  10014. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  10015. X_XftDisplayInfo = info
  10016. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory = uint64(0)
  10017. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = uint64(XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, 0, libc.Int32FromInt32(4)*libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  10018. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10019. libc.Xprintf(tls, __ccgo_ts+216, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10020. }
  10021. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts = 0
  10022. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, int32(m_XFT_DPY_MAX_UNREF_FONTS))
  10023. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10024. libc.Xprintf(tls, __ccgo_ts+259, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  10025. }
  10026. libc.Xmemset(tls, info+472, int32('\000'), libc.Uint64FromInt64(8)*libc.Uint64FromInt32(m_XFT_NUM_FONT_HASH))
  10027. return info
  10028. goto bail1
  10029. bail1:
  10030. ;
  10031. libc.Xfree(tls, info)
  10032. goto bail0
  10033. bail0:
  10034. ;
  10035. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  10036. libc.Xprintf(tls, __ccgo_ts+286, 0)
  10037. }
  10038. return libc.UintptrFromInt32(0)
  10039. }
  10040. /*
  10041. * Reduce memory usage in X server
  10042. */
  10043. func __XftDisplayValidateMemory(tls *libc.TLS, info uintptr) {
  10044. bp := tls.Alloc(32)
  10045. defer tls.Free(32)
  10046. var font, public uintptr
  10047. var glyph_memory uint64
  10048. _, _, _ = font, glyph_memory, public
  10049. glyph_memory = uint64(0)
  10050. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10051. for {
  10052. if !(public != 0) {
  10053. break
  10054. }
  10055. font = public
  10056. glyph_memory += (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10057. goto _1
  10058. _1:
  10059. ;
  10060. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10061. }
  10062. if glyph_memory != (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory {
  10063. libc.Xprintf(tls, __ccgo_ts+339, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, glyph_memory))
  10064. }
  10065. }
  10066. func X_XftDisplayManageMemory(tls *libc.TLS, dpy uintptr) {
  10067. bp := tls.Alloc(32)
  10068. defer tls.Free(32)
  10069. var font, info, public uintptr
  10070. var glyph_memory uint64
  10071. _, _, _, _ = font, glyph_memory, info, public
  10072. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  10073. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10074. return
  10075. }
  10076. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10077. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10078. libc.Xprintf(tls, __ccgo_ts+401, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10079. }
  10080. __XftDisplayValidateMemory(tls, info)
  10081. }
  10082. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10083. glyph_memory = uint64(libc.Xrand(tls)) % (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory
  10084. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10085. for public != 0 {
  10086. font = public
  10087. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > glyph_memory {
  10088. X_XftFontUncacheGlyph(tls, dpy, public)
  10089. break
  10090. }
  10091. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10092. glyph_memory -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10093. }
  10094. }
  10095. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10096. __XftDisplayValidateMemory(tls, info)
  10097. }
  10098. }
  10099. func XXftDefaultHasRender(tls *libc.TLS, dpy uintptr) (r int32) {
  10100. var info uintptr
  10101. _ = info
  10102. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10103. if !(info != 0) {
  10104. return m_False
  10105. }
  10106. return (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  10107. }
  10108. func XXftDefaultSet(tls *libc.TLS, dpy uintptr, defaults uintptr) (r int32) {
  10109. var info uintptr
  10110. _ = info
  10111. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10112. if !(info != 0) {
  10113. return m_False
  10114. }
  10115. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  10116. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  10117. }
  10118. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = defaults
  10119. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10120. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = uint64(libc.Int32FromInt32(4) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  10121. }
  10122. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = uint64(XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, 0, int32((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory)))
  10123. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts != 0) {
  10124. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = int32(m_XFT_DPY_MAX_UNREF_FONTS)
  10125. }
  10126. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts)
  10127. return int32(m_True)
  10128. }
  10129. func XXftDefaultParseBool(tls *libc.TLS, v uintptr) (r int32) {
  10130. var c0, c1 int8
  10131. _, _ = c0, c1
  10132. c0 = *(*int8)(unsafe.Pointer(v))
  10133. if libc.BoolInt32(uint32(int32(c0))-uint32('A') < uint32(26)) != 0 {
  10134. c0 = int8(libc.Xtolower(tls, int32(c0)))
  10135. }
  10136. if int32(c0) == int32('t') || int32(c0) == int32('y') || int32(c0) == int32('1') {
  10137. return int32(1)
  10138. }
  10139. if int32(c0) == int32('f') || int32(c0) == int32('n') || int32(c0) == int32('0') {
  10140. return 0
  10141. }
  10142. if int32(c0) == int32('o') {
  10143. c1 = *(*int8)(unsafe.Pointer(v + 1))
  10144. if libc.BoolInt32(uint32(int32(c1))-uint32('A') < uint32(26)) != 0 {
  10145. c1 = int8(libc.Xtolower(tls, int32(c1)))
  10146. }
  10147. if int32(c1) == int32('n') {
  10148. return int32(1)
  10149. }
  10150. if int32(c1) == int32('f') {
  10151. return 0
  10152. }
  10153. }
  10154. return -int32(1)
  10155. }
  10156. func __XftDefaultInitBool(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10157. var i, v1 int32
  10158. var v uintptr
  10159. var v2 bool
  10160. _, _, _, _ = i, v, v1, v2
  10161. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+439, option)
  10162. if v2 = v != 0; v2 {
  10163. v1 = XXftDefaultParseBool(tls, v)
  10164. i = v1
  10165. }
  10166. if v2 && v1 >= 0 {
  10167. return libfontconfig.XFcPatternAddBool(tls, pat, option, libc.BoolInt32(i != 0))
  10168. }
  10169. return int32(m_True)
  10170. }
  10171. func __XftDefaultInitDouble(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10172. bp := tls.Alloc(16)
  10173. defer tls.Free(16)
  10174. var d float64
  10175. var v uintptr
  10176. var _ /* e at bp+0 */ uintptr
  10177. _, _ = d, v
  10178. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+439, option)
  10179. if v != 0 {
  10180. d = libc.Xstrtod(tls, v, bp)
  10181. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10182. return libfontconfig.XFcPatternAddDouble(tls, pat, option, d)
  10183. }
  10184. }
  10185. return int32(m_True)
  10186. }
  10187. func __XftDefaultInitInteger(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10188. bp := tls.Alloc(16)
  10189. defer tls.Free(16)
  10190. var v uintptr
  10191. var _ /* e at bp+0 */ uintptr
  10192. var _ /* i at bp+8 */ int32
  10193. _ = v
  10194. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+439, option)
  10195. if v != 0 {
  10196. if libfontconfig.XFcNameConstant(tls, v, bp+8) != 0 {
  10197. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10198. }
  10199. *(*int32)(unsafe.Pointer(bp + 8)) = int32(libc.Xstrtol(tls, v, bp, 0))
  10200. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10201. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10202. }
  10203. }
  10204. return int32(m_True)
  10205. }
  10206. func __XftDefaultInit(tls *libc.TLS, dpy uintptr) (r uintptr) {
  10207. var pat uintptr
  10208. _ = pat
  10209. pat = libfontconfig.XFcPatternCreate(tls)
  10210. if !(pat != 0) {
  10211. goto bail0
  10212. }
  10213. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+443) != 0) {
  10214. goto bail1
  10215. }
  10216. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+449) != 0) {
  10217. goto bail1
  10218. }
  10219. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+453) != 0) {
  10220. goto bail1
  10221. }
  10222. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+460) != 0) {
  10223. goto bail1
  10224. }
  10225. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+465) != 0) {
  10226. goto bail1
  10227. }
  10228. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+475) != 0) {
  10229. goto bail1
  10230. }
  10231. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+485) != 0) {
  10232. goto bail1
  10233. }
  10234. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+494) != 0) {
  10235. goto bail1
  10236. }
  10237. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+503) != 0) {
  10238. goto bail1
  10239. }
  10240. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+513) != 0) {
  10241. goto bail1
  10242. }
  10243. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+521) != 0) {
  10244. goto bail1
  10245. }
  10246. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+201) != 0) {
  10247. goto bail1
  10248. }
  10249. return pat
  10250. goto bail1
  10251. bail1:
  10252. ;
  10253. libfontconfig.XFcPatternDestroy(tls, pat)
  10254. goto bail0
  10255. bail0:
  10256. ;
  10257. return libc.UintptrFromInt32(0)
  10258. return r
  10259. }
  10260. func __XftDefaultGet(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, v uintptr) (r1 TFcResult) {
  10261. var info uintptr
  10262. var r TFcResult
  10263. _, _ = info, r
  10264. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10265. if !(info != 0) {
  10266. return int32(_FcResultNoMatch)
  10267. }
  10268. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10269. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = __XftDefaultInit(tls, dpy)
  10270. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10271. return int32(_FcResultNoMatch)
  10272. }
  10273. }
  10274. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, screen, v)
  10275. if r == int32(_FcResultNoId) && screen > 0 {
  10276. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, 0, v)
  10277. }
  10278. return r
  10279. }
  10280. func XXftDefaultGetBool(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10281. bp := tls.Alloc(16)
  10282. defer tls.Free(16)
  10283. var r TFcResult
  10284. var _ /* v at bp+0 */ TFcValue
  10285. _ = r
  10286. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10287. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeBool) {
  10288. return def
  10289. }
  10290. return *(*TFcBool)(unsafe.Pointer(bp + 8))
  10291. }
  10292. func XXftDefaultGetInteger(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10293. bp := tls.Alloc(16)
  10294. defer tls.Free(16)
  10295. var r TFcResult
  10296. var _ /* v at bp+0 */ TFcValue
  10297. _ = r
  10298. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10299. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeInteger) {
  10300. return def
  10301. }
  10302. return *(*int32)(unsafe.Pointer(bp + 8))
  10303. }
  10304. func XXftDefaultGetDouble(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def float64) (r1 float64) {
  10305. bp := tls.Alloc(16)
  10306. defer tls.Free(16)
  10307. var r TFcResult
  10308. var _ /* v at bp+0 */ TFcValue
  10309. _ = r
  10310. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10311. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeDouble) {
  10312. return def
  10313. }
  10314. return *(*float64)(unsafe.Pointer(bp + 8))
  10315. }
  10316. func XXftDefaultSubstitute(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr) {
  10317. bp := tls.Alloc(16)
  10318. defer tls.Free(16)
  10319. var dpi float64
  10320. var render_order, subpixel int32
  10321. var _ /* v at bp+0 */ TFcValue
  10322. _, _, _ = dpi, render_order, subpixel
  10323. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+453, 0, bp) == int32(_FcResultNoMatch) {
  10324. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+453, XXftDefaultGetBool(tls, dpy, __ccgo_ts+453, screen, XXftDefaultHasRender(tls, dpy)))
  10325. }
  10326. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+475, 0, bp) == int32(_FcResultNoMatch) {
  10327. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+475, XXftDefaultGetBool(tls, dpy, __ccgo_ts+475, screen, int32(m_True)))
  10328. }
  10329. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+485, 0, bp) == int32(_FcResultNoMatch) {
  10330. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+485, XXftDefaultGetBool(tls, dpy, __ccgo_ts+485, screen, m_False))
  10331. }
  10332. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+513, 0, bp) == int32(_FcResultNoMatch) {
  10333. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+513, XXftDefaultGetBool(tls, dpy, __ccgo_ts+513, screen, int32(m_True)))
  10334. }
  10335. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+503, 0, bp) == int32(_FcResultNoMatch) {
  10336. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+503, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+503, screen, int32(m_FC_HINT_FULL)))
  10337. }
  10338. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+494, 0, bp) == int32(_FcResultNoMatch) {
  10339. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+494, XXftDefaultGetBool(tls, dpy, __ccgo_ts+494, screen, m_False))
  10340. }
  10341. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+460, 0, bp) == int32(_FcResultNoMatch) {
  10342. subpixel = m_FC_RGBA_UNKNOWN
  10343. if XXftDefaultHasRender(tls, dpy) != 0 {
  10344. render_order = libxrender.XXRenderQuerySubpixelOrder(tls, dpy, screen)
  10345. switch render_order {
  10346. default:
  10347. fallthrough
  10348. case m_SubPixelUnknown:
  10349. subpixel = m_FC_RGBA_UNKNOWN
  10350. case int32(m_SubPixelHorizontalRGB):
  10351. subpixel = int32(m_FC_RGBA_RGB)
  10352. case int32(m_SubPixelHorizontalBGR):
  10353. subpixel = int32(m_FC_RGBA_BGR)
  10354. case int32(m_SubPixelVerticalRGB):
  10355. subpixel = int32(m_FC_RGBA_VRGB)
  10356. case int32(m_SubPixelVerticalBGR):
  10357. subpixel = int32(m_FC_RGBA_VBGR)
  10358. case int32(m_SubPixelNone):
  10359. subpixel = int32(m_FC_RGBA_NONE)
  10360. break
  10361. }
  10362. }
  10363. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+460, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+460, screen, subpixel))
  10364. }
  10365. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+465, 0, bp) == int32(_FcResultNoMatch) {
  10366. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+465, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+465, screen, int32(m_FC_LCD_DEFAULT)))
  10367. }
  10368. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+521, 0, bp) == int32(_FcResultNoMatch) {
  10369. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+521, XXftDefaultGetBool(tls, dpy, __ccgo_ts+521, screen, m_False))
  10370. }
  10371. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+449, 0, bp) == int32(_FcResultNoMatch) {
  10372. dpi = float64((*TScreen)(unsafe.Pointer((*struct {
  10373. Fext_data uintptr
  10374. Fprivate1 uintptr
  10375. Ffd int32
  10376. Fprivate2 int32
  10377. Fproto_major_version int32
  10378. Fproto_minor_version int32
  10379. Fvendor uintptr
  10380. Fprivate3 TXID
  10381. Fprivate4 TXID
  10382. Fprivate5 TXID
  10383. Fprivate6 int32
  10384. Fresource_alloc uintptr
  10385. Fbyte_order int32
  10386. Fbitmap_unit int32
  10387. Fbitmap_pad int32
  10388. Fbitmap_bit_order int32
  10389. Fnformats int32
  10390. Fpixmap_format uintptr
  10391. Fprivate8 int32
  10392. Frelease int32
  10393. Fprivate9 uintptr
  10394. Fprivate10 uintptr
  10395. Fqlen int32
  10396. Flast_request_read uint64
  10397. Frequest uint64
  10398. Fprivate11 TXPointer
  10399. Fprivate12 TXPointer
  10400. Fprivate13 TXPointer
  10401. Fprivate14 TXPointer
  10402. Fmax_request_size uint32
  10403. Fdb uintptr
  10404. Fprivate15 uintptr
  10405. Fdisplay_name uintptr
  10406. Fdefault_screen int32
  10407. Fnscreens int32
  10408. Fscreens uintptr
  10409. Fmotion_buffer uint64
  10410. Fprivate16 uint64
  10411. Fmin_keycode int32
  10412. Fmax_keycode int32
  10413. Fprivate17 TXPointer
  10414. Fprivate18 TXPointer
  10415. Fprivate19 int32
  10416. Fxdefaults uintptr
  10417. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fheight) * float64(25.4) / float64((*TScreen)(unsafe.Pointer((*struct {
  10418. Fext_data uintptr
  10419. Fprivate1 uintptr
  10420. Ffd int32
  10421. Fprivate2 int32
  10422. Fproto_major_version int32
  10423. Fproto_minor_version int32
  10424. Fvendor uintptr
  10425. Fprivate3 TXID
  10426. Fprivate4 TXID
  10427. Fprivate5 TXID
  10428. Fprivate6 int32
  10429. Fresource_alloc uintptr
  10430. Fbyte_order int32
  10431. Fbitmap_unit int32
  10432. Fbitmap_pad int32
  10433. Fbitmap_bit_order int32
  10434. Fnformats int32
  10435. Fpixmap_format uintptr
  10436. Fprivate8 int32
  10437. Frelease int32
  10438. Fprivate9 uintptr
  10439. Fprivate10 uintptr
  10440. Fqlen int32
  10441. Flast_request_read uint64
  10442. Frequest uint64
  10443. Fprivate11 TXPointer
  10444. Fprivate12 TXPointer
  10445. Fprivate13 TXPointer
  10446. Fprivate14 TXPointer
  10447. Fmax_request_size uint32
  10448. Fdb uintptr
  10449. Fprivate15 uintptr
  10450. Fdisplay_name uintptr
  10451. Fdefault_screen int32
  10452. Fnscreens int32
  10453. Fscreens uintptr
  10454. Fmotion_buffer uint64
  10455. Fprivate16 uint64
  10456. Fmin_keycode int32
  10457. Fmax_keycode int32
  10458. Fprivate17 TXPointer
  10459. Fprivate18 TXPointer
  10460. Fprivate19 int32
  10461. Fxdefaults uintptr
  10462. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fmheight)
  10463. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+449, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+449, screen, dpi))
  10464. }
  10465. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+443, 0, bp) == int32(_FcResultNoMatch) {
  10466. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+443, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+443, screen, float64(1)))
  10467. }
  10468. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+201, 0, bp) == int32(_FcResultNoMatch) {
  10469. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+201, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, screen, libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  10470. }
  10471. libfontconfig.XFcDefaultSubstitute(tls, pattern)
  10472. }
  10473. const m_VisualIDMask1 = 1
  10474. const m_VisualScreenMask1 = 2
  10475. /* xftxlfd.c */
  10476. /*
  10477. * Ok, this is a pain. To share source pictures across multiple destinations,
  10478. * the screen for each drawable must be discovered.
  10479. */
  10480. func __XftDrawScreen(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr) (r int32) {
  10481. bp := tls.Alloc(112)
  10482. defer tls.Free(112)
  10483. var ret uintptr
  10484. var s int32
  10485. var _ /* borderWidth at bp+24 */ uint32
  10486. var _ /* depth at bp+28 */ uint32
  10487. var _ /* height at bp+20 */ uint32
  10488. var _ /* nret at bp+96 */ int32
  10489. var _ /* root at bp+0 */ TWindow
  10490. var _ /* template at bp+32 */ TXVisualInfo
  10491. var _ /* width at bp+16 */ uint32
  10492. var _ /* x at bp+8 */ int32
  10493. var _ /* y at bp+12 */ int32
  10494. _, _ = ret, s
  10495. /* Special case the most common environment */
  10496. if (*struct {
  10497. Fext_data uintptr
  10498. Fprivate1 uintptr
  10499. Ffd int32
  10500. Fprivate2 int32
  10501. Fproto_major_version int32
  10502. Fproto_minor_version int32
  10503. Fvendor uintptr
  10504. Fprivate3 TXID
  10505. Fprivate4 TXID
  10506. Fprivate5 TXID
  10507. Fprivate6 int32
  10508. Fresource_alloc uintptr
  10509. Fbyte_order int32
  10510. Fbitmap_unit int32
  10511. Fbitmap_pad int32
  10512. Fbitmap_bit_order int32
  10513. Fnformats int32
  10514. Fpixmap_format uintptr
  10515. Fprivate8 int32
  10516. Frelease int32
  10517. Fprivate9 uintptr
  10518. Fprivate10 uintptr
  10519. Fqlen int32
  10520. Flast_request_read uint64
  10521. Frequest uint64
  10522. Fprivate11 TXPointer
  10523. Fprivate12 TXPointer
  10524. Fprivate13 TXPointer
  10525. Fprivate14 TXPointer
  10526. Fmax_request_size uint32
  10527. Fdb uintptr
  10528. Fprivate15 uintptr
  10529. Fdisplay_name uintptr
  10530. Fdefault_screen int32
  10531. Fnscreens int32
  10532. Fscreens uintptr
  10533. Fmotion_buffer uint64
  10534. Fprivate16 uint64
  10535. Fmin_keycode int32
  10536. Fmax_keycode int32
  10537. Fprivate17 TXPointer
  10538. Fprivate18 TXPointer
  10539. Fprivate19 int32
  10540. Fxdefaults uintptr
  10541. })(unsafe.Pointer(dpy)).Fnscreens == int32(1) {
  10542. return 0
  10543. }
  10544. /*
  10545. * If we've got a visual, look for the screen that points at it.
  10546. * This requires no round trip.
  10547. */
  10548. if visual != 0 {
  10549. s = 0
  10550. for {
  10551. if !(s < (*struct {
  10552. Fext_data uintptr
  10553. Fprivate1 uintptr
  10554. Ffd int32
  10555. Fprivate2 int32
  10556. Fproto_major_version int32
  10557. Fproto_minor_version int32
  10558. Fvendor uintptr
  10559. Fprivate3 TXID
  10560. Fprivate4 TXID
  10561. Fprivate5 TXID
  10562. Fprivate6 int32
  10563. Fresource_alloc uintptr
  10564. Fbyte_order int32
  10565. Fbitmap_unit int32
  10566. Fbitmap_pad int32
  10567. Fbitmap_bit_order int32
  10568. Fnformats int32
  10569. Fpixmap_format uintptr
  10570. Fprivate8 int32
  10571. Frelease int32
  10572. Fprivate9 uintptr
  10573. Fprivate10 uintptr
  10574. Fqlen int32
  10575. Flast_request_read uint64
  10576. Frequest uint64
  10577. Fprivate11 TXPointer
  10578. Fprivate12 TXPointer
  10579. Fprivate13 TXPointer
  10580. Fprivate14 TXPointer
  10581. Fmax_request_size uint32
  10582. Fdb uintptr
  10583. Fprivate15 uintptr
  10584. Fdisplay_name uintptr
  10585. Fdefault_screen int32
  10586. Fnscreens int32
  10587. Fscreens uintptr
  10588. Fmotion_buffer uint64
  10589. Fprivate16 uint64
  10590. Fmin_keycode int32
  10591. Fmax_keycode int32
  10592. Fprivate17 TXPointer
  10593. Fprivate18 TXPointer
  10594. Fprivate19 int32
  10595. Fxdefaults uintptr
  10596. })(unsafe.Pointer(dpy)).Fnscreens) {
  10597. break
  10598. }
  10599. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fvisualid = (*TVisual)(unsafe.Pointer(visual)).Fvisualid
  10600. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fscreen = s
  10601. ret = libx11.XXGetVisualInfo(tls, dpy, int64(libc.Int32FromInt32(m_VisualIDMask1)|libc.Int32FromInt32(m_VisualScreenMask1)), bp+32, bp+96)
  10602. if ret != 0 {
  10603. libx11.XXFree(tls, ret)
  10604. return s
  10605. }
  10606. goto _1
  10607. _1:
  10608. ;
  10609. s++
  10610. }
  10611. }
  10612. /*
  10613. * Otherwise, as the server for the drawable geometry and find
  10614. * the screen from the root window.
  10615. * This takes a round trip.
  10616. */
  10617. if libx11.XXGetGeometry(tls, dpy, drawable, bp, bp+8, bp+12, bp+16, bp+20, bp+24, bp+28) != 0 {
  10618. s = 0
  10619. for {
  10620. if !(s < (*struct {
  10621. Fext_data uintptr
  10622. Fprivate1 uintptr
  10623. Ffd int32
  10624. Fprivate2 int32
  10625. Fproto_major_version int32
  10626. Fproto_minor_version int32
  10627. Fvendor uintptr
  10628. Fprivate3 TXID
  10629. Fprivate4 TXID
  10630. Fprivate5 TXID
  10631. Fprivate6 int32
  10632. Fresource_alloc uintptr
  10633. Fbyte_order int32
  10634. Fbitmap_unit int32
  10635. Fbitmap_pad int32
  10636. Fbitmap_bit_order int32
  10637. Fnformats int32
  10638. Fpixmap_format uintptr
  10639. Fprivate8 int32
  10640. Frelease int32
  10641. Fprivate9 uintptr
  10642. Fprivate10 uintptr
  10643. Fqlen int32
  10644. Flast_request_read uint64
  10645. Frequest uint64
  10646. Fprivate11 TXPointer
  10647. Fprivate12 TXPointer
  10648. Fprivate13 TXPointer
  10649. Fprivate14 TXPointer
  10650. Fmax_request_size uint32
  10651. Fdb uintptr
  10652. Fprivate15 uintptr
  10653. Fdisplay_name uintptr
  10654. Fdefault_screen int32
  10655. Fnscreens int32
  10656. Fscreens uintptr
  10657. Fmotion_buffer uint64
  10658. Fprivate16 uint64
  10659. Fmin_keycode int32
  10660. Fmax_keycode int32
  10661. Fprivate17 TXPointer
  10662. Fprivate18 TXPointer
  10663. Fprivate19 int32
  10664. Fxdefaults uintptr
  10665. })(unsafe.Pointer(dpy)).Fnscreens) {
  10666. break
  10667. }
  10668. if (*TScreen)(unsafe.Pointer((*struct {
  10669. Fext_data uintptr
  10670. Fprivate1 uintptr
  10671. Ffd int32
  10672. Fprivate2 int32
  10673. Fproto_major_version int32
  10674. Fproto_minor_version int32
  10675. Fvendor uintptr
  10676. Fprivate3 TXID
  10677. Fprivate4 TXID
  10678. Fprivate5 TXID
  10679. Fprivate6 int32
  10680. Fresource_alloc uintptr
  10681. Fbyte_order int32
  10682. Fbitmap_unit int32
  10683. Fbitmap_pad int32
  10684. Fbitmap_bit_order int32
  10685. Fnformats int32
  10686. Fpixmap_format uintptr
  10687. Fprivate8 int32
  10688. Frelease int32
  10689. Fprivate9 uintptr
  10690. Fprivate10 uintptr
  10691. Fqlen int32
  10692. Flast_request_read uint64
  10693. Frequest uint64
  10694. Fprivate11 TXPointer
  10695. Fprivate12 TXPointer
  10696. Fprivate13 TXPointer
  10697. Fprivate14 TXPointer
  10698. Fmax_request_size uint32
  10699. Fdb uintptr
  10700. Fprivate15 uintptr
  10701. Fdisplay_name uintptr
  10702. Fdefault_screen int32
  10703. Fnscreens int32
  10704. Fscreens uintptr
  10705. Fmotion_buffer uint64
  10706. Fprivate16 uint64
  10707. Fmin_keycode int32
  10708. Fmax_keycode int32
  10709. Fprivate17 TXPointer
  10710. Fprivate18 TXPointer
  10711. Fprivate19 int32
  10712. Fxdefaults uintptr
  10713. })(unsafe.Pointer(dpy)).Fscreens+uintptr(s)*128)).Froot == *(*TWindow)(unsafe.Pointer(bp)) {
  10714. return s
  10715. }
  10716. goto _2
  10717. _2:
  10718. ;
  10719. s++
  10720. }
  10721. }
  10722. /*
  10723. * Make a guess -- it's probably wrong, but then the app probably
  10724. * handed us a bogus drawable in this case
  10725. */
  10726. return 0
  10727. }
  10728. func XXftDrawDepth(tls *libc.TLS, draw uintptr) (r uint32) {
  10729. bp := tls.Alloc(32)
  10730. defer tls.Free(32)
  10731. var _ /* borderWidth at bp+24 */ uint32
  10732. var _ /* depth at bp+28 */ uint32
  10733. var _ /* height at bp+20 */ uint32
  10734. var _ /* root at bp+0 */ TWindow
  10735. var _ /* width at bp+16 */ uint32
  10736. var _ /* x at bp+8 */ int32
  10737. var _ /* y at bp+12 */ int32
  10738. if !((*TXftDraw)(unsafe.Pointer(draw)).Fdepth != 0) {
  10739. 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 {
  10740. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = *(*uint32)(unsafe.Pointer(bp + 28))
  10741. }
  10742. }
  10743. return (*TXftDraw)(unsafe.Pointer(draw)).Fdepth
  10744. }
  10745. func XXftDrawBitsPerPixel(tls *libc.TLS, draw uintptr) (r uint32) {
  10746. bp := tls.Alloc(16)
  10747. defer tls.Free(16)
  10748. var depth, v1 uint32
  10749. var formats, v2 uintptr
  10750. var i int32
  10751. var v3 bool
  10752. var _ /* nformats at bp+0 */ int32
  10753. _, _, _, _, _, _ = depth, formats, i, v1, v2, v3
  10754. if !((*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel != 0) {
  10755. v1 = XXftDrawDepth(tls, draw)
  10756. depth = v1
  10757. if v3 = v1 != 0; v3 {
  10758. v2 = libx11.XXListPixmapFormats(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, bp)
  10759. formats = v2
  10760. }
  10761. if v3 && v2 != 0 {
  10762. i = 0
  10763. for {
  10764. if !(i < *(*int32)(unsafe.Pointer(bp))) {
  10765. break
  10766. }
  10767. if uint32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fdepth) == depth {
  10768. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fbits_per_pixel)
  10769. break
  10770. }
  10771. goto _4
  10772. _4:
  10773. ;
  10774. i++
  10775. }
  10776. libx11.XXFree(tls, formats)
  10777. }
  10778. }
  10779. return (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel
  10780. }
  10781. func XXftDrawCreate(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr, colormap TColormap) (r uintptr) {
  10782. var draw uintptr
  10783. _ = draw
  10784. draw = libc.Xmalloc(tls, uint64(96))
  10785. if !(draw != 0) {
  10786. return libc.UintptrFromInt32(0)
  10787. }
  10788. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10789. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10790. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, drawable, visual)
  10791. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(0) /* don't find out unless we need to know */
  10792. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out unless we need to know */
  10793. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = visual
  10794. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = colormap
  10795. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10796. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10797. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10798. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10799. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10800. XXftMemAlloc(tls, m_XFT_MEM_DRAW, int32(96))
  10801. return draw
  10802. }
  10803. func XXftDrawCreateBitmap(tls *libc.TLS, dpy uintptr, bitmap TPixmap) (r uintptr) {
  10804. var draw uintptr
  10805. _ = draw
  10806. draw = libc.Xmalloc(tls, uint64(96))
  10807. if !(draw != 0) {
  10808. return libc.UintptrFromInt32(0)
  10809. }
  10810. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10811. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = bitmap
  10812. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, bitmap, libc.UintptrFromInt32(0))
  10813. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(1)
  10814. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(1)
  10815. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10816. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10817. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10818. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10819. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10820. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10821. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10822. XXftMemAlloc(tls, m_XFT_MEM_DRAW, int32(96))
  10823. return draw
  10824. }
  10825. func XXftDrawCreateAlpha(tls *libc.TLS, dpy uintptr, pixmap TPixmap, depth int32) (r uintptr) {
  10826. var draw uintptr
  10827. _ = draw
  10828. draw = libc.Xmalloc(tls, uint64(96))
  10829. if !(draw != 0) {
  10830. return libc.UintptrFromInt32(0)
  10831. }
  10832. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10833. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = pixmap
  10834. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, pixmap, libc.UintptrFromInt32(0))
  10835. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(depth)
  10836. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out until we need it */
  10837. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10838. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10839. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10840. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10841. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10842. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10843. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10844. XXftMemAlloc(tls, m_XFT_MEM_DRAW, int32(96))
  10845. return draw
  10846. }
  10847. func __XftDrawFormat(tls *libc.TLS, draw uintptr) (r uintptr) {
  10848. bp := tls.Alloc(48)
  10849. defer tls.Free(48)
  10850. var info uintptr
  10851. var _ /* pf at bp+0 */ TXRenderPictFormat
  10852. _ = info
  10853. info = X_XftDisplayInfoGet(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_True))
  10854. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0) {
  10855. return libc.UintptrFromInt32(0)
  10856. }
  10857. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual == libc.UintptrFromInt32(0) {
  10858. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  10859. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = int32(XXftDrawDepth(tls, draw))
  10860. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.Falpha = 0
  10861. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(libc.Int32FromInt32(1)<<(*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth - libc.Int32FromInt32(1))
  10862. return libxrender.XXRenderFindFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, uint64(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)
  10863. } else {
  10864. return libxrender.XXRenderFindVisualFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fvisual)
  10865. }
  10866. return r
  10867. }
  10868. func XXftDrawChange(tls *libc.TLS, draw uintptr, drawable TDrawable) {
  10869. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10870. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10871. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10872. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10873. }
  10874. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10875. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10876. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10877. }
  10878. }
  10879. func XXftDrawDisplay(tls *libc.TLS, draw uintptr) (r uintptr) {
  10880. return (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  10881. }
  10882. func XXftDrawDrawable(tls *libc.TLS, draw uintptr) (r TDrawable) {
  10883. return (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable
  10884. }
  10885. func XXftDrawColormap(tls *libc.TLS, draw uintptr) (r TColormap) {
  10886. return (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap
  10887. }
  10888. func XXftDrawVisual(tls *libc.TLS, draw uintptr) (r uintptr) {
  10889. return (*TXftDraw)(unsafe.Pointer(draw)).Fvisual
  10890. }
  10891. func XXftDrawDestroy(tls *libc.TLS, draw uintptr) {
  10892. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10893. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10894. }
  10895. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10896. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10897. }
  10898. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  10899. case int32(_XftClipTypeRegion):
  10900. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  10901. case int32(_XftClipTypeRectangles):
  10902. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  10903. case int32(_XftClipTypeNone):
  10904. break
  10905. }
  10906. XXftMemFree(tls, m_XFT_MEM_DRAW, int32(96))
  10907. libc.Xfree(tls, draw)
  10908. }
  10909. func XXftDrawSrcPicture(tls *libc.TLS, draw uintptr, color uintptr) (r TPicture) {
  10910. bp := tls.Alloc(96)
  10911. defer tls.Free(96)
  10912. var dpy, info uintptr
  10913. var i int32
  10914. var pix TPixmap
  10915. var _ /* bitmapColor at bp+0 */ TXftColor
  10916. var _ /* pa at bp+16 */ TXRenderPictureAttributes
  10917. _, _, _, _ = dpy, i, info, pix
  10918. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  10919. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10920. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat != 0) {
  10921. return uint64(0)
  10922. }
  10923. /*
  10924. * Monochrome targets require special handling; the PictOp controls
  10925. * the color, and the color must be opaque
  10926. */
  10927. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fdepth == uint32(1) {
  10928. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Falpha = uint16(0xffff)
  10929. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fred = uint16(0xffff)
  10930. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fgreen = uint16(0xffff)
  10931. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fblue = uint16(0xffff)
  10932. color = bp
  10933. }
  10934. /*
  10935. * See if there's one already available
  10936. */
  10937. i = 0
  10938. for {
  10939. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  10940. break
  10941. }
  10942. 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) {
  10943. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  10944. }
  10945. goto _1
  10946. _1:
  10947. ;
  10948. i++
  10949. }
  10950. /*
  10951. * Pick one to replace at random
  10952. */
  10953. i = int32(uint32(libc.Xrand(tls)) % uint32(m_XFT_NUM_SOLID_COLOR))
  10954. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid != 0 {
  10955. /*
  10956. * Free any existing entry
  10957. */
  10958. if (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0 {
  10959. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict)
  10960. }
  10961. /*
  10962. * Create picture
  10963. */
  10964. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = libxrender.XXRenderCreateSolidFill(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, color+8)
  10965. } else {
  10966. 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 {
  10967. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict)
  10968. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  10969. }
  10970. /*
  10971. * Create picture if necessary
  10972. */
  10973. if !((*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0) {
  10974. pix = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  10975. Fext_data uintptr
  10976. Fprivate1 uintptr
  10977. Ffd int32
  10978. Fprivate2 int32
  10979. Fproto_major_version int32
  10980. Fproto_minor_version int32
  10981. Fvendor uintptr
  10982. Fprivate3 TXID
  10983. Fprivate4 TXID
  10984. Fprivate5 TXID
  10985. Fprivate6 int32
  10986. Fresource_alloc uintptr
  10987. Fbyte_order int32
  10988. Fbitmap_unit int32
  10989. Fbitmap_pad int32
  10990. Fbitmap_bit_order int32
  10991. Fnformats int32
  10992. Fpixmap_format uintptr
  10993. Fprivate8 int32
  10994. Frelease int32
  10995. Fprivate9 uintptr
  10996. Fprivate10 uintptr
  10997. Fqlen int32
  10998. Flast_request_read uint64
  10999. Frequest uint64
  11000. Fprivate11 TXPointer
  11001. Fprivate12 TXPointer
  11002. Fprivate13 TXPointer
  11003. Fprivate14 TXPointer
  11004. Fmax_request_size uint32
  11005. Fdb uintptr
  11006. Fprivate15 uintptr
  11007. Fdisplay_name uintptr
  11008. Fdefault_screen int32
  11009. Fnscreens int32
  11010. Fscreens uintptr
  11011. Fmotion_buffer uint64
  11012. Fprivate16 uint64
  11013. Fmin_keycode int32
  11014. Fmax_keycode int32
  11015. Fprivate17 TXPointer
  11016. Fprivate18 TXPointer
  11017. Fprivate19 int32
  11018. Fxdefaults uintptr
  11019. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*TXftDraw)(unsafe.Pointer(draw)).Fscreen)*128)).Froot, uint32(1), uint32(1), uint32((*TXRenderPictFormat)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat)).Fdepth))
  11020. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp + 16))).Frepeat = int32(m_True)
  11021. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pix, (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat, uint64(libc.Int32FromInt32(1)<<libc.Int32FromInt32(0)), bp+16)
  11022. libx11.XXFreePixmap(tls, dpy, pix)
  11023. }
  11024. /*
  11025. * Set to the new color
  11026. */
  11027. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11028. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11029. libxrender.XXRenderFillRectangle(tls, dpy, int32(m_PictOpSrc), (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict, color+8, 0, 0, uint32(1), uint32(1))
  11030. }
  11031. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11032. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11033. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  11034. }
  11035. func __XftDrawOp(tls *libc.TLS, draw uintptr, color uintptr) (r int32) {
  11036. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0 || (*TXftDraw)(unsafe.Pointer(draw)).Fdepth != uint32(1) {
  11037. return int32(m_PictOpOver)
  11038. }
  11039. if int32((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  11040. return int32(m_PictOpOver)
  11041. }
  11042. return int32(m_PictOpOutReverse)
  11043. }
  11044. func __XftDrawRenderPrepare(tls *libc.TLS, draw uintptr) (r TFcBool) {
  11045. bp := tls.Alloc(80)
  11046. defer tls.Free(80)
  11047. var format uintptr
  11048. var mask uint64
  11049. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11050. _, _ = format, mask
  11051. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11052. mask = uint64(0)
  11053. format = __XftDrawFormat(tls, draw)
  11054. if !(format != 0) {
  11055. return m_FcFalse
  11056. }
  11057. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11058. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11059. mask |= uint64(libc.Int32FromInt32(1) << libc.Int32FromInt32(8))
  11060. }
  11061. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, format, mask, bp)
  11062. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11063. return m_FcFalse
  11064. }
  11065. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11066. case int32(_XftClipTypeRegion):
  11067. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11068. case int32(_XftClipTypeRectangles):
  11069. 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)
  11070. case int32(_XftClipTypeNone):
  11071. break
  11072. }
  11073. }
  11074. return int32(m_FcTrue)
  11075. }
  11076. func __XftDrawCorePrepare(tls *libc.TLS, draw uintptr, color uintptr) (r TFcBool) {
  11077. bp := tls.Alloc(128)
  11078. defer tls.Free(128)
  11079. var mask uint64
  11080. var _ /* gcv at bp+0 */ TXGCValues
  11081. _ = mask
  11082. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11083. mask = uint64(0)
  11084. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11085. (*(*TXGCValues)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11086. mask |= uint64(libc.Int64FromInt64(1) << libc.Int32FromInt32(15))
  11087. }
  11088. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libx11.XXCreateGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, mask, bp)
  11089. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11090. return m_FcFalse
  11091. }
  11092. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11093. case int32(_XftClipTypeRegion):
  11094. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11095. case int32(_XftClipTypeRectangles):
  11096. 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)
  11097. case int32(_XftClipTypeNone):
  11098. break
  11099. }
  11100. }
  11101. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11102. return int32(m_FcTrue)
  11103. }
  11104. func XXftDrawPicture(tls *libc.TLS, draw uintptr) (r TPicture) {
  11105. if !(__XftDrawRenderPrepare(tls, draw) != 0) {
  11106. return uint64(0)
  11107. }
  11108. return (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict
  11109. }
  11110. func XXftDrawGlyphs(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  11111. var font uintptr
  11112. var src, v1 TPicture
  11113. var v2 bool
  11114. _, _, _, _ = font, src, v1, v2
  11115. font = pub
  11116. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11117. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11118. v1 = XXftDrawSrcPicture(tls, draw, color)
  11119. src = v1
  11120. }
  11121. if v2 && v1 != 0 {
  11122. 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)
  11123. }
  11124. } else {
  11125. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11126. XXftGlyphCore(tls, draw, color, pub, x, y, glyphs, nglyphs)
  11127. }
  11128. }
  11129. }
  11130. func XXftDrawString8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11131. bp := tls.Alloc(4128)
  11132. defer tls.Free(4128)
  11133. var glyphs uintptr
  11134. var i int32
  11135. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11136. _, _ = glyphs, i
  11137. if XXftDebug(tls)&int32(m_XFT_DBG_DRAW) != 0 {
  11138. libc.Xprintf(tls, __ccgo_ts+530, libc.VaList(bp+4104, len1, len1, string1))
  11139. }
  11140. if len1 <= int32(m_NUM_LOCAL) {
  11141. glyphs = bp
  11142. } else {
  11143. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  11144. if !(glyphs != 0) {
  11145. return
  11146. }
  11147. }
  11148. i = 0
  11149. for {
  11150. if !(i < len1) {
  11151. break
  11152. }
  11153. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11154. goto _1
  11155. _1:
  11156. ;
  11157. i++
  11158. }
  11159. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11160. if glyphs != bp {
  11161. libc.Xfree(tls, glyphs)
  11162. }
  11163. }
  11164. func XXftDrawString16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11165. bp := tls.Alloc(4096)
  11166. defer tls.Free(4096)
  11167. var glyphs uintptr
  11168. var i int32
  11169. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11170. _, _ = glyphs, i
  11171. if len1 <= int32(m_NUM_LOCAL) {
  11172. glyphs = bp
  11173. } else {
  11174. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  11175. if !(glyphs != 0) {
  11176. return
  11177. }
  11178. }
  11179. i = 0
  11180. for {
  11181. if !(i < len1) {
  11182. break
  11183. }
  11184. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11185. goto _1
  11186. _1:
  11187. ;
  11188. i++
  11189. }
  11190. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11191. if glyphs != bp {
  11192. libc.Xfree(tls, glyphs)
  11193. }
  11194. }
  11195. func XXftDrawString32(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11196. bp := tls.Alloc(4096)
  11197. defer tls.Free(4096)
  11198. var glyphs uintptr
  11199. var i int32
  11200. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11201. _, _ = glyphs, i
  11202. if len1 <= int32(m_NUM_LOCAL) {
  11203. glyphs = bp
  11204. } else {
  11205. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  11206. if !(glyphs != 0) {
  11207. return
  11208. }
  11209. }
  11210. i = 0
  11211. for {
  11212. if !(i < len1) {
  11213. break
  11214. }
  11215. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11216. goto _1
  11217. _1:
  11218. ;
  11219. i++
  11220. }
  11221. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11222. if glyphs != bp {
  11223. libc.Xfree(tls, glyphs)
  11224. }
  11225. }
  11226. func XXftDrawStringUtf8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11227. bp := tls.Alloc(4112)
  11228. defer tls.Free(4112)
  11229. var glyphs, glyphs_new uintptr
  11230. var i, l, size, v1, v3 int32
  11231. var v2 bool
  11232. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11233. var _ /* ucs4 at bp+4096 */ TFcChar32
  11234. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11235. i = 0
  11236. glyphs = bp
  11237. size = int32(m_NUM_LOCAL)
  11238. for {
  11239. if v2 = len1 != 0; v2 {
  11240. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11241. l = v1
  11242. }
  11243. if !(v2 && v1 > 0) {
  11244. break
  11245. }
  11246. if i == size {
  11247. glyphs_new = libc.Xmalloc(tls, uint64(size)*uint64(2)*uint64(4))
  11248. if !(glyphs_new != 0) {
  11249. if glyphs != bp {
  11250. libc.Xfree(tls, glyphs)
  11251. }
  11252. return
  11253. }
  11254. libc.Xmemcpy(tls, glyphs_new, glyphs, uint64(size)*uint64(4))
  11255. size *= int32(2)
  11256. if glyphs != bp {
  11257. libc.Xfree(tls, glyphs)
  11258. }
  11259. glyphs = glyphs_new
  11260. }
  11261. v3 = i
  11262. i++
  11263. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11264. string1 += uintptr(l)
  11265. len1 -= l
  11266. }
  11267. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11268. if glyphs != bp {
  11269. libc.Xfree(tls, glyphs)
  11270. }
  11271. }
  11272. func XXftDrawStringUtf16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, endian TFcEndian, len1 int32) {
  11273. bp := tls.Alloc(4112)
  11274. defer tls.Free(4112)
  11275. var glyphs, glyphs_new uintptr
  11276. var i, l, size, v1, v3 int32
  11277. var v2 bool
  11278. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11279. var _ /* ucs4 at bp+4096 */ TFcChar32
  11280. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11281. i = 0
  11282. glyphs = bp
  11283. size = int32(m_NUM_LOCAL)
  11284. for {
  11285. if v2 = len1 != 0; v2 {
  11286. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11287. l = v1
  11288. }
  11289. if !(v2 && v1 > 0) {
  11290. break
  11291. }
  11292. if i == size {
  11293. glyphs_new = libc.Xmalloc(tls, uint64(size)*uint64(2)*uint64(4))
  11294. if !(glyphs_new != 0) {
  11295. if glyphs != bp {
  11296. libc.Xfree(tls, glyphs)
  11297. }
  11298. return
  11299. }
  11300. libc.Xmemcpy(tls, glyphs_new, glyphs, uint64(size)*uint64(4))
  11301. size *= int32(2)
  11302. if glyphs != bp {
  11303. libc.Xfree(tls, glyphs)
  11304. }
  11305. glyphs = glyphs_new
  11306. }
  11307. v3 = i
  11308. i++
  11309. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11310. string1 += uintptr(l)
  11311. len1 -= l
  11312. }
  11313. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11314. if glyphs != bp {
  11315. libc.Xfree(tls, glyphs)
  11316. }
  11317. }
  11318. func XXftDrawGlyphSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, glyphs uintptr, len1 int32) {
  11319. var font uintptr
  11320. var src, v1 TPicture
  11321. var v2 bool
  11322. _, _, _, _ = font, src, v1, v2
  11323. font = pub
  11324. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11325. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11326. v1 = XXftDrawSrcPicture(tls, draw, color)
  11327. src = v1
  11328. }
  11329. if v2 && v1 != 0 {
  11330. XXftGlyphSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, pub, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs, len1)
  11331. }
  11332. } else {
  11333. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11334. XXftGlyphSpecCore(tls, draw, color, pub, glyphs, len1)
  11335. }
  11336. }
  11337. }
  11338. func XXftDrawGlyphFontSpec(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, len1 int32) {
  11339. var i, start int32
  11340. var src, v1 TPicture
  11341. var v2 bool
  11342. _, _, _, _, _ = i, src, start, v1, v2
  11343. i = 0
  11344. for i < len1 {
  11345. start = i
  11346. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11347. for i < len1 && (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11348. i++
  11349. }
  11350. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11351. v1 = XXftDrawSrcPicture(tls, draw, color)
  11352. src = v1
  11353. }
  11354. if v2 && v1 != 0 {
  11355. 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)
  11356. }
  11357. } else {
  11358. for i < len1 && !((*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0) {
  11359. i++
  11360. }
  11361. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11362. XXftGlyphFontSpecCore(tls, draw, color, glyphs+uintptr(start)*16, i-start)
  11363. }
  11364. }
  11365. }
  11366. }
  11367. func XXftDrawCharSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, chars uintptr, len1 int32) {
  11368. bp := tls.Alloc(8192)
  11369. defer tls.Free(8192)
  11370. var glyphs uintptr
  11371. var i int32
  11372. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  11373. _, _ = glyphs, i
  11374. if len1 <= int32(m_NUM_LOCAL) {
  11375. glyphs = bp
  11376. } else {
  11377. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(8))
  11378. if !(glyphs != 0) {
  11379. return
  11380. }
  11381. }
  11382. i = 0
  11383. for {
  11384. if !(i < len1) {
  11385. break
  11386. }
  11387. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  11388. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  11389. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  11390. goto _1
  11391. _1:
  11392. ;
  11393. i++
  11394. }
  11395. XXftDrawGlyphSpec(tls, draw, color, pub, glyphs, len1)
  11396. if glyphs != bp {
  11397. libc.Xfree(tls, glyphs)
  11398. }
  11399. }
  11400. func XXftDrawCharFontSpec(tls *libc.TLS, draw uintptr, color uintptr, chars uintptr, len1 int32) {
  11401. bp := tls.Alloc(16384)
  11402. defer tls.Free(16384)
  11403. var glyphs uintptr
  11404. var i int32
  11405. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  11406. _, _ = glyphs, i
  11407. if len1 <= int32(m_NUM_LOCAL) {
  11408. glyphs = bp
  11409. } else {
  11410. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(16))
  11411. if !(glyphs != 0) {
  11412. return
  11413. }
  11414. }
  11415. i = 0
  11416. for {
  11417. if !(i < len1) {
  11418. break
  11419. }
  11420. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  11421. (*(*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)
  11422. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  11423. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  11424. goto _1
  11425. _1:
  11426. ;
  11427. i++
  11428. }
  11429. XXftDrawGlyphFontSpec(tls, draw, color, glyphs, len1)
  11430. if glyphs != bp {
  11431. libc.Xfree(tls, glyphs)
  11432. }
  11433. }
  11434. func XXftDrawRect(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  11435. if __XftDrawRenderPrepare(tls, draw) != 0 {
  11436. libxrender.XXRenderFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_PictOpSrc), (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, color+8, x, y, width, height)
  11437. } else {
  11438. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11439. /* note: not XftRectCore() */
  11440. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11441. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  11442. }
  11443. }
  11444. }
  11445. func XXftDrawSetClip(tls *libc.TLS, draw uintptr, r TRegion) (r1 int32) {
  11446. bp := tls.Alloc(80)
  11447. defer tls.Free(80)
  11448. var n TRegion
  11449. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11450. _ = n
  11451. n = libc.UintptrFromInt32(0)
  11452. /*
  11453. * Check for quick exits
  11454. */
  11455. if !(r != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeNone) {
  11456. return int32(m_True)
  11457. }
  11458. if r != 0 && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRegion) && libx11.XXEqualRegion(tls, r, *(*TRegion)(unsafe.Pointer(draw + 56))) != 0 {
  11459. return int32(m_True)
  11460. }
  11461. /*
  11462. * Duplicate the region so future changes can be short circuited
  11463. */
  11464. if r != 0 {
  11465. n = libx11.XXCreateRegion(tls)
  11466. if n != 0 {
  11467. if !(libx11.XXUnionRegion(tls, n, r, n) != 0) {
  11468. libx11.XXDestroyRegion(tls, n)
  11469. return m_False
  11470. }
  11471. }
  11472. }
  11473. /*
  11474. * Destroy existing clip
  11475. */
  11476. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11477. case int32(_XftClipTypeRegion):
  11478. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11479. case int32(_XftClipTypeRectangles):
  11480. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11481. case int32(_XftClipTypeNone):
  11482. break
  11483. }
  11484. /*
  11485. * Set the clip
  11486. */
  11487. if n != 0 {
  11488. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRegion)
  11489. *(*TRegion)(unsafe.Pointer(draw + 56)) = n
  11490. } else {
  11491. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  11492. }
  11493. /*
  11494. * Apply new clip to existing objects
  11495. */
  11496. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11497. if n != 0 {
  11498. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, n)
  11499. } else {
  11500. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fclip_mask = uint64(0)
  11501. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, uint64(libc.Int32FromInt32(1)<<libc.Int32FromInt32(6)), bp)
  11502. }
  11503. }
  11504. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11505. if n != 0 {
  11506. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11507. } else {
  11508. libx11.XXSetClipMask(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, uint64(0))
  11509. }
  11510. }
  11511. return int32(m_True)
  11512. }
  11513. func XXftDrawSetClipRectangles(tls *libc.TLS, draw uintptr, xOrigin int32, yOrigin int32, rects uintptr, n int32) (r int32) {
  11514. var new1 uintptr
  11515. _ = new1
  11516. new1 = libc.UintptrFromInt32(0)
  11517. /*
  11518. * Check for quick exit
  11519. */
  11520. 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, uint64(n)*uint64(8)) != 0) {
  11521. return int32(m_True)
  11522. }
  11523. /*
  11524. * Duplicate the region so future changes can be short circuited
  11525. */
  11526. new1 = libc.Xmalloc(tls, uint64(12)+uint64(n)*uint64(8))
  11527. if !(new1 != 0) {
  11528. return m_False
  11529. }
  11530. (*TXftClipRect)(unsafe.Pointer(new1)).Fn = n
  11531. (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin = xOrigin
  11532. (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin = yOrigin
  11533. libc.Xmemcpy(tls, new1+libc.UintptrFromInt32(1)*12, rects, uint64(n)*uint64(8))
  11534. /*
  11535. * Destroy existing clip
  11536. */
  11537. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11538. case int32(_XftClipTypeRegion):
  11539. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11540. case int32(_XftClipTypeRectangles):
  11541. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11542. case int32(_XftClipTypeNone):
  11543. break
  11544. }
  11545. /*
  11546. * Set the clip
  11547. */
  11548. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRectangles)
  11549. *(*uintptr)(unsafe.Pointer(draw + 56)) = new1
  11550. /*
  11551. * Apply new clip to existing objects
  11552. */
  11553. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11554. 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)
  11555. }
  11556. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11557. 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)
  11558. }
  11559. return int32(m_True)
  11560. }
  11561. func XXftDrawSetSubwindowMode(tls *libc.TLS, draw uintptr, mode int32) {
  11562. bp := tls.Alloc(80)
  11563. defer tls.Free(80)
  11564. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11565. if mode == (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode {
  11566. return
  11567. }
  11568. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = mode
  11569. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11570. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = mode
  11571. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, uint64(libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)), bp)
  11572. }
  11573. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11574. libx11.XXSetSubwindowMode(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, mode)
  11575. }
  11576. }
  11577. const m_VisualIDMask2 = 0x1
  11578. const m_VisualScreenMask2 = 0x2
  11579. /* xftxlfd.c */
  11580. func XXftGlyphExtents(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyphs int32, extents uintptr) {
  11581. bp := tls.Alloc(1040)
  11582. defer tls.Free(1040)
  11583. var bottom, left, n, overall_bottom, overall_left, overall_right, overall_top, right, top, x, y, v1, v6 int32
  11584. var font, g, xftg, v2, v3, v4, v7, v8 uintptr
  11585. var glyph TFT_UInt
  11586. var glyphs_loaded TFcBool
  11587. var v5, v9 bool
  11588. var _ /* missing at bp+0 */ [256]TFT_UInt
  11589. var _ /* nmissing at bp+1024 */ int32
  11590. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  11591. font = pub
  11592. g = glyphs
  11593. n = nglyphs
  11594. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  11595. glyphs_loaded = m_FcFalse
  11596. for {
  11597. v1 = n
  11598. n--
  11599. if !(v1 != 0) {
  11600. break
  11601. }
  11602. v2 = g
  11603. g += 4
  11604. if XXftFontCheckGlyph(tls, dpy, pub, m_FcFalse, *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  11605. glyphs_loaded = int32(m_FcTrue)
  11606. }
  11607. }
  11608. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  11609. XXftFontLoadGlyphs(tls, dpy, pub, m_FcFalse, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  11610. }
  11611. g = glyphs
  11612. n = nglyphs
  11613. xftg = libc.UintptrFromInt32(0)
  11614. for n != 0 {
  11615. v3 = g
  11616. g += 4
  11617. glyph = *(*TFT_UInt)(unsafe.Pointer(v3))
  11618. n--
  11619. if v5 = glyph < uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); v5 {
  11620. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11621. xftg = v4
  11622. }
  11623. if v5 && v4 != 0 {
  11624. break
  11625. }
  11626. }
  11627. if n == 0 {
  11628. if xftg != 0 {
  11629. *(*TXGlyphInfo)(unsafe.Pointer(extents)) = (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics
  11630. } else {
  11631. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11632. }
  11633. } else {
  11634. x = 0
  11635. y = 0
  11636. overall_left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11637. overall_top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11638. overall_right = overall_left + int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11639. overall_bottom = overall_top + int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11640. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11641. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11642. for {
  11643. v6 = n
  11644. n--
  11645. if !(v6 != 0) {
  11646. break
  11647. }
  11648. v7 = g
  11649. g += 4
  11650. glyph = *(*TFT_UInt)(unsafe.Pointer(v7))
  11651. if v9 = glyph < uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); v9 {
  11652. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11653. xftg = v8
  11654. }
  11655. if v9 && v8 != 0 {
  11656. left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11657. top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11658. right = left + int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11659. bottom = top + int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11660. if left < overall_left {
  11661. overall_left = left
  11662. }
  11663. if top < overall_top {
  11664. overall_top = top
  11665. }
  11666. if right > overall_right {
  11667. overall_right = right
  11668. }
  11669. if bottom > overall_bottom {
  11670. overall_bottom = bottom
  11671. }
  11672. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11673. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11674. }
  11675. }
  11676. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fx = int16(-overall_left)
  11677. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fy = int16(-overall_top)
  11678. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fwidth = uint16(overall_right - overall_left)
  11679. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fheight = uint16(overall_bottom - overall_top)
  11680. (*TXGlyphInfo)(unsafe.Pointer(extents)).FxOff = int16(x)
  11681. (*TXGlyphInfo)(unsafe.Pointer(extents)).FyOff = int16(y)
  11682. }
  11683. if glyphs_loaded != 0 {
  11684. X_XftFontManageMemory(tls, dpy, pub)
  11685. }
  11686. }
  11687. func XXftTextExtents8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11688. bp := tls.Alloc(4096)
  11689. defer tls.Free(4096)
  11690. var glyphs uintptr
  11691. var i int32
  11692. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11693. _, _ = glyphs, i
  11694. if len1 <= int32(m_NUM_LOCAL) {
  11695. glyphs = bp
  11696. } else {
  11697. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  11698. if !(glyphs != 0) {
  11699. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11700. return
  11701. }
  11702. }
  11703. i = 0
  11704. for {
  11705. if !(i < len1) {
  11706. break
  11707. }
  11708. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11709. goto _1
  11710. _1:
  11711. ;
  11712. i++
  11713. }
  11714. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11715. if glyphs != bp {
  11716. libc.Xfree(tls, glyphs)
  11717. }
  11718. }
  11719. func XXftTextExtents16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11720. bp := tls.Alloc(4096)
  11721. defer tls.Free(4096)
  11722. var glyphs uintptr
  11723. var i int32
  11724. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11725. _, _ = glyphs, i
  11726. if len1 <= int32(m_NUM_LOCAL) {
  11727. glyphs = bp
  11728. } else {
  11729. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  11730. if !(glyphs != 0) {
  11731. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11732. return
  11733. }
  11734. }
  11735. i = 0
  11736. for {
  11737. if !(i < len1) {
  11738. break
  11739. }
  11740. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11741. goto _1
  11742. _1:
  11743. ;
  11744. i++
  11745. }
  11746. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11747. if glyphs != bp {
  11748. libc.Xfree(tls, glyphs)
  11749. }
  11750. }
  11751. func XXftTextExtents32(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11752. bp := tls.Alloc(4096)
  11753. defer tls.Free(4096)
  11754. var glyphs uintptr
  11755. var i int32
  11756. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11757. _, _ = glyphs, i
  11758. if len1 <= int32(m_NUM_LOCAL) {
  11759. glyphs = bp
  11760. } else {
  11761. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  11762. if !(glyphs != 0) {
  11763. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11764. return
  11765. }
  11766. }
  11767. i = 0
  11768. for {
  11769. if !(i < len1) {
  11770. break
  11771. }
  11772. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11773. goto _1
  11774. _1:
  11775. ;
  11776. i++
  11777. }
  11778. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11779. if glyphs != bp {
  11780. libc.Xfree(tls, glyphs)
  11781. }
  11782. }
  11783. func XXftTextExtentsUtf8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11784. bp := tls.Alloc(4112)
  11785. defer tls.Free(4112)
  11786. var glyphs, glyphs_new uintptr
  11787. var i, l, size, v1, v3 int32
  11788. var v2 bool
  11789. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11790. var _ /* ucs4 at bp+4096 */ TFcChar32
  11791. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11792. i = 0
  11793. glyphs = bp
  11794. size = int32(m_NUM_LOCAL)
  11795. for {
  11796. if v2 = len1 != 0; v2 {
  11797. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11798. l = v1
  11799. }
  11800. if !(v2 && v1 > 0) {
  11801. break
  11802. }
  11803. if i == size {
  11804. glyphs_new = libc.Xmalloc(tls, uint64(size)*uint64(2)*uint64(4))
  11805. if !(glyphs_new != 0) {
  11806. if glyphs != bp {
  11807. libc.Xfree(tls, glyphs)
  11808. }
  11809. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11810. return
  11811. }
  11812. libc.Xmemcpy(tls, glyphs_new, glyphs, uint64(size)*uint64(4))
  11813. size *= int32(2)
  11814. if glyphs != bp {
  11815. libc.Xfree(tls, glyphs)
  11816. }
  11817. glyphs = glyphs_new
  11818. }
  11819. v3 = i
  11820. i++
  11821. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11822. string1 += uintptr(l)
  11823. len1 -= l
  11824. }
  11825. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  11826. if glyphs != bp {
  11827. libc.Xfree(tls, glyphs)
  11828. }
  11829. }
  11830. func XXftTextExtentsUtf16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, endian TFcEndian, len1 int32, extents uintptr) {
  11831. bp := tls.Alloc(4112)
  11832. defer tls.Free(4112)
  11833. var glyphs, glyphs_new uintptr
  11834. var i, l, size, v1, v3 int32
  11835. var v2 bool
  11836. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11837. var _ /* ucs4 at bp+4096 */ TFcChar32
  11838. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11839. i = 0
  11840. glyphs = bp
  11841. size = int32(m_NUM_LOCAL)
  11842. for {
  11843. if v2 = len1 != 0; v2 {
  11844. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11845. l = v1
  11846. }
  11847. if !(v2 && v1 > 0) {
  11848. break
  11849. }
  11850. if i == size {
  11851. glyphs_new = libc.Xmalloc(tls, uint64(size)*uint64(2)*uint64(4))
  11852. if !(glyphs_new != 0) {
  11853. if glyphs != bp {
  11854. libc.Xfree(tls, glyphs)
  11855. }
  11856. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11857. return
  11858. }
  11859. libc.Xmemcpy(tls, glyphs_new, glyphs, uint64(size)*uint64(4))
  11860. size *= int32(2)
  11861. if glyphs != bp {
  11862. libc.Xfree(tls, glyphs)
  11863. }
  11864. glyphs = glyphs_new
  11865. }
  11866. v3 = i
  11867. i++
  11868. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11869. string1 += uintptr(l)
  11870. len1 -= l
  11871. }
  11872. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  11873. if glyphs != bp {
  11874. libc.Xfree(tls, glyphs)
  11875. }
  11876. }
  11877. /* xftxlfd.c */
  11878. func XXftFontMatch(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, result uintptr) (r uintptr) {
  11879. var match, new1 uintptr
  11880. _, _ = match, new1
  11881. if !(XXftInit(tls, libc.UintptrFromInt32(0)) != 0) {
  11882. return libc.UintptrFromInt32(0)
  11883. }
  11884. new1 = libfontconfig.XFcPatternDuplicate(tls, pattern)
  11885. if !(new1 != 0) {
  11886. return libc.UintptrFromInt32(0)
  11887. }
  11888. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11889. libc.Xprintf(tls, __ccgo_ts+550, 0)
  11890. libfontconfig.XFcPatternPrint(tls, new1)
  11891. }
  11892. libfontconfig.XFcConfigSubstitute(tls, libc.UintptrFromInt32(0), new1, int32(_FcMatchPattern))
  11893. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11894. libc.Xprintf(tls, __ccgo_ts+572, 0)
  11895. libfontconfig.XFcPatternPrint(tls, new1)
  11896. }
  11897. XXftDefaultSubstitute(tls, dpy, screen, new1)
  11898. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11899. libc.Xprintf(tls, __ccgo_ts+615, 0)
  11900. libfontconfig.XFcPatternPrint(tls, new1)
  11901. }
  11902. match = libfontconfig.XFcFontMatch(tls, libc.UintptrFromInt32(0), new1, result)
  11903. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11904. libc.Xprintf(tls, __ccgo_ts+660, 0)
  11905. libfontconfig.XFcPatternPrint(tls, match)
  11906. }
  11907. libfontconfig.XFcPatternDestroy(tls, new1)
  11908. return match
  11909. }
  11910. func XXftFontOpen(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  11911. bp := tls.Alloc(16)
  11912. defer tls.Free(16)
  11913. var font, match, pat uintptr
  11914. var va Tva_list
  11915. var _ /* result at bp+0 */ TFcResult
  11916. _, _, _, _ = font, match, pat, va
  11917. va = va1
  11918. pat = libfontconfig.XFcPatternVaBuild(tls, libc.UintptrFromInt32(0), va)
  11919. _ = va
  11920. if !(pat != 0) {
  11921. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11922. libc.Xprintf(tls, __ccgo_ts+681, 0)
  11923. }
  11924. return libc.UintptrFromInt32(0)
  11925. }
  11926. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  11927. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11928. libc.Xprintf(tls, __ccgo_ts+720, 0)
  11929. libfontconfig.XFcPatternPrint(tls, pat)
  11930. if match != 0 {
  11931. libc.Xprintf(tls, __ccgo_ts+729, 0)
  11932. libfontconfig.XFcPatternPrint(tls, match)
  11933. } else {
  11934. libc.Xprintf(tls, __ccgo_ts+736, 0)
  11935. }
  11936. }
  11937. libfontconfig.XFcPatternDestroy(tls, pat)
  11938. if !(match != 0) {
  11939. return libc.UintptrFromInt32(0)
  11940. }
  11941. font = XXftFontOpenPattern(tls, dpy, match)
  11942. if !(font != 0) {
  11943. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11944. libc.Xprintf(tls, __ccgo_ts+746, 0)
  11945. }
  11946. libfontconfig.XFcPatternDestroy(tls, match)
  11947. }
  11948. return font
  11949. }
  11950. func XXftFontOpenName(tls *libc.TLS, dpy uintptr, screen int32, name uintptr) (r uintptr) {
  11951. bp := tls.Alloc(32)
  11952. defer tls.Free(32)
  11953. var font, match, pat uintptr
  11954. var _ /* result at bp+0 */ TFcResult
  11955. _, _, _ = font, match, pat
  11956. pat = libfontconfig.XFcNameParse(tls, name)
  11957. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11958. libc.Xprintf(tls, __ccgo_ts+755, libc.VaList(bp+16, name))
  11959. if pat != 0 {
  11960. libfontconfig.XFcPatternPrint(tls, pat)
  11961. } else {
  11962. libc.Xprintf(tls, __ccgo_ts+778, 0)
  11963. }
  11964. }
  11965. if !(pat != 0) {
  11966. return libc.UintptrFromInt32(0)
  11967. }
  11968. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  11969. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11970. if match != 0 {
  11971. libc.Xprintf(tls, __ccgo_ts+729, 0)
  11972. libfontconfig.XFcPatternPrint(tls, match)
  11973. } else {
  11974. libc.Xprintf(tls, __ccgo_ts+736, 0)
  11975. }
  11976. }
  11977. libfontconfig.XFcPatternDestroy(tls, pat)
  11978. if !(match != 0) {
  11979. return libc.UintptrFromInt32(0)
  11980. }
  11981. font = XXftFontOpenPattern(tls, dpy, match)
  11982. if !(font != 0) {
  11983. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11984. libc.Xprintf(tls, __ccgo_ts+746, 0)
  11985. }
  11986. libfontconfig.XFcPatternDestroy(tls, match)
  11987. }
  11988. return font
  11989. }
  11990. func XXftFontOpenXlfd(tls *libc.TLS, dpy uintptr, screen int32, xlfd uintptr) (r uintptr) {
  11991. bp := tls.Alloc(32)
  11992. defer tls.Free(32)
  11993. var font, match, pat uintptr
  11994. var _ /* result at bp+0 */ TFcResult
  11995. _, _, _ = font, match, pat
  11996. pat = XXftXlfdParse(tls, xlfd, m_FcFalse, m_FcFalse)
  11997. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11998. libc.Xprintf(tls, __ccgo_ts+792, libc.VaList(bp+16, xlfd))
  11999. if pat != 0 {
  12000. libc.Xprintf(tls, __ccgo_ts+815, 0)
  12001. } else {
  12002. libfontconfig.XFcPatternPrint(tls, pat)
  12003. }
  12004. }
  12005. if !(pat != 0) {
  12006. return libc.UintptrFromInt32(0)
  12007. }
  12008. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12009. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12010. if match != 0 {
  12011. libc.Xprintf(tls, __ccgo_ts+729, 0)
  12012. libfontconfig.XFcPatternPrint(tls, match)
  12013. } else {
  12014. libc.Xprintf(tls, __ccgo_ts+736, 0)
  12015. }
  12016. }
  12017. libfontconfig.XFcPatternDestroy(tls, pat)
  12018. if !(match != 0) {
  12019. return libc.UintptrFromInt32(0)
  12020. }
  12021. font = XXftFontOpenPattern(tls, dpy, match)
  12022. if !(font != 0) {
  12023. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12024. libc.Xprintf(tls, __ccgo_ts+746, 0)
  12025. }
  12026. libfontconfig.XFcPatternDestroy(tls, match)
  12027. }
  12028. return font
  12029. }
  12030. const m_FT_LOAD_DEFAULT1 = 0
  12031. const m_XFT_EMBEDDED_BITMAP = "embeddedbitmap"
  12032. /*
  12033. * List of all open files (each face in a file is managed separately)
  12034. */
  12035. var __XftFtFiles uintptr
  12036. var _XftMaxFreeTypeFiles = int32(5)
  12037. func __XftGetFile(tls *libc.TLS, file uintptr, id int32) (r uintptr) {
  12038. bp := tls.Alloc(32)
  12039. defer tls.Free(32)
  12040. var f uintptr
  12041. var v2, v3, v4 TFT_Fixed
  12042. _, _, _, _ = f, v2, v3, v4
  12043. if !(XXftInitFtLibrary(tls) != 0) {
  12044. return libc.UintptrFromInt32(0)
  12045. }
  12046. f = __XftFtFiles
  12047. for {
  12048. if !(f != 0) {
  12049. break
  12050. }
  12051. if !(libc.Xstrcmp(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file) != 0) && (*TXftFtFile)(unsafe.Pointer(f)).Fid == id {
  12052. (*TXftFtFile)(unsafe.Pointer(f)).Fref++
  12053. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12054. libc.Xprintf(tls, __ccgo_ts+829, libc.VaList(bp+8, file, id, (*TXftFtFile)(unsafe.Pointer(f)).Fref))
  12055. }
  12056. return f
  12057. }
  12058. goto _1
  12059. _1:
  12060. ;
  12061. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12062. }
  12063. f = libc.Xmalloc(tls, uint64(96)+libc.Xstrlen(tls, file)+uint64(1))
  12064. if !(f != 0) {
  12065. return libc.UintptrFromInt32(0)
  12066. }
  12067. XXftMemAlloc(tls, int32(m_XFT_MEM_FILE), int32(libc.Uint64FromInt64(96)+libc.Xstrlen(tls, file)+libc.Uint64FromInt32(1)))
  12068. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12069. libc.Xprintf(tls, __ccgo_ts+867, libc.VaList(bp+8, file, id))
  12070. }
  12071. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = __XftFtFiles
  12072. __XftFtFiles = f
  12073. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12074. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = f + libc.UintptrFromInt32(1)*96
  12075. libc.Xstrcpy(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file)
  12076. (*TXftFtFile)(unsafe.Pointer(f)).Fid = id
  12077. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12078. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12079. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12080. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12081. v4 = libc.Int64FromInt32(0)
  12082. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v4
  12083. v3 = v4
  12084. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v3
  12085. v2 = v3
  12086. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v2
  12087. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v2
  12088. return f
  12089. }
  12090. func __XftGetFaceFile(tls *libc.TLS, face TFT_Face) (r uintptr) {
  12091. var f uintptr
  12092. var v1, v2, v3 TFT_Fixed
  12093. _, _, _, _ = f, v1, v2, v3
  12094. f = libc.Xmalloc(tls, uint64(96))
  12095. if !(f != 0) {
  12096. return libc.UintptrFromInt32(0)
  12097. }
  12098. XXftMemAlloc(tls, int32(m_XFT_MEM_FILE), int32(96))
  12099. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = libc.UintptrFromInt32(0)
  12100. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12101. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = libc.UintptrFromInt32(0)
  12102. (*TXftFtFile)(unsafe.Pointer(f)).Fid = 0
  12103. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12104. (*TXftFtFile)(unsafe.Pointer(f)).Fface = face
  12105. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12106. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12107. v3 = libc.Int64FromInt32(0)
  12108. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12109. v2 = v3
  12110. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12111. v1 = v2
  12112. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12113. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12114. return f
  12115. }
  12116. func __XftNumFiles(tls *libc.TLS) (r int32) {
  12117. var count int32
  12118. var f uintptr
  12119. _, _ = count, f
  12120. count = 0
  12121. f = __XftFtFiles
  12122. for {
  12123. if !(f != 0) {
  12124. break
  12125. }
  12126. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12127. count++
  12128. }
  12129. goto _1
  12130. _1:
  12131. ;
  12132. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12133. }
  12134. return count
  12135. }
  12136. func __XftNthFile(tls *libc.TLS, n int32) (r uintptr) {
  12137. var count, v2 int32
  12138. var f uintptr
  12139. _, _, _ = count, f, v2
  12140. count = 0
  12141. f = __XftFtFiles
  12142. for {
  12143. if !(f != 0) {
  12144. break
  12145. }
  12146. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12147. v2 = count
  12148. count++
  12149. if v2 == n {
  12150. break
  12151. }
  12152. }
  12153. goto _1
  12154. _1:
  12155. ;
  12156. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12157. }
  12158. return f
  12159. }
  12160. func __XftUncacheFiles(tls *libc.TLS) {
  12161. bp := tls.Alloc(32)
  12162. defer tls.Free(32)
  12163. var f uintptr
  12164. var n, v1 int32
  12165. _, _, _ = f, n, v1
  12166. for {
  12167. v1 = __XftNumFiles(tls)
  12168. n = v1
  12169. if !(v1 > _XftMaxFreeTypeFiles) {
  12170. break
  12171. }
  12172. f = __XftNthFile(tls, libc.Xrand(tls)%n)
  12173. if f != 0 {
  12174. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12175. libc.Xprintf(tls, __ccgo_ts+895, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12176. }
  12177. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12178. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12179. }
  12180. }
  12181. }
  12182. func __XftLockFile(tls *libc.TLS, f uintptr) (r TFT_Face) {
  12183. bp := tls.Alloc(32)
  12184. defer tls.Free(32)
  12185. var v1, v2, v3 TFT_Fixed
  12186. _, _, _ = v1, v2, v3
  12187. (*TXftFtFile)(unsafe.Pointer(f)).Flock++
  12188. if !((*TXftFtFile)(unsafe.Pointer(f)).Fface != 0) {
  12189. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12190. libc.Xprintf(tls, __ccgo_ts+926, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12191. }
  12192. if libfreetype.XFT_New_Face(tls, X_XftFTlibrary, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, int64((*TXftFtFile)(unsafe.Pointer(f)).Fid), f+88) != 0 {
  12193. (*TXftFtFile)(unsafe.Pointer(f)).Flock--
  12194. }
  12195. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12196. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12197. v3 = libc.Int64FromInt32(0)
  12198. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12199. v2 = v3
  12200. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12201. v1 = v2
  12202. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12203. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12204. __XftUncacheFiles(tls)
  12205. }
  12206. return (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12207. }
  12208. func __XftLockError(tls *libc.TLS, reason uintptr) {
  12209. bp := tls.Alloc(16)
  12210. defer tls.Free(16)
  12211. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+946, libc.VaList(bp+8, reason))
  12212. }
  12213. func __XftUnlockFile(tls *libc.TLS, f uintptr) {
  12214. var v1 int32
  12215. var v2 uintptr
  12216. _, _ = v1, v2
  12217. v2 = f + 80
  12218. *(*int32)(unsafe.Pointer(v2))--
  12219. v1 = *(*int32)(unsafe.Pointer(v2))
  12220. if v1 < 0 {
  12221. __XftLockError(tls, __ccgo_ts+969)
  12222. }
  12223. }
  12224. func X_XftSetFace(tls *libc.TLS, f uintptr, xsize TFT_F26Dot6, ysize TFT_F26Dot6, matrix uintptr) (r TFcBool) {
  12225. bp := tls.Alloc(48)
  12226. defer tls.Free(48)
  12227. var best, i int32
  12228. var face TFT_Face
  12229. var v2, v3, v4, v5, v6, v7 int64
  12230. var v8, v9 bool
  12231. _, _, _, _, _, _, _, _, _, _, _ = best, face, i, v2, v3, v4, v5, v6, v7, v8, v9
  12232. face = (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12233. if (*TXftFtFile)(unsafe.Pointer(f)).Fxsize != xsize || (*TXftFtFile)(unsafe.Pointer(f)).Fysize != ysize {
  12234. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12235. libc.Xprintf(tls, __ccgo_ts+991, libc.VaList(bp+8, int32(xsize>>libc.Int32FromInt32(6)), int32(ysize>>libc.Int32FromInt32(6)), int32(xsize), int32(ysize)))
  12236. }
  12237. /*
  12238. * Bitmap only faces must match exactly, so find the closest
  12239. * one (height dominant search)
  12240. */
  12241. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  12242. best = 0
  12243. i = int32(1)
  12244. for {
  12245. if !(i < (*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_fixed_sizes) {
  12246. break
  12247. }
  12248. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12249. v2 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12250. } else {
  12251. v2 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem
  12252. }
  12253. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem < 0 {
  12254. v3 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12255. } else {
  12256. v3 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12257. }
  12258. if v9 = v2 < v3; !v9 {
  12259. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12260. v4 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12261. } else {
  12262. v4 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem
  12263. }
  12264. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem < 0 {
  12265. v5 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12266. } else {
  12267. v5 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12268. }
  12269. if v8 = v4 == v5; v8 {
  12270. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem < 0 {
  12271. v6 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem)
  12272. } else {
  12273. v6 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem
  12274. }
  12275. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem < 0 {
  12276. v7 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem)
  12277. } else {
  12278. v7 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem
  12279. }
  12280. }
  12281. }
  12282. if v9 || v8 && v6 < v7 {
  12283. best = i
  12284. }
  12285. goto _1
  12286. _1:
  12287. ;
  12288. i++
  12289. }
  12290. /*
  12291. * Freetype 2.1.7 and earlier used width/height
  12292. * for matching sizes in the BDF and PCF loaders.
  12293. * This has been fixed for 2.1.8. Because BDF and PCF
  12294. * files have but a single strike per file, we can
  12295. * simply try both sizes.
  12296. */
  12297. 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 {
  12298. return m_False
  12299. }
  12300. } else {
  12301. if libfreetype.XFT_Set_Char_Size(tls, face, xsize, ysize, uint32(0), uint32(0)) != 0 {
  12302. return m_False
  12303. }
  12304. }
  12305. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = xsize
  12306. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = ysize
  12307. }
  12308. 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) {
  12309. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12310. 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)))
  12311. }
  12312. libfreetype.XFT_Set_Transform(tls, face, matrix, libc.UintptrFromInt32(0))
  12313. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  12314. }
  12315. return int32(m_True)
  12316. }
  12317. func __XftReleaseFile(tls *libc.TLS, f uintptr) {
  12318. var prev, v2 uintptr
  12319. var v1 int32
  12320. var v4 uint64
  12321. _, _, _, _ = prev, v1, v2, v4
  12322. v2 = f + 8
  12323. *(*int32)(unsafe.Pointer(v2))--
  12324. v1 = *(*int32)(unsafe.Pointer(v2))
  12325. if v1 != 0 {
  12326. return
  12327. }
  12328. if (*TXftFtFile)(unsafe.Pointer(f)).Flock != 0 {
  12329. __XftLockError(tls, __ccgo_ts+1057)
  12330. }
  12331. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12332. prev = uintptr(unsafe.Pointer(&__XftFtFiles))
  12333. for {
  12334. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  12335. break
  12336. }
  12337. if *(*uintptr)(unsafe.Pointer(prev)) == f {
  12338. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12339. break
  12340. }
  12341. goto _3
  12342. _3:
  12343. ;
  12344. prev = *(*uintptr)(unsafe.Pointer(prev))
  12345. }
  12346. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 {
  12347. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12348. }
  12349. }
  12350. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12351. v4 = libc.Xstrlen(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile) + uint64(1)
  12352. } else {
  12353. v4 = uint64(0)
  12354. }
  12355. XXftMemFree(tls, int32(m_XFT_MEM_FILE), int32(libc.Uint64FromInt64(96)+v4))
  12356. libc.Xfree(tls, f)
  12357. }
  12358. /*
  12359. * Find a prime larger than the minimum reasonable hash size
  12360. */
  12361. func __XftSqrt(tls *libc.TLS, a TFcChar32) (r TFcChar32) {
  12362. var h, l, m TFcChar32
  12363. _, _, _ = h, l, m
  12364. l = uint32(2)
  12365. h = a / uint32(2)
  12366. for h-l > uint32(1) {
  12367. m = (h + l) >> int32(1)
  12368. if m*m < a {
  12369. l = m
  12370. } else {
  12371. h = m
  12372. }
  12373. }
  12374. return h
  12375. }
  12376. func __XftIsPrime(tls *libc.TLS, i TFcChar32) (r TFcBool) {
  12377. var l, t TFcChar32
  12378. _, _ = l, t
  12379. if i < uint32(2) {
  12380. return m_FcFalse
  12381. }
  12382. if i&uint32(1) == uint32(0) {
  12383. if i == uint32(2) {
  12384. return int32(m_FcTrue)
  12385. }
  12386. return m_FcFalse
  12387. }
  12388. l = __XftSqrt(tls, i) + uint32(1)
  12389. t = uint32(3)
  12390. for {
  12391. if !(t <= l) {
  12392. break
  12393. }
  12394. if i%t == uint32(0) {
  12395. return m_FcFalse
  12396. }
  12397. goto _1
  12398. _1:
  12399. ;
  12400. t += uint32(2)
  12401. }
  12402. return int32(m_FcTrue)
  12403. }
  12404. func __XftHashSize(tls *libc.TLS, num_unicode TFcChar32) (r TFcChar32) {
  12405. var hash TFcChar32
  12406. _ = hash
  12407. /* at least 31.25 % extra space */
  12408. hash = num_unicode + num_unicode>>libc.Int32FromInt32(2) + num_unicode>>libc.Int32FromInt32(4)
  12409. if hash&uint32(1) == uint32(0) {
  12410. hash++
  12411. }
  12412. for !(__XftIsPrime(tls, hash) != 0) {
  12413. hash += uint32(2)
  12414. }
  12415. return hash
  12416. }
  12417. func XXftLockFace(tls *libc.TLS, public uintptr) (r TFT_Face) {
  12418. var face TFT_Face
  12419. var fi, font uintptr
  12420. _, _, _ = face, fi, font
  12421. font = public
  12422. fi = font + 48
  12423. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12424. /*
  12425. * Make sure the face is usable at the requested size
  12426. */
  12427. if face != 0 && !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+48) != 0) {
  12428. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12429. face = libc.UintptrFromInt32(0)
  12430. }
  12431. return face
  12432. }
  12433. func XXftUnlockFace(tls *libc.TLS, public uintptr) {
  12434. var font uintptr
  12435. _ = font
  12436. font = public
  12437. __XftUnlockFile(tls, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)
  12438. }
  12439. func _XftFontInfoFill(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r TFcBool) {
  12440. bp := tls.Alloc(112)
  12441. defer tls.Free(112)
  12442. var hash TFcChar32
  12443. var hashp, info, v1, v10, p4, p5, p6, p7, p8 uintptr
  12444. var nhash, v9 int32
  12445. var v2, v3 TFT_Fixed
  12446. var _ /* aspect at bp+24 */ float64
  12447. var _ /* autohint at bp+48 */ TFcBool
  12448. var _ /* bitmap at bp+72 */ TFcBool
  12449. var _ /* dsize at bp+16 */ float64
  12450. var _ /* face at bp+64 */ TFT_Face
  12451. var _ /* filename at bp+0 */ uintptr
  12452. var _ /* font_matrix at bp+32 */ uintptr
  12453. var _ /* global_advance at bp+52 */ TFcBool
  12454. var _ /* hint_style at bp+56 */ int32
  12455. var _ /* hinting at bp+40 */ TFcBool
  12456. var _ /* id at bp+8 */ int32
  12457. var _ /* vertical_layout at bp+44 */ TFcBool
  12458. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hash, hashp, info, nhash, v1, v10, v2, v3, v9, p4, p5, p6, p7, p8
  12459. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12460. if !(info != 0) {
  12461. return m_FcFalse
  12462. }
  12463. /*
  12464. * Initialize the whole XftFontInfo so that padding doesn't interfere with
  12465. * hash or XftFontInfoEqual().
  12466. */
  12467. libc.Xmemset(tls, fi, int32('\000'), uint64(104))
  12468. /*
  12469. * Find the associated file
  12470. */
  12471. switch libfontconfig.XFcPatternGetString(tls, pattern, __ccgo_ts+1086, 0, bp) {
  12472. case int32(_FcResultNoMatch):
  12473. *(*uintptr)(unsafe.Pointer(bp)) = libc.UintptrFromInt32(0)
  12474. case int32(_FcResultMatch):
  12475. default:
  12476. goto bail0
  12477. }
  12478. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1091, 0, bp+8) {
  12479. case int32(_FcResultNoMatch):
  12480. *(*int32)(unsafe.Pointer(bp + 8)) = 0
  12481. case int32(_FcResultMatch):
  12482. default:
  12483. goto bail0
  12484. }
  12485. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12486. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFile(tls, *(*uintptr)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 8)))
  12487. } else {
  12488. if libfontconfig.XFcPatternGetFTFace(tls, pattern, __ccgo_ts+1097, 0, bp+64) == int32(_FcResultMatch) && *(*TFT_Face)(unsafe.Pointer(bp + 64)) != 0 {
  12489. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFaceFile(tls, *(*TFT_Face)(unsafe.Pointer(bp + 64)))
  12490. }
  12491. }
  12492. if !((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0) {
  12493. goto bail0
  12494. }
  12495. /*
  12496. * Compute pixel size
  12497. */
  12498. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1104, 0, bp+16) != int32(_FcResultMatch) {
  12499. goto bail1
  12500. }
  12501. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1114, 0, bp+24) != int32(_FcResultMatch) {
  12502. *(*float64)(unsafe.Pointer(bp + 24)) = float64(1)
  12503. }
  12504. (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize = int64(*(*float64)(unsafe.Pointer(bp + 16)) * libc.Float64FromFloat64(64))
  12505. (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize = int64(*(*float64)(unsafe.Pointer(bp + 16)) * *(*float64)(unsafe.Pointer(bp + 24)) * libc.Float64FromFloat64(64))
  12506. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12507. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12508. v1 = *(*uintptr)(unsafe.Pointer(bp))
  12509. } else {
  12510. v1 = __ccgo_ts + 1121
  12511. }
  12512. libc.Xprintf(tls, __ccgo_ts+1128, libc.VaList(bp+88, v1, *(*int32)(unsafe.Pointer(bp + 8)), *(*float64)(unsafe.Pointer(bp + 16))))
  12513. }
  12514. /*
  12515. * Get antialias value
  12516. */
  12517. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+475, 0, fi+32) {
  12518. case int32(_FcResultNoMatch):
  12519. (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias = int32(m_True)
  12520. case int32(_FcResultMatch):
  12521. default:
  12522. goto bail1
  12523. }
  12524. /*
  12525. * Get rgba value
  12526. */
  12527. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+460, 0, fi+40) {
  12528. case int32(_FcResultNoMatch):
  12529. (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba = m_FC_RGBA_UNKNOWN
  12530. case int32(_FcResultMatch):
  12531. default:
  12532. goto bail1
  12533. }
  12534. /*
  12535. * Get lcd_filter value
  12536. */
  12537. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+465, 0, fi+44) {
  12538. case int32(_FcResultNoMatch):
  12539. (*TXftFontInfo)(unsafe.Pointer(fi)).Flcd_filter = int32(m_FC_LCD_DEFAULT)
  12540. case int32(_FcResultMatch):
  12541. default:
  12542. goto bail1
  12543. }
  12544. /*
  12545. * Get matrix and transform values
  12546. */
  12547. switch libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1165, 0, bp+32) {
  12548. case int32(_FcResultNoMatch):
  12549. v2 = libc.Int64FromInt32(0x10000)
  12550. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = v2
  12551. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = v2
  12552. v3 = libc.Int64FromInt32(0)
  12553. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = v3
  12554. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = v3
  12555. case int32(_FcResultMatch):
  12556. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxx)
  12557. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyy)
  12558. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxy)
  12559. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyx)
  12560. default:
  12561. goto bail1
  12562. }
  12563. (*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))
  12564. /*
  12565. * Get render value, set to false if no Render extension present
  12566. */
  12567. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  12568. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+453, 0, fi+88) {
  12569. case int32(_FcResultTypeMismatch):
  12570. /*
  12571. * Fontconfig no longer supports xft's custom values in
  12572. * text patterns, so any name specifying render:true or
  12573. * render:false will have an invalid type in the resulting
  12574. * pattern. Just ignore that case so that the app doesn't
  12575. * just fail
  12576. */
  12577. /* fall through ... */
  12578. fallthrough
  12579. case int32(_FcResultNoMatch):
  12580. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  12581. case int32(_FcResultMatch):
  12582. default:
  12583. goto bail1
  12584. }
  12585. } else {
  12586. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = m_FcFalse
  12587. }
  12588. /*
  12589. * Compute glyph load flags
  12590. */
  12591. (*TXftFontInfo)(unsafe.Pointer(fi)).Fload_flags = m_FT_LOAD_DEFAULT1
  12592. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1172, 0, bp+72) {
  12593. case int32(_FcResultNoMatch):
  12594. *(*TFcBool)(unsafe.Pointer(bp + 72)) = m_FcFalse
  12595. case int32(_FcResultMatch):
  12596. default:
  12597. goto bail1
  12598. }
  12599. /* disable bitmaps when anti-aliasing or transforming glyphs */
  12600. if !(*(*TFcBool)(unsafe.Pointer(bp + 72)) != 0) && (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12601. p4 = fi + 84
  12602. *(*TFT_Int)(unsafe.Pointer(p4)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p4))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))
  12603. }
  12604. /* disable hinting if requested */
  12605. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+513, 0, bp+40) {
  12606. case int32(_FcResultNoMatch):
  12607. *(*TFcBool)(unsafe.Pointer(bp + 40)) = int32(m_FcTrue)
  12608. case int32(_FcResultMatch):
  12609. default:
  12610. goto bail1
  12611. }
  12612. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+485, 0, fi+36) {
  12613. case int32(_FcResultNoMatch):
  12614. (*TXftFontInfo)(unsafe.Pointer(fi)).Fembolden = m_FcFalse
  12615. case int32(_FcResultMatch):
  12616. default:
  12617. goto bail1
  12618. }
  12619. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+503, 0, bp+56) {
  12620. case int32(_FcResultNoMatch):
  12621. *(*int32)(unsafe.Pointer(bp + 56)) = int32(m_FC_HINT_FULL)
  12622. case int32(_FcResultMatch):
  12623. default:
  12624. goto bail1
  12625. }
  12626. if !(*(*TFcBool)(unsafe.Pointer(bp + 40)) != 0) || *(*int32)(unsafe.Pointer(bp + 56)) == m_FC_HINT_NONE {
  12627. p5 = fi + 84
  12628. *(*TFT_Int)(unsafe.Pointer(p5)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p5))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(1))
  12629. }
  12630. /* Figure out the load target, which modifies the hinting
  12631. * behavior of FreeType based on the intended use of the glyphs.
  12632. */
  12633. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 {
  12634. if m_FC_HINT_NONE < *(*int32)(unsafe.Pointer(bp + 56)) && *(*int32)(unsafe.Pointer(bp + 56)) < int32(m_FC_HINT_FULL) {
  12635. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_LIGHT) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12636. } else {
  12637. /* autohinter will snap stems to integer widths, when
  12638. * the LCD targets are used.
  12639. */
  12640. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  12641. case int32(m_FC_RGBA_RGB):
  12642. fallthrough
  12643. case int32(m_FC_RGBA_BGR):
  12644. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_LCD) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12645. case int32(m_FC_RGBA_VRGB):
  12646. fallthrough
  12647. case int32(m_FC_RGBA_VBGR):
  12648. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_LCD_V) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12649. break
  12650. }
  12651. }
  12652. } else {
  12653. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_MONO) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12654. }
  12655. /* set vertical layout if requested */
  12656. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1187, 0, bp+44) {
  12657. case int32(_FcResultNoMatch):
  12658. *(*TFcBool)(unsafe.Pointer(bp + 44)) = m_FcFalse
  12659. case int32(_FcResultMatch):
  12660. default:
  12661. goto bail1
  12662. }
  12663. if *(*TFcBool)(unsafe.Pointer(bp + 44)) != 0 {
  12664. p6 = fi + 84
  12665. *(*TFT_Int)(unsafe.Pointer(p6)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p6))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(4))
  12666. }
  12667. /* force autohinting if requested */
  12668. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+494, 0, bp+48) {
  12669. case int32(_FcResultNoMatch):
  12670. *(*TFcBool)(unsafe.Pointer(bp + 48)) = m_FcFalse
  12671. case int32(_FcResultMatch):
  12672. default:
  12673. goto bail1
  12674. }
  12675. if *(*TFcBool)(unsafe.Pointer(bp + 48)) != 0 {
  12676. p7 = fi + 84
  12677. *(*TFT_Int)(unsafe.Pointer(p7)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p7))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(5))
  12678. }
  12679. /* disable global advance width (for broken DynaLab TT CJK fonts) */
  12680. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1202, 0, bp+52) {
  12681. case int32(_FcResultNoMatch):
  12682. *(*TFcBool)(unsafe.Pointer(bp + 52)) = int32(m_FcTrue)
  12683. case int32(_FcResultMatch):
  12684. default:
  12685. goto bail1
  12686. }
  12687. if !(*(*TFcBool)(unsafe.Pointer(bp + 52)) != 0) {
  12688. p8 = fi + 84
  12689. *(*TFT_Int)(unsafe.Pointer(p8)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p8))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(9))
  12690. }
  12691. /*
  12692. * Get requested spacing value
  12693. */
  12694. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1216, 0, fi+92) {
  12695. case int32(_FcResultNoMatch):
  12696. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = m_FC_PROPORTIONAL
  12697. case int32(_FcResultMatch):
  12698. default:
  12699. goto bail1
  12700. }
  12701. /*
  12702. * Check for minspace
  12703. */
  12704. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+521, 0, fi+96) {
  12705. case int32(_FcResultNoMatch):
  12706. (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace = m_FcFalse
  12707. case int32(_FcResultMatch):
  12708. default:
  12709. goto bail1
  12710. }
  12711. /*
  12712. * Check for fixed pixel spacing
  12713. */
  12714. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1224, 0, fi+100) {
  12715. case int32(_FcResultNoMatch):
  12716. (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width = 0
  12717. case int32(_FcResultMatch):
  12718. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  12719. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = int32(m_FC_MONO)
  12720. }
  12721. default:
  12722. goto bail1
  12723. }
  12724. /*
  12725. * Step over hash value in the structure
  12726. */
  12727. hash = uint32(0)
  12728. hashp = fi + uintptr(1)*4
  12729. nhash = int32(libc.Uint64FromInt64(104)/libc.Uint64FromInt64(4) - libc.Uint64FromInt32(1))
  12730. for {
  12731. v9 = nhash
  12732. nhash--
  12733. if !(v9 != 0) {
  12734. break
  12735. }
  12736. v10 = hashp
  12737. hashp += 4
  12738. hash += *(*TFcChar32)(unsafe.Pointer(v10))
  12739. }
  12740. (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash = hash
  12741. /*
  12742. * All done
  12743. */
  12744. return int32(m_FcTrue)
  12745. goto bail1
  12746. bail1:
  12747. ;
  12748. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12749. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = libc.UintptrFromInt32(0)
  12750. goto bail0
  12751. bail0:
  12752. ;
  12753. return m_FcFalse
  12754. return r
  12755. }
  12756. func _XftFontInfoEmpty(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12757. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0 {
  12758. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12759. }
  12760. }
  12761. func XXftFontInfoCreate(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  12762. var fi uintptr
  12763. _ = fi
  12764. fi = libc.Xmalloc(tls, uint64(104))
  12765. if !(fi != 0) {
  12766. return libc.UintptrFromInt32(0)
  12767. }
  12768. if !(_XftFontInfoFill(tls, dpy, pattern, fi) != 0) {
  12769. libc.Xfree(tls, fi)
  12770. fi = libc.UintptrFromInt32(0)
  12771. }
  12772. XXftMemAlloc(tls, int32(m_XFT_MEM_FONT), int32(104))
  12773. return fi
  12774. }
  12775. func XXftFontInfoDestroy(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12776. _XftFontInfoEmpty(tls, dpy, fi)
  12777. XXftMemFree(tls, int32(m_XFT_MEM_FONT), int32(104))
  12778. libc.Xfree(tls, fi)
  12779. }
  12780. func XXftFontInfoHash(tls *libc.TLS, fi uintptr) (r TFcChar32) {
  12781. return (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash
  12782. }
  12783. func XXftFontInfoEqual(tls *libc.TLS, a uintptr, b uintptr) (r TFcBool) {
  12784. return libc.BoolInt32(libc.Xmemcmp(tls, a, b, uint64(104)) == 0)
  12785. }
  12786. func XXftFontOpenInfo(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r uintptr) {
  12787. bp := tls.Alloc(96)
  12788. defer tls.Free(96)
  12789. var alloc_size, ascent, descent, height, i, num_glyphs, v2 int32
  12790. var antialias TFcBool
  12791. var bucket, font, format, info, v3 uintptr
  12792. var face TFT_Face
  12793. var hash_value, num_unicode, rehash_value TFcChar32
  12794. var _ /* charset at bp+0 */ uintptr
  12795. var _ /* max_glyph_memory at bp+8 */ int32
  12796. var _ /* vector at bp+16 */ TFT_Vector
  12797. var _ /* vector at bp+32 */ TFT_Vector
  12798. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = alloc_size, antialias, ascent, bucket, descent, face, font, format, hash_value, height, i, info, num_glyphs, num_unicode, rehash_value, v2, v3
  12799. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12800. if !(info != 0) {
  12801. return libc.UintptrFromInt32(0)
  12802. }
  12803. /*
  12804. * Find a matching previously opened font
  12805. */
  12806. bucket = info + 472 + uintptr((*TXftFontInfo)(unsafe.Pointer(fi)).Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  12807. font = *(*uintptr)(unsafe.Pointer(bucket))
  12808. for {
  12809. if !(font != 0) {
  12810. break
  12811. }
  12812. if XXftFontInfoEqual(tls, font+48, fi) != 0 {
  12813. v3 = font + 152
  12814. v2 = *(*int32)(unsafe.Pointer(v3))
  12815. *(*int32)(unsafe.Pointer(v3))++
  12816. if !(v2 != 0) {
  12817. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  12818. }
  12819. libfontconfig.XFcPatternDestroy(tls, pattern)
  12820. return font
  12821. }
  12822. goto _1
  12823. _1:
  12824. ;
  12825. font = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  12826. }
  12827. /*
  12828. * No existing font, create another.
  12829. */
  12830. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  12831. 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)))
  12832. }
  12833. if libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+201, 0, bp+8) != int32(_FcResultMatch) {
  12834. *(*int32)(unsafe.Pointer(bp + 8)) = libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024)
  12835. }
  12836. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12837. if !(face != 0) {
  12838. goto bail0
  12839. }
  12840. if !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+48) != 0) {
  12841. goto bail1
  12842. }
  12843. /*
  12844. * Get the set of Unicode codepoints covered by the font.
  12845. * If the incoming pattern doesn't provide this data, go
  12846. * off and compute it. Yes, this is expensive, but it's
  12847. * required to map Unicode to glyph indices.
  12848. */
  12849. if libfontconfig.XFcPatternGetCharSet(tls, pattern, __ccgo_ts+1261, 0, bp) == int32(_FcResultMatch) {
  12850. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcCharSetCopy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  12851. } else {
  12852. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcFreeTypeCharSet(tls, face, libfontconfig.XFcConfigGetBlanks(tls, libc.UintptrFromInt32(0)))
  12853. }
  12854. antialias = (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias
  12855. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  12856. antialias = m_FcFalse
  12857. }
  12858. /*
  12859. * Find the appropriate picture format
  12860. */
  12861. if (*TXftFontInfo)(unsafe.Pointer(fi)).Frender != 0 {
  12862. if antialias != 0 {
  12863. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  12864. case int32(m_FC_RGBA_RGB):
  12865. fallthrough
  12866. case int32(m_FC_RGBA_BGR):
  12867. fallthrough
  12868. case int32(m_FC_RGBA_VRGB):
  12869. fallthrough
  12870. case int32(m_FC_RGBA_VBGR):
  12871. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  12872. default:
  12873. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  12874. break
  12875. }
  12876. } else {
  12877. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA1))
  12878. }
  12879. if !(format != 0) {
  12880. goto bail2
  12881. }
  12882. } else {
  12883. format = libc.UintptrFromInt32(0)
  12884. }
  12885. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12886. num_unicode = libfontconfig.XFcCharSetCount(tls, *(*uintptr)(unsafe.Pointer(bp)))
  12887. hash_value = __XftHashSize(tls, num_unicode)
  12888. rehash_value = hash_value - uint32(2)
  12889. } else {
  12890. num_unicode = uint32(0)
  12891. hash_value = uint32(0)
  12892. rehash_value = uint32(0)
  12893. }
  12894. /*
  12895. * Sometimes the glyphs are numbered 1..n, other times 0..n-1,
  12896. * accept either numbering scheme by making room in the table
  12897. */
  12898. num_glyphs = int32((*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_glyphs) + int32(1)
  12899. alloc_size = int32(libc.Uint64FromInt64(232) + uint64(num_glyphs)*libc.Uint64FromInt64(8) + uint64(hash_value)*libc.Uint64FromInt64(8))
  12900. font = libc.Xmalloc(tls, uint64(alloc_size))
  12901. if !(font != 0) {
  12902. goto bail2
  12903. }
  12904. XXftMemAlloc(tls, int32(m_XFT_MEM_FONT), alloc_size)
  12905. /*
  12906. * Public fields
  12907. */
  12908. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12909. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  12910. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender
  12911. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+48)
  12912. descent = int32(-((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6)))
  12913. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  12914. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender
  12915. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+48)
  12916. ascent = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6))
  12917. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  12918. height = ascent + descent
  12919. } else {
  12920. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  12921. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight
  12922. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+48)
  12923. height = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6))
  12924. }
  12925. } else {
  12926. descent = -int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender >> libc.Int32FromInt32(6))
  12927. ascent = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender >> libc.Int32FromInt32(6))
  12928. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  12929. height = ascent + descent
  12930. } else {
  12931. height = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight >> libc.Int32FromInt32(6))
  12932. }
  12933. }
  12934. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fascent = ascent
  12935. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fdescent = descent
  12936. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fheight = height
  12937. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  12938. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width
  12939. } else {
  12940. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12941. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  12942. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = 0
  12943. libfreetype.XFT_Vector_Transform(tls, bp+32, fi+48)
  12944. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx >> libc.Int32FromInt32(6))
  12945. } else {
  12946. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance >> libc.Int32FromInt32(6))
  12947. }
  12948. }
  12949. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset = *(*uintptr)(unsafe.Pointer(bp))
  12950. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern = pattern
  12951. /*
  12952. * Management fields
  12953. */
  12954. (*TXftFontInt)(unsafe.Pointer(font)).Fref = int32(1)
  12955. (*TXftFontInt)(unsafe.Pointer(font)).Fnext = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  12956. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = font
  12957. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next = *(*uintptr)(unsafe.Pointer(bucket))
  12958. *(*uintptr)(unsafe.Pointer(bucket)) = font
  12959. /*
  12960. * Copy the info over
  12961. */
  12962. (*TXftFontInt)(unsafe.Pointer(font)).Finfo = *(*TXftFontInfo)(unsafe.Pointer(fi))
  12963. /*
  12964. * reset the antialias field. It can't
  12965. * be set correctly until the font is opened,
  12966. * which doesn't happen in XftFontInfoFill
  12967. */
  12968. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias = antialias
  12969. /*
  12970. * bump XftFile reference count
  12971. */
  12972. (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Fref++
  12973. /*
  12974. * Per glyph information
  12975. */
  12976. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs = font + libc.UintptrFromInt32(1)*232
  12977. libc.Xmemset(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs, int32('\000'), uint64(num_glyphs)*uint64(8))
  12978. (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs = num_glyphs
  12979. /*
  12980. * Unicode hash table information
  12981. */
  12982. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_table = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*8
  12983. i = 0
  12984. for {
  12985. if !(uint32(i) < hash_value) {
  12986. break
  12987. }
  12988. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fucs4 = uint32(^libc.Int32FromInt32(0))
  12989. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fglyph = uint32(0)
  12990. goto _4
  12991. _4:
  12992. ;
  12993. i++
  12994. }
  12995. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_value = int32(hash_value)
  12996. (*TXftFontInt)(unsafe.Pointer(font)).Frehash_value = int32(rehash_value)
  12997. /*
  12998. * X specific fields
  12999. */
  13000. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  13001. (*TXftFontInt)(unsafe.Pointer(font)).Fformat = format
  13002. /*
  13003. * Glyph memory management fields
  13004. */
  13005. (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory = uint64(0)
  13006. (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory = uint64(*(*int32)(unsafe.Pointer(bp + 8)))
  13007. (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs
  13008. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13009. return font
  13010. goto bail2
  13011. bail2:
  13012. ;
  13013. libfontconfig.XFcCharSetDestroy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13014. goto bail1
  13015. bail1:
  13016. ;
  13017. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13018. goto bail0
  13019. bail0:
  13020. ;
  13021. return libc.UintptrFromInt32(0)
  13022. return r
  13023. }
  13024. func XXftFontOpenPattern(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  13025. bp := tls.Alloc(112)
  13026. defer tls.Free(112)
  13027. var font uintptr
  13028. var _ /* info at bp+0 */ TXftFontInfo
  13029. _ = font
  13030. if !(_XftFontInfoFill(tls, dpy, pattern, bp) != 0) {
  13031. return libc.UintptrFromInt32(0)
  13032. }
  13033. font = XXftFontOpenInfo(tls, dpy, pattern, bp)
  13034. _XftFontInfoEmpty(tls, dpy, bp)
  13035. return font
  13036. }
  13037. func XXftFontCopy(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  13038. var font uintptr
  13039. _ = font
  13040. font = public
  13041. (*TXftFontInt)(unsafe.Pointer(font)).Fref++
  13042. return public
  13043. }
  13044. func _XftFontDestroy(tls *libc.TLS, dpy uintptr, public uintptr) {
  13045. var font, info, xftg uintptr
  13046. var i int32
  13047. _, _, _, _ = font, i, info, xftg
  13048. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13049. font = public
  13050. /* note reduction in memory use */
  13051. if info != 0 {
  13052. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  13053. }
  13054. /* Clean up the info */
  13055. _XftFontInfoEmpty(tls, dpy, font+48)
  13056. /* Free the glyphset */
  13057. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  13058. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  13059. }
  13060. /* Free the glyphs */
  13061. i = 0
  13062. for {
  13063. if !(i < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13064. break
  13065. }
  13066. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(i)*8))
  13067. if xftg != 0 {
  13068. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  13069. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  13070. }
  13071. libc.Xfree(tls, xftg)
  13072. }
  13073. goto _1
  13074. _1:
  13075. ;
  13076. i++
  13077. }
  13078. /* Free the pattern and the charset */
  13079. libfontconfig.XFcPatternDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern)
  13080. libfontconfig.XFcCharSetDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset)
  13081. /* Finally, free the font structure */
  13082. XXftMemFree(tls, int32(m_XFT_MEM_FONT), int32(libc.Uint64FromInt64(232)+uint64((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*libc.Uint64FromInt64(8)+uint64((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)*libc.Uint64FromInt64(8)))
  13083. libc.Xfree(tls, font)
  13084. }
  13085. func _XftFontFindNthUnref(tls *libc.TLS, info uintptr, n int32) (r uintptr) {
  13086. var font, public uintptr
  13087. var v2 int32
  13088. var v3 bool
  13089. _, _, _, _ = font, public, v2, v3
  13090. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  13091. for {
  13092. if !(public != 0) {
  13093. break
  13094. }
  13095. font = public
  13096. if v3 = !((*TXftFontInt)(unsafe.Pointer(font)).Fref != 0); v3 {
  13097. v2 = n
  13098. n--
  13099. }
  13100. if v3 && !(v2 != 0) {
  13101. break
  13102. }
  13103. goto _1
  13104. _1:
  13105. ;
  13106. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13107. }
  13108. return public
  13109. }
  13110. func XXftFontManageMemory(tls *libc.TLS, dpy uintptr) {
  13111. bp := tls.Alloc(48)
  13112. defer tls.Free(48)
  13113. var font, info, prev, public uintptr
  13114. _, _, _, _ = font, info, prev, public
  13115. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13116. if !(info != 0) {
  13117. return
  13118. }
  13119. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts {
  13120. public = _XftFontFindNthUnref(tls, info, libc.Xrand(tls)%(*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts)
  13121. font = public
  13122. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13123. 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)))
  13124. }
  13125. /* Unhook from display list */
  13126. prev = info + 40
  13127. for {
  13128. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13129. break
  13130. }
  13131. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13132. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13133. break
  13134. }
  13135. goto _1
  13136. _1:
  13137. ;
  13138. prev = *(*uintptr)(unsafe.Pointer(prev)) + 32
  13139. }
  13140. /* Unhook from hash list */
  13141. prev = info + 472 + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  13142. for {
  13143. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13144. break
  13145. }
  13146. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13147. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  13148. break
  13149. }
  13150. goto _2
  13151. _2:
  13152. ;
  13153. prev = *(*uintptr)(unsafe.Pointer(prev)) + 40
  13154. }
  13155. /* Destroy the font */
  13156. _XftFontDestroy(tls, dpy, public)
  13157. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  13158. }
  13159. }
  13160. func XXftFontClose(tls *libc.TLS, dpy uintptr, public uintptr) {
  13161. var font, info, v2 uintptr
  13162. var v1 int32
  13163. _, _, _, _ = font, info, v1, v2
  13164. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13165. font = public
  13166. v2 = font + 152
  13167. *(*int32)(unsafe.Pointer(v2))--
  13168. v1 = *(*int32)(unsafe.Pointer(v2))
  13169. if v1 != 0 {
  13170. return
  13171. }
  13172. if info != 0 {
  13173. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts++
  13174. XXftFontManageMemory(tls, dpy)
  13175. } else {
  13176. _XftFontDestroy(tls, dpy, public)
  13177. }
  13178. }
  13179. func XXftInitFtLibrary(tls *libc.TLS) (r TFcBool) {
  13180. if X_XftFTlibrary != 0 {
  13181. return int32(m_FcTrue)
  13182. }
  13183. if libfreetype.XFT_Init_FreeType(tls, uintptr(unsafe.Pointer(&X_XftFTlibrary))) != 0 {
  13184. return m_FcFalse
  13185. }
  13186. return int32(m_FcTrue)
  13187. }
  13188. const m_FT_LCD_FILTER_FIVE_TAPS = 5
  13189. const m_FT_LOAD_DEFAULT2 = 0x0
  13190. const m_FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY"
  13191. const m_FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY"
  13192. type TFT_Orientation = int32
  13193. type _FT_Orientation_ = int32
  13194. const _FT_ORIENTATION_TRUETYPE = 0
  13195. const _FT_ORIENTATION_POSTSCRIPT = 1
  13196. const _FT_ORIENTATION_FILL_RIGHT = 0
  13197. const _FT_ORIENTATION_FILL_LEFT = 1
  13198. const _FT_ORIENTATION_NONE = 2
  13199. type TFT_LcdFilter = int32
  13200. type _FT_LcdFilter_ = int32
  13201. const _FT_LCD_FILTER_NONE = 0
  13202. const _FT_LCD_FILTER_DEFAULT = 1
  13203. const _FT_LCD_FILTER_LIGHT = 2
  13204. const _FT_LCD_FILTER_LEGACY1 = 3
  13205. const _FT_LCD_FILTER_LEGACY = 16
  13206. const _FT_LCD_FILTER_MAX = 17
  13207. type TFT_LcdFiveTapFilter = [5]TFT_Byte
  13208. /* */
  13209. /* END */
  13210. /*
  13211. * Validate the memory info for a font
  13212. */
  13213. func __XftFontValidateMemory(tls *libc.TLS, dpy uintptr, public uintptr) {
  13214. bp := tls.Alloc(32)
  13215. defer tls.Free(32)
  13216. var font, xftg uintptr
  13217. var glyph_memory uint64
  13218. var glyphindex TFT_UInt
  13219. _, _, _, _ = font, glyph_memory, glyphindex, xftg
  13220. font = public
  13221. glyph_memory = uint64(0)
  13222. glyphindex = uint32(0)
  13223. for {
  13224. if !(glyphindex < uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)) {
  13225. break
  13226. }
  13227. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  13228. if xftg != 0 {
  13229. glyph_memory += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13230. }
  13231. goto _1
  13232. _1:
  13233. ;
  13234. glyphindex++
  13235. }
  13236. if glyph_memory != (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory {
  13237. libc.Xprintf(tls, __ccgo_ts+1313, libc.VaList(bp+8, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, glyph_memory))
  13238. }
  13239. }
  13240. // C documentation
  13241. //
  13242. // /* we sometimes need to convert the glyph bitmap in a FT_GlyphSlot
  13243. // * into a different format. For example, we want to convert a
  13244. // * FT_PIXEL_MODE_LCD or FT_PIXEL_MODE_LCD_V bitmap into a 32-bit
  13245. // * ARGB or ABGR bitmap.
  13246. // *
  13247. // * this function prepares a target descriptor for this operation.
  13248. // *
  13249. // * input :: target bitmap descriptor. The function will set its
  13250. // * 'width', 'rows' and 'pitch' fields, and only these
  13251. // *
  13252. // * slot :: the glyph slot containing the source bitmap. this
  13253. // * function assumes that slot->format == FT_GLYPH_FORMAT_BITMAP
  13254. // *
  13255. // * mode :: the requested final rendering mode. supported values are
  13256. // * MONO, NORMAL (i.e. gray), LCD and LCD_V
  13257. // *
  13258. // * the function returns the size in bytes of the corresponding buffer,
  13259. // * it's up to the caller to allocate the corresponding memory block
  13260. // * before calling _fill_xrender_bitmap
  13261. // *
  13262. // * it also returns -1 in case of error (e.g. incompatible arguments,
  13263. // * like trying to convert a gray bitmap into a monochrome one)
  13264. // */
  13265. func __compute_xrender_bitmap_size(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode) (r int32) {
  13266. var ftbit uintptr
  13267. var height, pitch, width int32
  13268. _, _, _, _ = ftbit, height, pitch, width
  13269. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(slot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13270. return -int32(1)
  13271. }
  13272. /* compute the size of the final bitmap */
  13273. ftbit = slot + 152
  13274. width = int32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13275. height = int32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13276. pitch = (width + int32(3)) & ^libc.Int32FromInt32(3)
  13277. switch int32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13278. case int32(_FT_PIXEL_MODE_MONO):
  13279. if mode == int32(_FT_RENDER_MODE_MONO) {
  13280. pitch = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  13281. break
  13282. }
  13283. /* fall-through */
  13284. fallthrough
  13285. case int32(_FT_PIXEL_MODE_GRAY):
  13286. if mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V) {
  13287. /* each pixel is replicated into a 32-bit ARGB value */
  13288. pitch = width * int32(4)
  13289. }
  13290. case int32(_FT_PIXEL_MODE_LCD):
  13291. if mode != int32(_FT_RENDER_MODE_LCD) {
  13292. return -int32(1)
  13293. }
  13294. /* horz pixel triplets are packed into 32-bit ARGB values */
  13295. width /= int32(3)
  13296. pitch = width * int32(4)
  13297. case int32(_FT_PIXEL_MODE_LCD_V):
  13298. if mode != int32(_FT_RENDER_MODE_LCD_V) {
  13299. return -int32(1)
  13300. }
  13301. /* vert pixel triplets are packed into 32-bit ARGB values */
  13302. height /= int32(3)
  13303. pitch = width * int32(4)
  13304. default: /* unsupported source format */
  13305. return -int32(1)
  13306. }
  13307. (*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth = uint32(width)
  13308. (*TFT_Bitmap)(unsafe.Pointer(target)).Frows = uint32(height)
  13309. (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch = pitch
  13310. (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer = libc.UintptrFromInt32(0)
  13311. return pitch * height
  13312. }
  13313. // C documentation
  13314. //
  13315. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13316. // * into a different format (see _compute_xrender_bitmap_size)
  13317. // *
  13318. // * you should call this function after _compute_xrender_bitmap_size
  13319. // *
  13320. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13321. // * must point to memory allocated by the caller
  13322. // *
  13323. // * slot :: the glyph slot containing the source bitmap
  13324. // *
  13325. // * mode :: the requested final rendering mode
  13326. // *
  13327. // * bgr :: boolean, set if BGR or VBGR pixel ordering is needed
  13328. // */
  13329. func __fill_xrender_bitmap(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, bgr int32) {
  13330. var bytes, h, height, pitch, src_pitch, subpixel, width, x, x1, x2, x3, x4, x5, x6 int32
  13331. var dst, dst1, dst2, dst3, dst4, dstLine, ftbit, src, src1, src2, src3, srcLine uintptr
  13332. var pix, pix1, pix2, pix3, pix4 uint32
  13333. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13334. ftbit = slot + 152
  13335. srcLine = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  13336. dstLine = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13337. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch
  13338. width = int32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13339. height = int32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13340. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13341. subpixel = libc.BoolInt32(mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V))
  13342. if src_pitch < 0 {
  13343. srcLine -= uintptr(uint32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows - libc.Uint32FromInt32(1)))
  13344. }
  13345. switch int32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13346. case int32(_FT_PIXEL_MODE_MONO):
  13347. if subpixel != 0 { /* convert mono to ARGB32 values */
  13348. h = height
  13349. for {
  13350. if !(h > 0) {
  13351. break
  13352. }
  13353. x = 0
  13354. for {
  13355. if !(x < width) {
  13356. break
  13357. }
  13358. if int32(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x&int32(7))) != 0 {
  13359. *(*uint32)(unsafe.Pointer(dstLine + uintptr(x)*4)) = uint32(0xffffffff)
  13360. }
  13361. goto _2
  13362. _2:
  13363. ;
  13364. x++
  13365. }
  13366. goto _1
  13367. _1:
  13368. ;
  13369. h--
  13370. srcLine += uintptr(src_pitch)
  13371. dstLine += uintptr(pitch)
  13372. }
  13373. } else {
  13374. if mode == int32(_FT_RENDER_MODE_NORMAL) { /* convert mono to 8-bit gray */
  13375. h = height
  13376. for {
  13377. if !(h > 0) {
  13378. break
  13379. }
  13380. x1 = 0
  13381. for {
  13382. if !(x1 < width) {
  13383. break
  13384. }
  13385. if int32(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x1>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x1&int32(7))) != 0 {
  13386. *(*uint8)(unsafe.Pointer(dstLine + uintptr(x1))) = uint8(0xff)
  13387. }
  13388. goto _4
  13389. _4:
  13390. ;
  13391. x1++
  13392. }
  13393. goto _3
  13394. _3:
  13395. ;
  13396. h--
  13397. srcLine += uintptr(src_pitch)
  13398. dstLine += uintptr(pitch)
  13399. }
  13400. } else { /* copy mono to mono */
  13401. bytes = (width + int32(7)) >> int32(3)
  13402. h = height
  13403. for {
  13404. if !(h > 0) {
  13405. break
  13406. }
  13407. libc.Xmemcpy(tls, dstLine, srcLine, uint64(bytes))
  13408. goto _5
  13409. _5:
  13410. ;
  13411. h--
  13412. srcLine += uintptr(src_pitch)
  13413. dstLine += uintptr(pitch)
  13414. }
  13415. }
  13416. }
  13417. case int32(_FT_PIXEL_MODE_GRAY):
  13418. if subpixel != 0 { /* convert gray to ARGB32 values */
  13419. h = height
  13420. for {
  13421. if !(h > 0) {
  13422. break
  13423. }
  13424. dst = dstLine
  13425. x2 = 0
  13426. for {
  13427. if !(x2 < width) {
  13428. break
  13429. }
  13430. pix = uint32(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x2))))
  13431. pix |= pix << int32(8)
  13432. pix |= pix << int32(16)
  13433. *(*uint32)(unsafe.Pointer(dst + uintptr(x2)*4)) = pix
  13434. goto _7
  13435. _7:
  13436. ;
  13437. x2++
  13438. }
  13439. goto _6
  13440. _6:
  13441. ;
  13442. h--
  13443. srcLine += uintptr(src_pitch)
  13444. dstLine += uintptr(pitch)
  13445. }
  13446. } else { /* copy gray into gray */
  13447. h = height
  13448. for {
  13449. if !(h > 0) {
  13450. break
  13451. }
  13452. libc.Xmemcpy(tls, dstLine, srcLine, uint64(width))
  13453. goto _8
  13454. _8:
  13455. ;
  13456. h--
  13457. srcLine += uintptr(src_pitch)
  13458. dstLine += uintptr(pitch)
  13459. }
  13460. }
  13461. case int32(_FT_PIXEL_MODE_LCD):
  13462. if !(bgr != 0) {
  13463. /* convert horizontal RGB into ARGB32 */
  13464. h = height
  13465. for {
  13466. if !(h > 0) {
  13467. break
  13468. }
  13469. src = srcLine
  13470. dst1 = dstLine
  13471. x3 = 0
  13472. for {
  13473. if !(x3 < width) {
  13474. break
  13475. }
  13476. 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)
  13477. *(*uint32)(unsafe.Pointer(dst1 + uintptr(x3)*4)) = pix1
  13478. goto _10
  13479. _10:
  13480. ;
  13481. x3++
  13482. src += uintptr(3)
  13483. }
  13484. goto _9
  13485. _9:
  13486. ;
  13487. h--
  13488. srcLine += uintptr(src_pitch)
  13489. dstLine += uintptr(pitch)
  13490. }
  13491. } else {
  13492. /* convert horizontal BGR into ARGB32 */
  13493. h = height
  13494. for {
  13495. if !(h > 0) {
  13496. break
  13497. }
  13498. src1 = srcLine
  13499. dst2 = dstLine
  13500. x4 = 0
  13501. for {
  13502. if !(x4 < width) {
  13503. break
  13504. }
  13505. 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)
  13506. *(*uint32)(unsafe.Pointer(dst2 + uintptr(x4)*4)) = pix2
  13507. goto _12
  13508. _12:
  13509. ;
  13510. x4++
  13511. src1 += uintptr(3)
  13512. }
  13513. goto _11
  13514. _11:
  13515. ;
  13516. h--
  13517. srcLine += uintptr(src_pitch)
  13518. dstLine += uintptr(pitch)
  13519. }
  13520. }
  13521. default: /* FT_PIXEL_MODE_LCD_V */
  13522. /* convert vertical RGB into ARGB32 */
  13523. if !(bgr != 0) {
  13524. h = height
  13525. for {
  13526. if !(h > 0) {
  13527. break
  13528. }
  13529. src2 = srcLine
  13530. dst3 = dstLine
  13531. x5 = 0
  13532. for {
  13533. if !(x5 < width) {
  13534. break
  13535. }
  13536. 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)
  13537. *(*uint32)(unsafe.Pointer(dst3 + uintptr(x5)*4)) = pix3
  13538. goto _14
  13539. _14:
  13540. ;
  13541. x5++
  13542. src2 += uintptr(1)
  13543. }
  13544. goto _13
  13545. _13:
  13546. ;
  13547. h--
  13548. srcLine += uintptr(int32(3) * src_pitch)
  13549. dstLine += uintptr(pitch)
  13550. }
  13551. } else {
  13552. h = height
  13553. for {
  13554. if !(h > 0) {
  13555. break
  13556. }
  13557. src3 = srcLine
  13558. dst4 = dstLine
  13559. x6 = 0
  13560. for {
  13561. if !(x6 < width) {
  13562. break
  13563. }
  13564. 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)
  13565. *(*uint32)(unsafe.Pointer(dst4 + uintptr(x6)*4)) = pix4
  13566. goto _16
  13567. _16:
  13568. ;
  13569. x6++
  13570. src3 += uintptr(1)
  13571. }
  13572. goto _15
  13573. _15:
  13574. ;
  13575. h--
  13576. srcLine += uintptr(int32(3) * src_pitch)
  13577. dstLine += uintptr(pitch)
  13578. }
  13579. }
  13580. }
  13581. }
  13582. func XXftFontLoadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyphs uintptr, nglyph int32) {
  13583. bp := tls.Alloc(4256)
  13584. defer tls.Free(4256)
  13585. 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
  13586. var bufBitmap, font, ftbit, info, line, line1, xftg, v15, v2 uintptr
  13587. var error1 TFT_Error
  13588. var face TFT_Face
  13589. var glyphindex TFT_UInt
  13590. var glyphslot TFT_GlyphSlot
  13591. var mode TFT_Render_Mode
  13592. var _ /* bufLocal at bp+8 */ [4096]uint8
  13593. var _ /* glyph at bp+0 */ TGlyph
  13594. var _ /* local at bp+4104 */ TFT_Bitmap
  13595. var _ /* vector at bp+4144 */ TFT_Vector
  13596. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13597. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  13598. font = pub
  13599. bufBitmap = bp + 8
  13600. bufSize = int32(4096)
  13601. mode = int32(_FT_RENDER_MODE_MONO)
  13602. if !(info != 0) {
  13603. return
  13604. }
  13605. face = XXftLockFace(tls, font)
  13606. if !(face != 0) {
  13607. return
  13608. }
  13609. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  13610. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  13611. case int32(m_FC_RGBA_RGB):
  13612. fallthrough
  13613. case int32(m_FC_RGBA_BGR):
  13614. mode = int32(_FT_RENDER_MODE_LCD)
  13615. case int32(m_FC_RGBA_VRGB):
  13616. fallthrough
  13617. case int32(m_FC_RGBA_VBGR):
  13618. mode = int32(_FT_RENDER_MODE_LCD_V)
  13619. default:
  13620. mode = int32(_FT_RENDER_MODE_NORMAL)
  13621. }
  13622. }
  13623. for {
  13624. v1 = nglyph
  13625. nglyph--
  13626. if !(v1 != 0) {
  13627. break
  13628. }
  13629. v2 = glyphs
  13630. glyphs += 4
  13631. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  13632. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  13633. if !(xftg != 0) {
  13634. continue
  13635. }
  13636. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13637. __XftFontValidateMemory(tls, dpy, pub)
  13638. }
  13639. /*
  13640. * Check to see if this glyph has just been loaded,
  13641. * this happens when drawing the same glyph twice
  13642. * in a single string
  13643. */
  13644. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  13645. continue
  13646. }
  13647. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Flcd_filter)
  13648. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)
  13649. if error1 != 0 {
  13650. /*
  13651. * If anti-aliasing or transforming glyphs and
  13652. * no outline version exists, fallback to the
  13653. * bitmap and let things look bad instead of
  13654. * missing the glyph
  13655. */
  13656. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3)) != 0 {
  13657. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, int32(int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags) & ^(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))))
  13658. }
  13659. if error1 != 0 {
  13660. continue
  13661. }
  13662. }
  13663. glyphslot = (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph
  13664. /*
  13665. * Embolden if required
  13666. */
  13667. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fembolden != 0 {
  13668. libfreetype.XFT_GlyphSlot_Embolden(tls, glyphslot)
  13669. }
  13670. /*
  13671. * Compute glyph metrics from FreeType information
  13672. */
  13673. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0 && (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13674. v5 = libc.Int32FromInt32(0)
  13675. bottom = v5
  13676. v4 = v5
  13677. top = v4
  13678. v3 = v4
  13679. right = v3
  13680. left = v3
  13681. xc = 0
  13682. for {
  13683. if !(xc <= int32(1)) {
  13684. break
  13685. }
  13686. yc = 0
  13687. for {
  13688. if !(yc <= int32(1)) {
  13689. break
  13690. }
  13691. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + int64(xc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth
  13692. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - int64(yc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight
  13693. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+48)
  13694. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  13695. 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)))
  13696. }
  13697. if xc == 0 && yc == 0 {
  13698. v8 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  13699. right = v8
  13700. left = v8
  13701. v9 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  13702. bottom = v9
  13703. top = v9
  13704. } else {
  13705. if int64(left) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  13706. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  13707. }
  13708. if int64(right) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  13709. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  13710. }
  13711. if int64(bottom) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  13712. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  13713. }
  13714. if int64(top) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  13715. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  13716. }
  13717. }
  13718. goto _7
  13719. _7:
  13720. ;
  13721. yc++
  13722. }
  13723. goto _6
  13724. _6:
  13725. ;
  13726. xc++
  13727. }
  13728. left = left & -libc.Int32FromInt32(64)
  13729. right = (right + libc.Int32FromInt32(63)) & -libc.Int32FromInt32(64)
  13730. bottom = bottom & -libc.Int32FromInt32(64)
  13731. top = (top + int32(63)) & -int32(64)
  13732. } else {
  13733. left = int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX & int64(-libc.Int32FromInt32(64)))
  13734. right = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  13735. top = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  13736. bottom = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight) & int64(-libc.Int32FromInt32(64)))
  13737. }
  13738. width = (right - left) >> int32(6)
  13739. height = (top - bottom) >> int32(6)
  13740. /*
  13741. * Clip charcell glyphs to the bounding box
  13742. * XXX transformed?
  13743. */
  13744. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_CHARCELL) && !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0) {
  13745. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  13746. if bottom>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  13747. adjust = bottom - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  13748. if adjust > top {
  13749. adjust = top
  13750. }
  13751. top -= adjust
  13752. bottom -= adjust
  13753. height = (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width
  13754. }
  13755. } else {
  13756. if right>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  13757. adjust1 = right - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  13758. if adjust1 > left {
  13759. adjust1 = left
  13760. }
  13761. left -= adjust1
  13762. right -= adjust1
  13763. width = (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width
  13764. }
  13765. }
  13766. }
  13767. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13768. error1 = libfreetype.XFT_Render_Glyph(tls, (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph, mode)
  13769. if error1 != 0 {
  13770. continue
  13771. }
  13772. }
  13773. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, int32(_FT_LCD_FILTER_NONE))
  13774. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_MONO) {
  13775. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0 {
  13776. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  13777. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = 0
  13778. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = -(*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  13779. } else {
  13780. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  13781. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = 0
  13782. }
  13783. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+48)
  13784. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx >> libc.Int32FromInt32(6))
  13785. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy >> libc.Int32FromInt32(6)))
  13786. } else {
  13787. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  13788. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = 0
  13789. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  13790. } else {
  13791. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16((*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  13792. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = 0
  13793. }
  13794. }
  13795. } else {
  13796. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fx + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  13797. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fy + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6)))
  13798. }
  13799. /* compute the size of the final bitmap */
  13800. ftbit = glyphslot + 152
  13801. width = int32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13802. height = int32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13803. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  13804. libc.Xprintf(tls, __ccgo_ts+1392, libc.VaList(bp+4168, int32(glyphindex)))
  13805. 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))
  13806. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPHV) != 0 {
  13807. line = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  13808. if (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch < 0 {
  13809. line -= uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch * (height - int32(1)))
  13810. }
  13811. y = 0
  13812. for {
  13813. if !(y < height) {
  13814. break
  13815. }
  13816. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  13817. x = 0
  13818. for {
  13819. if !(x < width) {
  13820. break
  13821. }
  13822. libc.Xprintf(tls, __ccgo_ts+1456, libc.VaList(bp+4168, int32(_den[int32(*(*uint8)(unsafe.Pointer(line + uintptr(x))))>>int32(5)])))
  13823. goto _11
  13824. _11:
  13825. ;
  13826. x++
  13827. }
  13828. } else {
  13829. x = 0
  13830. for {
  13831. if !(x < width*int32(8)) {
  13832. break
  13833. }
  13834. if int32(*(*uint8)(unsafe.Pointer(line + uintptr(x>>int32(3)))))&(int32(1)<<(x&int32(7))) != 0 {
  13835. v13 = int32('#')
  13836. } else {
  13837. v13 = int32(' ')
  13838. }
  13839. libc.Xprintf(tls, __ccgo_ts+1456, libc.VaList(bp+4168, v13))
  13840. goto _12
  13841. _12:
  13842. ;
  13843. x++
  13844. }
  13845. }
  13846. libc.Xprintf(tls, __ccgo_ts+1459, 0)
  13847. line += uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch)
  13848. goto _10
  13849. _10:
  13850. ;
  13851. y++
  13852. }
  13853. libc.Xprintf(tls, __ccgo_ts+1462, 0)
  13854. }
  13855. }
  13856. size = __compute_xrender_bitmap_size(tls, bp+4104, glyphslot, mode)
  13857. if size < 0 {
  13858. continue
  13859. }
  13860. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth)
  13861. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows)
  13862. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16(-(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left)
  13863. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top)
  13864. /*
  13865. * If the glyph is relatively large (> 1% of server memory),
  13866. * don't send it until necessary.
  13867. */
  13868. if !(need_bitmaps != 0) && uint64(size) > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory/uint64(100) {
  13869. continue
  13870. }
  13871. /*
  13872. * Make sure there is enough buffer space for the glyph.
  13873. */
  13874. if size > bufSize {
  13875. if bufBitmap != bp+8 {
  13876. libc.Xfree(tls, bufBitmap)
  13877. }
  13878. bufBitmap = libc.Xmalloc(tls, uint64(size))
  13879. if !(bufBitmap != 0) {
  13880. continue
  13881. }
  13882. bufSize = size
  13883. }
  13884. libc.Xmemset(tls, bufBitmap, 0, uint64(size))
  13885. (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fbuffer = bufBitmap
  13886. __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)))
  13887. /*
  13888. * Copy or convert into local buffer.
  13889. */
  13890. /*
  13891. * Use the glyph index as the wire encoding; it
  13892. * might be more efficient for some locales to map
  13893. * these by first usage to smaller values, but that
  13894. * would require persistently storing the map when
  13895. * glyphs were freed.
  13896. */
  13897. *(*TGlyph)(unsafe.Pointer(bp)) = uint64(glyphindex)
  13898. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = uint64(size) + uint64(32)
  13899. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  13900. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  13901. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = libxrender.XXRenderCreateGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fformat)
  13902. }
  13903. if mode == int32(_FT_RENDER_MODE_MONO) {
  13904. /* swap bits in each byte */
  13905. if (*struct {
  13906. Fext_data uintptr
  13907. Fprivate1 uintptr
  13908. Ffd int32
  13909. Fprivate2 int32
  13910. Fproto_major_version int32
  13911. Fproto_minor_version int32
  13912. Fvendor uintptr
  13913. Fprivate3 TXID
  13914. Fprivate4 TXID
  13915. Fprivate5 TXID
  13916. Fprivate6 int32
  13917. Fresource_alloc uintptr
  13918. Fbyte_order int32
  13919. Fbitmap_unit int32
  13920. Fbitmap_pad int32
  13921. Fbitmap_bit_order int32
  13922. Fnformats int32
  13923. Fpixmap_format uintptr
  13924. Fprivate8 int32
  13925. Frelease int32
  13926. Fprivate9 uintptr
  13927. Fprivate10 uintptr
  13928. Fqlen int32
  13929. Flast_request_read uint64
  13930. Frequest uint64
  13931. Fprivate11 TXPointer
  13932. Fprivate12 TXPointer
  13933. Fprivate13 TXPointer
  13934. Fprivate14 TXPointer
  13935. Fmax_request_size uint32
  13936. Fdb uintptr
  13937. Fprivate15 uintptr
  13938. Fdisplay_name uintptr
  13939. Fdefault_screen int32
  13940. Fnscreens int32
  13941. Fscreens uintptr
  13942. Fmotion_buffer uint64
  13943. Fprivate16 uint64
  13944. Fmin_keycode int32
  13945. Fmax_keycode int32
  13946. Fprivate17 TXPointer
  13947. Fprivate18 TXPointer
  13948. Fprivate19 int32
  13949. Fxdefaults uintptr
  13950. })(unsafe.Pointer(dpy)).Fbitmap_bit_order != int32(m_MSBFirst) {
  13951. line1 = bufBitmap
  13952. i = size
  13953. for {
  13954. v14 = i
  13955. i--
  13956. if !(v14 != 0) {
  13957. break
  13958. }
  13959. c = int32(*(*uint8)(unsafe.Pointer(line1)))
  13960. c = c<<int32(1)&int32(0xaa) | c>>int32(1)&int32(0x55)
  13961. c = c<<int32(2)&int32(0xcc) | c>>int32(2)&int32(0x33)
  13962. c = c<<int32(4)&int32(0xf0) | c>>int32(4)&int32(0x0f)
  13963. v15 = line1
  13964. line1++
  13965. *(*uint8)(unsafe.Pointer(v15)) = uint8(c)
  13966. }
  13967. }
  13968. } else {
  13969. if mode != int32(_FT_RENDER_MODE_NORMAL) {
  13970. /* invert ARGB <=> BGRA */
  13971. if (*struct {
  13972. Fext_data uintptr
  13973. Fprivate1 uintptr
  13974. Ffd int32
  13975. Fprivate2 int32
  13976. Fproto_major_version int32
  13977. Fproto_minor_version int32
  13978. Fvendor uintptr
  13979. Fprivate3 TXID
  13980. Fprivate4 TXID
  13981. Fprivate5 TXID
  13982. Fprivate6 int32
  13983. Fresource_alloc uintptr
  13984. Fbyte_order int32
  13985. Fbitmap_unit int32
  13986. Fbitmap_pad int32
  13987. Fbitmap_bit_order int32
  13988. Fnformats int32
  13989. Fpixmap_format uintptr
  13990. Fprivate8 int32
  13991. Frelease int32
  13992. Fprivate9 uintptr
  13993. Fprivate10 uintptr
  13994. Fqlen int32
  13995. Flast_request_read uint64
  13996. Frequest uint64
  13997. Fprivate11 TXPointer
  13998. Fprivate12 TXPointer
  13999. Fprivate13 TXPointer
  14000. Fprivate14 TXPointer
  14001. Fmax_request_size uint32
  14002. Fdb uintptr
  14003. Fprivate15 uintptr
  14004. Fdisplay_name uintptr
  14005. Fdefault_screen int32
  14006. Fnscreens int32
  14007. Fscreens uintptr
  14008. Fmotion_buffer uint64
  14009. Fprivate16 uint64
  14010. Fmin_keycode int32
  14011. Fmax_keycode int32
  14012. Fprivate17 TXPointer
  14013. Fprivate18 TXPointer
  14014. Fprivate19 int32
  14015. Fxdefaults uintptr
  14016. })(unsafe.Pointer(dpy)).Fbyte_order != XXftNativeByteOrder(tls) {
  14017. XXftSwapCARD32(tls, bufBitmap, size>>int32(2))
  14018. }
  14019. }
  14020. }
  14021. libxrender.XXRenderAddGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, xftg, int32(1), bufBitmap, size)
  14022. } else {
  14023. if size != 0 {
  14024. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.Xmalloc(tls, uint64(size))
  14025. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  14026. libc.Xmemcpy(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap, bufBitmap, uint64(size))
  14027. }
  14028. } else {
  14029. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  14030. }
  14031. }
  14032. *(*uint64)(unsafe.Pointer(font + 208)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14033. *(*uint64)(unsafe.Pointer(info + 56)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14034. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14035. __XftFontValidateMemory(tls, dpy, pub)
  14036. }
  14037. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14038. libc.Xprintf(tls, __ccgo_ts+1464, libc.VaList(bp+4168, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14039. }
  14040. }
  14041. if bufBitmap != bp+8 {
  14042. libc.Xfree(tls, bufBitmap)
  14043. }
  14044. XXftUnlockFace(tls, font)
  14045. }
  14046. var _den = [9]int8{' ', '.', ':', ';', '=', '+', '*', '#'}
  14047. func XXftFontUnloadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyph int32) {
  14048. bp := tls.Alloc(8192)
  14049. defer tls.Free(8192)
  14050. var font, info, xftg, v2 uintptr
  14051. var glyphindex TFT_UInt
  14052. var nused, v1, v3 int32
  14053. var _ /* glyphBuf at bp+0 */ [1024]TGlyph
  14054. _, _, _, _, _, _, _, _ = font, glyphindex, info, nused, xftg, v1, v2, v3
  14055. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  14056. font = pub
  14057. nused = 0
  14058. for {
  14059. v1 = nglyph
  14060. nglyph--
  14061. if !(v1 != 0) {
  14062. break
  14063. }
  14064. v2 = glyphs
  14065. glyphs += 4
  14066. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  14067. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  14068. if !(xftg != 0) {
  14069. continue
  14070. }
  14071. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  14072. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  14073. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  14074. v3 = nused
  14075. nused++
  14076. (*(*[1024]TGlyph)(unsafe.Pointer(bp)))[v3] = uint64(glyphindex)
  14077. if uint64(nused) == libc.Uint64FromInt64(8192)/libc.Uint64FromInt64(8) {
  14078. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  14079. nused = 0
  14080. }
  14081. }
  14082. } else {
  14083. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  14084. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  14085. }
  14086. }
  14087. *(*uint64)(unsafe.Pointer(font + 208)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14088. if info != 0 {
  14089. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14090. }
  14091. }
  14092. libc.Xfree(tls, xftg)
  14093. XXftMemFree(tls, int32(m_XFT_MEM_GLYPH), int32(32))
  14094. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8)) = libc.UintptrFromInt32(0)
  14095. }
  14096. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 && nused != 0 {
  14097. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  14098. }
  14099. }
  14100. func XXftFontCheckGlyph(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyph TFT_UInt, missing uintptr, nmissing uintptr) (r TFcBool) {
  14101. var font, xftg uintptr
  14102. var n, v1 int32
  14103. _, _, _, _ = font, n, xftg, v1
  14104. font = pub
  14105. if glyph >= uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  14106. return m_FcFalse
  14107. }
  14108. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  14109. if !(xftg != 0) || need_bitmaps != 0 && !((*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0) {
  14110. if !(xftg != 0) {
  14111. xftg = libc.Xmalloc(tls, uint64(32))
  14112. if !(xftg != 0) {
  14113. return m_FcFalse
  14114. }
  14115. XXftMemAlloc(tls, int32(m_XFT_MEM_GLYPH), int32(32))
  14116. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  14117. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = uint64(0)
  14118. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8)) = xftg
  14119. }
  14120. n = *(*int32)(unsafe.Pointer(nmissing))
  14121. v1 = n
  14122. n++
  14123. *(*TFT_UInt)(unsafe.Pointer(missing + uintptr(v1)*4)) = glyph
  14124. if n == int32(m_XFT_NMISSING) {
  14125. XXftFontLoadGlyphs(tls, dpy, pub, need_bitmaps, missing, n)
  14126. n = 0
  14127. }
  14128. *(*int32)(unsafe.Pointer(nmissing)) = n
  14129. return int32(m_FcTrue)
  14130. } else {
  14131. return m_FcFalse
  14132. }
  14133. return r
  14134. }
  14135. func XXftCharExists(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFcBool) {
  14136. if (*TXftFont)(unsafe.Pointer(pub)).Fcharset != 0 {
  14137. return libfontconfig.XFcCharSetHasChar(tls, (*TXftFont)(unsafe.Pointer(pub)).Fcharset, ucs4)
  14138. }
  14139. return m_FcFalse
  14140. }
  14141. func XXftCharIndex(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFT_UInt) {
  14142. var ent, offset TFcChar32
  14143. var face TFT_Face
  14144. var font uintptr
  14145. _, _, _, _ = ent, face, font, offset
  14146. font = pub
  14147. if !((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value != 0) {
  14148. return uint32(0)
  14149. }
  14150. ent = ucs4 % uint32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  14151. offset = uint32(0)
  14152. for (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 != ucs4 {
  14153. if (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 == uint32(^libc.Int32FromInt32(0)) {
  14154. if !(XXftCharExists(tls, dpy, pub, ucs4) != 0) {
  14155. return uint32(0)
  14156. }
  14157. face = XXftLockFace(tls, pub)
  14158. if !(face != 0) {
  14159. return uint32(0)
  14160. }
  14161. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 = ucs4
  14162. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph = libfontconfig.XFcFreeTypeCharIndex(tls, face, ucs4)
  14163. XXftUnlockFace(tls, pub)
  14164. break
  14165. }
  14166. if !(offset != 0) {
  14167. offset = ucs4 % uint32((*TXftFontInt)(unsafe.Pointer(font)).Frehash_value)
  14168. if !(offset != 0) {
  14169. offset = uint32(1)
  14170. }
  14171. }
  14172. ent = ent + offset
  14173. if ent >= uint32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value) {
  14174. ent -= uint32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  14175. }
  14176. }
  14177. return (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph
  14178. }
  14179. // C documentation
  14180. //
  14181. // /*
  14182. // * Pick a random glyph from the font and remove it from the cache
  14183. // */
  14184. func X_XftFontUncacheGlyph(tls *libc.TLS, dpy uintptr, pub uintptr) {
  14185. bp := tls.Alloc(32)
  14186. defer tls.Free(32)
  14187. var font, xftg uintptr
  14188. var glyph_memory uint64
  14189. var _ /* glyphindex at bp+0 */ TFT_UInt
  14190. _, _, _ = font, glyph_memory, xftg
  14191. font = pub
  14192. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory != 0) {
  14193. return
  14194. }
  14195. if (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs != 0 {
  14196. glyph_memory = uint64(libc.Xrand(tls)) % (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  14197. } else {
  14198. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  14199. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  14200. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  14201. }
  14202. glyph_memory = uint64(0)
  14203. }
  14204. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14205. __XftFontValidateMemory(tls, dpy, pub)
  14206. }
  14207. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  14208. for {
  14209. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)) {
  14210. break
  14211. }
  14212. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*8))
  14213. if xftg != 0 {
  14214. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > glyph_memory {
  14215. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14216. libc.Xprintf(tls, __ccgo_ts+1493, libc.VaList(bp+16, *(*TFT_UInt)(unsafe.Pointer(bp)), (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14217. }
  14218. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  14219. if !((*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs != 0) {
  14220. goto _1
  14221. }
  14222. break
  14223. }
  14224. glyph_memory -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14225. }
  14226. goto _1
  14227. _1:
  14228. ;
  14229. *(*TFT_UInt)(unsafe.Pointer(bp))++
  14230. }
  14231. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14232. __XftFontValidateMemory(tls, dpy, pub)
  14233. }
  14234. }
  14235. func X_XftFontManageMemory(tls *libc.TLS, dpy uintptr, pub uintptr) {
  14236. bp := tls.Alloc(32)
  14237. defer tls.Free(32)
  14238. var font uintptr
  14239. var v1 uint64
  14240. _, _ = font, v1
  14241. font = pub
  14242. if (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory != 0 {
  14243. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14244. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  14245. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  14246. v1 = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  14247. } else {
  14248. v1 = uint64(font)
  14249. }
  14250. libc.Xprintf(tls, __ccgo_ts+1524, libc.VaList(bp+8, v1, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory))
  14251. }
  14252. }
  14253. for (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  14254. X_XftFontUncacheGlyph(tls, dpy, pub)
  14255. }
  14256. }
  14257. X_XftDisplayManageMemory(tls, dpy)
  14258. }
  14259. /* xftxlfd.c */
  14260. var __XftConfigInitialized int32
  14261. func XXftInit(tls *libc.TLS, config uintptr) (r int32) {
  14262. if __XftConfigInitialized != 0 {
  14263. return int32(m_True)
  14264. }
  14265. __XftConfigInitialized = int32(m_True)
  14266. if !(libfontconfig.XFcInit(tls) != 0) {
  14267. return m_False
  14268. }
  14269. return int32(m_True)
  14270. }
  14271. func XXftGetVersion(tls *libc.TLS) (r int32) {
  14272. return libc.Int32FromInt32(m_XFT_MAJOR)*libc.Int32FromInt32(10000) + libc.Int32FromInt32(m_XFT_MINOR)*libc.Int32FromInt32(100) + libc.Int32FromInt32(m_XFT_REVISION)
  14273. }
  14274. var _XftInUse = [4]struct {
  14275. Fname uintptr
  14276. Falloc_count int32
  14277. Falloc_mem int32
  14278. Ffree_count int32
  14279. Ffree_mem int32
  14280. }{
  14281. 0: {
  14282. Fname: __ccgo_ts + 1570,
  14283. },
  14284. 1: {
  14285. Fname: __ccgo_ts + 1578,
  14286. },
  14287. 2: {
  14288. Fname: __ccgo_ts + 1586,
  14289. },
  14290. 3: {
  14291. Fname: __ccgo_ts + 1596,
  14292. },
  14293. }
  14294. var _XftAllocCount int32
  14295. var _XftAllocMem int32
  14296. var _XftFreeCount int32
  14297. var _XftFreeMem int32
  14298. var _XftMemNotice = libc.Int32FromInt32(1) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024)
  14299. var _XftAllocNotify int32
  14300. var _XftFreeNotify int32
  14301. func XXftMemReport(tls *libc.TLS) {
  14302. bp := tls.Alloc(48)
  14303. defer tls.Free(48)
  14304. var i int32
  14305. _ = i
  14306. libc.Xprintf(tls, __ccgo_ts+1605, 0)
  14307. libc.Xprintf(tls, __ccgo_ts+1624, 0)
  14308. libc.Xprintf(tls, __ccgo_ts+1662, 0)
  14309. i = 0
  14310. for {
  14311. if !(i < int32(m_XFT_MEM_NUM)) {
  14312. break
  14313. }
  14314. 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))
  14315. goto _1
  14316. _1:
  14317. ;
  14318. i++
  14319. }
  14320. libc.Xprintf(tls, __ccgo_ts+1705, libc.VaList(bp+8, __ccgo_ts+1725, _XftAllocCount, _XftAllocMem, _XftFreeCount, _XftFreeMem))
  14321. _XftAllocNotify = 0
  14322. _XftFreeNotify = 0
  14323. }
  14324. func XXftMemAlloc(tls *libc.TLS, kind int32, size int32) {
  14325. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  14326. _XftInUse[kind].Falloc_count++
  14327. _XftInUse[kind].Falloc_mem += size
  14328. _XftAllocCount++
  14329. _XftAllocMem += size
  14330. _XftAllocNotify += size
  14331. if _XftAllocNotify > _XftMemNotice {
  14332. XXftMemReport(tls)
  14333. }
  14334. }
  14335. }
  14336. func XXftMemFree(tls *libc.TLS, kind int32, size int32) {
  14337. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  14338. _XftInUse[kind].Ffree_count++
  14339. _XftInUse[kind].Ffree_mem += size
  14340. _XftFreeCount++
  14341. _XftFreeMem += size
  14342. _XftFreeNotify += size
  14343. if _XftFreeNotify > _XftMemNotice {
  14344. XXftMemReport(tls)
  14345. }
  14346. }
  14347. }
  14348. /* xftxlfd.c */
  14349. func XXftListFontsPatternObjects(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, os uintptr) (r uintptr) {
  14350. return libfontconfig.XFcFontList(tls, libc.UintptrFromInt32(0), pattern, os)
  14351. }
  14352. func XXftListFonts(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  14353. bp := tls.Alloc(16)
  14354. defer tls.Free(16)
  14355. var __o__, __ob__, __os__, __p__, first, fs, os, pattern uintptr
  14356. var va Tva_list
  14357. var _ /* __v__ at bp+0 */ TFcValue
  14358. _, _, _, _, _, _, _, _, _ = __o__, __ob__, __os__, __p__, first, fs, os, pattern, va
  14359. va = va1
  14360. __p__ = libc.UintptrFromInt32(0)
  14361. if !(__p__ != 0) {
  14362. __p__ = libfontconfig.XFcPatternCreate(tls)
  14363. if !(__p__ != 0) {
  14364. goto _FcPatternVapBuild_bail0
  14365. }
  14366. }
  14367. for {
  14368. __o__ = libc.VaUintptr(&va)
  14369. if !(__o__ != 0) {
  14370. break
  14371. }
  14372. (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 = libc.VaInt32(&va)
  14373. switch (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 {
  14374. case int32(_FcTypeUnknown):
  14375. fallthrough
  14376. case int32(_FcTypeVoid):
  14377. goto _FcPatternVapBuild_bail1
  14378. case int32(_FcTypeInteger):
  14379. *(*int32)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  14380. case int32(_FcTypeDouble):
  14381. *(*float64)(unsafe.Pointer(bp + 8)) = libc.VaFloat64(&va)
  14382. case int32(_FcTypeString):
  14383. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14384. case int32(_FcTypeBool):
  14385. *(*TFcBool)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  14386. case int32(_FcTypeMatrix):
  14387. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14388. case int32(_FcTypeCharSet):
  14389. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14390. case int32(_FcTypeFTFace):
  14391. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14392. case int32(_FcTypeLangSet):
  14393. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14394. case int32(_FcTypeRange):
  14395. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14396. break
  14397. }
  14398. if !(libfontconfig.XFcPatternAdd(tls, __p__, __o__, *(*TFcValue)(unsafe.Pointer(bp)), int32(m_FcTrue)) != 0) {
  14399. goto _FcPatternVapBuild_bail1
  14400. }
  14401. goto _1
  14402. _1:
  14403. }
  14404. pattern = __p__
  14405. goto _FcPatternVapBuild_return
  14406. goto _FcPatternVapBuild_bail1
  14407. _FcPatternVapBuild_bail1:
  14408. ;
  14409. if !(libc.UintptrFromInt32(0) != 0) {
  14410. libfontconfig.XFcPatternDestroy(tls, __p__)
  14411. }
  14412. goto _FcPatternVapBuild_bail0
  14413. _FcPatternVapBuild_bail0:
  14414. ;
  14415. pattern = libc.UintptrFromInt32(0)
  14416. goto _FcPatternVapBuild_return
  14417. _FcPatternVapBuild_return:
  14418. ;
  14419. first = libc.VaUintptr(&va)
  14420. os = uintptr(0)
  14421. __os__ = libfontconfig.XFcObjectSetCreate(tls)
  14422. if !(__os__ != 0) {
  14423. goto _FcObjectSetVapBuild_bail0
  14424. }
  14425. __ob__ = first
  14426. for __ob__ != 0 {
  14427. if !(libfontconfig.XFcObjectSetAdd(tls, __os__, __ob__) != 0) {
  14428. goto _FcObjectSetVapBuild_bail1
  14429. }
  14430. __ob__ = libc.VaUintptr(&va)
  14431. }
  14432. os = __os__
  14433. goto _FcObjectSetVapBuild_bail1
  14434. _FcObjectSetVapBuild_bail1:
  14435. ;
  14436. if !(os != 0) && __os__ != 0 {
  14437. libfontconfig.XFcObjectSetDestroy(tls, __os__)
  14438. }
  14439. goto _FcObjectSetVapBuild_bail0
  14440. _FcObjectSetVapBuild_bail0:
  14441. ;
  14442. _ = va
  14443. fs = XXftListFontsPatternObjects(tls, dpy, screen, pattern, os)
  14444. libfontconfig.XFcPatternDestroy(tls, pattern)
  14445. libfontconfig.XFcObjectSetDestroy(tls, os)
  14446. return fs
  14447. }
  14448. /* xftxlfd.c */
  14449. func XXftNameParse(tls *libc.TLS, name uintptr) (r uintptr) {
  14450. return libfontconfig.XFcNameParse(tls, name)
  14451. }
  14452. func XXftNameUnparse(tls *libc.TLS, pat uintptr, dest uintptr, len1 int32) (r TFcBool) {
  14453. var name, new1 uintptr
  14454. _, _ = name, new1
  14455. name = libfontconfig.XFcNameUnparse(tls, pat)
  14456. if !(name != 0) {
  14457. return m_FcFalse
  14458. }
  14459. if libc.Xstrlen(tls, name)+uint64(1) > uint64(len1) {
  14460. new1 = libfontconfig.XFcPatternDuplicate(tls, pat)
  14461. libc.Xfree(tls, name)
  14462. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+1731)
  14463. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+1261)
  14464. name = libfontconfig.XFcNameUnparse(tls, new1)
  14465. libfontconfig.XFcPatternDestroy(tls, new1)
  14466. if !(name != 0) {
  14467. return m_FcFalse
  14468. }
  14469. if libc.Xstrlen(tls, name)+uint64(1) > uint64(len1) {
  14470. libc.Xstrncpy(tls, dest, name, uint64(len1)-uint64(1))
  14471. *(*int8)(unsafe.Pointer(dest + uintptr(len1-int32(1)))) = int8('\000')
  14472. libc.Xfree(tls, name)
  14473. return m_FcFalse
  14474. }
  14475. }
  14476. libc.Xstrcpy(tls, dest, name)
  14477. libc.Xfree(tls, name)
  14478. return int32(m_FcTrue)
  14479. }
  14480. const m_NUM_ELT_LOCAL = 128
  14481. /* xftxlfd.c */
  14482. /*
  14483. * Use the Render extension to draw the glyphs
  14484. */
  14485. 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) {
  14486. bp := tls.Alloc(5136)
  14487. defer tls.Free(5136)
  14488. var char16, char32, char8, chars, font uintptr
  14489. var g, max TFT_UInt
  14490. var glyphs_loaded TFcBool
  14491. var i, size, width int32
  14492. var wire TGlyph
  14493. var _ /* char_local at bp+1028 */ [1024]uint32
  14494. var _ /* missing at bp+0 */ [256]TFT_UInt
  14495. var _ /* nmissing at bp+1024 */ int32
  14496. _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, font, g, glyphs_loaded, i, max, size, width, wire
  14497. font = pub
  14498. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  14499. return
  14500. }
  14501. /*
  14502. * Load missing glyphs
  14503. */
  14504. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  14505. max = uint32(0)
  14506. glyphs_loaded = m_FcFalse
  14507. i = 0
  14508. for {
  14509. if !(i < nglyphs) {
  14510. break
  14511. }
  14512. g = *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4))
  14513. if g > max {
  14514. max = g
  14515. }
  14516. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  14517. glyphs_loaded = int32(m_FcTrue)
  14518. }
  14519. goto _1
  14520. _1:
  14521. ;
  14522. i++
  14523. }
  14524. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  14525. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  14526. }
  14527. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14528. goto bail1
  14529. }
  14530. if max < uint32(0x100) {
  14531. width = int32(1)
  14532. size = int32(1)
  14533. } else {
  14534. if max < uint32(0x10000) {
  14535. width = int32(2)
  14536. size = int32(2)
  14537. } else {
  14538. width = int32(4)
  14539. size = int32(4)
  14540. }
  14541. }
  14542. chars = bp + 1028
  14543. if uint64(nglyphs*size) > uint64(4096) {
  14544. chars = libc.Xmalloc(tls, uint64(nglyphs*size))
  14545. if !(chars != 0) {
  14546. goto bail1
  14547. }
  14548. }
  14549. char8 = chars
  14550. char16 = chars
  14551. char32 = chars
  14552. i = 0
  14553. for {
  14554. if !(i < nglyphs) {
  14555. break
  14556. }
  14557. wire = uint64(*(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)))
  14558. if wire >= uint64((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*8)) != 0) {
  14559. wire = uint64(0)
  14560. }
  14561. switch width {
  14562. case int32(1):
  14563. *(*int8)(unsafe.Pointer(char8 + uintptr(i))) = int8(wire)
  14564. case int32(2):
  14565. *(*uint16)(unsafe.Pointer(char16 + uintptr(i)*2)) = uint16(wire)
  14566. case int32(4):
  14567. *(*uint32)(unsafe.Pointer(char32 + uintptr(i)*4)) = uint32(wire)
  14568. break
  14569. }
  14570. goto _2
  14571. _2:
  14572. ;
  14573. i++
  14574. }
  14575. switch width {
  14576. case int32(1):
  14577. fallthrough
  14578. default:
  14579. libxrender.XXRenderCompositeString8(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, char8, nglyphs)
  14580. case int32(2):
  14581. libxrender.XXRenderCompositeString16(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, char16, nglyphs)
  14582. case int32(4):
  14583. libxrender.XXRenderCompositeString32(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, char32, nglyphs)
  14584. break
  14585. }
  14586. if chars != bp+1028 {
  14587. libc.Xfree(tls, chars)
  14588. }
  14589. goto bail1
  14590. bail1:
  14591. ;
  14592. if glyphs_loaded != 0 {
  14593. X_XftFontManageMemory(tls, dpy, pub)
  14594. }
  14595. }
  14596. func XXftGlyphSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  14597. bp := tls.Alloc(9232)
  14598. defer tls.Free(9232)
  14599. var char16, char32, char8, chars, elts, font, glyph, v4, v7 uintptr
  14600. var g, max TFT_UInt
  14601. var glyphs_loaded TFcBool
  14602. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  14603. var _ /* char_local at bp+1028 */ [1024]uint32
  14604. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  14605. var _ /* missing at bp+0 */ [256]TFT_UInt
  14606. var _ /* nmissing at bp+1024 */ int32
  14607. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, elts, font, g, glyph, glyphs_loaded, i, j, max, n, nelt, size, width, x, y, v3, v4, v5, v7
  14608. font = pub
  14609. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  14610. return
  14611. }
  14612. if !(nglyphs != 0) {
  14613. return
  14614. }
  14615. /*
  14616. * Load missing glyphs
  14617. */
  14618. max = uint32(0)
  14619. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  14620. glyphs_loaded = m_FcFalse
  14621. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fglyph
  14622. i = 0
  14623. for {
  14624. if !(i < nglyphs) {
  14625. break
  14626. }
  14627. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14628. if g > max {
  14629. max = g
  14630. }
  14631. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  14632. glyphs_loaded = int32(m_FcTrue)
  14633. }
  14634. goto _1
  14635. _1:
  14636. ;
  14637. i++
  14638. }
  14639. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  14640. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  14641. }
  14642. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14643. goto bail1
  14644. }
  14645. /*
  14646. * See what encoding size is needed
  14647. */
  14648. if max < uint32(0x100) {
  14649. size = int32(1)
  14650. width = int32(1)
  14651. } else {
  14652. if max < uint32(0x10000) {
  14653. size = int32(2)
  14654. width = int32(2)
  14655. } else {
  14656. size = int32(4)
  14657. width = int32(4)
  14658. }
  14659. }
  14660. chars = bp + 1028
  14661. if nglyphs*size > int32(m_NUM_LOCAL) {
  14662. chars = libc.Xmalloc(tls, uint64(nglyphs*size))
  14663. if !(chars != 0) {
  14664. goto bail1
  14665. }
  14666. }
  14667. char8 = chars
  14668. char16 = chars
  14669. char32 = chars
  14670. /*
  14671. * Compute the number of glyph elts needed
  14672. */
  14673. nelt = int32(1)
  14674. i = 0
  14675. for {
  14676. if !(i < nglyphs) {
  14677. break
  14678. }
  14679. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14680. /* Substitute default for non-existant glyphs */
  14681. if g >= uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  14682. g = uint32(0)
  14683. }
  14684. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0 {
  14685. break
  14686. }
  14687. goto _2
  14688. _2:
  14689. ;
  14690. i++
  14691. }
  14692. if i == nglyphs {
  14693. goto bail2
  14694. }
  14695. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  14696. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14697. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14698. for {
  14699. i++
  14700. v3 = i
  14701. if !(v3 < nglyphs) {
  14702. break
  14703. }
  14704. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14705. /* Substitute default for non-existant glyphs */
  14706. if g >= uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  14707. g = uint32(0)
  14708. }
  14709. /*
  14710. * check to see if the glyph is placed where it would
  14711. * fall using the normal spacing
  14712. */
  14713. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  14714. glyph = v4
  14715. if v4 != 0 {
  14716. if x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  14717. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  14718. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  14719. nelt++
  14720. }
  14721. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14722. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14723. }
  14724. }
  14725. elts = bp + 5128
  14726. if nelt > int32(m_NUM_ELT_LOCAL) {
  14727. elts = libc.Xmalloc(tls, uint64(nelt)*uint64(32))
  14728. if !(elts != 0) {
  14729. goto bail2
  14730. }
  14731. }
  14732. /*
  14733. * Generate the list of glyph elts
  14734. */
  14735. nelt = 0
  14736. v5 = libc.Int32FromInt32(0)
  14737. y = v5
  14738. x = v5
  14739. n = 0
  14740. j = 0
  14741. i = 0
  14742. for {
  14743. if !(i < nglyphs) {
  14744. break
  14745. }
  14746. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14747. /* Substitute default for non-existant glyphs */
  14748. if g >= uint32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  14749. g = uint32(0)
  14750. }
  14751. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  14752. glyph = v7
  14753. if v7 != 0 {
  14754. if !(i != 0) || x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  14755. if n != 0 {
  14756. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  14757. nelt++
  14758. }
  14759. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  14760. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  14761. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - x
  14762. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - y
  14763. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  14764. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  14765. n = 0
  14766. }
  14767. switch width {
  14768. case int32(1):
  14769. *(*int8)(unsafe.Pointer(char8 + uintptr(j))) = int8(g)
  14770. case int32(2):
  14771. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  14772. case int32(4):
  14773. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  14774. break
  14775. }
  14776. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14777. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14778. j++
  14779. n++
  14780. }
  14781. goto _6
  14782. _6:
  14783. ;
  14784. i++
  14785. }
  14786. if n != 0 {
  14787. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  14788. nelt++
  14789. }
  14790. switch width {
  14791. case int32(1):
  14792. 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)
  14793. case int32(2):
  14794. 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)
  14795. case int32(4):
  14796. 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)
  14797. break
  14798. }
  14799. if elts != bp+5128 {
  14800. libc.Xfree(tls, elts)
  14801. }
  14802. goto bail2
  14803. bail2:
  14804. ;
  14805. if chars != bp+1028 {
  14806. libc.Xfree(tls, chars)
  14807. }
  14808. goto bail1
  14809. bail1:
  14810. ;
  14811. if glyphs_loaded != 0 {
  14812. X_XftFontManageMemory(tls, dpy, pub)
  14813. }
  14814. }
  14815. func XXftCharSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  14816. bp := tls.Alloc(8192)
  14817. defer tls.Free(8192)
  14818. var glyphs uintptr
  14819. var i int32
  14820. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  14821. _, _ = glyphs, i
  14822. if len1 <= int32(m_NUM_LOCAL) {
  14823. glyphs = bp
  14824. } else {
  14825. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(8))
  14826. if !(glyphs != 0) {
  14827. return
  14828. }
  14829. }
  14830. i = 0
  14831. for {
  14832. if !(i < len1) {
  14833. break
  14834. }
  14835. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, dpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  14836. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  14837. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  14838. goto _1
  14839. _1:
  14840. ;
  14841. i++
  14842. }
  14843. XXftGlyphSpecRender(tls, dpy, op, src, pub, dst, srcx, srcy, glyphs, len1)
  14844. if glyphs != bp {
  14845. libc.Xfree(tls, glyphs)
  14846. }
  14847. }
  14848. /*
  14849. * Choose which format to draw text in when drawing with fonts
  14850. * of different formats. The trick is that ARGB formats aren't
  14851. * compatible with A formats as PictOpAdd does the wrong thing, so
  14852. * fall back to an A format when presented with an ARGB and A format
  14853. */
  14854. func _XftPreferFormat(tls *libc.TLS, dpy uintptr, a uintptr, b uintptr) (r uintptr) {
  14855. var prefer uintptr
  14856. _ = prefer
  14857. prefer = libc.UintptrFromInt32(0)
  14858. if a == b {
  14859. prefer = a
  14860. } else {
  14861. if libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth == int32(32)) != libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth == int32(32)) {
  14862. prefer = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  14863. } else {
  14864. if (*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth > (*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth {
  14865. prefer = a
  14866. } else {
  14867. prefer = b
  14868. }
  14869. }
  14870. }
  14871. return prefer
  14872. }
  14873. func XXftGlyphFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  14874. bp := tls.Alloc(9232)
  14875. defer tls.Free(9232)
  14876. var char16, char32, char8, chars, elts, firstFont, font, font1, font2, font3, format, glyph, prevPublic, pub, pub1, pub2, pub3, v4, v7 uintptr
  14877. var g, max TFT_UInt
  14878. var glyphs_loaded TFcBool
  14879. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  14880. var _ /* char_local at bp+1028 */ [1024]uint32
  14881. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  14882. var _ /* missing at bp+0 */ [256]TFT_UInt
  14883. var _ /* nmissing at bp+1024 */ int32
  14884. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  14885. if !(nglyphs != 0) {
  14886. return
  14887. }
  14888. /*
  14889. * Load missing glyphs. Have to load them
  14890. * one at a time in case the font changes
  14891. */
  14892. max = uint32(0)
  14893. glyphs_loaded = m_FcFalse
  14894. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fglyph
  14895. i = 0
  14896. for {
  14897. if !(i < nglyphs) {
  14898. break
  14899. }
  14900. pub = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  14901. font = pub
  14902. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  14903. if g > max {
  14904. max = g
  14905. }
  14906. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  14907. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  14908. glyphs_loaded = int32(m_FcTrue)
  14909. }
  14910. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  14911. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  14912. }
  14913. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  14914. goto bail1
  14915. }
  14916. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14917. goto bail1
  14918. }
  14919. goto _1
  14920. _1:
  14921. ;
  14922. i++
  14923. }
  14924. /*
  14925. * See what encoding size is needed
  14926. */
  14927. if max < uint32(0x100) {
  14928. size = int32(1)
  14929. width = int32(1)
  14930. } else {
  14931. if max < uint32(0x10000) {
  14932. size = int32(2)
  14933. width = int32(2)
  14934. } else {
  14935. size = int32(4)
  14936. width = int32(4)
  14937. }
  14938. }
  14939. chars = bp + 1028
  14940. if nglyphs*size > int32(m_NUM_LOCAL) {
  14941. chars = libc.Xmalloc(tls, uint64(nglyphs*size))
  14942. if !(chars != 0) {
  14943. goto bail1
  14944. }
  14945. }
  14946. char8 = chars
  14947. char16 = chars
  14948. char32 = chars
  14949. /*
  14950. * Compute the number of glyph elts needed
  14951. */
  14952. nelt = int32(1)
  14953. firstFont = libc.UintptrFromInt32(0)
  14954. i = 0
  14955. for {
  14956. if !(i < nglyphs) {
  14957. break
  14958. }
  14959. pub1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  14960. font1 = pub1
  14961. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  14962. /* Substitute default for non-existant glyphs */
  14963. if g >= uint32((*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0) {
  14964. g = uint32(0)
  14965. }
  14966. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0 {
  14967. firstFont = font1
  14968. break
  14969. }
  14970. goto _2
  14971. _2:
  14972. ;
  14973. i++
  14974. }
  14975. if i == nglyphs || !(firstFont != 0) {
  14976. goto bail2
  14977. }
  14978. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(firstFont)).Fglyphs + uintptr(g)*8))
  14979. format = (*TXftFontInt)(unsafe.Pointer(firstFont)).Fformat
  14980. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14981. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14982. prevPublic = libc.UintptrFromInt32(0)
  14983. for {
  14984. i++
  14985. v3 = i
  14986. if !(v3 < nglyphs) {
  14987. break
  14988. }
  14989. pub2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  14990. font2 = pub2
  14991. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  14992. /* Substitute default for non-existant glyphs */
  14993. if g >= uint32((*TXftFontInt)(unsafe.Pointer(font2)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8)) != 0) {
  14994. g = uint32(0)
  14995. }
  14996. /*
  14997. * check to see if the glyph is placed where it would
  14998. * fall using the normal spacing
  14999. */
  15000. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8))
  15001. glyph = v4
  15002. if v4 != 0 {
  15003. if pub2 != prevPublic || x != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) || y != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) {
  15004. prevPublic = pub2
  15005. if (*TXftFontInt)(unsafe.Pointer(font2)).Fformat != format {
  15006. format = _XftPreferFormat(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font2)).Fformat, format)
  15007. }
  15008. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  15009. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  15010. nelt++
  15011. }
  15012. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15013. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15014. }
  15015. }
  15016. elts = bp + 5128
  15017. if nelt > int32(m_NUM_ELT_LOCAL) {
  15018. elts = libc.Xmalloc(tls, uint64(nelt)*uint64(32))
  15019. if !(elts != 0) {
  15020. goto bail2
  15021. }
  15022. }
  15023. /*
  15024. * Generate the list of glyph elts
  15025. */
  15026. nelt = 0
  15027. v5 = libc.Int32FromInt32(0)
  15028. y = v5
  15029. x = v5
  15030. n = 0
  15031. j = 0
  15032. prevPublic = libc.UintptrFromInt32(0)
  15033. i = 0
  15034. for {
  15035. if !(i < nglyphs) {
  15036. break
  15037. }
  15038. pub3 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  15039. font3 = pub3
  15040. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  15041. /* Substitute default for non-existant glyphs */
  15042. if g >= uint32((*TXftFontInt)(unsafe.Pointer(font3)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8)) != 0) {
  15043. g = uint32(0)
  15044. }
  15045. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8))
  15046. glyph = v7
  15047. if v7 != 0 {
  15048. 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) {
  15049. if n != 0 {
  15050. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  15051. nelt++
  15052. }
  15053. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font3)).Fglyphset
  15054. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  15055. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - x
  15056. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - y
  15057. prevPublic = pub3
  15058. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  15059. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  15060. n = 0
  15061. }
  15062. switch width {
  15063. case int32(1):
  15064. *(*int8)(unsafe.Pointer(char8 + uintptr(j))) = int8(g)
  15065. case int32(2):
  15066. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  15067. case int32(4):
  15068. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  15069. break
  15070. }
  15071. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15072. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15073. j++
  15074. n++
  15075. }
  15076. goto _6
  15077. _6:
  15078. ;
  15079. i++
  15080. }
  15081. if n != 0 {
  15082. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  15083. nelt++
  15084. }
  15085. switch width {
  15086. case int32(1):
  15087. libxrender.XXRenderCompositeText8(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  15088. case int32(2):
  15089. libxrender.XXRenderCompositeText16(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  15090. case int32(4):
  15091. libxrender.XXRenderCompositeText32(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  15092. break
  15093. }
  15094. if elts != bp+5128 {
  15095. libc.Xfree(tls, elts)
  15096. }
  15097. goto bail2
  15098. bail2:
  15099. ;
  15100. if chars != bp+1028 {
  15101. libc.Xfree(tls, chars)
  15102. }
  15103. goto bail1
  15104. bail1:
  15105. ;
  15106. if glyphs_loaded != 0 {
  15107. i = 0
  15108. for {
  15109. if !(i < nglyphs) {
  15110. break
  15111. }
  15112. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  15113. goto _8
  15114. _8:
  15115. ;
  15116. i++
  15117. }
  15118. }
  15119. }
  15120. func XXftCharFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  15121. bp := tls.Alloc(16384)
  15122. defer tls.Free(16384)
  15123. var glyphs uintptr
  15124. var i int32
  15125. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  15126. _, _ = glyphs, i
  15127. if len1 <= int32(m_NUM_LOCAL) {
  15128. glyphs = bp
  15129. } else {
  15130. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(16))
  15131. if !(glyphs != 0) {
  15132. return
  15133. }
  15134. }
  15135. i = 0
  15136. for {
  15137. if !(i < len1) {
  15138. break
  15139. }
  15140. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  15141. (*(*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)
  15142. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  15143. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  15144. goto _1
  15145. _1:
  15146. ;
  15147. i++
  15148. }
  15149. XXftGlyphFontSpecRender(tls, dpy, op, src, dst, srcx, srcy, glyphs, len1)
  15150. if glyphs != bp {
  15151. libc.Xfree(tls, glyphs)
  15152. }
  15153. }
  15154. 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) {
  15155. bp := tls.Alloc(4096)
  15156. defer tls.Free(4096)
  15157. var glyphs uintptr
  15158. var i int32
  15159. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15160. _, _ = glyphs, i
  15161. if len1 <= int32(m_NUM_LOCAL) {
  15162. glyphs = bp
  15163. } else {
  15164. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  15165. if !(glyphs != 0) {
  15166. return
  15167. }
  15168. }
  15169. i = 0
  15170. for {
  15171. if !(i < len1) {
  15172. break
  15173. }
  15174. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  15175. goto _1
  15176. _1:
  15177. ;
  15178. i++
  15179. }
  15180. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15181. if glyphs != bp {
  15182. libc.Xfree(tls, glyphs)
  15183. }
  15184. }
  15185. 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) {
  15186. bp := tls.Alloc(4096)
  15187. defer tls.Free(4096)
  15188. var glyphs uintptr
  15189. var i int32
  15190. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15191. _, _ = glyphs, i
  15192. if len1 <= int32(m_NUM_LOCAL) {
  15193. glyphs = bp
  15194. } else {
  15195. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  15196. if !(glyphs != 0) {
  15197. return
  15198. }
  15199. }
  15200. i = 0
  15201. for {
  15202. if !(i < len1) {
  15203. break
  15204. }
  15205. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  15206. goto _1
  15207. _1:
  15208. ;
  15209. i++
  15210. }
  15211. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15212. if glyphs != bp {
  15213. libc.Xfree(tls, glyphs)
  15214. }
  15215. }
  15216. 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) {
  15217. bp := tls.Alloc(4096)
  15218. defer tls.Free(4096)
  15219. var glyphs uintptr
  15220. var i int32
  15221. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15222. _, _ = glyphs, i
  15223. if len1 <= int32(m_NUM_LOCAL) {
  15224. glyphs = bp
  15225. } else {
  15226. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  15227. if !(glyphs != 0) {
  15228. return
  15229. }
  15230. }
  15231. i = 0
  15232. for {
  15233. if !(i < len1) {
  15234. break
  15235. }
  15236. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(2)))))<<libc.Int32FromInt32(8)|int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(2)+int32(1)))))))
  15237. goto _1
  15238. _1:
  15239. ;
  15240. i++
  15241. }
  15242. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15243. if glyphs != bp {
  15244. libc.Xfree(tls, glyphs)
  15245. }
  15246. }
  15247. 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) {
  15248. bp := tls.Alloc(4096)
  15249. defer tls.Free(4096)
  15250. var glyphs uintptr
  15251. var i int32
  15252. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15253. _, _ = glyphs, i
  15254. if len1 <= int32(m_NUM_LOCAL) {
  15255. glyphs = bp
  15256. } else {
  15257. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  15258. if !(glyphs != 0) {
  15259. return
  15260. }
  15261. }
  15262. i = 0
  15263. for {
  15264. if !(i < len1) {
  15265. break
  15266. }
  15267. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(2)))))|int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(2)+int32(1)))))<<libc.Int32FromInt32(8)))
  15268. goto _1
  15269. _1:
  15270. ;
  15271. i++
  15272. }
  15273. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15274. if glyphs != bp {
  15275. libc.Xfree(tls, glyphs)
  15276. }
  15277. }
  15278. 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) {
  15279. bp := tls.Alloc(4096)
  15280. defer tls.Free(4096)
  15281. var glyphs uintptr
  15282. var i int32
  15283. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15284. _, _ = glyphs, i
  15285. if len1 <= int32(m_NUM_LOCAL) {
  15286. glyphs = bp
  15287. } else {
  15288. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  15289. if !(glyphs != 0) {
  15290. return
  15291. }
  15292. }
  15293. i = 0
  15294. for {
  15295. if !(i < len1) {
  15296. break
  15297. }
  15298. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  15299. goto _1
  15300. _1:
  15301. ;
  15302. i++
  15303. }
  15304. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15305. if glyphs != bp {
  15306. libc.Xfree(tls, glyphs)
  15307. }
  15308. }
  15309. 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) {
  15310. bp := tls.Alloc(4096)
  15311. defer tls.Free(4096)
  15312. var glyphs uintptr
  15313. var i int32
  15314. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15315. _, _ = glyphs, i
  15316. if len1 <= int32(m_NUM_LOCAL) {
  15317. glyphs = bp
  15318. } else {
  15319. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  15320. if !(glyphs != 0) {
  15321. return
  15322. }
  15323. }
  15324. i = 0
  15325. for {
  15326. if !(i < len1) {
  15327. break
  15328. }
  15329. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)))))<<libc.Int32FromInt32(24)|int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(1)))))<<libc.Int32FromInt32(16)|int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(2)))))<<libc.Int32FromInt32(8)|int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(3)))))))
  15330. goto _1
  15331. _1:
  15332. ;
  15333. i++
  15334. }
  15335. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15336. if glyphs != bp {
  15337. libc.Xfree(tls, glyphs)
  15338. }
  15339. }
  15340. 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) {
  15341. bp := tls.Alloc(4096)
  15342. defer tls.Free(4096)
  15343. var glyphs uintptr
  15344. var i int32
  15345. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15346. _, _ = glyphs, i
  15347. if len1 <= int32(m_NUM_LOCAL) {
  15348. glyphs = bp
  15349. } else {
  15350. glyphs = libc.Xmalloc(tls, uint64(len1)*uint64(4))
  15351. if !(glyphs != 0) {
  15352. return
  15353. }
  15354. }
  15355. i = 0
  15356. for {
  15357. if !(i < len1) {
  15358. break
  15359. }
  15360. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)))))|int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(1)))))<<libc.Int32FromInt32(8)|int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(2)))))<<libc.Int32FromInt32(16)|int32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(3)))))<<libc.Int32FromInt32(24)))
  15361. goto _1
  15362. _1:
  15363. ;
  15364. i++
  15365. }
  15366. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15367. if glyphs != bp {
  15368. libc.Xfree(tls, glyphs)
  15369. }
  15370. }
  15371. 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) {
  15372. bp := tls.Alloc(4112)
  15373. defer tls.Free(4112)
  15374. var glyphs, glyphs_new uintptr
  15375. var i, l, size, v1, v3 int32
  15376. var v2 bool
  15377. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15378. var _ /* ucs4 at bp+4096 */ TFcChar32
  15379. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  15380. i = 0
  15381. glyphs = bp
  15382. size = int32(m_NUM_LOCAL)
  15383. for {
  15384. if v2 = len1 != 0; v2 {
  15385. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  15386. l = v1
  15387. }
  15388. if !(v2 && v1 > 0) {
  15389. break
  15390. }
  15391. if i == size {
  15392. glyphs_new = libc.Xmalloc(tls, uint64(size)*uint64(2)*uint64(4))
  15393. if !(glyphs_new != 0) {
  15394. if glyphs != bp {
  15395. libc.Xfree(tls, glyphs)
  15396. }
  15397. return
  15398. }
  15399. libc.Xmemcpy(tls, glyphs_new, glyphs, uint64(size)*uint64(4))
  15400. size *= int32(2)
  15401. if glyphs != bp {
  15402. libc.Xfree(tls, glyphs)
  15403. }
  15404. glyphs = glyphs_new
  15405. }
  15406. v3 = i
  15407. i++
  15408. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  15409. string1 += uintptr(l)
  15410. len1 -= l
  15411. }
  15412. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, i)
  15413. if glyphs != bp {
  15414. libc.Xfree(tls, glyphs)
  15415. }
  15416. }
  15417. 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) {
  15418. bp := tls.Alloc(4112)
  15419. defer tls.Free(4112)
  15420. var glyphs, glyphs_new uintptr
  15421. var i, l, size, v1, v3 int32
  15422. var v2 bool
  15423. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15424. var _ /* ucs4 at bp+4096 */ TFcChar32
  15425. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  15426. i = 0
  15427. glyphs = bp
  15428. size = int32(m_NUM_LOCAL)
  15429. for {
  15430. if v2 = len1 != 0; v2 {
  15431. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  15432. l = v1
  15433. }
  15434. if !(v2 && v1 > 0) {
  15435. break
  15436. }
  15437. if i == size {
  15438. glyphs_new = libc.Xmalloc(tls, uint64(size)*uint64(2)*uint64(4))
  15439. if !(glyphs_new != 0) {
  15440. if glyphs != bp {
  15441. libc.Xfree(tls, glyphs)
  15442. }
  15443. return
  15444. }
  15445. libc.Xmemcpy(tls, glyphs_new, glyphs, uint64(size)*uint64(4))
  15446. size *= int32(2)
  15447. if glyphs != bp {
  15448. libc.Xfree(tls, glyphs)
  15449. }
  15450. glyphs = glyphs_new
  15451. }
  15452. v3 = i
  15453. i++
  15454. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  15455. string1 += uintptr(l)
  15456. len1 -= l
  15457. }
  15458. XXftGlyphRender(tls, dpy, int32(m_PictOpOver), src, pub, dst, srcx, srcy, x, y, glyphs, i)
  15459. if glyphs != bp {
  15460. libc.Xfree(tls, glyphs)
  15461. }
  15462. }
  15463. /* xftxlfd.c */
  15464. func X_XftMatchSymbolic(tls *libc.TLS, s uintptr, n int32, name uintptr, def int32) (r int32) {
  15465. var v1 int32
  15466. _ = v1
  15467. for {
  15468. v1 = n
  15469. n--
  15470. if !(v1 != 0) {
  15471. break
  15472. }
  15473. if !(libfontconfig.XFcStrCmpIgnoreCase(tls, (*TXftSymbolic)(unsafe.Pointer(s)).Fname, name) != 0) {
  15474. return (*TXftSymbolic)(unsafe.Pointer(s)).Fvalue
  15475. }
  15476. s += 16
  15477. }
  15478. return def
  15479. }
  15480. /* xftxlfd.c */
  15481. func XXftNativeByteOrder(tls *libc.TLS) (r int32) {
  15482. bp := tls.Alloc(16)
  15483. defer tls.Free(16)
  15484. var _ /* whichbyte at bp+0 */ int32
  15485. *(*int32)(unsafe.Pointer(bp)) = int32(1)
  15486. if *(*int8)(unsafe.Pointer(bp)) != 0 {
  15487. return m_LSBFirst
  15488. }
  15489. return int32(m_MSBFirst)
  15490. }
  15491. /* byte swap a 32-bit value */
  15492. /* byte swap a short */
  15493. /* byte swap a three-byte unit */
  15494. func XXftSwapCARD32(tls *libc.TLS, data uintptr, u int32) {
  15495. var n int8
  15496. var v1 int32
  15497. _, _ = n, v1
  15498. for {
  15499. v1 = u
  15500. u--
  15501. if !(v1 != 0) {
  15502. break
  15503. }
  15504. n = *(*int8)(unsafe.Pointer(data))
  15505. *(*int8)(unsafe.Pointer(data)) = *(*int8)(unsafe.Pointer(data + 3))
  15506. *(*int8)(unsafe.Pointer(data + 3)) = n
  15507. n = *(*int8)(unsafe.Pointer(data + 1))
  15508. *(*int8)(unsafe.Pointer(data + 1)) = *(*int8)(unsafe.Pointer(data + 2))
  15509. *(*int8)(unsafe.Pointer(data + 2)) = n
  15510. data += 4
  15511. }
  15512. }
  15513. func XXftSwapCARD24(tls *libc.TLS, data uintptr, width int32, height int32) {
  15514. var d uintptr
  15515. var n int8
  15516. var u, units, v1, v2 int32
  15517. _, _, _, _, _, _ = d, n, u, units, v1, v2
  15518. units = width / int32(3)
  15519. for {
  15520. v1 = height
  15521. height--
  15522. if !(v1 != 0) {
  15523. break
  15524. }
  15525. d = data
  15526. data += uintptr(width)
  15527. u = units
  15528. for {
  15529. v2 = u
  15530. u--
  15531. if !(v2 != 0) {
  15532. break
  15533. }
  15534. n = *(*int8)(unsafe.Pointer(d))
  15535. *(*int8)(unsafe.Pointer(d)) = *(*int8)(unsafe.Pointer(d + 2))
  15536. *(*int8)(unsafe.Pointer(d + 2)) = n
  15537. d += uintptr(3)
  15538. }
  15539. }
  15540. }
  15541. func XXftSwapCARD16(tls *libc.TLS, data uintptr, u int32) {
  15542. var n int8
  15543. var v1 int32
  15544. _, _ = n, v1
  15545. for {
  15546. v1 = u
  15547. u--
  15548. if !(v1 != 0) {
  15549. break
  15550. }
  15551. n = *(*int8)(unsafe.Pointer(data))
  15552. *(*int8)(unsafe.Pointer(data)) = *(*int8)(unsafe.Pointer(data + 1))
  15553. *(*int8)(unsafe.Pointer(data + 1)) = n
  15554. data += 2
  15555. }
  15556. }
  15557. func XXftSwapImage(tls *libc.TLS, image uintptr) {
  15558. switch (*TXImage)(unsafe.Pointer(image)).Fbits_per_pixel {
  15559. case int32(32):
  15560. XXftSwapCARD32(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(2))
  15561. case int32(24):
  15562. XXftSwapCARD24(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line, (*TXImage)(unsafe.Pointer(image)).Fheight)
  15563. case int32(16):
  15564. XXftSwapCARD16(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(1))
  15565. default:
  15566. break
  15567. }
  15568. }
  15569. /* xftxlfd.c */
  15570. var _XftXlfdWeights = [6]TXftSymbolic{
  15571. 0: {
  15572. Fname: __ccgo_ts + 1736,
  15573. Fvalue: int32(m_FC_WEIGHT_LIGHT),
  15574. },
  15575. 1: {
  15576. Fname: __ccgo_ts + 1742,
  15577. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  15578. },
  15579. 2: {
  15580. Fname: __ccgo_ts + 1749,
  15581. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  15582. },
  15583. 3: {
  15584. Fname: __ccgo_ts + 1757,
  15585. Fvalue: int32(m_FC_WEIGHT_DEMIBOLD),
  15586. },
  15587. 4: {
  15588. Fname: __ccgo_ts + 1766,
  15589. Fvalue: int32(m_FC_WEIGHT_BOLD),
  15590. },
  15591. 5: {
  15592. Fname: __ccgo_ts + 1771,
  15593. Fvalue: int32(m_FC_WEIGHT_BLACK),
  15594. },
  15595. }
  15596. var _XftXlfdSlants = [3]TXftSymbolic{
  15597. 0: {
  15598. Fname: __ccgo_ts + 1777,
  15599. },
  15600. 1: {
  15601. Fname: __ccgo_ts + 1779,
  15602. Fvalue: int32(m_FC_SLANT_ITALIC),
  15603. },
  15604. 2: {
  15605. Fname: __ccgo_ts + 1781,
  15606. Fvalue: int32(m_FC_SLANT_OBLIQUE),
  15607. },
  15608. }
  15609. // C documentation
  15610. //
  15611. // /*
  15612. // * Cut out one XLFD field, placing it in 'save' and return
  15613. // * the start of 'save'
  15614. // */
  15615. func _XftSplitStr(tls *libc.TLS, field uintptr, save uintptr) (r uintptr) {
  15616. var c int8
  15617. var s, v1, v2 uintptr
  15618. _, _, _, _ = c, s, v1, v2
  15619. s = save
  15620. for *(*int8)(unsafe.Pointer(field)) != 0 {
  15621. if int32(*(*int8)(unsafe.Pointer(field))) == int32('-') {
  15622. break
  15623. }
  15624. v1 = field
  15625. field++
  15626. c = *(*int8)(unsafe.Pointer(v1))
  15627. v2 = save
  15628. save++
  15629. *(*int8)(unsafe.Pointer(v2)) = c
  15630. }
  15631. *(*int8)(unsafe.Pointer(save)) = 0
  15632. return s
  15633. }
  15634. /*
  15635. * convert one XLFD numeric field. Return -1 if the field is '*'
  15636. */
  15637. func _XftGetInt(tls *libc.TLS, ptr uintptr, val uintptr) (r uintptr) {
  15638. var v2 uintptr
  15639. _ = v2
  15640. if int32(*(*int8)(unsafe.Pointer(ptr))) == int32('*') {
  15641. *(*int32)(unsafe.Pointer(val)) = -int32(1)
  15642. ptr++
  15643. } else {
  15644. *(*int32)(unsafe.Pointer(val)) = 0
  15645. for {
  15646. if !(int32(*(*int8)(unsafe.Pointer(ptr))) >= int32('0') && int32(*(*int8)(unsafe.Pointer(ptr))) <= int32('9')) {
  15647. break
  15648. }
  15649. v2 = ptr
  15650. ptr++
  15651. *(*int32)(unsafe.Pointer(val)) = *(*int32)(unsafe.Pointer(val))*int32(10) + int32(*(*int8)(unsafe.Pointer(v2))) - int32('0')
  15652. goto _1
  15653. _1:
  15654. }
  15655. }
  15656. if int32(*(*int8)(unsafe.Pointer(ptr))) == int32('-') {
  15657. return ptr
  15658. }
  15659. return libc.UintptrFromInt32(0)
  15660. }
  15661. func XXftXlfdParse(tls *libc.TLS, xlfd_orig uintptr, ignore_scalable TFcBool, complete TFcBool) (r uintptr) {
  15662. bp := tls.Alloc(16)
  15663. defer tls.Free(16)
  15664. var dpixel float64
  15665. 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
  15666. var slant_value, weight_value int32
  15667. var _ /* pixel at bp+0 */ int32
  15668. var _ /* point at bp+4 */ int32
  15669. var _ /* resx at bp+8 */ int32
  15670. var _ /* resy at bp+12 */ int32
  15671. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  15672. xlfd = xlfd_orig
  15673. if int32(*(*int8)(unsafe.Pointer(xlfd))) != int32('-') {
  15674. return libc.UintptrFromInt32(0)
  15675. }
  15676. xlfd++
  15677. v3 = xlfd
  15678. v2 = v3
  15679. foundry = v2
  15680. v1 = libc.Xstrchr(tls, v2, int32('-'))
  15681. xlfd = v1
  15682. if !(v1 != 0) {
  15683. return libc.UintptrFromInt32(0)
  15684. }
  15685. xlfd++
  15686. v6 = xlfd
  15687. v5 = v6
  15688. family = v5
  15689. v4 = libc.Xstrchr(tls, v5, int32('-'))
  15690. xlfd = v4
  15691. if !(v4 != 0) {
  15692. return libc.UintptrFromInt32(0)
  15693. }
  15694. xlfd++
  15695. v9 = xlfd
  15696. v8 = v9
  15697. weight_name = v8
  15698. v7 = libc.Xstrchr(tls, v8, int32('-'))
  15699. xlfd = v7
  15700. if !(v7 != 0) {
  15701. return libc.UintptrFromInt32(0)
  15702. }
  15703. xlfd++
  15704. v12 = xlfd
  15705. v11 = v12
  15706. slant = v11
  15707. v10 = libc.Xstrchr(tls, v11, int32('-'))
  15708. xlfd = v10
  15709. if !(v10 != 0) {
  15710. return libc.UintptrFromInt32(0)
  15711. }
  15712. xlfd++
  15713. v14 = xlfd
  15714. v13 = libc.Xstrchr(tls, v14, int32('-'))
  15715. xlfd = v13
  15716. if !(v13 != 0) {
  15717. return libc.UintptrFromInt32(0)
  15718. }
  15719. xlfd++
  15720. v16 = xlfd
  15721. v15 = libc.Xstrchr(tls, v16, int32('-'))
  15722. xlfd = v15
  15723. if !(v15 != 0) {
  15724. return libc.UintptrFromInt32(0)
  15725. }
  15726. xlfd++
  15727. v18 = xlfd
  15728. v17 = _XftGetInt(tls, v18, bp)
  15729. xlfd = v17
  15730. if !(v17 != 0) {
  15731. return libc.UintptrFromInt32(0)
  15732. }
  15733. xlfd++
  15734. v20 = xlfd
  15735. v19 = _XftGetInt(tls, v20, bp+4)
  15736. xlfd = v19
  15737. if !(v19 != 0) {
  15738. return libc.UintptrFromInt32(0)
  15739. }
  15740. xlfd++
  15741. v22 = xlfd
  15742. v21 = _XftGetInt(tls, v22, bp+8)
  15743. xlfd = v21
  15744. if !(v21 != 0) {
  15745. return libc.UintptrFromInt32(0)
  15746. }
  15747. xlfd++
  15748. v24 = xlfd
  15749. v23 = _XftGetInt(tls, v24, bp+12)
  15750. xlfd = v23
  15751. if !(v23 != 0) {
  15752. return libc.UintptrFromInt32(0)
  15753. }
  15754. xlfd++
  15755. v26 = xlfd
  15756. v25 = libc.Xstrchr(tls, v26, int32('-'))
  15757. xlfd = v25
  15758. if !(v25 != 0) {
  15759. return libc.UintptrFromInt32(0)
  15760. }
  15761. xlfd++
  15762. v28 = xlfd
  15763. v27 = libc.Xstrchr(tls, v28, int32('-'))
  15764. xlfd = v27
  15765. if !(v27 != 0) {
  15766. return libc.UintptrFromInt32(0)
  15767. }
  15768. xlfd++
  15769. v31 = xlfd
  15770. v30 = v31
  15771. registry = v30
  15772. v29 = libc.Xstrchr(tls, v30, int32('-'))
  15773. xlfd = v29
  15774. if !(v29 != 0) {
  15775. return libc.UintptrFromInt32(0)
  15776. }
  15777. /* make sure no fields follow this one */
  15778. xlfd++
  15779. v34 = xlfd
  15780. v33 = v34
  15781. encoding = v33
  15782. v32 = libc.Xstrchr(tls, v33, int32('-'))
  15783. xlfd = v32
  15784. if v32 != 0 {
  15785. return libc.UintptrFromInt32(0)
  15786. }
  15787. if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
  15788. return libc.UintptrFromInt32(0)
  15789. }
  15790. pat = libfontconfig.XFcPatternCreate(tls)
  15791. if !(pat != 0) {
  15792. return libc.UintptrFromInt32(0)
  15793. }
  15794. save = libc.Xmalloc(tls, libc.Xstrlen(tls, foundry)+uint64(1))
  15795. if !(save != 0) {
  15796. libfontconfig.XFcPatternDestroy(tls, pat)
  15797. return libc.UintptrFromInt32(0)
  15798. }
  15799. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+1783, xlfd_orig) != 0) {
  15800. goto bail
  15801. }
  15802. _XftSplitStr(tls, foundry, save)
  15803. if *(*int8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+1788) != 0 {
  15804. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+1790, save) != 0) {
  15805. goto bail
  15806. }
  15807. }
  15808. _XftSplitStr(tls, family, save)
  15809. if *(*int8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+1788) != 0 {
  15810. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+1798, save) != 0) {
  15811. goto bail
  15812. }
  15813. }
  15814. weight_value = X_XftMatchSymbolic(tls, uintptr(unsafe.Pointer(&_XftXlfdWeights)), int32(libc.Uint64FromInt64(96)/libc.Uint64FromInt64(16)), _XftSplitStr(tls, weight_name, save), int32(m_FC_WEIGHT_MEDIUM))
  15815. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+1805, weight_value) != 0) {
  15816. goto bail
  15817. }
  15818. slant_value = X_XftMatchSymbolic(tls, uintptr(unsafe.Pointer(&_XftXlfdSlants)), int32(libc.Uint64FromInt64(48)/libc.Uint64FromInt64(16)), _XftSplitStr(tls, slant, save), m_FC_SLANT_ROMAN)
  15819. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+1812, slant_value) != 0) {
  15820. goto bail
  15821. }
  15822. dpixel = float64(*(*int32)(unsafe.Pointer(bp)))
  15823. if *(*int32)(unsafe.Pointer(bp + 4)) > 0 {
  15824. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+1818, float64(*(*int32)(unsafe.Pointer(bp + 4)))/float64(10)) != 0) {
  15825. goto bail
  15826. }
  15827. if *(*int32)(unsafe.Pointer(bp)) <= 0 && *(*int32)(unsafe.Pointer(bp + 12)) > 0 {
  15828. dpixel = float64(*(*int32)(unsafe.Pointer(bp + 4))) * float64(*(*int32)(unsafe.Pointer(bp + 12))) / float64(720)
  15829. }
  15830. }
  15831. if dpixel > libc.Float64FromInt32(0) {
  15832. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+1104, dpixel) != 0) {
  15833. goto bail
  15834. }
  15835. }
  15836. libc.Xfree(tls, save)
  15837. return pat
  15838. goto bail
  15839. bail:
  15840. ;
  15841. libc.Xfree(tls, save)
  15842. libfontconfig.XFcPatternDestroy(tls, pat)
  15843. return libc.UintptrFromInt32(0)
  15844. }
  15845. func __ccgo_fp(f interface{}) uintptr {
  15846. type iface [2]uintptr
  15847. return (*iface)(unsafe.Pointer(&f))[1]
  15848. }
  15849. /* xftxlfd.c */
  15850. var X_XftDisplayInfo uintptr
  15851. /* xftxlfd.c */
  15852. var X_XftFTlibrary TFT_Library
  15853. var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data
  15854. 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\x00lang\x00light\x00medium\x00regular\x00demibold\x00bold\x00black\x00r\x00i\x00o\x00xlfd\x00*\x00foundry\x00family\x00weight\x00slant\x00size\x00"