ccgo_freebsd_amd64.go 868 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247
  1. // Code generated for freebsd/amd64 by 'generator --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-macro=m_ --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -extended-errors -ignore-unsupported-alignment -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libXau/include/freebsd/amd64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libXdmcp/include/freebsd/amd64 -lXau -lXdmcp -o libxcb.go --package-name libxcb src/.libs/libxcb.a', DO NOT EDIT.
  2. //go:build freebsd && amd64
  3. package libxcb
  4. import (
  5. "reflect"
  6. "unsafe"
  7. "modernc.org/libXau"
  8. "modernc.org/libXdmcp"
  9. "modernc.org/libc"
  10. )
  11. var _ reflect.Type
  12. var _ unsafe.Pointer
  13. const m_AF_APPLETALK = 16
  14. const m_AF_ARP = 35
  15. const m_AF_ATM = 30
  16. const m_AF_BLUETOOTH = 36
  17. const m_AF_CCITT = 10
  18. const m_AF_CHAOS = 5
  19. const m_AF_CNT = 21
  20. const m_AF_COIP = 20
  21. const m_AF_DATAKIT = 9
  22. const m_AF_DECnet = 12
  23. const m_AF_DIVERT = 44
  24. const m_AF_DLI = 13
  25. const m_AF_E164 = "AF_ISDN"
  26. const m_AF_ECMA = 8
  27. const m_AF_HYLINK = 15
  28. const m_AF_HYPERV = 43
  29. const m_AF_IEEE80211 = 37
  30. const m_AF_IMPLINK = 3
  31. const m_AF_INET = 2
  32. const m_AF_INET6 = 28
  33. const m_AF_INET6_SDP = 42
  34. const m_AF_INET_SDP = 40
  35. const m_AF_IPX = 23
  36. const m_AF_ISDN = 26
  37. const m_AF_ISO = 7
  38. const m_AF_LAT = 14
  39. const m_AF_LINK = 18
  40. const m_AF_LOCAL = "AF_UNIX"
  41. const m_AF_MAX = 44
  42. const m_AF_NATM = 29
  43. const m_AF_NETBIOS = 6
  44. const m_AF_NETGRAPH = 32
  45. const m_AF_NETLINK = 38
  46. const m_AF_OSI = "AF_ISO"
  47. const m_AF_PUP = 4
  48. const m_AF_ROUTE = 17
  49. const m_AF_SCLUSTER = 34
  50. const m_AF_SIP = 24
  51. const m_AF_SLOW = 33
  52. const m_AF_SNA = 11
  53. const m_AF_UNIX = 1
  54. const m_AF_UNSPEC = 0
  55. const m_AF_VENDOR00 = 39
  56. const m_AF_VENDOR01 = 41
  57. const m_AF_VENDOR03 = 45
  58. const m_AF_VENDOR04 = 47
  59. const m_AF_VENDOR05 = 49
  60. const m_AF_VENDOR06 = 51
  61. const m_AF_VENDOR07 = 53
  62. const m_AF_VENDOR08 = 55
  63. const m_AF_VENDOR09 = 57
  64. const m_AF_VENDOR10 = 59
  65. const m_AF_VENDOR11 = 61
  66. const m_AF_VENDOR12 = 63
  67. const m_AF_VENDOR13 = 65
  68. const m_AF_VENDOR14 = 67
  69. const m_AF_VENDOR15 = 69
  70. const m_AF_VENDOR16 = 71
  71. const m_AF_VENDOR17 = 73
  72. const m_AF_VENDOR18 = 75
  73. const m_AF_VENDOR19 = 77
  74. const m_AF_VENDOR20 = 79
  75. const m_AF_VENDOR21 = 81
  76. const m_AF_VENDOR22 = 83
  77. const m_AF_VENDOR23 = 85
  78. const m_AF_VENDOR24 = 87
  79. const m_AF_VENDOR25 = 89
  80. const m_AF_VENDOR26 = 91
  81. const m_AF_VENDOR27 = 93
  82. const m_AF_VENDOR28 = 95
  83. const m_AF_VENDOR29 = 97
  84. const m_AF_VENDOR30 = 99
  85. const m_AF_VENDOR31 = 101
  86. const m_AF_VENDOR32 = 103
  87. const m_AF_VENDOR33 = 105
  88. const m_AF_VENDOR34 = 107
  89. const m_AF_VENDOR35 = 109
  90. const m_AF_VENDOR36 = 111
  91. const m_AF_VENDOR37 = 113
  92. const m_AF_VENDOR38 = 115
  93. const m_AF_VENDOR39 = 117
  94. const m_AF_VENDOR40 = 119
  95. const m_AF_VENDOR41 = 121
  96. const m_AF_VENDOR42 = 123
  97. const m_AF_VENDOR43 = 125
  98. const m_AF_VENDOR44 = 127
  99. const m_AF_VENDOR45 = 129
  100. const m_AF_VENDOR46 = 131
  101. const m_AF_VENDOR47 = 133
  102. const m_AT_EACCESS = 0x0100
  103. const m_AT_EMPTY_PATH = 0x4000
  104. const m_AT_REMOVEDIR = 0x0800
  105. const m_AT_RESOLVE_BENEATH = 0x2000
  106. const m_AT_SYMLINK_FOLLOW = 0x0400
  107. const m_AT_SYMLINK_NOFOLLOW = 0x0200
  108. const m_BC_BASE_MAX = 99
  109. const m_BC_DIM_MAX = 2048
  110. const m_BC_SCALE_MAX = 99
  111. const m_BC_STRING_MAX = 1000
  112. const m_BIG_ENDIAN = "_BIG_ENDIAN"
  113. const m_BUFSIZ = 1024
  114. const m_BYTE_ORDER = "_BYTE_ORDER"
  115. const m_CHARCLASS_NAME_MAX = 14
  116. const m_CHAR_BIT = "__CHAR_BIT"
  117. const m_CHAR_MAX = "SCHAR_MAX"
  118. const m_CHAR_MIN = "SCHAR_MIN"
  119. const m_CHILD_MAX = 40
  120. const m_CLK_TCK = 128
  121. const m_CLOCKS_PER_SEC = 128
  122. const m_CLOCK_BOOTTIME = "CLOCK_UPTIME"
  123. const m_CLOCK_MONOTONIC = 4
  124. const m_CLOCK_MONOTONIC_COARSE = "CLOCK_MONOTONIC_FAST"
  125. const m_CLOCK_MONOTONIC_FAST = 12
  126. const m_CLOCK_MONOTONIC_PRECISE = 11
  127. const m_CLOCK_PROCESS_CPUTIME_ID = 15
  128. const m_CLOCK_PROF = 2
  129. const m_CLOCK_REALTIME = 0
  130. const m_CLOCK_REALTIME_COARSE = "CLOCK_REALTIME_FAST"
  131. const m_CLOCK_REALTIME_FAST = 10
  132. const m_CLOCK_REALTIME_PRECISE = 9
  133. const m_CLOCK_SECOND = 13
  134. const m_CLOCK_THREAD_CPUTIME_ID = 14
  135. const m_CLOCK_UPTIME = 5
  136. const m_CLOCK_UPTIME_FAST = 8
  137. const m_CLOCK_UPTIME_PRECISE = 7
  138. const m_CLOCK_VIRTUAL = 1
  139. const m_CMGROUP_MAX = 16
  140. const m_COLL_WEIGHTS_MAX = 10
  141. const m_CPUSET_DEFAULT = 0
  142. const m_CPU_LEVEL_CPUSET = 2
  143. const m_CPU_LEVEL_ROOT = 1
  144. const m_CPU_LEVEL_WHICH = 3
  145. const m_CPU_MAXSIZE = 1024
  146. const m_CPU_SETSIZE = "CPU_MAXSIZE"
  147. const m_CPU_WHICH_CPUSET = 3
  148. const m_CPU_WHICH_DOMAIN = 6
  149. const m_CPU_WHICH_INTRHANDLER = 7
  150. const m_CPU_WHICH_IRQ = 4
  151. const m_CPU_WHICH_ITHREAD = 8
  152. const m_CPU_WHICH_JAIL = 5
  153. const m_CPU_WHICH_PID = 2
  154. const m_CPU_WHICH_TID = 1
  155. const m_CPU_WHICH_TIDPID = 9
  156. const m_E2BIG = 7
  157. const m_EACCES = 13
  158. const m_EADDRINUSE = 48
  159. const m_EADDRNOTAVAIL = 49
  160. const m_EAFNOSUPPORT = 47
  161. const m_EAGAIN = 35
  162. const m_EALREADY = 37
  163. const m_EAUTH = 80
  164. const m_EBADF = 9
  165. const m_EBADMSG = 89
  166. const m_EBADRPC = 72
  167. const m_EBUSY = 16
  168. const m_ECANCELED = 85
  169. const m_ECAPMODE = 94
  170. const m_ECHILD = 10
  171. const m_ECONNABORTED = 53
  172. const m_ECONNREFUSED = 61
  173. const m_ECONNRESET = 54
  174. const m_EDEADLK = 11
  175. const m_EDESTADDRREQ = 39
  176. const m_EDOM = 33
  177. const m_EDOOFUS = 88
  178. const m_EDQUOT = 69
  179. const m_EEXIST = 17
  180. const m_EFAULT = 14
  181. const m_EFBIG = 27
  182. const m_EFTYPE = 79
  183. const m_EHOSTDOWN = 64
  184. const m_EHOSTUNREACH = 65
  185. const m_EIDRM = 82
  186. const m_EILSEQ = 86
  187. const m_EINPROGRESS = 36
  188. const m_EINTEGRITY = 97
  189. const m_EINTR = 4
  190. const m_EINVAL = 22
  191. const m_EIO = 5
  192. const m_EISCONN = 56
  193. const m_EISDIR = 21
  194. const m_ELAST = 97
  195. const m_ELOOP = 62
  196. const m_EMFILE = 24
  197. const m_EMLINK = 31
  198. const m_EMSGSIZE = 40
  199. const m_EMULTIHOP = 90
  200. const m_ENAMETOOLONG = 63
  201. const m_ENEEDAUTH = 81
  202. const m_ENETDOWN = 50
  203. const m_ENETRESET = 52
  204. const m_ENETUNREACH = 51
  205. const m_ENFILE = 23
  206. const m_ENOATTR = 87
  207. const m_ENOBUFS = 55
  208. const m_ENODEV = 19
  209. const m_ENOENT = 2
  210. const m_ENOEXEC = 8
  211. const m_ENOLCK = 77
  212. const m_ENOLINK = 91
  213. const m_ENOMEM = 12
  214. const m_ENOMSG = 83
  215. const m_ENOPROTOOPT = 42
  216. const m_ENOSPC = 28
  217. const m_ENOSYS = 78
  218. const m_ENOTBLK = 15
  219. const m_ENOTCAPABLE = 93
  220. const m_ENOTCONN = 57
  221. const m_ENOTDIR = 20
  222. const m_ENOTEMPTY = 66
  223. const m_ENOTRECOVERABLE = 95
  224. const m_ENOTSOCK = 38
  225. const m_ENOTSUP = "EOPNOTSUPP"
  226. const m_ENOTTY = 25
  227. const m_ENXIO = 6
  228. const m_EOPNOTSUPP = 45
  229. const m_EOVERFLOW = 84
  230. const m_EOWNERDEAD = 96
  231. const m_EPERM = 1
  232. const m_EPFNOSUPPORT = 46
  233. const m_EPIPE = 32
  234. const m_EPROCLIM = 67
  235. const m_EPROCUNAVAIL = 76
  236. const m_EPROGMISMATCH = 75
  237. const m_EPROGUNAVAIL = 74
  238. const m_EPROTO = 92
  239. const m_EPROTONOSUPPORT = 43
  240. const m_EPROTOTYPE = 41
  241. const m_ERANGE = 34
  242. const m_EREMOTE = 71
  243. const m_EROFS = 30
  244. const m_ERPCMISMATCH = 73
  245. const m_ESHUTDOWN = 58
  246. const m_ESOCKTNOSUPPORT = 44
  247. const m_ESPIPE = 29
  248. const m_ESRCH = 3
  249. const m_ESTALE = 70
  250. const m_ETIMEDOUT = 60
  251. const m_ETOOMANYREFS = 59
  252. const m_ETXTBSY = 26
  253. const m_EUSERS = 68
  254. const m_EWOULDBLOCK = "EAGAIN"
  255. const m_EXDEV = 18
  256. const m_EXIT_FAILURE = 1
  257. const m_EXIT_SUCCESS = 0
  258. const m_EXPR_NEST_MAX = 32
  259. const m_FAPPEND = "O_APPEND"
  260. const m_FASYNC = "O_ASYNC"
  261. const m_FDSYNC = "O_DSYNC"
  262. const m_FD_CLOEXEC = 1
  263. const m_FD_SETSIZE = 1024
  264. const m_FFSYNC = "O_FSYNC"
  265. const m_FILENAME_MAX = 1024
  266. const m_FNDELAY = "O_NONBLOCK"
  267. const m_FNONBLOCK = "O_NONBLOCK"
  268. const m_FOPEN_MAX = 20
  269. const m_FRDAHEAD = "O_CREAT"
  270. const m_FREAD = 0x0001
  271. const m_FWRITE = 0x0002
  272. const m_F_ADD_SEALS = 19
  273. const m_F_CANCEL = 5
  274. const m_F_DUP2FD = 10
  275. const m_F_DUP2FD_CLOEXEC = 18
  276. const m_F_DUPFD = 0
  277. const m_F_DUPFD_CLOEXEC = 17
  278. const m_F_GETFD = 1
  279. const m_F_GETFL = 3
  280. const m_F_GETLK = 11
  281. const m_F_GETOWN = 5
  282. const m_F_GET_SEALS = 20
  283. const m_F_ISUNIONSTACK = 21
  284. const m_F_KINFO = 22
  285. const m_F_LOCK = 1
  286. const m_F_OGETLK = 7
  287. const m_F_OK = 0
  288. const m_F_OSETLK = 8
  289. const m_F_OSETLKW = 9
  290. const m_F_RDAHEAD = 16
  291. const m_F_RDLCK = 1
  292. const m_F_READAHEAD = 15
  293. const m_F_SEAL_GROW = 0x0004
  294. const m_F_SEAL_SEAL = 0x0001
  295. const m_F_SEAL_SHRINK = 0x0002
  296. const m_F_SEAL_WRITE = 0x0008
  297. const m_F_SETFD = 2
  298. const m_F_SETFL = 4
  299. const m_F_SETLK = 12
  300. const m_F_SETLKW = 13
  301. const m_F_SETLK_REMOTE = 14
  302. const m_F_SETOWN = 6
  303. const m_F_TEST = 3
  304. const m_F_TLOCK = 2
  305. const m_F_ULOCK = 0
  306. const m_F_UNLCK = 2
  307. const m_F_UNLCKSYS = 4
  308. const m_F_WRLCK = 3
  309. const m_GID_MAX = "UINT_MAX"
  310. const m_HASXDMAUTH = 1
  311. const m_HAVE_CONFIG_H = 1
  312. const m_HAVE_DLFCN_H = 1
  313. const m_HAVE_GETADDRINFO = 1
  314. const m_HAVE_INTTYPES_H = 1
  315. const m_HAVE_SENDMSG = 1
  316. const m_HAVE_SOCKADDR_SUN_LEN = 1
  317. const m_HAVE_STDINT_H = 1
  318. const m_HAVE_STDIO_H = 1
  319. const m_HAVE_STDLIB_H = 1
  320. const m_HAVE_STRINGS_H = 1
  321. const m_HAVE_STRING_H = 1
  322. const m_HAVE_SYS_STAT_H = 1
  323. const m_HAVE_SYS_TYPES_H = 1
  324. const m_HAVE_UNISTD_H = 1
  325. const m_HAVE_WCHAR_H = 1
  326. const m_ICMP6_FILTER = 18
  327. const m_ICMPV6CTL_ND6_ONLINKNSRFC4861 = 47
  328. const m_INET6_ADDRSTRLEN = 46
  329. const m_INET_ADDRSTRLEN = 16
  330. const m_INT16_MAX = 0x7fff
  331. const m_INT32_MAX = 0x7fffffff
  332. const m_INT64_MAX = 0x7fffffffffffffff
  333. const m_INT8_MAX = 0x7f
  334. const m_INTMAX_MAX = "INT64_MAX"
  335. const m_INTMAX_MIN = "INT64_MIN"
  336. const m_INTPTR_MAX = "INT64_MAX"
  337. const m_INTPTR_MIN = "INT64_MIN"
  338. const m_INT_FAST16_MAX = "INT32_MAX"
  339. const m_INT_FAST16_MIN = "INT32_MIN"
  340. const m_INT_FAST32_MAX = "INT32_MAX"
  341. const m_INT_FAST32_MIN = "INT32_MIN"
  342. const m_INT_FAST64_MAX = "INT64_MAX"
  343. const m_INT_FAST64_MIN = "INT64_MIN"
  344. const m_INT_FAST8_MAX = "INT32_MAX"
  345. const m_INT_FAST8_MIN = "INT32_MIN"
  346. const m_INT_LEAST16_MAX = "INT16_MAX"
  347. const m_INT_LEAST16_MIN = "INT16_MIN"
  348. const m_INT_LEAST32_MAX = "INT32_MAX"
  349. const m_INT_LEAST32_MIN = "INT32_MIN"
  350. const m_INT_LEAST64_MAX = "INT64_MAX"
  351. const m_INT_LEAST64_MIN = "INT64_MIN"
  352. const m_INT_LEAST8_MAX = "INT8_MAX"
  353. const m_INT_LEAST8_MIN = "INT8_MIN"
  354. const m_INT_MAX = "__INT_MAX"
  355. const m_INT_MIN = "__INT_MIN"
  356. const m_IN_CLASSA_HOST = 0x00ffffff
  357. const m_IN_CLASSA_MAX = 128
  358. const m_IN_CLASSA_NET = 0xff000000
  359. const m_IN_CLASSA_NSHIFT = 24
  360. const m_IN_CLASSB_HOST = 0x0000ffff
  361. const m_IN_CLASSB_MAX = 65536
  362. const m_IN_CLASSB_NET = 0xffff0000
  363. const m_IN_CLASSB_NSHIFT = 16
  364. const m_IN_CLASSC_HOST = 0x000000ff
  365. const m_IN_CLASSC_NET = 0xffffff00
  366. const m_IN_CLASSC_NSHIFT = 8
  367. const m_IN_CLASSD_HOST = 0x0fffffff
  368. const m_IN_CLASSD_NET = 0xf0000000
  369. const m_IN_CLASSD_NSHIFT = 28
  370. const m_IN_LOOPBACKNET = 127
  371. const m_IN_NETMASK_DEFAULT = 0xffffff00
  372. const m_IOV_MAX = 1024
  373. const m_IPCTL_ACCEPTSOURCEROUTE = 13
  374. const m_IPCTL_DEFTTL = 3
  375. const m_IPCTL_DIRECTEDBROADCAST = 9
  376. const m_IPCTL_FASTFORWARDING = 14
  377. const m_IPCTL_FORWARDING = 1
  378. const m_IPCTL_GIF_TTL = 16
  379. const m_IPCTL_INTRDQDROPS = 18
  380. const m_IPCTL_INTRDQMAXLEN = 17
  381. const m_IPCTL_INTRQDROPS = 11
  382. const m_IPCTL_INTRQMAXLEN = 10
  383. const m_IPCTL_SENDREDIRECTS = 2
  384. const m_IPCTL_SOURCEROUTE = 8
  385. const m_IPCTL_STATS = 12
  386. const m_IPPORT_EPHEMERALFIRST = 10000
  387. const m_IPPORT_EPHEMERALLAST = 65535
  388. const m_IPPORT_HIFIRSTAUTO = 49152
  389. const m_IPPORT_HILASTAUTO = 65535
  390. const m_IPPORT_MAX = 65535
  391. const m_IPPORT_RESERVED = 1024
  392. const m_IPPORT_RESERVEDSTART = 600
  393. const m_IPPROTO_3PC = 34
  394. const m_IPPROTO_ADFS = 68
  395. const m_IPPROTO_AH = 51
  396. const m_IPPROTO_AHIP = 61
  397. const m_IPPROTO_APES = 99
  398. const m_IPPROTO_ARGUS = 13
  399. const m_IPPROTO_AX25 = 93
  400. const m_IPPROTO_BHA = 49
  401. const m_IPPROTO_BLT = 30
  402. const m_IPPROTO_BRSATMON = 76
  403. const m_IPPROTO_CARP = 112
  404. const m_IPPROTO_CFTP = 62
  405. const m_IPPROTO_CHAOS = 16
  406. const m_IPPROTO_CMTP = 38
  407. const m_IPPROTO_CPHB = 73
  408. const m_IPPROTO_CPNX = 72
  409. const m_IPPROTO_DCCP = 33
  410. const m_IPPROTO_DDP = 37
  411. const m_IPPROTO_DGP = 86
  412. const m_IPPROTO_DIVERT = 258
  413. const m_IPPROTO_DONE = 257
  414. const m_IPPROTO_DSTOPTS = 60
  415. const m_IPPROTO_EGP = 8
  416. const m_IPPROTO_EMCON = 14
  417. const m_IPPROTO_ENCAP = 98
  418. const m_IPPROTO_EON = 80
  419. const m_IPPROTO_ESP = 50
  420. const m_IPPROTO_ETHERIP = 97
  421. const m_IPPROTO_FRAGMENT = 44
  422. const m_IPPROTO_GGP = 3
  423. const m_IPPROTO_GMTP = 100
  424. const m_IPPROTO_GRE = 47
  425. const m_IPPROTO_HELLO = 63
  426. const m_IPPROTO_HIP = 139
  427. const m_IPPROTO_HMP = 20
  428. const m_IPPROTO_HOPOPTS = 0
  429. const m_IPPROTO_ICMP = 1
  430. const m_IPPROTO_ICMPV6 = 58
  431. const m_IPPROTO_IDP = 22
  432. const m_IPPROTO_IDPR = 35
  433. const m_IPPROTO_IDRP = 45
  434. const m_IPPROTO_IGMP = 2
  435. const m_IPPROTO_IGP = 85
  436. const m_IPPROTO_IGRP = 88
  437. const m_IPPROTO_IL = 40
  438. const m_IPPROTO_INLSP = 52
  439. const m_IPPROTO_INP = 32
  440. const m_IPPROTO_IP = 0
  441. const m_IPPROTO_IPCOMP = 108
  442. const m_IPPROTO_IPCV = 71
  443. const m_IPPROTO_IPEIP = 94
  444. const m_IPPROTO_IPIP = "IPPROTO_IPV4"
  445. const m_IPPROTO_IPPC = 67
  446. const m_IPPROTO_IPV4 = 4
  447. const m_IPPROTO_IPV6 = 41
  448. const m_IPPROTO_IRTP = 28
  449. const m_IPPROTO_KRYPTOLAN = 65
  450. const m_IPPROTO_LARP = 91
  451. const m_IPPROTO_LEAF1 = 25
  452. const m_IPPROTO_LEAF2 = 26
  453. const m_IPPROTO_MAX = 256
  454. const m_IPPROTO_MEAS = 19
  455. const m_IPPROTO_MH = 135
  456. const m_IPPROTO_MHRP = 48
  457. const m_IPPROTO_MICP = 95
  458. const m_IPPROTO_MOBILE = 55
  459. const m_IPPROTO_MPLS = 137
  460. const m_IPPROTO_MTP = 92
  461. const m_IPPROTO_MUX = 18
  462. const m_IPPROTO_ND = 77
  463. const m_IPPROTO_NHRP = 54
  464. const m_IPPROTO_NONE = 59
  465. const m_IPPROTO_NSP = 31
  466. const m_IPPROTO_NVPII = 11
  467. const m_IPPROTO_OLD_DIVERT = 254
  468. const m_IPPROTO_OSPFIGP = 89
  469. const m_IPPROTO_PFSYNC = 240
  470. const m_IPPROTO_PGM = 113
  471. const m_IPPROTO_PIGP = 9
  472. const m_IPPROTO_PIM = 103
  473. const m_IPPROTO_PRM = 21
  474. const m_IPPROTO_PUP = 12
  475. const m_IPPROTO_PVP = 75
  476. const m_IPPROTO_RAW = 255
  477. const m_IPPROTO_RCCMON = 10
  478. const m_IPPROTO_RDP = 27
  479. const m_IPPROTO_RESERVED_253 = 253
  480. const m_IPPROTO_RESERVED_254 = 254
  481. const m_IPPROTO_ROUTING = 43
  482. const m_IPPROTO_RSVP = 46
  483. const m_IPPROTO_RVD = 66
  484. const m_IPPROTO_SATEXPAK = 64
  485. const m_IPPROTO_SATMON = 69
  486. const m_IPPROTO_SCCSP = 96
  487. const m_IPPROTO_SCTP = 132
  488. const m_IPPROTO_SDRP = 42
  489. const m_IPPROTO_SEND = 259
  490. const m_IPPROTO_SHIM6 = 140
  491. const m_IPPROTO_SKIP = 57
  492. const m_IPPROTO_SPACER = 32767
  493. const m_IPPROTO_SRPC = 90
  494. const m_IPPROTO_ST = 7
  495. const m_IPPROTO_SVMTP = 82
  496. const m_IPPROTO_SWIPE = 53
  497. const m_IPPROTO_TCF = 87
  498. const m_IPPROTO_TCP = 6
  499. const m_IPPROTO_TLSP = 56
  500. const m_IPPROTO_TP = 29
  501. const m_IPPROTO_TPXX = 39
  502. const m_IPPROTO_TRUNK1 = 23
  503. const m_IPPROTO_TRUNK2 = 24
  504. const m_IPPROTO_TTP = 84
  505. const m_IPPROTO_UDP = 17
  506. const m_IPPROTO_UDPLITE = 136
  507. const m_IPPROTO_VINES = 83
  508. const m_IPPROTO_VISA = 70
  509. const m_IPPROTO_VMTP = 81
  510. const m_IPPROTO_WBEXPAK = 79
  511. const m_IPPROTO_WBMON = 78
  512. const m_IPPROTO_WSN = 74
  513. const m_IPPROTO_XNET = 15
  514. const m_IPPROTO_XTP = 36
  515. const m_IPV6CTL_ACCEPT_RTADV = 12
  516. const m_IPV6CTL_ADDRCTLPOLICY = 38
  517. const m_IPV6CTL_AUTO_FLOWLABEL = 17
  518. const m_IPV6CTL_AUTO_LINKLOCAL = 35
  519. const m_IPV6CTL_DAD_COUNT = 16
  520. const m_IPV6CTL_DEFHLIM = 3
  521. const m_IPV6CTL_DEFMCASTHLIM = 18
  522. const m_IPV6CTL_FORWARDING = 1
  523. const m_IPV6CTL_FORWSRCRT = 5
  524. const m_IPV6CTL_GIF_HLIM = 19
  525. const m_IPV6CTL_HDRNESTLIMIT = 15
  526. const m_IPV6CTL_INTRDQMAXLEN = 52
  527. const m_IPV6CTL_INTRQMAXLEN = 51
  528. const m_IPV6CTL_KAME_VERSION = 20
  529. const m_IPV6CTL_LOG_INTERVAL = 14
  530. const m_IPV6CTL_MAXFRAGBUCKETSIZE = 54
  531. const m_IPV6CTL_MAXFRAGPACKETS = 9
  532. const m_IPV6CTL_MAXFRAGS = 41
  533. const m_IPV6CTL_MAXFRAGSPERPACKET = 53
  534. const m_IPV6CTL_MAXID = 55
  535. const m_IPV6CTL_MCAST_PMTU = 44
  536. const m_IPV6CTL_MRTPROTO = 8
  537. const m_IPV6CTL_MRTSTATS = 7
  538. const m_IPV6CTL_NORBIT_RAIF = 49
  539. const m_IPV6CTL_NO_RADR = 48
  540. const m_IPV6CTL_PREFER_TEMPADDR = 37
  541. const m_IPV6CTL_RFC6204W3 = 50
  542. const m_IPV6CTL_RIP6STATS = 36
  543. const m_IPV6CTL_RR_PRUNE = 22
  544. const m_IPV6CTL_SENDREDIRECTS = 2
  545. const m_IPV6CTL_SOURCECHECK = 10
  546. const m_IPV6CTL_SOURCECHECK_LOGINT = 11
  547. const m_IPV6CTL_STATS = 6
  548. const m_IPV6CTL_STEALTH = 45
  549. const m_IPV6CTL_TEMPPLTIME = 33
  550. const m_IPV6CTL_TEMPVLTIME = 34
  551. const m_IPV6CTL_USETEMPADDR = 32
  552. const m_IPV6CTL_USE_DEFAULTZONE = 39
  553. const m_IPV6CTL_USE_DEPRECATED = 21
  554. const m_IPV6CTL_V6ONLY = 24
  555. const m_IPV6PORT_ANONMAX = 65535
  556. const m_IPV6PORT_ANONMIN = 49152
  557. const m_IPV6PORT_RESERVED = 1024
  558. const m_IPV6PORT_RESERVEDMIN = 600
  559. const m_IPV6_AUTOFLOWLABEL = 59
  560. const m_IPV6_BINDANY = 64
  561. const m_IPV6_BINDV6ONLY = "IPV6_V6ONLY"
  562. const m_IPV6_CHECKSUM = 26
  563. const m_IPV6_DEFAULT_MULTICAST_HOPS = 1
  564. const m_IPV6_DEFAULT_MULTICAST_LOOP = 1
  565. const m_IPV6_DONTFRAG = 62
  566. const m_IPV6_DSTOPTS = 50
  567. const m_IPV6_FLOWID = 67
  568. const m_IPV6_FLOWTYPE = 68
  569. const m_IPV6_FW_ADD = 30
  570. const m_IPV6_FW_DEL = 31
  571. const m_IPV6_FW_FLUSH = 32
  572. const m_IPV6_FW_GET = 34
  573. const m_IPV6_FW_ZERO = 33
  574. const m_IPV6_HOPLIMIT = 47
  575. const m_IPV6_HOPOPTS = 49
  576. const m_IPV6_IPSEC_POLICY = 28
  577. const m_IPV6_JOIN_GROUP = 12
  578. const m_IPV6_LEAVE_GROUP = 13
  579. const m_IPV6_MAX_GROUP_SRC_FILTER = 512
  580. const m_IPV6_MAX_MEMBERSHIPS = 4095
  581. const m_IPV6_MAX_SOCK_SRC_FILTER = 128
  582. const m_IPV6_MSFILTER = 74
  583. const m_IPV6_MULTICAST_HOPS = 10
  584. const m_IPV6_MULTICAST_IF = 9
  585. const m_IPV6_MULTICAST_LOOP = 11
  586. const m_IPV6_NEXTHOP = 48
  587. const m_IPV6_ORIGDSTADDR = 72
  588. const m_IPV6_PATHMTU = 44
  589. const m_IPV6_PKTINFO = 46
  590. const m_IPV6_PORTRANGE = 14
  591. const m_IPV6_PORTRANGE_DEFAULT = 0
  592. const m_IPV6_PORTRANGE_HIGH = 1
  593. const m_IPV6_PORTRANGE_LOW = 2
  594. const m_IPV6_PREFER_TEMPADDR = 63
  595. const m_IPV6_RECVDSTOPTS = 40
  596. const m_IPV6_RECVFLOWID = 70
  597. const m_IPV6_RECVHOPLIMIT = 37
  598. const m_IPV6_RECVHOPOPTS = 39
  599. const m_IPV6_RECVORIGDSTADDR = "IPV6_ORIGDSTADDR"
  600. const m_IPV6_RECVPATHMTU = 43
  601. const m_IPV6_RECVPKTINFO = 36
  602. const m_IPV6_RECVRSSBUCKETID = 71
  603. const m_IPV6_RECVRTHDR = 38
  604. const m_IPV6_RECVTCLASS = 57
  605. const m_IPV6_RSSBUCKETID = 69
  606. const m_IPV6_RTHDR = 51
  607. const m_IPV6_RTHDRDSTOPTS = 35
  608. const m_IPV6_RTHDR_LOOSE = 0
  609. const m_IPV6_RTHDR_STRICT = 1
  610. const m_IPV6_RTHDR_TYPE_0 = 0
  611. const m_IPV6_SOCKOPT_RESERVED1 = 3
  612. const m_IPV6_TCLASS = 61
  613. const m_IPV6_UNICAST_HOPS = 4
  614. const m_IPV6_USE_MIN_MTU = 42
  615. const m_IPV6_V6ONLY = 27
  616. const m_IPV6_VLAN_PCP = 75
  617. const m_IP_ADD_MEMBERSHIP = 12
  618. const m_IP_ADD_SOURCE_MEMBERSHIP = 70
  619. const m_IP_BINDANY = 24
  620. const m_IP_BLOCK_SOURCE = 72
  621. const m_IP_DEFAULT_MULTICAST_LOOP = 1
  622. const m_IP_DEFAULT_MULTICAST_TTL = 1
  623. const m_IP_DONTFRAG = 67
  624. const m_IP_DROP_MEMBERSHIP = 13
  625. const m_IP_DROP_SOURCE_MEMBERSHIP = 71
  626. const m_IP_DUMMYNET3 = 49
  627. const m_IP_DUMMYNET_CONFIGURE = 60
  628. const m_IP_DUMMYNET_DEL = 61
  629. const m_IP_DUMMYNET_FLUSH = 62
  630. const m_IP_DUMMYNET_GET = 64
  631. const m_IP_FLOWID = 90
  632. const m_IP_FLOWTYPE = 91
  633. const m_IP_FW3 = 48
  634. const m_IP_FW_ADD = 50
  635. const m_IP_FW_DEL = 51
  636. const m_IP_FW_FLUSH = 52
  637. const m_IP_FW_GET = 54
  638. const m_IP_FW_NAT_CFG = 56
  639. const m_IP_FW_NAT_DEL = 57
  640. const m_IP_FW_NAT_GET_CONFIG = 58
  641. const m_IP_FW_NAT_GET_LOG = 59
  642. const m_IP_FW_RESETLOG = 55
  643. const m_IP_FW_TABLE_ADD = 40
  644. const m_IP_FW_TABLE_DEL = 41
  645. const m_IP_FW_TABLE_FLUSH = 42
  646. const m_IP_FW_TABLE_GETSIZE = 43
  647. const m_IP_FW_TABLE_LIST = 44
  648. const m_IP_FW_ZERO = 53
  649. const m_IP_HDRINCL = 2
  650. const m_IP_IPSEC_POLICY = 21
  651. const m_IP_MAX_GROUP_SRC_FILTER = 512
  652. const m_IP_MAX_MEMBERSHIPS = 4095
  653. const m_IP_MAX_SOCK_MUTE_FILTER = 128
  654. const m_IP_MAX_SOCK_SRC_FILTER = 128
  655. const m_IP_MINTTL = 66
  656. const m_IP_MSFILTER = 74
  657. const m_IP_MULTICAST_IF = 9
  658. const m_IP_MULTICAST_LOOP = 11
  659. const m_IP_MULTICAST_TTL = 10
  660. const m_IP_MULTICAST_VIF = 14
  661. const m_IP_ONESBCAST = 23
  662. const m_IP_OPTIONS = 1
  663. const m_IP_ORIGDSTADDR = 27
  664. const m_IP_PORTRANGE = 19
  665. const m_IP_PORTRANGE_DEFAULT = 0
  666. const m_IP_PORTRANGE_HIGH = 1
  667. const m_IP_PORTRANGE_LOW = 2
  668. const m_IP_RECVDSTADDR = 7
  669. const m_IP_RECVFLOWID = 93
  670. const m_IP_RECVIF = 20
  671. const m_IP_RECVOPTS = 5
  672. const m_IP_RECVORIGDSTADDR = "IP_ORIGDSTADDR"
  673. const m_IP_RECVRETOPTS = 6
  674. const m_IP_RECVRSSBUCKETID = 94
  675. const m_IP_RECVTOS = 68
  676. const m_IP_RECVTTL = 65
  677. const m_IP_RETOPTS = 8
  678. const m_IP_RSSBUCKETID = 92
  679. const m_IP_RSVP_OFF = 16
  680. const m_IP_RSVP_ON = 15
  681. const m_IP_RSVP_VIF_OFF = 18
  682. const m_IP_RSVP_VIF_ON = 17
  683. const m_IP_SENDSRCADDR = "IP_RECVDSTADDR"
  684. const m_IP_TOS = 3
  685. const m_IP_TTL = 4
  686. const m_IP_UNBLOCK_SOURCE = 73
  687. const m_IP_VLAN_PCP = 75
  688. const m_KCMP_FILE = 100
  689. const m_KCMP_FILEOBJ = 101
  690. const m_KCMP_FILES = 102
  691. const m_KCMP_SIGHAND = 103
  692. const m_KCMP_VM = 104
  693. const m_LINE_MAX = 2048
  694. const m_LITTLE_ENDIAN = "_LITTLE_ENDIAN"
  695. const m_LLONG_MAX = "__LLONG_MAX"
  696. const m_LLONG_MIN = "__LLONG_MIN"
  697. const m_LOCK_EX = 0x02
  698. const m_LOCK_NB = 0x04
  699. const m_LOCK_SH = 0x01
  700. const m_LOCK_UN = 0x08
  701. const m_LONG_BIT = "__LONG_BIT"
  702. const m_LONG_MAX = "__LONG_MAX"
  703. const m_LONG_MIN = "__LONG_MIN"
  704. const m_LT_OBJDIR = ".libs/"
  705. const m_L_INCR = "SEEK_CUR"
  706. const m_L_SET = "SEEK_SET"
  707. const m_L_XTND = "SEEK_END"
  708. const m_L_ctermid = 1024
  709. const m_L_cuserid = 17
  710. const m_L_tmpnam = 1024
  711. const m_MAX_CANON = 255
  712. const m_MAX_INPUT = 255
  713. const m_MB_LEN_MAX = 6
  714. const m_MCAST_BLOCK_SOURCE = 84
  715. const m_MCAST_EXCLUDE = 2
  716. const m_MCAST_INCLUDE = 1
  717. const m_MCAST_JOIN_GROUP = 80
  718. const m_MCAST_JOIN_SOURCE_GROUP = 82
  719. const m_MCAST_LEAVE_GROUP = 81
  720. const m_MCAST_LEAVE_SOURCE_GROUP = 83
  721. const m_MCAST_UNBLOCK_SOURCE = 85
  722. const m_MCAST_UNDEFINED = 0
  723. const m_MQ_PRIO_MAX = 64
  724. const m_MSG_CMSG_CLOEXEC = 0x00040000
  725. const m_MSG_COMPAT = 0x00008000
  726. const m_MSG_CTRUNC = 0x00000020
  727. const m_MSG_DONTROUTE = 0x00000004
  728. const m_MSG_DONTWAIT = 0x00000080
  729. const m_MSG_EOF = 0x00000100
  730. const m_MSG_EOR = 0x00000008
  731. const m_MSG_NBIO = 0x00004000
  732. const m_MSG_NOSIGNAL = 0x00020000
  733. const m_MSG_NOTIFICATION = 0x00002000
  734. const m_MSG_OOB = 0x00000001
  735. const m_MSG_PEEK = 0x00000002
  736. const m_MSG_TRUNC = 0x00000010
  737. const m_MSG_WAITALL = 0x00000040
  738. const m_MSG_WAITFORONE = 0x00080000
  739. const m_M_AUTHIPDGM = "M_PROTO7"
  740. const m_M_AUTHIPHDR = "M_PROTO4"
  741. const m_M_DECRYPTED = "M_PROTO5"
  742. const m_M_FASTFWD_OURS = "M_PROTO1"
  743. const m_M_FRAGMENTED = "M_PROTO9"
  744. const m_M_IP6_NEXTHOP = "M_PROTO2"
  745. const m_M_IP_NEXTHOP = "M_PROTO2"
  746. const m_M_LOOP = "M_PROTO6"
  747. const m_M_RTALERT_MLD = "M_PROTO8"
  748. const m_M_SKIP_FIREWALL = "M_PROTO3"
  749. const m_NAME_MAX = 255
  750. const m_NDEBUG = 1
  751. const m_NET_RT_DUMP = 1
  752. const m_NET_RT_FLAGS = 2
  753. const m_NET_RT_IFLIST = 3
  754. const m_NET_RT_IFLISTL = 5
  755. const m_NET_RT_IFMALIST = 4
  756. const m_NET_RT_NHGRP = 7
  757. const m_NET_RT_NHOP = 6
  758. const m_NFDBITS = "_NFDBITS"
  759. const m_NGROUPS_MAX = 1023
  760. const m_NL_ARGMAX = 4096
  761. const m_NL_LANGMAX = 31
  762. const m_NL_MSGMAX = 32767
  763. const m_NL_NMAX = 1
  764. const m_NL_SETMAX = 255
  765. const m_NL_TEXTMAX = 2048
  766. const m_OFF_MAX = "__OFF_MAX"
  767. const m_OFF_MIN = "__OFF_MIN"
  768. const m_OPEN_MAX = 64
  769. const m_O_ACCMODE = 0x0003
  770. const m_O_APPEND = 0x0008
  771. const m_O_ASYNC = 0x0040
  772. const m_O_CLOEXEC = 0x00100000
  773. const m_O_CREAT = 0x0200
  774. const m_O_DIRECT = 0x00010000
  775. const m_O_DIRECTORY = 0x00020000
  776. const m_O_DSYNC = 0x01000000
  777. const m_O_EMPTY_PATH = 0x02000000
  778. const m_O_EXCL = 0x0800
  779. const m_O_EXEC = 0x00040000
  780. const m_O_EXLOCK = 0x0020
  781. const m_O_FSYNC = 0x0080
  782. const m_O_NDELAY = "O_NONBLOCK"
  783. const m_O_NOCTTY = 0x8000
  784. const m_O_NOFOLLOW = 0x0100
  785. const m_O_NONBLOCK = 4
  786. const m_O_PATH = 0x00400000
  787. const m_O_RDONLY = 0x0000
  788. const m_O_RDWR = 0x0002
  789. const m_O_RESOLVE_BENEATH = 0x00800000
  790. const m_O_SEARCH = "O_EXEC"
  791. const m_O_SHLOCK = 0x0010
  792. const m_O_SYNC = 0x0080
  793. const m_O_TRUNC = 0x0400
  794. const m_O_TTY_INIT = 0x00080000
  795. const m_O_VERIFY = 0x00200000
  796. const m_O_WRONLY = 0x0001
  797. const m_PACKAGE = "libxcb"
  798. const m_PACKAGE_BUGREPORT = "https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues"
  799. const m_PACKAGE_NAME = "libxcb"
  800. const m_PACKAGE_STRING = "libxcb 1.17.0"
  801. const m_PACKAGE_TARNAME = "libxcb"
  802. const m_PACKAGE_URL = ""
  803. const m_PACKAGE_VERSION = "1.17.0"
  804. const m_PACKAGE_VERSION_MAJOR = 1
  805. const m_PACKAGE_VERSION_MINOR = 17
  806. const m_PACKAGE_VERSION_PATCHLEVEL = 0
  807. const m_PASS_MAX = 128
  808. const m_PATH_MAX = 1024
  809. const m_PDP_ENDIAN = "_PDP_ENDIAN"
  810. const m_PF_APPLETALK = "AF_APPLETALK"
  811. const m_PF_ARP = "AF_ARP"
  812. const m_PF_ATM = "AF_ATM"
  813. const m_PF_BLUETOOTH = "AF_BLUETOOTH"
  814. const m_PF_CCITT = "AF_CCITT"
  815. const m_PF_CHAOS = "AF_CHAOS"
  816. const m_PF_CNT = "AF_CNT"
  817. const m_PF_COIP = "AF_COIP"
  818. const m_PF_DATAKIT = "AF_DATAKIT"
  819. const m_PF_DECnet = "AF_DECnet"
  820. const m_PF_DIVERT = "AF_DIVERT"
  821. const m_PF_DLI = "AF_DLI"
  822. const m_PF_ECMA = "AF_ECMA"
  823. const m_PF_HYLINK = "AF_HYLINK"
  824. const m_PF_IEEE80211 = "AF_IEEE80211"
  825. const m_PF_IMPLINK = "AF_IMPLINK"
  826. const m_PF_INET = "AF_INET"
  827. const m_PF_INET6 = "AF_INET6"
  828. const m_PF_INET6_SDP = "AF_INET6_SDP"
  829. const m_PF_INET_SDP = "AF_INET_SDP"
  830. const m_PF_IPX = "AF_IPX"
  831. const m_PF_ISDN = "AF_ISDN"
  832. const m_PF_ISO = "AF_ISO"
  833. const m_PF_KEY = "pseudo_AF_KEY"
  834. const m_PF_LAT = "AF_LAT"
  835. const m_PF_LINK = "AF_LINK"
  836. const m_PF_LOCAL = "AF_LOCAL"
  837. const m_PF_MAX = "AF_MAX"
  838. const m_PF_NATM = "AF_NATM"
  839. const m_PF_NETBIOS = "AF_NETBIOS"
  840. const m_PF_NETGRAPH = "AF_NETGRAPH"
  841. const m_PF_NETLINK = "AF_NETLINK"
  842. const m_PF_OSI = "AF_ISO"
  843. const m_PF_PIP = "pseudo_AF_PIP"
  844. const m_PF_PUP = "AF_PUP"
  845. const m_PF_ROUTE = "AF_ROUTE"
  846. const m_PF_RTIP = "pseudo_AF_RTIP"
  847. const m_PF_SCLUSTER = "AF_SCLUSTER"
  848. const m_PF_SIP = "AF_SIP"
  849. const m_PF_SLOW = "AF_SLOW"
  850. const m_PF_SNA = "AF_SNA"
  851. const m_PF_UNIX = "PF_LOCAL"
  852. const m_PF_UNSPEC = "AF_UNSPEC"
  853. const m_PF_XTP = "pseudo_AF_XTP"
  854. const m_PIPE_BUF = 512
  855. const m_POLLERR = 0x0008
  856. const m_POLLHUP = 0x0010
  857. const m_POLLIN = 1
  858. const m_POLLINIGNEOF = 0x2000
  859. const m_POLLNVAL = 0x0020
  860. const m_POLLOUT = 4
  861. const m_POLLPRI = 0x0002
  862. const m_POLLRDBAND = 0x0080
  863. const m_POLLRDHUP = 0x4000
  864. const m_POLLRDNORM = 0x0040
  865. const m_POLLWRBAND = 0x0100
  866. const m_POLLWRNORM = "POLLOUT"
  867. const m_POSIX_FADV_DONTNEED = 4
  868. const m_POSIX_FADV_NOREUSE = 5
  869. const m_POSIX_FADV_NORMAL = 0
  870. const m_POSIX_FADV_RANDOM = 1
  871. const m_POSIX_FADV_SEQUENTIAL = 2
  872. const m_POSIX_FADV_WILLNEED = 3
  873. const m_PRU_FLUSH_RD = "SHUT_RD"
  874. const m_PRU_FLUSH_RDWR = "SHUT_RDWR"
  875. const m_PRU_FLUSH_WR = "SHUT_WR"
  876. const m_PTHREAD_CANCEL_ASYNCHRONOUS = 2
  877. const m_PTHREAD_CANCEL_DEFERRED = 0
  878. const m_PTHREAD_CANCEL_DISABLE = 1
  879. const m_PTHREAD_CANCEL_ENABLE = 0
  880. const m_PTHREAD_COND_INITIALIZER = "NULL"
  881. const m_PTHREAD_CREATE_DETACHED = "PTHREAD_DETACHED"
  882. const m_PTHREAD_CREATE_JOINABLE = 0
  883. const m_PTHREAD_DESTRUCTOR_ITERATIONS = 4
  884. const m_PTHREAD_DETACHED = 0x1
  885. const m_PTHREAD_DONE_INIT = 1
  886. const m_PTHREAD_EXPLICIT_SCHED = 0
  887. const m_PTHREAD_INHERIT_SCHED = 0x4
  888. const m_PTHREAD_KEYS_MAX = 256
  889. const m_PTHREAD_MUTEX_DEFAULT = "PTHREAD_MUTEX_ERRORCHECK"
  890. const m_PTHREAD_MUTEX_INITIALIZER = "NULL"
  891. const m_PTHREAD_MUTEX_ROBUST = 1
  892. const m_PTHREAD_MUTEX_STALLED = 0
  893. const m_PTHREAD_NEEDS_INIT = 0
  894. const m_PTHREAD_NOFLOAT = 0x8
  895. const m_PTHREAD_PRIO_INHERIT = 1
  896. const m_PTHREAD_PRIO_NONE = 0
  897. const m_PTHREAD_PRIO_PROTECT = 2
  898. const m_PTHREAD_PROCESS_PRIVATE = 0
  899. const m_PTHREAD_PROCESS_SHARED = 1
  900. const m_PTHREAD_RWLOCK_INITIALIZER = "NULL"
  901. const m_PTHREAD_SCOPE_PROCESS = 0
  902. const m_PTHREAD_SCOPE_SYSTEM = 0x2
  903. const m_PTHREAD_STACK_MIN = "__MINSIGSTKSZ"
  904. const m_PTHREAD_THREADS_MAX = "__ULONG_MAX"
  905. const m_PTRDIFF_MAX = "INT64_MAX"
  906. const m_PTRDIFF_MIN = "INT64_MIN"
  907. const m_P_tmpdir = "/tmp/"
  908. const m_QUAD_MAX = "__QUAD_MAX"
  909. const m_QUAD_MIN = "__QUAD_MIN"
  910. const m_RAND_MAX = 0x7fffffff
  911. const m_RE_DUP_MAX = 255
  912. const m_RFTSIGMASK = 0xFF
  913. const m_RFTSIGSHIFT = 20
  914. const m_R_OK = 0x04
  915. const m_SCHAR_MAX = "__SCHAR_MAX"
  916. const m_SCHAR_MIN = "__SCHAR_MIN"
  917. const m_SCHED_FIFO = 1
  918. const m_SCHED_OTHER = 2
  919. const m_SCHED_RR = 3
  920. const m_SCM_BINTIME = 0x04
  921. const m_SCM_CREDS = 0x03
  922. const m_SCM_CREDS2 = 0x08
  923. const m_SCM_MONOTONIC = 0x06
  924. const m_SCM_REALTIME = 0x05
  925. const m_SCM_RIGHTS = 1
  926. const m_SCM_TIMESTAMP = 0x02
  927. const m_SCM_TIME_INFO = 0x07
  928. const m_SEEK_CUR = 1
  929. const m_SEEK_DATA = 3
  930. const m_SEEK_END = 2
  931. const m_SEEK_HOLE = 4
  932. const m_SEEK_SET = 0
  933. const m_SF_MNOWAIT = 0x00000002
  934. const m_SF_NOCACHE = 0x00000010
  935. const m_SF_NODISKIO = 0x00000001
  936. const m_SF_SYNC = 0x00000004
  937. const m_SF_USER_READAHEAD = 0x00000008
  938. const m_SHRT_MAX = "__SHRT_MAX"
  939. const m_SHRT_MIN = "__SHRT_MIN"
  940. const m_SHUT_RD = 0
  941. const m_SHUT_RDWR = 2
  942. const m_SHUT_WR = 1
  943. const m_SIG_ATOMIC_MAX = "INT64_MAX"
  944. const m_SIG_ATOMIC_MIN = "INT64_MIN"
  945. const m_SIZE_MAX = "UINT64_MAX"
  946. const m_SIZE_T_MAX = "__SIZE_T_MAX"
  947. const m_SOCK_CLOEXEC = 0x10000000
  948. const m_SOCK_DGRAM = 2
  949. const m_SOCK_MAXADDRLEN = 255
  950. const m_SOCK_NONBLOCK = 0x20000000
  951. const m_SOCK_RAW = 3
  952. const m_SOCK_RDM = 4
  953. const m_SOCK_SEQPACKET = 5
  954. const m_SOCK_STREAM = 1
  955. const m_SOL_SOCKET = 65535
  956. const m_SOMAXCONN = 128
  957. const m_SO_ACCEPTCONN = 0x00000002
  958. const m_SO_ACCEPTFILTER = 0x00001000
  959. const m_SO_BINTIME = 0x00002000
  960. const m_SO_BROADCAST = 0x00000020
  961. const m_SO_DEBUG = 0x00000001
  962. const m_SO_DOMAIN = 0x1019
  963. const m_SO_DONTROUTE = 0x00000010
  964. const m_SO_ERROR = 0x1007
  965. const m_SO_KEEPALIVE = 0x00000008
  966. const m_SO_LABEL = 0x1009
  967. const m_SO_LINGER = 0x00000080
  968. const m_SO_LISTENINCQLEN = 0x1013
  969. const m_SO_LISTENQLEN = 0x1012
  970. const m_SO_LISTENQLIMIT = 0x1011
  971. const m_SO_MAX_PACING_RATE = 0x1018
  972. const m_SO_NOSIGPIPE = 0x00000800
  973. const m_SO_NO_DDP = 0x00008000
  974. const m_SO_NO_OFFLOAD = 0x00004000
  975. const m_SO_OOBINLINE = 0x00000100
  976. const m_SO_PEERLABEL = 0x1010
  977. const m_SO_PROTOCOL = 0x1016
  978. const m_SO_PROTOTYPE = "SO_PROTOCOL"
  979. const m_SO_RCVBUF = 0x1002
  980. const m_SO_RCVLOWAT = 0x1004
  981. const m_SO_RCVTIMEO = 0x1006
  982. const m_SO_RERROR = 0x00020000
  983. const m_SO_REUSEADDR = 0x00000004
  984. const m_SO_REUSEPORT = 0x00000200
  985. const m_SO_REUSEPORT_LB = 0x00010000
  986. const m_SO_SETFIB = 0x1014
  987. const m_SO_SNDBUF = 0x1001
  988. const m_SO_SNDLOWAT = 0x1003
  989. const m_SO_SNDTIMEO = 0x1005
  990. const m_SO_SPLICE = 0x1023
  991. const m_SO_TIMESTAMP = 0x00000400
  992. const m_SO_TS_BINTIME = 1
  993. const m_SO_TS_CLOCK = 0x1017
  994. const m_SO_TS_CLOCK_MAX = "SO_TS_MONOTONIC"
  995. const m_SO_TS_DEFAULT = "SO_TS_REALTIME_MICRO"
  996. const m_SO_TS_MONOTONIC = 3
  997. const m_SO_TS_REALTIME = 2
  998. const m_SO_TS_REALTIME_MICRO = 0
  999. const m_SO_TYPE = 0x1008
  1000. const m_SO_USELOOPBACK = 0x00000040
  1001. const m_SO_USER_COOKIE = 0x1015
  1002. const m_SO_VENDOR = 0x80000000
  1003. const m_SPACECTL_DEALLOC = 1
  1004. const m_SPACECTL_F_SUPPORTED = 0
  1005. const m_SSIZE_MAX = "__SSIZE_MAX"
  1006. const m_STDC_HEADERS = 1
  1007. const m_STDERR_FILENO = 2
  1008. const m_STDIN_FILENO = 0
  1009. const m_STDOUT_FILENO = 1
  1010. const m_ST_INFO_HW = 0x0001
  1011. const m_ST_INFO_HW_HPREC = 0x0002
  1012. const m_SWAPOFF_FORCE = 0x00000001
  1013. const m_TIMER_ABSTIME = 0x1
  1014. const m_TIMER_RELTIME = 0x0
  1015. const m_TIME_MONOTONIC = 2
  1016. const m_TIME_UTC = 1
  1017. const m_TMP_MAX = 308915776
  1018. const m_UCHAR_MAX = "__UCHAR_MAX"
  1019. const m_UID_MAX = "UINT_MAX"
  1020. const m_UINT16_MAX = 0xffff
  1021. const m_UINT32_MAX = 0xffffffff
  1022. const m_UINT64_MAX = 0xffffffffffffffff
  1023. const m_UINT8_MAX = 0xff
  1024. const m_UINTMAX_MAX = "UINT64_MAX"
  1025. const m_UINTPTR_MAX = "UINT64_MAX"
  1026. const m_UINT_FAST16_MAX = "UINT32_MAX"
  1027. const m_UINT_FAST32_MAX = "UINT32_MAX"
  1028. const m_UINT_FAST64_MAX = "UINT64_MAX"
  1029. const m_UINT_FAST8_MAX = "UINT32_MAX"
  1030. const m_UINT_LEAST16_MAX = "UINT16_MAX"
  1031. const m_UINT_LEAST32_MAX = "UINT32_MAX"
  1032. const m_UINT_LEAST64_MAX = "UINT64_MAX"
  1033. const m_UINT_LEAST8_MAX = "UINT8_MAX"
  1034. const m_UINT_MAX = "__UINT_MAX"
  1035. const m_ULLONG_MAX = "__ULLONG_MAX"
  1036. const m_ULONG_MAX = "__ULONG_MAX"
  1037. const m_UQUAD_MAX = "__UQUAD_MAX"
  1038. const m_USE_POLL = 1
  1039. const m_USHRT_MAX = "__USHRT_MAX"
  1040. const m_VERSION = "1.17.0"
  1041. const m_WCHAR_MAX = "__WCHAR_MAX"
  1042. const m_WCHAR_MIN = "__WCHAR_MIN"
  1043. const m_WINT_MAX = "INT32_MAX"
  1044. const m_WINT_MIN = "INT32_MIN"
  1045. const m_WORD_BIT = "__WORD_BIT"
  1046. const m_W_OK = 0x02
  1047. const m_XCB_ACCESS = 10
  1048. const m_XCB_ALLOC = 11
  1049. const m_XCB_ALLOC_COLOR = 84
  1050. const m_XCB_ALLOC_COLOR_CELLS = 86
  1051. const m_XCB_ALLOC_COLOR_PLANES = 87
  1052. const m_XCB_ALLOC_NAMED_COLOR = 85
  1053. const m_XCB_ALLOW_EVENTS = 35
  1054. const m_XCB_ATOM = 5
  1055. const m_XCB_BELL = 104
  1056. const m_XCB_BIGREQUESTS_MAJOR_VERSION = 0
  1057. const m_XCB_BIGREQUESTS_MINOR_VERSION = 0
  1058. const m_XCB_BIG_REQUESTS_ENABLE = 0
  1059. const m_XCB_BUTTON_PRESS = 4
  1060. const m_XCB_BUTTON_RELEASE = 5
  1061. const m_XCB_CHANGE_ACTIVE_POINTER_GRAB = 30
  1062. const m_XCB_CHANGE_GC = 56
  1063. const m_XCB_CHANGE_HOSTS = 109
  1064. const m_XCB_CHANGE_KEYBOARD_CONTROL = 102
  1065. const m_XCB_CHANGE_KEYBOARD_MAPPING = 100
  1066. const m_XCB_CHANGE_POINTER_CONTROL = 105
  1067. const m_XCB_CHANGE_PROPERTY = 18
  1068. const m_XCB_CHANGE_SAVE_SET = 6
  1069. const m_XCB_CHANGE_WINDOW_ATTRIBUTES = 2
  1070. const m_XCB_CIRCULATE_NOTIFY = 26
  1071. const m_XCB_CIRCULATE_REQUEST = 27
  1072. const m_XCB_CIRCULATE_WINDOW = 13
  1073. const m_XCB_CLEAR_AREA = 61
  1074. const m_XCB_CLIENT_MESSAGE = 33
  1075. const m_XCB_CLOSE_FONT = 46
  1076. const m_XCB_COLORMAP = 12
  1077. const m_XCB_COLORMAP_NOTIFY = 32
  1078. const m_XCB_CONFIGURE_NOTIFY = 22
  1079. const m_XCB_CONFIGURE_REQUEST = 23
  1080. const m_XCB_CONFIGURE_WINDOW = 12
  1081. const m_XCB_CONN_CLOSED_EXT_NOTSUPPORTED = 2
  1082. const m_XCB_CONN_CLOSED_FDPASSING_FAILED = 7
  1083. const m_XCB_CONN_CLOSED_INVALID_SCREEN = 6
  1084. const m_XCB_CONN_CLOSED_MEM_INSUFFICIENT = 3
  1085. const m_XCB_CONN_CLOSED_PARSE_ERR = 5
  1086. const m_XCB_CONN_CLOSED_REQ_LEN_EXCEED = 4
  1087. const m_XCB_CONN_ERROR = 1
  1088. const m_XCB_CONVERT_SELECTION = 24
  1089. const m_XCB_COPY_AREA = 62
  1090. const m_XCB_COPY_COLORMAP_AND_FREE = 80
  1091. const m_XCB_COPY_FROM_PARENT = 0
  1092. const m_XCB_COPY_GC = 57
  1093. const m_XCB_COPY_PLANE = 63
  1094. const m_XCB_CREATE_COLORMAP = 78
  1095. const m_XCB_CREATE_CURSOR = 93
  1096. const m_XCB_CREATE_GC = 55
  1097. const m_XCB_CREATE_GLYPH_CURSOR = 94
  1098. const m_XCB_CREATE_NOTIFY = 16
  1099. const m_XCB_CREATE_PIXMAP = 53
  1100. const m_XCB_CREATE_WINDOW = 1
  1101. const m_XCB_CURRENT_TIME = 0
  1102. const m_XCB_CURSOR = 6
  1103. const m_XCB_DELETE_PROPERTY = 19
  1104. const m_XCB_DESTROY_NOTIFY = 17
  1105. const m_XCB_DESTROY_SUBWINDOWS = 5
  1106. const m_XCB_DESTROY_WINDOW = 4
  1107. const m_XCB_DRAWABLE = 9
  1108. const m_XCB_ENTER_NOTIFY = 7
  1109. const m_XCB_EXPOSE = 12
  1110. const m_XCB_FILL_POLY = 69
  1111. const m_XCB_FOCUS_IN = 9
  1112. const m_XCB_FOCUS_OUT = 10
  1113. const m_XCB_FONT = 7
  1114. const m_XCB_FORCE_SCREEN_SAVER = 115
  1115. const m_XCB_FREE_COLORMAP = 79
  1116. const m_XCB_FREE_COLORS = 88
  1117. const m_XCB_FREE_CURSOR = 95
  1118. const m_XCB_FREE_GC = 60
  1119. const m_XCB_FREE_PIXMAP = 54
  1120. const m_XCB_GET_ATOM_NAME = 17
  1121. const m_XCB_GET_FONT_PATH = 52
  1122. const m_XCB_GET_GEOMETRY = 14
  1123. const m_XCB_GET_IMAGE = 73
  1124. const m_XCB_GET_INPUT_FOCUS = 43
  1125. const m_XCB_GET_KEYBOARD_CONTROL = 103
  1126. const m_XCB_GET_KEYBOARD_MAPPING = 101
  1127. const m_XCB_GET_MODIFIER_MAPPING = 119
  1128. const m_XCB_GET_MOTION_EVENTS = 39
  1129. const m_XCB_GET_POINTER_CONTROL = 106
  1130. const m_XCB_GET_POINTER_MAPPING = 117
  1131. const m_XCB_GET_PROPERTY = 20
  1132. const m_XCB_GET_SCREEN_SAVER = 108
  1133. const m_XCB_GET_SELECTION_OWNER = 23
  1134. const m_XCB_GET_WINDOW_ATTRIBUTES = 3
  1135. const m_XCB_GE_GENERIC = 35
  1136. const m_XCB_GRAB_BUTTON = 28
  1137. const m_XCB_GRAB_KEY = 33
  1138. const m_XCB_GRAB_KEYBOARD = 31
  1139. const m_XCB_GRAB_POINTER = 26
  1140. const m_XCB_GRAB_SERVER = 36
  1141. const m_XCB_GRAPHICS_EXPOSURE = 13
  1142. const m_XCB_GRAVITY_NOTIFY = 24
  1143. const m_XCB_G_CONTEXT = 13
  1144. const m_XCB_ID_CHOICE = 14
  1145. const m_XCB_IMAGE_TEXT_16 = 77
  1146. const m_XCB_IMAGE_TEXT_8 = 76
  1147. const m_XCB_IMPLEMENTATION = 17
  1148. const m_XCB_INSTALL_COLORMAP = 81
  1149. const m_XCB_INTERN_ATOM = 16
  1150. const m_XCB_KEYMAP_NOTIFY = 11
  1151. const m_XCB_KEY_PRESS = 2
  1152. const m_XCB_KEY_RELEASE = 3
  1153. const m_XCB_KILL_CLIENT = 113
  1154. const m_XCB_LEAVE_NOTIFY = 8
  1155. const m_XCB_LENGTH = 16
  1156. const m_XCB_LIST_EXTENSIONS = 99
  1157. const m_XCB_LIST_FONTS = 49
  1158. const m_XCB_LIST_FONTS_WITH_INFO = 50
  1159. const m_XCB_LIST_HOSTS = 110
  1160. const m_XCB_LIST_INSTALLED_COLORMAPS = 83
  1161. const m_XCB_LIST_PROPERTIES = 21
  1162. const m_XCB_LOOKUP_COLOR = 92
  1163. const m_XCB_MAPPING_NOTIFY = 34
  1164. const m_XCB_MAP_NOTIFY = 19
  1165. const m_XCB_MAP_REQUEST = 20
  1166. const m_XCB_MAP_SUBWINDOWS = 9
  1167. const m_XCB_MAP_WINDOW = 8
  1168. const m_XCB_MATCH = 8
  1169. const m_XCB_MAX_PASS_FD = 16
  1170. const m_XCB_MOTION_NOTIFY = 6
  1171. const m_XCB_NAME = 15
  1172. const m_XCB_NONE = 0
  1173. const m_XCB_NO_EXPOSURE = 14
  1174. const m_XCB_NO_OPERATION = 127
  1175. const m_XCB_NO_SYMBOL = 0
  1176. const m_XCB_OPEN_FONT = 45
  1177. const m_XCB_PIXMAP = 4
  1178. const m_XCB_POLY_ARC = 68
  1179. const m_XCB_POLY_FILL_ARC = 71
  1180. const m_XCB_POLY_FILL_RECTANGLE = 70
  1181. const m_XCB_POLY_LINE = 65
  1182. const m_XCB_POLY_POINT = 64
  1183. const m_XCB_POLY_RECTANGLE = 67
  1184. const m_XCB_POLY_SEGMENT = 66
  1185. const m_XCB_POLY_TEXT_16 = 75
  1186. const m_XCB_POLY_TEXT_8 = 74
  1187. const m_XCB_PROPERTY_NOTIFY = 28
  1188. const m_XCB_PUT_IMAGE = 72
  1189. const m_XCB_QUERY_BEST_SIZE = 97
  1190. const m_XCB_QUERY_COLORS = 91
  1191. const m_XCB_QUERY_EXTENSION = 98
  1192. const m_XCB_QUERY_FONT = 47
  1193. const m_XCB_QUERY_KEYMAP = 44
  1194. const m_XCB_QUERY_POINTER = 38
  1195. const m_XCB_QUERY_TEXT_EXTENTS = 48
  1196. const m_XCB_QUERY_TREE = 15
  1197. const m_XCB_QUEUE_BUFFER_SIZE = 16384
  1198. const m_XCB_RECOLOR_CURSOR = 96
  1199. const m_XCB_REPARENT_NOTIFY = 21
  1200. const m_XCB_REPARENT_WINDOW = 7
  1201. const m_XCB_REQUEST = 1
  1202. const m_XCB_RESIZE_REQUEST = 25
  1203. const m_XCB_ROTATE_PROPERTIES = 114
  1204. const m_XCB_SELECTION_CLEAR = 29
  1205. const m_XCB_SELECTION_NOTIFY = 31
  1206. const m_XCB_SELECTION_REQUEST = 30
  1207. const m_XCB_SEND_EVENT = 25
  1208. const m_XCB_SET_ACCESS_CONTROL = 111
  1209. const m_XCB_SET_CLIP_RECTANGLES = 59
  1210. const m_XCB_SET_CLOSE_DOWN_MODE = 112
  1211. const m_XCB_SET_DASHES = 58
  1212. const m_XCB_SET_FONT_PATH = 51
  1213. const m_XCB_SET_INPUT_FOCUS = 42
  1214. const m_XCB_SET_MODIFIER_MAPPING = 118
  1215. const m_XCB_SET_POINTER_MAPPING = 116
  1216. const m_XCB_SET_SCREEN_SAVER = 107
  1217. const m_XCB_SET_SELECTION_OWNER = 22
  1218. const m_XCB_STORE_COLORS = 89
  1219. const m_XCB_STORE_NAMED_COLOR = 90
  1220. const m_XCB_TRANSLATE_COORDINATES = 40
  1221. const m_XCB_UNGRAB_BUTTON = 29
  1222. const m_XCB_UNGRAB_KEY = 34
  1223. const m_XCB_UNGRAB_KEYBOARD = 32
  1224. const m_XCB_UNGRAB_POINTER = 27
  1225. const m_XCB_UNGRAB_SERVER = 37
  1226. const m_XCB_UNINSTALL_COLORMAP = 82
  1227. const m_XCB_UNMAP_NOTIFY = 18
  1228. const m_XCB_UNMAP_SUBWINDOWS = 11
  1229. const m_XCB_UNMAP_WINDOW = 10
  1230. const m_XCB_VALUE = 2
  1231. const m_XCB_VISIBILITY_NOTIFY = 15
  1232. const m_XCB_WARP_POINTER = 41
  1233. const m_XCB_WINDOW = 3
  1234. const m_X_OK = 0x01
  1235. const m_X_PROTOCOL = 11
  1236. const m_X_PROTOCOL_REVISION = 0
  1237. const m_X_TCP_PORT = 6000
  1238. const m__ALL_SOURCE = 1
  1239. const m__BYTE_ORDER = "__BYTE_ORDER__"
  1240. const m__CS_PATH = 1
  1241. const m__CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2
  1242. const m__CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3
  1243. const m__CS_POSIX_V6_ILP32_OFF32_LIBS = 4
  1244. const m__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5
  1245. const m__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6
  1246. const m__CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7
  1247. const m__CS_POSIX_V6_LP64_OFF64_CFLAGS = 8
  1248. const m__CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9
  1249. const m__CS_POSIX_V6_LP64_OFF64_LIBS = 10
  1250. const m__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11
  1251. const m__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12
  1252. const m__CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13
  1253. const m__CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14
  1254. const m__DARWIN_C_SOURCE = 1
  1255. const m__GNU_SOURCE = 1
  1256. const m__HPUX_ALT_XOPEN_SOCKET_API = 1
  1257. const m__IOFBF = 0
  1258. const m__IOLBF = 1
  1259. const m__IONBF = 2
  1260. const m__LP64 = 1
  1261. const m__NCPUBITS = "_BITSET_BITS"
  1262. const m__NETBSD_SOURCE = 1
  1263. const m__OPENBSD_SOURCE = 1
  1264. const m__PC_ACL_EXTENDED = 59
  1265. const m__PC_ACL_NFS4 = 64
  1266. const m__PC_ACL_PATH_MAX = 60
  1267. const m__PC_ALLOC_SIZE_MIN = 10
  1268. const m__PC_ASYNC_IO = 53
  1269. const m__PC_CAP_PRESENT = 61
  1270. const m__PC_CHOWN_RESTRICTED = 7
  1271. const m__PC_DEALLOC_PRESENT = 65
  1272. const m__PC_FILESIZEBITS = 12
  1273. const m__PC_INF_PRESENT = 62
  1274. const m__PC_LINK_MAX = 1
  1275. const m__PC_MAC_PRESENT = 63
  1276. const m__PC_MAX_CANON = 2
  1277. const m__PC_MAX_INPUT = 3
  1278. const m__PC_MIN_HOLE_SIZE = 21
  1279. const m__PC_NAME_MAX = 4
  1280. const m__PC_NO_TRUNC = 8
  1281. const m__PC_PATH_MAX = 5
  1282. const m__PC_PIPE_BUF = 6
  1283. const m__PC_PRIO_IO = 54
  1284. const m__PC_REC_INCR_XFER_SIZE = 14
  1285. const m__PC_REC_MAX_XFER_SIZE = 15
  1286. const m__PC_REC_MIN_XFER_SIZE = 16
  1287. const m__PC_REC_XFER_ALIGN = 17
  1288. const m__PC_SYMLINK_MAX = 18
  1289. const m__PC_SYNC_IO = 55
  1290. const m__PC_VDISABLE = 9
  1291. const m__PDP_ENDIAN = "__ORDER_PDP_ENDIAN__"
  1292. const m__POSIX2_BC_BASE_MAX = 99
  1293. const m__POSIX2_BC_DIM_MAX = 2048
  1294. const m__POSIX2_BC_SCALE_MAX = 99
  1295. const m__POSIX2_BC_STRING_MAX = 1000
  1296. const m__POSIX2_CHARCLASS_NAME_MAX = 14
  1297. const m__POSIX2_CHAR_TERM = 1
  1298. const m__POSIX2_COLL_WEIGHTS_MAX = 2
  1299. const m__POSIX2_C_BIND = 200112
  1300. const m__POSIX2_EQUIV_CLASS_MAX = 2
  1301. const m__POSIX2_EXPR_NEST_MAX = 32
  1302. const m__POSIX2_FORT_RUN = 200112
  1303. const m__POSIX2_LINE_MAX = 2048
  1304. const m__POSIX2_RE_DUP_MAX = 255
  1305. const m__POSIX2_UPE = 200112
  1306. const m__POSIX2_VERSION = 199212
  1307. const m__POSIX_ADVISORY_INFO = 200112
  1308. const m__POSIX_AIO_LISTIO_MAX = 2
  1309. const m__POSIX_AIO_MAX = 1
  1310. const m__POSIX_ARG_MAX = 4096
  1311. const m__POSIX_ASYNCHRONOUS_IO = 200112
  1312. const m__POSIX_BARRIERS = 200112
  1313. const m__POSIX_CHILD_MAX = 25
  1314. const m__POSIX_CHOWN_RESTRICTED = 1
  1315. const m__POSIX_CLOCKRES_MIN = 20000000
  1316. const m__POSIX_CPUTIME = 200112
  1317. const m__POSIX_DELAYTIMER_MAX = 32
  1318. const m__POSIX_FSYNC = 200112
  1319. const m__POSIX_HOST_NAME_MAX = 255
  1320. const m__POSIX_IPV6 = 0
  1321. const m__POSIX_JOB_CONTROL = 1
  1322. const m__POSIX_LINK_MAX = 8
  1323. const m__POSIX_LOGIN_NAME_MAX = 9
  1324. const m__POSIX_MAPPED_FILES = 200112
  1325. const m__POSIX_MAX_CANON = 255
  1326. const m__POSIX_MAX_INPUT = 255
  1327. const m__POSIX_MEMLOCK_RANGE = 200112
  1328. const m__POSIX_MEMORY_PROTECTION = 200112
  1329. const m__POSIX_MESSAGE_PASSING = 200112
  1330. const m__POSIX_MONOTONIC_CLOCK = 200112
  1331. const m__POSIX_MQ_OPEN_MAX = 8
  1332. const m__POSIX_MQ_PRIO_MAX = 32
  1333. const m__POSIX_NAME_MAX = 14
  1334. const m__POSIX_NGROUPS_MAX = 8
  1335. const m__POSIX_NO_TRUNC = 1
  1336. const m__POSIX_OPEN_MAX = 20
  1337. const m__POSIX_PATH_MAX = 256
  1338. const m__POSIX_PIPE_BUF = 512
  1339. const m__POSIX_PRIORITY_SCHEDULING = 0
  1340. const m__POSIX_PTHREAD_SEMANTICS = 1
  1341. const m__POSIX_RAW_SOCKETS = 200112
  1342. const m__POSIX_READER_WRITER_LOCKS = 200112
  1343. const m__POSIX_REALTIME_SIGNALS = 200112
  1344. const m__POSIX_REGEXP = 1
  1345. const m__POSIX_RE_DUP_MAX = "_POSIX2_RE_DUP_MAX"
  1346. const m__POSIX_RTSIG_MAX = 8
  1347. const m__POSIX_SEMAPHORES = 200112
  1348. const m__POSIX_SEM_NSEMS_MAX = 256
  1349. const m__POSIX_SEM_VALUE_MAX = 32767
  1350. const m__POSIX_SHARED_MEMORY_OBJECTS = 200112
  1351. const m__POSIX_SHELL = 1
  1352. const m__POSIX_SIGQUEUE_MAX = 32
  1353. const m__POSIX_SPAWN = 200112
  1354. const m__POSIX_SPIN_LOCKS = 200112
  1355. const m__POSIX_SSIZE_MAX = 32767
  1356. const m__POSIX_SS_REPL_MAX = 4
  1357. const m__POSIX_STREAM_MAX = 8
  1358. const m__POSIX_SYMLINK_MAX = 255
  1359. const m__POSIX_SYMLOOP_MAX = 8
  1360. const m__POSIX_THREADS = 200112
  1361. const m__POSIX_THREAD_ATTR_STACKADDR = 200112
  1362. const m__POSIX_THREAD_ATTR_STACKSIZE = 200112
  1363. const m__POSIX_THREAD_CPUTIME = 200112
  1364. const m__POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
  1365. const m__POSIX_THREAD_KEYS_MAX = 128
  1366. const m__POSIX_THREAD_PRIORITY_SCHEDULING = 200112
  1367. const m__POSIX_THREAD_PRIO_INHERIT = 200112
  1368. const m__POSIX_THREAD_PRIO_PROTECT = 200112
  1369. const m__POSIX_THREAD_PROCESS_SHARED = 200112
  1370. const m__POSIX_THREAD_THREADS_MAX = 64
  1371. const m__POSIX_TIMEOUTS = 200112
  1372. const m__POSIX_TIMERS = 200112
  1373. const m__POSIX_TIMER_MAX = 32
  1374. const m__POSIX_TRACE_EVENT_NAME_MAX = 30
  1375. const m__POSIX_TRACE_NAME_MAX = 8
  1376. const m__POSIX_TRACE_SYS_MAX = 8
  1377. const m__POSIX_TRACE_USER_EVENT_MAX = 32
  1378. const m__POSIX_TTY_NAME_MAX = 9
  1379. const m__POSIX_TZNAME_MAX = 6
  1380. const m__POSIX_VDISABLE = 0xff
  1381. const m__POSIX_VERSION = 200112
  1382. const m__QUAD_HIGHWORD = 1
  1383. const m__QUAD_LOWWORD = 0
  1384. const m__SC_2_CHAR_TERM = 20
  1385. const m__SC_2_C_BIND = 18
  1386. const m__SC_2_C_DEV = 19
  1387. const m__SC_2_FORT_DEV = 21
  1388. const m__SC_2_FORT_RUN = 22
  1389. const m__SC_2_LOCALEDEF = 23
  1390. const m__SC_2_PBS = 59
  1391. const m__SC_2_PBS_ACCOUNTING = 60
  1392. const m__SC_2_PBS_CHECKPOINT = 61
  1393. const m__SC_2_PBS_LOCATE = 62
  1394. const m__SC_2_PBS_MESSAGE = 63
  1395. const m__SC_2_PBS_TRACK = 64
  1396. const m__SC_2_SW_DEV = 24
  1397. const m__SC_2_UPE = 25
  1398. const m__SC_2_VERSION = 17
  1399. const m__SC_ADVISORY_INFO = 65
  1400. const m__SC_AIO_LISTIO_MAX = 42
  1401. const m__SC_AIO_MAX = 43
  1402. const m__SC_AIO_PRIO_DELTA_MAX = 44
  1403. const m__SC_ARG_MAX = 1
  1404. const m__SC_ASYNCHRONOUS_IO = 28
  1405. const m__SC_ATEXIT_MAX = 107
  1406. const m__SC_BARRIERS = 66
  1407. const m__SC_BC_BASE_MAX = 9
  1408. const m__SC_BC_DIM_MAX = 10
  1409. const m__SC_BC_SCALE_MAX = 11
  1410. const m__SC_BC_STRING_MAX = 12
  1411. const m__SC_CHILD_MAX = 2
  1412. const m__SC_CLK_TCK = 3
  1413. const m__SC_CLOCK_SELECTION = 67
  1414. const m__SC_COLL_WEIGHTS_MAX = 13
  1415. const m__SC_CPUSET_SIZE = 122
  1416. const m__SC_CPUTIME = 68
  1417. const m__SC_DELAYTIMER_MAX = 45
  1418. const m__SC_EXPR_NEST_MAX = 14
  1419. const m__SC_FILE_LOCKING = 69
  1420. const m__SC_FSYNC = 38
  1421. const m__SC_GETGR_R_SIZE_MAX = 70
  1422. const m__SC_GETPW_R_SIZE_MAX = 71
  1423. const m__SC_HOST_NAME_MAX = 72
  1424. const m__SC_IOV_MAX = 56
  1425. const m__SC_IPV6 = 118
  1426. const m__SC_JOB_CONTROL = 6
  1427. const m__SC_LINE_MAX = 15
  1428. const m__SC_LOGIN_NAME_MAX = 73
  1429. const m__SC_MAPPED_FILES = 29
  1430. const m__SC_MEMLOCK = 30
  1431. const m__SC_MEMLOCK_RANGE = 31
  1432. const m__SC_MEMORY_PROTECTION = 32
  1433. const m__SC_MESSAGE_PASSING = 33
  1434. const m__SC_MONOTONIC_CLOCK = 74
  1435. const m__SC_MQ_OPEN_MAX = 46
  1436. const m__SC_MQ_PRIO_MAX = 75
  1437. const m__SC_NGROUPS_MAX = 4
  1438. const m__SC_NPROCESSORS_CONF = 57
  1439. const m__SC_NPROCESSORS_ONLN = 58
  1440. const m__SC_OPEN_MAX = 5
  1441. const m__SC_PAGESIZE = 47
  1442. const m__SC_PAGE_SIZE = "_SC_PAGESIZE"
  1443. const m__SC_PHYS_PAGES = 121
  1444. const m__SC_PRIORITIZED_IO = 34
  1445. const m__SC_PRIORITY_SCHEDULING = 35
  1446. const m__SC_RAW_SOCKETS = 119
  1447. const m__SC_READER_WRITER_LOCKS = 76
  1448. const m__SC_REALTIME_SIGNALS = 36
  1449. const m__SC_REGEXP = 77
  1450. const m__SC_RE_DUP_MAX = 16
  1451. const m__SC_RTSIG_MAX = 48
  1452. const m__SC_SAVED_IDS = 7
  1453. const m__SC_SEMAPHORES = 37
  1454. const m__SC_SEM_NSEMS_MAX = 49
  1455. const m__SC_SEM_VALUE_MAX = 50
  1456. const m__SC_SHARED_MEMORY_OBJECTS = 39
  1457. const m__SC_SHELL = 78
  1458. const m__SC_SIGQUEUE_MAX = 51
  1459. const m__SC_SPAWN = 79
  1460. const m__SC_SPIN_LOCKS = 80
  1461. const m__SC_SPORADIC_SERVER = 81
  1462. const m__SC_STREAM_MAX = 26
  1463. const m__SC_SYMLOOP_MAX = 120
  1464. const m__SC_SYNCHRONIZED_IO = 40
  1465. const m__SC_THREADS = 96
  1466. const m__SC_THREAD_ATTR_STACKADDR = 82
  1467. const m__SC_THREAD_ATTR_STACKSIZE = 83
  1468. const m__SC_THREAD_CPUTIME = 84
  1469. const m__SC_THREAD_DESTRUCTOR_ITERATIONS = 85
  1470. const m__SC_THREAD_KEYS_MAX = 86
  1471. const m__SC_THREAD_PRIORITY_SCHEDULING = 89
  1472. const m__SC_THREAD_PRIO_INHERIT = 87
  1473. const m__SC_THREAD_PRIO_PROTECT = 88
  1474. const m__SC_THREAD_PROCESS_SHARED = 90
  1475. const m__SC_THREAD_SAFE_FUNCTIONS = 91
  1476. const m__SC_THREAD_SPORADIC_SERVER = 92
  1477. const m__SC_THREAD_STACK_MIN = 93
  1478. const m__SC_THREAD_THREADS_MAX = 94
  1479. const m__SC_TIMEOUTS = 95
  1480. const m__SC_TIMERS = 41
  1481. const m__SC_TIMER_MAX = 52
  1482. const m__SC_TRACE = 97
  1483. const m__SC_TRACE_EVENT_FILTER = 98
  1484. const m__SC_TRACE_INHERIT = 99
  1485. const m__SC_TRACE_LOG = 100
  1486. const m__SC_TTY_NAME_MAX = 101
  1487. const m__SC_TYPED_MEMORY_OBJECTS = 102
  1488. const m__SC_TZNAME_MAX = 27
  1489. const m__SC_V6_ILP32_OFF32 = 103
  1490. const m__SC_V6_ILP32_OFFBIG = 104
  1491. const m__SC_V6_LP64_OFF64 = 105
  1492. const m__SC_V6_LPBIG_OFFBIG = 106
  1493. const m__SC_VERSION = 8
  1494. const m__SC_XOPEN_CRYPT = 108
  1495. const m__SC_XOPEN_ENH_I18N = 109
  1496. const m__SC_XOPEN_LEGACY = 110
  1497. const m__SC_XOPEN_REALTIME = 111
  1498. const m__SC_XOPEN_REALTIME_THREADS = 112
  1499. const m__SC_XOPEN_SHM = 113
  1500. const m__SC_XOPEN_STREAMS = 114
  1501. const m__SC_XOPEN_UNIX = 115
  1502. const m__SC_XOPEN_VERSION = 116
  1503. const m__SC_XOPEN_XCU_VERSION = 117
  1504. const m__SIG_MAXSIG = 128
  1505. const m__SIG_WORDS = 4
  1506. const m__SS_MAXSIZE = 128
  1507. const m__TANDEM_SOURCE = 1
  1508. const m__V6_ILP32_OFFBIG = 0
  1509. const m__V6_LP64_OFF64 = 0
  1510. const m__XOPEN_IOV_MAX = 16
  1511. const m__XOPEN_NAME_MAX = 255
  1512. const m__XOPEN_PATH_MAX = 1024
  1513. const m__XOPEN_SHM = 1
  1514. const m___ATOMIC_ACQUIRE = 2
  1515. const m___ATOMIC_ACQ_REL = 4
  1516. const m___ATOMIC_CONSUME = 1
  1517. const m___ATOMIC_RELAXED = 0
  1518. const m___ATOMIC_RELEASE = 3
  1519. const m___ATOMIC_SEQ_CST = 5
  1520. const m___BIGGEST_ALIGNMENT__ = 16
  1521. const m___BITINT_MAXWIDTH__ = 8388608
  1522. const m___BOOL_WIDTH__ = 8
  1523. const m___BSD_VISIBLE = 1
  1524. const m___BYTE_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  1525. const m___CCGO__ = 1
  1526. const m___CC_SUPPORTS_DYNAMIC_ARRAY_INIT = 1
  1527. const m___CC_SUPPORTS_INLINE = 1
  1528. const m___CC_SUPPORTS_VARADIC_XXX = 1
  1529. const m___CC_SUPPORTS_WARNING = 1
  1530. const m___CC_SUPPORTS___FUNC__ = 1
  1531. const m___CC_SUPPORTS___INLINE = 1
  1532. const m___CC_SUPPORTS___INLINE__ = 1
  1533. const m___CHAR_BIT = 8
  1534. const m___CHAR_BIT__ = 8
  1535. const m___CLANG_ATOMIC_BOOL_LOCK_FREE = 2
  1536. const m___CLANG_ATOMIC_CHAR16_T_LOCK_FREE = 2
  1537. const m___CLANG_ATOMIC_CHAR32_T_LOCK_FREE = 2
  1538. const m___CLANG_ATOMIC_CHAR_LOCK_FREE = 2
  1539. const m___CLANG_ATOMIC_INT_LOCK_FREE = 2
  1540. const m___CLANG_ATOMIC_LLONG_LOCK_FREE = 2
  1541. const m___CLANG_ATOMIC_LONG_LOCK_FREE = 2
  1542. const m___CLANG_ATOMIC_POINTER_LOCK_FREE = 2
  1543. const m___CLANG_ATOMIC_SHORT_LOCK_FREE = 2
  1544. const m___CLANG_ATOMIC_WCHAR_T_LOCK_FREE = 2
  1545. const m___CONSTANT_CFSTRINGS__ = 1
  1546. const m___DBL_DECIMAL_DIG__ = 17
  1547. const m___DBL_DENORM_MIN__ = 4.9406564584124654e-324
  1548. const m___DBL_DIG__ = 15
  1549. const m___DBL_EPSILON__ = 2.2204460492503131e-16
  1550. const m___DBL_HAS_DENORM__ = 1
  1551. const m___DBL_HAS_INFINITY__ = 1
  1552. const m___DBL_HAS_QUIET_NAN__ = 1
  1553. const m___DBL_MANT_DIG__ = 53
  1554. const m___DBL_MAX_10_EXP__ = 308
  1555. const m___DBL_MAX_EXP__ = 1024
  1556. const m___DBL_MAX__ = 1.7976931348623157e+308
  1557. const m___DBL_MIN__ = 2.2250738585072014e-308
  1558. const m___DECIMAL_DIG__ = "__LDBL_DECIMAL_DIG__"
  1559. const m___ELF__ = 1
  1560. const m___EXT1_VISIBLE = 1
  1561. const m___EXTENSIONS__ = 1
  1562. const m___FINITE_MATH_ONLY__ = 0
  1563. const m___FLOAT128__ = 1
  1564. const m___FLT16_DECIMAL_DIG__ = 5
  1565. const m___FLT16_DENORM_MIN__ = 5.9604644775390625e-8
  1566. const m___FLT16_DIG__ = 3
  1567. const m___FLT16_EPSILON__ = 9.765625e-4
  1568. const m___FLT16_HAS_DENORM__ = 1
  1569. const m___FLT16_HAS_INFINITY__ = 1
  1570. const m___FLT16_HAS_QUIET_NAN__ = 1
  1571. const m___FLT16_MANT_DIG__ = 11
  1572. const m___FLT16_MAX_10_EXP__ = 4
  1573. const m___FLT16_MAX_EXP__ = 16
  1574. const m___FLT16_MAX__ = 6.5504e+4
  1575. const m___FLT16_MIN__ = 6.103515625e-5
  1576. const m___FLT_DECIMAL_DIG__ = 9
  1577. const m___FLT_DENORM_MIN__ = 1.40129846e-45
  1578. const m___FLT_DIG__ = 6
  1579. const m___FLT_EPSILON__ = 1.19209290e-7
  1580. const m___FLT_HAS_DENORM__ = 1
  1581. const m___FLT_HAS_INFINITY__ = 1
  1582. const m___FLT_HAS_QUIET_NAN__ = 1
  1583. const m___FLT_MANT_DIG__ = 24
  1584. const m___FLT_MAX_10_EXP__ = 38
  1585. const m___FLT_MAX_EXP__ = 128
  1586. const m___FLT_MAX__ = 3.40282347e+38
  1587. const m___FLT_MIN__ = 1.17549435e-38
  1588. const m___FLT_RADIX__ = 2
  1589. const m___FPCLASS_NEGINF = 0x0004
  1590. const m___FPCLASS_NEGNORMAL = 0x0008
  1591. const m___FPCLASS_NEGSUBNORMAL = 0x0010
  1592. const m___FPCLASS_NEGZERO = 0x0020
  1593. const m___FPCLASS_POSINF = 0x0200
  1594. const m___FPCLASS_POSNORMAL = 0x0100
  1595. const m___FPCLASS_POSSUBNORMAL = 0x0080
  1596. const m___FPCLASS_POSZERO = 0x0040
  1597. const m___FPCLASS_QNAN = 0x0002
  1598. const m___FPCLASS_SNAN = 0x0001
  1599. const m___FUNCTION__ = "__func__"
  1600. const m___FXSR__ = 1
  1601. const m___FreeBSD__ = 14
  1602. const m___FreeBSD_cc_version = 1400006
  1603. const m___GCC_ASM_FLAG_OUTPUTS__ = 1
  1604. const m___GCC_ATOMIC_BOOL_LOCK_FREE = 2
  1605. const m___GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2
  1606. const m___GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2
  1607. const m___GCC_ATOMIC_CHAR_LOCK_FREE = 2
  1608. const m___GCC_ATOMIC_INT_LOCK_FREE = 2
  1609. const m___GCC_ATOMIC_LLONG_LOCK_FREE = 2
  1610. const m___GCC_ATOMIC_LONG_LOCK_FREE = 2
  1611. const m___GCC_ATOMIC_POINTER_LOCK_FREE = 2
  1612. const m___GCC_ATOMIC_SHORT_LOCK_FREE = 2
  1613. const m___GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1
  1614. const m___GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2
  1615. const m___GCC_HAVE_DWARF2_CFI_ASM = 1
  1616. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1
  1617. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1
  1618. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1
  1619. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1
  1620. const m___GNUCLIKE_ASM = 3
  1621. const m___GNUCLIKE_BUILTIN_CONSTANT_P = 1
  1622. const m___GNUCLIKE_BUILTIN_MEMCPY = 1
  1623. const m___GNUCLIKE_BUILTIN_NEXT_ARG = 1
  1624. const m___GNUCLIKE_BUILTIN_STDARG = 1
  1625. const m___GNUCLIKE_BUILTIN_VAALIST = 1
  1626. const m___GNUCLIKE_BUILTIN_VARARGS = 1
  1627. const m___GNUCLIKE_CTOR_SECTION_HANDLING = 1
  1628. const m___GNUCLIKE___SECTION = 1
  1629. const m___GNUCLIKE___TYPEOF = 1
  1630. const m___GNUC_MINOR__ = 2
  1631. const m___GNUC_PATCHLEVEL__ = 1
  1632. const m___GNUC_STDC_INLINE__ = 1
  1633. const m___GNUC_VA_LIST_COMPATIBILITY = 1
  1634. const m___GNUC__ = 4
  1635. const m___GXX_ABI_VERSION = 1002
  1636. const m___INT16_FMTd__ = "hd"
  1637. const m___INT16_FMTi__ = "hi"
  1638. const m___INT16_MAX__ = 32767
  1639. const m___INT16_TYPE__ = "short"
  1640. const m___INT32_FMTd__ = "d"
  1641. const m___INT32_FMTi__ = "i"
  1642. const m___INT32_MAX__ = 2147483647
  1643. const m___INT32_TYPE__ = "int"
  1644. const m___INT64_C_SUFFIX__ = "L"
  1645. const m___INT64_FMTd__ = "ld"
  1646. const m___INT64_FMTi__ = "li"
  1647. const m___INT64_MAX__ = 9223372036854775807
  1648. const m___INT8_FMTd__ = "hhd"
  1649. const m___INT8_FMTi__ = "hhi"
  1650. const m___INT8_MAX__ = 127
  1651. const m___INTMAX_C_SUFFIX__ = "L"
  1652. const m___INTMAX_FMTd__ = "ld"
  1653. const m___INTMAX_FMTi__ = "li"
  1654. const m___INTMAX_MAX__ = 9223372036854775807
  1655. const m___INTMAX_WIDTH__ = 64
  1656. const m___INTPTR_FMTd__ = "ld"
  1657. const m___INTPTR_FMTi__ = "li"
  1658. const m___INTPTR_MAX__ = 9223372036854775807
  1659. const m___INTPTR_WIDTH__ = 64
  1660. const m___INT_FAST16_FMTd__ = "hd"
  1661. const m___INT_FAST16_FMTi__ = "hi"
  1662. const m___INT_FAST16_MAX__ = 32767
  1663. const m___INT_FAST16_TYPE__ = "short"
  1664. const m___INT_FAST16_WIDTH__ = 16
  1665. const m___INT_FAST32_FMTd__ = "d"
  1666. const m___INT_FAST32_FMTi__ = "i"
  1667. const m___INT_FAST32_MAX__ = 2147483647
  1668. const m___INT_FAST32_TYPE__ = "int"
  1669. const m___INT_FAST32_WIDTH__ = 32
  1670. const m___INT_FAST64_FMTd__ = "ld"
  1671. const m___INT_FAST64_FMTi__ = "li"
  1672. const m___INT_FAST64_MAX__ = 9223372036854775807
  1673. const m___INT_FAST64_WIDTH__ = 64
  1674. const m___INT_FAST8_FMTd__ = "hhd"
  1675. const m___INT_FAST8_FMTi__ = "hhi"
  1676. const m___INT_FAST8_MAX__ = 127
  1677. const m___INT_FAST8_WIDTH__ = 8
  1678. const m___INT_LEAST16_FMTd__ = "hd"
  1679. const m___INT_LEAST16_FMTi__ = "hi"
  1680. const m___INT_LEAST16_MAX__ = 32767
  1681. const m___INT_LEAST16_TYPE__ = "short"
  1682. const m___INT_LEAST16_WIDTH__ = 16
  1683. const m___INT_LEAST32_FMTd__ = "d"
  1684. const m___INT_LEAST32_FMTi__ = "i"
  1685. const m___INT_LEAST32_MAX__ = 2147483647
  1686. const m___INT_LEAST32_TYPE__ = "int"
  1687. const m___INT_LEAST32_WIDTH__ = 32
  1688. const m___INT_LEAST64_FMTd__ = "ld"
  1689. const m___INT_LEAST64_FMTi__ = "li"
  1690. const m___INT_LEAST64_MAX__ = 9223372036854775807
  1691. const m___INT_LEAST64_WIDTH__ = 64
  1692. const m___INT_LEAST8_FMTd__ = "hhd"
  1693. const m___INT_LEAST8_FMTi__ = "hhi"
  1694. const m___INT_LEAST8_MAX__ = 127
  1695. const m___INT_LEAST8_WIDTH__ = 8
  1696. const m___INT_MAX = 0x7fffffff
  1697. const m___INT_MAX__ = 2147483647
  1698. const m___INT_WIDTH__ = 32
  1699. const m___IPV6_ADDR_SCOPE_GLOBAL = 0x0e
  1700. const m___IPV6_ADDR_SCOPE_INTFACELOCAL = 0x01
  1701. const m___IPV6_ADDR_SCOPE_LINKLOCAL = 0x02
  1702. const m___IPV6_ADDR_SCOPE_NODELOCAL = 0x01
  1703. const m___IPV6_ADDR_SCOPE_ORGLOCAL = 0x08
  1704. const m___IPV6_ADDR_SCOPE_SITELOCAL = 0x05
  1705. const m___ISO_C_VISIBLE = 2011
  1706. const m___KAME_VERSION = "FreeBSD"
  1707. const m___KPRINTF_ATTRIBUTE__ = 1
  1708. const m___LDBL_DECIMAL_DIG__ = 17
  1709. const m___LDBL_DENORM_MIN__ = 4.9406564584124654e-324
  1710. const m___LDBL_DIG__ = 15
  1711. const m___LDBL_EPSILON__ = 2.2204460492503131e-16
  1712. const m___LDBL_HAS_DENORM__ = 1
  1713. const m___LDBL_HAS_INFINITY__ = 1
  1714. const m___LDBL_HAS_QUIET_NAN__ = 1
  1715. const m___LDBL_MANT_DIG__ = 53
  1716. const m___LDBL_MAX_10_EXP__ = 308
  1717. const m___LDBL_MAX_EXP__ = 1024
  1718. const m___LDBL_MAX__ = 1.7976931348623157e+308
  1719. const m___LDBL_MIN__ = 2.2250738585072014e-308
  1720. const m___LITTLE_ENDIAN__ = 1
  1721. const m___LLONG_MAX = 0x7fffffffffffffff
  1722. const m___LLONG_WIDTH__ = 64
  1723. const m___LONG_BIT = 64
  1724. const m___LONG_LONG_MAX__ = 9223372036854775807
  1725. const m___LONG_MAX = 0x7fffffffffffffff
  1726. const m___LONG_MAX__ = 9223372036854775807
  1727. const m___LONG_WIDTH__ = 64
  1728. const m___LP64__ = 1
  1729. const m___MEMORY_SCOPE_DEVICE = 1
  1730. const m___MEMORY_SCOPE_SINGLE = 4
  1731. const m___MEMORY_SCOPE_SYSTEM = 0
  1732. const m___MEMORY_SCOPE_WRKGRP = 2
  1733. const m___MEMORY_SCOPE_WVFRNT = 3
  1734. const m___MMX__ = 1
  1735. const m___NO_INLINE__ = 1
  1736. const m___NO_MATH_ERRNO__ = 1
  1737. const m___NO_MATH_INLINES = 1
  1738. const m___OBJC_BOOL_IS_BOOL = 0
  1739. const m___OFF_MAX = "__LONG_MAX"
  1740. const m___OFF_MIN = "__LONG_MIN"
  1741. const m___OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES = 3
  1742. const m___OPENCL_MEMORY_SCOPE_DEVICE = 2
  1743. const m___OPENCL_MEMORY_SCOPE_SUB_GROUP = 4
  1744. const m___OPENCL_MEMORY_SCOPE_WORK_GROUP = 1
  1745. const m___OPENCL_MEMORY_SCOPE_WORK_ITEM = 0
  1746. const m___ORDER_BIG_ENDIAN__ = 4321
  1747. const m___ORDER_LITTLE_ENDIAN__ = 1234
  1748. const m___ORDER_PDP_ENDIAN__ = 3412
  1749. const m___POINTER_WIDTH__ = 64
  1750. const m___POSIX_VISIBLE = 200809
  1751. const m___PRAGMA_REDEFINE_EXTNAME = 1
  1752. const m___PRETTY_FUNCTION__ = "__func__"
  1753. const m___PTRDIFF_FMTd__ = "ld"
  1754. const m___PTRDIFF_FMTi__ = "li"
  1755. const m___PTRDIFF_MAX__ = 9223372036854775807
  1756. const m___PTRDIFF_WIDTH__ = 64
  1757. const m___QUAD_MAX = "__LONG_MAX"
  1758. const m___QUAD_MIN = "__LONG_MIN"
  1759. const m___S2OAP = 0x0001
  1760. const m___SALC = 0x4000
  1761. const m___SAPP = 0x0100
  1762. const m___SCHAR_MAX = 0x7f
  1763. const m___SCHAR_MAX__ = 127
  1764. const m___SEG_FS = 1
  1765. const m___SEG_GS = 1
  1766. const m___SEOF = 0x0020
  1767. const m___SERR = 0x0040
  1768. const m___SHRT_MAX = 0x7fff
  1769. const m___SHRT_MAX__ = 32767
  1770. const m___SHRT_WIDTH__ = 16
  1771. const m___SIGN = 0x8000
  1772. const m___SIG_ATOMIC_MAX__ = 2147483647
  1773. const m___SIG_ATOMIC_WIDTH__ = 32
  1774. const m___SIZEOF_DOUBLE__ = 8
  1775. const m___SIZEOF_FLOAT128__ = 16
  1776. const m___SIZEOF_FLOAT__ = 4
  1777. const m___SIZEOF_INT128__ = 16
  1778. const m___SIZEOF_INT__ = 4
  1779. const m___SIZEOF_LONG_DOUBLE__ = 8
  1780. const m___SIZEOF_LONG_LONG__ = 8
  1781. const m___SIZEOF_LONG__ = 8
  1782. const m___SIZEOF_POINTER__ = 8
  1783. const m___SIZEOF_PTRDIFF_T__ = 8
  1784. const m___SIZEOF_SHORT__ = 2
  1785. const m___SIZEOF_SIZE_T__ = 8
  1786. const m___SIZEOF_WCHAR_T__ = 4
  1787. const m___SIZEOF_WINT_T__ = 4
  1788. const m___SIZE_FMTX__ = "lX"
  1789. const m___SIZE_FMTo__ = "lo"
  1790. const m___SIZE_FMTu__ = "lu"
  1791. const m___SIZE_FMTx__ = "lx"
  1792. const m___SIZE_MAX__ = 18446744073709551615
  1793. const m___SIZE_T_MAX = "__ULONG_MAX"
  1794. const m___SIZE_WIDTH__ = 64
  1795. const m___SLBF = 0x0001
  1796. const m___SMBF = 0x0080
  1797. const m___SMOD = 0x2000
  1798. const m___SNBF = 0x0002
  1799. const m___SNPT = 0x0800
  1800. const m___SOFF = 0x1000
  1801. const m___SOPT = 0x0400
  1802. const m___SRD = 0x0004
  1803. const m___SRW = 0x0010
  1804. const m___SSE2_MATH__ = 1
  1805. const m___SSE2__ = 1
  1806. const m___SSE_MATH__ = 1
  1807. const m___SSE__ = 1
  1808. const m___SSIZE_MAX = "__LONG_MAX"
  1809. const m___SSTR = 0x0200
  1810. const m___STDC_HOSTED__ = 1
  1811. const m___STDC_MB_MIGHT_NEQ_WC__ = 1
  1812. const m___STDC_UTF_16__ = 1
  1813. const m___STDC_UTF_32__ = 1
  1814. const m___STDC_VERSION__ = 201710
  1815. const m___STDC_WANT_IEC_60559_ATTRIBS_EXT__ = 1
  1816. const m___STDC_WANT_IEC_60559_BFP_EXT__ = 1
  1817. const m___STDC_WANT_IEC_60559_DFP_EXT__ = 1
  1818. const m___STDC_WANT_IEC_60559_FUNCS_EXT__ = 1
  1819. const m___STDC_WANT_IEC_60559_TYPES_EXT__ = 1
  1820. const m___STDC_WANT_LIB_EXT2__ = 1
  1821. const m___STDC_WANT_MATH_SPEC_FUNCS__ = 1
  1822. const m___STDC__ = 1
  1823. const m___SWR = 0x0008
  1824. const m___UCHAR_MAX = 0xff
  1825. const m___UINT16_FMTX__ = "hX"
  1826. const m___UINT16_FMTo__ = "ho"
  1827. const m___UINT16_FMTu__ = "hu"
  1828. const m___UINT16_FMTx__ = "hx"
  1829. const m___UINT16_MAX__ = 65535
  1830. const m___UINT32_C_SUFFIX__ = "U"
  1831. const m___UINT32_FMTX__ = "X"
  1832. const m___UINT32_FMTo__ = "o"
  1833. const m___UINT32_FMTu__ = "u"
  1834. const m___UINT32_FMTx__ = "x"
  1835. const m___UINT32_MAX__ = 4294967295
  1836. const m___UINT64_C_SUFFIX__ = "UL"
  1837. const m___UINT64_FMTX__ = "lX"
  1838. const m___UINT64_FMTo__ = "lo"
  1839. const m___UINT64_FMTu__ = "lu"
  1840. const m___UINT64_FMTx__ = "lx"
  1841. const m___UINT64_MAX__ = 18446744073709551615
  1842. const m___UINT8_FMTX__ = "hhX"
  1843. const m___UINT8_FMTo__ = "hho"
  1844. const m___UINT8_FMTu__ = "hhu"
  1845. const m___UINT8_FMTx__ = "hhx"
  1846. const m___UINT8_MAX__ = 255
  1847. const m___UINTMAX_C_SUFFIX__ = "UL"
  1848. const m___UINTMAX_FMTX__ = "lX"
  1849. const m___UINTMAX_FMTo__ = "lo"
  1850. const m___UINTMAX_FMTu__ = "lu"
  1851. const m___UINTMAX_FMTx__ = "lx"
  1852. const m___UINTMAX_MAX__ = 18446744073709551615
  1853. const m___UINTMAX_WIDTH__ = 64
  1854. const m___UINTPTR_FMTX__ = "lX"
  1855. const m___UINTPTR_FMTo__ = "lo"
  1856. const m___UINTPTR_FMTu__ = "lu"
  1857. const m___UINTPTR_FMTx__ = "lx"
  1858. const m___UINTPTR_MAX__ = 18446744073709551615
  1859. const m___UINTPTR_WIDTH__ = 64
  1860. const m___UINT_FAST16_FMTX__ = "hX"
  1861. const m___UINT_FAST16_FMTo__ = "ho"
  1862. const m___UINT_FAST16_FMTu__ = "hu"
  1863. const m___UINT_FAST16_FMTx__ = "hx"
  1864. const m___UINT_FAST16_MAX__ = 65535
  1865. const m___UINT_FAST32_FMTX__ = "X"
  1866. const m___UINT_FAST32_FMTo__ = "o"
  1867. const m___UINT_FAST32_FMTu__ = "u"
  1868. const m___UINT_FAST32_FMTx__ = "x"
  1869. const m___UINT_FAST32_MAX__ = 4294967295
  1870. const m___UINT_FAST64_FMTX__ = "lX"
  1871. const m___UINT_FAST64_FMTo__ = "lo"
  1872. const m___UINT_FAST64_FMTu__ = "lu"
  1873. const m___UINT_FAST64_FMTx__ = "lx"
  1874. const m___UINT_FAST64_MAX__ = 18446744073709551615
  1875. const m___UINT_FAST8_FMTX__ = "hhX"
  1876. const m___UINT_FAST8_FMTo__ = "hho"
  1877. const m___UINT_FAST8_FMTu__ = "hhu"
  1878. const m___UINT_FAST8_FMTx__ = "hhx"
  1879. const m___UINT_FAST8_MAX__ = 255
  1880. const m___UINT_LEAST16_FMTX__ = "hX"
  1881. const m___UINT_LEAST16_FMTo__ = "ho"
  1882. const m___UINT_LEAST16_FMTu__ = "hu"
  1883. const m___UINT_LEAST16_FMTx__ = "hx"
  1884. const m___UINT_LEAST16_MAX__ = 65535
  1885. const m___UINT_LEAST32_FMTX__ = "X"
  1886. const m___UINT_LEAST32_FMTo__ = "o"
  1887. const m___UINT_LEAST32_FMTu__ = "u"
  1888. const m___UINT_LEAST32_FMTx__ = "x"
  1889. const m___UINT_LEAST32_MAX__ = 4294967295
  1890. const m___UINT_LEAST64_FMTX__ = "lX"
  1891. const m___UINT_LEAST64_FMTo__ = "lo"
  1892. const m___UINT_LEAST64_FMTu__ = "lu"
  1893. const m___UINT_LEAST64_FMTx__ = "lx"
  1894. const m___UINT_LEAST64_MAX__ = 18446744073709551615
  1895. const m___UINT_LEAST8_FMTX__ = "hhX"
  1896. const m___UINT_LEAST8_FMTo__ = "hho"
  1897. const m___UINT_LEAST8_FMTu__ = "hhu"
  1898. const m___UINT_LEAST8_FMTx__ = "hhx"
  1899. const m___UINT_LEAST8_MAX__ = 255
  1900. const m___UINT_MAX = 0xffffffff
  1901. const m___ULLONG_MAX = "0xffffffffffffffffU"
  1902. const m___ULONG_MAX = 0xffffffffffffffff
  1903. const m___UQUAD_MAX = "__ULONG_MAX"
  1904. const m___USHRT_MAX = 0xffff
  1905. const m___VERSION__ = "FreeBSD Clang 18.1.6 (https://github.com/llvm/llvm-project.git llvmorg-18.1.6-0-g1118c2e05e67)"
  1906. const m___WCHAR_MAX = "__INT_MAX"
  1907. const m___WCHAR_MAX__ = 2147483647
  1908. const m___WCHAR_MIN = "__INT_MIN"
  1909. const m___WCHAR_TYPE__ = "int"
  1910. const m___WCHAR_WIDTH__ = 32
  1911. const m___WINT_MAX__ = 2147483647
  1912. const m___WINT_TYPE__ = "int"
  1913. const m___WINT_WIDTH__ = 32
  1914. const m___WORDSIZE = 64
  1915. const m___WORD_BIT = 32
  1916. const m___XSI_VISIBLE = 700
  1917. const m___amd64 = 1
  1918. const m___amd64__ = 1
  1919. const m___clang__ = 1
  1920. const m___clang_literal_encoding__ = "UTF-8"
  1921. const m___clang_major__ = 18
  1922. const m___clang_minor__ = 1
  1923. const m___clang_patchlevel__ = 6
  1924. const m___clang_version__ = "18.1.6 (https://github.com/llvm/llvm-project.git llvmorg-18.1.6-0-g1118c2e05e67)"
  1925. const m___clang_wide_literal_encoding__ = "UTF-32"
  1926. const m___code_model_small__ = 1
  1927. const m___const = "const"
  1928. const m___has_extension = "__has_feature"
  1929. const m___k8 = 1
  1930. const m___k8__ = 1
  1931. const m___llvm__ = 1
  1932. const m___restrict = "restrict"
  1933. const m___restrict_arr = "restrict"
  1934. const m___signed = "signed"
  1935. const m___tune_k8__ = 1
  1936. const m___unix = 1
  1937. const m___unix__ = 1
  1938. const m___volatile = "volatile"
  1939. const m___writeonly = "__unused"
  1940. const m___x86_64 = 1
  1941. const m___x86_64__ = 1
  1942. const m_fds_bits = "__fds_bits"
  1943. const m_pseudo_AF_HDRCMPLT = 31
  1944. const m_pseudo_AF_KEY = 27
  1945. const m_pseudo_AF_PIP = 25
  1946. const m_pseudo_AF_RTIP = 22
  1947. const m_pseudo_AF_XTP = 19
  1948. const m_pthread_attr_default = "NULL"
  1949. const m_pthread_condattr_default = "NULL"
  1950. const m_pthread_mutexattr_default = "NULL"
  1951. const m_static_assert = "_Static_assert"
  1952. const m_stderr = "__stderrp"
  1953. const m_stdin = "__stdinp"
  1954. const m_stdout = "__stdoutp"
  1955. const m_unix = 1
  1956. type t__builtin_va_list = uintptr
  1957. type t__predefined_size_t = uint64
  1958. type t__predefined_wchar_t = int32
  1959. type t__predefined_ptrdiff_t = int64
  1960. type t__int8_t = int8
  1961. type t__uint8_t = uint8
  1962. type t__int16_t = int16
  1963. type t__uint16_t = uint16
  1964. type t__int32_t = int32
  1965. type t__uint32_t = uint32
  1966. type t__int64_t = int64
  1967. type t__uint64_t = uint64
  1968. type t__int_least8_t = int8
  1969. type t__int_least16_t = int16
  1970. type t__int_least32_t = int32
  1971. type t__int_least64_t = int64
  1972. type t__intmax_t = int64
  1973. type t__uint_least8_t = uint8
  1974. type t__uint_least16_t = uint16
  1975. type t__uint_least32_t = uint32
  1976. type t__uint_least64_t = uint64
  1977. type t__uintmax_t = uint64
  1978. type t__intptr_t = int64
  1979. type t__intfptr_t = int64
  1980. type t__uintptr_t = uint64
  1981. type t__uintfptr_t = uint64
  1982. type t__vm_offset_t = uint64
  1983. type t__vm_size_t = uint64
  1984. type t__size_t = uint64
  1985. type t__ssize_t = int64
  1986. type t__ptrdiff_t = int64
  1987. type t__clock_t = int32
  1988. type t__critical_t = int64
  1989. type t__double_t = float64
  1990. type t__float_t = float32
  1991. type t__int_fast8_t = int32
  1992. type t__int_fast16_t = int32
  1993. type t__int_fast32_t = int32
  1994. type t__int_fast64_t = int64
  1995. type t__register_t = int64
  1996. type t__segsz_t = int64
  1997. type t__time_t = int64
  1998. type t__uint_fast8_t = uint32
  1999. type t__uint_fast16_t = uint32
  2000. type t__uint_fast32_t = uint32
  2001. type t__uint_fast64_t = uint64
  2002. type t__u_register_t = uint64
  2003. type t__vm_paddr_t = uint64
  2004. type T___wchar_t = int32
  2005. type t__blksize_t = int32
  2006. type t__blkcnt_t = int64
  2007. type t__clockid_t = int32
  2008. type t__fflags_t = uint32
  2009. type t__fsblkcnt_t = uint64
  2010. type t__fsfilcnt_t = uint64
  2011. type t__gid_t = uint32
  2012. type t__id_t = int64
  2013. type t__ino_t = uint64
  2014. type t__key_t = int64
  2015. type t__lwpid_t = int32
  2016. type t__mode_t = uint16
  2017. type t__accmode_t = int32
  2018. type t__nl_item = int32
  2019. type t__nlink_t = uint64
  2020. type t__off_t = int64
  2021. type t__off64_t = int64
  2022. type t__pid_t = int32
  2023. type t__sbintime_t = int64
  2024. type t__rlim_t = int64
  2025. type t__sa_family_t = uint8
  2026. type t__socklen_t = uint32
  2027. type t__suseconds_t = int64
  2028. type t__timer_t = uintptr
  2029. type t__mqd_t = uintptr
  2030. type t__uid_t = uint32
  2031. type t__useconds_t = uint32
  2032. type t__cpuwhich_t = int32
  2033. type t__cpulevel_t = int32
  2034. type t__cpusetid_t = int32
  2035. type t__daddr_t = int64
  2036. type t__ct_rune_t = int32
  2037. type t__rune_t = int32
  2038. type t__wint_t = int32
  2039. type t__char16_t = uint16
  2040. type t__char32_t = uint32
  2041. type t__max_align_t = struct {
  2042. F__max_align1 int64
  2043. F__max_align2 float64
  2044. }
  2045. type t__dev_t = uint64
  2046. type t__fixpt_t = uint32
  2047. type t__mbstate_t = struct {
  2048. F_mbstateL [0]t__int64_t
  2049. F__mbstate8 [128]int8
  2050. }
  2051. type t__rman_res_t = uint64
  2052. type t__va_list = uintptr
  2053. type t__gnuc_va_list = uintptr
  2054. type Tsize_t = uint64
  2055. type Tlocale_t = uintptr
  2056. type Tmode_t = uint16
  2057. type Tssize_t = int64
  2058. type Trsize_t = uint64
  2059. type Terrno_t = int32
  2060. type Tfpos_t = int64
  2061. type Toff_t = int64
  2062. type Toff64_t = int64
  2063. type Tva_list = uintptr
  2064. type t__sbuf = struct {
  2065. F_base uintptr
  2066. F_size int32
  2067. }
  2068. type t__sFILE = struct {
  2069. F_p uintptr
  2070. F_r int32
  2071. F_w int32
  2072. F_flags int16
  2073. F_file int16
  2074. F_bf t__sbuf
  2075. F_lbfsize int32
  2076. F_cookie uintptr
  2077. F_close uintptr
  2078. F_read uintptr
  2079. F_seek uintptr
  2080. F_write uintptr
  2081. F_ub t__sbuf
  2082. F_up uintptr
  2083. F_ur int32
  2084. F_ubuf [3]uint8
  2085. F_nbuf [1]uint8
  2086. F_lb t__sbuf
  2087. F_blksize int32
  2088. F_offset Tfpos_t
  2089. F_fl_mutex uintptr
  2090. F_fl_owner uintptr
  2091. F_fl_count int32
  2092. F_orientation int32
  2093. F_mbstate t__mbstate_t
  2094. F_flags2 int32
  2095. }
  2096. type TFILE = struct {
  2097. F_p uintptr
  2098. F_r int32
  2099. F_w int32
  2100. F_flags int16
  2101. F_file int16
  2102. F_bf t__sbuf
  2103. F_lbfsize int32
  2104. F_cookie uintptr
  2105. F_close uintptr
  2106. F_read uintptr
  2107. F_seek uintptr
  2108. F_write uintptr
  2109. F_ub t__sbuf
  2110. F_up uintptr
  2111. F_ur int32
  2112. F_ubuf [3]uint8
  2113. F_nbuf [1]uint8
  2114. F_lb t__sbuf
  2115. F_blksize int32
  2116. F_offset Tfpos_t
  2117. F_fl_mutex uintptr
  2118. F_fl_owner uintptr
  2119. F_fl_count int32
  2120. F_orientation int32
  2121. F_mbstate t__mbstate_t
  2122. F_flags2 int32
  2123. }
  2124. type Tcookie_io_functions_t = struct {
  2125. Fread uintptr
  2126. Fwrite uintptr
  2127. Fseek uintptr
  2128. Fclose1 uintptr
  2129. }
  2130. type Trune_t = int32
  2131. type Twchar_t = int32
  2132. type Tdiv_t = struct {
  2133. Fquot int32
  2134. Frem int32
  2135. }
  2136. type Tldiv_t = struct {
  2137. Fquot int64
  2138. Frem int64
  2139. }
  2140. type Tlldiv_t = struct {
  2141. Fquot int64
  2142. Frem int64
  2143. }
  2144. type Tconstraint_handler_t = uintptr
  2145. type Tpid_t = int32
  2146. type Tflock = struct {
  2147. Fl_start Toff_t
  2148. Fl_len Toff_t
  2149. Fl_pid Tpid_t
  2150. Fl_type int16
  2151. Fl_whence int16
  2152. Fl_sysid int32
  2153. }
  2154. type t__oflock = struct {
  2155. Fl_start Toff_t
  2156. Fl_len Toff_t
  2157. Fl_pid Tpid_t
  2158. Fl_type int16
  2159. Fl_whence int16
  2160. }
  2161. type Tspacectl_range = struct {
  2162. Fr_offset Toff_t
  2163. Fr_len Toff_t
  2164. }
  2165. type Tpthread_once = struct {
  2166. Fstate int32
  2167. Fmutex Tpthread_mutex_t
  2168. }
  2169. type Tpthread_t = uintptr
  2170. type Tpthread_attr_t = uintptr
  2171. type Tpthread_mutex_t = uintptr
  2172. type Tpthread_mutexattr_t = uintptr
  2173. type Tpthread_cond_t = uintptr
  2174. type Tpthread_condattr_t = uintptr
  2175. type Tpthread_key_t = int32
  2176. type Tpthread_once_t = struct {
  2177. Fstate int32
  2178. Fmutex Tpthread_mutex_t
  2179. }
  2180. type Tpthread_rwlock_t = uintptr
  2181. type Tpthread_rwlockattr_t = uintptr
  2182. type Tpthread_barrier_t = uintptr
  2183. type Tpthread_barrierattr_t = uintptr
  2184. type Tpthread_spinlock_t = uintptr
  2185. type Tpthread_addr_t = uintptr
  2186. type Tpthread_startroutine_t = uintptr
  2187. type Tu_char = uint8
  2188. type Tu_short = uint16
  2189. type Tu_int = uint32
  2190. type Tu_long = uint64
  2191. type Tushort = uint16
  2192. type Tuint = uint32
  2193. type Tint8_t = int8
  2194. type Tint16_t = int16
  2195. type Tint32_t = int32
  2196. type Tint64_t = int64
  2197. type Tuint8_t = uint8
  2198. type Tuint16_t = uint16
  2199. type Tuint32_t = uint32
  2200. type Tuint64_t = uint64
  2201. type Tintptr_t = int64
  2202. type Tuintptr_t = uint64
  2203. type Tintmax_t = int64
  2204. type Tuintmax_t = uint64
  2205. type Tu_int8_t = uint8
  2206. type Tu_int16_t = uint16
  2207. type Tu_int32_t = uint32
  2208. type Tu_int64_t = uint64
  2209. type Tu_quad_t = uint64
  2210. type Tquad_t = int64
  2211. type Tqaddr_t = uintptr
  2212. type Tcaddr_t = uintptr
  2213. type Tc_caddr_t = uintptr
  2214. type Tblksize_t = int32
  2215. type Tcpuwhich_t = int32
  2216. type Tcpulevel_t = int32
  2217. type Tcpusetid_t = int32
  2218. type Tblkcnt_t = int64
  2219. type Tclock_t = int32
  2220. type Tclockid_t = int32
  2221. type Tcritical_t = int64
  2222. type Tdaddr_t = int64
  2223. type Tdev_t = uint64
  2224. type Tfflags_t = uint32
  2225. type Tfixpt_t = uint32
  2226. type Tfsblkcnt_t = uint64
  2227. type Tfsfilcnt_t = uint64
  2228. type Tgid_t = uint32
  2229. type Tin_addr_t = uint32
  2230. type Tin_port_t = uint16
  2231. type Tid_t = int64
  2232. type Tino_t = uint64
  2233. type Tkey_t = int64
  2234. type Tlwpid_t = int32
  2235. type Taccmode_t = int32
  2236. type Tnlink_t = uint64
  2237. type Tregister_t = int64
  2238. type Trlim_t = int64
  2239. type Tsbintime_t = int64
  2240. type Tsegsz_t = int64
  2241. type Tsuseconds_t = int64
  2242. type Ttime_t = int64
  2243. type Ttimer_t = uintptr
  2244. type Tmqd_t = uintptr
  2245. type Tu_register_t = uint64
  2246. type Tuid_t = uint32
  2247. type Tuseconds_t = uint32
  2248. type Tcap_ioctl_t = uint64
  2249. type Tkpaddr_t = uint64
  2250. type Tkvaddr_t = uint64
  2251. type Tksize_t = uint64
  2252. type Tkssize_t = int64
  2253. type Tvm_offset_t = uint64
  2254. type Tvm_ooffset_t = uint64
  2255. type Tvm_paddr_t = uint64
  2256. type Tvm_pindex_t = uint64
  2257. type Tvm_size_t = uint64
  2258. type Trman_res_t = uint64
  2259. type Tsyscallarg_t = int64
  2260. type t__sigset_t = struct {
  2261. F__bits [4]t__uint32_t
  2262. }
  2263. type t__sigset = t__sigset_t
  2264. type Ttimeval = struct {
  2265. Ftv_sec Ttime_t
  2266. Ftv_usec Tsuseconds_t
  2267. }
  2268. type Ttimespec = struct {
  2269. Ftv_sec Ttime_t
  2270. Ftv_nsec int64
  2271. }
  2272. type Titimerspec = struct {
  2273. Fit_interval Ttimespec
  2274. Fit_value Ttimespec
  2275. }
  2276. type t__fd_mask = uint64
  2277. type Tfd_mask = uint64
  2278. type Tsigset_t = struct {
  2279. F__bits [4]t__uint32_t
  2280. }
  2281. type Tfd_set = struct {
  2282. F__fds_bits [16]t__fd_mask
  2283. }
  2284. type Tint_least8_t = int8
  2285. type Tint_least16_t = int16
  2286. type Tint_least32_t = int32
  2287. type Tint_least64_t = int64
  2288. type Tuint_least8_t = uint8
  2289. type Tuint_least16_t = uint16
  2290. type Tuint_least32_t = uint32
  2291. type Tuint_least64_t = uint64
  2292. type Tint_fast8_t = int32
  2293. type Tint_fast16_t = int32
  2294. type Tint_fast32_t = int32
  2295. type Tint_fast64_t = int64
  2296. type Tuint_fast8_t = uint32
  2297. type Tuint_fast16_t = uint32
  2298. type Tuint_fast32_t = uint32
  2299. type Tuint_fast64_t = uint64
  2300. type Tiovec = struct {
  2301. Fiov_base uintptr
  2302. Fiov_len Tsize_t
  2303. }
  2304. type _uio_rw = int32
  2305. const _UIO_READ = 0
  2306. const _UIO_WRITE = 1
  2307. type _uio_seg = int32
  2308. const _UIO_USERSPACE = 0
  2309. const _UIO_SYSSPACE = 1
  2310. const _UIO_NOCOPY = 2
  2311. type Tsigval = struct {
  2312. Fsival_ptr [0]uintptr
  2313. Fsigval_int [0]int32
  2314. Fsigval_ptr [0]uintptr
  2315. Fsival_int int32
  2316. F__ccgo_pad4 [4]byte
  2317. }
  2318. type Tsched_param = struct {
  2319. Fsched_priority int32
  2320. }
  2321. type T_cpuset = struct {
  2322. F__bits [16]int64
  2323. }
  2324. type Tcpuset_t = struct {
  2325. F__bits [16]int64
  2326. }
  2327. type Tcpu_set_t = struct {
  2328. F__bits [16]int64
  2329. }
  2330. type Ttm = struct {
  2331. Ftm_sec int32
  2332. Ftm_min int32
  2333. Ftm_hour int32
  2334. Ftm_mday int32
  2335. Ftm_mon int32
  2336. Ftm_year int32
  2337. Ftm_wday int32
  2338. Ftm_yday int32
  2339. Ftm_isdst int32
  2340. Ftm_gmtoff int64
  2341. Ftm_zone uintptr
  2342. }
  2343. type _pthread_mutextype = int32
  2344. const _PTHREAD_MUTEX_ERRORCHECK = 1
  2345. const _PTHREAD_MUTEX_RECURSIVE = 2
  2346. const _PTHREAD_MUTEX_NORMAL = 3
  2347. const _PTHREAD_MUTEX_ADAPTIVE_NP = 4
  2348. const _PTHREAD_MUTEX_TYPE_MAX = 5
  2349. type T_pthread_cleanup_info = struct {
  2350. Fpthread_cleanup_pad [8]t__uintptr_t
  2351. }
  2352. type Txcb_connection_t = struct {
  2353. Fhas_error int32
  2354. Fsetup uintptr
  2355. Ffd int32
  2356. Fiolock Tpthread_mutex_t
  2357. Fin T_xcb_in
  2358. Fout T_xcb_out
  2359. Fext T_xcb_ext
  2360. Fxid T_xcb_xid
  2361. }
  2362. type Txcb_generic_iterator_t = struct {
  2363. Fdata uintptr
  2364. Frem int32
  2365. Findex int32
  2366. }
  2367. type Txcb_generic_reply_t = struct {
  2368. Fresponse_type Tuint8_t
  2369. Fpad0 Tuint8_t
  2370. Fsequence Tuint16_t
  2371. Flength Tuint32_t
  2372. }
  2373. type Txcb_generic_event_t = struct {
  2374. Fresponse_type Tuint8_t
  2375. Fpad0 Tuint8_t
  2376. Fsequence Tuint16_t
  2377. Fpad [7]Tuint32_t
  2378. Ffull_sequence Tuint32_t
  2379. }
  2380. type Txcb_raw_generic_event_t = struct {
  2381. Fresponse_type Tuint8_t
  2382. Fpad0 Tuint8_t
  2383. Fsequence Tuint16_t
  2384. Fpad [7]Tuint32_t
  2385. }
  2386. type Txcb_ge_event_t = struct {
  2387. Fresponse_type Tuint8_t
  2388. Fpad0 Tuint8_t
  2389. Fsequence Tuint16_t
  2390. Flength Tuint32_t
  2391. Fevent_type Tuint16_t
  2392. Fpad1 Tuint16_t
  2393. Fpad [5]Tuint32_t
  2394. Ffull_sequence Tuint32_t
  2395. }
  2396. type Txcb_generic_error_t = struct {
  2397. Fresponse_type Tuint8_t
  2398. Ferror_code Tuint8_t
  2399. Fsequence Tuint16_t
  2400. Fresource_id Tuint32_t
  2401. Fminor_code Tuint16_t
  2402. Fmajor_code Tuint8_t
  2403. Fpad0 Tuint8_t
  2404. Fpad [5]Tuint32_t
  2405. Ffull_sequence Tuint32_t
  2406. }
  2407. type Txcb_void_cookie_t = struct {
  2408. Fsequence uint32
  2409. }
  2410. type Txcb_char2b_t = struct {
  2411. Fbyte1 Tuint8_t
  2412. Fbyte2 Tuint8_t
  2413. }
  2414. type Txcb_char2b_iterator_t = struct {
  2415. Fdata uintptr
  2416. Frem int32
  2417. Findex int32
  2418. }
  2419. type Txcb_window_t = uint32
  2420. type Txcb_window_iterator_t = struct {
  2421. Fdata uintptr
  2422. Frem int32
  2423. Findex int32
  2424. }
  2425. type Txcb_pixmap_t = uint32
  2426. type Txcb_pixmap_iterator_t = struct {
  2427. Fdata uintptr
  2428. Frem int32
  2429. Findex int32
  2430. }
  2431. type Txcb_cursor_t = uint32
  2432. type Txcb_cursor_iterator_t = struct {
  2433. Fdata uintptr
  2434. Frem int32
  2435. Findex int32
  2436. }
  2437. type Txcb_font_t = uint32
  2438. type Txcb_font_iterator_t = struct {
  2439. Fdata uintptr
  2440. Frem int32
  2441. Findex int32
  2442. }
  2443. type Txcb_gcontext_t = uint32
  2444. type Txcb_gcontext_iterator_t = struct {
  2445. Fdata uintptr
  2446. Frem int32
  2447. Findex int32
  2448. }
  2449. type Txcb_colormap_t = uint32
  2450. type Txcb_colormap_iterator_t = struct {
  2451. Fdata uintptr
  2452. Frem int32
  2453. Findex int32
  2454. }
  2455. type Txcb_atom_t = uint32
  2456. type Txcb_atom_iterator_t = struct {
  2457. Fdata uintptr
  2458. Frem int32
  2459. Findex int32
  2460. }
  2461. type Txcb_drawable_t = uint32
  2462. type Txcb_drawable_iterator_t = struct {
  2463. Fdata uintptr
  2464. Frem int32
  2465. Findex int32
  2466. }
  2467. type Txcb_fontable_t = uint32
  2468. type Txcb_fontable_iterator_t = struct {
  2469. Fdata uintptr
  2470. Frem int32
  2471. Findex int32
  2472. }
  2473. type Txcb_bool32_t = uint32
  2474. type Txcb_bool32_iterator_t = struct {
  2475. Fdata uintptr
  2476. Frem int32
  2477. Findex int32
  2478. }
  2479. type Txcb_visualid_t = uint32
  2480. type Txcb_visualid_iterator_t = struct {
  2481. Fdata uintptr
  2482. Frem int32
  2483. Findex int32
  2484. }
  2485. type Txcb_timestamp_t = uint32
  2486. type Txcb_timestamp_iterator_t = struct {
  2487. Fdata uintptr
  2488. Frem int32
  2489. Findex int32
  2490. }
  2491. type Txcb_keysym_t = uint32
  2492. type Txcb_keysym_iterator_t = struct {
  2493. Fdata uintptr
  2494. Frem int32
  2495. Findex int32
  2496. }
  2497. type Txcb_keycode_t = uint8
  2498. type Txcb_keycode_iterator_t = struct {
  2499. Fdata uintptr
  2500. Frem int32
  2501. Findex int32
  2502. }
  2503. type Txcb_keycode32_t = uint32
  2504. type Txcb_keycode32_iterator_t = struct {
  2505. Fdata uintptr
  2506. Frem int32
  2507. Findex int32
  2508. }
  2509. type Txcb_button_t = uint8
  2510. type Txcb_button_iterator_t = struct {
  2511. Fdata uintptr
  2512. Frem int32
  2513. Findex int32
  2514. }
  2515. type Txcb_point_t = struct {
  2516. Fx Tint16_t
  2517. Fy Tint16_t
  2518. }
  2519. type Txcb_point_iterator_t = struct {
  2520. Fdata uintptr
  2521. Frem int32
  2522. Findex int32
  2523. }
  2524. type Txcb_rectangle_t = struct {
  2525. Fx Tint16_t
  2526. Fy Tint16_t
  2527. Fwidth Tuint16_t
  2528. Fheight Tuint16_t
  2529. }
  2530. type Txcb_rectangle_iterator_t = struct {
  2531. Fdata uintptr
  2532. Frem int32
  2533. Findex int32
  2534. }
  2535. type Txcb_arc_t = struct {
  2536. Fx Tint16_t
  2537. Fy Tint16_t
  2538. Fwidth Tuint16_t
  2539. Fheight Tuint16_t
  2540. Fangle1 Tint16_t
  2541. Fangle2 Tint16_t
  2542. }
  2543. type Txcb_arc_iterator_t = struct {
  2544. Fdata uintptr
  2545. Frem int32
  2546. Findex int32
  2547. }
  2548. type Txcb_format_t = struct {
  2549. Fdepth Tuint8_t
  2550. Fbits_per_pixel Tuint8_t
  2551. Fscanline_pad Tuint8_t
  2552. Fpad0 [5]Tuint8_t
  2553. }
  2554. type Txcb_format_iterator_t = struct {
  2555. Fdata uintptr
  2556. Frem int32
  2557. Findex int32
  2558. }
  2559. type Txcb_visual_class_t = int32
  2560. type _xcb_visual_class_t = int32
  2561. const _XCB_VISUAL_CLASS_STATIC_GRAY = 0
  2562. const _XCB_VISUAL_CLASS_GRAY_SCALE = 1
  2563. const _XCB_VISUAL_CLASS_STATIC_COLOR = 2
  2564. const _XCB_VISUAL_CLASS_PSEUDO_COLOR = 3
  2565. const _XCB_VISUAL_CLASS_TRUE_COLOR = 4
  2566. const _XCB_VISUAL_CLASS_DIRECT_COLOR = 5
  2567. type Txcb_visualtype_t = struct {
  2568. Fvisual_id Txcb_visualid_t
  2569. F_class Tuint8_t
  2570. Fbits_per_rgb_value Tuint8_t
  2571. Fcolormap_entries Tuint16_t
  2572. Fred_mask Tuint32_t
  2573. Fgreen_mask Tuint32_t
  2574. Fblue_mask Tuint32_t
  2575. Fpad0 [4]Tuint8_t
  2576. }
  2577. type Txcb_visualtype_iterator_t = struct {
  2578. Fdata uintptr
  2579. Frem int32
  2580. Findex int32
  2581. }
  2582. type Txcb_depth_t = struct {
  2583. Fdepth Tuint8_t
  2584. Fpad0 Tuint8_t
  2585. Fvisuals_len Tuint16_t
  2586. Fpad1 [4]Tuint8_t
  2587. }
  2588. type Txcb_depth_iterator_t = struct {
  2589. Fdata uintptr
  2590. Frem int32
  2591. Findex int32
  2592. }
  2593. type Txcb_event_mask_t = int32
  2594. type _xcb_event_mask_t = int32
  2595. const _XCB_EVENT_MASK_NO_EVENT = 0
  2596. const _XCB_EVENT_MASK_KEY_PRESS = 1
  2597. const _XCB_EVENT_MASK_KEY_RELEASE = 2
  2598. const _XCB_EVENT_MASK_BUTTON_PRESS = 4
  2599. const _XCB_EVENT_MASK_BUTTON_RELEASE = 8
  2600. const _XCB_EVENT_MASK_ENTER_WINDOW = 16
  2601. const _XCB_EVENT_MASK_LEAVE_WINDOW = 32
  2602. const _XCB_EVENT_MASK_POINTER_MOTION = 64
  2603. const _XCB_EVENT_MASK_POINTER_MOTION_HINT = 128
  2604. const _XCB_EVENT_MASK_BUTTON_1_MOTION = 256
  2605. const _XCB_EVENT_MASK_BUTTON_2_MOTION = 512
  2606. const _XCB_EVENT_MASK_BUTTON_3_MOTION = 1024
  2607. const _XCB_EVENT_MASK_BUTTON_4_MOTION = 2048
  2608. const _XCB_EVENT_MASK_BUTTON_5_MOTION = 4096
  2609. const _XCB_EVENT_MASK_BUTTON_MOTION = 8192
  2610. const _XCB_EVENT_MASK_KEYMAP_STATE = 16384
  2611. const _XCB_EVENT_MASK_EXPOSURE = 32768
  2612. const _XCB_EVENT_MASK_VISIBILITY_CHANGE = 65536
  2613. const _XCB_EVENT_MASK_STRUCTURE_NOTIFY = 131072
  2614. const _XCB_EVENT_MASK_RESIZE_REDIRECT = 262144
  2615. const _XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY = 524288
  2616. const _XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT = 1048576
  2617. const _XCB_EVENT_MASK_FOCUS_CHANGE = 2097152
  2618. const _XCB_EVENT_MASK_PROPERTY_CHANGE = 4194304
  2619. const _XCB_EVENT_MASK_COLOR_MAP_CHANGE = 8388608
  2620. const _XCB_EVENT_MASK_OWNER_GRAB_BUTTON = 16777216
  2621. type Txcb_backing_store_t = int32
  2622. type _xcb_backing_store_t = int32
  2623. const _XCB_BACKING_STORE_NOT_USEFUL = 0
  2624. const _XCB_BACKING_STORE_WHEN_MAPPED = 1
  2625. const _XCB_BACKING_STORE_ALWAYS = 2
  2626. type Txcb_screen_t = struct {
  2627. Froot Txcb_window_t
  2628. Fdefault_colormap Txcb_colormap_t
  2629. Fwhite_pixel Tuint32_t
  2630. Fblack_pixel Tuint32_t
  2631. Fcurrent_input_masks Tuint32_t
  2632. Fwidth_in_pixels Tuint16_t
  2633. Fheight_in_pixels Tuint16_t
  2634. Fwidth_in_millimeters Tuint16_t
  2635. Fheight_in_millimeters Tuint16_t
  2636. Fmin_installed_maps Tuint16_t
  2637. Fmax_installed_maps Tuint16_t
  2638. Froot_visual Txcb_visualid_t
  2639. Fbacking_stores Tuint8_t
  2640. Fsave_unders Tuint8_t
  2641. Froot_depth Tuint8_t
  2642. Fallowed_depths_len Tuint8_t
  2643. }
  2644. type Txcb_screen_iterator_t = struct {
  2645. Fdata uintptr
  2646. Frem int32
  2647. Findex int32
  2648. }
  2649. type Txcb_setup_request_t = struct {
  2650. Fbyte_order Tuint8_t
  2651. Fpad0 Tuint8_t
  2652. Fprotocol_major_version Tuint16_t
  2653. Fprotocol_minor_version Tuint16_t
  2654. Fauthorization_protocol_name_len Tuint16_t
  2655. Fauthorization_protocol_data_len Tuint16_t
  2656. Fpad1 [2]Tuint8_t
  2657. }
  2658. type Txcb_setup_request_iterator_t = struct {
  2659. Fdata uintptr
  2660. Frem int32
  2661. Findex int32
  2662. }
  2663. type Txcb_setup_failed_t = struct {
  2664. Fstatus Tuint8_t
  2665. Freason_len Tuint8_t
  2666. Fprotocol_major_version Tuint16_t
  2667. Fprotocol_minor_version Tuint16_t
  2668. Flength Tuint16_t
  2669. }
  2670. type Txcb_setup_failed_iterator_t = struct {
  2671. Fdata uintptr
  2672. Frem int32
  2673. Findex int32
  2674. }
  2675. type Txcb_setup_authenticate_t = struct {
  2676. Fstatus Tuint8_t
  2677. Fpad0 [5]Tuint8_t
  2678. Flength Tuint16_t
  2679. }
  2680. type Txcb_setup_authenticate_iterator_t = struct {
  2681. Fdata uintptr
  2682. Frem int32
  2683. Findex int32
  2684. }
  2685. type Txcb_image_order_t = int32
  2686. type _xcb_image_order_t = int32
  2687. const _XCB_IMAGE_ORDER_LSB_FIRST = 0
  2688. const _XCB_IMAGE_ORDER_MSB_FIRST = 1
  2689. type Txcb_setup_t = struct {
  2690. Fstatus Tuint8_t
  2691. Fpad0 Tuint8_t
  2692. Fprotocol_major_version Tuint16_t
  2693. Fprotocol_minor_version Tuint16_t
  2694. Flength Tuint16_t
  2695. Frelease_number Tuint32_t
  2696. Fresource_id_base Tuint32_t
  2697. Fresource_id_mask Tuint32_t
  2698. Fmotion_buffer_size Tuint32_t
  2699. Fvendor_len Tuint16_t
  2700. Fmaximum_request_length Tuint16_t
  2701. Froots_len Tuint8_t
  2702. Fpixmap_formats_len Tuint8_t
  2703. Fimage_byte_order Tuint8_t
  2704. Fbitmap_format_bit_order Tuint8_t
  2705. Fbitmap_format_scanline_unit Tuint8_t
  2706. Fbitmap_format_scanline_pad Tuint8_t
  2707. Fmin_keycode Txcb_keycode_t
  2708. Fmax_keycode Txcb_keycode_t
  2709. Fpad1 [4]Tuint8_t
  2710. }
  2711. type Txcb_setup_iterator_t = struct {
  2712. Fdata uintptr
  2713. Frem int32
  2714. Findex int32
  2715. }
  2716. type Txcb_mod_mask_t = int32
  2717. type _xcb_mod_mask_t = int32
  2718. const _XCB_MOD_MASK_SHIFT = 1
  2719. const _XCB_MOD_MASK_LOCK = 2
  2720. const _XCB_MOD_MASK_CONTROL = 4
  2721. const _XCB_MOD_MASK_1 = 8
  2722. const _XCB_MOD_MASK_2 = 16
  2723. const _XCB_MOD_MASK_3 = 32
  2724. const _XCB_MOD_MASK_4 = 64
  2725. const _XCB_MOD_MASK_5 = 128
  2726. const _XCB_MOD_MASK_ANY = 32768
  2727. type Txcb_key_but_mask_t = int32
  2728. type _xcb_key_but_mask_t = int32
  2729. const _XCB_KEY_BUT_MASK_SHIFT = 1
  2730. const _XCB_KEY_BUT_MASK_LOCK = 2
  2731. const _XCB_KEY_BUT_MASK_CONTROL = 4
  2732. const _XCB_KEY_BUT_MASK_MOD_1 = 8
  2733. const _XCB_KEY_BUT_MASK_MOD_2 = 16
  2734. const _XCB_KEY_BUT_MASK_MOD_3 = 32
  2735. const _XCB_KEY_BUT_MASK_MOD_4 = 64
  2736. const _XCB_KEY_BUT_MASK_MOD_5 = 128
  2737. const _XCB_KEY_BUT_MASK_BUTTON_1 = 256
  2738. const _XCB_KEY_BUT_MASK_BUTTON_2 = 512
  2739. const _XCB_KEY_BUT_MASK_BUTTON_3 = 1024
  2740. const _XCB_KEY_BUT_MASK_BUTTON_4 = 2048
  2741. const _XCB_KEY_BUT_MASK_BUTTON_5 = 4096
  2742. type Txcb_window_enum_t = int32
  2743. type _xcb_window_enum_t = int32
  2744. const _XCB_WINDOW_NONE = 0
  2745. type Txcb_key_press_event_t = struct {
  2746. Fresponse_type Tuint8_t
  2747. Fdetail Txcb_keycode_t
  2748. Fsequence Tuint16_t
  2749. Ftime Txcb_timestamp_t
  2750. Froot Txcb_window_t
  2751. Fevent Txcb_window_t
  2752. Fchild Txcb_window_t
  2753. Froot_x Tint16_t
  2754. Froot_y Tint16_t
  2755. Fevent_x Tint16_t
  2756. Fevent_y Tint16_t
  2757. Fstate Tuint16_t
  2758. Fsame_screen Tuint8_t
  2759. Fpad0 Tuint8_t
  2760. }
  2761. type Txcb_key_release_event_t = struct {
  2762. Fresponse_type Tuint8_t
  2763. Fdetail Txcb_keycode_t
  2764. Fsequence Tuint16_t
  2765. Ftime Txcb_timestamp_t
  2766. Froot Txcb_window_t
  2767. Fevent Txcb_window_t
  2768. Fchild Txcb_window_t
  2769. Froot_x Tint16_t
  2770. Froot_y Tint16_t
  2771. Fevent_x Tint16_t
  2772. Fevent_y Tint16_t
  2773. Fstate Tuint16_t
  2774. Fsame_screen Tuint8_t
  2775. Fpad0 Tuint8_t
  2776. }
  2777. type Txcb_key_press_event_t1 = Txcb_key_release_event_t
  2778. type Txcb_button_mask_t = int32
  2779. type _xcb_button_mask_t = int32
  2780. const _XCB_BUTTON_MASK_1 = 256
  2781. const _XCB_BUTTON_MASK_2 = 512
  2782. const _XCB_BUTTON_MASK_3 = 1024
  2783. const _XCB_BUTTON_MASK_4 = 2048
  2784. const _XCB_BUTTON_MASK_5 = 4096
  2785. const _XCB_BUTTON_MASK_ANY = 32768
  2786. type Txcb_button_press_event_t = struct {
  2787. Fresponse_type Tuint8_t
  2788. Fdetail Txcb_button_t
  2789. Fsequence Tuint16_t
  2790. Ftime Txcb_timestamp_t
  2791. Froot Txcb_window_t
  2792. Fevent Txcb_window_t
  2793. Fchild Txcb_window_t
  2794. Froot_x Tint16_t
  2795. Froot_y Tint16_t
  2796. Fevent_x Tint16_t
  2797. Fevent_y Tint16_t
  2798. Fstate Tuint16_t
  2799. Fsame_screen Tuint8_t
  2800. Fpad0 Tuint8_t
  2801. }
  2802. type Txcb_button_release_event_t = struct {
  2803. Fresponse_type Tuint8_t
  2804. Fdetail Txcb_button_t
  2805. Fsequence Tuint16_t
  2806. Ftime Txcb_timestamp_t
  2807. Froot Txcb_window_t
  2808. Fevent Txcb_window_t
  2809. Fchild Txcb_window_t
  2810. Froot_x Tint16_t
  2811. Froot_y Tint16_t
  2812. Fevent_x Tint16_t
  2813. Fevent_y Tint16_t
  2814. Fstate Tuint16_t
  2815. Fsame_screen Tuint8_t
  2816. Fpad0 Tuint8_t
  2817. }
  2818. type Txcb_button_press_event_t1 = Txcb_button_release_event_t
  2819. type Txcb_motion_t = int32
  2820. type _xcb_motion_t = int32
  2821. const _XCB_MOTION_NORMAL = 0
  2822. const _XCB_MOTION_HINT = 1
  2823. type Txcb_motion_notify_event_t = struct {
  2824. Fresponse_type Tuint8_t
  2825. Fdetail Tuint8_t
  2826. Fsequence Tuint16_t
  2827. Ftime Txcb_timestamp_t
  2828. Froot Txcb_window_t
  2829. Fevent Txcb_window_t
  2830. Fchild Txcb_window_t
  2831. Froot_x Tint16_t
  2832. Froot_y Tint16_t
  2833. Fevent_x Tint16_t
  2834. Fevent_y Tint16_t
  2835. Fstate Tuint16_t
  2836. Fsame_screen Tuint8_t
  2837. Fpad0 Tuint8_t
  2838. }
  2839. type Txcb_notify_detail_t = int32
  2840. type _xcb_notify_detail_t = int32
  2841. const _XCB_NOTIFY_DETAIL_ANCESTOR = 0
  2842. const _XCB_NOTIFY_DETAIL_VIRTUAL = 1
  2843. const _XCB_NOTIFY_DETAIL_INFERIOR = 2
  2844. const _XCB_NOTIFY_DETAIL_NONLINEAR = 3
  2845. const _XCB_NOTIFY_DETAIL_NONLINEAR_VIRTUAL = 4
  2846. const _XCB_NOTIFY_DETAIL_POINTER = 5
  2847. const _XCB_NOTIFY_DETAIL_POINTER_ROOT = 6
  2848. const _XCB_NOTIFY_DETAIL_NONE = 7
  2849. type Txcb_notify_mode_t = int32
  2850. type _xcb_notify_mode_t = int32
  2851. const _XCB_NOTIFY_MODE_NORMAL = 0
  2852. const _XCB_NOTIFY_MODE_GRAB = 1
  2853. const _XCB_NOTIFY_MODE_UNGRAB = 2
  2854. const _XCB_NOTIFY_MODE_WHILE_GRABBED = 3
  2855. type Txcb_enter_notify_event_t = struct {
  2856. Fresponse_type Tuint8_t
  2857. Fdetail Tuint8_t
  2858. Fsequence Tuint16_t
  2859. Ftime Txcb_timestamp_t
  2860. Froot Txcb_window_t
  2861. Fevent Txcb_window_t
  2862. Fchild Txcb_window_t
  2863. Froot_x Tint16_t
  2864. Froot_y Tint16_t
  2865. Fevent_x Tint16_t
  2866. Fevent_y Tint16_t
  2867. Fstate Tuint16_t
  2868. Fmode Tuint8_t
  2869. Fsame_screen_focus Tuint8_t
  2870. }
  2871. type Txcb_leave_notify_event_t = struct {
  2872. Fresponse_type Tuint8_t
  2873. Fdetail Tuint8_t
  2874. Fsequence Tuint16_t
  2875. Ftime Txcb_timestamp_t
  2876. Froot Txcb_window_t
  2877. Fevent Txcb_window_t
  2878. Fchild Txcb_window_t
  2879. Froot_x Tint16_t
  2880. Froot_y Tint16_t
  2881. Fevent_x Tint16_t
  2882. Fevent_y Tint16_t
  2883. Fstate Tuint16_t
  2884. Fmode Tuint8_t
  2885. Fsame_screen_focus Tuint8_t
  2886. }
  2887. type Txcb_enter_notify_event_t1 = Txcb_leave_notify_event_t
  2888. type Txcb_focus_in_event_t = struct {
  2889. Fresponse_type Tuint8_t
  2890. Fdetail Tuint8_t
  2891. Fsequence Tuint16_t
  2892. Fevent Txcb_window_t
  2893. Fmode Tuint8_t
  2894. Fpad0 [3]Tuint8_t
  2895. }
  2896. type Txcb_focus_out_event_t = struct {
  2897. Fresponse_type Tuint8_t
  2898. Fdetail Tuint8_t
  2899. Fsequence Tuint16_t
  2900. Fevent Txcb_window_t
  2901. Fmode Tuint8_t
  2902. Fpad0 [3]Tuint8_t
  2903. }
  2904. type Txcb_focus_in_event_t1 = Txcb_focus_out_event_t
  2905. type Txcb_keymap_notify_event_t = struct {
  2906. Fresponse_type Tuint8_t
  2907. Fkeys [31]Tuint8_t
  2908. }
  2909. type Txcb_expose_event_t = struct {
  2910. Fresponse_type Tuint8_t
  2911. Fpad0 Tuint8_t
  2912. Fsequence Tuint16_t
  2913. Fwindow Txcb_window_t
  2914. Fx Tuint16_t
  2915. Fy Tuint16_t
  2916. Fwidth Tuint16_t
  2917. Fheight Tuint16_t
  2918. Fcount Tuint16_t
  2919. Fpad1 [2]Tuint8_t
  2920. }
  2921. type Txcb_graphics_exposure_event_t = struct {
  2922. Fresponse_type Tuint8_t
  2923. Fpad0 Tuint8_t
  2924. Fsequence Tuint16_t
  2925. Fdrawable Txcb_drawable_t
  2926. Fx Tuint16_t
  2927. Fy Tuint16_t
  2928. Fwidth Tuint16_t
  2929. Fheight Tuint16_t
  2930. Fminor_opcode Tuint16_t
  2931. Fcount Tuint16_t
  2932. Fmajor_opcode Tuint8_t
  2933. Fpad1 [3]Tuint8_t
  2934. }
  2935. type Txcb_no_exposure_event_t = struct {
  2936. Fresponse_type Tuint8_t
  2937. Fpad0 Tuint8_t
  2938. Fsequence Tuint16_t
  2939. Fdrawable Txcb_drawable_t
  2940. Fminor_opcode Tuint16_t
  2941. Fmajor_opcode Tuint8_t
  2942. Fpad1 Tuint8_t
  2943. }
  2944. type Txcb_visibility_t = int32
  2945. type _xcb_visibility_t = int32
  2946. const _XCB_VISIBILITY_UNOBSCURED = 0
  2947. const _XCB_VISIBILITY_PARTIALLY_OBSCURED = 1
  2948. const _XCB_VISIBILITY_FULLY_OBSCURED = 2
  2949. type Txcb_visibility_notify_event_t = struct {
  2950. Fresponse_type Tuint8_t
  2951. Fpad0 Tuint8_t
  2952. Fsequence Tuint16_t
  2953. Fwindow Txcb_window_t
  2954. Fstate Tuint8_t
  2955. Fpad1 [3]Tuint8_t
  2956. }
  2957. type Txcb_create_notify_event_t = struct {
  2958. Fresponse_type Tuint8_t
  2959. Fpad0 Tuint8_t
  2960. Fsequence Tuint16_t
  2961. Fparent Txcb_window_t
  2962. Fwindow Txcb_window_t
  2963. Fx Tint16_t
  2964. Fy Tint16_t
  2965. Fwidth Tuint16_t
  2966. Fheight Tuint16_t
  2967. Fborder_width Tuint16_t
  2968. Foverride_redirect Tuint8_t
  2969. Fpad1 Tuint8_t
  2970. }
  2971. type Txcb_destroy_notify_event_t = struct {
  2972. Fresponse_type Tuint8_t
  2973. Fpad0 Tuint8_t
  2974. Fsequence Tuint16_t
  2975. Fevent Txcb_window_t
  2976. Fwindow Txcb_window_t
  2977. }
  2978. type Txcb_unmap_notify_event_t = struct {
  2979. Fresponse_type Tuint8_t
  2980. Fpad0 Tuint8_t
  2981. Fsequence Tuint16_t
  2982. Fevent Txcb_window_t
  2983. Fwindow Txcb_window_t
  2984. Ffrom_configure Tuint8_t
  2985. Fpad1 [3]Tuint8_t
  2986. }
  2987. type Txcb_map_notify_event_t = struct {
  2988. Fresponse_type Tuint8_t
  2989. Fpad0 Tuint8_t
  2990. Fsequence Tuint16_t
  2991. Fevent Txcb_window_t
  2992. Fwindow Txcb_window_t
  2993. Foverride_redirect Tuint8_t
  2994. Fpad1 [3]Tuint8_t
  2995. }
  2996. type Txcb_map_request_event_t = struct {
  2997. Fresponse_type Tuint8_t
  2998. Fpad0 Tuint8_t
  2999. Fsequence Tuint16_t
  3000. Fparent Txcb_window_t
  3001. Fwindow Txcb_window_t
  3002. }
  3003. type Txcb_reparent_notify_event_t = struct {
  3004. Fresponse_type Tuint8_t
  3005. Fpad0 Tuint8_t
  3006. Fsequence Tuint16_t
  3007. Fevent Txcb_window_t
  3008. Fwindow Txcb_window_t
  3009. Fparent Txcb_window_t
  3010. Fx Tint16_t
  3011. Fy Tint16_t
  3012. Foverride_redirect Tuint8_t
  3013. Fpad1 [3]Tuint8_t
  3014. }
  3015. type Txcb_configure_notify_event_t = struct {
  3016. Fresponse_type Tuint8_t
  3017. Fpad0 Tuint8_t
  3018. Fsequence Tuint16_t
  3019. Fevent Txcb_window_t
  3020. Fwindow Txcb_window_t
  3021. Fabove_sibling Txcb_window_t
  3022. Fx Tint16_t
  3023. Fy Tint16_t
  3024. Fwidth Tuint16_t
  3025. Fheight Tuint16_t
  3026. Fborder_width Tuint16_t
  3027. Foverride_redirect Tuint8_t
  3028. Fpad1 Tuint8_t
  3029. }
  3030. type Txcb_configure_request_event_t = struct {
  3031. Fresponse_type Tuint8_t
  3032. Fstack_mode Tuint8_t
  3033. Fsequence Tuint16_t
  3034. Fparent Txcb_window_t
  3035. Fwindow Txcb_window_t
  3036. Fsibling Txcb_window_t
  3037. Fx Tint16_t
  3038. Fy Tint16_t
  3039. Fwidth Tuint16_t
  3040. Fheight Tuint16_t
  3041. Fborder_width Tuint16_t
  3042. Fvalue_mask Tuint16_t
  3043. }
  3044. type Txcb_gravity_notify_event_t = struct {
  3045. Fresponse_type Tuint8_t
  3046. Fpad0 Tuint8_t
  3047. Fsequence Tuint16_t
  3048. Fevent Txcb_window_t
  3049. Fwindow Txcb_window_t
  3050. Fx Tint16_t
  3051. Fy Tint16_t
  3052. }
  3053. type Txcb_resize_request_event_t = struct {
  3054. Fresponse_type Tuint8_t
  3055. Fpad0 Tuint8_t
  3056. Fsequence Tuint16_t
  3057. Fwindow Txcb_window_t
  3058. Fwidth Tuint16_t
  3059. Fheight Tuint16_t
  3060. }
  3061. type Txcb_place_t = int32
  3062. type _xcb_place_t = int32
  3063. const _XCB_PLACE_ON_TOP = 0
  3064. const _XCB_PLACE_ON_BOTTOM = 1
  3065. type Txcb_circulate_notify_event_t = struct {
  3066. Fresponse_type Tuint8_t
  3067. Fpad0 Tuint8_t
  3068. Fsequence Tuint16_t
  3069. Fevent Txcb_window_t
  3070. Fwindow Txcb_window_t
  3071. Fpad1 [4]Tuint8_t
  3072. Fplace Tuint8_t
  3073. Fpad2 [3]Tuint8_t
  3074. }
  3075. type Txcb_circulate_request_event_t = struct {
  3076. Fresponse_type Tuint8_t
  3077. Fpad0 Tuint8_t
  3078. Fsequence Tuint16_t
  3079. Fevent Txcb_window_t
  3080. Fwindow Txcb_window_t
  3081. Fpad1 [4]Tuint8_t
  3082. Fplace Tuint8_t
  3083. Fpad2 [3]Tuint8_t
  3084. }
  3085. type Txcb_circulate_notify_event_t1 = Txcb_circulate_request_event_t
  3086. type Txcb_property_t = int32
  3087. type _xcb_property_t = int32
  3088. const _XCB_PROPERTY_NEW_VALUE = 0
  3089. const _XCB_PROPERTY_DELETE = 1
  3090. type Txcb_property_notify_event_t = struct {
  3091. Fresponse_type Tuint8_t
  3092. Fpad0 Tuint8_t
  3093. Fsequence Tuint16_t
  3094. Fwindow Txcb_window_t
  3095. Fatom Txcb_atom_t
  3096. Ftime Txcb_timestamp_t
  3097. Fstate Tuint8_t
  3098. Fpad1 [3]Tuint8_t
  3099. }
  3100. type Txcb_selection_clear_event_t = struct {
  3101. Fresponse_type Tuint8_t
  3102. Fpad0 Tuint8_t
  3103. Fsequence Tuint16_t
  3104. Ftime Txcb_timestamp_t
  3105. Fowner Txcb_window_t
  3106. Fselection Txcb_atom_t
  3107. }
  3108. type Txcb_time_t = int32
  3109. type _xcb_time_t = int32
  3110. const _XCB_TIME_CURRENT_TIME = 0
  3111. type Txcb_atom_enum_t = int32
  3112. type _xcb_atom_enum_t = int32
  3113. const _XCB_ATOM_NONE = 0
  3114. const _XCB_ATOM_ANY = 0
  3115. const _XCB_ATOM_PRIMARY = 1
  3116. const _XCB_ATOM_SECONDARY = 2
  3117. const _XCB_ATOM_ARC = 3
  3118. const _XCB_ATOM_ATOM = 4
  3119. const _XCB_ATOM_BITMAP = 5
  3120. const _XCB_ATOM_CARDINAL = 6
  3121. const _XCB_ATOM_COLORMAP = 7
  3122. const _XCB_ATOM_CURSOR = 8
  3123. const _XCB_ATOM_CUT_BUFFER0 = 9
  3124. const _XCB_ATOM_CUT_BUFFER1 = 10
  3125. const _XCB_ATOM_CUT_BUFFER2 = 11
  3126. const _XCB_ATOM_CUT_BUFFER3 = 12
  3127. const _XCB_ATOM_CUT_BUFFER4 = 13
  3128. const _XCB_ATOM_CUT_BUFFER5 = 14
  3129. const _XCB_ATOM_CUT_BUFFER6 = 15
  3130. const _XCB_ATOM_CUT_BUFFER7 = 16
  3131. const _XCB_ATOM_DRAWABLE = 17
  3132. const _XCB_ATOM_FONT = 18
  3133. const _XCB_ATOM_INTEGER = 19
  3134. const _XCB_ATOM_PIXMAP = 20
  3135. const _XCB_ATOM_POINT = 21
  3136. const _XCB_ATOM_RECTANGLE = 22
  3137. const _XCB_ATOM_RESOURCE_MANAGER = 23
  3138. const _XCB_ATOM_RGB_COLOR_MAP = 24
  3139. const _XCB_ATOM_RGB_BEST_MAP = 25
  3140. const _XCB_ATOM_RGB_BLUE_MAP = 26
  3141. const _XCB_ATOM_RGB_DEFAULT_MAP = 27
  3142. const _XCB_ATOM_RGB_GRAY_MAP = 28
  3143. const _XCB_ATOM_RGB_GREEN_MAP = 29
  3144. const _XCB_ATOM_RGB_RED_MAP = 30
  3145. const _XCB_ATOM_STRING = 31
  3146. const _XCB_ATOM_VISUALID = 32
  3147. const _XCB_ATOM_WINDOW = 33
  3148. const _XCB_ATOM_WM_COMMAND = 34
  3149. const _XCB_ATOM_WM_HINTS = 35
  3150. const _XCB_ATOM_WM_CLIENT_MACHINE = 36
  3151. const _XCB_ATOM_WM_ICON_NAME = 37
  3152. const _XCB_ATOM_WM_ICON_SIZE = 38
  3153. const _XCB_ATOM_WM_NAME = 39
  3154. const _XCB_ATOM_WM_NORMAL_HINTS = 40
  3155. const _XCB_ATOM_WM_SIZE_HINTS = 41
  3156. const _XCB_ATOM_WM_ZOOM_HINTS = 42
  3157. const _XCB_ATOM_MIN_SPACE = 43
  3158. const _XCB_ATOM_NORM_SPACE = 44
  3159. const _XCB_ATOM_MAX_SPACE = 45
  3160. const _XCB_ATOM_END_SPACE = 46
  3161. const _XCB_ATOM_SUPERSCRIPT_X = 47
  3162. const _XCB_ATOM_SUPERSCRIPT_Y = 48
  3163. const _XCB_ATOM_SUBSCRIPT_X = 49
  3164. const _XCB_ATOM_SUBSCRIPT_Y = 50
  3165. const _XCB_ATOM_UNDERLINE_POSITION = 51
  3166. const _XCB_ATOM_UNDERLINE_THICKNESS = 52
  3167. const _XCB_ATOM_STRIKEOUT_ASCENT = 53
  3168. const _XCB_ATOM_STRIKEOUT_DESCENT = 54
  3169. const _XCB_ATOM_ITALIC_ANGLE = 55
  3170. const _XCB_ATOM_X_HEIGHT = 56
  3171. const _XCB_ATOM_QUAD_WIDTH = 57
  3172. const _XCB_ATOM_WEIGHT = 58
  3173. const _XCB_ATOM_POINT_SIZE = 59
  3174. const _XCB_ATOM_RESOLUTION = 60
  3175. const _XCB_ATOM_COPYRIGHT = 61
  3176. const _XCB_ATOM_NOTICE = 62
  3177. const _XCB_ATOM_FONT_NAME = 63
  3178. const _XCB_ATOM_FAMILY_NAME = 64
  3179. const _XCB_ATOM_FULL_NAME = 65
  3180. const _XCB_ATOM_CAP_HEIGHT = 66
  3181. const _XCB_ATOM_WM_CLASS = 67
  3182. const _XCB_ATOM_WM_TRANSIENT_FOR = 68
  3183. type Txcb_selection_request_event_t = struct {
  3184. Fresponse_type Tuint8_t
  3185. Fpad0 Tuint8_t
  3186. Fsequence Tuint16_t
  3187. Ftime Txcb_timestamp_t
  3188. Fowner Txcb_window_t
  3189. Frequestor Txcb_window_t
  3190. Fselection Txcb_atom_t
  3191. Ftarget Txcb_atom_t
  3192. Fproperty Txcb_atom_t
  3193. }
  3194. type Txcb_selection_notify_event_t = struct {
  3195. Fresponse_type Tuint8_t
  3196. Fpad0 Tuint8_t
  3197. Fsequence Tuint16_t
  3198. Ftime Txcb_timestamp_t
  3199. Frequestor Txcb_window_t
  3200. Fselection Txcb_atom_t
  3201. Ftarget Txcb_atom_t
  3202. Fproperty Txcb_atom_t
  3203. }
  3204. type Txcb_colormap_state_t = int32
  3205. type _xcb_colormap_state_t = int32
  3206. const _XCB_COLORMAP_STATE_UNINSTALLED = 0
  3207. const _XCB_COLORMAP_STATE_INSTALLED = 1
  3208. type Txcb_colormap_enum_t = int32
  3209. type _xcb_colormap_enum_t = int32
  3210. const _XCB_COLORMAP_NONE = 0
  3211. type Txcb_colormap_notify_event_t = struct {
  3212. Fresponse_type Tuint8_t
  3213. Fpad0 Tuint8_t
  3214. Fsequence Tuint16_t
  3215. Fwindow Txcb_window_t
  3216. Fcolormap Txcb_colormap_t
  3217. F_new Tuint8_t
  3218. Fstate Tuint8_t
  3219. Fpad1 [2]Tuint8_t
  3220. }
  3221. type Txcb_client_message_data_t = struct {
  3222. Fdata16 [0][10]Tuint16_t
  3223. Fdata32 [0][5]Tuint32_t
  3224. Fdata8 [20]Tuint8_t
  3225. }
  3226. type Txcb_client_message_data_iterator_t = struct {
  3227. Fdata uintptr
  3228. Frem int32
  3229. Findex int32
  3230. }
  3231. type Txcb_client_message_event_t = struct {
  3232. Fresponse_type Tuint8_t
  3233. Fformat Tuint8_t
  3234. Fsequence Tuint16_t
  3235. Fwindow Txcb_window_t
  3236. Ftype1 Txcb_atom_t
  3237. Fdata Txcb_client_message_data_t
  3238. }
  3239. type Txcb_mapping_t = int32
  3240. type _xcb_mapping_t = int32
  3241. const _XCB_MAPPING_MODIFIER = 0
  3242. const _XCB_MAPPING_KEYBOARD = 1
  3243. const _XCB_MAPPING_POINTER = 2
  3244. type Txcb_mapping_notify_event_t = struct {
  3245. Fresponse_type Tuint8_t
  3246. Fpad0 Tuint8_t
  3247. Fsequence Tuint16_t
  3248. Frequest Tuint8_t
  3249. Ffirst_keycode Txcb_keycode_t
  3250. Fcount Tuint8_t
  3251. Fpad1 Tuint8_t
  3252. }
  3253. type Txcb_ge_generic_event_t = struct {
  3254. Fresponse_type Tuint8_t
  3255. Fextension Tuint8_t
  3256. Fsequence Tuint16_t
  3257. Flength Tuint32_t
  3258. Fevent_type Tuint16_t
  3259. Fpad0 [22]Tuint8_t
  3260. Ffull_sequence Tuint32_t
  3261. }
  3262. type Txcb_request_error_t = struct {
  3263. Fresponse_type Tuint8_t
  3264. Ferror_code Tuint8_t
  3265. Fsequence Tuint16_t
  3266. Fbad_value Tuint32_t
  3267. Fminor_opcode Tuint16_t
  3268. Fmajor_opcode Tuint8_t
  3269. Fpad0 Tuint8_t
  3270. }
  3271. type Txcb_value_error_t = struct {
  3272. Fresponse_type Tuint8_t
  3273. Ferror_code Tuint8_t
  3274. Fsequence Tuint16_t
  3275. Fbad_value Tuint32_t
  3276. Fminor_opcode Tuint16_t
  3277. Fmajor_opcode Tuint8_t
  3278. Fpad0 Tuint8_t
  3279. }
  3280. type Txcb_window_error_t = struct {
  3281. Fresponse_type Tuint8_t
  3282. Ferror_code Tuint8_t
  3283. Fsequence Tuint16_t
  3284. Fbad_value Tuint32_t
  3285. Fminor_opcode Tuint16_t
  3286. Fmajor_opcode Tuint8_t
  3287. Fpad0 Tuint8_t
  3288. }
  3289. type Txcb_value_error_t1 = Txcb_window_error_t
  3290. type Txcb_pixmap_error_t = struct {
  3291. Fresponse_type Tuint8_t
  3292. Ferror_code Tuint8_t
  3293. Fsequence Tuint16_t
  3294. Fbad_value Tuint32_t
  3295. Fminor_opcode Tuint16_t
  3296. Fmajor_opcode Tuint8_t
  3297. Fpad0 Tuint8_t
  3298. }
  3299. type Txcb_atom_error_t = struct {
  3300. Fresponse_type Tuint8_t
  3301. Ferror_code Tuint8_t
  3302. Fsequence Tuint16_t
  3303. Fbad_value Tuint32_t
  3304. Fminor_opcode Tuint16_t
  3305. Fmajor_opcode Tuint8_t
  3306. Fpad0 Tuint8_t
  3307. }
  3308. type Txcb_cursor_error_t = struct {
  3309. Fresponse_type Tuint8_t
  3310. Ferror_code Tuint8_t
  3311. Fsequence Tuint16_t
  3312. Fbad_value Tuint32_t
  3313. Fminor_opcode Tuint16_t
  3314. Fmajor_opcode Tuint8_t
  3315. Fpad0 Tuint8_t
  3316. }
  3317. type Txcb_font_error_t = struct {
  3318. Fresponse_type Tuint8_t
  3319. Ferror_code Tuint8_t
  3320. Fsequence Tuint16_t
  3321. Fbad_value Tuint32_t
  3322. Fminor_opcode Tuint16_t
  3323. Fmajor_opcode Tuint8_t
  3324. Fpad0 Tuint8_t
  3325. }
  3326. type Txcb_match_error_t = struct {
  3327. Fresponse_type Tuint8_t
  3328. Ferror_code Tuint8_t
  3329. Fsequence Tuint16_t
  3330. Fbad_value Tuint32_t
  3331. Fminor_opcode Tuint16_t
  3332. Fmajor_opcode Tuint8_t
  3333. Fpad0 Tuint8_t
  3334. }
  3335. type Txcb_request_error_t1 = Txcb_match_error_t
  3336. type Txcb_drawable_error_t = struct {
  3337. Fresponse_type Tuint8_t
  3338. Ferror_code Tuint8_t
  3339. Fsequence Tuint16_t
  3340. Fbad_value Tuint32_t
  3341. Fminor_opcode Tuint16_t
  3342. Fmajor_opcode Tuint8_t
  3343. Fpad0 Tuint8_t
  3344. }
  3345. type Txcb_access_error_t = struct {
  3346. Fresponse_type Tuint8_t
  3347. Ferror_code Tuint8_t
  3348. Fsequence Tuint16_t
  3349. Fbad_value Tuint32_t
  3350. Fminor_opcode Tuint16_t
  3351. Fmajor_opcode Tuint8_t
  3352. Fpad0 Tuint8_t
  3353. }
  3354. type Txcb_alloc_error_t = struct {
  3355. Fresponse_type Tuint8_t
  3356. Ferror_code Tuint8_t
  3357. Fsequence Tuint16_t
  3358. Fbad_value Tuint32_t
  3359. Fminor_opcode Tuint16_t
  3360. Fmajor_opcode Tuint8_t
  3361. Fpad0 Tuint8_t
  3362. }
  3363. type Txcb_colormap_error_t = struct {
  3364. Fresponse_type Tuint8_t
  3365. Ferror_code Tuint8_t
  3366. Fsequence Tuint16_t
  3367. Fbad_value Tuint32_t
  3368. Fminor_opcode Tuint16_t
  3369. Fmajor_opcode Tuint8_t
  3370. Fpad0 Tuint8_t
  3371. }
  3372. type Txcb_g_context_error_t = struct {
  3373. Fresponse_type Tuint8_t
  3374. Ferror_code Tuint8_t
  3375. Fsequence Tuint16_t
  3376. Fbad_value Tuint32_t
  3377. Fminor_opcode Tuint16_t
  3378. Fmajor_opcode Tuint8_t
  3379. Fpad0 Tuint8_t
  3380. }
  3381. type Txcb_id_choice_error_t = struct {
  3382. Fresponse_type Tuint8_t
  3383. Ferror_code Tuint8_t
  3384. Fsequence Tuint16_t
  3385. Fbad_value Tuint32_t
  3386. Fminor_opcode Tuint16_t
  3387. Fmajor_opcode Tuint8_t
  3388. Fpad0 Tuint8_t
  3389. }
  3390. type Txcb_name_error_t = struct {
  3391. Fresponse_type Tuint8_t
  3392. Ferror_code Tuint8_t
  3393. Fsequence Tuint16_t
  3394. Fbad_value Tuint32_t
  3395. Fminor_opcode Tuint16_t
  3396. Fmajor_opcode Tuint8_t
  3397. Fpad0 Tuint8_t
  3398. }
  3399. type Txcb_length_error_t = struct {
  3400. Fresponse_type Tuint8_t
  3401. Ferror_code Tuint8_t
  3402. Fsequence Tuint16_t
  3403. Fbad_value Tuint32_t
  3404. Fminor_opcode Tuint16_t
  3405. Fmajor_opcode Tuint8_t
  3406. Fpad0 Tuint8_t
  3407. }
  3408. type Txcb_implementation_error_t = struct {
  3409. Fresponse_type Tuint8_t
  3410. Ferror_code Tuint8_t
  3411. Fsequence Tuint16_t
  3412. Fbad_value Tuint32_t
  3413. Fminor_opcode Tuint16_t
  3414. Fmajor_opcode Tuint8_t
  3415. Fpad0 Tuint8_t
  3416. }
  3417. type Txcb_window_class_t = int32
  3418. type _xcb_window_class_t = int32
  3419. const _XCB_WINDOW_CLASS_COPY_FROM_PARENT = 0
  3420. const _XCB_WINDOW_CLASS_INPUT_OUTPUT = 1
  3421. const _XCB_WINDOW_CLASS_INPUT_ONLY = 2
  3422. type Txcb_cw_t = int32
  3423. type _xcb_cw_t = int32
  3424. const _XCB_CW_BACK_PIXMAP = 1
  3425. const _XCB_CW_BACK_PIXEL = 2
  3426. const _XCB_CW_BORDER_PIXMAP = 4
  3427. const _XCB_CW_BORDER_PIXEL = 8
  3428. const _XCB_CW_BIT_GRAVITY = 16
  3429. const _XCB_CW_WIN_GRAVITY = 32
  3430. const _XCB_CW_BACKING_STORE = 64
  3431. const _XCB_CW_BACKING_PLANES = 128
  3432. const _XCB_CW_BACKING_PIXEL = 256
  3433. const _XCB_CW_OVERRIDE_REDIRECT = 512
  3434. const _XCB_CW_SAVE_UNDER = 1024
  3435. const _XCB_CW_EVENT_MASK = 2048
  3436. const _XCB_CW_DONT_PROPAGATE = 4096
  3437. const _XCB_CW_COLORMAP = 8192
  3438. const _XCB_CW_CURSOR = 16384
  3439. type Txcb_back_pixmap_t = int32
  3440. type _xcb_back_pixmap_t = int32
  3441. const _XCB_BACK_PIXMAP_NONE = 0
  3442. const _XCB_BACK_PIXMAP_PARENT_RELATIVE = 1
  3443. type Txcb_gravity_t = int32
  3444. type _xcb_gravity_t = int32
  3445. const _XCB_GRAVITY_BIT_FORGET = 0
  3446. const _XCB_GRAVITY_WIN_UNMAP = 0
  3447. const _XCB_GRAVITY_NORTH_WEST = 1
  3448. const _XCB_GRAVITY_NORTH = 2
  3449. const _XCB_GRAVITY_NORTH_EAST = 3
  3450. const _XCB_GRAVITY_WEST = 4
  3451. const _XCB_GRAVITY_CENTER = 5
  3452. const _XCB_GRAVITY_EAST = 6
  3453. const _XCB_GRAVITY_SOUTH_WEST = 7
  3454. const _XCB_GRAVITY_SOUTH = 8
  3455. const _XCB_GRAVITY_SOUTH_EAST = 9
  3456. const _XCB_GRAVITY_STATIC = 10
  3457. type Txcb_create_window_value_list_t = struct {
  3458. Fbackground_pixmap Txcb_pixmap_t
  3459. Fbackground_pixel Tuint32_t
  3460. Fborder_pixmap Txcb_pixmap_t
  3461. Fborder_pixel Tuint32_t
  3462. Fbit_gravity Tuint32_t
  3463. Fwin_gravity Tuint32_t
  3464. Fbacking_store Tuint32_t
  3465. Fbacking_planes Tuint32_t
  3466. Fbacking_pixel Tuint32_t
  3467. Foverride_redirect Txcb_bool32_t
  3468. Fsave_under Txcb_bool32_t
  3469. Fevent_mask Tuint32_t
  3470. Fdo_not_propogate_mask Tuint32_t
  3471. Fcolormap Txcb_colormap_t
  3472. Fcursor Txcb_cursor_t
  3473. }
  3474. type Txcb_create_window_request_t = struct {
  3475. Fmajor_opcode Tuint8_t
  3476. Fdepth Tuint8_t
  3477. Flength Tuint16_t
  3478. Fwid Txcb_window_t
  3479. Fparent Txcb_window_t
  3480. Fx Tint16_t
  3481. Fy Tint16_t
  3482. Fwidth Tuint16_t
  3483. Fheight Tuint16_t
  3484. Fborder_width Tuint16_t
  3485. F_class Tuint16_t
  3486. Fvisual Txcb_visualid_t
  3487. Fvalue_mask Tuint32_t
  3488. }
  3489. type Txcb_change_window_attributes_value_list_t = struct {
  3490. Fbackground_pixmap Txcb_pixmap_t
  3491. Fbackground_pixel Tuint32_t
  3492. Fborder_pixmap Txcb_pixmap_t
  3493. Fborder_pixel Tuint32_t
  3494. Fbit_gravity Tuint32_t
  3495. Fwin_gravity Tuint32_t
  3496. Fbacking_store Tuint32_t
  3497. Fbacking_planes Tuint32_t
  3498. Fbacking_pixel Tuint32_t
  3499. Foverride_redirect Txcb_bool32_t
  3500. Fsave_under Txcb_bool32_t
  3501. Fevent_mask Tuint32_t
  3502. Fdo_not_propogate_mask Tuint32_t
  3503. Fcolormap Txcb_colormap_t
  3504. Fcursor Txcb_cursor_t
  3505. }
  3506. type Txcb_change_window_attributes_request_t = struct {
  3507. Fmajor_opcode Tuint8_t
  3508. Fpad0 Tuint8_t
  3509. Flength Tuint16_t
  3510. Fwindow Txcb_window_t
  3511. Fvalue_mask Tuint32_t
  3512. }
  3513. type Txcb_map_state_t = int32
  3514. type _xcb_map_state_t = int32
  3515. const _XCB_MAP_STATE_UNMAPPED = 0
  3516. const _XCB_MAP_STATE_UNVIEWABLE = 1
  3517. const _XCB_MAP_STATE_VIEWABLE = 2
  3518. type Txcb_get_window_attributes_cookie_t = struct {
  3519. Fsequence uint32
  3520. }
  3521. type Txcb_get_window_attributes_request_t = struct {
  3522. Fmajor_opcode Tuint8_t
  3523. Fpad0 Tuint8_t
  3524. Flength Tuint16_t
  3525. Fwindow Txcb_window_t
  3526. }
  3527. type Txcb_get_window_attributes_reply_t = struct {
  3528. Fresponse_type Tuint8_t
  3529. Fbacking_store Tuint8_t
  3530. Fsequence Tuint16_t
  3531. Flength Tuint32_t
  3532. Fvisual Txcb_visualid_t
  3533. F_class Tuint16_t
  3534. Fbit_gravity Tuint8_t
  3535. Fwin_gravity Tuint8_t
  3536. Fbacking_planes Tuint32_t
  3537. Fbacking_pixel Tuint32_t
  3538. Fsave_under Tuint8_t
  3539. Fmap_is_installed Tuint8_t
  3540. Fmap_state Tuint8_t
  3541. Foverride_redirect Tuint8_t
  3542. Fcolormap Txcb_colormap_t
  3543. Fall_event_masks Tuint32_t
  3544. Fyour_event_mask Tuint32_t
  3545. Fdo_not_propagate_mask Tuint16_t
  3546. Fpad0 [2]Tuint8_t
  3547. }
  3548. type Txcb_destroy_window_request_t = struct {
  3549. Fmajor_opcode Tuint8_t
  3550. Fpad0 Tuint8_t
  3551. Flength Tuint16_t
  3552. Fwindow Txcb_window_t
  3553. }
  3554. type Txcb_destroy_subwindows_request_t = struct {
  3555. Fmajor_opcode Tuint8_t
  3556. Fpad0 Tuint8_t
  3557. Flength Tuint16_t
  3558. Fwindow Txcb_window_t
  3559. }
  3560. type Txcb_set_mode_t = int32
  3561. type _xcb_set_mode_t = int32
  3562. const _XCB_SET_MODE_INSERT = 0
  3563. const _XCB_SET_MODE_DELETE = 1
  3564. type Txcb_change_save_set_request_t = struct {
  3565. Fmajor_opcode Tuint8_t
  3566. Fmode Tuint8_t
  3567. Flength Tuint16_t
  3568. Fwindow Txcb_window_t
  3569. }
  3570. type Txcb_reparent_window_request_t = struct {
  3571. Fmajor_opcode Tuint8_t
  3572. Fpad0 Tuint8_t
  3573. Flength Tuint16_t
  3574. Fwindow Txcb_window_t
  3575. Fparent Txcb_window_t
  3576. Fx Tint16_t
  3577. Fy Tint16_t
  3578. }
  3579. type Txcb_map_window_request_t = struct {
  3580. Fmajor_opcode Tuint8_t
  3581. Fpad0 Tuint8_t
  3582. Flength Tuint16_t
  3583. Fwindow Txcb_window_t
  3584. }
  3585. type Txcb_map_subwindows_request_t = struct {
  3586. Fmajor_opcode Tuint8_t
  3587. Fpad0 Tuint8_t
  3588. Flength Tuint16_t
  3589. Fwindow Txcb_window_t
  3590. }
  3591. type Txcb_unmap_window_request_t = struct {
  3592. Fmajor_opcode Tuint8_t
  3593. Fpad0 Tuint8_t
  3594. Flength Tuint16_t
  3595. Fwindow Txcb_window_t
  3596. }
  3597. type Txcb_unmap_subwindows_request_t = struct {
  3598. Fmajor_opcode Tuint8_t
  3599. Fpad0 Tuint8_t
  3600. Flength Tuint16_t
  3601. Fwindow Txcb_window_t
  3602. }
  3603. type Txcb_config_window_t = int32
  3604. type _xcb_config_window_t = int32
  3605. const _XCB_CONFIG_WINDOW_X = 1
  3606. const _XCB_CONFIG_WINDOW_Y = 2
  3607. const _XCB_CONFIG_WINDOW_WIDTH = 4
  3608. const _XCB_CONFIG_WINDOW_HEIGHT = 8
  3609. const _XCB_CONFIG_WINDOW_BORDER_WIDTH = 16
  3610. const _XCB_CONFIG_WINDOW_SIBLING = 32
  3611. const _XCB_CONFIG_WINDOW_STACK_MODE = 64
  3612. type Txcb_stack_mode_t = int32
  3613. type _xcb_stack_mode_t = int32
  3614. const _XCB_STACK_MODE_ABOVE = 0
  3615. const _XCB_STACK_MODE_BELOW = 1
  3616. const _XCB_STACK_MODE_TOP_IF = 2
  3617. const _XCB_STACK_MODE_BOTTOM_IF = 3
  3618. const _XCB_STACK_MODE_OPPOSITE = 4
  3619. type Txcb_configure_window_value_list_t = struct {
  3620. Fx Tint32_t
  3621. Fy Tint32_t
  3622. Fwidth Tuint32_t
  3623. Fheight Tuint32_t
  3624. Fborder_width Tuint32_t
  3625. Fsibling Txcb_window_t
  3626. Fstack_mode Tuint32_t
  3627. }
  3628. type Txcb_configure_window_request_t = struct {
  3629. Fmajor_opcode Tuint8_t
  3630. Fpad0 Tuint8_t
  3631. Flength Tuint16_t
  3632. Fwindow Txcb_window_t
  3633. Fvalue_mask Tuint16_t
  3634. Fpad1 [2]Tuint8_t
  3635. }
  3636. type Txcb_circulate_t = int32
  3637. type _xcb_circulate_t = int32
  3638. const _XCB_CIRCULATE_RAISE_LOWEST = 0
  3639. const _XCB_CIRCULATE_LOWER_HIGHEST = 1
  3640. type Txcb_circulate_window_request_t = struct {
  3641. Fmajor_opcode Tuint8_t
  3642. Fdirection Tuint8_t
  3643. Flength Tuint16_t
  3644. Fwindow Txcb_window_t
  3645. }
  3646. type Txcb_get_geometry_cookie_t = struct {
  3647. Fsequence uint32
  3648. }
  3649. type Txcb_get_geometry_request_t = struct {
  3650. Fmajor_opcode Tuint8_t
  3651. Fpad0 Tuint8_t
  3652. Flength Tuint16_t
  3653. Fdrawable Txcb_drawable_t
  3654. }
  3655. type Txcb_get_geometry_reply_t = struct {
  3656. Fresponse_type Tuint8_t
  3657. Fdepth Tuint8_t
  3658. Fsequence Tuint16_t
  3659. Flength Tuint32_t
  3660. Froot Txcb_window_t
  3661. Fx Tint16_t
  3662. Fy Tint16_t
  3663. Fwidth Tuint16_t
  3664. Fheight Tuint16_t
  3665. Fborder_width Tuint16_t
  3666. Fpad0 [2]Tuint8_t
  3667. }
  3668. type Txcb_query_tree_cookie_t = struct {
  3669. Fsequence uint32
  3670. }
  3671. type Txcb_query_tree_request_t = struct {
  3672. Fmajor_opcode Tuint8_t
  3673. Fpad0 Tuint8_t
  3674. Flength Tuint16_t
  3675. Fwindow Txcb_window_t
  3676. }
  3677. type Txcb_query_tree_reply_t = struct {
  3678. Fresponse_type Tuint8_t
  3679. Fpad0 Tuint8_t
  3680. Fsequence Tuint16_t
  3681. Flength Tuint32_t
  3682. Froot Txcb_window_t
  3683. Fparent Txcb_window_t
  3684. Fchildren_len Tuint16_t
  3685. Fpad1 [14]Tuint8_t
  3686. }
  3687. type Txcb_intern_atom_cookie_t = struct {
  3688. Fsequence uint32
  3689. }
  3690. type Txcb_intern_atom_request_t = struct {
  3691. Fmajor_opcode Tuint8_t
  3692. Fonly_if_exists Tuint8_t
  3693. Flength Tuint16_t
  3694. Fname_len Tuint16_t
  3695. Fpad0 [2]Tuint8_t
  3696. }
  3697. type Txcb_intern_atom_reply_t = struct {
  3698. Fresponse_type Tuint8_t
  3699. Fpad0 Tuint8_t
  3700. Fsequence Tuint16_t
  3701. Flength Tuint32_t
  3702. Fatom Txcb_atom_t
  3703. }
  3704. type Txcb_get_atom_name_cookie_t = struct {
  3705. Fsequence uint32
  3706. }
  3707. type Txcb_get_atom_name_request_t = struct {
  3708. Fmajor_opcode Tuint8_t
  3709. Fpad0 Tuint8_t
  3710. Flength Tuint16_t
  3711. Fatom Txcb_atom_t
  3712. }
  3713. type Txcb_get_atom_name_reply_t = struct {
  3714. Fresponse_type Tuint8_t
  3715. Fpad0 Tuint8_t
  3716. Fsequence Tuint16_t
  3717. Flength Tuint32_t
  3718. Fname_len Tuint16_t
  3719. Fpad1 [22]Tuint8_t
  3720. }
  3721. type Txcb_prop_mode_t = int32
  3722. type _xcb_prop_mode_t = int32
  3723. const _XCB_PROP_MODE_REPLACE = 0
  3724. const _XCB_PROP_MODE_PREPEND = 1
  3725. const _XCB_PROP_MODE_APPEND = 2
  3726. type Txcb_change_property_request_t = struct {
  3727. Fmajor_opcode Tuint8_t
  3728. Fmode Tuint8_t
  3729. Flength Tuint16_t
  3730. Fwindow Txcb_window_t
  3731. Fproperty Txcb_atom_t
  3732. Ftype1 Txcb_atom_t
  3733. Fformat Tuint8_t
  3734. Fpad0 [3]Tuint8_t
  3735. Fdata_len Tuint32_t
  3736. }
  3737. type Txcb_delete_property_request_t = struct {
  3738. Fmajor_opcode Tuint8_t
  3739. Fpad0 Tuint8_t
  3740. Flength Tuint16_t
  3741. Fwindow Txcb_window_t
  3742. Fproperty Txcb_atom_t
  3743. }
  3744. type Txcb_get_property_type_t = int32
  3745. type _xcb_get_property_type_t = int32
  3746. const _XCB_GET_PROPERTY_TYPE_ANY = 0
  3747. type Txcb_get_property_cookie_t = struct {
  3748. Fsequence uint32
  3749. }
  3750. type Txcb_get_property_request_t = struct {
  3751. Fmajor_opcode Tuint8_t
  3752. F_delete Tuint8_t
  3753. Flength Tuint16_t
  3754. Fwindow Txcb_window_t
  3755. Fproperty Txcb_atom_t
  3756. Ftype1 Txcb_atom_t
  3757. Flong_offset Tuint32_t
  3758. Flong_length Tuint32_t
  3759. }
  3760. type Txcb_get_property_reply_t = struct {
  3761. Fresponse_type Tuint8_t
  3762. Fformat Tuint8_t
  3763. Fsequence Tuint16_t
  3764. Flength Tuint32_t
  3765. Ftype1 Txcb_atom_t
  3766. Fbytes_after Tuint32_t
  3767. Fvalue_len Tuint32_t
  3768. Fpad0 [12]Tuint8_t
  3769. }
  3770. type Txcb_list_properties_cookie_t = struct {
  3771. Fsequence uint32
  3772. }
  3773. type Txcb_list_properties_request_t = struct {
  3774. Fmajor_opcode Tuint8_t
  3775. Fpad0 Tuint8_t
  3776. Flength Tuint16_t
  3777. Fwindow Txcb_window_t
  3778. }
  3779. type Txcb_list_properties_reply_t = struct {
  3780. Fresponse_type Tuint8_t
  3781. Fpad0 Tuint8_t
  3782. Fsequence Tuint16_t
  3783. Flength Tuint32_t
  3784. Fatoms_len Tuint16_t
  3785. Fpad1 [22]Tuint8_t
  3786. }
  3787. type Txcb_set_selection_owner_request_t = struct {
  3788. Fmajor_opcode Tuint8_t
  3789. Fpad0 Tuint8_t
  3790. Flength Tuint16_t
  3791. Fowner Txcb_window_t
  3792. Fselection Txcb_atom_t
  3793. Ftime Txcb_timestamp_t
  3794. }
  3795. type Txcb_get_selection_owner_cookie_t = struct {
  3796. Fsequence uint32
  3797. }
  3798. type Txcb_get_selection_owner_request_t = struct {
  3799. Fmajor_opcode Tuint8_t
  3800. Fpad0 Tuint8_t
  3801. Flength Tuint16_t
  3802. Fselection Txcb_atom_t
  3803. }
  3804. type Txcb_get_selection_owner_reply_t = struct {
  3805. Fresponse_type Tuint8_t
  3806. Fpad0 Tuint8_t
  3807. Fsequence Tuint16_t
  3808. Flength Tuint32_t
  3809. Fowner Txcb_window_t
  3810. }
  3811. type Txcb_convert_selection_request_t = struct {
  3812. Fmajor_opcode Tuint8_t
  3813. Fpad0 Tuint8_t
  3814. Flength Tuint16_t
  3815. Frequestor Txcb_window_t
  3816. Fselection Txcb_atom_t
  3817. Ftarget Txcb_atom_t
  3818. Fproperty Txcb_atom_t
  3819. Ftime Txcb_timestamp_t
  3820. }
  3821. type Txcb_send_event_dest_t = int32
  3822. type _xcb_send_event_dest_t = int32
  3823. const _XCB_SEND_EVENT_DEST_POINTER_WINDOW = 0
  3824. const _XCB_SEND_EVENT_DEST_ITEM_FOCUS = 1
  3825. type Txcb_send_event_request_t = struct {
  3826. Fmajor_opcode Tuint8_t
  3827. Fpropagate Tuint8_t
  3828. Flength Tuint16_t
  3829. Fdestination Txcb_window_t
  3830. Fevent_mask Tuint32_t
  3831. Fevent [32]int8
  3832. }
  3833. type Txcb_grab_mode_t = int32
  3834. type _xcb_grab_mode_t = int32
  3835. const _XCB_GRAB_MODE_SYNC = 0
  3836. const _XCB_GRAB_MODE_ASYNC = 1
  3837. type Txcb_grab_status_t = int32
  3838. type _xcb_grab_status_t = int32
  3839. const _XCB_GRAB_STATUS_SUCCESS = 0
  3840. const _XCB_GRAB_STATUS_ALREADY_GRABBED = 1
  3841. const _XCB_GRAB_STATUS_INVALID_TIME = 2
  3842. const _XCB_GRAB_STATUS_NOT_VIEWABLE = 3
  3843. const _XCB_GRAB_STATUS_FROZEN = 4
  3844. type Txcb_cursor_enum_t = int32
  3845. type _xcb_cursor_enum_t = int32
  3846. const _XCB_CURSOR_NONE = 0
  3847. type Txcb_grab_pointer_cookie_t = struct {
  3848. Fsequence uint32
  3849. }
  3850. type Txcb_grab_pointer_request_t = struct {
  3851. Fmajor_opcode Tuint8_t
  3852. Fowner_events Tuint8_t
  3853. Flength Tuint16_t
  3854. Fgrab_window Txcb_window_t
  3855. Fevent_mask Tuint16_t
  3856. Fpointer_mode Tuint8_t
  3857. Fkeyboard_mode Tuint8_t
  3858. Fconfine_to Txcb_window_t
  3859. Fcursor Txcb_cursor_t
  3860. Ftime Txcb_timestamp_t
  3861. }
  3862. type Txcb_grab_pointer_reply_t = struct {
  3863. Fresponse_type Tuint8_t
  3864. Fstatus Tuint8_t
  3865. Fsequence Tuint16_t
  3866. Flength Tuint32_t
  3867. }
  3868. type Txcb_ungrab_pointer_request_t = struct {
  3869. Fmajor_opcode Tuint8_t
  3870. Fpad0 Tuint8_t
  3871. Flength Tuint16_t
  3872. Ftime Txcb_timestamp_t
  3873. }
  3874. type Txcb_button_index_t = int32
  3875. type _xcb_button_index_t = int32
  3876. const _XCB_BUTTON_INDEX_ANY = 0
  3877. const _XCB_BUTTON_INDEX_1 = 1
  3878. const _XCB_BUTTON_INDEX_2 = 2
  3879. const _XCB_BUTTON_INDEX_3 = 3
  3880. const _XCB_BUTTON_INDEX_4 = 4
  3881. const _XCB_BUTTON_INDEX_5 = 5
  3882. type Txcb_grab_button_request_t = struct {
  3883. Fmajor_opcode Tuint8_t
  3884. Fowner_events Tuint8_t
  3885. Flength Tuint16_t
  3886. Fgrab_window Txcb_window_t
  3887. Fevent_mask Tuint16_t
  3888. Fpointer_mode Tuint8_t
  3889. Fkeyboard_mode Tuint8_t
  3890. Fconfine_to Txcb_window_t
  3891. Fcursor Txcb_cursor_t
  3892. Fbutton Tuint8_t
  3893. Fpad0 Tuint8_t
  3894. Fmodifiers Tuint16_t
  3895. }
  3896. type Txcb_ungrab_button_request_t = struct {
  3897. Fmajor_opcode Tuint8_t
  3898. Fbutton Tuint8_t
  3899. Flength Tuint16_t
  3900. Fgrab_window Txcb_window_t
  3901. Fmodifiers Tuint16_t
  3902. Fpad0 [2]Tuint8_t
  3903. }
  3904. type Txcb_change_active_pointer_grab_request_t = struct {
  3905. Fmajor_opcode Tuint8_t
  3906. Fpad0 Tuint8_t
  3907. Flength Tuint16_t
  3908. Fcursor Txcb_cursor_t
  3909. Ftime Txcb_timestamp_t
  3910. Fevent_mask Tuint16_t
  3911. Fpad1 [2]Tuint8_t
  3912. }
  3913. type Txcb_grab_keyboard_cookie_t = struct {
  3914. Fsequence uint32
  3915. }
  3916. type Txcb_grab_keyboard_request_t = struct {
  3917. Fmajor_opcode Tuint8_t
  3918. Fowner_events Tuint8_t
  3919. Flength Tuint16_t
  3920. Fgrab_window Txcb_window_t
  3921. Ftime Txcb_timestamp_t
  3922. Fpointer_mode Tuint8_t
  3923. Fkeyboard_mode Tuint8_t
  3924. Fpad0 [2]Tuint8_t
  3925. }
  3926. type Txcb_grab_keyboard_reply_t = struct {
  3927. Fresponse_type Tuint8_t
  3928. Fstatus Tuint8_t
  3929. Fsequence Tuint16_t
  3930. Flength Tuint32_t
  3931. }
  3932. type Txcb_ungrab_keyboard_request_t = struct {
  3933. Fmajor_opcode Tuint8_t
  3934. Fpad0 Tuint8_t
  3935. Flength Tuint16_t
  3936. Ftime Txcb_timestamp_t
  3937. }
  3938. type Txcb_grab_t = int32
  3939. type _xcb_grab_t = int32
  3940. const _XCB_GRAB_ANY = 0
  3941. type Txcb_grab_key_request_t = struct {
  3942. Fmajor_opcode Tuint8_t
  3943. Fowner_events Tuint8_t
  3944. Flength Tuint16_t
  3945. Fgrab_window Txcb_window_t
  3946. Fmodifiers Tuint16_t
  3947. Fkey Txcb_keycode_t
  3948. Fpointer_mode Tuint8_t
  3949. Fkeyboard_mode Tuint8_t
  3950. Fpad0 [3]Tuint8_t
  3951. }
  3952. type Txcb_ungrab_key_request_t = struct {
  3953. Fmajor_opcode Tuint8_t
  3954. Fkey Txcb_keycode_t
  3955. Flength Tuint16_t
  3956. Fgrab_window Txcb_window_t
  3957. Fmodifiers Tuint16_t
  3958. Fpad0 [2]Tuint8_t
  3959. }
  3960. type Txcb_allow_t = int32
  3961. type _xcb_allow_t = int32
  3962. const _XCB_ALLOW_ASYNC_POINTER = 0
  3963. const _XCB_ALLOW_SYNC_POINTER = 1
  3964. const _XCB_ALLOW_REPLAY_POINTER = 2
  3965. const _XCB_ALLOW_ASYNC_KEYBOARD = 3
  3966. const _XCB_ALLOW_SYNC_KEYBOARD = 4
  3967. const _XCB_ALLOW_REPLAY_KEYBOARD = 5
  3968. const _XCB_ALLOW_ASYNC_BOTH = 6
  3969. const _XCB_ALLOW_SYNC_BOTH = 7
  3970. type Txcb_allow_events_request_t = struct {
  3971. Fmajor_opcode Tuint8_t
  3972. Fmode Tuint8_t
  3973. Flength Tuint16_t
  3974. Ftime Txcb_timestamp_t
  3975. }
  3976. type Txcb_grab_server_request_t = struct {
  3977. Fmajor_opcode Tuint8_t
  3978. Fpad0 Tuint8_t
  3979. Flength Tuint16_t
  3980. }
  3981. type Txcb_ungrab_server_request_t = struct {
  3982. Fmajor_opcode Tuint8_t
  3983. Fpad0 Tuint8_t
  3984. Flength Tuint16_t
  3985. }
  3986. type Txcb_query_pointer_cookie_t = struct {
  3987. Fsequence uint32
  3988. }
  3989. type Txcb_query_pointer_request_t = struct {
  3990. Fmajor_opcode Tuint8_t
  3991. Fpad0 Tuint8_t
  3992. Flength Tuint16_t
  3993. Fwindow Txcb_window_t
  3994. }
  3995. type Txcb_query_pointer_reply_t = struct {
  3996. Fresponse_type Tuint8_t
  3997. Fsame_screen Tuint8_t
  3998. Fsequence Tuint16_t
  3999. Flength Tuint32_t
  4000. Froot Txcb_window_t
  4001. Fchild Txcb_window_t
  4002. Froot_x Tint16_t
  4003. Froot_y Tint16_t
  4004. Fwin_x Tint16_t
  4005. Fwin_y Tint16_t
  4006. Fmask Tuint16_t
  4007. Fpad0 [2]Tuint8_t
  4008. }
  4009. type Txcb_timecoord_t = struct {
  4010. Ftime Txcb_timestamp_t
  4011. Fx Tint16_t
  4012. Fy Tint16_t
  4013. }
  4014. type Txcb_timecoord_iterator_t = struct {
  4015. Fdata uintptr
  4016. Frem int32
  4017. Findex int32
  4018. }
  4019. type Txcb_get_motion_events_cookie_t = struct {
  4020. Fsequence uint32
  4021. }
  4022. type Txcb_get_motion_events_request_t = struct {
  4023. Fmajor_opcode Tuint8_t
  4024. Fpad0 Tuint8_t
  4025. Flength Tuint16_t
  4026. Fwindow Txcb_window_t
  4027. Fstart Txcb_timestamp_t
  4028. Fstop Txcb_timestamp_t
  4029. }
  4030. type Txcb_get_motion_events_reply_t = struct {
  4031. Fresponse_type Tuint8_t
  4032. Fpad0 Tuint8_t
  4033. Fsequence Tuint16_t
  4034. Flength Tuint32_t
  4035. Fevents_len Tuint32_t
  4036. Fpad1 [20]Tuint8_t
  4037. }
  4038. type Txcb_translate_coordinates_cookie_t = struct {
  4039. Fsequence uint32
  4040. }
  4041. type Txcb_translate_coordinates_request_t = struct {
  4042. Fmajor_opcode Tuint8_t
  4043. Fpad0 Tuint8_t
  4044. Flength Tuint16_t
  4045. Fsrc_window Txcb_window_t
  4046. Fdst_window Txcb_window_t
  4047. Fsrc_x Tint16_t
  4048. Fsrc_y Tint16_t
  4049. }
  4050. type Txcb_translate_coordinates_reply_t = struct {
  4051. Fresponse_type Tuint8_t
  4052. Fsame_screen Tuint8_t
  4053. Fsequence Tuint16_t
  4054. Flength Tuint32_t
  4055. Fchild Txcb_window_t
  4056. Fdst_x Tint16_t
  4057. Fdst_y Tint16_t
  4058. }
  4059. type Txcb_warp_pointer_request_t = struct {
  4060. Fmajor_opcode Tuint8_t
  4061. Fpad0 Tuint8_t
  4062. Flength Tuint16_t
  4063. Fsrc_window Txcb_window_t
  4064. Fdst_window Txcb_window_t
  4065. Fsrc_x Tint16_t
  4066. Fsrc_y Tint16_t
  4067. Fsrc_width Tuint16_t
  4068. Fsrc_height Tuint16_t
  4069. Fdst_x Tint16_t
  4070. Fdst_y Tint16_t
  4071. }
  4072. type Txcb_input_focus_t = int32
  4073. type _xcb_input_focus_t = int32
  4074. const _XCB_INPUT_FOCUS_NONE = 0
  4075. const _XCB_INPUT_FOCUS_POINTER_ROOT = 1
  4076. const _XCB_INPUT_FOCUS_PARENT = 2
  4077. const _XCB_INPUT_FOCUS_FOLLOW_KEYBOARD = 3
  4078. type Txcb_set_input_focus_request_t = struct {
  4079. Fmajor_opcode Tuint8_t
  4080. Frevert_to Tuint8_t
  4081. Flength Tuint16_t
  4082. Ffocus Txcb_window_t
  4083. Ftime Txcb_timestamp_t
  4084. }
  4085. type Txcb_get_input_focus_cookie_t = struct {
  4086. Fsequence uint32
  4087. }
  4088. type Txcb_get_input_focus_request_t = struct {
  4089. Fmajor_opcode Tuint8_t
  4090. Fpad0 Tuint8_t
  4091. Flength Tuint16_t
  4092. }
  4093. type Txcb_get_input_focus_reply_t = struct {
  4094. Fresponse_type Tuint8_t
  4095. Frevert_to Tuint8_t
  4096. Fsequence Tuint16_t
  4097. Flength Tuint32_t
  4098. Ffocus Txcb_window_t
  4099. }
  4100. type Txcb_query_keymap_cookie_t = struct {
  4101. Fsequence uint32
  4102. }
  4103. type Txcb_query_keymap_request_t = struct {
  4104. Fmajor_opcode Tuint8_t
  4105. Fpad0 Tuint8_t
  4106. Flength Tuint16_t
  4107. }
  4108. type Txcb_query_keymap_reply_t = struct {
  4109. Fresponse_type Tuint8_t
  4110. Fpad0 Tuint8_t
  4111. Fsequence Tuint16_t
  4112. Flength Tuint32_t
  4113. Fkeys [32]Tuint8_t
  4114. }
  4115. type Txcb_open_font_request_t = struct {
  4116. Fmajor_opcode Tuint8_t
  4117. Fpad0 Tuint8_t
  4118. Flength Tuint16_t
  4119. Ffid Txcb_font_t
  4120. Fname_len Tuint16_t
  4121. Fpad1 [2]Tuint8_t
  4122. }
  4123. type Txcb_close_font_request_t = struct {
  4124. Fmajor_opcode Tuint8_t
  4125. Fpad0 Tuint8_t
  4126. Flength Tuint16_t
  4127. Ffont Txcb_font_t
  4128. }
  4129. type Txcb_font_draw_t = int32
  4130. type _xcb_font_draw_t = int32
  4131. const _XCB_FONT_DRAW_LEFT_TO_RIGHT = 0
  4132. const _XCB_FONT_DRAW_RIGHT_TO_LEFT = 1
  4133. type Txcb_fontprop_t = struct {
  4134. Fname Txcb_atom_t
  4135. Fvalue Tuint32_t
  4136. }
  4137. type Txcb_fontprop_iterator_t = struct {
  4138. Fdata uintptr
  4139. Frem int32
  4140. Findex int32
  4141. }
  4142. type Txcb_charinfo_t = struct {
  4143. Fleft_side_bearing Tint16_t
  4144. Fright_side_bearing Tint16_t
  4145. Fcharacter_width Tint16_t
  4146. Fascent Tint16_t
  4147. Fdescent Tint16_t
  4148. Fattributes Tuint16_t
  4149. }
  4150. type Txcb_charinfo_iterator_t = struct {
  4151. Fdata uintptr
  4152. Frem int32
  4153. Findex int32
  4154. }
  4155. type Txcb_query_font_cookie_t = struct {
  4156. Fsequence uint32
  4157. }
  4158. type Txcb_query_font_request_t = struct {
  4159. Fmajor_opcode Tuint8_t
  4160. Fpad0 Tuint8_t
  4161. Flength Tuint16_t
  4162. Ffont Txcb_fontable_t
  4163. }
  4164. type Txcb_query_font_reply_t = struct {
  4165. Fresponse_type Tuint8_t
  4166. Fpad0 Tuint8_t
  4167. Fsequence Tuint16_t
  4168. Flength Tuint32_t
  4169. Fmin_bounds Txcb_charinfo_t
  4170. Fpad1 [4]Tuint8_t
  4171. Fmax_bounds Txcb_charinfo_t
  4172. Fpad2 [4]Tuint8_t
  4173. Fmin_char_or_byte2 Tuint16_t
  4174. Fmax_char_or_byte2 Tuint16_t
  4175. Fdefault_char Tuint16_t
  4176. Fproperties_len Tuint16_t
  4177. Fdraw_direction Tuint8_t
  4178. Fmin_byte1 Tuint8_t
  4179. Fmax_byte1 Tuint8_t
  4180. Fall_chars_exist Tuint8_t
  4181. Ffont_ascent Tint16_t
  4182. Ffont_descent Tint16_t
  4183. Fchar_infos_len Tuint32_t
  4184. }
  4185. type Txcb_query_text_extents_cookie_t = struct {
  4186. Fsequence uint32
  4187. }
  4188. type Txcb_query_text_extents_request_t = struct {
  4189. Fmajor_opcode Tuint8_t
  4190. Fodd_length Tuint8_t
  4191. Flength Tuint16_t
  4192. Ffont Txcb_fontable_t
  4193. }
  4194. type Txcb_query_text_extents_reply_t = struct {
  4195. Fresponse_type Tuint8_t
  4196. Fdraw_direction Tuint8_t
  4197. Fsequence Tuint16_t
  4198. Flength Tuint32_t
  4199. Ffont_ascent Tint16_t
  4200. Ffont_descent Tint16_t
  4201. Foverall_ascent Tint16_t
  4202. Foverall_descent Tint16_t
  4203. Foverall_width Tint32_t
  4204. Foverall_left Tint32_t
  4205. Foverall_right Tint32_t
  4206. }
  4207. type Txcb_str_t = struct {
  4208. Fname_len Tuint8_t
  4209. }
  4210. type Txcb_str_iterator_t = struct {
  4211. Fdata uintptr
  4212. Frem int32
  4213. Findex int32
  4214. }
  4215. type Txcb_list_fonts_cookie_t = struct {
  4216. Fsequence uint32
  4217. }
  4218. type Txcb_list_fonts_request_t = struct {
  4219. Fmajor_opcode Tuint8_t
  4220. Fpad0 Tuint8_t
  4221. Flength Tuint16_t
  4222. Fmax_names Tuint16_t
  4223. Fpattern_len Tuint16_t
  4224. }
  4225. type Txcb_list_fonts_reply_t = struct {
  4226. Fresponse_type Tuint8_t
  4227. Fpad0 Tuint8_t
  4228. Fsequence Tuint16_t
  4229. Flength Tuint32_t
  4230. Fnames_len Tuint16_t
  4231. Fpad1 [22]Tuint8_t
  4232. }
  4233. type Txcb_list_fonts_with_info_cookie_t = struct {
  4234. Fsequence uint32
  4235. }
  4236. type Txcb_list_fonts_with_info_request_t = struct {
  4237. Fmajor_opcode Tuint8_t
  4238. Fpad0 Tuint8_t
  4239. Flength Tuint16_t
  4240. Fmax_names Tuint16_t
  4241. Fpattern_len Tuint16_t
  4242. }
  4243. type Txcb_list_fonts_with_info_reply_t = struct {
  4244. Fresponse_type Tuint8_t
  4245. Fname_len Tuint8_t
  4246. Fsequence Tuint16_t
  4247. Flength Tuint32_t
  4248. Fmin_bounds Txcb_charinfo_t
  4249. Fpad0 [4]Tuint8_t
  4250. Fmax_bounds Txcb_charinfo_t
  4251. Fpad1 [4]Tuint8_t
  4252. Fmin_char_or_byte2 Tuint16_t
  4253. Fmax_char_or_byte2 Tuint16_t
  4254. Fdefault_char Tuint16_t
  4255. Fproperties_len Tuint16_t
  4256. Fdraw_direction Tuint8_t
  4257. Fmin_byte1 Tuint8_t
  4258. Fmax_byte1 Tuint8_t
  4259. Fall_chars_exist Tuint8_t
  4260. Ffont_ascent Tint16_t
  4261. Ffont_descent Tint16_t
  4262. Freplies_hint Tuint32_t
  4263. }
  4264. type Txcb_set_font_path_request_t = struct {
  4265. Fmajor_opcode Tuint8_t
  4266. Fpad0 Tuint8_t
  4267. Flength Tuint16_t
  4268. Ffont_qty Tuint16_t
  4269. Fpad1 [2]Tuint8_t
  4270. }
  4271. type Txcb_get_font_path_cookie_t = struct {
  4272. Fsequence uint32
  4273. }
  4274. type Txcb_get_font_path_request_t = struct {
  4275. Fmajor_opcode Tuint8_t
  4276. Fpad0 Tuint8_t
  4277. Flength Tuint16_t
  4278. }
  4279. type Txcb_get_font_path_reply_t = struct {
  4280. Fresponse_type Tuint8_t
  4281. Fpad0 Tuint8_t
  4282. Fsequence Tuint16_t
  4283. Flength Tuint32_t
  4284. Fpath_len Tuint16_t
  4285. Fpad1 [22]Tuint8_t
  4286. }
  4287. type Txcb_create_pixmap_request_t = struct {
  4288. Fmajor_opcode Tuint8_t
  4289. Fdepth Tuint8_t
  4290. Flength Tuint16_t
  4291. Fpid Txcb_pixmap_t
  4292. Fdrawable Txcb_drawable_t
  4293. Fwidth Tuint16_t
  4294. Fheight Tuint16_t
  4295. }
  4296. type Txcb_free_pixmap_request_t = struct {
  4297. Fmajor_opcode Tuint8_t
  4298. Fpad0 Tuint8_t
  4299. Flength Tuint16_t
  4300. Fpixmap Txcb_pixmap_t
  4301. }
  4302. type Txcb_gc_t = int32
  4303. type _xcb_gc_t = int32
  4304. const _XCB_GC_FUNCTION = 1
  4305. const _XCB_GC_PLANE_MASK = 2
  4306. const _XCB_GC_FOREGROUND = 4
  4307. const _XCB_GC_BACKGROUND = 8
  4308. const _XCB_GC_LINE_WIDTH = 16
  4309. const _XCB_GC_LINE_STYLE = 32
  4310. const _XCB_GC_CAP_STYLE = 64
  4311. const _XCB_GC_JOIN_STYLE = 128
  4312. const _XCB_GC_FILL_STYLE = 256
  4313. const _XCB_GC_FILL_RULE = 512
  4314. const _XCB_GC_TILE = 1024
  4315. const _XCB_GC_STIPPLE = 2048
  4316. const _XCB_GC_TILE_STIPPLE_ORIGIN_X = 4096
  4317. const _XCB_GC_TILE_STIPPLE_ORIGIN_Y = 8192
  4318. const _XCB_GC_FONT = 16384
  4319. const _XCB_GC_SUBWINDOW_MODE = 32768
  4320. const _XCB_GC_GRAPHICS_EXPOSURES = 65536
  4321. const _XCB_GC_CLIP_ORIGIN_X = 131072
  4322. const _XCB_GC_CLIP_ORIGIN_Y = 262144
  4323. const _XCB_GC_CLIP_MASK = 524288
  4324. const _XCB_GC_DASH_OFFSET = 1048576
  4325. const _XCB_GC_DASH_LIST = 2097152
  4326. const _XCB_GC_ARC_MODE = 4194304
  4327. type Txcb_gx_t = int32
  4328. type _xcb_gx_t = int32
  4329. const _XCB_GX_CLEAR = 0
  4330. const _XCB_GX_AND = 1
  4331. const _XCB_GX_AND_REVERSE = 2
  4332. const _XCB_GX_COPY = 3
  4333. const _XCB_GX_AND_INVERTED = 4
  4334. const _XCB_GX_NOOP = 5
  4335. const _XCB_GX_XOR = 6
  4336. const _XCB_GX_OR = 7
  4337. const _XCB_GX_NOR = 8
  4338. const _XCB_GX_EQUIV = 9
  4339. const _XCB_GX_INVERT = 10
  4340. const _XCB_GX_OR_REVERSE = 11
  4341. const _XCB_GX_COPY_INVERTED = 12
  4342. const _XCB_GX_OR_INVERTED = 13
  4343. const _XCB_GX_NAND = 14
  4344. const _XCB_GX_SET = 15
  4345. type Txcb_line_style_t = int32
  4346. type _xcb_line_style_t = int32
  4347. const _XCB_LINE_STYLE_SOLID = 0
  4348. const _XCB_LINE_STYLE_ON_OFF_DASH = 1
  4349. const _XCB_LINE_STYLE_DOUBLE_DASH = 2
  4350. type Txcb_cap_style_t = int32
  4351. type _xcb_cap_style_t = int32
  4352. const _XCB_CAP_STYLE_NOT_LAST = 0
  4353. const _XCB_CAP_STYLE_BUTT = 1
  4354. const _XCB_CAP_STYLE_ROUND = 2
  4355. const _XCB_CAP_STYLE_PROJECTING = 3
  4356. type Txcb_join_style_t = int32
  4357. type _xcb_join_style_t = int32
  4358. const _XCB_JOIN_STYLE_MITER = 0
  4359. const _XCB_JOIN_STYLE_ROUND = 1
  4360. const _XCB_JOIN_STYLE_BEVEL = 2
  4361. type Txcb_fill_style_t = int32
  4362. type _xcb_fill_style_t = int32
  4363. const _XCB_FILL_STYLE_SOLID = 0
  4364. const _XCB_FILL_STYLE_TILED = 1
  4365. const _XCB_FILL_STYLE_STIPPLED = 2
  4366. const _XCB_FILL_STYLE_OPAQUE_STIPPLED = 3
  4367. type Txcb_fill_rule_t = int32
  4368. type _xcb_fill_rule_t = int32
  4369. const _XCB_FILL_RULE_EVEN_ODD = 0
  4370. const _XCB_FILL_RULE_WINDING = 1
  4371. type Txcb_subwindow_mode_t = int32
  4372. type _xcb_subwindow_mode_t = int32
  4373. const _XCB_SUBWINDOW_MODE_CLIP_BY_CHILDREN = 0
  4374. const _XCB_SUBWINDOW_MODE_INCLUDE_INFERIORS = 1
  4375. type Txcb_arc_mode_t = int32
  4376. type _xcb_arc_mode_t = int32
  4377. const _XCB_ARC_MODE_CHORD = 0
  4378. const _XCB_ARC_MODE_PIE_SLICE = 1
  4379. type Txcb_create_gc_value_list_t = struct {
  4380. Ffunction Tuint32_t
  4381. Fplane_mask Tuint32_t
  4382. Fforeground Tuint32_t
  4383. Fbackground Tuint32_t
  4384. Fline_width Tuint32_t
  4385. Fline_style Tuint32_t
  4386. Fcap_style Tuint32_t
  4387. Fjoin_style Tuint32_t
  4388. Ffill_style Tuint32_t
  4389. Ffill_rule Tuint32_t
  4390. Ftile Txcb_pixmap_t
  4391. Fstipple Txcb_pixmap_t
  4392. Ftile_stipple_x_origin Tint32_t
  4393. Ftile_stipple_y_origin Tint32_t
  4394. Ffont Txcb_font_t
  4395. Fsubwindow_mode Tuint32_t
  4396. Fgraphics_exposures Txcb_bool32_t
  4397. Fclip_x_origin Tint32_t
  4398. Fclip_y_origin Tint32_t
  4399. Fclip_mask Txcb_pixmap_t
  4400. Fdash_offset Tuint32_t
  4401. Fdashes Tuint32_t
  4402. Farc_mode Tuint32_t
  4403. }
  4404. type Txcb_create_gc_request_t = struct {
  4405. Fmajor_opcode Tuint8_t
  4406. Fpad0 Tuint8_t
  4407. Flength Tuint16_t
  4408. Fcid Txcb_gcontext_t
  4409. Fdrawable Txcb_drawable_t
  4410. Fvalue_mask Tuint32_t
  4411. }
  4412. type Txcb_change_gc_value_list_t = struct {
  4413. Ffunction Tuint32_t
  4414. Fplane_mask Tuint32_t
  4415. Fforeground Tuint32_t
  4416. Fbackground Tuint32_t
  4417. Fline_width Tuint32_t
  4418. Fline_style Tuint32_t
  4419. Fcap_style Tuint32_t
  4420. Fjoin_style Tuint32_t
  4421. Ffill_style Tuint32_t
  4422. Ffill_rule Tuint32_t
  4423. Ftile Txcb_pixmap_t
  4424. Fstipple Txcb_pixmap_t
  4425. Ftile_stipple_x_origin Tint32_t
  4426. Ftile_stipple_y_origin Tint32_t
  4427. Ffont Txcb_font_t
  4428. Fsubwindow_mode Tuint32_t
  4429. Fgraphics_exposures Txcb_bool32_t
  4430. Fclip_x_origin Tint32_t
  4431. Fclip_y_origin Tint32_t
  4432. Fclip_mask Txcb_pixmap_t
  4433. Fdash_offset Tuint32_t
  4434. Fdashes Tuint32_t
  4435. Farc_mode Tuint32_t
  4436. }
  4437. type Txcb_change_gc_request_t = struct {
  4438. Fmajor_opcode Tuint8_t
  4439. Fpad0 Tuint8_t
  4440. Flength Tuint16_t
  4441. Fgc Txcb_gcontext_t
  4442. Fvalue_mask Tuint32_t
  4443. }
  4444. type Txcb_copy_gc_request_t = struct {
  4445. Fmajor_opcode Tuint8_t
  4446. Fpad0 Tuint8_t
  4447. Flength Tuint16_t
  4448. Fsrc_gc Txcb_gcontext_t
  4449. Fdst_gc Txcb_gcontext_t
  4450. Fvalue_mask Tuint32_t
  4451. }
  4452. type Txcb_set_dashes_request_t = struct {
  4453. Fmajor_opcode Tuint8_t
  4454. Fpad0 Tuint8_t
  4455. Flength Tuint16_t
  4456. Fgc Txcb_gcontext_t
  4457. Fdash_offset Tuint16_t
  4458. Fdashes_len Tuint16_t
  4459. }
  4460. type Txcb_clip_ordering_t = int32
  4461. type _xcb_clip_ordering_t = int32
  4462. const _XCB_CLIP_ORDERING_UNSORTED = 0
  4463. const _XCB_CLIP_ORDERING_Y_SORTED = 1
  4464. const _XCB_CLIP_ORDERING_YX_SORTED = 2
  4465. const _XCB_CLIP_ORDERING_YX_BANDED = 3
  4466. type Txcb_set_clip_rectangles_request_t = struct {
  4467. Fmajor_opcode Tuint8_t
  4468. Fordering Tuint8_t
  4469. Flength Tuint16_t
  4470. Fgc Txcb_gcontext_t
  4471. Fclip_x_origin Tint16_t
  4472. Fclip_y_origin Tint16_t
  4473. }
  4474. type Txcb_free_gc_request_t = struct {
  4475. Fmajor_opcode Tuint8_t
  4476. Fpad0 Tuint8_t
  4477. Flength Tuint16_t
  4478. Fgc Txcb_gcontext_t
  4479. }
  4480. type Txcb_clear_area_request_t = struct {
  4481. Fmajor_opcode Tuint8_t
  4482. Fexposures Tuint8_t
  4483. Flength Tuint16_t
  4484. Fwindow Txcb_window_t
  4485. Fx Tint16_t
  4486. Fy Tint16_t
  4487. Fwidth Tuint16_t
  4488. Fheight Tuint16_t
  4489. }
  4490. type Txcb_copy_area_request_t = struct {
  4491. Fmajor_opcode Tuint8_t
  4492. Fpad0 Tuint8_t
  4493. Flength Tuint16_t
  4494. Fsrc_drawable Txcb_drawable_t
  4495. Fdst_drawable Txcb_drawable_t
  4496. Fgc Txcb_gcontext_t
  4497. Fsrc_x Tint16_t
  4498. Fsrc_y Tint16_t
  4499. Fdst_x Tint16_t
  4500. Fdst_y Tint16_t
  4501. Fwidth Tuint16_t
  4502. Fheight Tuint16_t
  4503. }
  4504. type Txcb_copy_plane_request_t = struct {
  4505. Fmajor_opcode Tuint8_t
  4506. Fpad0 Tuint8_t
  4507. Flength Tuint16_t
  4508. Fsrc_drawable Txcb_drawable_t
  4509. Fdst_drawable Txcb_drawable_t
  4510. Fgc Txcb_gcontext_t
  4511. Fsrc_x Tint16_t
  4512. Fsrc_y Tint16_t
  4513. Fdst_x Tint16_t
  4514. Fdst_y Tint16_t
  4515. Fwidth Tuint16_t
  4516. Fheight Tuint16_t
  4517. Fbit_plane Tuint32_t
  4518. }
  4519. type Txcb_coord_mode_t = int32
  4520. type _xcb_coord_mode_t = int32
  4521. const _XCB_COORD_MODE_ORIGIN = 0
  4522. const _XCB_COORD_MODE_PREVIOUS = 1
  4523. type Txcb_poly_point_request_t = struct {
  4524. Fmajor_opcode Tuint8_t
  4525. Fcoordinate_mode Tuint8_t
  4526. Flength Tuint16_t
  4527. Fdrawable Txcb_drawable_t
  4528. Fgc Txcb_gcontext_t
  4529. }
  4530. type Txcb_poly_line_request_t = struct {
  4531. Fmajor_opcode Tuint8_t
  4532. Fcoordinate_mode Tuint8_t
  4533. Flength Tuint16_t
  4534. Fdrawable Txcb_drawable_t
  4535. Fgc Txcb_gcontext_t
  4536. }
  4537. type Txcb_segment_t = struct {
  4538. Fx1 Tint16_t
  4539. Fy1 Tint16_t
  4540. Fx2 Tint16_t
  4541. Fy2 Tint16_t
  4542. }
  4543. type Txcb_segment_iterator_t = struct {
  4544. Fdata uintptr
  4545. Frem int32
  4546. Findex int32
  4547. }
  4548. type Txcb_poly_segment_request_t = struct {
  4549. Fmajor_opcode Tuint8_t
  4550. Fpad0 Tuint8_t
  4551. Flength Tuint16_t
  4552. Fdrawable Txcb_drawable_t
  4553. Fgc Txcb_gcontext_t
  4554. }
  4555. type Txcb_poly_rectangle_request_t = struct {
  4556. Fmajor_opcode Tuint8_t
  4557. Fpad0 Tuint8_t
  4558. Flength Tuint16_t
  4559. Fdrawable Txcb_drawable_t
  4560. Fgc Txcb_gcontext_t
  4561. }
  4562. type Txcb_poly_arc_request_t = struct {
  4563. Fmajor_opcode Tuint8_t
  4564. Fpad0 Tuint8_t
  4565. Flength Tuint16_t
  4566. Fdrawable Txcb_drawable_t
  4567. Fgc Txcb_gcontext_t
  4568. }
  4569. type Txcb_poly_shape_t = int32
  4570. type _xcb_poly_shape_t = int32
  4571. const _XCB_POLY_SHAPE_COMPLEX = 0
  4572. const _XCB_POLY_SHAPE_NONCONVEX = 1
  4573. const _XCB_POLY_SHAPE_CONVEX = 2
  4574. type Txcb_fill_poly_request_t = struct {
  4575. Fmajor_opcode Tuint8_t
  4576. Fpad0 Tuint8_t
  4577. Flength Tuint16_t
  4578. Fdrawable Txcb_drawable_t
  4579. Fgc Txcb_gcontext_t
  4580. Fshape Tuint8_t
  4581. Fcoordinate_mode Tuint8_t
  4582. Fpad1 [2]Tuint8_t
  4583. }
  4584. type Txcb_poly_fill_rectangle_request_t = struct {
  4585. Fmajor_opcode Tuint8_t
  4586. Fpad0 Tuint8_t
  4587. Flength Tuint16_t
  4588. Fdrawable Txcb_drawable_t
  4589. Fgc Txcb_gcontext_t
  4590. }
  4591. type Txcb_poly_fill_arc_request_t = struct {
  4592. Fmajor_opcode Tuint8_t
  4593. Fpad0 Tuint8_t
  4594. Flength Tuint16_t
  4595. Fdrawable Txcb_drawable_t
  4596. Fgc Txcb_gcontext_t
  4597. }
  4598. type Txcb_image_format_t = int32
  4599. type _xcb_image_format_t = int32
  4600. const _XCB_IMAGE_FORMAT_XY_BITMAP = 0
  4601. const _XCB_IMAGE_FORMAT_XY_PIXMAP = 1
  4602. const _XCB_IMAGE_FORMAT_Z_PIXMAP = 2
  4603. type Txcb_put_image_request_t = struct {
  4604. Fmajor_opcode Tuint8_t
  4605. Fformat Tuint8_t
  4606. Flength Tuint16_t
  4607. Fdrawable Txcb_drawable_t
  4608. Fgc Txcb_gcontext_t
  4609. Fwidth Tuint16_t
  4610. Fheight Tuint16_t
  4611. Fdst_x Tint16_t
  4612. Fdst_y Tint16_t
  4613. Fleft_pad Tuint8_t
  4614. Fdepth Tuint8_t
  4615. Fpad0 [2]Tuint8_t
  4616. }
  4617. type Txcb_get_image_cookie_t = struct {
  4618. Fsequence uint32
  4619. }
  4620. type Txcb_get_image_request_t = struct {
  4621. Fmajor_opcode Tuint8_t
  4622. Fformat Tuint8_t
  4623. Flength Tuint16_t
  4624. Fdrawable Txcb_drawable_t
  4625. Fx Tint16_t
  4626. Fy Tint16_t
  4627. Fwidth Tuint16_t
  4628. Fheight Tuint16_t
  4629. Fplane_mask Tuint32_t
  4630. }
  4631. type Txcb_get_image_reply_t = struct {
  4632. Fresponse_type Tuint8_t
  4633. Fdepth Tuint8_t
  4634. Fsequence Tuint16_t
  4635. Flength Tuint32_t
  4636. Fvisual Txcb_visualid_t
  4637. Fpad0 [20]Tuint8_t
  4638. }
  4639. type Txcb_poly_text_8_request_t = struct {
  4640. Fmajor_opcode Tuint8_t
  4641. Fpad0 Tuint8_t
  4642. Flength Tuint16_t
  4643. Fdrawable Txcb_drawable_t
  4644. Fgc Txcb_gcontext_t
  4645. Fx Tint16_t
  4646. Fy Tint16_t
  4647. }
  4648. type Txcb_poly_text_16_request_t = struct {
  4649. Fmajor_opcode Tuint8_t
  4650. Fpad0 Tuint8_t
  4651. Flength Tuint16_t
  4652. Fdrawable Txcb_drawable_t
  4653. Fgc Txcb_gcontext_t
  4654. Fx Tint16_t
  4655. Fy Tint16_t
  4656. }
  4657. type Txcb_image_text_8_request_t = struct {
  4658. Fmajor_opcode Tuint8_t
  4659. Fstring_len Tuint8_t
  4660. Flength Tuint16_t
  4661. Fdrawable Txcb_drawable_t
  4662. Fgc Txcb_gcontext_t
  4663. Fx Tint16_t
  4664. Fy Tint16_t
  4665. }
  4666. type Txcb_image_text_16_request_t = struct {
  4667. Fmajor_opcode Tuint8_t
  4668. Fstring_len Tuint8_t
  4669. Flength Tuint16_t
  4670. Fdrawable Txcb_drawable_t
  4671. Fgc Txcb_gcontext_t
  4672. Fx Tint16_t
  4673. Fy Tint16_t
  4674. }
  4675. type Txcb_colormap_alloc_t = int32
  4676. type _xcb_colormap_alloc_t = int32
  4677. const _XCB_COLORMAP_ALLOC_NONE = 0
  4678. const _XCB_COLORMAP_ALLOC_ALL = 1
  4679. type Txcb_create_colormap_request_t = struct {
  4680. Fmajor_opcode Tuint8_t
  4681. Falloc Tuint8_t
  4682. Flength Tuint16_t
  4683. Fmid Txcb_colormap_t
  4684. Fwindow Txcb_window_t
  4685. Fvisual Txcb_visualid_t
  4686. }
  4687. type Txcb_free_colormap_request_t = struct {
  4688. Fmajor_opcode Tuint8_t
  4689. Fpad0 Tuint8_t
  4690. Flength Tuint16_t
  4691. Fcmap Txcb_colormap_t
  4692. }
  4693. type Txcb_copy_colormap_and_free_request_t = struct {
  4694. Fmajor_opcode Tuint8_t
  4695. Fpad0 Tuint8_t
  4696. Flength Tuint16_t
  4697. Fmid Txcb_colormap_t
  4698. Fsrc_cmap Txcb_colormap_t
  4699. }
  4700. type Txcb_install_colormap_request_t = struct {
  4701. Fmajor_opcode Tuint8_t
  4702. Fpad0 Tuint8_t
  4703. Flength Tuint16_t
  4704. Fcmap Txcb_colormap_t
  4705. }
  4706. type Txcb_uninstall_colormap_request_t = struct {
  4707. Fmajor_opcode Tuint8_t
  4708. Fpad0 Tuint8_t
  4709. Flength Tuint16_t
  4710. Fcmap Txcb_colormap_t
  4711. }
  4712. type Txcb_list_installed_colormaps_cookie_t = struct {
  4713. Fsequence uint32
  4714. }
  4715. type Txcb_list_installed_colormaps_request_t = struct {
  4716. Fmajor_opcode Tuint8_t
  4717. Fpad0 Tuint8_t
  4718. Flength Tuint16_t
  4719. Fwindow Txcb_window_t
  4720. }
  4721. type Txcb_list_installed_colormaps_reply_t = struct {
  4722. Fresponse_type Tuint8_t
  4723. Fpad0 Tuint8_t
  4724. Fsequence Tuint16_t
  4725. Flength Tuint32_t
  4726. Fcmaps_len Tuint16_t
  4727. Fpad1 [22]Tuint8_t
  4728. }
  4729. type Txcb_alloc_color_cookie_t = struct {
  4730. Fsequence uint32
  4731. }
  4732. type Txcb_alloc_color_request_t = struct {
  4733. Fmajor_opcode Tuint8_t
  4734. Fpad0 Tuint8_t
  4735. Flength Tuint16_t
  4736. Fcmap Txcb_colormap_t
  4737. Fred Tuint16_t
  4738. Fgreen Tuint16_t
  4739. Fblue Tuint16_t
  4740. Fpad1 [2]Tuint8_t
  4741. }
  4742. type Txcb_alloc_color_reply_t = struct {
  4743. Fresponse_type Tuint8_t
  4744. Fpad0 Tuint8_t
  4745. Fsequence Tuint16_t
  4746. Flength Tuint32_t
  4747. Fred Tuint16_t
  4748. Fgreen Tuint16_t
  4749. Fblue Tuint16_t
  4750. Fpad1 [2]Tuint8_t
  4751. Fpixel Tuint32_t
  4752. }
  4753. type Txcb_alloc_named_color_cookie_t = struct {
  4754. Fsequence uint32
  4755. }
  4756. type Txcb_alloc_named_color_request_t = struct {
  4757. Fmajor_opcode Tuint8_t
  4758. Fpad0 Tuint8_t
  4759. Flength Tuint16_t
  4760. Fcmap Txcb_colormap_t
  4761. Fname_len Tuint16_t
  4762. Fpad1 [2]Tuint8_t
  4763. }
  4764. type Txcb_alloc_named_color_reply_t = struct {
  4765. Fresponse_type Tuint8_t
  4766. Fpad0 Tuint8_t
  4767. Fsequence Tuint16_t
  4768. Flength Tuint32_t
  4769. Fpixel Tuint32_t
  4770. Fexact_red Tuint16_t
  4771. Fexact_green Tuint16_t
  4772. Fexact_blue Tuint16_t
  4773. Fvisual_red Tuint16_t
  4774. Fvisual_green Tuint16_t
  4775. Fvisual_blue Tuint16_t
  4776. }
  4777. type Txcb_alloc_color_cells_cookie_t = struct {
  4778. Fsequence uint32
  4779. }
  4780. type Txcb_alloc_color_cells_request_t = struct {
  4781. Fmajor_opcode Tuint8_t
  4782. Fcontiguous Tuint8_t
  4783. Flength Tuint16_t
  4784. Fcmap Txcb_colormap_t
  4785. Fcolors Tuint16_t
  4786. Fplanes Tuint16_t
  4787. }
  4788. type Txcb_alloc_color_cells_reply_t = struct {
  4789. Fresponse_type Tuint8_t
  4790. Fpad0 Tuint8_t
  4791. Fsequence Tuint16_t
  4792. Flength Tuint32_t
  4793. Fpixels_len Tuint16_t
  4794. Fmasks_len Tuint16_t
  4795. Fpad1 [20]Tuint8_t
  4796. }
  4797. type Txcb_alloc_color_planes_cookie_t = struct {
  4798. Fsequence uint32
  4799. }
  4800. type Txcb_alloc_color_planes_request_t = struct {
  4801. Fmajor_opcode Tuint8_t
  4802. Fcontiguous Tuint8_t
  4803. Flength Tuint16_t
  4804. Fcmap Txcb_colormap_t
  4805. Fcolors Tuint16_t
  4806. Freds Tuint16_t
  4807. Fgreens Tuint16_t
  4808. Fblues Tuint16_t
  4809. }
  4810. type Txcb_alloc_color_planes_reply_t = struct {
  4811. Fresponse_type Tuint8_t
  4812. Fpad0 Tuint8_t
  4813. Fsequence Tuint16_t
  4814. Flength Tuint32_t
  4815. Fpixels_len Tuint16_t
  4816. Fpad1 [2]Tuint8_t
  4817. Fred_mask Tuint32_t
  4818. Fgreen_mask Tuint32_t
  4819. Fblue_mask Tuint32_t
  4820. Fpad2 [8]Tuint8_t
  4821. }
  4822. type Txcb_free_colors_request_t = struct {
  4823. Fmajor_opcode Tuint8_t
  4824. Fpad0 Tuint8_t
  4825. Flength Tuint16_t
  4826. Fcmap Txcb_colormap_t
  4827. Fplane_mask Tuint32_t
  4828. }
  4829. type Txcb_color_flag_t = int32
  4830. type _xcb_color_flag_t = int32
  4831. const _XCB_COLOR_FLAG_RED = 1
  4832. const _XCB_COLOR_FLAG_GREEN = 2
  4833. const _XCB_COLOR_FLAG_BLUE = 4
  4834. type Txcb_coloritem_t = struct {
  4835. Fpixel Tuint32_t
  4836. Fred Tuint16_t
  4837. Fgreen Tuint16_t
  4838. Fblue Tuint16_t
  4839. Fflags Tuint8_t
  4840. Fpad0 Tuint8_t
  4841. }
  4842. type Txcb_coloritem_iterator_t = struct {
  4843. Fdata uintptr
  4844. Frem int32
  4845. Findex int32
  4846. }
  4847. type Txcb_store_colors_request_t = struct {
  4848. Fmajor_opcode Tuint8_t
  4849. Fpad0 Tuint8_t
  4850. Flength Tuint16_t
  4851. Fcmap Txcb_colormap_t
  4852. }
  4853. type Txcb_store_named_color_request_t = struct {
  4854. Fmajor_opcode Tuint8_t
  4855. Fflags Tuint8_t
  4856. Flength Tuint16_t
  4857. Fcmap Txcb_colormap_t
  4858. Fpixel Tuint32_t
  4859. Fname_len Tuint16_t
  4860. Fpad0 [2]Tuint8_t
  4861. }
  4862. type Txcb_rgb_t = struct {
  4863. Fred Tuint16_t
  4864. Fgreen Tuint16_t
  4865. Fblue Tuint16_t
  4866. Fpad0 [2]Tuint8_t
  4867. }
  4868. type Txcb_rgb_iterator_t = struct {
  4869. Fdata uintptr
  4870. Frem int32
  4871. Findex int32
  4872. }
  4873. type Txcb_query_colors_cookie_t = struct {
  4874. Fsequence uint32
  4875. }
  4876. type Txcb_query_colors_request_t = struct {
  4877. Fmajor_opcode Tuint8_t
  4878. Fpad0 Tuint8_t
  4879. Flength Tuint16_t
  4880. Fcmap Txcb_colormap_t
  4881. }
  4882. type Txcb_query_colors_reply_t = struct {
  4883. Fresponse_type Tuint8_t
  4884. Fpad0 Tuint8_t
  4885. Fsequence Tuint16_t
  4886. Flength Tuint32_t
  4887. Fcolors_len Tuint16_t
  4888. Fpad1 [22]Tuint8_t
  4889. }
  4890. type Txcb_lookup_color_cookie_t = struct {
  4891. Fsequence uint32
  4892. }
  4893. type Txcb_lookup_color_request_t = struct {
  4894. Fmajor_opcode Tuint8_t
  4895. Fpad0 Tuint8_t
  4896. Flength Tuint16_t
  4897. Fcmap Txcb_colormap_t
  4898. Fname_len Tuint16_t
  4899. Fpad1 [2]Tuint8_t
  4900. }
  4901. type Txcb_lookup_color_reply_t = struct {
  4902. Fresponse_type Tuint8_t
  4903. Fpad0 Tuint8_t
  4904. Fsequence Tuint16_t
  4905. Flength Tuint32_t
  4906. Fexact_red Tuint16_t
  4907. Fexact_green Tuint16_t
  4908. Fexact_blue Tuint16_t
  4909. Fvisual_red Tuint16_t
  4910. Fvisual_green Tuint16_t
  4911. Fvisual_blue Tuint16_t
  4912. }
  4913. type Txcb_pixmap_enum_t = int32
  4914. type _xcb_pixmap_enum_t = int32
  4915. const _XCB_PIXMAP_NONE = 0
  4916. type Txcb_create_cursor_request_t = struct {
  4917. Fmajor_opcode Tuint8_t
  4918. Fpad0 Tuint8_t
  4919. Flength Tuint16_t
  4920. Fcid Txcb_cursor_t
  4921. Fsource Txcb_pixmap_t
  4922. Fmask Txcb_pixmap_t
  4923. Ffore_red Tuint16_t
  4924. Ffore_green Tuint16_t
  4925. Ffore_blue Tuint16_t
  4926. Fback_red Tuint16_t
  4927. Fback_green Tuint16_t
  4928. Fback_blue Tuint16_t
  4929. Fx Tuint16_t
  4930. Fy Tuint16_t
  4931. }
  4932. type Txcb_font_enum_t = int32
  4933. type _xcb_font_enum_t = int32
  4934. const _XCB_FONT_NONE = 0
  4935. type Txcb_create_glyph_cursor_request_t = struct {
  4936. Fmajor_opcode Tuint8_t
  4937. Fpad0 Tuint8_t
  4938. Flength Tuint16_t
  4939. Fcid Txcb_cursor_t
  4940. Fsource_font Txcb_font_t
  4941. Fmask_font Txcb_font_t
  4942. Fsource_char Tuint16_t
  4943. Fmask_char Tuint16_t
  4944. Ffore_red Tuint16_t
  4945. Ffore_green Tuint16_t
  4946. Ffore_blue Tuint16_t
  4947. Fback_red Tuint16_t
  4948. Fback_green Tuint16_t
  4949. Fback_blue Tuint16_t
  4950. }
  4951. type Txcb_free_cursor_request_t = struct {
  4952. Fmajor_opcode Tuint8_t
  4953. Fpad0 Tuint8_t
  4954. Flength Tuint16_t
  4955. Fcursor Txcb_cursor_t
  4956. }
  4957. type Txcb_recolor_cursor_request_t = struct {
  4958. Fmajor_opcode Tuint8_t
  4959. Fpad0 Tuint8_t
  4960. Flength Tuint16_t
  4961. Fcursor Txcb_cursor_t
  4962. Ffore_red Tuint16_t
  4963. Ffore_green Tuint16_t
  4964. Ffore_blue Tuint16_t
  4965. Fback_red Tuint16_t
  4966. Fback_green Tuint16_t
  4967. Fback_blue Tuint16_t
  4968. }
  4969. type Txcb_query_shape_of_t = int32
  4970. type _xcb_query_shape_of_t = int32
  4971. const _XCB_QUERY_SHAPE_OF_LARGEST_CURSOR = 0
  4972. const _XCB_QUERY_SHAPE_OF_FASTEST_TILE = 1
  4973. const _XCB_QUERY_SHAPE_OF_FASTEST_STIPPLE = 2
  4974. type Txcb_query_best_size_cookie_t = struct {
  4975. Fsequence uint32
  4976. }
  4977. type Txcb_query_best_size_request_t = struct {
  4978. Fmajor_opcode Tuint8_t
  4979. F_class Tuint8_t
  4980. Flength Tuint16_t
  4981. Fdrawable Txcb_drawable_t
  4982. Fwidth Tuint16_t
  4983. Fheight Tuint16_t
  4984. }
  4985. type Txcb_query_best_size_reply_t = struct {
  4986. Fresponse_type Tuint8_t
  4987. Fpad0 Tuint8_t
  4988. Fsequence Tuint16_t
  4989. Flength Tuint32_t
  4990. Fwidth Tuint16_t
  4991. Fheight Tuint16_t
  4992. }
  4993. type Txcb_query_extension_cookie_t = struct {
  4994. Fsequence uint32
  4995. }
  4996. type Txcb_query_extension_request_t = struct {
  4997. Fmajor_opcode Tuint8_t
  4998. Fpad0 Tuint8_t
  4999. Flength Tuint16_t
  5000. Fname_len Tuint16_t
  5001. Fpad1 [2]Tuint8_t
  5002. }
  5003. type Txcb_query_extension_reply_t = struct {
  5004. Fresponse_type Tuint8_t
  5005. Fpad0 Tuint8_t
  5006. Fsequence Tuint16_t
  5007. Flength Tuint32_t
  5008. Fpresent Tuint8_t
  5009. Fmajor_opcode Tuint8_t
  5010. Ffirst_event Tuint8_t
  5011. Ffirst_error Tuint8_t
  5012. }
  5013. type Txcb_list_extensions_cookie_t = struct {
  5014. Fsequence uint32
  5015. }
  5016. type Txcb_list_extensions_request_t = struct {
  5017. Fmajor_opcode Tuint8_t
  5018. Fpad0 Tuint8_t
  5019. Flength Tuint16_t
  5020. }
  5021. type Txcb_list_extensions_reply_t = struct {
  5022. Fresponse_type Tuint8_t
  5023. Fnames_len Tuint8_t
  5024. Fsequence Tuint16_t
  5025. Flength Tuint32_t
  5026. Fpad0 [24]Tuint8_t
  5027. }
  5028. type Txcb_change_keyboard_mapping_request_t = struct {
  5029. Fmajor_opcode Tuint8_t
  5030. Fkeycode_count Tuint8_t
  5031. Flength Tuint16_t
  5032. Ffirst_keycode Txcb_keycode_t
  5033. Fkeysyms_per_keycode Tuint8_t
  5034. Fpad0 [2]Tuint8_t
  5035. }
  5036. type Txcb_get_keyboard_mapping_cookie_t = struct {
  5037. Fsequence uint32
  5038. }
  5039. type Txcb_get_keyboard_mapping_request_t = struct {
  5040. Fmajor_opcode Tuint8_t
  5041. Fpad0 Tuint8_t
  5042. Flength Tuint16_t
  5043. Ffirst_keycode Txcb_keycode_t
  5044. Fcount Tuint8_t
  5045. }
  5046. type Txcb_get_keyboard_mapping_reply_t = struct {
  5047. Fresponse_type Tuint8_t
  5048. Fkeysyms_per_keycode Tuint8_t
  5049. Fsequence Tuint16_t
  5050. Flength Tuint32_t
  5051. Fpad0 [24]Tuint8_t
  5052. }
  5053. type Txcb_kb_t = int32
  5054. type _xcb_kb_t = int32
  5055. const _XCB_KB_KEY_CLICK_PERCENT = 1
  5056. const _XCB_KB_BELL_PERCENT = 2
  5057. const _XCB_KB_BELL_PITCH = 4
  5058. const _XCB_KB_BELL_DURATION = 8
  5059. const _XCB_KB_LED = 16
  5060. const _XCB_KB_LED_MODE = 32
  5061. const _XCB_KB_KEY = 64
  5062. const _XCB_KB_AUTO_REPEAT_MODE = 128
  5063. type Txcb_led_mode_t = int32
  5064. type _xcb_led_mode_t = int32
  5065. const _XCB_LED_MODE_OFF = 0
  5066. const _XCB_LED_MODE_ON = 1
  5067. type Txcb_auto_repeat_mode_t = int32
  5068. type _xcb_auto_repeat_mode_t = int32
  5069. const _XCB_AUTO_REPEAT_MODE_OFF = 0
  5070. const _XCB_AUTO_REPEAT_MODE_ON = 1
  5071. const _XCB_AUTO_REPEAT_MODE_DEFAULT = 2
  5072. type Txcb_change_keyboard_control_value_list_t = struct {
  5073. Fkey_click_percent Tint32_t
  5074. Fbell_percent Tint32_t
  5075. Fbell_pitch Tint32_t
  5076. Fbell_duration Tint32_t
  5077. Fled Tuint32_t
  5078. Fled_mode Tuint32_t
  5079. Fkey Txcb_keycode32_t
  5080. Fauto_repeat_mode Tuint32_t
  5081. }
  5082. type Txcb_change_keyboard_control_request_t = struct {
  5083. Fmajor_opcode Tuint8_t
  5084. Fpad0 Tuint8_t
  5085. Flength Tuint16_t
  5086. Fvalue_mask Tuint32_t
  5087. }
  5088. type Txcb_get_keyboard_control_cookie_t = struct {
  5089. Fsequence uint32
  5090. }
  5091. type Txcb_get_keyboard_control_request_t = struct {
  5092. Fmajor_opcode Tuint8_t
  5093. Fpad0 Tuint8_t
  5094. Flength Tuint16_t
  5095. }
  5096. type Txcb_get_keyboard_control_reply_t = struct {
  5097. Fresponse_type Tuint8_t
  5098. Fglobal_auto_repeat Tuint8_t
  5099. Fsequence Tuint16_t
  5100. Flength Tuint32_t
  5101. Fled_mask Tuint32_t
  5102. Fkey_click_percent Tuint8_t
  5103. Fbell_percent Tuint8_t
  5104. Fbell_pitch Tuint16_t
  5105. Fbell_duration Tuint16_t
  5106. Fpad0 [2]Tuint8_t
  5107. Fauto_repeats [32]Tuint8_t
  5108. }
  5109. type Txcb_bell_request_t = struct {
  5110. Fmajor_opcode Tuint8_t
  5111. Fpercent Tint8_t
  5112. Flength Tuint16_t
  5113. }
  5114. type Txcb_change_pointer_control_request_t = struct {
  5115. Fmajor_opcode Tuint8_t
  5116. Fpad0 Tuint8_t
  5117. Flength Tuint16_t
  5118. Facceleration_numerator Tint16_t
  5119. Facceleration_denominator Tint16_t
  5120. Fthreshold Tint16_t
  5121. Fdo_acceleration Tuint8_t
  5122. Fdo_threshold Tuint8_t
  5123. }
  5124. type Txcb_get_pointer_control_cookie_t = struct {
  5125. Fsequence uint32
  5126. }
  5127. type Txcb_get_pointer_control_request_t = struct {
  5128. Fmajor_opcode Tuint8_t
  5129. Fpad0 Tuint8_t
  5130. Flength Tuint16_t
  5131. }
  5132. type Txcb_get_pointer_control_reply_t = struct {
  5133. Fresponse_type Tuint8_t
  5134. Fpad0 Tuint8_t
  5135. Fsequence Tuint16_t
  5136. Flength Tuint32_t
  5137. Facceleration_numerator Tuint16_t
  5138. Facceleration_denominator Tuint16_t
  5139. Fthreshold Tuint16_t
  5140. Fpad1 [18]Tuint8_t
  5141. }
  5142. type Txcb_blanking_t = int32
  5143. type _xcb_blanking_t = int32
  5144. const _XCB_BLANKING_NOT_PREFERRED = 0
  5145. const _XCB_BLANKING_PREFERRED = 1
  5146. const _XCB_BLANKING_DEFAULT = 2
  5147. type Txcb_exposures_t = int32
  5148. type _xcb_exposures_t = int32
  5149. const _XCB_EXPOSURES_NOT_ALLOWED = 0
  5150. const _XCB_EXPOSURES_ALLOWED = 1
  5151. const _XCB_EXPOSURES_DEFAULT = 2
  5152. type Txcb_set_screen_saver_request_t = struct {
  5153. Fmajor_opcode Tuint8_t
  5154. Fpad0 Tuint8_t
  5155. Flength Tuint16_t
  5156. Ftimeout Tint16_t
  5157. Finterval Tint16_t
  5158. Fprefer_blanking Tuint8_t
  5159. Fallow_exposures Tuint8_t
  5160. }
  5161. type Txcb_get_screen_saver_cookie_t = struct {
  5162. Fsequence uint32
  5163. }
  5164. type Txcb_get_screen_saver_request_t = struct {
  5165. Fmajor_opcode Tuint8_t
  5166. Fpad0 Tuint8_t
  5167. Flength Tuint16_t
  5168. }
  5169. type Txcb_get_screen_saver_reply_t = struct {
  5170. Fresponse_type Tuint8_t
  5171. Fpad0 Tuint8_t
  5172. Fsequence Tuint16_t
  5173. Flength Tuint32_t
  5174. Ftimeout Tuint16_t
  5175. Finterval Tuint16_t
  5176. Fprefer_blanking Tuint8_t
  5177. Fallow_exposures Tuint8_t
  5178. Fpad1 [18]Tuint8_t
  5179. }
  5180. type Txcb_host_mode_t = int32
  5181. type _xcb_host_mode_t = int32
  5182. const _XCB_HOST_MODE_INSERT = 0
  5183. const _XCB_HOST_MODE_DELETE = 1
  5184. type Txcb_family_t = int32
  5185. type _xcb_family_t = int32
  5186. const _XCB_FAMILY_INTERNET = 0
  5187. const _XCB_FAMILY_DECNET = 1
  5188. const _XCB_FAMILY_CHAOS = 2
  5189. const _XCB_FAMILY_SERVER_INTERPRETED = 5
  5190. const _XCB_FAMILY_INTERNET_6 = 6
  5191. type Txcb_change_hosts_request_t = struct {
  5192. Fmajor_opcode Tuint8_t
  5193. Fmode Tuint8_t
  5194. Flength Tuint16_t
  5195. Ffamily Tuint8_t
  5196. Fpad0 Tuint8_t
  5197. Faddress_len Tuint16_t
  5198. }
  5199. type Txcb_host_t = struct {
  5200. Ffamily Tuint8_t
  5201. Fpad0 Tuint8_t
  5202. Faddress_len Tuint16_t
  5203. }
  5204. type Txcb_host_iterator_t = struct {
  5205. Fdata uintptr
  5206. Frem int32
  5207. Findex int32
  5208. }
  5209. type Txcb_list_hosts_cookie_t = struct {
  5210. Fsequence uint32
  5211. }
  5212. type Txcb_list_hosts_request_t = struct {
  5213. Fmajor_opcode Tuint8_t
  5214. Fpad0 Tuint8_t
  5215. Flength Tuint16_t
  5216. }
  5217. type Txcb_list_hosts_reply_t = struct {
  5218. Fresponse_type Tuint8_t
  5219. Fmode Tuint8_t
  5220. Fsequence Tuint16_t
  5221. Flength Tuint32_t
  5222. Fhosts_len Tuint16_t
  5223. Fpad0 [22]Tuint8_t
  5224. }
  5225. type Txcb_access_control_t = int32
  5226. type _xcb_access_control_t = int32
  5227. const _XCB_ACCESS_CONTROL_DISABLE = 0
  5228. const _XCB_ACCESS_CONTROL_ENABLE = 1
  5229. type Txcb_set_access_control_request_t = struct {
  5230. Fmajor_opcode Tuint8_t
  5231. Fmode Tuint8_t
  5232. Flength Tuint16_t
  5233. }
  5234. type Txcb_close_down_t = int32
  5235. type _xcb_close_down_t = int32
  5236. const _XCB_CLOSE_DOWN_DESTROY_ALL = 0
  5237. const _XCB_CLOSE_DOWN_RETAIN_PERMANENT = 1
  5238. const _XCB_CLOSE_DOWN_RETAIN_TEMPORARY = 2
  5239. type Txcb_set_close_down_mode_request_t = struct {
  5240. Fmajor_opcode Tuint8_t
  5241. Fmode Tuint8_t
  5242. Flength Tuint16_t
  5243. }
  5244. type Txcb_kill_t = int32
  5245. type _xcb_kill_t = int32
  5246. const _XCB_KILL_ALL_TEMPORARY = 0
  5247. type Txcb_kill_client_request_t = struct {
  5248. Fmajor_opcode Tuint8_t
  5249. Fpad0 Tuint8_t
  5250. Flength Tuint16_t
  5251. Fresource Tuint32_t
  5252. }
  5253. type Txcb_rotate_properties_request_t = struct {
  5254. Fmajor_opcode Tuint8_t
  5255. Fpad0 Tuint8_t
  5256. Flength Tuint16_t
  5257. Fwindow Txcb_window_t
  5258. Fatoms_len Tuint16_t
  5259. Fdelta Tint16_t
  5260. }
  5261. type Txcb_screen_saver_t = int32
  5262. type _xcb_screen_saver_t = int32
  5263. const _XCB_SCREEN_SAVER_RESET = 0
  5264. const _XCB_SCREEN_SAVER_ACTIVE = 1
  5265. type Txcb_force_screen_saver_request_t = struct {
  5266. Fmajor_opcode Tuint8_t
  5267. Fmode Tuint8_t
  5268. Flength Tuint16_t
  5269. }
  5270. type Txcb_mapping_status_t = int32
  5271. type _xcb_mapping_status_t = int32
  5272. const _XCB_MAPPING_STATUS_SUCCESS = 0
  5273. const _XCB_MAPPING_STATUS_BUSY = 1
  5274. const _XCB_MAPPING_STATUS_FAILURE = 2
  5275. type Txcb_set_pointer_mapping_cookie_t = struct {
  5276. Fsequence uint32
  5277. }
  5278. type Txcb_set_pointer_mapping_request_t = struct {
  5279. Fmajor_opcode Tuint8_t
  5280. Fmap_len Tuint8_t
  5281. Flength Tuint16_t
  5282. }
  5283. type Txcb_set_pointer_mapping_reply_t = struct {
  5284. Fresponse_type Tuint8_t
  5285. Fstatus Tuint8_t
  5286. Fsequence Tuint16_t
  5287. Flength Tuint32_t
  5288. }
  5289. type Txcb_get_pointer_mapping_cookie_t = struct {
  5290. Fsequence uint32
  5291. }
  5292. type Txcb_get_pointer_mapping_request_t = struct {
  5293. Fmajor_opcode Tuint8_t
  5294. Fpad0 Tuint8_t
  5295. Flength Tuint16_t
  5296. }
  5297. type Txcb_get_pointer_mapping_reply_t = struct {
  5298. Fresponse_type Tuint8_t
  5299. Fmap_len Tuint8_t
  5300. Fsequence Tuint16_t
  5301. Flength Tuint32_t
  5302. Fpad0 [24]Tuint8_t
  5303. }
  5304. type Txcb_map_index_t = int32
  5305. type _xcb_map_index_t = int32
  5306. const _XCB_MAP_INDEX_SHIFT = 0
  5307. const _XCB_MAP_INDEX_LOCK = 1
  5308. const _XCB_MAP_INDEX_CONTROL = 2
  5309. const _XCB_MAP_INDEX_1 = 3
  5310. const _XCB_MAP_INDEX_2 = 4
  5311. const _XCB_MAP_INDEX_3 = 5
  5312. const _XCB_MAP_INDEX_4 = 6
  5313. const _XCB_MAP_INDEX_5 = 7
  5314. type Txcb_set_modifier_mapping_cookie_t = struct {
  5315. Fsequence uint32
  5316. }
  5317. type Txcb_set_modifier_mapping_request_t = struct {
  5318. Fmajor_opcode Tuint8_t
  5319. Fkeycodes_per_modifier Tuint8_t
  5320. Flength Tuint16_t
  5321. }
  5322. type Txcb_set_modifier_mapping_reply_t = struct {
  5323. Fresponse_type Tuint8_t
  5324. Fstatus Tuint8_t
  5325. Fsequence Tuint16_t
  5326. Flength Tuint32_t
  5327. }
  5328. type Txcb_get_modifier_mapping_cookie_t = struct {
  5329. Fsequence uint32
  5330. }
  5331. type Txcb_get_modifier_mapping_request_t = struct {
  5332. Fmajor_opcode Tuint8_t
  5333. Fpad0 Tuint8_t
  5334. Flength Tuint16_t
  5335. }
  5336. type Txcb_get_modifier_mapping_reply_t = struct {
  5337. Fresponse_type Tuint8_t
  5338. Fkeycodes_per_modifier Tuint8_t
  5339. Fsequence Tuint16_t
  5340. Flength Tuint32_t
  5341. Fpad0 [24]Tuint8_t
  5342. }
  5343. type Txcb_no_operation_request_t = struct {
  5344. Fmajor_opcode Tuint8_t
  5345. Fpad0 Tuint8_t
  5346. Flength Tuint16_t
  5347. }
  5348. type Txcb_auth_info_t = struct {
  5349. Fnamelen int32
  5350. Fname uintptr
  5351. Fdatalen int32
  5352. Fdata uintptr
  5353. }
  5354. type Txcb_big_requests_enable_cookie_t = struct {
  5355. Fsequence uint32
  5356. }
  5357. type Txcb_big_requests_enable_request_t = struct {
  5358. Fmajor_opcode Tuint8_t
  5359. Fminor_opcode Tuint8_t
  5360. Flength Tuint16_t
  5361. }
  5362. type Txcb_big_requests_enable_reply_t = struct {
  5363. Fresponse_type Tuint8_t
  5364. Fpad0 Tuint8_t
  5365. Fsequence Tuint16_t
  5366. Flength Tuint32_t
  5367. Fmaximum_request_length Tuint32_t
  5368. }
  5369. type _workarounds = int32
  5370. const _WORKAROUND_NONE = 0
  5371. const _WORKAROUND_GLX_GET_FB_CONFIGS_BUG = 1
  5372. const _WORKAROUND_EXTERNAL_SOCKET_OWNER = 2
  5373. type _lazy_reply_tag = int32
  5374. const _LAZY_NONE = 0
  5375. const _LAZY_COOKIE = 1
  5376. const _LAZY_FORCED = 2
  5377. type Txcb_list_free_func_t = uintptr
  5378. type T_xcb_fd = struct {
  5379. Ffd [16]int32
  5380. Fnfd int32
  5381. Fifd int32
  5382. }
  5383. type T_xcb_out = struct {
  5384. Fcond Tpthread_cond_t
  5385. Fwriting int32
  5386. Fsocket_cond Tpthread_cond_t
  5387. Freturn_socket uintptr
  5388. Fsocket_closure uintptr
  5389. Fsocket_moving int32
  5390. Fqueue [16384]int8
  5391. Fqueue_len int32
  5392. Frequest Tuint64_t
  5393. Frequest_written Tuint64_t
  5394. Frequest_expected_written Tuint64_t
  5395. Ftotal_written Tuint64_t
  5396. Freqlenlock Tpthread_mutex_t
  5397. Fmaximum_request_length_tag _lazy_reply_tag
  5398. Fmaximum_request_length struct {
  5399. Fvalue [0]Tuint32_t
  5400. Fcookie Txcb_big_requests_enable_cookie_t
  5401. }
  5402. Fout_fd T_xcb_fd
  5403. }
  5404. type T_xcb_in = struct {
  5405. Fevent_cond Tpthread_cond_t
  5406. Freading int32
  5407. Fqueue [4096]int8
  5408. Fqueue_len int32
  5409. Frequest_expected Tuint64_t
  5410. Frequest_read Tuint64_t
  5411. Frequest_completed Tuint64_t
  5412. Ftotal_read Tuint64_t
  5413. Fcurrent_reply uintptr
  5414. Fcurrent_reply_tail uintptr
  5415. Freplies uintptr
  5416. Fevents uintptr
  5417. Fevents_tail uintptr
  5418. Freaders uintptr
  5419. Fspecial_waiters uintptr
  5420. Fpending_replies uintptr
  5421. Fpending_replies_tail uintptr
  5422. Fin_fd T_xcb_fd
  5423. Fspecial_events uintptr
  5424. }
  5425. type T_xcb_xid = struct {
  5426. Flock Tpthread_mutex_t
  5427. Flast Tuint32_t
  5428. Fbase Tuint32_t
  5429. Fmax Tuint32_t
  5430. Finc Tuint32_t
  5431. }
  5432. type T_xcb_ext = struct {
  5433. Flock Tpthread_mutex_t
  5434. Fextensions uintptr
  5435. Fextensions_size int32
  5436. }
  5437. type Txcb_connection_t1 = struct {
  5438. Fhas_error int32
  5439. Fsetup uintptr
  5440. Ffd int32
  5441. Fiolock Tpthread_mutex_t
  5442. Fin T_xcb_in
  5443. Fout T_xcb_out
  5444. Fext T_xcb_ext
  5445. Fxid T_xcb_xid
  5446. }
  5447. type Tnfds_t = uint32
  5448. type Tpollfd = struct {
  5449. Ffd int32
  5450. Fevents int16
  5451. Frevents int16
  5452. }
  5453. type Tcrypt_data = struct {
  5454. Finitialized int32
  5455. F__buf [256]int8
  5456. }
  5457. type Tsa_family_t = uint8
  5458. type Tsocklen_t = uint32
  5459. type Tlinger = struct {
  5460. Fl_onoff int32
  5461. Fl_linger int32
  5462. }
  5463. type Taccept_filter_arg = struct {
  5464. Faf_name [16]int8
  5465. Faf_arg [240]int8
  5466. }
  5467. type Tsockaddr = struct {
  5468. Fsa_len uint8
  5469. Fsa_family Tsa_family_t
  5470. Fsa_data [14]int8
  5471. }
  5472. type Tsockproto = struct {
  5473. Fsp_family uint16
  5474. Fsp_protocol uint16
  5475. }
  5476. type Tsockaddr_storage = struct {
  5477. Fss_len uint8
  5478. Fss_family Tsa_family_t
  5479. F__ss_pad1 [6]int8
  5480. F__ss_align t__int64_t
  5481. F__ss_pad2 [112]int8
  5482. }
  5483. type Tmsghdr = struct {
  5484. Fmsg_name uintptr
  5485. Fmsg_namelen Tsocklen_t
  5486. Fmsg_iov uintptr
  5487. Fmsg_iovlen int32
  5488. Fmsg_control uintptr
  5489. Fmsg_controllen Tsocklen_t
  5490. Fmsg_flags int32
  5491. }
  5492. type Tcmsghdr = struct {
  5493. Fcmsg_len Tsocklen_t
  5494. Fcmsg_level int32
  5495. Fcmsg_type int32
  5496. }
  5497. type Tcmsgcred = struct {
  5498. Fcmcred_pid Tpid_t
  5499. Fcmcred_uid Tuid_t
  5500. Fcmcred_euid Tuid_t
  5501. Fcmcred_gid Tgid_t
  5502. Fcmcred_ngroups int16
  5503. Fcmcred_groups [16]Tgid_t
  5504. }
  5505. type Tsockcred = struct {
  5506. Fsc_uid Tuid_t
  5507. Fsc_euid Tuid_t
  5508. Fsc_gid Tgid_t
  5509. Fsc_egid Tgid_t
  5510. Fsc_ngroups int32
  5511. Fsc_groups [1]Tgid_t
  5512. }
  5513. type Tsockcred2 = struct {
  5514. Fsc_version int32
  5515. Fsc_pid Tpid_t
  5516. Fsc_uid Tuid_t
  5517. Fsc_euid Tuid_t
  5518. Fsc_gid Tgid_t
  5519. Fsc_egid Tgid_t
  5520. Fsc_ngroups int32
  5521. Fsc_groups [1]Tgid_t
  5522. }
  5523. type Tsock_timestamp_info = struct {
  5524. Fst_info_flags t__uint32_t
  5525. Fst_info_pad0 t__uint32_t
  5526. Fst_info_rsv [7]t__uint64_t
  5527. }
  5528. type Tosockaddr = struct {
  5529. Fsa_family uint16
  5530. Fsa_data [14]int8
  5531. }
  5532. type Tomsghdr = struct {
  5533. Fmsg_name uintptr
  5534. Fmsg_namelen int32
  5535. Fmsg_iov uintptr
  5536. Fmsg_iovlen int32
  5537. Fmsg_accrights uintptr
  5538. Fmsg_accrightslen int32
  5539. }
  5540. type Tsf_hdtr = struct {
  5541. Fheaders uintptr
  5542. Fhdr_cnt int32
  5543. Ftrailers uintptr
  5544. Ftrl_cnt int32
  5545. }
  5546. type Tmmsghdr = struct {
  5547. Fmsg_hdr Tmsghdr
  5548. Fmsg_len Tssize_t
  5549. }
  5550. type Tsplice = struct {
  5551. Fsp_fd int32
  5552. Fsp_max Toff_t
  5553. Fsp_idle Ttimeval
  5554. }
  5555. type Tin_addr = struct {
  5556. Fs_addr Tin_addr_t
  5557. }
  5558. type Tsockaddr_in = struct {
  5559. Fsin_len Tuint8_t
  5560. Fsin_family Tsa_family_t
  5561. Fsin_port Tin_port_t
  5562. Fsin_addr Tin_addr
  5563. Fsin_zero [8]int8
  5564. }
  5565. type Tip_mreq = struct {
  5566. Fimr_multiaddr Tin_addr
  5567. Fimr_interface Tin_addr
  5568. }
  5569. type Tip_mreqn = struct {
  5570. Fimr_multiaddr Tin_addr
  5571. Fimr_address Tin_addr
  5572. Fimr_ifindex int32
  5573. }
  5574. type Tip_mreq_source = struct {
  5575. Fimr_multiaddr Tin_addr
  5576. Fimr_sourceaddr Tin_addr
  5577. Fimr_interface Tin_addr
  5578. }
  5579. type Tgroup_req = struct {
  5580. Fgr_interface Tuint32_t
  5581. Fgr_group Tsockaddr_storage
  5582. }
  5583. type Tgroup_source_req = struct {
  5584. Fgsr_interface Tuint32_t
  5585. Fgsr_group Tsockaddr_storage
  5586. Fgsr_source Tsockaddr_storage
  5587. }
  5588. type t__msfilterreq = struct {
  5589. Fmsfr_ifindex Tuint32_t
  5590. Fmsfr_fmode Tuint32_t
  5591. Fmsfr_nsrcs Tuint32_t
  5592. Fmsfr_group Tsockaddr_storage
  5593. Fmsfr_srcs uintptr
  5594. }
  5595. type Tin6_addr = struct {
  5596. F__u6_addr struct {
  5597. F__u6_addr16 [0][8]Tuint16_t
  5598. F__u6_addr32 [0][4]Tuint32_t
  5599. F__u6_addr8 [16]Tuint8_t
  5600. }
  5601. }
  5602. type Tsockaddr_in6 = struct {
  5603. Fsin6_len Tuint8_t
  5604. Fsin6_family Tsa_family_t
  5605. Fsin6_port Tin_port_t
  5606. Fsin6_flowinfo Tuint32_t
  5607. Fsin6_addr Tin6_addr
  5608. Fsin6_scope_id Tuint32_t
  5609. }
  5610. type Troute_in6 = struct {
  5611. Fro_nh uintptr
  5612. Fro_lle uintptr
  5613. Fro_prepend uintptr
  5614. Fro_plen Tuint16_t
  5615. Fro_flags Tuint16_t
  5616. Fro_mtu Tuint16_t
  5617. Fspare Tuint16_t
  5618. Fro_dst Tsockaddr_in6
  5619. }
  5620. type Tipv6_mreq = struct {
  5621. Fipv6mr_multiaddr Tin6_addr
  5622. Fipv6mr_interface uint32
  5623. }
  5624. type Tin6_pktinfo = struct {
  5625. Fipi6_addr Tin6_addr
  5626. Fipi6_ifindex uint32
  5627. }
  5628. type Tip6_mtuinfo = struct {
  5629. Fip6m_addr Tsockaddr_in6
  5630. Fip6m_mtu Tuint32_t
  5631. }
  5632. /* SHUT_RDWR is fairly recent and is not available on all platforms */
  5633. type Txcb_setup_generic_t = struct {
  5634. Fstatus Tuint8_t
  5635. Fpad0 [5]Tuint8_t
  5636. Flength Tuint16_t
  5637. }
  5638. var _xcb_error_setup = Txcb_setup_t{}
  5639. // C documentation
  5640. //
  5641. // /* Keep this list in sync with is_static_error_conn()! */
  5642. var _xcb_con_error = int32(m_XCB_CONN_ERROR)
  5643. var _xcb_con_closed_mem_er = int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT)
  5644. var _xcb_con_closed_parse_er = int32(m_XCB_CONN_CLOSED_PARSE_ERR)
  5645. var _xcb_con_closed_screen_er = int32(m_XCB_CONN_CLOSED_INVALID_SCREEN)
  5646. func _is_static_error_conn(tls *libc.TLS, c uintptr) (r int32) {
  5647. return libc.BoolInt32(c == uintptr(unsafe.Pointer(&_xcb_con_error)) || c == uintptr(unsafe.Pointer(&_xcb_con_closed_mem_er)) || c == uintptr(unsafe.Pointer(&_xcb_con_closed_parse_er)) || c == uintptr(unsafe.Pointer(&_xcb_con_closed_screen_er)))
  5648. }
  5649. func _set_fd_flags(tls *libc.TLS, fd int32) (r int32) {
  5650. bp := tls.Alloc(16)
  5651. defer tls.Free(16)
  5652. var flags int32
  5653. _ = flags
  5654. /* Win32 doesn't have file descriptors and the fcntl function. This block sets the socket in non-blocking mode */
  5655. flags = libc.Xfcntl(tls, fd, int32(m_F_GETFL), libc.VaList(bp+8, 0))
  5656. if flags == -int32(1) {
  5657. return 0
  5658. }
  5659. flags |= int32(m_O_NONBLOCK)
  5660. if libc.Xfcntl(tls, fd, int32(m_F_SETFL), libc.VaList(bp+8, flags)) == -int32(1) {
  5661. return 0
  5662. }
  5663. if libc.Xfcntl(tls, fd, int32(m_F_SETFD), libc.VaList(bp+8, int32(m_FD_CLOEXEC))) == -int32(1) {
  5664. return 0
  5665. }
  5666. return int32(1)
  5667. }
  5668. func _write_setup(tls *libc.TLS, c uintptr, auth_info uintptr) (r int32) {
  5669. bp := tls.Alloc(112)
  5670. defer tls.Free(112)
  5671. var count, ret, v1, v2, v4, v5, v7, v8 int32
  5672. var v3, v6 Tuint16_t
  5673. var _ /* out at bp+0 */ Txcb_setup_request_t
  5674. var _ /* parts at bp+16 */ [6]Tiovec
  5675. _, _, _, _, _, _, _, _, _, _ = count, ret, v1, v2, v3, v4, v5, v6, v7, v8
  5676. count = 0
  5677. libc.Xmemset(tls, bp, 0, uint64(12))
  5678. /* B = 0x42 = MSB first, l = 0x6c = LSB first */
  5679. if libc.X__builtin_bswap32(tls, _endian) == _endian {
  5680. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fbyte_order = uint8(0x42)
  5681. } else {
  5682. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fbyte_order = uint8(0x6c)
  5683. }
  5684. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fprotocol_major_version = uint16(m_X_PROTOCOL)
  5685. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fprotocol_minor_version = uint16(m_X_PROTOCOL_REVISION)
  5686. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_name_len = uint16(0)
  5687. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_data_len = uint16(0)
  5688. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[count].Fiov_len = uint64(12)
  5689. v1 = count
  5690. count++
  5691. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[v1].Fiov_base = bp
  5692. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[count].Fiov_len = -libc.Uint64FromInt64(12) & libc.Uint64FromInt32(3)
  5693. v2 = count
  5694. count++
  5695. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[v2].Fiov_base = uintptr(unsafe.Pointer(&_pad))
  5696. if auth_info != 0 {
  5697. v3 = libc.Uint16FromInt32((*Txcb_auth_info_t)(unsafe.Pointer(auth_info)).Fnamelen)
  5698. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_name_len = v3
  5699. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[count].Fiov_len = uint64(v3)
  5700. v4 = count
  5701. count++
  5702. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[v4].Fiov_base = (*Txcb_auth_info_t)(unsafe.Pointer(auth_info)).Fname
  5703. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[count].Fiov_len = libc.Uint64FromInt32(-libc.Int32FromUint16((*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_name_len) & libc.Int32FromInt32(3))
  5704. v5 = count
  5705. count++
  5706. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[v5].Fiov_base = uintptr(unsafe.Pointer(&_pad))
  5707. v6 = libc.Uint16FromInt32((*Txcb_auth_info_t)(unsafe.Pointer(auth_info)).Fdatalen)
  5708. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_data_len = v6
  5709. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[count].Fiov_len = uint64(v6)
  5710. v7 = count
  5711. count++
  5712. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[v7].Fiov_base = (*Txcb_auth_info_t)(unsafe.Pointer(auth_info)).Fdata
  5713. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[count].Fiov_len = libc.Uint64FromInt32(-libc.Int32FromUint16((*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_data_len) & libc.Int32FromInt32(3))
  5714. v8 = count
  5715. count++
  5716. (*(*[6]Tiovec)(unsafe.Pointer(bp + 16)))[v8].Fiov_base = uintptr(unsafe.Pointer(&_pad))
  5717. }
  5718. libc.Xpthread_mutex_lock(tls, c+24)
  5719. ret = X_xcb_out_send(tls, c, bp+16, count)
  5720. libc.Xpthread_mutex_unlock(tls, c+24)
  5721. return ret
  5722. }
  5723. var _pad [3]int8
  5724. var _endian = uint32(0x01020304)
  5725. func _read_setup(tls *libc.TLS, c uintptr) (r int32) {
  5726. bp := tls.Alloc(16)
  5727. defer tls.Free(16)
  5728. var setup, setup1, tmp uintptr
  5729. var _ /* newline at bp+0 */ int8
  5730. _, _, _ = setup, setup1, tmp
  5731. *(*int8)(unsafe.Pointer(bp)) = int8('\n')
  5732. /* Read the server response */
  5733. (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup = libc.Xmalloc(tls, uint64(8))
  5734. if !((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup != 0) {
  5735. return 0
  5736. }
  5737. if libc.Uint64FromInt32(X_xcb_in_read_block(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup, int32(8))) != uint64(8) {
  5738. return 0
  5739. }
  5740. tmp = libc.Xrealloc(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup, libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Flength)*int32(4))+uint64(8))
  5741. if !(tmp != 0) {
  5742. return 0
  5743. }
  5744. (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup = tmp
  5745. if X_xcb_in_read_block(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup+uintptr(8), libc.Int32FromUint16((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Flength)*int32(4)) <= 0 {
  5746. return 0
  5747. }
  5748. /* 0 = failed, 2 = authenticate, 1 = success */
  5749. switch libc.Int32FromUint8((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fstatus) {
  5750. case 0: /* failed */
  5751. setup = (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup
  5752. libc.Xwrite(tls, int32(m_STDERR_FILENO), Xxcb_setup_failed_reason(tls, setup), libc.Uint64FromInt32(Xxcb_setup_failed_reason_length(tls, setup)))
  5753. libc.Xwrite(tls, int32(m_STDERR_FILENO), bp, uint64(1))
  5754. return 0
  5755. case int32(2): /* authenticate */
  5756. setup1 = (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup
  5757. libc.Xwrite(tls, int32(m_STDERR_FILENO), Xxcb_setup_authenticate_reason(tls, setup1), libc.Uint64FromInt32(Xxcb_setup_authenticate_reason_length(tls, setup1)))
  5758. libc.Xwrite(tls, int32(m_STDERR_FILENO), bp, uint64(1))
  5759. return 0
  5760. }
  5761. return int32(1)
  5762. }
  5763. // C documentation
  5764. //
  5765. // /* precondition: there must be something for us to write. */
  5766. func _write_vec(tls *libc.TLS, c uintptr, vector uintptr, count uintptr) (r int32) {
  5767. bp := tls.Alloc(128)
  5768. defer tls.Free(128)
  5769. var cur, i, n int32
  5770. var hdr, v1 uintptr
  5771. var _ /* cmsgbuf at bp+0 */ struct {
  5772. Fbuf [0][80]int8
  5773. Fcmsghdr Tcmsghdr
  5774. F__ccgo_pad2 [68]byte
  5775. }
  5776. var _ /* msg at bp+80 */ Tmsghdr
  5777. _, _, _, _, _ = cur, hdr, i, n, v1
  5778. n = *(*int32)(unsafe.Pointer(count))
  5779. if n > int32(m_IOV_MAX) {
  5780. n = int32(m_IOV_MAX)
  5781. }
  5782. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd != 0 {
  5783. *(*Tmsghdr)(unsafe.Pointer(bp + 80)) = Tmsghdr{
  5784. Fmsg_iov: *(*uintptr)(unsafe.Pointer(vector)),
  5785. Fmsg_iovlen: n,
  5786. Fmsg_control: bp,
  5787. Fmsg_controllen: uint32((libc.Uint64FromInt64(12)+(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))) & ^(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1)) + libc.Uint64FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd)*libc.Uint64FromInt64(4)),
  5788. }
  5789. if uint64((*Tmsghdr)(unsafe.Pointer(bp+80)).Fmsg_controllen) >= uint64(12) {
  5790. v1 = (*Tmsghdr)(unsafe.Pointer(bp + 80)).Fmsg_control
  5791. } else {
  5792. v1 = libc.UintptrFromInt32(0)
  5793. }
  5794. hdr = v1
  5795. (*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_len = (*(*Tmsghdr)(unsafe.Pointer(bp + 80))).Fmsg_controllen
  5796. (*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_level = int32(m_SOL_SOCKET)
  5797. (*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_type = int32(m_SCM_RIGHTS)
  5798. libc.Xmemcpy(tls, hdr+uintptr((libc.Uint64FromInt64(12)+(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))) & ^(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))), c+4328+16480, libc.Uint64FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd)*uint64(4))
  5799. n = int32(libc.Xsendmsg(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd, bp+80, 0))
  5800. if n < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == int32(m_EAGAIN) {
  5801. return int32(1)
  5802. }
  5803. i = 0
  5804. for {
  5805. if !(i < (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd) {
  5806. break
  5807. }
  5808. libc.Xclose(tls, *(*int32)(unsafe.Pointer(c + 4328 + 16480 + uintptr(i)*4)))
  5809. goto _2
  5810. _2:
  5811. ;
  5812. i++
  5813. }
  5814. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd = 0
  5815. } else {
  5816. n = int32(libc.Xwritev(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd, *(*uintptr)(unsafe.Pointer(vector)), n))
  5817. if n < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == int32(m_EAGAIN) {
  5818. return int32(1)
  5819. }
  5820. }
  5821. if n <= 0 {
  5822. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_ERROR))
  5823. return 0
  5824. }
  5825. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Ftotal_written += libc.Uint64FromInt32(n)
  5826. for {
  5827. if !(*(*int32)(unsafe.Pointer(count)) != 0) {
  5828. break
  5829. }
  5830. cur = libc.Int32FromUint64((*Tiovec)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(vector)))).Fiov_len)
  5831. if cur > n {
  5832. cur = n
  5833. }
  5834. if cur != 0 {
  5835. *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(vector)) + 8)) -= libc.Uint64FromInt32(cur)
  5836. (*Tiovec)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(vector)))).Fiov_base = (*Tiovec)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(vector)))).Fiov_base + uintptr(cur)
  5837. n -= cur
  5838. }
  5839. if (*Tiovec)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(vector)))).Fiov_len != 0 {
  5840. break
  5841. }
  5842. goto _3
  5843. _3:
  5844. ;
  5845. *(*int32)(unsafe.Pointer(count))--
  5846. *(*uintptr)(unsafe.Pointer(vector)) += 16
  5847. }
  5848. if !(*(*int32)(unsafe.Pointer(count)) != 0) {
  5849. *(*uintptr)(unsafe.Pointer(vector)) = uintptr(0)
  5850. }
  5851. return int32(1)
  5852. }
  5853. /* Public interface */
  5854. func Xxcb_get_setup(tls *libc.TLS, c uintptr) (r uintptr) {
  5855. if _is_static_error_conn(tls, c) != 0 {
  5856. return uintptr(unsafe.Pointer(&_xcb_error_setup))
  5857. }
  5858. /* doesn't need locking because it's never written to. */
  5859. return (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup
  5860. }
  5861. func Xxcb_get_file_descriptor(tls *libc.TLS, c uintptr) (r int32) {
  5862. if _is_static_error_conn(tls, c) != 0 {
  5863. return -int32(1)
  5864. }
  5865. /* doesn't need locking because it's never written to. */
  5866. return (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd
  5867. }
  5868. func Xxcb_connection_has_error(tls *libc.TLS, c uintptr) (r int32) {
  5869. /* doesn't need locking because it's read and written atomically. */
  5870. return (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error
  5871. }
  5872. func Xxcb_connect_to_fd(tls *libc.TLS, fd int32, auth_info uintptr) (r uintptr) {
  5873. var c uintptr
  5874. _ = c
  5875. c = libc.Xcalloc(tls, uint64(1), uint64(20928))
  5876. if !(c != 0) {
  5877. libc.Xclose(tls, fd)
  5878. return X_xcb_conn_ret_error(tls, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  5879. }
  5880. (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd = fd
  5881. if !(_set_fd_flags(tls, fd) != 0 && libc.Xpthread_mutex_init(tls, c+24, uintptr(0)) == 0 && X_xcb_in_init(tls, c+32) != 0 && X_xcb_out_init(tls, c+4328) != 0 && _write_setup(tls, c, auth_info) != 0 && _read_setup(tls, c) != 0 && X_xcb_ext_init(tls, c) != 0 && X_xcb_xid_init(tls, c) != 0) {
  5882. Xxcb_disconnect(tls, c)
  5883. return X_xcb_conn_ret_error(tls, int32(m_XCB_CONN_ERROR))
  5884. }
  5885. return c
  5886. }
  5887. func Xxcb_disconnect(tls *libc.TLS, c uintptr) {
  5888. if c == libc.UintptrFromInt32(0) || _is_static_error_conn(tls, c) != 0 {
  5889. return
  5890. }
  5891. libc.Xfree(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)
  5892. /* disallow further sends and receives */
  5893. libc.Xshutdown(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd, int32(m_SHUT_RDWR))
  5894. libc.Xclose(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd)
  5895. libc.Xpthread_mutex_destroy(tls, c+24)
  5896. X_xcb_in_destroy(tls, c+32)
  5897. X_xcb_out_destroy(tls, c+4328)
  5898. X_xcb_ext_destroy(tls, c)
  5899. X_xcb_xid_destroy(tls, c)
  5900. libc.Xfree(tls, c)
  5901. }
  5902. /* Private interface */
  5903. func X_xcb_conn_shutdown(tls *libc.TLS, c uintptr, err int32) {
  5904. (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error = err
  5905. }
  5906. // C documentation
  5907. //
  5908. // /* Return connection error state.
  5909. // * To make thread-safe, I need a seperate static
  5910. // * variable for every possible error.
  5911. // * has_error is the first field in xcb_connection_t, so just
  5912. // * return a casted int here; checking has_error (and only
  5913. // * has_error) will be safe.
  5914. // */
  5915. func X_xcb_conn_ret_error(tls *libc.TLS, err int32) (r uintptr) {
  5916. switch err {
  5917. case int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT):
  5918. return uintptr(unsafe.Pointer(&_xcb_con_closed_mem_er))
  5919. case int32(m_XCB_CONN_CLOSED_PARSE_ERR):
  5920. return uintptr(unsafe.Pointer(&_xcb_con_closed_parse_er))
  5921. case int32(m_XCB_CONN_CLOSED_INVALID_SCREEN):
  5922. return uintptr(unsafe.Pointer(&_xcb_con_closed_screen_er))
  5923. case int32(m_XCB_CONN_ERROR):
  5924. fallthrough
  5925. default:
  5926. return uintptr(unsafe.Pointer(&_xcb_con_error))
  5927. }
  5928. return r
  5929. }
  5930. func X_xcb_conn_wait(tls *libc.TLS, c uintptr, cond uintptr, vector uintptr, count uintptr) (r int32) {
  5931. bp := tls.Alloc(16)
  5932. defer tls.Free(16)
  5933. var may_read, ret, v1 int32
  5934. var p2 uintptr
  5935. var _ /* fd at bp+0 */ Tpollfd
  5936. _, _, _, _ = may_read, ret, v1, p2
  5937. /* If the thing I should be doing is already being done, wait for it. */
  5938. if count != 0 {
  5939. v1 = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fwriting
  5940. } else {
  5941. v1 = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading
  5942. }
  5943. if v1 != 0 {
  5944. libc.Xpthread_cond_wait(tls, cond, c+24)
  5945. return int32(1)
  5946. }
  5947. libc.Xmemset(tls, bp, 0, uint64(8))
  5948. (*(*Tpollfd)(unsafe.Pointer(bp))).Ffd = (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd
  5949. (*(*Tpollfd)(unsafe.Pointer(bp))).Fevents = int16(m_POLLIN)
  5950. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading++
  5951. if count != 0 {
  5952. p2 = bp + 4
  5953. *(*int16)(unsafe.Pointer(p2)) = int16(int32(*(*int16)(unsafe.Pointer(p2))) | libc.Int32FromInt32(m_POLLOUT))
  5954. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fwriting++
  5955. }
  5956. libc.Xpthread_mutex_unlock(tls, c+24)
  5957. for cond1 := true; cond1; cond1 = ret == -int32(1) && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == int32(m_EINTR) {
  5958. ret = libc.Xpoll(tls, bp, uint32(1), -int32(1))
  5959. /* If poll() returns an event we didn't expect, such as POLLNVAL, treat
  5960. * it as if it failed. */
  5961. if ret >= 0 && int32((*(*Tpollfd)(unsafe.Pointer(bp))).Frevents) & ^int32((*(*Tpollfd)(unsafe.Pointer(bp))).Fevents) != 0 {
  5962. ret = -int32(1)
  5963. break
  5964. }
  5965. }
  5966. if ret < 0 {
  5967. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_ERROR))
  5968. ret = 0
  5969. }
  5970. libc.Xpthread_mutex_lock(tls, c+24)
  5971. if ret != 0 {
  5972. /* The code allows two threads to call select()/poll() at the same time.
  5973. * First thread just wants to read, a second thread wants to write, too.
  5974. * We have to make sure that we don't steal the reading thread's reply
  5975. * and let it get stuck in select()/poll().
  5976. * So a thread may read if either:
  5977. * - There is no other thread that wants to read (the above situation
  5978. * did not occur).
  5979. * - It is the reading thread (above situation occurred).
  5980. */
  5981. may_read = libc.BoolInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading == int32(1) || !(count != 0))
  5982. if may_read != 0 && int32((*(*Tpollfd)(unsafe.Pointer(bp))).Frevents)&int32(m_POLLIN) != 0 {
  5983. ret = libc.BoolInt32(ret != 0 && X_xcb_in_read(tls, c) != 0)
  5984. }
  5985. if int32((*(*Tpollfd)(unsafe.Pointer(bp))).Frevents)&int32(m_POLLOUT) != 0 {
  5986. ret = libc.BoolInt32(ret != 0 && _write_vec(tls, c, vector, count) != 0)
  5987. }
  5988. }
  5989. if count != 0 {
  5990. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fwriting--
  5991. }
  5992. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading--
  5993. return ret
  5994. }
  5995. func Xxcb_total_read(tls *libc.TLS, c uintptr) (r Tuint64_t) {
  5996. var n Tuint64_t
  5997. _ = n
  5998. if Xxcb_connection_has_error(tls, c) != 0 {
  5999. return uint64(0)
  6000. }
  6001. libc.Xpthread_mutex_lock(tls, c+24)
  6002. n = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Ftotal_read
  6003. libc.Xpthread_mutex_unlock(tls, c+24)
  6004. return n
  6005. }
  6006. func Xxcb_total_written(tls *libc.TLS, c uintptr) (r Tuint64_t) {
  6007. var n Tuint64_t
  6008. _ = n
  6009. if Xxcb_connection_has_error(tls, c) != 0 {
  6010. return uint64(0)
  6011. }
  6012. libc.Xpthread_mutex_lock(tls, c+24)
  6013. n = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Ftotal_written
  6014. libc.Xpthread_mutex_unlock(tls, c+24)
  6015. return n
  6016. }
  6017. type Txcb_extension_t = struct {
  6018. Fname uintptr
  6019. Fglobal_id int32
  6020. }
  6021. type Txcb_extension_t1 = struct {
  6022. Fname uintptr
  6023. Fglobal_id int32
  6024. }
  6025. type Txcb_protocol_request_t = struct {
  6026. Fcount Tsize_t
  6027. Fext uintptr
  6028. Fopcode Tuint8_t
  6029. Fisvoid Tuint8_t
  6030. }
  6031. type _xcb_send_request_flags_t = int32
  6032. const _XCB_REQUEST_CHECKED = 1
  6033. const _XCB_REQUEST_RAW = 2
  6034. const _XCB_REQUEST_DISCARD_REPLY = 4
  6035. const _XCB_REQUEST_REPLY_FDS = 8
  6036. /*
  6037. * This file generated automatically from bigreq.xml by c_client.py.
  6038. * Edit at your peril.
  6039. */
  6040. /**
  6041. * @defgroup XCB_BigRequests_API XCB BigRequests API
  6042. * @brief BigRequests XCB Protocol Implementation.
  6043. * @{
  6044. **/
  6045. /**
  6046. * @}
  6047. */
  6048. func _send_request(tls *libc.TLS, c uintptr, isvoid int32, workaround _workarounds, flags int32, vector uintptr, count int32) {
  6049. var p1 uintptr
  6050. _ = p1
  6051. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6052. return
  6053. }
  6054. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest++
  6055. if !(isvoid != 0) {
  6056. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_expected = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest
  6057. }
  6058. if workaround != int32(_WORKAROUND_NONE) || flags != 0 {
  6059. X_xcb_in_expect_reply(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest, workaround, flags)
  6060. }
  6061. for count != 0 && libc.Uint64FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len)+(*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len <= uint64(16384) {
  6062. libc.Xmemcpy(tls, c+4328+44+uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len), (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base, (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len)
  6063. p1 = c + 4328 + 16428
  6064. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len)
  6065. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base + uintptr((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len)
  6066. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len = uint64(0)
  6067. vector += 16
  6068. count--
  6069. }
  6070. if !(count != 0) {
  6071. return
  6072. }
  6073. vector -= 16
  6074. count++
  6075. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base = c + 4328 + 44
  6076. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len = libc.Uint64FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len)
  6077. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len = 0
  6078. X_xcb_out_send(tls, c, vector, count)
  6079. }
  6080. func _send_sync(tls *libc.TLS, c uintptr) {
  6081. bp := tls.Alloc(32)
  6082. defer tls.Free(32)
  6083. var _ /* vector at bp+0 */ [2]Tiovec
  6084. (*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base = uintptr(unsafe.Pointer(&_sync_req))
  6085. (*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len = uint64(4)
  6086. _send_request(tls, c, 0, int32(_WORKAROUND_NONE), int32(_XCB_REQUEST_DISCARD_REPLY), bp+uintptr(1)*16, int32(1))
  6087. }
  6088. var _sync_req = *(*struct {
  6089. Fpacket [0]Tuint32_t
  6090. Ffields struct {
  6091. Fmajor Tuint8_t
  6092. Fpad Tuint8_t
  6093. Flen1 Tuint16_t
  6094. }
  6095. })(unsafe.Pointer(&struct {
  6096. Fmajor uint8
  6097. Fpad uint8
  6098. Flen1 uint16
  6099. }{
  6100. Fmajor: uint8(43),
  6101. Flen1: uint16(1),
  6102. }))
  6103. func _get_socket_back(tls *libc.TLS, c uintptr) {
  6104. for (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Freturn_socket != 0 && (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fsocket_moving != 0 {
  6105. libc.Xpthread_cond_wait(tls, c+4328+16, c+24)
  6106. }
  6107. if !((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Freturn_socket != 0) {
  6108. return
  6109. }
  6110. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fsocket_moving = int32(1)
  6111. libc.Xpthread_mutex_unlock(tls, c+24)
  6112. (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&struct{ uintptr }{(*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Freturn_socket})))(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fsocket_closure)
  6113. libc.Xpthread_mutex_lock(tls, c+24)
  6114. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fsocket_moving = 0
  6115. libc.Xpthread_cond_broadcast(tls, c+4328+16)
  6116. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Freturn_socket = uintptr(0)
  6117. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fsocket_closure = uintptr(0)
  6118. X_xcb_in_replies_done(tls, c)
  6119. }
  6120. func _prepare_socket_request(tls *libc.TLS, c uintptr) {
  6121. /* We're about to append data to out.queue, so we need to
  6122. * atomically test for an external socket owner *and* some other
  6123. * thread currently writing.
  6124. *
  6125. * If we have an external socket owner, we have to get the socket back
  6126. * before we can use it again.
  6127. *
  6128. * If some other thread is writing to the socket, we assume it's
  6129. * writing from out.queue, and so we can't stick data there.
  6130. *
  6131. * We satisfy this condition by first calling get_socket_back
  6132. * (which may drop the lock, but will return when XCB owns the
  6133. * socket again) and then checking for another writing thread and
  6134. * escaping the loop if we're ready to go.
  6135. */
  6136. for {
  6137. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6138. return
  6139. }
  6140. _get_socket_back(tls, c)
  6141. if !((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fwriting != 0) {
  6142. break
  6143. }
  6144. libc.Xpthread_cond_wait(tls, c+4328, c+24)
  6145. goto _1
  6146. _1:
  6147. }
  6148. }
  6149. /* Public interface */
  6150. func Xxcb_prefetch_maximum_request_length(tls *libc.TLS, c uintptr) {
  6151. var ext uintptr
  6152. _ = ext
  6153. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6154. return
  6155. }
  6156. libc.Xpthread_mutex_lock(tls, c+4328+16464)
  6157. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fmaximum_request_length_tag == int32(_LAZY_NONE) {
  6158. ext = Xxcb_get_extension_data(tls, c, uintptr(unsafe.Pointer(&Xxcb_big_requests_id)))
  6159. if ext != 0 && (*Txcb_query_extension_reply_t)(unsafe.Pointer(ext)).Fpresent != 0 {
  6160. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fmaximum_request_length_tag = int32(_LAZY_COOKIE)
  6161. *(*Txcb_big_requests_enable_cookie_t)(unsafe.Pointer(c + 4328 + 16476)) = Xxcb_big_requests_enable(tls, c)
  6162. } else {
  6163. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fmaximum_request_length_tag = int32(_LAZY_FORCED)
  6164. *(*Tuint32_t)(unsafe.Pointer(c + 4328 + 16476)) = uint32((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fmaximum_request_length)
  6165. }
  6166. }
  6167. libc.Xpthread_mutex_unlock(tls, c+4328+16464)
  6168. }
  6169. func Xxcb_get_maximum_request_length(tls *libc.TLS, c uintptr) (r1 Tuint32_t) {
  6170. var r uintptr
  6171. _ = r
  6172. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6173. return uint32(0)
  6174. }
  6175. Xxcb_prefetch_maximum_request_length(tls, c)
  6176. libc.Xpthread_mutex_lock(tls, c+4328+16464)
  6177. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fmaximum_request_length_tag == int32(_LAZY_COOKIE) {
  6178. r = Xxcb_big_requests_enable_reply(tls, c, *(*Txcb_big_requests_enable_cookie_t)(unsafe.Pointer(c + 4328 + 16476)), uintptr(0))
  6179. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fmaximum_request_length_tag = int32(_LAZY_FORCED)
  6180. if r != 0 {
  6181. *(*Tuint32_t)(unsafe.Pointer(c + 4328 + 16476)) = (*Txcb_big_requests_enable_reply_t)(unsafe.Pointer(r)).Fmaximum_request_length
  6182. libc.Xfree(tls, r)
  6183. } else {
  6184. *(*Tuint32_t)(unsafe.Pointer(c + 4328 + 16476)) = uint32((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fmaximum_request_length)
  6185. }
  6186. }
  6187. libc.Xpthread_mutex_unlock(tls, c+4328+16464)
  6188. return *(*Tuint32_t)(unsafe.Pointer(c + 4328 + 16476))
  6189. }
  6190. func _close_fds(tls *libc.TLS, fds uintptr, num_fds uint32) {
  6191. var index uint32
  6192. _ = index
  6193. index = uint32(0)
  6194. for {
  6195. if !(index < num_fds) {
  6196. break
  6197. }
  6198. libc.Xclose(tls, *(*int32)(unsafe.Pointer(fds + uintptr(index)*4)))
  6199. goto _1
  6200. _1:
  6201. ;
  6202. index++
  6203. }
  6204. }
  6205. func _send_fds(tls *libc.TLS, c uintptr, fds uintptr, num_fds uint32) {
  6206. var v1 int32
  6207. var v2 uintptr
  6208. _, _ = v1, v2
  6209. /* Calling _xcb_out_flush_to() can drop the iolock and wait on a condition
  6210. * variable if another thread is currently writing (c->out.writing > 0).
  6211. * This call waits for writers to be done and thus _xcb_out_flush_to() will
  6212. * do the work itself (in which case we are a writer and
  6213. * prepare_socket_request() will wait for us to be done if another threads
  6214. * tries to send fds, too). Thanks to this, we can atomically write out FDs.
  6215. */
  6216. _prepare_socket_request(tls, c)
  6217. for num_fds > uint32(0) {
  6218. for (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd == int32(m_XCB_MAX_PASS_FD) && !((*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0) {
  6219. /* XXX: if c->out.writing > 0, this releases the iolock and
  6220. * potentially allows other threads to interfere with their own fds.
  6221. */
  6222. X_xcb_out_flush_to(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest)
  6223. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd == int32(m_XCB_MAX_PASS_FD) {
  6224. /* We need some request to send FDs with */
  6225. X_xcb_out_send_sync(tls, c)
  6226. }
  6227. }
  6228. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6229. break
  6230. }
  6231. v2 = c + 4328 + 16480 + 64
  6232. v1 = *(*int32)(unsafe.Pointer(v2))
  6233. *(*int32)(unsafe.Pointer(v2))++
  6234. *(*int32)(unsafe.Pointer(c + 4328 + 16480 + uintptr(v1)*4)) = *(*int32)(unsafe.Pointer(fds))
  6235. fds += 4
  6236. num_fds--
  6237. }
  6238. _close_fds(tls, fds, num_fds)
  6239. }
  6240. func Xxcb_send_request_with_fds64(tls *libc.TLS, c uintptr, flags int32, vector uintptr, req uintptr, num_fds uint32, fds uintptr) (r Tuint64_t) {
  6241. bp := tls.Alloc(16)
  6242. defer tls.Free(16)
  6243. var extension uintptr
  6244. var i uint32
  6245. var longlen, v2 Tsize_t
  6246. var request Tuint64_t
  6247. var shortlen Tuint16_t
  6248. var veclen int32
  6249. var workaround _workarounds
  6250. var v3 uint64
  6251. var _ /* prefix at bp+0 */ [2]Tuint32_t
  6252. _, _, _, _, _, _, _, _, _ = extension, i, longlen, request, shortlen, veclen, workaround, v2, v3
  6253. veclen = libc.Int32FromUint64((*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fcount)
  6254. workaround = int32(_WORKAROUND_NONE)
  6255. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6256. _close_fds(tls, fds, num_fds)
  6257. return uint64(0)
  6258. }
  6259. if !(flags&int32(_XCB_REQUEST_RAW) != 0) {
  6260. shortlen = uint16(0)
  6261. longlen = uint64(0)
  6262. /* set the major opcode, and the minor opcode for extensions */
  6263. if (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fext != 0 {
  6264. extension = Xxcb_get_extension_data(tls, c, (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fext)
  6265. if !(extension != 0 && (*Txcb_query_extension_reply_t)(unsafe.Pointer(extension)).Fpresent != 0) {
  6266. _close_fds(tls, fds, num_fds)
  6267. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_EXT_NOTSUPPORTED))
  6268. return uint64(0)
  6269. }
  6270. *(*Tuint8_t)(unsafe.Pointer((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base)) = (*Txcb_query_extension_reply_t)(unsafe.Pointer(extension)).Fmajor_opcode
  6271. *(*Tuint8_t)(unsafe.Pointer((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base + 1)) = (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fopcode
  6272. } else {
  6273. *(*Tuint8_t)(unsafe.Pointer((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base)) = (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fopcode
  6274. }
  6275. /* put together the length field, possibly using BIGREQUESTS */
  6276. i = uint32(0)
  6277. for {
  6278. if !(uint64(i) < (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fcount) {
  6279. break
  6280. }
  6281. longlen += (*(*Tiovec)(unsafe.Pointer(vector + uintptr(i)*16))).Fiov_len
  6282. if !((*(*Tiovec)(unsafe.Pointer(vector + uintptr(i)*16))).Fiov_base != 0) {
  6283. (*(*Tiovec)(unsafe.Pointer(vector + uintptr(i)*16))).Fiov_base = uintptr(unsafe.Pointer(&_pad1))
  6284. }
  6285. goto _1
  6286. _1:
  6287. ;
  6288. i++
  6289. }
  6290. longlen >>= uint64(2)
  6291. if longlen <= uint64((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fmaximum_request_length) {
  6292. /* we don't need BIGREQUESTS. */
  6293. shortlen = uint16(longlen)
  6294. longlen = uint64(0)
  6295. } else {
  6296. if longlen > uint64(Xxcb_get_maximum_request_length(tls, c)) {
  6297. _close_fds(tls, fds, num_fds)
  6298. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_REQ_LEN_EXCEED))
  6299. return uint64(0) /* server can't take this; maybe need BIGREQUESTS? */
  6300. }
  6301. }
  6302. /* set the length field. */
  6303. *(*Tuint16_t)(unsafe.Pointer((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base + 1*2)) = shortlen
  6304. if !(shortlen != 0) {
  6305. (*(*[2]Tuint32_t)(unsafe.Pointer(bp)))[0] = *(*Tuint32_t)(unsafe.Pointer((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base))
  6306. longlen++
  6307. v2 = longlen
  6308. (*(*[2]Tuint32_t)(unsafe.Pointer(bp)))[int32(1)] = uint32(v2)
  6309. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base + uintptr(1)*4
  6310. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len -= uint64(4)
  6311. vector -= 16
  6312. veclen++
  6313. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base = bp
  6314. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len = uint64(8)
  6315. }
  6316. }
  6317. flags &= ^int32(_XCB_REQUEST_RAW)
  6318. /* do we need to work around the X server bug described in glx.xml? */
  6319. /* XXX: GetFBConfigs won't use BIG-REQUESTS in any sane
  6320. * configuration, but that should be handled here anyway. */
  6321. if (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fext != 0 && !((*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fisvoid != 0) && !(libc.Xstrcmp(tls, (*Txcb_extension_t)(unsafe.Pointer((*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fext)).Fname, __ccgo_ts) != 0) && (libc.Int32FromUint8((*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fopcode) == int32(17) && *(*Tuint32_t)(unsafe.Pointer((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base + 1*4)) == uint32(0x10004) || libc.Int32FromUint8((*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fopcode) == int32(21)) {
  6322. workaround = int32(_WORKAROUND_GLX_GET_FB_CONFIGS_BUG)
  6323. }
  6324. /* get a sequence number and arrange for delivery. */
  6325. libc.Xpthread_mutex_lock(tls, c+24)
  6326. /* send FDs before establishing a good request number, because this might
  6327. * call send_sync(), too
  6328. */
  6329. _send_fds(tls, c, fds, num_fds)
  6330. _prepare_socket_request(tls, c)
  6331. /* send GetInputFocus (sync_req) when 64k-2 requests have been sent without
  6332. * a reply.
  6333. * Also send sync_req (could use NoOp) at 32-bit wrap to avoid having
  6334. * applications see sequence 0 as that is used to indicate
  6335. * an error in sending the request
  6336. */
  6337. for (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fisvoid != 0 && (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest == (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_expected+libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(16))-uint64(2) || uint32((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest+libc.Uint64FromInt32(1)) == uint32(0) {
  6338. _send_sync(tls, c)
  6339. _prepare_socket_request(tls, c)
  6340. }
  6341. _send_request(tls, c, libc.Int32FromUint8((*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fisvoid), workaround, flags, vector, veclen)
  6342. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6343. v3 = uint64(0)
  6344. } else {
  6345. v3 = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest
  6346. }
  6347. request = v3
  6348. libc.Xpthread_mutex_unlock(tls, c+24)
  6349. return request
  6350. }
  6351. var _pad1 [3]int8
  6352. // C documentation
  6353. //
  6354. // /* request number are actually uint64_t internally but keep API compat with unsigned int */
  6355. func Xxcb_send_request_with_fds(tls *libc.TLS, c uintptr, flags int32, vector uintptr, req uintptr, num_fds uint32, fds uintptr) (r uint32) {
  6356. return uint32(Xxcb_send_request_with_fds64(tls, c, flags, vector, req, num_fds, fds))
  6357. }
  6358. func Xxcb_send_request64(tls *libc.TLS, c uintptr, flags int32, vector uintptr, req uintptr) (r Tuint64_t) {
  6359. return Xxcb_send_request_with_fds64(tls, c, flags, vector, req, uint32(0), libc.UintptrFromInt32(0))
  6360. }
  6361. // C documentation
  6362. //
  6363. // /* request number are actually uint64_t internally but keep API compat with unsigned int */
  6364. func Xxcb_send_request(tls *libc.TLS, c uintptr, flags int32, vector uintptr, req uintptr) (r uint32) {
  6365. return uint32(Xxcb_send_request64(tls, c, flags, vector, req))
  6366. }
  6367. func Xxcb_send_fd(tls *libc.TLS, c uintptr, fd int32) {
  6368. bp := tls.Alloc(16)
  6369. defer tls.Free(16)
  6370. var _ /* fds at bp+0 */ [1]int32
  6371. *(*[1]int32)(unsafe.Pointer(bp)) = [1]int32{
  6372. 0: fd,
  6373. }
  6374. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6375. libc.Xclose(tls, fd)
  6376. return
  6377. }
  6378. libc.Xpthread_mutex_lock(tls, c+24)
  6379. _send_fds(tls, c, bp, uint32(1))
  6380. libc.Xpthread_mutex_unlock(tls, c+24)
  6381. }
  6382. func Xxcb_take_socket(tls *libc.TLS, c uintptr, return_socket uintptr, closure uintptr, flags int32, sent uintptr) (r int32) {
  6383. var ret int32
  6384. _ = ret
  6385. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6386. return 0
  6387. }
  6388. libc.Xpthread_mutex_lock(tls, c+24)
  6389. _get_socket_back(tls, c)
  6390. /* _xcb_out_flush may drop the iolock allowing other threads to
  6391. * write requests, so keep flushing until we're done
  6392. */
  6393. for cond := true; cond; cond = ret != 0 && (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest != (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest_written {
  6394. ret = X_xcb_out_flush_to(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest)
  6395. }
  6396. if ret != 0 {
  6397. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Freturn_socket = return_socket
  6398. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fsocket_closure = closure
  6399. if flags != 0 {
  6400. /* c->out.request + 1 will be the first request sent by the external
  6401. * socket owner. If the socket is returned before this request is sent
  6402. * it will be detected in _xcb_in_replies_done and this pending_reply
  6403. * will be discarded.
  6404. */
  6405. X_xcb_in_expect_reply(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest+uint64(1), int32(_WORKAROUND_EXTERNAL_SOCKET_OWNER), flags)
  6406. }
  6407. *(*Tuint64_t)(unsafe.Pointer(sent)) = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest
  6408. }
  6409. libc.Xpthread_mutex_unlock(tls, c+24)
  6410. return ret
  6411. }
  6412. func Xxcb_writev(tls *libc.TLS, c uintptr, vector uintptr, count int32, requests Tuint64_t) (r int32) {
  6413. var ret int32
  6414. _ = ret
  6415. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6416. return 0
  6417. }
  6418. libc.Xpthread_mutex_lock(tls, c+24)
  6419. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest += requests
  6420. ret = X_xcb_out_send(tls, c, vector, count)
  6421. libc.Xpthread_mutex_unlock(tls, c+24)
  6422. return ret
  6423. }
  6424. func Xxcb_flush(tls *libc.TLS, c uintptr) (r int32) {
  6425. var ret int32
  6426. _ = ret
  6427. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6428. return 0
  6429. }
  6430. libc.Xpthread_mutex_lock(tls, c+24)
  6431. ret = X_xcb_out_flush_to(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest)
  6432. libc.Xpthread_mutex_unlock(tls, c+24)
  6433. return ret
  6434. }
  6435. /* Private interface */
  6436. func X_xcb_out_init(tls *libc.TLS, out uintptr) (r int32) {
  6437. if libc.Xpthread_cond_init(tls, out+16, uintptr(0)) != 0 {
  6438. return 0
  6439. }
  6440. (*T_xcb_out)(unsafe.Pointer(out)).Freturn_socket = uintptr(0)
  6441. (*T_xcb_out)(unsafe.Pointer(out)).Fsocket_closure = uintptr(0)
  6442. (*T_xcb_out)(unsafe.Pointer(out)).Fsocket_moving = 0
  6443. if libc.Xpthread_cond_init(tls, out, uintptr(0)) != 0 {
  6444. return 0
  6445. }
  6446. (*T_xcb_out)(unsafe.Pointer(out)).Fwriting = 0
  6447. (*T_xcb_out)(unsafe.Pointer(out)).Fqueue_len = 0
  6448. (*T_xcb_out)(unsafe.Pointer(out)).Frequest = uint64(0)
  6449. (*T_xcb_out)(unsafe.Pointer(out)).Frequest_written = uint64(0)
  6450. (*T_xcb_out)(unsafe.Pointer(out)).Frequest_expected_written = uint64(0)
  6451. if libc.Xpthread_mutex_init(tls, out+16464, uintptr(0)) != 0 {
  6452. return 0
  6453. }
  6454. (*T_xcb_out)(unsafe.Pointer(out)).Fmaximum_request_length_tag = int32(_LAZY_NONE)
  6455. return int32(1)
  6456. }
  6457. func X_xcb_out_destroy(tls *libc.TLS, out uintptr) {
  6458. libc.Xpthread_mutex_destroy(tls, out+16464)
  6459. libc.Xpthread_cond_destroy(tls, out)
  6460. libc.Xpthread_cond_destroy(tls, out+16)
  6461. }
  6462. func X_xcb_out_send(tls *libc.TLS, c uintptr, _vector uintptr, _count int32) (r int32) {
  6463. bp := tls.Alloc(16)
  6464. defer tls.Free(16)
  6465. *(*uintptr)(unsafe.Pointer(bp)) = _vector
  6466. *(*int32)(unsafe.Pointer(bp + 8)) = _count
  6467. var ret int32
  6468. _ = ret
  6469. ret = int32(1)
  6470. for ret != 0 && *(*int32)(unsafe.Pointer(bp + 8)) != 0 {
  6471. ret = X_xcb_conn_wait(tls, c, c+4328, bp, bp+8)
  6472. }
  6473. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest_written = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest
  6474. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest_expected_written = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_expected
  6475. libc.Xpthread_cond_broadcast(tls, c+4328)
  6476. X_xcb_in_wake_up_next_reader(tls, c)
  6477. return ret
  6478. }
  6479. func X_xcb_out_send_sync(tls *libc.TLS, c uintptr) {
  6480. _prepare_socket_request(tls, c)
  6481. _send_sync(tls, c)
  6482. }
  6483. func X_xcb_out_flush_to(tls *libc.TLS, c uintptr, request Tuint64_t) (r int32) {
  6484. bp := tls.Alloc(16)
  6485. defer tls.Free(16)
  6486. var _ /* vec at bp+0 */ Tiovec
  6487. if libc.Int64FromUint64((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest_written-request) >= 0 {
  6488. return int32(1)
  6489. }
  6490. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len != 0 {
  6491. (*(*Tiovec)(unsafe.Pointer(bp))).Fiov_base = c + 4328 + 44
  6492. (*(*Tiovec)(unsafe.Pointer(bp))).Fiov_len = libc.Uint64FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len)
  6493. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len = 0
  6494. return X_xcb_out_send(tls, c, bp, int32(1))
  6495. }
  6496. for (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fwriting != 0 {
  6497. libc.Xpthread_cond_wait(tls, c+4328, c+24)
  6498. }
  6499. return int32(1)
  6500. }
  6501. const m_INT32_MAX1 = 2147483647
  6502. const m_MSG_CTRUNC1 = 32
  6503. const m_MSG_TRUNC1 = 16
  6504. const m_POLLOUT1 = 0x0004
  6505. const m_UINT32_MAX1 = 4294967295
  6506. const m_XCB_ERROR = 0
  6507. const m_XCB_REPLY = 1
  6508. const m_XCB_XGE_EVENT = 35
  6509. type Txcb_special_event_t = struct {
  6510. Fnext uintptr
  6511. Fextension Tuint8_t
  6512. Feid Tuint32_t
  6513. Fstamp uintptr
  6514. Fevents uintptr
  6515. Fevents_tail uintptr
  6516. Fspecial_event_cond Tpthread_cond_t
  6517. }
  6518. type Txcb_special_event = Txcb_special_event_t
  6519. type Tevent_list = struct {
  6520. Fevent uintptr
  6521. Fnext uintptr
  6522. }
  6523. type Treply_list = struct {
  6524. Freply uintptr
  6525. Fnext uintptr
  6526. }
  6527. type Tpending_reply = struct {
  6528. Ffirst_request Tuint64_t
  6529. Flast_request Tuint64_t
  6530. Fworkaround _workarounds
  6531. Fflags int32
  6532. Fnext uintptr
  6533. }
  6534. type Treader_list = struct {
  6535. Frequest Tuint64_t
  6536. Fdata uintptr
  6537. Fnext uintptr
  6538. }
  6539. type Tspecial_list = struct {
  6540. Fse uintptr
  6541. Fnext uintptr
  6542. }
  6543. func _remove_finished_readers(tls *libc.TLS, prev_reader uintptr, completed Tuint64_t) {
  6544. for *(*uintptr)(unsafe.Pointer(prev_reader)) != 0 && libc.Int64FromUint64((*Treader_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_reader)))).Frequest-completed) <= 0 {
  6545. /* If you don't have what you're looking for now, you never
  6546. * will. Wake up and leave me alone. */
  6547. libc.Xpthread_cond_signal(tls, (*Treader_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_reader)))).Fdata)
  6548. *(*uintptr)(unsafe.Pointer(prev_reader)) = (*Treader_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_reader)))).Fnext
  6549. }
  6550. }
  6551. func _read_fds(tls *libc.TLS, c uintptr, fds uintptr, nfd int32) (r int32) {
  6552. var ifds uintptr
  6553. var infd int32
  6554. _, _ = ifds, infd
  6555. ifds = c + 32 + 4216 + uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd)*4
  6556. infd = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd - (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd
  6557. if nfd > infd {
  6558. return 0
  6559. }
  6560. libc.Xmemcpy(tls, fds, ifds, libc.Uint64FromInt32(nfd)*uint64(4))
  6561. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd += nfd
  6562. return int32(1)
  6563. }
  6564. type Txcb_ge_special_event_t = struct {
  6565. Fresponse_type Tuint8_t
  6566. Fextension Tuint8_t
  6567. Fsequence Tuint16_t
  6568. Flength Tuint32_t
  6569. Fevtype Tuint16_t
  6570. Fpad0 [2]Tuint8_t
  6571. Feid Tuint32_t
  6572. Fpad1 [16]Tuint8_t
  6573. }
  6574. func _event_special(tls *libc.TLS, c uintptr, event uintptr) (r int32) {
  6575. var ges, special_event uintptr
  6576. _, _ = ges, special_event
  6577. ges = (*Tevent_list)(unsafe.Pointer(event)).Fevent
  6578. /* Special events are always XGE events */
  6579. if libc.Int32FromUint8((*Txcb_ge_special_event_t1)(unsafe.Pointer(ges)).Fresponse_type)&int32(0x7f) != int32(m_XCB_XGE_EVENT) {
  6580. return 0
  6581. }
  6582. special_event = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_events
  6583. for {
  6584. if !(special_event != 0) {
  6585. break
  6586. }
  6587. if libc.Int32FromUint8((*Txcb_ge_special_event_t1)(unsafe.Pointer(ges)).Fextension) == libc.Int32FromUint8((*Txcb_special_event)(unsafe.Pointer(special_event)).Fextension) && (*Txcb_ge_special_event_t1)(unsafe.Pointer(ges)).Feid == (*Txcb_special_event)(unsafe.Pointer(special_event)).Feid {
  6588. *(*uintptr)(unsafe.Pointer((*Txcb_special_event)(unsafe.Pointer(special_event)).Fevents_tail)) = event
  6589. (*Txcb_special_event)(unsafe.Pointer(special_event)).Fevents_tail = event + 8
  6590. if (*Txcb_special_event)(unsafe.Pointer(special_event)).Fstamp != 0 {
  6591. *(*Tuint32_t)(unsafe.Pointer((*Txcb_special_event)(unsafe.Pointer(special_event)).Fstamp))++
  6592. }
  6593. libc.Xpthread_cond_signal(tls, special_event+40)
  6594. return int32(1)
  6595. }
  6596. goto _1
  6597. _1:
  6598. ;
  6599. special_event = (*Txcb_special_event)(unsafe.Pointer(special_event)).Fnext
  6600. }
  6601. return 0
  6602. }
  6603. func _read_packet(tls *libc.TLS, c uintptr) (r int32) {
  6604. bp := tls.Alloc(16)
  6605. defer tls.Free(16)
  6606. var buf, cur, event, oldpend, p, pend uintptr
  6607. var bufsize, eventlength, lastread, length, new_length Tuint64_t
  6608. var nfd int32
  6609. var v1 uint64
  6610. var _ /* genrep at bp+0 */ Txcb_generic_reply_t
  6611. _, _, _, _, _, _, _, _, _, _, _, _, _ = buf, bufsize, cur, event, eventlength, lastread, length, new_length, nfd, oldpend, p, pend, v1
  6612. length = uint64(32)
  6613. eventlength = uint64(0) /* length after first 32 bytes for GenericEvents */
  6614. nfd = 0
  6615. pend = uintptr(0)
  6616. /* Wait for there to be enough data for us to read a whole packet */
  6617. if libc.Uint64FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len) < length {
  6618. return 0
  6619. }
  6620. /* Get the response type, length, and sequence number. */
  6621. libc.Xmemcpy(tls, bp, c+32+12, uint64(8))
  6622. /* Compute 32-bit sequence number of this packet. */
  6623. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type)&int32(0x7f) != int32(m_XCB_KEYMAP_NOTIFY) {
  6624. lastread = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read
  6625. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read = lastread&uint64(0xffffffffffff0000) | uint64((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fsequence)
  6626. if libc.Int64FromUint64((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read-lastread) < 0 {
  6627. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read += uint64(0x10000)
  6628. }
  6629. if libc.Int64FromUint64((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_expected) > 0 {
  6630. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_expected = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read
  6631. }
  6632. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read != lastread {
  6633. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply != 0 {
  6634. X_xcb_map_put(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freplies, lastread, (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply)
  6635. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply = uintptr(0)
  6636. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply_tail = c + 32 + 4144
  6637. }
  6638. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read - uint64(1)
  6639. }
  6640. for (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies != 0 && (*Tpending_reply1)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies)).Fworkaround != int32(_WORKAROUND_EXTERNAL_SOCKET_OWNER) && libc.Int64FromUint64((*Tpending_reply1)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies)).Flast_request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed) <= 0 {
  6641. oldpend = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies
  6642. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies = (*Tpending_reply)(unsafe.Pointer(oldpend)).Fnext
  6643. if !((*Tpending_reply)(unsafe.Pointer(oldpend)).Fnext != 0) {
  6644. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail = c + 32 + 4200
  6645. }
  6646. libc.Xfree(tls, oldpend)
  6647. }
  6648. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) == m_XCB_ERROR {
  6649. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read
  6650. }
  6651. _remove_finished_readers(tls, c+32+4184, (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed)
  6652. }
  6653. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) == m_XCB_ERROR || libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) == int32(m_XCB_REPLY) {
  6654. pend = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies
  6655. if pend != 0 && !(libc.Int64FromUint64((*Tpending_reply)(unsafe.Pointer(pend)).Ffirst_request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read) <= 0 && ((*Tpending_reply)(unsafe.Pointer(pend)).Fworkaround == int32(_WORKAROUND_EXTERNAL_SOCKET_OWNER) || libc.Int64FromUint64((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read-(*Tpending_reply)(unsafe.Pointer(pend)).Flast_request) <= 0)) {
  6656. pend = uintptr(0)
  6657. }
  6658. }
  6659. /* For reply packets, check that the entire packet is available. */
  6660. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) == int32(m_XCB_REPLY) {
  6661. if pend != 0 && (*Tpending_reply)(unsafe.Pointer(pend)).Fworkaround == int32(_WORKAROUND_GLX_GET_FB_CONFIGS_BUG) {
  6662. p = c + 32 + 12
  6663. new_length = uint64(*(*Tuint32_t)(unsafe.Pointer(p + 2*4))) * uint64(*(*Tuint32_t)(unsafe.Pointer(p + 3*4)))
  6664. if new_length >= uint64(libc.Uint32FromUint32(0xffffffff)/libc.Uint32FromUint32(16)) {
  6665. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  6666. return 0
  6667. }
  6668. (*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Flength = uint32(new_length * libc.Uint64FromUint64(2))
  6669. }
  6670. length += uint64((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Flength) * uint64(4)
  6671. /* XXX a bit of a hack -- we "know" that all FD replys place
  6672. * the number of fds in the pad0 byte */
  6673. if pend != 0 && (*Tpending_reply)(unsafe.Pointer(pend)).Fflags&int32(_XCB_REQUEST_REPLY_FDS) != 0 {
  6674. nfd = libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fpad0)
  6675. }
  6676. }
  6677. /* XGE events may have sizes > 32 */
  6678. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type)&int32(0x7f) == int32(m_XCB_XGE_EVENT) {
  6679. eventlength = uint64((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Flength) * uint64(4)
  6680. }
  6681. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) == int32(m_XCB_REPLY) {
  6682. v1 = uint64(0)
  6683. } else {
  6684. v1 = uint64(4)
  6685. }
  6686. bufsize = length + eventlength + libc.Uint64FromInt32(nfd)*uint64(4) + v1
  6687. if bufsize < uint64(m_INT32_MAX1) {
  6688. buf = libc.Xmalloc(tls, bufsize)
  6689. } else {
  6690. buf = libc.UintptrFromInt32(0)
  6691. }
  6692. if !(buf != 0) {
  6693. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  6694. return 0
  6695. }
  6696. if X_xcb_in_read_block(tls, c, buf, libc.Int32FromUint64(length)) <= 0 {
  6697. libc.Xfree(tls, buf)
  6698. return 0
  6699. }
  6700. /* pull in XGE event data if available, append after event struct */
  6701. if eventlength != 0 {
  6702. if X_xcb_in_read_block(tls, c, buf+1*36, libc.Int32FromUint64(eventlength)) <= 0 {
  6703. libc.Xfree(tls, buf)
  6704. return 0
  6705. }
  6706. }
  6707. if nfd != 0 {
  6708. if !(_read_fds(tls, c, buf+uintptr(length), nfd) != 0) {
  6709. libc.Xfree(tls, buf)
  6710. return 0
  6711. }
  6712. }
  6713. if pend != 0 && (*Tpending_reply)(unsafe.Pointer(pend)).Fflags&int32(_XCB_REQUEST_DISCARD_REPLY) != 0 {
  6714. libc.Xfree(tls, buf)
  6715. return int32(1)
  6716. }
  6717. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) != int32(m_XCB_REPLY) {
  6718. (*Txcb_generic_event_t)(unsafe.Pointer(buf)).Ffull_sequence = uint32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read)
  6719. }
  6720. /* reply, or checked error */
  6721. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) == int32(m_XCB_REPLY) || libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) == m_XCB_ERROR && pend != 0 && (*Tpending_reply)(unsafe.Pointer(pend)).Fflags&int32(_XCB_REQUEST_CHECKED) != 0 {
  6722. cur = libc.Xmalloc(tls, uint64(16))
  6723. if !(cur != 0) {
  6724. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  6725. libc.Xfree(tls, buf)
  6726. return 0
  6727. }
  6728. (*Treply_list)(unsafe.Pointer(cur)).Freply = buf
  6729. (*Treply_list)(unsafe.Pointer(cur)).Fnext = uintptr(0)
  6730. *(*uintptr)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply_tail)) = cur
  6731. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply_tail = cur + 8
  6732. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freaders != 0 && (*Treader_list1)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freaders)).Frequest == (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read {
  6733. libc.Xpthread_cond_signal(tls, (*Treader_list1)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freaders)).Fdata)
  6734. }
  6735. return int32(1)
  6736. }
  6737. /* event, or unchecked error */
  6738. event = libc.Xmalloc(tls, uint64(16))
  6739. if !(event != 0) {
  6740. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  6741. libc.Xfree(tls, buf)
  6742. return 0
  6743. }
  6744. (*Tevent_list)(unsafe.Pointer(event)).Fevent = buf
  6745. (*Tevent_list)(unsafe.Pointer(event)).Fnext = uintptr(0)
  6746. if !(_event_special(tls, c, event) != 0) {
  6747. *(*uintptr)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents_tail)) = event
  6748. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents_tail = event + 8
  6749. libc.Xpthread_cond_signal(tls, c+32)
  6750. }
  6751. return int32(1) /* I have something for you... */
  6752. }
  6753. func _get_event(tls *libc.TLS, c uintptr) (r uintptr) {
  6754. var cur, ret uintptr
  6755. _, _ = cur, ret
  6756. cur = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents
  6757. if !((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents != 0) {
  6758. return uintptr(0)
  6759. }
  6760. ret = (*Tevent_list)(unsafe.Pointer(cur)).Fevent
  6761. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents = (*Tevent_list)(unsafe.Pointer(cur)).Fnext
  6762. if !((*Tevent_list)(unsafe.Pointer(cur)).Fnext != 0) {
  6763. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents_tail = c + 32 + 4168
  6764. }
  6765. libc.Xfree(tls, cur)
  6766. return ret
  6767. }
  6768. func _free_reply_list(tls *libc.TLS, head uintptr) {
  6769. var cur uintptr
  6770. _ = cur
  6771. for head != 0 {
  6772. cur = head
  6773. head = (*Treply_list)(unsafe.Pointer(cur)).Fnext
  6774. libc.Xfree(tls, (*Treply_list)(unsafe.Pointer(cur)).Freply)
  6775. libc.Xfree(tls, cur)
  6776. }
  6777. }
  6778. func _read_block(tls *libc.TLS, fd int32, buf uintptr, len1 Tintptr_t) (r int32) {
  6779. bp := tls.Alloc(16)
  6780. defer tls.Free(16)
  6781. var done, ret int32
  6782. var _ /* pfd at bp+0 */ Tpollfd
  6783. _, _ = done, ret
  6784. done = 0
  6785. for int64(done) < len1 {
  6786. ret = int32(libc.Xrecv(tls, fd, buf+uintptr(done), libc.Uint64FromInt64(len1-int64(done)), 0))
  6787. if ret > 0 {
  6788. done += ret
  6789. }
  6790. if ret < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == int32(m_EAGAIN) {
  6791. (*(*Tpollfd)(unsafe.Pointer(bp))).Ffd = fd
  6792. (*(*Tpollfd)(unsafe.Pointer(bp))).Fevents = int16(m_POLLIN)
  6793. (*(*Tpollfd)(unsafe.Pointer(bp))).Frevents = 0
  6794. for cond := true; cond; cond = ret == -int32(1) && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == int32(m_EINTR) {
  6795. ret = libc.Xpoll(tls, bp, uint32(1), -int32(1))
  6796. }
  6797. }
  6798. if ret <= 0 {
  6799. return ret
  6800. }
  6801. }
  6802. return int32(len1)
  6803. }
  6804. func _poll_for_reply(tls *libc.TLS, c uintptr, request Tuint64_t, reply uintptr, error1 uintptr) (r int32) {
  6805. var head uintptr
  6806. _ = head
  6807. /* If an error occurred when issuing the request, fail immediately. */
  6808. if !(request != 0) {
  6809. head = uintptr(0)
  6810. } else {
  6811. if libc.Int64FromUint64(request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read) < 0 {
  6812. head = X_xcb_map_remove(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freplies, request)
  6813. if head != 0 && (*Treply_list)(unsafe.Pointer(head)).Fnext != 0 {
  6814. X_xcb_map_put(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freplies, request, (*Treply_list)(unsafe.Pointer(head)).Fnext)
  6815. }
  6816. } else {
  6817. if request == (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read && (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply != 0 {
  6818. head = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply
  6819. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply = (*Treply_list)(unsafe.Pointer(head)).Fnext
  6820. if !((*Treply_list)(unsafe.Pointer(head)).Fnext != 0) {
  6821. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply_tail = c + 32 + 4144
  6822. }
  6823. } else {
  6824. if request == (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed {
  6825. head = uintptr(0)
  6826. } else {
  6827. return 0
  6828. }
  6829. }
  6830. }
  6831. }
  6832. if error1 != 0 {
  6833. *(*uintptr)(unsafe.Pointer(error1)) = uintptr(0)
  6834. }
  6835. *(*uintptr)(unsafe.Pointer(reply)) = uintptr(0)
  6836. if head != 0 {
  6837. if libc.Int32FromUint8((*Txcb_generic_reply_t)(unsafe.Pointer((*Treply_list)(unsafe.Pointer(head)).Freply)).Fresponse_type) == m_XCB_ERROR {
  6838. if error1 != 0 {
  6839. *(*uintptr)(unsafe.Pointer(error1)) = (*Treply_list)(unsafe.Pointer(head)).Freply
  6840. } else {
  6841. libc.Xfree(tls, (*Treply_list)(unsafe.Pointer(head)).Freply)
  6842. }
  6843. } else {
  6844. *(*uintptr)(unsafe.Pointer(reply)) = (*Treply_list)(unsafe.Pointer(head)).Freply
  6845. }
  6846. libc.Xfree(tls, head)
  6847. }
  6848. return int32(1)
  6849. }
  6850. func _insert_reader(tls *libc.TLS, prev_reader uintptr, reader uintptr, request Tuint64_t, cond uintptr) {
  6851. for *(*uintptr)(unsafe.Pointer(prev_reader)) != 0 && libc.Int64FromUint64((*Treader_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_reader)))).Frequest-request) <= 0 {
  6852. prev_reader = *(*uintptr)(unsafe.Pointer(prev_reader)) + 16
  6853. }
  6854. (*Treader_list)(unsafe.Pointer(reader)).Frequest = request
  6855. (*Treader_list)(unsafe.Pointer(reader)).Fdata = cond
  6856. (*Treader_list)(unsafe.Pointer(reader)).Fnext = *(*uintptr)(unsafe.Pointer(prev_reader))
  6857. *(*uintptr)(unsafe.Pointer(prev_reader)) = reader
  6858. }
  6859. func _remove_reader(tls *libc.TLS, prev_reader uintptr, reader uintptr) {
  6860. for *(*uintptr)(unsafe.Pointer(prev_reader)) != 0 && libc.Int64FromUint64((*Treader_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_reader)))).Frequest-(*Treader_list)(unsafe.Pointer(reader)).Frequest) <= 0 {
  6861. if *(*uintptr)(unsafe.Pointer(prev_reader)) == reader {
  6862. *(*uintptr)(unsafe.Pointer(prev_reader)) = (*Treader_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_reader)))).Fnext
  6863. break
  6864. }
  6865. }
  6866. }
  6867. func _insert_special(tls *libc.TLS, prev_special uintptr, special uintptr, se uintptr) {
  6868. (*Tspecial_list)(unsafe.Pointer(special)).Fse = se
  6869. (*Tspecial_list)(unsafe.Pointer(special)).Fnext = *(*uintptr)(unsafe.Pointer(prev_special))
  6870. *(*uintptr)(unsafe.Pointer(prev_special)) = special
  6871. }
  6872. func _remove_special(tls *libc.TLS, prev_special uintptr, special uintptr) {
  6873. for *(*uintptr)(unsafe.Pointer(prev_special)) != 0 {
  6874. if *(*uintptr)(unsafe.Pointer(prev_special)) == special {
  6875. *(*uintptr)(unsafe.Pointer(prev_special)) = (*Tspecial_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_special)))).Fnext
  6876. break
  6877. }
  6878. prev_special = *(*uintptr)(unsafe.Pointer(prev_special)) + 8
  6879. }
  6880. }
  6881. func _wait_for_reply(tls *libc.TLS, c uintptr, request Tuint64_t, e uintptr) (r uintptr) {
  6882. bp := tls.Alloc(48)
  6883. defer tls.Free(48)
  6884. var _ /* cond at bp+8 */ Tpthread_cond_t
  6885. var _ /* reader at bp+16 */ Treader_list
  6886. var _ /* ret at bp+0 */ uintptr
  6887. *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
  6888. /* If this request has not been written yet, write it. */
  6889. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Freturn_socket != 0 || X_xcb_out_flush_to(tls, c, request) != 0 {
  6890. *(*Tpthread_cond_t)(unsafe.Pointer(bp + 8)) = libc.UintptrFromInt32(0)
  6891. _insert_reader(tls, c+32+4184, bp+16, request, bp+8)
  6892. for !(_poll_for_reply(tls, c, request, bp, e) != 0) {
  6893. if !(X_xcb_conn_wait(tls, c, bp+8, uintptr(0), uintptr(0)) != 0) {
  6894. break
  6895. }
  6896. }
  6897. _remove_reader(tls, c+32+4184, bp+16)
  6898. libc.Xpthread_cond_destroy(tls, bp+8)
  6899. }
  6900. X_xcb_in_wake_up_next_reader(tls, c)
  6901. return *(*uintptr)(unsafe.Pointer(bp))
  6902. }
  6903. func _widen(tls *libc.TLS, c uintptr, request uint32) (r Tuint64_t) {
  6904. var widened_request Tuint64_t
  6905. _ = widened_request
  6906. widened_request = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest&uint64(0xffffffff00000000) | uint64(request)
  6907. if widened_request > (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest {
  6908. widened_request -= libc.Uint64FromUint64(1) << libc.Int32FromInt32(32)
  6909. }
  6910. return widened_request
  6911. }
  6912. /* Public interface */
  6913. func Xxcb_wait_for_reply(tls *libc.TLS, c uintptr, request uint32, e uintptr) (r uintptr) {
  6914. var ret uintptr
  6915. _ = ret
  6916. if e != 0 {
  6917. *(*uintptr)(unsafe.Pointer(e)) = uintptr(0)
  6918. }
  6919. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6920. return uintptr(0)
  6921. }
  6922. libc.Xpthread_mutex_lock(tls, c+24)
  6923. ret = _wait_for_reply(tls, c, _widen(tls, c, request), e)
  6924. libc.Xpthread_mutex_unlock(tls, c+24)
  6925. return ret
  6926. }
  6927. func Xxcb_wait_for_reply64(tls *libc.TLS, c uintptr, request Tuint64_t, e uintptr) (r uintptr) {
  6928. var ret uintptr
  6929. _ = ret
  6930. if e != 0 {
  6931. *(*uintptr)(unsafe.Pointer(e)) = uintptr(0)
  6932. }
  6933. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6934. return uintptr(0)
  6935. }
  6936. libc.Xpthread_mutex_lock(tls, c+24)
  6937. ret = _wait_for_reply(tls, c, request, e)
  6938. libc.Xpthread_mutex_unlock(tls, c+24)
  6939. return ret
  6940. }
  6941. func Xxcb_get_reply_fds(tls *libc.TLS, c uintptr, reply uintptr, reply_size Tsize_t) (r uintptr) {
  6942. return reply + uintptr(reply_size)
  6943. }
  6944. func _insert_pending_discard(tls *libc.TLS, c uintptr, prev_next uintptr, seq Tuint64_t) {
  6945. var pend uintptr
  6946. _ = pend
  6947. pend = libc.Xmalloc(tls, uint64(32))
  6948. if !(pend != 0) {
  6949. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  6950. return
  6951. }
  6952. (*Tpending_reply)(unsafe.Pointer(pend)).Ffirst_request = seq
  6953. (*Tpending_reply)(unsafe.Pointer(pend)).Flast_request = seq
  6954. (*Tpending_reply)(unsafe.Pointer(pend)).Fworkaround = 0
  6955. (*Tpending_reply)(unsafe.Pointer(pend)).Fflags = int32(_XCB_REQUEST_DISCARD_REPLY)
  6956. (*Tpending_reply)(unsafe.Pointer(pend)).Fnext = *(*uintptr)(unsafe.Pointer(prev_next))
  6957. *(*uintptr)(unsafe.Pointer(prev_next)) = pend
  6958. if !((*Tpending_reply)(unsafe.Pointer(pend)).Fnext != 0) {
  6959. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail = pend + 24
  6960. }
  6961. }
  6962. func _discard_reply(tls *libc.TLS, c uintptr, request Tuint64_t) {
  6963. bp := tls.Alloc(16)
  6964. defer tls.Free(16)
  6965. var prev_pend uintptr
  6966. var _ /* reply at bp+0 */ uintptr
  6967. _ = prev_pend
  6968. /* Free any replies or errors that we've already read. Stop if
  6969. * xcb_wait_for_reply would block or we've run out of replies. */
  6970. for _poll_for_reply(tls, c, request, bp, uintptr(0)) != 0 && *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  6971. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp)))
  6972. }
  6973. /* If we've proven there are no more responses coming, we're done. */
  6974. if libc.Int64FromUint64(request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed) <= 0 {
  6975. return
  6976. }
  6977. /* Walk the list of pending requests. Mark the first match for deletion. */
  6978. prev_pend = c + 32 + 4200
  6979. for {
  6980. if !(*(*uintptr)(unsafe.Pointer(prev_pend)) != 0) {
  6981. break
  6982. }
  6983. if libc.Int64FromUint64((*Tpending_reply)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_pend)))).Ffirst_request-request) > 0 {
  6984. break
  6985. }
  6986. if (*Tpending_reply)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_pend)))).Ffirst_request == request {
  6987. /* Pending reply found. Mark for discard: */
  6988. *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_pend)) + 20)) |= int32(_XCB_REQUEST_DISCARD_REPLY)
  6989. return
  6990. }
  6991. goto _1
  6992. _1:
  6993. ;
  6994. prev_pend = *(*uintptr)(unsafe.Pointer(prev_pend)) + 24
  6995. }
  6996. /* Pending reply not found (likely due to _unchecked request). Create one: */
  6997. _insert_pending_discard(tls, c, prev_pend, request)
  6998. }
  6999. func Xxcb_discard_reply(tls *libc.TLS, c uintptr, sequence uint32) {
  7000. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7001. return
  7002. }
  7003. /* If an error occurred when issuing the request, fail immediately. */
  7004. if !(sequence != 0) {
  7005. return
  7006. }
  7007. libc.Xpthread_mutex_lock(tls, c+24)
  7008. _discard_reply(tls, c, _widen(tls, c, sequence))
  7009. libc.Xpthread_mutex_unlock(tls, c+24)
  7010. }
  7011. func Xxcb_discard_reply64(tls *libc.TLS, c uintptr, sequence Tuint64_t) {
  7012. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7013. return
  7014. }
  7015. /* If an error occurred when issuing the request, fail immediately. */
  7016. if !(sequence != 0) {
  7017. return
  7018. }
  7019. libc.Xpthread_mutex_lock(tls, c+24)
  7020. _discard_reply(tls, c, sequence)
  7021. libc.Xpthread_mutex_unlock(tls, c+24)
  7022. }
  7023. func Xxcb_poll_for_reply(tls *libc.TLS, c uintptr, request uint32, reply uintptr, error1 uintptr) (r int32) {
  7024. var ret int32
  7025. _ = ret
  7026. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7027. *(*uintptr)(unsafe.Pointer(reply)) = uintptr(0)
  7028. if error1 != 0 {
  7029. *(*uintptr)(unsafe.Pointer(error1)) = uintptr(0)
  7030. }
  7031. return int32(1) /* would not block */
  7032. }
  7033. libc.Xpthread_mutex_lock(tls, c+24)
  7034. ret = _poll_for_reply(tls, c, _widen(tls, c, request), reply, error1)
  7035. if !(ret != 0) && (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading == 0 && X_xcb_in_read(tls, c) != 0 { /* _xcb_in_read shuts down the connection on error */
  7036. ret = _poll_for_reply(tls, c, _widen(tls, c, request), reply, error1)
  7037. }
  7038. libc.Xpthread_mutex_unlock(tls, c+24)
  7039. return ret
  7040. }
  7041. func Xxcb_poll_for_reply64(tls *libc.TLS, c uintptr, request Tuint64_t, reply uintptr, error1 uintptr) (r int32) {
  7042. var ret int32
  7043. _ = ret
  7044. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7045. *(*uintptr)(unsafe.Pointer(reply)) = uintptr(0)
  7046. if error1 != 0 {
  7047. *(*uintptr)(unsafe.Pointer(error1)) = uintptr(0)
  7048. }
  7049. return int32(1) /* would not block */
  7050. }
  7051. libc.Xpthread_mutex_lock(tls, c+24)
  7052. ret = _poll_for_reply(tls, c, request, reply, error1)
  7053. if !(ret != 0) && (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading == 0 && X_xcb_in_read(tls, c) != 0 { /* _xcb_in_read shuts down the connection on error */
  7054. ret = _poll_for_reply(tls, c, request, reply, error1)
  7055. }
  7056. libc.Xpthread_mutex_unlock(tls, c+24)
  7057. return ret
  7058. }
  7059. func Xxcb_wait_for_event(tls *libc.TLS, c uintptr) (r uintptr) {
  7060. var ret, v1 uintptr
  7061. _, _ = ret, v1
  7062. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7063. return uintptr(0)
  7064. }
  7065. libc.Xpthread_mutex_lock(tls, c+24)
  7066. /* get_event returns 0 on empty list. */
  7067. for {
  7068. v1 = _get_event(tls, c)
  7069. ret = v1
  7070. if !!(v1 != 0) {
  7071. break
  7072. }
  7073. if !(X_xcb_conn_wait(tls, c, c+32, uintptr(0), uintptr(0)) != 0) {
  7074. break
  7075. }
  7076. }
  7077. X_xcb_in_wake_up_next_reader(tls, c)
  7078. libc.Xpthread_mutex_unlock(tls, c+24)
  7079. return ret
  7080. }
  7081. func _poll_for_next_event(tls *libc.TLS, c uintptr, queued int32) (r uintptr) {
  7082. var ret uintptr
  7083. _ = ret
  7084. ret = uintptr(0)
  7085. if !((*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0) {
  7086. libc.Xpthread_mutex_lock(tls, c+24)
  7087. /* FIXME: follow X meets Z architecture changes. */
  7088. ret = _get_event(tls, c)
  7089. if !(ret != 0) && !(queued != 0) && (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading == 0 && X_xcb_in_read(tls, c) != 0 { /* _xcb_in_read shuts down the connection on error */
  7090. ret = _get_event(tls, c)
  7091. }
  7092. libc.Xpthread_mutex_unlock(tls, c+24)
  7093. }
  7094. return ret
  7095. }
  7096. func Xxcb_poll_for_event(tls *libc.TLS, c uintptr) (r uintptr) {
  7097. return _poll_for_next_event(tls, c, 0)
  7098. }
  7099. func Xxcb_poll_for_queued_event(tls *libc.TLS, c uintptr) (r uintptr) {
  7100. return _poll_for_next_event(tls, c, int32(1))
  7101. }
  7102. func Xxcb_request_check(tls *libc.TLS, c uintptr, cookie Txcb_void_cookie_t) (r uintptr) {
  7103. bp := tls.Alloc(16)
  7104. defer tls.Free(16)
  7105. var reply uintptr
  7106. var request Tuint64_t
  7107. var _ /* ret at bp+0 */ uintptr
  7108. _, _ = reply, request
  7109. *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
  7110. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7111. return uintptr(0)
  7112. }
  7113. libc.Xpthread_mutex_lock(tls, c+24)
  7114. request = _widen(tls, c, cookie.Fsequence)
  7115. if libc.Int64FromUint64(request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed) > 0 {
  7116. if libc.Int64FromUint64(request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_expected) >= 0 {
  7117. X_xcb_out_send_sync(tls, c)
  7118. }
  7119. if libc.Int64FromUint64(request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest_expected_written) >= 0 {
  7120. X_xcb_out_flush_to(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest)
  7121. }
  7122. }
  7123. reply = _wait_for_reply(tls, c, request, bp)
  7124. libc.Xpthread_mutex_unlock(tls, c+24)
  7125. return *(*uintptr)(unsafe.Pointer(bp))
  7126. }
  7127. func _get_special_event(tls *libc.TLS, c uintptr, se uintptr) (r uintptr) {
  7128. var event, events, v1, v2 uintptr
  7129. _, _, _, _ = event, events, v1, v2
  7130. event = libc.UintptrFromInt32(0)
  7131. v1 = (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents
  7132. events = v1
  7133. if v1 != libc.UintptrFromInt32(0) {
  7134. event = (*Tevent_list)(unsafe.Pointer(events)).Fevent
  7135. v2 = (*Tevent_list)(unsafe.Pointer(events)).Fnext
  7136. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents = v2
  7137. if !(v2 != 0) {
  7138. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents_tail = se + 24
  7139. }
  7140. libc.Xfree(tls, events)
  7141. }
  7142. return event
  7143. }
  7144. func Xxcb_poll_for_special_event(tls *libc.TLS, c uintptr, se uintptr) (r uintptr) {
  7145. var event uintptr
  7146. _ = event
  7147. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7148. return uintptr(0)
  7149. }
  7150. libc.Xpthread_mutex_lock(tls, c+24)
  7151. event = _get_special_event(tls, c, se)
  7152. if !(event != 0) && (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading == 0 && X_xcb_in_read(tls, c) != 0 { /* _xcb_in_read shuts down the connection on error */
  7153. event = _get_special_event(tls, c, se)
  7154. }
  7155. libc.Xpthread_mutex_unlock(tls, c+24)
  7156. return event
  7157. }
  7158. func Xxcb_wait_for_special_event(tls *libc.TLS, c uintptr, se uintptr) (r uintptr) {
  7159. bp := tls.Alloc(16)
  7160. defer tls.Free(16)
  7161. var event, v1 uintptr
  7162. var _ /* special at bp+0 */ Tspecial_list
  7163. _, _ = event, v1
  7164. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7165. return uintptr(0)
  7166. }
  7167. libc.Xpthread_mutex_lock(tls, c+24)
  7168. _insert_special(tls, c+32+4192, bp, se)
  7169. /* get_special_event returns 0 on empty list. */
  7170. for {
  7171. v1 = _get_special_event(tls, c, se)
  7172. event = v1
  7173. if !!(v1 != 0) {
  7174. break
  7175. }
  7176. if !(X_xcb_conn_wait(tls, c, se+40, uintptr(0), uintptr(0)) != 0) {
  7177. break
  7178. }
  7179. }
  7180. _remove_special(tls, c+32+4192, bp)
  7181. X_xcb_in_wake_up_next_reader(tls, c)
  7182. libc.Xpthread_mutex_unlock(tls, c+24)
  7183. return event
  7184. }
  7185. func Xxcb_register_for_special_xge(tls *libc.TLS, c uintptr, ext uintptr, eid Tuint32_t, stamp uintptr) (r uintptr) {
  7186. var ext_reply, se uintptr
  7187. _, _ = ext_reply, se
  7188. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7189. return libc.UintptrFromInt32(0)
  7190. }
  7191. ext_reply = Xxcb_get_extension_data(tls, c, ext)
  7192. if !(ext_reply != 0) {
  7193. return libc.UintptrFromInt32(0)
  7194. }
  7195. libc.Xpthread_mutex_lock(tls, c+24)
  7196. se = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_events
  7197. for {
  7198. if !(se != 0) {
  7199. break
  7200. }
  7201. if libc.Int32FromUint8((*Txcb_special_event_t)(unsafe.Pointer(se)).Fextension) == libc.Int32FromUint8((*Txcb_query_extension_reply_t)(unsafe.Pointer(ext_reply)).Fmajor_opcode) && (*Txcb_special_event_t)(unsafe.Pointer(se)).Feid == eid {
  7202. libc.Xpthread_mutex_unlock(tls, c+24)
  7203. return libc.UintptrFromInt32(0)
  7204. }
  7205. goto _1
  7206. _1:
  7207. ;
  7208. se = (*Txcb_special_event_t)(unsafe.Pointer(se)).Fnext
  7209. }
  7210. se = libc.Xcalloc(tls, uint64(1), uint64(48))
  7211. if !(se != 0) {
  7212. libc.Xpthread_mutex_unlock(tls, c+24)
  7213. return libc.UintptrFromInt32(0)
  7214. }
  7215. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fextension = (*Txcb_query_extension_reply_t)(unsafe.Pointer(ext_reply)).Fmajor_opcode
  7216. (*Txcb_special_event_t)(unsafe.Pointer(se)).Feid = eid
  7217. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents = libc.UintptrFromInt32(0)
  7218. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents_tail = se + 24
  7219. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fstamp = stamp
  7220. libc.Xpthread_cond_init(tls, se+40, uintptr(0))
  7221. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fnext = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_events
  7222. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_events = se
  7223. libc.Xpthread_mutex_unlock(tls, c+24)
  7224. return se
  7225. }
  7226. func Xxcb_unregister_for_special_event(tls *libc.TLS, c uintptr, se uintptr) {
  7227. var events, next, prev, s, v2 uintptr
  7228. _, _, _, _, _ = events, next, prev, s, v2
  7229. if !(se != 0) {
  7230. return
  7231. }
  7232. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7233. return
  7234. }
  7235. libc.Xpthread_mutex_lock(tls, c+24)
  7236. prev = c + 32 + 4288
  7237. for {
  7238. v2 = *(*uintptr)(unsafe.Pointer(prev))
  7239. s = v2
  7240. if !(v2 != libc.UintptrFromInt32(0)) {
  7241. break
  7242. }
  7243. if s == se {
  7244. *(*uintptr)(unsafe.Pointer(prev)) = (*Txcb_special_event_t)(unsafe.Pointer(se)).Fnext
  7245. events = (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents
  7246. for {
  7247. if !(events != 0) {
  7248. break
  7249. }
  7250. next = (*Tevent_list)(unsafe.Pointer(events)).Fnext
  7251. libc.Xfree(tls, (*Tevent_list)(unsafe.Pointer(events)).Fevent)
  7252. libc.Xfree(tls, events)
  7253. goto _3
  7254. _3:
  7255. ;
  7256. events = next
  7257. }
  7258. libc.Xpthread_cond_destroy(tls, se+40)
  7259. libc.Xfree(tls, se)
  7260. break
  7261. }
  7262. goto _1
  7263. _1:
  7264. ;
  7265. prev = s
  7266. }
  7267. libc.Xpthread_mutex_unlock(tls, c+24)
  7268. }
  7269. /* Private interface */
  7270. func X_xcb_in_init(tls *libc.TLS, in uintptr) (r int32) {
  7271. if libc.Xpthread_cond_init(tls, in, uintptr(0)) != 0 {
  7272. return 0
  7273. }
  7274. (*T_xcb_in)(unsafe.Pointer(in)).Freading = 0
  7275. (*T_xcb_in)(unsafe.Pointer(in)).Fqueue_len = 0
  7276. (*T_xcb_in)(unsafe.Pointer(in)).Frequest_read = uint64(0)
  7277. (*T_xcb_in)(unsafe.Pointer(in)).Frequest_completed = uint64(0)
  7278. (*T_xcb_in)(unsafe.Pointer(in)).Freplies = X_xcb_map_new(tls)
  7279. if !((*T_xcb_in)(unsafe.Pointer(in)).Freplies != 0) {
  7280. return 0
  7281. }
  7282. (*T_xcb_in)(unsafe.Pointer(in)).Fcurrent_reply_tail = in + 4144
  7283. (*T_xcb_in)(unsafe.Pointer(in)).Fevents_tail = in + 4168
  7284. (*T_xcb_in)(unsafe.Pointer(in)).Fpending_replies_tail = in + 4200
  7285. return int32(1)
  7286. }
  7287. func X_xcb_in_destroy(tls *libc.TLS, in uintptr) {
  7288. var e, pend uintptr
  7289. _, _ = e, pend
  7290. libc.Xpthread_cond_destroy(tls, in)
  7291. _free_reply_list(tls, (*T_xcb_in)(unsafe.Pointer(in)).Fcurrent_reply)
  7292. X_xcb_map_delete(tls, (*T_xcb_in)(unsafe.Pointer(in)).Freplies, __ccgo_fp(_free_reply_list))
  7293. for (*T_xcb_in)(unsafe.Pointer(in)).Fevents != 0 {
  7294. e = (*T_xcb_in)(unsafe.Pointer(in)).Fevents
  7295. (*T_xcb_in)(unsafe.Pointer(in)).Fevents = (*Tevent_list)(unsafe.Pointer(e)).Fnext
  7296. libc.Xfree(tls, (*Tevent_list)(unsafe.Pointer(e)).Fevent)
  7297. libc.Xfree(tls, e)
  7298. }
  7299. for (*T_xcb_in)(unsafe.Pointer(in)).Fpending_replies != 0 {
  7300. pend = (*T_xcb_in)(unsafe.Pointer(in)).Fpending_replies
  7301. (*T_xcb_in)(unsafe.Pointer(in)).Fpending_replies = (*Tpending_reply)(unsafe.Pointer(pend)).Fnext
  7302. libc.Xfree(tls, pend)
  7303. }
  7304. }
  7305. func X_xcb_in_wake_up_next_reader(tls *libc.TLS, c uintptr) {
  7306. var pthreadret int32
  7307. _ = pthreadret
  7308. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freaders != 0 {
  7309. pthreadret = libc.Xpthread_cond_signal(tls, (*Treader_list1)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freaders)).Fdata)
  7310. } else {
  7311. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_waiters != 0 {
  7312. pthreadret = libc.Xpthread_cond_signal(tls, (*Tspecial_list1)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_waiters)).Fse+40)
  7313. } else {
  7314. pthreadret = libc.Xpthread_cond_signal(tls, c+32)
  7315. }
  7316. }
  7317. }
  7318. func X_xcb_in_expect_reply(tls *libc.TLS, c uintptr, request Tuint64_t, workaround _workarounds, flags int32) (r int32) {
  7319. var pend uintptr
  7320. var v1 Tuint64_t
  7321. _, _ = pend, v1
  7322. pend = libc.Xmalloc(tls, uint64(32))
  7323. if !(pend != 0) {
  7324. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  7325. return 0
  7326. }
  7327. v1 = request
  7328. (*Tpending_reply)(unsafe.Pointer(pend)).Flast_request = v1
  7329. (*Tpending_reply)(unsafe.Pointer(pend)).Ffirst_request = v1
  7330. (*Tpending_reply)(unsafe.Pointer(pend)).Fworkaround = workaround
  7331. (*Tpending_reply)(unsafe.Pointer(pend)).Fflags = flags
  7332. (*Tpending_reply)(unsafe.Pointer(pend)).Fnext = uintptr(0)
  7333. *(*uintptr)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail)) = pend
  7334. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail = pend + 24
  7335. return int32(1)
  7336. }
  7337. func X_xcb_in_replies_done(tls *libc.TLS, c uintptr) {
  7338. var pend, prev_next uintptr
  7339. _, _ = pend, prev_next
  7340. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail != c+32+4200 {
  7341. pend = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail - uintptr(Tsize_t(libc.UintptrFromInt32(0)+24))
  7342. if (*Tpending_reply1)(unsafe.Pointer(pend)).Fworkaround == int32(_WORKAROUND_EXTERNAL_SOCKET_OWNER) {
  7343. if libc.Int64FromUint64((*Tpending_reply1)(unsafe.Pointer(pend)).Ffirst_request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest) <= 0 {
  7344. (*Tpending_reply1)(unsafe.Pointer(pend)).Flast_request = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest
  7345. (*Tpending_reply1)(unsafe.Pointer(pend)).Fworkaround = int32(_WORKAROUND_NONE)
  7346. } else {
  7347. /* The socket was taken, but no requests were actually sent
  7348. * so just discard the pending_reply that was created.
  7349. */
  7350. prev_next = c + 32 + 4200
  7351. for *(*uintptr)(unsafe.Pointer(prev_next)) != pend {
  7352. prev_next = *(*uintptr)(unsafe.Pointer(prev_next)) + 24
  7353. }
  7354. *(*uintptr)(unsafe.Pointer(prev_next)) = libc.UintptrFromInt32(0)
  7355. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail = prev_next
  7356. libc.Xfree(tls, pend)
  7357. }
  7358. }
  7359. }
  7360. }
  7361. func X_xcb_in_read(tls *libc.TLS, c uintptr) (r int32) {
  7362. bp := tls.Alloc(144)
  7363. defer tls.Free(144)
  7364. var hdr, v2, v3, v4, v5 uintptr
  7365. var i, n, nfd int32
  7366. var _ /* cmsgbuf at bp+16 */ struct {
  7367. Fbuf [0][80]int8
  7368. Fcmsghdr Tcmsghdr
  7369. F__ccgo_pad2 [68]byte
  7370. }
  7371. var _ /* iov at bp+0 */ Tiovec
  7372. var _ /* msg at bp+96 */ Tmsghdr
  7373. _, _, _, _, _, _, _, _ = hdr, i, n, nfd, v2, v3, v4, v5
  7374. *(*Tiovec)(unsafe.Pointer(bp)) = Tiovec{
  7375. Fiov_base: c + 32 + 12 + uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len),
  7376. Fiov_len: uint64(4096) - libc.Uint64FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len),
  7377. }
  7378. *(*Tmsghdr)(unsafe.Pointer(bp + 96)) = Tmsghdr{
  7379. Fmsg_iov: bp,
  7380. Fmsg_iovlen: int32(1),
  7381. Fmsg_control: bp + 16,
  7382. Fmsg_controllen: uint32((libc.Uint64FromInt64(12)+(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))) & ^(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1)) + (libc.Uint64FromInt64(4)*libc.Uint64FromInt32(libc.Int32FromInt32(m_XCB_MAX_PASS_FD)-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd)+(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))) & ^(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))),
  7383. }
  7384. n = int32(libc.Xrecvmsg(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd, bp+96, 0))
  7385. /* Check for truncation errors. Only MSG_CTRUNC is
  7386. * probably possible here, which would indicate that
  7387. * the sender tried to transmit more than XCB_MAX_PASS_FD
  7388. * file descriptors.
  7389. */
  7390. if (*(*Tmsghdr)(unsafe.Pointer(bp + 96))).Fmsg_flags&(libc.Int32FromInt32(m_MSG_TRUNC1)|libc.Int32FromInt32(m_MSG_CTRUNC1)) != 0 {
  7391. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_FDPASSING_FAILED))
  7392. return 0
  7393. }
  7394. if n > 0 {
  7395. if uint64((*(*Tmsghdr)(unsafe.Pointer(bp + 96))).Fmsg_controllen) >= uint64(12) {
  7396. if uint64((*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_controllen) >= uint64(12) {
  7397. v2 = (*Tmsghdr)(unsafe.Pointer(bp + 96)).Fmsg_control
  7398. } else {
  7399. v2 = libc.UintptrFromInt32(0)
  7400. }
  7401. hdr = v2
  7402. for {
  7403. if !(hdr != 0) {
  7404. break
  7405. }
  7406. if (*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_level == int32(m_SOL_SOCKET) && (*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_type == int32(m_SCM_RIGHTS) {
  7407. nfd = libc.Int32FromUint64((uint64((*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_len) - ((libc.Uint64FromInt64(12)+(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))) & ^(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1)) + libc.Uint64FromInt32(libc.Int32FromInt32(0)))) / uint64(4))
  7408. libc.Xmemcpy(tls, c+32+4216+uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd)*4, hdr+uintptr((libc.Uint64FromInt64(12)+(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))) & ^(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))), libc.Uint64FromInt32(nfd)*uint64(4))
  7409. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd += nfd
  7410. }
  7411. goto _1
  7412. _1:
  7413. ;
  7414. if hdr == libc.UintptrFromInt32(0) {
  7415. if uint64((*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_controllen) >= uint64(12) {
  7416. v4 = (*Tmsghdr)(unsafe.Pointer(bp + 96)).Fmsg_control
  7417. } else {
  7418. v4 = libc.UintptrFromInt32(0)
  7419. }
  7420. v3 = v4
  7421. } else {
  7422. if hdr+uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_len)+(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))) & ^(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1)))+uintptr((libc.Uint64FromInt64(12)+(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))) & ^(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))) > (*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp+96)).Fmsg_controllen) {
  7423. v5 = libc.UintptrFromInt32(0)
  7424. } else {
  7425. v5 = hdr + uintptr((uint64((*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_len)+(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1))) & ^(libc.Uint64FromInt64(8)-libc.Uint64FromInt32(1)))
  7426. }
  7427. v3 = v5
  7428. }
  7429. hdr = v3
  7430. }
  7431. }
  7432. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Ftotal_read += libc.Uint64FromInt32(n)
  7433. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len += n
  7434. }
  7435. for _read_packet(tls, c) != 0 {
  7436. /* empty */
  7437. }
  7438. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd != 0 {
  7439. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd -= (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd
  7440. libc.Xmemmove(tls, c+32+4216, c+32+4216+uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd)*4, libc.Uint64FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd)*uint64(4))
  7441. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd = 0
  7442. /* If we have any left-over file descriptors after emptying
  7443. * the input buffer, then the server sent some that we weren't
  7444. * expecting. Close them and mark the connection as broken;
  7445. */
  7446. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len == 0 && (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd != 0 {
  7447. i = 0
  7448. for {
  7449. if !(i < (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd) {
  7450. break
  7451. }
  7452. libc.Xclose(tls, *(*int32)(unsafe.Pointer(c + 32 + 4216 + uintptr(i)*4)))
  7453. goto _6
  7454. _6:
  7455. ;
  7456. i++
  7457. }
  7458. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_FDPASSING_FAILED))
  7459. return 0
  7460. }
  7461. }
  7462. if n > 0 || n < 0 && (*(*int32)(unsafe.Pointer(libc.X__error(tls))) == int32(m_EAGAIN) || *(*int32)(unsafe.Pointer(libc.X__error(tls))) == int32(m_EINTR)) {
  7463. return int32(1)
  7464. }
  7465. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_ERROR))
  7466. return 0
  7467. }
  7468. func X_xcb_in_read_block(tls *libc.TLS, c uintptr, buf uintptr, len1 int32) (r int32) {
  7469. var done, ret int32
  7470. _, _ = done, ret
  7471. done = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len
  7472. if len1 < done {
  7473. done = len1
  7474. }
  7475. libc.Xmemcpy(tls, buf, c+32+12, libc.Uint64FromInt32(done))
  7476. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len -= done
  7477. libc.Xmemmove(tls, c+32+12, c+32+12+uintptr(done), libc.Uint64FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len))
  7478. if len1 > done {
  7479. ret = _read_block(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd, buf+uintptr(done), int64(len1-done))
  7480. if ret <= 0 {
  7481. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_ERROR))
  7482. return ret
  7483. }
  7484. }
  7485. return len1
  7486. }
  7487. type Tpending_reply1 = struct {
  7488. Ffirst_request Tuint64_t
  7489. Flast_request Tuint64_t
  7490. Fworkaround _workarounds
  7491. Fflags int32
  7492. Fnext uintptr
  7493. }
  7494. type Treader_list1 = struct {
  7495. Frequest Tuint64_t
  7496. Fdata uintptr
  7497. Fnext uintptr
  7498. }
  7499. type Tspecial_list1 = struct {
  7500. Fse uintptr
  7501. Fnext uintptr
  7502. }
  7503. type Txcb_ge_special_event_t1 = struct {
  7504. Fresponse_type Tuint8_t
  7505. Fextension Tuint8_t
  7506. Fsequence Tuint16_t
  7507. Flength Tuint32_t
  7508. Fevtype Tuint16_t
  7509. Fpad0 [2]Tuint8_t
  7510. Feid Tuint32_t
  7511. Fpad1 [16]Tuint8_t
  7512. }
  7513. const m_INT32_MAX2 = 0x7fffffff
  7514. const m_UINT32_MAX2 = 0xffffffff
  7515. type Tlazyreply = struct {
  7516. Ftag _lazy_reply_tag
  7517. Fvalue struct {
  7518. Freply [0]uintptr
  7519. Fcookie Txcb_query_extension_cookie_t
  7520. F__ccgo_pad2 [4]byte
  7521. }
  7522. }
  7523. func _get_index(tls *libc.TLS, c uintptr, idx int32) (r uintptr) {
  7524. var new_extensions uintptr
  7525. var new_size int32
  7526. _, _ = new_extensions, new_size
  7527. if idx > (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size {
  7528. new_size = idx << int32(1)
  7529. new_extensions = libc.Xrealloc(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions, uint64(16)*libc.Uint64FromInt32(new_size))
  7530. if !(new_extensions != 0) {
  7531. return uintptr(0)
  7532. }
  7533. libc.Xmemset(tls, new_extensions+uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size)*16, 0, uint64(16)*libc.Uint64FromInt32(new_size-(*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size))
  7534. (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions = new_extensions
  7535. (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size = new_size
  7536. }
  7537. return (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions + uintptr(idx)*16 - uintptr(1)*16
  7538. }
  7539. func _get_lazyreply(tls *libc.TLS, c uintptr, ext uintptr) (r uintptr) {
  7540. var data uintptr
  7541. var v1 int32
  7542. _, _ = data, v1
  7543. libc.Xpthread_mutex_lock(tls, uintptr(unsafe.Pointer(&_global_lock)))
  7544. if !((*Txcb_extension_t)(unsafe.Pointer(ext)).Fglobal_id != 0) {
  7545. _next_global_id++
  7546. v1 = _next_global_id
  7547. (*Txcb_extension_t)(unsafe.Pointer(ext)).Fglobal_id = v1
  7548. }
  7549. libc.Xpthread_mutex_unlock(tls, uintptr(unsafe.Pointer(&_global_lock)))
  7550. data = _get_index(tls, c, (*Txcb_extension_t)(unsafe.Pointer(ext)).Fglobal_id)
  7551. if data != 0 && (*Tlazyreply)(unsafe.Pointer(data)).Ftag == int32(_LAZY_NONE) {
  7552. /* cache miss: query the server */
  7553. (*Tlazyreply)(unsafe.Pointer(data)).Ftag = int32(_LAZY_COOKIE)
  7554. (*Tlazyreply)(unsafe.Pointer(data)).Fvalue.Fcookie = Xxcb_query_extension(tls, c, uint16(libc.Xstrlen(tls, (*Txcb_extension_t)(unsafe.Pointer(ext)).Fname)), (*Txcb_extension_t)(unsafe.Pointer(ext)).Fname)
  7555. }
  7556. return data
  7557. }
  7558. var _global_lock = libc.UintptrFromInt32(0)
  7559. var _next_global_id int32
  7560. /* Public interface */
  7561. // C documentation
  7562. //
  7563. // /* Do not free the returned xcb_query_extension_reply_t - on return, it's aliased
  7564. // * from the cache. */
  7565. func Xxcb_get_extension_data(tls *libc.TLS, c uintptr, ext uintptr) (r uintptr) {
  7566. var data, v1 uintptr
  7567. _, _ = data, v1
  7568. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7569. return uintptr(0)
  7570. }
  7571. libc.Xpthread_mutex_lock(tls, c+20880)
  7572. data = _get_lazyreply(tls, c, ext)
  7573. if data != 0 && (*Tlazyreply)(unsafe.Pointer(data)).Ftag == int32(_LAZY_COOKIE) {
  7574. (*Tlazyreply)(unsafe.Pointer(data)).Ftag = int32(_LAZY_FORCED)
  7575. *(*uintptr)(unsafe.Pointer(data + 8)) = Xxcb_query_extension_reply(tls, c, (*Tlazyreply)(unsafe.Pointer(data)).Fvalue.Fcookie, uintptr(0))
  7576. }
  7577. libc.Xpthread_mutex_unlock(tls, c+20880)
  7578. if data != 0 {
  7579. v1 = *(*uintptr)(unsafe.Pointer(data + 8))
  7580. } else {
  7581. v1 = uintptr(0)
  7582. }
  7583. return v1
  7584. }
  7585. func Xxcb_prefetch_extension_data(tls *libc.TLS, c uintptr, ext uintptr) {
  7586. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7587. return
  7588. }
  7589. libc.Xpthread_mutex_lock(tls, c+20880)
  7590. _get_lazyreply(tls, c, ext)
  7591. libc.Xpthread_mutex_unlock(tls, c+20880)
  7592. }
  7593. /* Private interface */
  7594. func X_xcb_ext_init(tls *libc.TLS, c uintptr) (r int32) {
  7595. if libc.Xpthread_mutex_init(tls, c+20880, uintptr(0)) != 0 {
  7596. return 0
  7597. }
  7598. return int32(1)
  7599. }
  7600. func X_xcb_ext_destroy(tls *libc.TLS, c uintptr) {
  7601. var v1 int32
  7602. var v2 uintptr
  7603. _, _ = v1, v2
  7604. libc.Xpthread_mutex_destroy(tls, c+20880)
  7605. for {
  7606. v2 = c + 20880 + 16
  7607. v1 = *(*int32)(unsafe.Pointer(v2))
  7608. *(*int32)(unsafe.Pointer(v2))--
  7609. if !(v1 > 0) {
  7610. break
  7611. }
  7612. if (*(*Tlazyreply1)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions + uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size)*16))).Ftag == int32(_LAZY_FORCED) {
  7613. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions + uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size)*16 + 8)))
  7614. }
  7615. }
  7616. libc.Xfree(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions)
  7617. }
  7618. type Tlazyreply1 = struct {
  7619. Ftag _lazy_reply_tag
  7620. Fvalue struct {
  7621. Freply [0]uintptr
  7622. Fcookie Txcb_query_extension_cookie_t
  7623. F__ccgo_pad2 [4]byte
  7624. }
  7625. }
  7626. const m_XCB_XCMISC_MAJOR_VERSION = 1
  7627. const m_XCB_XCMISC_MINOR_VERSION = 1
  7628. const m_XCB_XC_MISC_GET_VERSION = 0
  7629. const m_XCB_XC_MISC_GET_XID_LIST = 2
  7630. const m_XCB_XC_MISC_GET_XID_RANGE = 1
  7631. type Txcb_xc_misc_get_version_cookie_t = struct {
  7632. Fsequence uint32
  7633. }
  7634. type Txcb_xc_misc_get_version_request_t = struct {
  7635. Fmajor_opcode Tuint8_t
  7636. Fminor_opcode Tuint8_t
  7637. Flength Tuint16_t
  7638. Fclient_major_version Tuint16_t
  7639. Fclient_minor_version Tuint16_t
  7640. }
  7641. type Txcb_xc_misc_get_version_reply_t = struct {
  7642. Fresponse_type Tuint8_t
  7643. Fpad0 Tuint8_t
  7644. Fsequence Tuint16_t
  7645. Flength Tuint32_t
  7646. Fserver_major_version Tuint16_t
  7647. Fserver_minor_version Tuint16_t
  7648. }
  7649. type Txcb_xc_misc_get_xid_range_cookie_t = struct {
  7650. Fsequence uint32
  7651. }
  7652. type Txcb_xc_misc_get_xid_range_request_t = struct {
  7653. Fmajor_opcode Tuint8_t
  7654. Fminor_opcode Tuint8_t
  7655. Flength Tuint16_t
  7656. }
  7657. type Txcb_xc_misc_get_xid_range_reply_t = struct {
  7658. Fresponse_type Tuint8_t
  7659. Fpad0 Tuint8_t
  7660. Fsequence Tuint16_t
  7661. Flength Tuint32_t
  7662. Fstart_id Tuint32_t
  7663. Fcount Tuint32_t
  7664. }
  7665. type Txcb_xc_misc_get_xid_list_cookie_t = struct {
  7666. Fsequence uint32
  7667. }
  7668. type Txcb_xc_misc_get_xid_list_request_t = struct {
  7669. Fmajor_opcode Tuint8_t
  7670. Fminor_opcode Tuint8_t
  7671. Flength Tuint16_t
  7672. Fcount Tuint32_t
  7673. }
  7674. type Txcb_xc_misc_get_xid_list_reply_t = struct {
  7675. Fresponse_type Tuint8_t
  7676. Fpad0 Tuint8_t
  7677. Fsequence Tuint16_t
  7678. Flength Tuint32_t
  7679. Fids_len Tuint32_t
  7680. Fpad1 [20]Tuint8_t
  7681. }
  7682. /**
  7683. * @}
  7684. */
  7685. /* Public interface */
  7686. func Xxcb_generate_id(tls *libc.TLS, c uintptr) (r Tuint32_t) {
  7687. var range1, xc_misc_reply uintptr
  7688. var ret Tuint32_t
  7689. _, _, _ = range1, ret, xc_misc_reply
  7690. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7691. return libc.Uint32FromInt32(-libc.Int32FromInt32(1))
  7692. }
  7693. libc.Xpthread_mutex_lock(tls, c+20904)
  7694. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Flast >= (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Fmax-(*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Finc+uint32(1) {
  7695. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Flast == uint32(0) {
  7696. /* finish setting up initial range */
  7697. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Fmax = (*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fresource_id_mask
  7698. } else {
  7699. /* check for extension */
  7700. xc_misc_reply = Xxcb_get_extension_data(tls, c, uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)))
  7701. if !(xc_misc_reply != 0) || !((*Txcb_query_extension_reply_t)(unsafe.Pointer(xc_misc_reply)).Fpresent != 0) {
  7702. libc.Xpthread_mutex_unlock(tls, c+20904)
  7703. return libc.Uint32FromInt32(-libc.Int32FromInt32(1))
  7704. }
  7705. /* get new range */
  7706. range1 = Xxcb_xc_misc_get_xid_range_reply(tls, c, Xxcb_xc_misc_get_xid_range(tls, c), uintptr(0))
  7707. /* XXX The latter disjunct is what the server returns
  7708. when it is out of XIDs. Sweet. */
  7709. if !(range1 != 0) || (*Txcb_xc_misc_get_xid_range_reply_t)(unsafe.Pointer(range1)).Fstart_id == uint32(0) && (*Txcb_xc_misc_get_xid_range_reply_t)(unsafe.Pointer(range1)).Fcount == uint32(1) {
  7710. libc.Xpthread_mutex_unlock(tls, c+20904)
  7711. return libc.Uint32FromInt32(-libc.Int32FromInt32(1))
  7712. }
  7713. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Flast = (*Txcb_xc_misc_get_xid_range_reply_t)(unsafe.Pointer(range1)).Fstart_id
  7714. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Fmax = (*Txcb_xc_misc_get_xid_range_reply_t)(unsafe.Pointer(range1)).Fstart_id + ((*Txcb_xc_misc_get_xid_range_reply_t)(unsafe.Pointer(range1)).Fcount-uint32(1))*(*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Finc
  7715. libc.Xfree(tls, range1)
  7716. }
  7717. } else {
  7718. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Flast += (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Finc
  7719. }
  7720. ret = (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Flast | (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Fbase
  7721. libc.Xpthread_mutex_unlock(tls, c+20904)
  7722. return ret
  7723. }
  7724. /* Private interface */
  7725. func X_xcb_xid_init(tls *libc.TLS, c uintptr) (r int32) {
  7726. if libc.Xpthread_mutex_init(tls, c+20904, uintptr(0)) != 0 {
  7727. return 0
  7728. }
  7729. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Flast = uint32(0)
  7730. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Fmax = uint32(0)
  7731. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Fbase = (*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fresource_id_base
  7732. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Finc = (*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fresource_id_mask & -(*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fresource_id_mask
  7733. return int32(1)
  7734. }
  7735. func X_xcb_xid_destroy(tls *libc.TLS, c uintptr) {
  7736. libc.Xpthread_mutex_destroy(tls, c+20904)
  7737. }
  7738. type T_xcb_map = struct {
  7739. Fhead uintptr
  7740. Ftail uintptr
  7741. }
  7742. type Tnode = struct {
  7743. Fnext uintptr
  7744. Fkey Tuint64_t
  7745. Fdata uintptr
  7746. }
  7747. type T_xcb_map1 = struct {
  7748. Fhead uintptr
  7749. Ftail uintptr
  7750. }
  7751. /* Private interface */
  7752. func X_xcb_map_new(tls *libc.TLS) (r uintptr) {
  7753. var list uintptr
  7754. _ = list
  7755. list = libc.Xmalloc(tls, uint64(16))
  7756. if !(list != 0) {
  7757. return uintptr(0)
  7758. }
  7759. (*T_xcb_map)(unsafe.Pointer(list)).Fhead = uintptr(0)
  7760. (*T_xcb_map)(unsafe.Pointer(list)).Ftail = list
  7761. return list
  7762. }
  7763. func X_xcb_map_delete(tls *libc.TLS, list uintptr, do_free Txcb_list_free_func_t) {
  7764. var cur uintptr
  7765. _ = cur
  7766. if !(list != 0) {
  7767. return
  7768. }
  7769. for (*T_xcb_map)(unsafe.Pointer(list)).Fhead != 0 {
  7770. cur = (*T_xcb_map)(unsafe.Pointer(list)).Fhead
  7771. if do_free != 0 {
  7772. (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&struct{ uintptr }{do_free})))(tls, (*Tnode)(unsafe.Pointer(cur)).Fdata)
  7773. }
  7774. (*T_xcb_map)(unsafe.Pointer(list)).Fhead = (*Tnode)(unsafe.Pointer(cur)).Fnext
  7775. libc.Xfree(tls, cur)
  7776. }
  7777. libc.Xfree(tls, list)
  7778. }
  7779. func X_xcb_map_put(tls *libc.TLS, list uintptr, key Tuint64_t, data uintptr) (r int32) {
  7780. var cur uintptr
  7781. _ = cur
  7782. cur = libc.Xmalloc(tls, uint64(24))
  7783. if !(cur != 0) {
  7784. return 0
  7785. }
  7786. (*Tnode)(unsafe.Pointer(cur)).Fkey = key
  7787. (*Tnode)(unsafe.Pointer(cur)).Fdata = data
  7788. (*Tnode)(unsafe.Pointer(cur)).Fnext = uintptr(0)
  7789. *(*uintptr)(unsafe.Pointer((*T_xcb_map)(unsafe.Pointer(list)).Ftail)) = cur
  7790. (*T_xcb_map)(unsafe.Pointer(list)).Ftail = cur
  7791. return int32(1)
  7792. }
  7793. func X_xcb_map_remove(tls *libc.TLS, list uintptr, key Tuint64_t) (r uintptr) {
  7794. var cur, ret, tmp uintptr
  7795. _, _, _ = cur, ret, tmp
  7796. cur = list
  7797. for {
  7798. if !(*(*uintptr)(unsafe.Pointer(cur)) != 0) {
  7799. break
  7800. }
  7801. if (*Tnode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cur)))).Fkey == key {
  7802. tmp = *(*uintptr)(unsafe.Pointer(cur))
  7803. ret = (*Tnode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cur)))).Fdata
  7804. *(*uintptr)(unsafe.Pointer(cur)) = (*Tnode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cur)))).Fnext
  7805. if !(*(*uintptr)(unsafe.Pointer(cur)) != 0) {
  7806. (*T_xcb_map)(unsafe.Pointer(list)).Ftail = cur
  7807. }
  7808. libc.Xfree(tls, tmp)
  7809. return ret
  7810. }
  7811. goto _1
  7812. _1:
  7813. ;
  7814. cur = *(*uintptr)(unsafe.Pointer(cur))
  7815. }
  7816. return uintptr(0)
  7817. }
  7818. const m_AI_ADDRCONFIG = 0x00000400
  7819. const m_AI_ALL = 0x00000100
  7820. const m_AI_CANONNAME = 0x00000002
  7821. const m_AI_NUMERICHOST = 4
  7822. const m_AI_NUMERICSERV = 8
  7823. const m_AI_PASSIVE = 0x00000001
  7824. const m_AI_V4MAPPED = 0x00000800
  7825. const m_AI_V4MAPPED_CFG = 0x00000200
  7826. const m_CPUCLOCK_WHICH_PID = 0
  7827. const m_CPUCLOCK_WHICH_TID = 1
  7828. const m_DST_AUST = 2
  7829. const m_DST_CAN = 6
  7830. const m_DST_EET = 5
  7831. const m_DST_MET = 4
  7832. const m_DST_NONE = 0
  7833. const m_DST_USA = 1
  7834. const m_DST_WET = 3
  7835. const m_EAI_ADDRFAMILY = 1
  7836. const m_EAI_AGAIN = 2
  7837. const m_EAI_BADFLAGS = 3
  7838. const m_EAI_BADHINTS = 12
  7839. const m_EAI_FAIL = 4
  7840. const m_EAI_FAMILY = 5
  7841. const m_EAI_MAX = 15
  7842. const m_EAI_MEMORY = 6
  7843. const m_EAI_NODATA = 7
  7844. const m_EAI_NONAME = 8
  7845. const m_EAI_OVERFLOW = 14
  7846. const m_EAI_PROTOCOL = 13
  7847. const m_EAI_SERVICE = 9
  7848. const m_EAI_SOCKTYPE = 10
  7849. const m_EAI_SYSTEM = 11
  7850. const m_HOST_NOT_FOUND = 1
  7851. const m_ITIMER_PROF = 2
  7852. const m_ITIMER_REAL = 0
  7853. const m_ITIMER_VIRTUAL = 1
  7854. const m_LOCAL_CONNWAIT = 4
  7855. const m_LOCAL_CREDS = 2
  7856. const m_LOCAL_CREDS_PERSISTENT = 3
  7857. const m_LOCAL_PEERCRED = 1
  7858. const m_LOCAL_VENDOR = "SO_VENDOR"
  7859. const m_MAX_SACK_BLKS = 6
  7860. const m_MAX_TCPOPTLEN = 40
  7861. const m_MSG_CTRUNC2 = 0x00000020
  7862. const m_MSG_TRUNC2 = 0x00000010
  7863. const m_NETDB_SUCCESS = 0
  7864. const m_NI_DGRAM = 0x00000010
  7865. const m_NI_MAXHOST = 1025
  7866. const m_NI_MAXSERV = 32
  7867. const m_NI_NAMEREQD = 0x00000004
  7868. const m_NI_NOFQDN = 0x00000001
  7869. const m_NI_NUMERICHOST = 0x00000002
  7870. const m_NI_NUMERICSCOPE = 0x00000020
  7871. const m_NI_NUMERICSERV = 0x00000008
  7872. const m_NO_ADDRESS = "NO_DATA"
  7873. const m_NO_DATA = 4
  7874. const m_NO_RECOVERY = 3
  7875. const m_O_NONBLOCK1 = 0x0004
  7876. const m_PRINT_TH_FLAGS = "\\20\\1FIN\\2SYN\\3RST\\4PUSH\\5ACK\\6URG\\7ECE\\10CWR\\11AE"
  7877. const m_SBT_MAX = 0x7fffffffffffffff
  7878. const m_SCM_RIGHTS1 = 0x01
  7879. const m_SCOPE_DELIMITER = '%'
  7880. const m_SF_APPEND = 0x00040000
  7881. const m_SF_ARCHIVED = 0x00010000
  7882. const m_SF_IMMUTABLE = 0x00020000
  7883. const m_SF_NOUNLINK = 0x00100000
  7884. const m_SF_SETTABLE = 0xffff0000
  7885. const m_SF_SNAPSHOT = 0x00200000
  7886. const m_SOCK_CLOEXEC1 = 268435456
  7887. const m_SOL_LOCAL = 0
  7888. const m_SO_KEEPALIVE1 = 8
  7889. const m_SO_SNDBUF1 = 4097
  7890. const m_SUNPATHLEN = 104
  7891. const m_S_BLKSIZE = 512
  7892. const m_S_IEXEC = "S_IXUSR"
  7893. const m_S_IFBLK = 0060000
  7894. const m_S_IFCHR = 0020000
  7895. const m_S_IFDIR = 0040000
  7896. const m_S_IFIFO = 0010000
  7897. const m_S_IFLNK = 0120000
  7898. const m_S_IFMT = 0170000
  7899. const m_S_IFREG = 0100000
  7900. const m_S_IFSOCK = 0140000
  7901. const m_S_IFWHT = 0160000
  7902. const m_S_IREAD = "S_IRUSR"
  7903. const m_S_IRGRP = 0000040
  7904. const m_S_IROTH = 0000004
  7905. const m_S_IRUSR = 0000400
  7906. const m_S_IRWXG = 0000070
  7907. const m_S_IRWXO = 0000007
  7908. const m_S_IRWXU = 0000700
  7909. const m_S_ISGID = 0002000
  7910. const m_S_ISTXT = 0001000
  7911. const m_S_ISUID = 0004000
  7912. const m_S_ISVTX = 0001000
  7913. const m_S_IWGRP = 0000020
  7914. const m_S_IWOTH = 0000002
  7915. const m_S_IWRITE = "S_IWUSR"
  7916. const m_S_IWUSR = 0000200
  7917. const m_S_IXGRP = 0000010
  7918. const m_S_IXOTH = 0000001
  7919. const m_S_IXUSR = 0000100
  7920. const m_TCP6_MSS = 1220
  7921. const m_TCPI_OPT_ACE = 0x40
  7922. const m_TCPI_OPT_ECN = 0x08
  7923. const m_TCPI_OPT_SACK = 0x02
  7924. const m_TCPI_OPT_TFO = 0x20
  7925. const m_TCPI_OPT_TIMESTAMPS = 0x01
  7926. const m_TCPI_OPT_TOE = 0x10
  7927. const m_TCPI_OPT_WSCALE = 0x04
  7928. const m_TCPOLEN_EOL = 1
  7929. const m_TCPOLEN_FAST_OPEN_EMPTY = 2
  7930. const m_TCPOLEN_MAXSEG = 4
  7931. const m_TCPOLEN_NOP = 1
  7932. const m_TCPOLEN_PAD = 1
  7933. const m_TCPOLEN_SACK = 8
  7934. const m_TCPOLEN_SACKHDR = 2
  7935. const m_TCPOLEN_SACK_PERMITTED = 2
  7936. const m_TCPOLEN_SIGNATURE = 18
  7937. const m_TCPOLEN_TIMESTAMP = 10
  7938. const m_TCPOLEN_WINDOW = 3
  7939. const m_TCPOPT_EOL = 0
  7940. const m_TCPOPT_FAST_OPEN = 34
  7941. const m_TCPOPT_MAXSEG = 2
  7942. const m_TCPOPT_NOP = 1
  7943. const m_TCPOPT_PAD = 0
  7944. const m_TCPOPT_SACK = 5
  7945. const m_TCPOPT_SACK_PERMITTED = 4
  7946. const m_TCPOPT_SIGNATURE = 19
  7947. const m_TCPOPT_TIMESTAMP = 8
  7948. const m_TCPOPT_WINDOW = 3
  7949. const m_TCP_BBR_ACK_COMP_ALG = 1096
  7950. const m_TCP_BBR_ALGORITHM = 1083
  7951. const m_TCP_BBR_DRAIN_INC_EXTRA = 1084
  7952. const m_TCP_BBR_DRAIN_PG = 1070
  7953. const m_TCP_BBR_EXTRA_GAIN = 1097
  7954. const m_TCP_BBR_EXTRA_STATE = 1107
  7955. const m_TCP_BBR_FLOOR_MIN_TSO = 1108
  7956. const m_TCP_BBR_HDWR_PACE = 1105
  7957. const m_TCP_BBR_HOLD_TARGET = 1078
  7958. const m_TCP_BBR_IWINTSO = 1067
  7959. const m_TCP_BBR_LOWGAIN_FD = 1078
  7960. const m_TCP_BBR_LOWGAIN_HALF = 1077
  7961. const m_TCP_BBR_LOWGAIN_THRESH = 1076
  7962. const m_TCP_BBR_MAX_RTO = 1081
  7963. const m_TCP_BBR_MIN_RTO = 1080
  7964. const m_TCP_BBR_MIN_TOPACEOUT = 1109
  7965. const m_TCP_BBR_ONE_RETRAN = 1073
  7966. const m_TCP_BBR_PACE_CROSS = 1090
  7967. const m_TCP_BBR_PACE_DEL_TAR = 1087
  7968. const m_TCP_BBR_PACE_OH = 1077
  7969. const m_TCP_BBR_PACE_PER_SEC = 1086
  7970. const m_TCP_BBR_PACE_SEG_MAX = 1088
  7971. const m_TCP_BBR_PACE_SEG_MIN = 1089
  7972. const m_TCP_BBR_POLICER_DETECT = 1111
  7973. const m_TCP_BBR_PROBE_RTT_GAIN = 1101
  7974. const m_TCP_BBR_PROBE_RTT_INT = 1072
  7975. const m_TCP_BBR_PROBE_RTT_LEN = 1102
  7976. const m_TCP_BBR_RACK_INIT_RATE = 1112
  7977. const m_TCP_BBR_RACK_RTT_USE = 1098
  7978. const m_TCP_BBR_RECFORCE = 1068
  7979. const m_TCP_BBR_REC_OVER_HPTS = 1082
  7980. const m_TCP_BBR_RETRAN_WTSO = 1099
  7981. const m_TCP_BBR_RWND_IS_APP = 1071
  7982. const m_TCP_BBR_SEND_IWND_IN_TSO = 1103
  7983. const m_TCP_BBR_STARTUP_EXIT_EPOCH = 1085
  7984. const m_TCP_BBR_STARTUP_LOSS_EXIT = 1074
  7985. const m_TCP_BBR_STARTUP_PG = 1069
  7986. const m_TCP_BBR_TMR_PACE_OH = 1096
  7987. const m_TCP_BBR_TSLIMITS = 1076
  7988. const m_TCP_BBR_TSTMP_RAISES = 1110
  7989. const m_TCP_BBR_UNLIMITED = 1083
  7990. const m_TCP_BBR_USEDEL_RATE = 1079
  7991. const m_TCP_BBR_USE_LOWGAIN = 1075
  7992. const m_TCP_BBR_USE_RACK_CHEAT = "TCP_BBR_USE_RACK_RR"
  7993. const m_TCP_BBR_USE_RACK_RR = 1104
  7994. const m_TCP_BBR_UTTER_MAX_TSO = 1106
  7995. const m_TCP_CA_NAME_MAX = 16
  7996. const m_TCP_CCALGOOPT = 65
  7997. const m_TCP_CONGESTION = 64
  7998. const m_TCP_DATA_AFTER_CLOSE = 1100
  7999. const m_TCP_DEFER_OPTIONS = 1136
  8000. const m_TCP_DELACK = 72
  8001. const m_TCP_FASTOPEN = 1025
  8002. const m_TCP_FASTOPEN_MAX_COOKIE_LEN = 16
  8003. const m_TCP_FASTOPEN_MIN_COOKIE_LEN = 4
  8004. const m_TCP_FASTOPEN_PSK_LEN = 16
  8005. const m_TCP_FAST_RSM_HACK = 1137
  8006. const m_TCP_FIN_IS_RST = 73
  8007. const m_TCP_FUNCTION_ALIAS = 8193
  8008. const m_TCP_FUNCTION_BLK = 8192
  8009. const m_TCP_FUNCTION_NAME_LEN_MAX = 32
  8010. const m_TCP_HDWR_RATE_CAP = 1130
  8011. const m_TCP_HDWR_UP_ONLY = 1132
  8012. const m_TCP_HYBRID_PACING = 1150
  8013. const m_TCP_HYBRID_PACING_CSPR = 0x0004
  8014. const m_TCP_HYBRID_PACING_CU = 0x0001
  8015. const m_TCP_HYBRID_PACING_DTL = 0x0002
  8016. const m_TCP_HYBRID_PACING_ENABLE = 0x0010
  8017. const m_TCP_HYBRID_PACING_H_MS = 0x0008
  8018. const m_TCP_HYBRID_PACING_SETMSS = 0x1000
  8019. const m_TCP_HYBRID_PACING_S_MSS = 0x0020
  8020. const m_TCP_HYBRID_PACING_WASSET = 0x2000
  8021. const m_TCP_IDLE_REDUCE = 70
  8022. const m_TCP_INFO = 32
  8023. const m_TCP_IWND_NB = 43
  8024. const m_TCP_IWND_NSEG = 44
  8025. const m_TCP_KEEPCNT = 1024
  8026. const m_TCP_KEEPIDLE = 256
  8027. const m_TCP_KEEPINIT = 128
  8028. const m_TCP_KEEPINTVL = 512
  8029. const m_TCP_LOG = 34
  8030. const m_TCP_LOGBUF = 35
  8031. const m_TCP_LOGDUMP = 37
  8032. const m_TCP_LOGDUMPID = 38
  8033. const m_TCP_LOGID = 36
  8034. const m_TCP_LOGID_CNT = 46
  8035. const m_TCP_LOG_HTTPD_RANGE_END = 0x0002
  8036. const m_TCP_LOG_HTTPD_RANGE_START = 0x0001
  8037. const m_TCP_LOG_HTTPD_TS = 1
  8038. const m_TCP_LOG_HTTPD_TS_REQ = 2
  8039. const m_TCP_LOG_ID_LEN = 64
  8040. const m_TCP_LOG_LIMIT = 74
  8041. const m_TCP_LOG_TAG = 47
  8042. const m_TCP_LOG_USER_HTTPD = 1
  8043. const m_TCP_LRD = 79
  8044. const m_TCP_MAXBURST = 4
  8045. const m_TCP_MAXPEAKRATE = 69
  8046. const m_TCP_MAXSEG = 2
  8047. const m_TCP_MAXUNACKTIME = 68
  8048. const m_TCP_MAXWIN = 65535
  8049. const m_TCP_MAX_SACK = 4
  8050. const m_TCP_MAX_WINSHIFT = 14
  8051. const m_TCP_MD5SIG = 16
  8052. const m_TCP_MINMSS = 216
  8053. const m_TCP_MSS = 536
  8054. const m_TCP_NODELAY = 1
  8055. const m_TCP_NOOPT = 8
  8056. const m_TCP_NOPUSH = 4
  8057. const m_TCP_NO_PRR = 1122
  8058. const m_TCP_NUM_CNT_COUNTERS = 13
  8059. const m_TCP_NUM_PROC_COUNTERS = 11
  8060. const m_TCP_PACING_DND = 1151
  8061. const m_TCP_PACING_RATE_CAP = 1131
  8062. const m_TCP_PCAP_IN = 4096
  8063. const m_TCP_PCAP_OUT = 2048
  8064. const m_TCP_PERF_INFO = 78
  8065. const m_TCP_PROC_ACCOUNTING = 76
  8066. const m_TCP_RACK_ABC_VAL = 1133
  8067. const m_TCP_RACK_CHEAT_NOT_CONF_RATE = "TCP_RACK_RR_CONF"
  8068. const m_TCP_RACK_DGP_IN_REC = 1148
  8069. const m_TCP_RACK_DO_DETECTION = 1097
  8070. const m_TCP_RACK_DSACK_OPT = 1141
  8071. const m_TCP_RACK_EARLY_RECOV = 1059
  8072. const m_TCP_RACK_EARLY_SEG = 1060
  8073. const m_TCP_RACK_ENABLE_HYSTART = 1142
  8074. const m_TCP_RACK_FORCE_MSEG = 1117
  8075. const m_TCP_RACK_GP_INCREASE = 1094
  8076. const m_TCP_RACK_GP_INCREASE_CA = 1114
  8077. const m_TCP_RACK_GP_INCREASE_REC = 1116
  8078. const m_TCP_RACK_GP_INCREASE_SS = 1115
  8079. const m_TCP_RACK_HI_BETA = 1144
  8080. const m_TCP_RACK_IDLE_REDUCE_HIGH = 1092
  8081. const m_TCP_RACK_MBUF_QUEUE = 1050
  8082. const m_TCP_RACK_MEASURE_CNT = 1135
  8083. const m_TCP_RACK_MIN_PACE = 1093
  8084. const m_TCP_RACK_MIN_PACE_SEG = 1094
  8085. const m_TCP_RACK_MIN_TO = 1058
  8086. const m_TCP_RACK_NONRXT_CFG_RATE = 1123
  8087. const m_TCP_RACK_NO_PUSH_AT_MAX = 1126
  8088. const m_TCP_RACK_PACE_ALWAYS = 1055
  8089. const m_TCP_RACK_PACE_MAX_SEG = 1054
  8090. const m_TCP_RACK_PACE_MIN_SEG = 1147
  8091. const m_TCP_RACK_PACE_RATE_CA = 1118
  8092. const m_TCP_RACK_PACE_RATE_REC = 1120
  8093. const m_TCP_RACK_PACE_RATE_SS = 1119
  8094. const m_TCP_RACK_PACE_REDUCE = 1053
  8095. const m_TCP_RACK_PACE_TO_FILL = 1127
  8096. const m_TCP_RACK_PACING_BETA = 1138
  8097. const m_TCP_RACK_PACING_BETA_ECN = 1139
  8098. const m_TCP_RACK_PACING_DIVISOR = 1146
  8099. const m_TCP_RACK_PKT_DELAY = 1064
  8100. const m_TCP_RACK_PROFILE = 1129
  8101. const m_TCP_RACK_PROP = 1051
  8102. const m_TCP_RACK_PROP_RATE = 1056
  8103. const m_TCP_RACK_PRR_SENDALOT = 1057
  8104. const m_TCP_RACK_REORD_FADE = 1062
  8105. const m_TCP_RACK_REORD_THRESH = 1061
  8106. const m_TCP_RACK_RR_CONF = 1113
  8107. const m_TCP_RACK_SET_RXT_OPTIONS = 1143
  8108. const m_TCP_RACK_SPLIT_LIMIT = 1145
  8109. const m_TCP_RACK_TIMER_SLOP = 1140
  8110. const m_TCP_RACK_TLP_INC_VAR = 1065
  8111. const m_TCP_RACK_TLP_REDUCE = 1052
  8112. const m_TCP_RACK_TLP_THRESH = 1063
  8113. const m_TCP_RACK_TLP_USE = 1095
  8114. const m_TCP_REC_ABC_VAL = 1134
  8115. const m_TCP_REMOTE_UDP_ENCAPS_PORT = 71
  8116. const m_TCP_REUSPORT_LB_NUMA = 1026
  8117. const m_TCP_RXTLS_ENABLE = 41
  8118. const m_TCP_RXTLS_MODE = 42
  8119. const m_TCP_RXT_CLAMP = 1149
  8120. const m_TCP_SHARED_CWND_ALLOWED = 75
  8121. const m_TCP_SHARED_CWND_ENABLE = 1124
  8122. const m_TCP_SHARED_CWND_TIME_LIMIT = 1128
  8123. const m_TCP_STATS = 33
  8124. const m_TCP_TIMELY_DYN_ADJ = 1125
  8125. const m_TCP_TLS_MODE_IFNET = 2
  8126. const m_TCP_TLS_MODE_NONE = 0
  8127. const m_TCP_TLS_MODE_SW = 1
  8128. const m_TCP_TLS_MODE_TOE = 3
  8129. const m_TCP_TXTLS_ENABLE = 39
  8130. const m_TCP_TXTLS_MODE = 40
  8131. const m_TCP_USER_LOG = 48
  8132. const m_TCP_USE_CMP_ACKS = 77
  8133. const m_TCP_VENDOR = "SO_VENDOR"
  8134. const m_TH_ACK = 0x10
  8135. const m_TH_AE = 0x100
  8136. const m_TH_CWR = 0x80
  8137. const m_TH_ECE = 0x40
  8138. const m_TH_FIN = 0x01
  8139. const m_TH_PUSH = 0x08
  8140. const m_TH_RES1 = 0x800
  8141. const m_TH_RES2 = 0x400
  8142. const m_TH_RES3 = 0x200
  8143. const m_TH_RST = 0x04
  8144. const m_TH_SYN = 0x02
  8145. const m_TH_URG = 0x20
  8146. const m_TLS_GET_RECORD = 2
  8147. const m_TLS_SET_RECORD_TYPE = 1
  8148. const m_TRY_AGAIN = 2
  8149. const m_TTCP_CLIENT_SND_WND = 4096
  8150. const m_UF_APPEND = 0x00000004
  8151. const m_UF_ARCHIVE = 0x00000800
  8152. const m_UF_HIDDEN = 0x00008000
  8153. const m_UF_IMMUTABLE = 0x00000002
  8154. const m_UF_NODUMP = 0x00000001
  8155. const m_UF_NOUNLINK = 0x00000010
  8156. const m_UF_OFFLINE = 0x00000200
  8157. const m_UF_OPAQUE = 0x00000008
  8158. const m_UF_READONLY = 0x00001000
  8159. const m_UF_REPARSE = 0x00000400
  8160. const m_UF_SETTABLE = 0x0000ffff
  8161. const m_UF_SPARSE = 0x00000100
  8162. const m_UF_SYSTEM = 0x00000080
  8163. const m_VOI_TCP_ACKLEN = 9
  8164. const m_VOI_TCP_CALCFRWINDIFF = 7
  8165. const m_VOI_TCP_CSIG = 5
  8166. const m_VOI_TCP_FRWIN = 2
  8167. const m_VOI_TCP_GPUT = 6
  8168. const m_VOI_TCP_GPUT_ND = 8
  8169. const m_VOI_TCP_LCWIN = 3
  8170. const m_VOI_TCP_PATHRTT = 10
  8171. const m_VOI_TCP_RETXPB = 1
  8172. const m_VOI_TCP_RTT = 4
  8173. const m_VOI_TCP_TXPB = 0
  8174. const m__PATH_HEQUIV = "/etc/hosts.equiv"
  8175. const m__PATH_HOSTS = "/etc/hosts"
  8176. const m__PATH_NETWORKS = "/etc/networks"
  8177. const m__PATH_PROTOCOLS = "/etc/protocols"
  8178. const m__PATH_SERVICES = "/etc/services"
  8179. const m__PATH_SERVICES_DB = "/var/db/services.db"
  8180. const m___INT_MAX1 = 2147483647
  8181. const m_inet_addr = "__inet_addr"
  8182. const m_inet_aton = "__inet_aton"
  8183. const m_inet_cidr_ntop = "__inet_cidr_ntop"
  8184. const m_inet_cidr_pton = "__inet_cidr_pton"
  8185. const m_inet_lnaof = "__inet_lnaof"
  8186. const m_inet_makeaddr = "__inet_makeaddr"
  8187. const m_inet_net_ntop = "__inet_net_ntop"
  8188. const m_inet_net_pton = "__inet_net_pton"
  8189. const m_inet_neta = "__inet_neta"
  8190. const m_inet_netof = "__inet_netof"
  8191. const m_inet_network = "__inet_network"
  8192. const m_inet_nsap_addr = "__inet_nsap_addr"
  8193. const m_inet_nsap_ntoa = "__inet_nsap_ntoa"
  8194. const m_inet_ntoa = "__inet_ntoa"
  8195. const m_inet_ntoa_r = "__inet_ntoa_r"
  8196. const m_inet_ntop = "__inet_ntop"
  8197. const m_inet_pton = "__inet_pton"
  8198. const m_st_atimespec = "st_atim"
  8199. const m_st_birthtimespec = "st_birthtim"
  8200. const m_st_ctimespec = "st_ctim"
  8201. const m_st_mtimespec = "st_mtim"
  8202. const m_tcp6_seq = "tcp_seq"
  8203. const m_tcp6hdr = "tcphdr"
  8204. type Tptrdiff_t = int64
  8205. type Tmax_align_t = struct {
  8206. F__max_align1 int64
  8207. F__max_align2 float64
  8208. }
  8209. type Tsockaddr_un = struct {
  8210. Fsun_len uint8
  8211. Fsun_family Tsa_family_t
  8212. Fsun_path [104]int8
  8213. }
  8214. type Ttcp_seq = uint32
  8215. type Ttcphdr = struct {
  8216. Fth_sport Tu_short
  8217. Fth_dport Tu_short
  8218. Fth_seq Ttcp_seq
  8219. Fth_ack Ttcp_seq
  8220. F__ccgo12 uint8
  8221. Fth_flags Tu_char
  8222. Fth_win Tu_short
  8223. Fth_sum Tu_short
  8224. Fth_urp Tu_short
  8225. }
  8226. type Ttcp_perf_info = struct {
  8227. Ftcp_cnt_counters [13]Tuint64_t
  8228. Ftcp_proc_time [13]Tuint64_t
  8229. Ftimebase Tuint64_t
  8230. Ftb_is_stable Tuint8_t
  8231. }
  8232. type Ttcp_info = struct {
  8233. Ftcpi_state Tu_int8_t
  8234. F__tcpi_ca_state Tu_int8_t
  8235. F__tcpi_retransmits Tu_int8_t
  8236. F__tcpi_probes Tu_int8_t
  8237. F__tcpi_backoff Tu_int8_t
  8238. Ftcpi_options Tu_int8_t
  8239. F__ccgo6 uint8
  8240. Ftcpi_rto Tu_int32_t
  8241. F__tcpi_ato Tu_int32_t
  8242. Ftcpi_snd_mss Tu_int32_t
  8243. Ftcpi_rcv_mss Tu_int32_t
  8244. F__tcpi_unacked Tu_int32_t
  8245. F__tcpi_sacked Tu_int32_t
  8246. F__tcpi_lost Tu_int32_t
  8247. F__tcpi_retrans Tu_int32_t
  8248. F__tcpi_fackets Tu_int32_t
  8249. F__tcpi_last_data_sent Tu_int32_t
  8250. F__tcpi_last_ack_sent Tu_int32_t
  8251. Ftcpi_last_data_recv Tu_int32_t
  8252. F__tcpi_last_ack_recv Tu_int32_t
  8253. F__tcpi_pmtu Tu_int32_t
  8254. F__tcpi_rcv_ssthresh Tu_int32_t
  8255. Ftcpi_rtt Tu_int32_t
  8256. Ftcpi_rttvar Tu_int32_t
  8257. Ftcpi_snd_ssthresh Tu_int32_t
  8258. Ftcpi_snd_cwnd Tu_int32_t
  8259. F__tcpi_advmss Tu_int32_t
  8260. F__tcpi_reordering Tu_int32_t
  8261. F__tcpi_rcv_rtt Tu_int32_t
  8262. Ftcpi_rcv_space Tu_int32_t
  8263. Ftcpi_snd_wnd Tu_int32_t
  8264. Ftcpi_snd_bwnd Tu_int32_t
  8265. Ftcpi_snd_nxt Tu_int32_t
  8266. Ftcpi_rcv_nxt Tu_int32_t
  8267. Ftcpi_toe_tid Tu_int32_t
  8268. Ftcpi_snd_rexmitpack Tu_int32_t
  8269. Ftcpi_rcv_ooopack Tu_int32_t
  8270. Ftcpi_snd_zerowin Tu_int32_t
  8271. Ftcpi_delivered_ce Tu_int32_t
  8272. Ftcpi_received_ce Tu_int32_t
  8273. F__tcpi_delivered_e1_bytes Tu_int32_t
  8274. F__tcpi_delivered_e0_bytes Tu_int32_t
  8275. F__tcpi_delivered_ce_bytes Tu_int32_t
  8276. F__tcpi_received_e1_bytes Tu_int32_t
  8277. F__tcpi_received_e0_bytes Tu_int32_t
  8278. F__tcpi_received_ce_bytes Tu_int32_t
  8279. Ftcpi_total_tlp Tu_int32_t
  8280. Ftcpi_total_tlp_bytes Tu_int64_t
  8281. Ftcpi_snd_una Tu_int32_t
  8282. Ftcpi_snd_max Tu_int32_t
  8283. Ftcpi_rcv_numsacks Tu_int32_t
  8284. Ftcpi_rcv_adv Tu_int32_t
  8285. Ftcpi_dupacks Tu_int32_t
  8286. F__tcpi_pad [10]Tu_int32_t
  8287. }
  8288. type Ttcp_fastopen = struct {
  8289. Fenable int32
  8290. Fpsk [16]Tuint8_t
  8291. }
  8292. type Ttcp_function_set = struct {
  8293. Ffunction_set_name [32]int8
  8294. Fpcbcnt Tuint32_t
  8295. }
  8296. type Ttcp_snd_req = struct {
  8297. Ftimestamp Tuint64_t
  8298. Fstart Tuint64_t
  8299. Fend Tuint64_t
  8300. Fflags Tuint32_t
  8301. }
  8302. type Ttcp_log_userdata = struct {
  8303. Ftcp_req Ttcp_snd_req
  8304. }
  8305. type Ttcp_log_user = struct {
  8306. Ftype1 Tuint32_t
  8307. Fsubtype Tuint32_t
  8308. Fdata Ttcp_log_userdata
  8309. }
  8310. type Ttcp_hybrid_req = struct {
  8311. Freq Ttcp_snd_req
  8312. Fcspr Tuint64_t
  8313. Fhint_maxseg Tuint32_t
  8314. Fhybrid_flags Tuint32_t
  8315. }
  8316. type Thostent = struct {
  8317. Fh_name uintptr
  8318. Fh_aliases uintptr
  8319. Fh_addrtype int32
  8320. Fh_length int32
  8321. Fh_addr_list uintptr
  8322. }
  8323. type Tnetent = struct {
  8324. Fn_name uintptr
  8325. Fn_aliases uintptr
  8326. Fn_addrtype int32
  8327. Fn_net Tuint32_t
  8328. }
  8329. type Tservent = struct {
  8330. Fs_name uintptr
  8331. Fs_aliases uintptr
  8332. Fs_port int32
  8333. Fs_proto uintptr
  8334. }
  8335. type Tprotoent = struct {
  8336. Fp_name uintptr
  8337. Fp_aliases uintptr
  8338. Fp_proto int32
  8339. }
  8340. type Taddrinfo = struct {
  8341. Fai_flags int32
  8342. Fai_family int32
  8343. Fai_socktype int32
  8344. Fai_protocol int32
  8345. Fai_addrlen Tsocklen_t
  8346. Fai_canonname uintptr
  8347. Fai_addr uintptr
  8348. Fai_next uintptr
  8349. }
  8350. type Ttimezone = struct {
  8351. Ftz_minuteswest int32
  8352. Ftz_dsttime int32
  8353. }
  8354. type Tbintime = struct {
  8355. Fsec Ttime_t
  8356. Ffrac Tuint64_t
  8357. }
  8358. type Titimerval = struct {
  8359. Fit_interval Ttimeval
  8360. Fit_value Ttimeval
  8361. }
  8362. type Tclockinfo = struct {
  8363. Fhz int32
  8364. Ftick int32
  8365. Fspare int32
  8366. Fstathz int32
  8367. Fprofhz int32
  8368. }
  8369. type Tstat = struct {
  8370. Fst_dev Tdev_t
  8371. Fst_ino Tino_t
  8372. Fst_nlink Tnlink_t
  8373. Fst_mode Tmode_t
  8374. Fst_padding0 t__int16_t
  8375. Fst_uid Tuid_t
  8376. Fst_gid Tgid_t
  8377. Fst_padding1 t__int32_t
  8378. Fst_rdev Tdev_t
  8379. Fst_atim Ttimespec
  8380. Fst_mtim Ttimespec
  8381. Fst_ctim Ttimespec
  8382. Fst_birthtim Ttimespec
  8383. Fst_size Toff_t
  8384. Fst_blocks Tblkcnt_t
  8385. Fst_blksize Tblksize_t
  8386. Fst_flags Tfflags_t
  8387. Fst_gen t__uint64_t
  8388. Fst_spare [10]t__uint64_t
  8389. }
  8390. func Xxcb_popcount(tls *libc.TLS, mask Tuint32_t) (r int32) {
  8391. var y Tuint32_t
  8392. _ = y
  8393. y = mask >> libc.Int32FromInt32(1) & uint32(033333333333)
  8394. y = mask - y - y>>libc.Int32FromInt32(1)&uint32(033333333333)
  8395. return libc.Int32FromUint32((y + y>>libc.Int32FromInt32(3)) & uint32(030707070707) % uint32(077))
  8396. }
  8397. func Xxcb_sumof(tls *libc.TLS, list uintptr, len1 int32) (r int32) {
  8398. var i, s int32
  8399. _, _ = i, s
  8400. s = 0
  8401. i = 0
  8402. for {
  8403. if !(i < len1) {
  8404. break
  8405. }
  8406. s += libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(list)))
  8407. list++
  8408. goto _1
  8409. _1:
  8410. ;
  8411. i++
  8412. }
  8413. return s
  8414. }
  8415. // C documentation
  8416. //
  8417. // /* Return true and parse if name matches <path to socket>[.<screen>]
  8418. // * Upon success:
  8419. // * host = <path to socket>
  8420. // * protocol = "unix"
  8421. // * display = 0
  8422. // * screen = <screen>
  8423. // */
  8424. func __xcb_parse_display_path_to_socket(tls *libc.TLS, name uintptr, host uintptr, protocol uintptr, displayp uintptr, screenp uintptr) (r int32) {
  8425. bp := tls.Alloc(1264)
  8426. defer tls.Free(1264)
  8427. var _screen, res int32
  8428. var dot uintptr
  8429. var len1 Tsize_t
  8430. var lscreen uint64
  8431. var _ /* endptr at bp+1248 */ uintptr
  8432. var _ /* path at bp+224 */ [1024]int8
  8433. var _ /* sbuf at bp+0 */ Tstat
  8434. _, _, _, _, _ = _screen, dot, len1, lscreen, res
  8435. _screen = 0
  8436. len1 = libc.Xstrlen(tls, name)
  8437. if len1 >= uint64(1024) {
  8438. return 0
  8439. }
  8440. libc.Xmemcpy(tls, bp+224, name, len1+uint64(1))
  8441. res = libc.Xstat(tls, bp+224, bp)
  8442. if 0 != res {
  8443. if res != -int32(1) || *(*int32)(unsafe.Pointer(libc.X__error(tls))) != int32(m_ENOENT) && *(*int32)(unsafe.Pointer(libc.X__error(tls))) != int32(m_ENOTDIR) {
  8444. return 0
  8445. }
  8446. dot = libc.Xstrrchr(tls, bp+224, int32('.'))
  8447. if !(dot != 0) || int32(*(*int8)(unsafe.Pointer(dot + 1))) < int32('1') || int32(*(*int8)(unsafe.Pointer(dot + 1))) > int32('9') {
  8448. return 0
  8449. }
  8450. *(*int8)(unsafe.Pointer(dot)) = int8('\000')
  8451. *(*int32)(unsafe.Pointer(libc.X__error(tls))) = 0
  8452. lscreen = libc.Xstrtoul(tls, dot+uintptr(1), bp+1248, int32(10))
  8453. if lscreen > uint64(m___INT_MAX1) || !(*(*uintptr)(unsafe.Pointer(bp + 1248)) != 0) || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1248)))) != 0 || *(*int32)(unsafe.Pointer(libc.X__error(tls))) != 0 {
  8454. return 0
  8455. }
  8456. if 0 != libc.Xstat(tls, bp+224, bp) {
  8457. return 0
  8458. }
  8459. _screen = libc.Int32FromUint64(lscreen)
  8460. }
  8461. if host != 0 {
  8462. *(*uintptr)(unsafe.Pointer(host)) = libc.Xstrdup(tls, bp+224)
  8463. if !(*(*uintptr)(unsafe.Pointer(host)) != 0) {
  8464. return 0
  8465. }
  8466. }
  8467. if protocol != 0 {
  8468. *(*uintptr)(unsafe.Pointer(protocol)) = libc.Xstrdup(tls, __ccgo_ts+4)
  8469. if !(*(*uintptr)(unsafe.Pointer(protocol)) != 0) {
  8470. if host != 0 {
  8471. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(host)))
  8472. }
  8473. return 0
  8474. }
  8475. }
  8476. if displayp != 0 {
  8477. *(*int32)(unsafe.Pointer(displayp)) = 0
  8478. }
  8479. if screenp != 0 {
  8480. *(*int32)(unsafe.Pointer(screenp)) = _screen
  8481. }
  8482. return int32(1)
  8483. }
  8484. func __xcb_parse_display(tls *libc.TLS, name uintptr, host uintptr, protocol uintptr, displayp uintptr, screenp uintptr) (r int32) {
  8485. bp := tls.Alloc(16)
  8486. defer tls.Free(16)
  8487. var colon, slash uintptr
  8488. var display, len1, screen int32
  8489. var _ /* dot at bp+0 */ uintptr
  8490. var _ /* end at bp+8 */ uintptr
  8491. _, _, _, _, _ = colon, display, len1, screen, slash
  8492. if !(name != 0) || !(*(*int8)(unsafe.Pointer(name)) != 0) {
  8493. name = libc.Xgetenv(tls, __ccgo_ts+9)
  8494. }
  8495. if !(name != 0) {
  8496. return 0
  8497. }
  8498. /* First check for <path to socket>[.<screen>] */
  8499. if int32(*(*int8)(unsafe.Pointer(name))) == int32('/') {
  8500. return __xcb_parse_display_path_to_socket(tls, name, host, protocol, displayp, screenp)
  8501. }
  8502. if libc.Xstrncmp(tls, name, __ccgo_ts+17, uint64(5)) == 0 {
  8503. return __xcb_parse_display_path_to_socket(tls, name+uintptr(5), host, protocol, displayp, screenp)
  8504. }
  8505. slash = libc.Xstrrchr(tls, name, int32('/'))
  8506. if slash != 0 {
  8507. len1 = int32(int64(slash) - int64(name))
  8508. if protocol != 0 {
  8509. *(*uintptr)(unsafe.Pointer(protocol)) = libc.Xmalloc(tls, libc.Uint64FromInt32(len1+int32(1)))
  8510. if !(*(*uintptr)(unsafe.Pointer(protocol)) != 0) {
  8511. return 0
  8512. }
  8513. libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(protocol)), name, libc.Uint64FromInt32(len1))
  8514. *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(protocol)) + uintptr(len1))) = int8('\000')
  8515. }
  8516. name = slash + uintptr(1)
  8517. } else {
  8518. if protocol != 0 {
  8519. *(*uintptr)(unsafe.Pointer(protocol)) = libc.UintptrFromInt32(0)
  8520. }
  8521. }
  8522. colon = libc.Xstrrchr(tls, name, int32(':'))
  8523. if !(colon != 0) {
  8524. goto error_out
  8525. }
  8526. len1 = int32(int64(colon) - int64(name))
  8527. colon++
  8528. display = libc.Int32FromUint64(libc.Xstrtoul(tls, colon, bp, int32(10)))
  8529. if *(*uintptr)(unsafe.Pointer(bp)) == colon {
  8530. goto error_out
  8531. }
  8532. if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('\000') {
  8533. screen = 0
  8534. } else {
  8535. if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('.') {
  8536. goto error_out
  8537. }
  8538. *(*uintptr)(unsafe.Pointer(bp))++
  8539. screen = libc.Int32FromUint64(libc.Xstrtoul(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+8, int32(10)))
  8540. if *(*uintptr)(unsafe.Pointer(bp + 8)) == *(*uintptr)(unsafe.Pointer(bp)) || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) != int32('\000') {
  8541. goto error_out
  8542. }
  8543. }
  8544. /* At this point, the display string is fully parsed and valid, but
  8545. * the caller's memory is untouched. */
  8546. *(*uintptr)(unsafe.Pointer(host)) = libc.Xmalloc(tls, libc.Uint64FromInt32(len1+int32(1)))
  8547. if !(*(*uintptr)(unsafe.Pointer(host)) != 0) {
  8548. goto error_out
  8549. }
  8550. libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(host)), name, libc.Uint64FromInt32(len1))
  8551. *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(host)) + uintptr(len1))) = int8('\000')
  8552. *(*int32)(unsafe.Pointer(displayp)) = display
  8553. if screenp != 0 {
  8554. *(*int32)(unsafe.Pointer(screenp)) = screen
  8555. }
  8556. return int32(1)
  8557. goto error_out
  8558. error_out:
  8559. ;
  8560. if protocol != 0 {
  8561. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(protocol)))
  8562. *(*uintptr)(unsafe.Pointer(protocol)) = libc.UintptrFromInt32(0)
  8563. }
  8564. return 0
  8565. }
  8566. func Xxcb_parse_display(tls *libc.TLS, name uintptr, host uintptr, displayp uintptr, screenp uintptr) (r int32) {
  8567. return __xcb_parse_display(tls, name, host, libc.UintptrFromInt32(0), displayp, screenp)
  8568. }
  8569. func __xcb_open(tls *libc.TLS, host uintptr, protocol uintptr, display int32) (r int32) {
  8570. bp := tls.Alloc(32)
  8571. defer tls.Free(32)
  8572. var actual_filelen, fd int32
  8573. var base, file uintptr
  8574. var filelen Tsize_t
  8575. var port, port1 uint16
  8576. var v1 uint64
  8577. _, _, _, _, _, _, _, _ = actual_filelen, base, fd, file, filelen, port, port1, v1
  8578. base = uintptr(unsafe.Pointer(&_unix_base))
  8579. file = libc.UintptrFromInt32(0)
  8580. if protocol != 0 && libc.Xstrcmp(tls, __ccgo_ts+4, protocol) == 0 && host != 0 && int32(*(*int8)(unsafe.Pointer(host))) == int32('/') {
  8581. /* Full path to socket provided, ignore everything else */
  8582. filelen = libc.Xstrlen(tls, host) + uint64(1)
  8583. if filelen > uint64(m___INT_MAX1) {
  8584. return -int32(1)
  8585. }
  8586. file = libc.Xmalloc(tls, filelen)
  8587. if file == libc.UintptrFromInt32(0) {
  8588. return -int32(1)
  8589. }
  8590. libc.Xmemcpy(tls, file, host, filelen)
  8591. actual_filelen = libc.Int32FromUint64(filelen - libc.Uint64FromInt32(1))
  8592. } else {
  8593. /* If protocol or host is "unix", fall through to Unix socket code below */
  8594. if (!(protocol != 0) || libc.Xstrcmp(tls, __ccgo_ts+4, protocol) != 0) && int32(*(*int8)(unsafe.Pointer(host))) != int32('\000') && libc.Xstrcmp(tls, __ccgo_ts+4, host) != 0 {
  8595. /* display specifies TCP */
  8596. port = libc.Uint16FromInt32(int32(m_X_TCP_PORT) + display)
  8597. return __xcb_open_tcp(tls, host, protocol, port)
  8598. }
  8599. filelen = libc.Xstrlen(tls, base) + uint64(1) + libc.Uint64FromInt64(4)*libc.Uint64FromInt32(3) + uint64(1)
  8600. file = libc.Xmalloc(tls, filelen)
  8601. if file == libc.UintptrFromInt32(0) {
  8602. return -int32(1)
  8603. }
  8604. /* display specifies Unix socket */
  8605. actual_filelen = libc.X__builtin_snprintf(tls, file, filelen, __ccgo_ts+23, libc.VaList(bp+8, base, display))
  8606. if actual_filelen < 0 {
  8607. libc.Xfree(tls, file)
  8608. return -int32(1)
  8609. }
  8610. /* snprintf may truncate the file */
  8611. if libc.Uint64FromInt32(actual_filelen) < filelen-uint64(1) {
  8612. v1 = libc.Uint64FromInt32(actual_filelen)
  8613. } else {
  8614. v1 = filelen - uint64(1)
  8615. }
  8616. filelen = v1
  8617. }
  8618. fd = __xcb_open_unix(tls, protocol, file)
  8619. libc.Xfree(tls, file)
  8620. if fd < 0 && !(protocol != 0) && int32(*(*int8)(unsafe.Pointer(host))) == int32('\000') {
  8621. port1 = libc.Uint16FromInt32(int32(m_X_TCP_PORT) + display)
  8622. fd = __xcb_open_tcp(tls, host, protocol, port1)
  8623. }
  8624. return fd
  8625. return -int32(1) /* if control reaches here then something has gone wrong */
  8626. }
  8627. var _unix_base = [17]int8{'/', 't', 'm', 'p', '/', '.', 'X', '1', '1', '-', 'u', 'n', 'i', 'x', '/', 'X'}
  8628. func __xcb_socket(tls *libc.TLS, family int32, type1 int32, proto int32) (r int32) {
  8629. bp := tls.Alloc(16)
  8630. defer tls.Free(16)
  8631. var fd int32
  8632. _ = fd
  8633. fd = libc.Xsocket(tls, family, type1|int32(m_SOCK_CLOEXEC1), proto)
  8634. if fd == -int32(1) && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == int32(m_EINVAL) {
  8635. fd = libc.Xsocket(tls, family, type1, proto)
  8636. if fd >= 0 {
  8637. libc.Xfcntl(tls, fd, int32(m_F_SETFD), libc.VaList(bp+8, int32(m_FD_CLOEXEC)))
  8638. }
  8639. }
  8640. return fd
  8641. }
  8642. func __xcb_do_connect(tls *libc.TLS, fd int32, addr uintptr, addrlen int32) (r int32) {
  8643. bp := tls.Alloc(16)
  8644. defer tls.Free(16)
  8645. var _ /* on at bp+0 */ int32
  8646. *(*int32)(unsafe.Pointer(bp)) = int32(1)
  8647. if fd < 0 {
  8648. return -int32(1)
  8649. }
  8650. libc.Xsetsockopt(tls, fd, int32(m_IPPROTO_TCP), int32(m_TCP_NODELAY), bp, uint32(4))
  8651. libc.Xsetsockopt(tls, fd, int32(m_SOL_SOCKET), int32(m_SO_KEEPALIVE1), bp, uint32(4))
  8652. return libc.Xconnect(tls, fd, addr, libc.Uint32FromInt32(addrlen))
  8653. }
  8654. func __xcb_open_tcp(tls *libc.TLS, host uintptr, protocol uintptr, port uint16) (r int32) {
  8655. bp := tls.Alloc(80)
  8656. defer tls.Free(80)
  8657. var addr, bracket, v1 uintptr
  8658. var fd int32
  8659. var v2 bool
  8660. var _ /* hints at bp+0 */ Taddrinfo
  8661. var _ /* results at bp+56 */ uintptr
  8662. var _ /* service at bp+48 */ [6]int8
  8663. _, _, _, _, _ = addr, bracket, fd, v1, v2
  8664. fd = -int32(1)
  8665. if protocol != 0 && libc.Xstrcmp(tls, __ccgo_ts+28, protocol) != 0 && libc.Xstrcmp(tls, __ccgo_ts+32, protocol) != 0 && libc.Xstrcmp(tls, __ccgo_ts+37, protocol) != 0 {
  8666. return -int32(1)
  8667. }
  8668. if int32(*(*int8)(unsafe.Pointer(host))) == int32('\000') {
  8669. host = __ccgo_ts + 43
  8670. }
  8671. libc.Xmemset(tls, bp, 0, uint64(48))
  8672. (*(*Taddrinfo)(unsafe.Pointer(bp))).Fai_flags |= int32(m_AI_NUMERICSERV)
  8673. (*(*Taddrinfo)(unsafe.Pointer(bp))).Fai_family = m_AF_UNSPEC
  8674. (*(*Taddrinfo)(unsafe.Pointer(bp))).Fai_socktype = int32(m_SOCK_STREAM)
  8675. /* Allow IPv6 addresses enclosed in brackets. */
  8676. if v2 = int32(*(*int8)(unsafe.Pointer(host))) == int32('['); v2 {
  8677. v1 = libc.Xstrrchr(tls, host, int32(']'))
  8678. bracket = v1
  8679. }
  8680. if v2 && v1 != 0 && int32(*(*int8)(unsafe.Pointer(bracket + 1))) == int32('\000') {
  8681. *(*int8)(unsafe.Pointer(bracket)) = int8('\000')
  8682. host++
  8683. (*(*Taddrinfo)(unsafe.Pointer(bp))).Fai_flags |= int32(m_AI_NUMERICHOST)
  8684. (*(*Taddrinfo)(unsafe.Pointer(bp))).Fai_family = int32(m_AF_INET6)
  8685. }
  8686. libc.X__builtin_snprintf(tls, bp+48, uint64(6), __ccgo_ts+53, libc.VaList(bp+72, libc.Int32FromUint16(port)))
  8687. if libc.Xgetaddrinfo(tls, host, bp+48, bp, bp+56) != 0 {
  8688. /* FIXME: use gai_strerror, and fill in error connection */
  8689. return -int32(1)
  8690. }
  8691. addr = *(*uintptr)(unsafe.Pointer(bp + 56))
  8692. for {
  8693. if !(addr != 0) {
  8694. break
  8695. }
  8696. fd = __xcb_socket(tls, (*Taddrinfo)(unsafe.Pointer(addr)).Fai_family, (*Taddrinfo)(unsafe.Pointer(addr)).Fai_socktype, (*Taddrinfo)(unsafe.Pointer(addr)).Fai_protocol)
  8697. if __xcb_do_connect(tls, fd, (*Taddrinfo)(unsafe.Pointer(addr)).Fai_addr, libc.Int32FromUint32((*Taddrinfo)(unsafe.Pointer(addr)).Fai_addrlen)) >= 0 {
  8698. break
  8699. }
  8700. libc.Xclose(tls, fd)
  8701. fd = -int32(1)
  8702. goto _3
  8703. _3:
  8704. ;
  8705. addr = (*Taddrinfo)(unsafe.Pointer(addr)).Fai_next
  8706. }
  8707. libc.Xfreeaddrinfo(tls, *(*uintptr)(unsafe.Pointer(bp + 56)))
  8708. return fd
  8709. }
  8710. func __xcb_open_unix(tls *libc.TLS, protocol uintptr, file uintptr) (r int32) {
  8711. bp := tls.Alloc(128)
  8712. defer tls.Free(128)
  8713. var fd int32
  8714. var _ /* addr at bp+0 */ Tsockaddr_un
  8715. var _ /* len at bp+108 */ Tsocklen_t
  8716. var _ /* val at bp+112 */ int32
  8717. _ = fd
  8718. *(*Tsocklen_t)(unsafe.Pointer(bp + 108)) = uint32(4)
  8719. if protocol != 0 && libc.Xstrcmp(tls, __ccgo_ts+4, protocol) != 0 {
  8720. return -int32(1)
  8721. }
  8722. libc.Xstrcpy(tls, bp+2, file)
  8723. (*(*Tsockaddr_un)(unsafe.Pointer(bp))).Fsun_family = uint8(m_AF_UNIX)
  8724. (*(*Tsockaddr_un)(unsafe.Pointer(bp))).Fsun_len = uint8(libc.Uint64FromInt64(106) - libc.Uint64FromInt64(104) + libc.Xstrlen(tls, bp+2))
  8725. fd = __xcb_socket(tls, int32(m_AF_UNIX), int32(m_SOCK_STREAM), 0)
  8726. if fd == -int32(1) {
  8727. return -int32(1)
  8728. }
  8729. if libc.Xgetsockopt(tls, fd, int32(m_SOL_SOCKET), int32(m_SO_SNDBUF1), bp+112, bp+108) == 0 && *(*int32)(unsafe.Pointer(bp + 112)) < libc.Int32FromInt32(64)*libc.Int32FromInt32(1024) {
  8730. *(*int32)(unsafe.Pointer(bp + 112)) = libc.Int32FromInt32(64) * libc.Int32FromInt32(1024)
  8731. libc.Xsetsockopt(tls, fd, int32(m_SOL_SOCKET), int32(m_SO_SNDBUF1), bp+112, uint32(4))
  8732. }
  8733. if libc.Xconnect(tls, fd, bp, uint32(106)) == -int32(1) {
  8734. libc.Xclose(tls, fd)
  8735. return -int32(1)
  8736. }
  8737. return fd
  8738. }
  8739. func Xxcb_connect(tls *libc.TLS, displayname uintptr, screenp uintptr) (r uintptr) {
  8740. return Xxcb_connect_to_display_with_auth_info(tls, displayname, libc.UintptrFromInt32(0), screenp)
  8741. }
  8742. func Xxcb_connect_to_display_with_auth_info(tls *libc.TLS, displayname uintptr, auth uintptr, screenp uintptr) (r uintptr) {
  8743. bp := tls.Alloc(64)
  8744. defer tls.Free(64)
  8745. var c uintptr
  8746. var fd, parsed int32
  8747. var _ /* display at bp+0 */ int32
  8748. var _ /* host at bp+8 */ uintptr
  8749. var _ /* ourauth at bp+24 */ Txcb_auth_info_t
  8750. var _ /* protocol at bp+16 */ uintptr
  8751. _, _, _ = c, fd, parsed
  8752. *(*int32)(unsafe.Pointer(bp)) = 0
  8753. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.UintptrFromInt32(0)
  8754. *(*uintptr)(unsafe.Pointer(bp + 16)) = libc.UintptrFromInt32(0)
  8755. parsed = __xcb_parse_display(tls, displayname, bp+8, bp+16, bp, screenp)
  8756. if !(parsed != 0) {
  8757. c = X_xcb_conn_ret_error(tls, int32(m_XCB_CONN_CLOSED_PARSE_ERR))
  8758. goto out
  8759. }
  8760. fd = __xcb_open(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), *(*uintptr)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp)))
  8761. if fd == -int32(1) {
  8762. c = X_xcb_conn_ret_error(tls, int32(m_XCB_CONN_ERROR))
  8763. goto out
  8764. }
  8765. if auth != 0 {
  8766. c = Xxcb_connect_to_fd(tls, fd, auth)
  8767. } else {
  8768. if X_xcb_get_auth_info(tls, fd, bp+24, *(*int32)(unsafe.Pointer(bp))) != 0 {
  8769. c = Xxcb_connect_to_fd(tls, fd, bp+24)
  8770. libc.Xfree(tls, (*(*Txcb_auth_info_t)(unsafe.Pointer(bp + 24))).Fname)
  8771. libc.Xfree(tls, (*(*Txcb_auth_info_t)(unsafe.Pointer(bp + 24))).Fdata)
  8772. } else {
  8773. c = Xxcb_connect_to_fd(tls, fd, uintptr(0))
  8774. }
  8775. }
  8776. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  8777. goto out
  8778. }
  8779. /* Make sure requested screen number is in bounds for this server */
  8780. if screenp != libc.UintptrFromInt32(0) && *(*int32)(unsafe.Pointer(screenp)) >= libc.Int32FromUint8((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Froots_len) {
  8781. Xxcb_disconnect(tls, c)
  8782. c = X_xcb_conn_ret_error(tls, int32(m_XCB_CONN_CLOSED_INVALID_SCREEN))
  8783. goto out
  8784. }
  8785. goto out
  8786. out:
  8787. ;
  8788. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 8)))
  8789. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
  8790. return c
  8791. }
  8792. const m_ALIGNBYTES = "_ALIGNBYTES"
  8793. const m_AUTH_PROTO_MIT_MAGIC_COOKIE = "MIT-MAGIC-COOKIE-1"
  8794. const m_AUTH_PROTO_XDM_AUTHORIZATION = "XDM-AUTHORIZATION-1"
  8795. const m_BADSIG = "SIG_ERR"
  8796. const m_BKVASIZE = 16384
  8797. const m_BLKDEV_IOSIZE = "PAGE_SIZE"
  8798. const m_BSD = 199506
  8799. const m_BSD4_3 = 1
  8800. const m_BSD4_4 = 1
  8801. const m_BUS_ADRALN = 1
  8802. const m_BUS_ADRERR = 2
  8803. const m_BUS_OBJERR = 3
  8804. const m_BUS_OOMERR = 100
  8805. const m_CACHE_LINE_SHIFT = 6
  8806. const m_CLD_CONTINUED = 6
  8807. const m_CLD_DUMPED = 3
  8808. const m_CLD_EXITED = 1
  8809. const m_CLD_KILLED = 2
  8810. const m_CLD_STOPPED = 5
  8811. const m_CLD_TRAPPED = 4
  8812. const m_CMASK = 022
  8813. const m_DEV_BSHIFT = 9
  8814. const m_FALSE = 0
  8815. const m_FPE_FLTDIV = 3
  8816. const m_FPE_FLTIDO = 9
  8817. const m_FPE_FLTINV = 7
  8818. const m_FPE_FLTOVF = 4
  8819. const m_FPE_FLTRES = 6
  8820. const m_FPE_FLTSUB = 8
  8821. const m_FPE_FLTUND = 5
  8822. const m_FPE_INTDIV = 2
  8823. const m_FPE_INTOVF = 1
  8824. const m_FSHIFT = 11
  8825. const m_FUNCPROTO = 15
  8826. const m_FamilyKrb5Principal = 253
  8827. const m_FamilyLocal = 256
  8828. const m_FamilyLocalHost = 252
  8829. const m_FamilyNetname = 254
  8830. const m_FamilyWild = 65535
  8831. const m_ILL_BADSTK = 8
  8832. const m_ILL_COPROC = 7
  8833. const m_ILL_ILLADR = 3
  8834. const m_ILL_ILLOPC = 1
  8835. const m_ILL_ILLOPN = 2
  8836. const m_ILL_ILLTRP = 4
  8837. const m_ILL_PRVOPC = 5
  8838. const m_ILL_PRVREG = 6
  8839. const m_INITIAL_SOCKNAME_SLACK = 108
  8840. const m_IOPAGES = 2
  8841. const m_KSTACK_GUARD_PAGES = 1
  8842. const m_KSTACK_PAGES = 4
  8843. const m_LOCK_ERROR = 1
  8844. const m_LOCK_SUCCESS = 0
  8845. const m_LOCK_TIMEOUT = 2
  8846. const m_MACHINE = "amd64"
  8847. const m_MACHINE_ARCH = "amd64"
  8848. const m_MACHINE_ARCH32 = "i386"
  8849. const m_MAXBCACHEBUF = "MAXBSIZE"
  8850. const m_MAXBSIZE = 65536
  8851. const m_MAXCOMLEN = 19
  8852. const m_MAXCPU = 1
  8853. const m_MAXHOSTNAMELEN = 256
  8854. const m_MAXINTERP = "PATH_MAX"
  8855. const m_MAXLOGNAME = 33
  8856. const m_MAXMEMDOM = 8
  8857. const m_MAXPAGESIZES = 3
  8858. const m_MAXPATHLEN = "PATH_MAX"
  8859. const m_MAXSYMLINKS = 32
  8860. const m_MAXUPRC = "CHILD_MAX"
  8861. const m_MCLSHIFT = 11
  8862. const m_MINSIGSTKSZ = "__MINSIGSTKSZ"
  8863. const m_MJUMPAGESIZE = "PAGE_SIZE"
  8864. const m_MSIZE = 256
  8865. const m_NBBY = 8
  8866. const m_NCARGS = "ARG_MAX"
  8867. const m_NOFILE = "OPEN_MAX"
  8868. const m_NOGROUP = 65535
  8869. const m_NPDEPGSHIFT = 9
  8870. const m_NPDPEPGSHIFT = 9
  8871. const m_NPML4EPGSHIFT = 9
  8872. const m_NPML5EPGSHIFT = 9
  8873. const m_NPTEPGSHIFT = 9
  8874. const m_NSIG = 32
  8875. const m_NZERO = 0
  8876. const m_NeedFunctionPrototypes = 1
  8877. const m_NeedNestedPrototypes = 1
  8878. const m_NeedVarargsPrototypes = 1
  8879. const m_NeedWidePrototypes = 0
  8880. const m_PAGE_SHIFT = 12
  8881. const m_PCATCH = 0x100
  8882. const m_PDPSHIFT = 30
  8883. const m_PDROP = 0x200
  8884. const m_PDRSHIFT = 21
  8885. const m_PML4SHIFT = 39
  8886. const m_PML5SHIFT = 48
  8887. const m_PNOLOCK = 0x400
  8888. const m_POLL_ERR = 4
  8889. const m_POLL_HUP = 6
  8890. const m_POLL_IN = 1
  8891. const m_POLL_MSG = 3
  8892. const m_POLL_OUT = 2
  8893. const m_POLL_PRI = 5
  8894. const m_PRILASTFLAG = 0x400
  8895. const m_PRIMASK = 0x0ff
  8896. const m_SA_NOCLDSTOP = 0x0008
  8897. const m_SA_NOCLDWAIT = 0x0020
  8898. const m_SA_NODEFER = 0x0010
  8899. const m_SA_ONSTACK = 0x0001
  8900. const m_SA_RESETHAND = 0x0004
  8901. const m_SA_RESTART = 0x0002
  8902. const m_SA_SIGINFO = 0x0040
  8903. const m_SEGV_ACCERR = 2
  8904. const m_SEGV_MAPERR = 1
  8905. const m_SEGV_PKUERR = 100
  8906. const m_SIGABRT = 6
  8907. const m_SIGALRM = 14
  8908. const m_SIGBUS = 10
  8909. const m_SIGCHLD = 20
  8910. const m_SIGCONT = 19
  8911. const m_SIGEMT = 7
  8912. const m_SIGEV_KEVENT = 3
  8913. const m_SIGEV_NONE = 0
  8914. const m_SIGEV_SIGNAL = 1
  8915. const m_SIGEV_THREAD = 2
  8916. const m_SIGEV_THREAD_ID = 4
  8917. const m_SIGFPE = 8
  8918. const m_SIGHUP = 1
  8919. const m_SIGILL = 4
  8920. const m_SIGINFO = 29
  8921. const m_SIGINT = 2
  8922. const m_SIGIO = 23
  8923. const m_SIGIOT = "SIGABRT"
  8924. const m_SIGKILL = 9
  8925. const m_SIGLIBRT = 33
  8926. const m_SIGLWP = "SIGTHR"
  8927. const m_SIGPIPE = 13
  8928. const m_SIGPROF = 27
  8929. const m_SIGQUIT = 3
  8930. const m_SIGRTMAX = 126
  8931. const m_SIGRTMIN = 65
  8932. const m_SIGSEGV = 11
  8933. const m_SIGSTOP = 17
  8934. const m_SIGSYS = 12
  8935. const m_SIGTERM = 15
  8936. const m_SIGTHR = 32
  8937. const m_SIGTRAP = 5
  8938. const m_SIGTSTP = 18
  8939. const m_SIGTTIN = 21
  8940. const m_SIGTTOU = 22
  8941. const m_SIGURG = 16
  8942. const m_SIGUSR1 = 30
  8943. const m_SIGUSR2 = 31
  8944. const m_SIGVTALRM = 26
  8945. const m_SIGWINCH = 28
  8946. const m_SIGXCPU = 24
  8947. const m_SIGXFSZ = 25
  8948. const m_SIG_BLOCK = 1
  8949. const m_SIG_SETMASK = 3
  8950. const m_SIG_UNBLOCK = 2
  8951. const m_SI_ASYNCIO = 0x10004
  8952. const m_SI_KERNEL = 0x10006
  8953. const m_SI_LWP = 0x10007
  8954. const m_SI_MESGQ = 0x10005
  8955. const m_SI_NOINFO = 0
  8956. const m_SI_QUEUE = 0x10002
  8957. const m_SI_TIMER = 0x10003
  8958. const m_SI_UNDEFINED = 0
  8959. const m_SI_USER = 0x10001
  8960. const m_SOCK_CLOEXEC2 = 0x10000000
  8961. const m_SOL_SOCKET1 = 0xffff
  8962. const m_SO_KEEPALIVE2 = 0x00000008
  8963. const m_SO_SNDBUF2 = 0x1001
  8964. const m_SPECNAMELEN = 255
  8965. const m_SS_DISABLE = 0x0004
  8966. const m_SS_ONSTACK = 0x0001
  8967. const m_SV_INTERRUPT = "SA_RESTART"
  8968. const m_SV_NOCLDSTOP = "SA_NOCLDSTOP"
  8969. const m_SV_NODEFER = "SA_NODEFER"
  8970. const m_SV_ONSTACK = "SA_ONSTACK"
  8971. const m_SV_RESETHAND = "SA_RESETHAND"
  8972. const m_SV_SIGINFO = "SA_SIGINFO"
  8973. const m_TRAP_BRKPT = 1
  8974. const m_TRAP_CAP = 4
  8975. const m_TRAP_DTRACE = 3
  8976. const m_TRAP_TRACE = 2
  8977. const m_TRUE = 1
  8978. const m_XDM_DEFAULT_MCAST_ADDR6 = "ff02:0:0:0:0:0:0:12b"
  8979. const m_XDM_KA_RTX_LIMIT = 4
  8980. const m_XDM_MAX_MSGLEN = 8192
  8981. const m_XDM_MAX_RTX = 32
  8982. const m_XDM_MIN_RTX = 2
  8983. const m_XDM_PROTOCOL_VERSION = 1
  8984. const m_XDM_RTX_LIMIT = 7
  8985. const m_XDM_UDP_PORT = 177
  8986. const m_XMD_H = 1
  8987. const m__X86_SIGNAL_H = 1
  8988. const m__X_INLINE = "inline"
  8989. const m__X_RESTRICT_KYWD = "restrict"
  8990. const m__Xconst = "const"
  8991. const m___INT_MAX2 = 0x7fffffff
  8992. const m___SIGQUEUE_RSRV = 0x40000000
  8993. const m___SIGQUEUE_TID = 0x80000000
  8994. const m___stack_t = "sigaltstack"
  8995. const m_sigev_notify_kqueue = "sigev_signo"
  8996. const m_sv_onstack = "sv_flags"
  8997. type TXauth = struct {
  8998. Ffamily uint16
  8999. Faddress_length uint16
  9000. Faddress uintptr
  9001. Fnumber_length uint16
  9002. Fnumber uintptr
  9003. Fname_length uint16
  9004. Fname uintptr
  9005. Fdata_length uint16
  9006. Fdata uintptr
  9007. }
  9008. type Txauth = TXauth
  9009. type Tsigevent = struct {
  9010. Fsigev_notify int32
  9011. Fsigev_signo int32
  9012. Fsigev_value Tsigval
  9013. F_sigev_un struct {
  9014. F_sigev_thread [0]struct {
  9015. F_function uintptr
  9016. F_attribute uintptr
  9017. }
  9018. F_kevent_flags [0]uint16
  9019. F__spare__ [0][8]int64
  9020. F_threadid t__lwpid_t
  9021. F__ccgo_pad4 [60]byte
  9022. }
  9023. }
  9024. type Tsig_atomic_t = int64
  9025. type Tsigcontext = struct {
  9026. Fsc_mask t__sigset
  9027. Fsc_onstack int64
  9028. Fsc_rdi int64
  9029. Fsc_rsi int64
  9030. Fsc_rdx int64
  9031. Fsc_rcx int64
  9032. Fsc_r8 int64
  9033. Fsc_r9 int64
  9034. Fsc_rax int64
  9035. Fsc_rbx int64
  9036. Fsc_rbp int64
  9037. Fsc_r10 int64
  9038. Fsc_r11 int64
  9039. Fsc_r12 int64
  9040. Fsc_r13 int64
  9041. Fsc_r14 int64
  9042. Fsc_r15 int64
  9043. Fsc_trapno int32
  9044. Fsc_fs int16
  9045. Fsc_gs int16
  9046. Fsc_addr int64
  9047. Fsc_flags int32
  9048. Fsc_es int16
  9049. Fsc_ds int16
  9050. Fsc_err int64
  9051. Fsc_rip int64
  9052. Fsc_cs int64
  9053. Fsc_rflags int64
  9054. Fsc_rsp int64
  9055. Fsc_ss int64
  9056. Fsc_len int64
  9057. Fsc_fpformat int64
  9058. Fsc_ownedfp int64
  9059. Fsc_fpstate [64]int64
  9060. Fsc_fsbase int64
  9061. Fsc_gsbase int64
  9062. Fsc_xfpustate int64
  9063. Fsc_xfpustate_len int64
  9064. Fsc_spare [4]int64
  9065. }
  9066. type Tsiginfo_t = struct {
  9067. Fsi_signo int32
  9068. Fsi_errno int32
  9069. Fsi_code int32
  9070. Fsi_pid t__pid_t
  9071. Fsi_uid t__uid_t
  9072. Fsi_status int32
  9073. Fsi_addr uintptr
  9074. Fsi_value Tsigval
  9075. F_reason struct {
  9076. F_timer [0]struct {
  9077. F_timerid int32
  9078. F_overrun int32
  9079. }
  9080. F_mesgq [0]struct {
  9081. F_mqd int32
  9082. }
  9083. F_poll [0]struct {
  9084. F_band int64
  9085. }
  9086. F_capsicum [0]struct {
  9087. F_syscall int32
  9088. }
  9089. F__spare__ [0]struct {
  9090. F__spare1__ int64
  9091. F__spare2__ [7]int32
  9092. }
  9093. F_fault struct {
  9094. F_trapno int32
  9095. }
  9096. F__ccgo_pad6 [36]byte
  9097. }
  9098. }
  9099. type t__siginfo = Tsiginfo_t
  9100. type Tsigaction = struct {
  9101. F__sigaction_u struct {
  9102. F__sa_sigaction [0]uintptr
  9103. F__sa_handler uintptr
  9104. }
  9105. Fsa_flags int32
  9106. Fsa_mask Tsigset_t
  9107. }
  9108. type Tsig_t = uintptr
  9109. type Tstack_t = struct {
  9110. Fss_sp uintptr
  9111. Fss_size t__size_t
  9112. Fss_flags int32
  9113. }
  9114. type Tsigaltstack = Tstack_t
  9115. type Tsigvec = struct {
  9116. Fsv_handler uintptr
  9117. Fsv_mask int32
  9118. Fsv_flags int32
  9119. }
  9120. type Tsigstack = struct {
  9121. Fss_sp uintptr
  9122. Fss_onstack int32
  9123. }
  9124. type TINT64 = int64
  9125. type TINT32 = int32
  9126. type TINT16 = int16
  9127. type TINT8 = int8
  9128. type TCARD64 = uint64
  9129. type TCARD32 = uint32
  9130. type TCARD16 = uint16
  9131. type TCARD8 = uint8
  9132. type TBITS32 = uint32
  9133. type TBITS16 = uint16
  9134. type TBYTE = uint8
  9135. type TBOOL = uint8
  9136. type TxdmOpCode = int32
  9137. const _BROADCAST_QUERY = 1
  9138. const _QUERY = 2
  9139. const _INDIRECT_QUERY = 3
  9140. const _FORWARD_QUERY = 4
  9141. const _WILLING = 5
  9142. const _UNWILLING = 6
  9143. const _REQUEST = 7
  9144. const _ACCEPT = 8
  9145. const _DECLINE = 9
  9146. const _MANAGE = 10
  9147. const _REFUSE = 11
  9148. const _FAILED = 12
  9149. const _KEEPALIVE = 13
  9150. const _ALIVE = 14
  9151. type Txdmcp_states = int32
  9152. const _XDM_QUERY = 0
  9153. const _XDM_BROADCAST = 1
  9154. const _XDM_INDIRECT = 2
  9155. const _XDM_COLLECT_QUERY = 3
  9156. const _XDM_COLLECT_BROADCAST_QUERY = 4
  9157. const _XDM_COLLECT_INDIRECT_QUERY = 5
  9158. const _XDM_START_CONNECTION = 6
  9159. const _XDM_AWAIT_REQUEST_RESPONSE = 7
  9160. const _XDM_AWAIT_MANAGE_RESPONSE = 8
  9161. const _XDM_MANAGE = 9
  9162. const _XDM_RUN_SESSION = 10
  9163. const _XDM_OFF = 11
  9164. const _XDM_AWAIT_USER_INPUT = 12
  9165. const _XDM_KEEPALIVE = 13
  9166. const _XDM_AWAIT_ALIVE_RESPONSE = 14
  9167. const _XDM_KEEP_ME_LAST = 15
  9168. type TCARD8Ptr = uintptr
  9169. type TCARD16Ptr = uintptr
  9170. type TCARD32Ptr = uintptr
  9171. type TARRAY8 = struct {
  9172. Flength TCARD16
  9173. Fdata TCARD8Ptr
  9174. }
  9175. type T_ARRAY8 = TARRAY8
  9176. type TARRAY8Ptr = uintptr
  9177. type TARRAY16 = struct {
  9178. Flength TCARD8
  9179. Fdata TCARD16Ptr
  9180. }
  9181. type T_ARRAY16 = TARRAY16
  9182. type TARRAY16Ptr = uintptr
  9183. type TARRAY32 = struct {
  9184. Flength TCARD8
  9185. Fdata TCARD32Ptr
  9186. }
  9187. type T_ARRAY32 = TARRAY32
  9188. type TARRAY32Ptr = uintptr
  9189. type TARRAYofARRAY8 = struct {
  9190. Flength TCARD8
  9191. Fdata TARRAY8Ptr
  9192. }
  9193. type T_ARRAYofARRAY8 = TARRAYofARRAY8
  9194. type TARRAYofARRAY8Ptr = uintptr
  9195. type TXdmcpHeader = struct {
  9196. Fversion TCARD16
  9197. Fopcode TCARD16
  9198. Flength TCARD16
  9199. }
  9200. type T_XdmcpHeader = TXdmcpHeader
  9201. type TXdmcpHeaderPtr = uintptr
  9202. type TXdmcpBuffer = struct {
  9203. Fdata uintptr
  9204. Fsize int32
  9205. Fpointer int32
  9206. Fcount int32
  9207. }
  9208. type T_XdmcpBuffer = TXdmcpBuffer
  9209. type TXdmcpBufferPtr = uintptr
  9210. type TXdmAuthKeyRec = struct {
  9211. Fdata [8]TBYTE
  9212. }
  9213. type T_XdmAuthKey = TXdmAuthKeyRec
  9214. type TXdmAuthKeyPtr = uintptr
  9215. type TXdmcpNetaddr = uintptr
  9216. type _auth_protos = int32
  9217. const _AUTH_XA1 = 0
  9218. const _AUTH_MC1 = 1
  9219. const _N_AUTH_PROTOS = 2
  9220. var _authnames = [2]uintptr{
  9221. 0: __ccgo_ts + 57,
  9222. 1: __ccgo_ts + 77,
  9223. }
  9224. var _authnameslen = [2]int32{
  9225. 0: libc.Int32FromUint64(libc.Uint64FromInt64(20) - libc.Uint64FromInt32(1)),
  9226. 1: libc.Int32FromUint64(libc.Uint64FromInt64(19) - libc.Uint64FromInt32(1)),
  9227. }
  9228. func _memdup(tls *libc.TLS, dst uintptr, src uintptr, len1 Tsize_t) (r Tsize_t) {
  9229. if len1 != 0 {
  9230. *(*uintptr)(unsafe.Pointer(dst)) = libc.Xmalloc(tls, len1)
  9231. } else {
  9232. *(*uintptr)(unsafe.Pointer(dst)) = uintptr(0)
  9233. }
  9234. if !(*(*uintptr)(unsafe.Pointer(dst)) != 0) {
  9235. return uint64(0)
  9236. }
  9237. libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(dst)), src, len1)
  9238. return len1
  9239. }
  9240. func _authname_match(tls *libc.TLS, kind _auth_protos, name uintptr, namelen Tsize_t) (r int32) {
  9241. if libc.Uint64FromInt32(_authnameslen[kind]) != namelen {
  9242. return 0
  9243. }
  9244. if libc.Xmemcmp(tls, _authnames[kind], name, namelen) != 0 {
  9245. return 0
  9246. }
  9247. return int32(1)
  9248. }
  9249. func _get_authptr(tls *libc.TLS, sockname uintptr, display int32) (r uintptr) {
  9250. bp := tls.Alloc(320)
  9251. defer tls.Free(320)
  9252. var addr uintptr
  9253. var addrlen, dispbuflen int32
  9254. var family uint16
  9255. var v1 uint64
  9256. var _ /* dispbuf at bp+256 */ [40]int8
  9257. var _ /* hostnamebuf at bp+0 */ [256]int8
  9258. _, _, _, _, _ = addr, addrlen, dispbuflen, family, v1
  9259. addr = uintptr(0)
  9260. addrlen = 0
  9261. family = libc.Uint16FromInt32(libc.Int32FromInt32(m_FamilyLocal)) /* 256 */
  9262. switch libc.Int32FromUint8((*Tsockaddr)(unsafe.Pointer(sockname)).Fsa_family) {
  9263. case int32(m_AF_INET6):
  9264. addr = sockname + 8
  9265. addrlen = int32(16)
  9266. if !(*(*Tuint32_t)(unsafe.Pointer(sockname + 8)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(sockname + 8 + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(sockname + 8 + 2*4)) == libc.X__builtin_bswap32(tls, uint32(0x0000ffff))) {
  9267. if !(*(*Tuint32_t)(unsafe.Pointer(sockname + 8)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(sockname + 8 + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(sockname + 8 + 2*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(sockname + 8 + 3*4)) == libc.X__builtin_bswap32(tls, uint32(1))) {
  9268. family = uint16(_XCB_FAMILY_INTERNET_6)
  9269. }
  9270. break
  9271. }
  9272. addr += uintptr(12)
  9273. /* if v4-mapped, fall through. */
  9274. fallthrough
  9275. case int32(m_AF_INET):
  9276. if !(addr != 0) {
  9277. addr = sockname + 4
  9278. }
  9279. addrlen = int32(4)
  9280. if *(*Tin_addr_t)(unsafe.Pointer(addr)) != libc.X__builtin_bswap32(tls, libc.Uint32FromInt32(0x7f000001)) {
  9281. family = uint16(_XCB_FAMILY_INTERNET)
  9282. }
  9283. case int32(m_AF_UNIX):
  9284. default:
  9285. return uintptr(0) /* cannot authenticate this family */
  9286. }
  9287. dispbuflen = libc.X__builtin_snprintf(tls, bp+256, uint64(40), __ccgo_ts+96, libc.VaList(bp+304, display))
  9288. if dispbuflen < 0 {
  9289. return uintptr(0)
  9290. }
  9291. /* snprintf may have truncate our text */
  9292. if libc.Uint64FromInt32(dispbuflen) < libc.Uint64FromInt64(40)-libc.Uint64FromInt32(1) {
  9293. v1 = libc.Uint64FromInt32(dispbuflen)
  9294. } else {
  9295. v1 = libc.Uint64FromInt64(40) - libc.Uint64FromInt32(1)
  9296. }
  9297. dispbuflen = libc.Int32FromUint64(v1)
  9298. if libc.Int32FromUint16(family) == int32(m_FamilyLocal) {
  9299. if libc.Xgethostname(tls, bp, uint64(256)) == -int32(1) {
  9300. return uintptr(0)
  9301. } /* do not know own hostname */
  9302. addr = bp
  9303. addrlen = libc.Int32FromUint64(libc.Xstrlen(tls, addr))
  9304. }
  9305. return libxau.XXauGetBestAuthByAddr(tls, family, libc.Uint16FromInt32(addrlen), addr, libc.Uint16FromInt32(dispbuflen), bp+256, int32(_N_AUTH_PROTOS), uintptr(unsafe.Pointer(&_authnames)), uintptr(unsafe.Pointer(&_authnameslen)))
  9306. }
  9307. func _next_nonce(tls *libc.TLS) (r int32) {
  9308. var ret, v1 int32
  9309. _, _ = ret, v1
  9310. libc.Xpthread_mutex_lock(tls, uintptr(unsafe.Pointer(&_nonce_mutex)))
  9311. v1 = _nonce
  9312. _nonce++
  9313. ret = v1
  9314. libc.Xpthread_mutex_unlock(tls, uintptr(unsafe.Pointer(&_nonce_mutex)))
  9315. return ret
  9316. }
  9317. var _nonce int32
  9318. var _nonce_mutex = libc.UintptrFromInt32(0)
  9319. func _do_append(tls *libc.TLS, buf uintptr, idxp uintptr, val uintptr, valsize Tsize_t) {
  9320. var p1 uintptr
  9321. _ = p1
  9322. libc.Xmemcpy(tls, buf+uintptr(*(*int32)(unsafe.Pointer(idxp))), val, valsize)
  9323. p1 = idxp
  9324. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + valsize)
  9325. }
  9326. func _compute_auth(tls *libc.TLS, info uintptr, authptr uintptr, sockname uintptr) (r int32) {
  9327. bp := tls.Alloc(32)
  9328. defer tls.Free(32)
  9329. var si, si6 uintptr
  9330. var v2 int32
  9331. var _ /* fakeaddr at bp+12 */ Tuint32_t
  9332. var _ /* fakeaddr at bp+4 */ Tuint32_t
  9333. var _ /* fakeport at bp+16 */ Tuint16_t
  9334. var _ /* fakeport at bp+8 */ Tuint16_t
  9335. var _ /* j at bp+0 */ int32
  9336. var _ /* now at bp+20 */ Tuint32_t
  9337. _, _, _ = si, si6, v2
  9338. if _authname_match(tls, int32(_AUTH_MC1), (*TXauth)(unsafe.Pointer(authptr)).Fname, uint64((*TXauth)(unsafe.Pointer(authptr)).Fname_length)) != 0 {
  9339. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdatalen = libc.Int32FromUint64(_memdup(tls, info+24, (*TXauth)(unsafe.Pointer(authptr)).Fdata, uint64((*TXauth)(unsafe.Pointer(authptr)).Fdata_length)))
  9340. if !((*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdatalen != 0) {
  9341. return 0
  9342. }
  9343. return int32(1)
  9344. }
  9345. if _authname_match(tls, int32(_AUTH_XA1), (*TXauth)(unsafe.Pointer(authptr)).Fname, uint64((*TXauth)(unsafe.Pointer(authptr)).Fname_length)) != 0 {
  9346. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata = libc.Xmalloc(tls, libc.Uint64FromInt32(libc.Int32FromInt32(192)/libc.Int32FromInt32(8)))
  9347. if !((*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata != 0) {
  9348. return 0
  9349. }
  9350. *(*int32)(unsafe.Pointer(bp)) = 0
  9351. for {
  9352. if !(*(*int32)(unsafe.Pointer(bp)) < int32(8)) {
  9353. break
  9354. }
  9355. *(*int8)(unsafe.Pointer((*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata + uintptr(*(*int32)(unsafe.Pointer(bp))))) = *(*int8)(unsafe.Pointer((*TXauth)(unsafe.Pointer(authptr)).Fdata + uintptr(*(*int32)(unsafe.Pointer(bp)))))
  9356. goto _1
  9357. _1:
  9358. ;
  9359. *(*int32)(unsafe.Pointer(bp))++
  9360. }
  9361. switch libc.Int32FromUint8((*Tsockaddr)(unsafe.Pointer(sockname)).Fsa_family) {
  9362. case int32(m_AF_INET):
  9363. /*block*/
  9364. si = sockname
  9365. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, si+4, uint64(4))
  9366. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, si+2, uint64(2))
  9367. case int32(m_AF_INET6):
  9368. /*block*/
  9369. si6 = sockname
  9370. if *(*Tuint32_t)(unsafe.Pointer(sockname + 8)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(sockname + 8 + 1*4)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(sockname + 8 + 2*4)) == libc.X__builtin_bswap32(tls, uint32(0x0000ffff)) {
  9371. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, si6+8+12, uint64(4))
  9372. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, si6+2, uint64(2))
  9373. } else {
  9374. /* XDM-AUTHORIZATION-1 does not handle IPv6 correctly. Do the
  9375. same thing Xlib does: use all zeroes for the 4-byte address
  9376. and 2-byte port number. */
  9377. *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uint32(0)
  9378. *(*Tuint16_t)(unsafe.Pointer(bp + 8)) = uint16(0)
  9379. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, bp+4, uint64(4))
  9380. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, bp+8, uint64(2))
  9381. }
  9382. case int32(m_AF_UNIX):
  9383. /*block*/
  9384. *(*Tuint32_t)(unsafe.Pointer(bp + 12)) = libc.X__builtin_bswap32(tls, uint32(0xffffffff)-libc.Uint32FromInt32(_next_nonce(tls)))
  9385. *(*Tuint16_t)(unsafe.Pointer(bp + 16)) = libc.X__builtin_bswap16(tls, libc.Uint16FromInt32(libc.Xgetpid(tls)))
  9386. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, bp+12, uint64(4))
  9387. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, bp+16, uint64(2))
  9388. default:
  9389. libc.Xfree(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata)
  9390. return 0 /* do not know how to build this */
  9391. }
  9392. *(*Tuint32_t)(unsafe.Pointer(bp + 20)) = libc.X__builtin_bswap32(tls, libc.Uint32FromInt64(libc.Xtime(tls, uintptr(0))))
  9393. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, bp+20, uint64(4))
  9394. for *(*int32)(unsafe.Pointer(bp)) < libc.Int32FromInt32(192)/libc.Int32FromInt32(8) {
  9395. v2 = *(*int32)(unsafe.Pointer(bp))
  9396. *(*int32)(unsafe.Pointer(bp))++
  9397. *(*int8)(unsafe.Pointer((*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata + uintptr(v2))) = 0
  9398. }
  9399. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdatalen = *(*int32)(unsafe.Pointer(bp))
  9400. libxdmcp.XXdmcpWrap(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, (*TXauth)(unsafe.Pointer(authptr)).Fdata+uintptr(8), (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdatalen)
  9401. return int32(1)
  9402. }
  9403. return 0 /* Unknown authorization type */
  9404. }
  9405. /* `sockaddr_un.sun_path' typical size usually ranges between 92 and 108 */
  9406. // C documentation
  9407. //
  9408. // /* Return a dynamically allocated socket address structure according
  9409. // to the value returned by either getpeername() or getsockname()
  9410. // (according to POSIX, applications should not assume a particular
  9411. // length for `sockaddr_un.sun_path') */
  9412. func _get_peer_sock_name(tls *libc.TLS, socket_func uintptr, fd int32) (r uintptr) {
  9413. bp := tls.Alloc(16)
  9414. defer tls.Free(16)
  9415. var new_sockname, sockname, v1 uintptr
  9416. var socknamelen Tsocklen_t
  9417. var _ /* actual_socknamelen at bp+0 */ Tsocklen_t
  9418. _, _, _, _ = new_sockname, sockname, socknamelen, v1
  9419. socknamelen = uint32(libc.Uint64FromInt64(16) + libc.Uint64FromInt32(m_INITIAL_SOCKNAME_SLACK))
  9420. *(*Tsocklen_t)(unsafe.Pointer(bp)) = socknamelen
  9421. sockname = libc.Xmalloc(tls, uint64(socknamelen))
  9422. if sockname == libc.UintptrFromInt32(0) {
  9423. return libc.UintptrFromInt32(0)
  9424. }
  9425. /* Both getpeername() and getsockname() truncates sockname if
  9426. there is not enough space and set the required length in
  9427. actual_socknamelen */
  9428. if (*(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{socket_func})))(tls, fd, sockname, bp) == -int32(1) {
  9429. goto sock_or_realloc_error
  9430. }
  9431. if *(*Tsocklen_t)(unsafe.Pointer(bp)) > socknamelen {
  9432. new_sockname = libc.UintptrFromInt32(0)
  9433. socknamelen = *(*Tsocklen_t)(unsafe.Pointer(bp))
  9434. v1 = libc.Xrealloc(tls, sockname, uint64(*(*Tsocklen_t)(unsafe.Pointer(bp))))
  9435. new_sockname = v1
  9436. if v1 == libc.UintptrFromInt32(0) {
  9437. goto sock_or_realloc_error
  9438. }
  9439. sockname = new_sockname
  9440. if (*(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{socket_func})))(tls, fd, sockname, bp) == -int32(1) || *(*Tsocklen_t)(unsafe.Pointer(bp)) > socknamelen {
  9441. goto sock_or_realloc_error
  9442. }
  9443. }
  9444. return sockname
  9445. goto sock_or_realloc_error
  9446. sock_or_realloc_error:
  9447. ;
  9448. libc.Xfree(tls, sockname)
  9449. return libc.UintptrFromInt32(0)
  9450. }
  9451. func X_xcb_get_auth_info(tls *libc.TLS, fd int32, info uintptr, display int32) (r int32) {
  9452. var authptr, sockname, v1, v2, v3 uintptr
  9453. var gotsockname, ret int32
  9454. _, _, _, _, _, _, _ = authptr, gotsockname, ret, sockname, v1, v2, v3
  9455. /* code adapted from Xlib/ConnDis.c, xtrans/Xtranssocket.c,
  9456. xtrans/Xtransutils.c */
  9457. sockname = libc.UintptrFromInt32(0)
  9458. gotsockname = 0
  9459. authptr = uintptr(0)
  9460. ret = int32(1)
  9461. /* Some systems like hpux or Hurd do not expose peer names
  9462. * for UNIX Domain Sockets, but this is irrelevant,
  9463. * since compute_auth() ignores the peer name in this
  9464. * case anyway.*/
  9465. v1 = _get_peer_sock_name(tls, __ccgo_fp(libc.Xgetpeername), fd)
  9466. sockname = v1
  9467. if v1 == libc.UintptrFromInt32(0) {
  9468. v2 = _get_peer_sock_name(tls, __ccgo_fp(libc.Xgetsockname), fd)
  9469. sockname = v2
  9470. if v2 == libc.UintptrFromInt32(0) {
  9471. return 0
  9472. } /* can only authenticate sockets */
  9473. if libc.Int32FromUint8((*Tsockaddr)(unsafe.Pointer(sockname)).Fsa_family) != int32(m_AF_UNIX) {
  9474. libc.Xfree(tls, sockname)
  9475. return 0 /* except for AF_UNIX, sockets should have peernames */
  9476. }
  9477. gotsockname = int32(1)
  9478. }
  9479. authptr = _get_authptr(tls, sockname, display)
  9480. if authptr == uintptr(0) {
  9481. libc.Xfree(tls, sockname)
  9482. return 0 /* cannot find good auth data */
  9483. }
  9484. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fnamelen = libc.Int32FromUint64(_memdup(tls, info+8, (*TXauth)(unsafe.Pointer(authptr)).Fname, uint64((*TXauth)(unsafe.Pointer(authptr)).Fname_length)))
  9485. if !((*Txcb_auth_info_t)(unsafe.Pointer(info)).Fnamelen != 0) {
  9486. goto no_auth
  9487. } /* out of memory */
  9488. if !(gotsockname != 0) {
  9489. libc.Xfree(tls, sockname)
  9490. v3 = _get_peer_sock_name(tls, __ccgo_fp(libc.Xgetsockname), fd)
  9491. sockname = v3
  9492. if v3 == libc.UintptrFromInt32(0) {
  9493. libc.Xfree(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fname)
  9494. goto no_auth /* can only authenticate sockets */
  9495. }
  9496. }
  9497. ret = _compute_auth(tls, info, authptr, sockname)
  9498. if !(ret != 0) {
  9499. libc.Xfree(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fname)
  9500. goto no_auth /* cannot build auth record */
  9501. }
  9502. libc.Xfree(tls, sockname)
  9503. sockname = libc.UintptrFromInt32(0)
  9504. libxau.XXauDisposeAuth(tls, authptr)
  9505. return ret
  9506. goto no_auth
  9507. no_auth:
  9508. ;
  9509. libc.Xfree(tls, sockname)
  9510. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fname = uintptr(0)
  9511. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fnamelen = 0
  9512. libxau.XXauDisposeAuth(tls, authptr)
  9513. return 0
  9514. }
  9515. /*
  9516. * This file generated automatically from xproto.xml by c_client.py.
  9517. * Edit at your peril.
  9518. */
  9519. /**
  9520. * @defgroup XCB__API XCB API
  9521. * @brief XCB Protocol Implementation.
  9522. * @{
  9523. **/
  9524. /**
  9525. * @}
  9526. */
  9527. func Xxcb_char2b_next(tls *libc.TLS, i uintptr) {
  9528. var p1 uintptr
  9529. _ = p1
  9530. (*Txcb_char2b_iterator_t)(unsafe.Pointer(i)).Frem--
  9531. (*Txcb_char2b_iterator_t)(unsafe.Pointer(i)).Fdata += 2
  9532. p1 = i + 12
  9533. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(2))
  9534. }
  9535. func Xxcb_char2b_end(tls *libc.TLS, i Txcb_char2b_iterator_t) (r Txcb_generic_iterator_t) {
  9536. var ret Txcb_generic_iterator_t
  9537. _ = ret
  9538. ret.Fdata = i.Fdata + uintptr(i.Frem)*2
  9539. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9540. ret.Frem = 0
  9541. return ret
  9542. }
  9543. func Xxcb_window_next(tls *libc.TLS, i uintptr) {
  9544. var p1 uintptr
  9545. _ = p1
  9546. (*Txcb_window_iterator_t)(unsafe.Pointer(i)).Frem--
  9547. (*Txcb_window_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9548. p1 = i + 12
  9549. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9550. }
  9551. func Xxcb_window_end(tls *libc.TLS, i Txcb_window_iterator_t) (r Txcb_generic_iterator_t) {
  9552. var ret Txcb_generic_iterator_t
  9553. _ = ret
  9554. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9555. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9556. ret.Frem = 0
  9557. return ret
  9558. }
  9559. func Xxcb_pixmap_next(tls *libc.TLS, i uintptr) {
  9560. var p1 uintptr
  9561. _ = p1
  9562. (*Txcb_pixmap_iterator_t)(unsafe.Pointer(i)).Frem--
  9563. (*Txcb_pixmap_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9564. p1 = i + 12
  9565. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9566. }
  9567. func Xxcb_pixmap_end(tls *libc.TLS, i Txcb_pixmap_iterator_t) (r Txcb_generic_iterator_t) {
  9568. var ret Txcb_generic_iterator_t
  9569. _ = ret
  9570. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9571. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9572. ret.Frem = 0
  9573. return ret
  9574. }
  9575. func Xxcb_cursor_next(tls *libc.TLS, i uintptr) {
  9576. var p1 uintptr
  9577. _ = p1
  9578. (*Txcb_cursor_iterator_t)(unsafe.Pointer(i)).Frem--
  9579. (*Txcb_cursor_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9580. p1 = i + 12
  9581. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9582. }
  9583. func Xxcb_cursor_end(tls *libc.TLS, i Txcb_cursor_iterator_t) (r Txcb_generic_iterator_t) {
  9584. var ret Txcb_generic_iterator_t
  9585. _ = ret
  9586. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9587. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9588. ret.Frem = 0
  9589. return ret
  9590. }
  9591. func Xxcb_font_next(tls *libc.TLS, i uintptr) {
  9592. var p1 uintptr
  9593. _ = p1
  9594. (*Txcb_font_iterator_t)(unsafe.Pointer(i)).Frem--
  9595. (*Txcb_font_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9596. p1 = i + 12
  9597. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9598. }
  9599. func Xxcb_font_end(tls *libc.TLS, i Txcb_font_iterator_t) (r Txcb_generic_iterator_t) {
  9600. var ret Txcb_generic_iterator_t
  9601. _ = ret
  9602. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9603. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9604. ret.Frem = 0
  9605. return ret
  9606. }
  9607. func Xxcb_gcontext_next(tls *libc.TLS, i uintptr) {
  9608. var p1 uintptr
  9609. _ = p1
  9610. (*Txcb_gcontext_iterator_t)(unsafe.Pointer(i)).Frem--
  9611. (*Txcb_gcontext_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9612. p1 = i + 12
  9613. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9614. }
  9615. func Xxcb_gcontext_end(tls *libc.TLS, i Txcb_gcontext_iterator_t) (r Txcb_generic_iterator_t) {
  9616. var ret Txcb_generic_iterator_t
  9617. _ = ret
  9618. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9619. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9620. ret.Frem = 0
  9621. return ret
  9622. }
  9623. func Xxcb_colormap_next(tls *libc.TLS, i uintptr) {
  9624. var p1 uintptr
  9625. _ = p1
  9626. (*Txcb_colormap_iterator_t)(unsafe.Pointer(i)).Frem--
  9627. (*Txcb_colormap_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9628. p1 = i + 12
  9629. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9630. }
  9631. func Xxcb_colormap_end(tls *libc.TLS, i Txcb_colormap_iterator_t) (r Txcb_generic_iterator_t) {
  9632. var ret Txcb_generic_iterator_t
  9633. _ = ret
  9634. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9635. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9636. ret.Frem = 0
  9637. return ret
  9638. }
  9639. func Xxcb_atom_next(tls *libc.TLS, i uintptr) {
  9640. var p1 uintptr
  9641. _ = p1
  9642. (*Txcb_atom_iterator_t)(unsafe.Pointer(i)).Frem--
  9643. (*Txcb_atom_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9644. p1 = i + 12
  9645. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9646. }
  9647. func Xxcb_atom_end(tls *libc.TLS, i Txcb_atom_iterator_t) (r Txcb_generic_iterator_t) {
  9648. var ret Txcb_generic_iterator_t
  9649. _ = ret
  9650. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9651. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9652. ret.Frem = 0
  9653. return ret
  9654. }
  9655. func Xxcb_drawable_next(tls *libc.TLS, i uintptr) {
  9656. var p1 uintptr
  9657. _ = p1
  9658. (*Txcb_drawable_iterator_t)(unsafe.Pointer(i)).Frem--
  9659. (*Txcb_drawable_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9660. p1 = i + 12
  9661. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9662. }
  9663. func Xxcb_drawable_end(tls *libc.TLS, i Txcb_drawable_iterator_t) (r Txcb_generic_iterator_t) {
  9664. var ret Txcb_generic_iterator_t
  9665. _ = ret
  9666. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9667. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9668. ret.Frem = 0
  9669. return ret
  9670. }
  9671. func Xxcb_fontable_next(tls *libc.TLS, i uintptr) {
  9672. var p1 uintptr
  9673. _ = p1
  9674. (*Txcb_fontable_iterator_t)(unsafe.Pointer(i)).Frem--
  9675. (*Txcb_fontable_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9676. p1 = i + 12
  9677. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9678. }
  9679. func Xxcb_fontable_end(tls *libc.TLS, i Txcb_fontable_iterator_t) (r Txcb_generic_iterator_t) {
  9680. var ret Txcb_generic_iterator_t
  9681. _ = ret
  9682. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9683. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9684. ret.Frem = 0
  9685. return ret
  9686. }
  9687. func Xxcb_bool32_next(tls *libc.TLS, i uintptr) {
  9688. var p1 uintptr
  9689. _ = p1
  9690. (*Txcb_bool32_iterator_t)(unsafe.Pointer(i)).Frem--
  9691. (*Txcb_bool32_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9692. p1 = i + 12
  9693. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9694. }
  9695. func Xxcb_bool32_end(tls *libc.TLS, i Txcb_bool32_iterator_t) (r Txcb_generic_iterator_t) {
  9696. var ret Txcb_generic_iterator_t
  9697. _ = ret
  9698. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9699. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9700. ret.Frem = 0
  9701. return ret
  9702. }
  9703. func Xxcb_visualid_next(tls *libc.TLS, i uintptr) {
  9704. var p1 uintptr
  9705. _ = p1
  9706. (*Txcb_visualid_iterator_t)(unsafe.Pointer(i)).Frem--
  9707. (*Txcb_visualid_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9708. p1 = i + 12
  9709. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9710. }
  9711. func Xxcb_visualid_end(tls *libc.TLS, i Txcb_visualid_iterator_t) (r Txcb_generic_iterator_t) {
  9712. var ret Txcb_generic_iterator_t
  9713. _ = ret
  9714. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9715. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9716. ret.Frem = 0
  9717. return ret
  9718. }
  9719. func Xxcb_timestamp_next(tls *libc.TLS, i uintptr) {
  9720. var p1 uintptr
  9721. _ = p1
  9722. (*Txcb_timestamp_iterator_t)(unsafe.Pointer(i)).Frem--
  9723. (*Txcb_timestamp_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9724. p1 = i + 12
  9725. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9726. }
  9727. func Xxcb_timestamp_end(tls *libc.TLS, i Txcb_timestamp_iterator_t) (r Txcb_generic_iterator_t) {
  9728. var ret Txcb_generic_iterator_t
  9729. _ = ret
  9730. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9731. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9732. ret.Frem = 0
  9733. return ret
  9734. }
  9735. func Xxcb_keysym_next(tls *libc.TLS, i uintptr) {
  9736. var p1 uintptr
  9737. _ = p1
  9738. (*Txcb_keysym_iterator_t)(unsafe.Pointer(i)).Frem--
  9739. (*Txcb_keysym_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9740. p1 = i + 12
  9741. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9742. }
  9743. func Xxcb_keysym_end(tls *libc.TLS, i Txcb_keysym_iterator_t) (r Txcb_generic_iterator_t) {
  9744. var ret Txcb_generic_iterator_t
  9745. _ = ret
  9746. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9747. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9748. ret.Frem = 0
  9749. return ret
  9750. }
  9751. func Xxcb_keycode_next(tls *libc.TLS, i uintptr) {
  9752. var p1 uintptr
  9753. _ = p1
  9754. (*Txcb_keycode_iterator_t)(unsafe.Pointer(i)).Frem--
  9755. (*Txcb_keycode_iterator_t)(unsafe.Pointer(i)).Fdata++
  9756. p1 = i + 12
  9757. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(1))
  9758. }
  9759. func Xxcb_keycode_end(tls *libc.TLS, i Txcb_keycode_iterator_t) (r Txcb_generic_iterator_t) {
  9760. var ret Txcb_generic_iterator_t
  9761. _ = ret
  9762. ret.Fdata = i.Fdata + uintptr(i.Frem)
  9763. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9764. ret.Frem = 0
  9765. return ret
  9766. }
  9767. func Xxcb_keycode32_next(tls *libc.TLS, i uintptr) {
  9768. var p1 uintptr
  9769. _ = p1
  9770. (*Txcb_keycode32_iterator_t)(unsafe.Pointer(i)).Frem--
  9771. (*Txcb_keycode32_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9772. p1 = i + 12
  9773. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9774. }
  9775. func Xxcb_keycode32_end(tls *libc.TLS, i Txcb_keycode32_iterator_t) (r Txcb_generic_iterator_t) {
  9776. var ret Txcb_generic_iterator_t
  9777. _ = ret
  9778. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9779. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9780. ret.Frem = 0
  9781. return ret
  9782. }
  9783. func Xxcb_button_next(tls *libc.TLS, i uintptr) {
  9784. var p1 uintptr
  9785. _ = p1
  9786. (*Txcb_button_iterator_t)(unsafe.Pointer(i)).Frem--
  9787. (*Txcb_button_iterator_t)(unsafe.Pointer(i)).Fdata++
  9788. p1 = i + 12
  9789. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(1))
  9790. }
  9791. func Xxcb_button_end(tls *libc.TLS, i Txcb_button_iterator_t) (r Txcb_generic_iterator_t) {
  9792. var ret Txcb_generic_iterator_t
  9793. _ = ret
  9794. ret.Fdata = i.Fdata + uintptr(i.Frem)
  9795. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9796. ret.Frem = 0
  9797. return ret
  9798. }
  9799. func Xxcb_point_next(tls *libc.TLS, i uintptr) {
  9800. var p1 uintptr
  9801. _ = p1
  9802. (*Txcb_point_iterator_t)(unsafe.Pointer(i)).Frem--
  9803. (*Txcb_point_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  9804. p1 = i + 12
  9805. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(4))
  9806. }
  9807. func Xxcb_point_end(tls *libc.TLS, i Txcb_point_iterator_t) (r Txcb_generic_iterator_t) {
  9808. var ret Txcb_generic_iterator_t
  9809. _ = ret
  9810. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  9811. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9812. ret.Frem = 0
  9813. return ret
  9814. }
  9815. func Xxcb_rectangle_next(tls *libc.TLS, i uintptr) {
  9816. var p1 uintptr
  9817. _ = p1
  9818. (*Txcb_rectangle_iterator_t)(unsafe.Pointer(i)).Frem--
  9819. (*Txcb_rectangle_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  9820. p1 = i + 12
  9821. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(8))
  9822. }
  9823. func Xxcb_rectangle_end(tls *libc.TLS, i Txcb_rectangle_iterator_t) (r Txcb_generic_iterator_t) {
  9824. var ret Txcb_generic_iterator_t
  9825. _ = ret
  9826. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  9827. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9828. ret.Frem = 0
  9829. return ret
  9830. }
  9831. func Xxcb_arc_next(tls *libc.TLS, i uintptr) {
  9832. var p1 uintptr
  9833. _ = p1
  9834. (*Txcb_arc_iterator_t)(unsafe.Pointer(i)).Frem--
  9835. (*Txcb_arc_iterator_t)(unsafe.Pointer(i)).Fdata += 12
  9836. p1 = i + 12
  9837. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(12))
  9838. }
  9839. func Xxcb_arc_end(tls *libc.TLS, i Txcb_arc_iterator_t) (r Txcb_generic_iterator_t) {
  9840. var ret Txcb_generic_iterator_t
  9841. _ = ret
  9842. ret.Fdata = i.Fdata + uintptr(i.Frem)*12
  9843. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9844. ret.Frem = 0
  9845. return ret
  9846. }
  9847. func Xxcb_format_next(tls *libc.TLS, i uintptr) {
  9848. var p1 uintptr
  9849. _ = p1
  9850. (*Txcb_format_iterator_t)(unsafe.Pointer(i)).Frem--
  9851. (*Txcb_format_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  9852. p1 = i + 12
  9853. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(8))
  9854. }
  9855. func Xxcb_format_end(tls *libc.TLS, i Txcb_format_iterator_t) (r Txcb_generic_iterator_t) {
  9856. var ret Txcb_generic_iterator_t
  9857. _ = ret
  9858. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  9859. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9860. ret.Frem = 0
  9861. return ret
  9862. }
  9863. func Xxcb_visualtype_next(tls *libc.TLS, i uintptr) {
  9864. var p1 uintptr
  9865. _ = p1
  9866. (*Txcb_visualtype_iterator_t)(unsafe.Pointer(i)).Frem--
  9867. (*Txcb_visualtype_iterator_t)(unsafe.Pointer(i)).Fdata += 24
  9868. p1 = i + 12
  9869. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(24))
  9870. }
  9871. func Xxcb_visualtype_end(tls *libc.TLS, i Txcb_visualtype_iterator_t) (r Txcb_generic_iterator_t) {
  9872. var ret Txcb_generic_iterator_t
  9873. _ = ret
  9874. ret.Fdata = i.Fdata + uintptr(i.Frem)*24
  9875. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  9876. ret.Frem = 0
  9877. return ret
  9878. }
  9879. func Xxcb_depth_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  9880. var _aux, xcb_tmp uintptr
  9881. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  9882. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  9883. xcb_tmp = _buffer
  9884. _aux = _buffer
  9885. xcb_buffer_len = uint32(0)
  9886. xcb_block_len = uint32(0)
  9887. xcb_pad = uint32(0)
  9888. xcb_align_to = uint32(0)
  9889. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  9890. xcb_tmp += uintptr(xcb_block_len)
  9891. xcb_buffer_len += xcb_block_len
  9892. xcb_block_len = uint32(0)
  9893. /* visuals */
  9894. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_depth_t)(unsafe.Pointer(_aux)).Fvisuals_len)*libc.Uint64FromInt64(24))
  9895. xcb_tmp += uintptr(xcb_block_len)
  9896. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  9897. /* insert padding */
  9898. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9899. xcb_buffer_len += xcb_block_len + xcb_pad
  9900. if uint32(0) != xcb_pad {
  9901. xcb_tmp += uintptr(xcb_pad)
  9902. xcb_pad = uint32(0)
  9903. }
  9904. xcb_block_len = uint32(0)
  9905. return libc.Int32FromUint32(xcb_buffer_len)
  9906. }
  9907. func Xxcb_depth_visuals(tls *libc.TLS, R uintptr) (r uintptr) {
  9908. return R + libc.UintptrFromInt32(1)*8
  9909. }
  9910. func Xxcb_depth_visuals_length(tls *libc.TLS, R uintptr) (r int32) {
  9911. return libc.Int32FromUint16((*Txcb_depth_t)(unsafe.Pointer(R)).Fvisuals_len)
  9912. }
  9913. func Xxcb_depth_visuals_iterator(tls *libc.TLS, R uintptr) (r Txcb_visualtype_iterator_t) {
  9914. var i Txcb_visualtype_iterator_t
  9915. _ = i
  9916. i.Fdata = R + libc.UintptrFromInt32(1)*8
  9917. i.Frem = libc.Int32FromUint16((*Txcb_depth_t)(unsafe.Pointer(R)).Fvisuals_len)
  9918. i.Findex = int32(int64(i.Fdata) - int64(R))
  9919. return i
  9920. }
  9921. func Xxcb_depth_next(tls *libc.TLS, i uintptr) {
  9922. var R uintptr
  9923. var child Txcb_generic_iterator_t
  9924. _, _ = R, child
  9925. R = (*Txcb_depth_iterator_t)(unsafe.Pointer(i)).Fdata
  9926. child.Fdata = R + uintptr(Xxcb_depth_sizeof(tls, R))
  9927. (*Txcb_depth_iterator_t)(unsafe.Pointer(i)).Findex = int32(int64(child.Fdata) - int64((*Txcb_depth_iterator_t)(unsafe.Pointer(i)).Fdata))
  9928. (*Txcb_depth_iterator_t)(unsafe.Pointer(i)).Frem--
  9929. (*Txcb_depth_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  9930. }
  9931. func Xxcb_depth_end(tls *libc.TLS, _i Txcb_depth_iterator_t) (r Txcb_generic_iterator_t) {
  9932. bp := tls.Alloc(16)
  9933. defer tls.Free(16)
  9934. *(*Txcb_depth_iterator_t)(unsafe.Pointer(bp)) = _i
  9935. var ret Txcb_generic_iterator_t
  9936. _ = ret
  9937. for (*(*Txcb_depth_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  9938. Xxcb_depth_next(tls, bp)
  9939. }
  9940. ret.Fdata = (*(*Txcb_depth_iterator_t)(unsafe.Pointer(bp))).Fdata
  9941. ret.Frem = (*(*Txcb_depth_iterator_t)(unsafe.Pointer(bp))).Frem
  9942. ret.Findex = (*(*Txcb_depth_iterator_t)(unsafe.Pointer(bp))).Findex
  9943. return ret
  9944. }
  9945. func Xxcb_screen_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  9946. var _aux, xcb_tmp uintptr
  9947. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  9948. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  9949. xcb_tmp = _buffer
  9950. _aux = _buffer
  9951. xcb_buffer_len = uint32(0)
  9952. xcb_block_len = uint32(0)
  9953. xcb_pad = uint32(0)
  9954. xcb_align_to = uint32(0)
  9955. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(40))
  9956. xcb_tmp += uintptr(xcb_block_len)
  9957. xcb_buffer_len += xcb_block_len
  9958. xcb_block_len = uint32(0)
  9959. /* allowed_depths */
  9960. i = uint32(0)
  9961. for {
  9962. if !(i < uint32((*Txcb_screen_t)(unsafe.Pointer(_aux)).Fallowed_depths_len)) {
  9963. break
  9964. }
  9965. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_depth_sizeof(tls, xcb_tmp))
  9966. xcb_block_len += xcb_tmp_len
  9967. xcb_tmp += uintptr(xcb_tmp_len)
  9968. goto _1
  9969. _1:
  9970. ;
  9971. i++
  9972. }
  9973. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  9974. /* insert padding */
  9975. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9976. xcb_buffer_len += xcb_block_len + xcb_pad
  9977. if uint32(0) != xcb_pad {
  9978. xcb_tmp += uintptr(xcb_pad)
  9979. xcb_pad = uint32(0)
  9980. }
  9981. xcb_block_len = uint32(0)
  9982. return libc.Int32FromUint32(xcb_buffer_len)
  9983. }
  9984. func Xxcb_screen_allowed_depths_length(tls *libc.TLS, R uintptr) (r int32) {
  9985. return libc.Int32FromUint8((*Txcb_screen_t)(unsafe.Pointer(R)).Fallowed_depths_len)
  9986. }
  9987. func Xxcb_screen_allowed_depths_iterator(tls *libc.TLS, R uintptr) (r Txcb_depth_iterator_t) {
  9988. var i Txcb_depth_iterator_t
  9989. _ = i
  9990. i.Fdata = R + libc.UintptrFromInt32(1)*40
  9991. i.Frem = libc.Int32FromUint8((*Txcb_screen_t)(unsafe.Pointer(R)).Fallowed_depths_len)
  9992. i.Findex = int32(int64(i.Fdata) - int64(R))
  9993. return i
  9994. }
  9995. func Xxcb_screen_next(tls *libc.TLS, i uintptr) {
  9996. var R uintptr
  9997. var child Txcb_generic_iterator_t
  9998. _, _ = R, child
  9999. R = (*Txcb_screen_iterator_t)(unsafe.Pointer(i)).Fdata
  10000. child.Fdata = R + uintptr(Xxcb_screen_sizeof(tls, R))
  10001. (*Txcb_screen_iterator_t)(unsafe.Pointer(i)).Findex = int32(int64(child.Fdata) - int64((*Txcb_screen_iterator_t)(unsafe.Pointer(i)).Fdata))
  10002. (*Txcb_screen_iterator_t)(unsafe.Pointer(i)).Frem--
  10003. (*Txcb_screen_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  10004. }
  10005. func Xxcb_screen_end(tls *libc.TLS, _i Txcb_screen_iterator_t) (r Txcb_generic_iterator_t) {
  10006. bp := tls.Alloc(16)
  10007. defer tls.Free(16)
  10008. *(*Txcb_screen_iterator_t)(unsafe.Pointer(bp)) = _i
  10009. var ret Txcb_generic_iterator_t
  10010. _ = ret
  10011. for (*(*Txcb_screen_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  10012. Xxcb_screen_next(tls, bp)
  10013. }
  10014. ret.Fdata = (*(*Txcb_screen_iterator_t)(unsafe.Pointer(bp))).Fdata
  10015. ret.Frem = (*(*Txcb_screen_iterator_t)(unsafe.Pointer(bp))).Frem
  10016. ret.Findex = (*(*Txcb_screen_iterator_t)(unsafe.Pointer(bp))).Findex
  10017. return ret
  10018. }
  10019. func Xxcb_setup_request_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  10020. var _aux, xcb_tmp uintptr
  10021. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  10022. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  10023. xcb_tmp = _buffer
  10024. _aux = _buffer
  10025. xcb_buffer_len = uint32(0)
  10026. xcb_block_len = uint32(0)
  10027. xcb_pad = uint32(0)
  10028. xcb_align_to = uint32(0)
  10029. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  10030. xcb_tmp += uintptr(xcb_block_len)
  10031. xcb_buffer_len += xcb_block_len
  10032. xcb_block_len = uint32(0)
  10033. /* authorization_protocol_name */
  10034. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_setup_request_t)(unsafe.Pointer(_aux)).Fauthorization_protocol_name_len)*libc.Uint64FromInt64(1))
  10035. xcb_tmp += uintptr(xcb_block_len)
  10036. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  10037. xcb_align_to = uint32(4)
  10038. /* insert padding */
  10039. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10040. xcb_buffer_len += xcb_block_len + xcb_pad
  10041. if uint32(0) != xcb_pad {
  10042. xcb_tmp += uintptr(xcb_pad)
  10043. xcb_pad = uint32(0)
  10044. }
  10045. xcb_block_len = uint32(0)
  10046. /* insert padding */
  10047. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10048. xcb_buffer_len += xcb_block_len + xcb_pad
  10049. if uint32(0) != xcb_pad {
  10050. xcb_tmp += uintptr(xcb_pad)
  10051. xcb_pad = uint32(0)
  10052. }
  10053. xcb_block_len = uint32(0)
  10054. /* authorization_protocol_data */
  10055. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_setup_request_t)(unsafe.Pointer(_aux)).Fauthorization_protocol_data_len)*libc.Uint64FromInt64(1))
  10056. xcb_tmp += uintptr(xcb_block_len)
  10057. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  10058. xcb_align_to = uint32(4)
  10059. /* insert padding */
  10060. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10061. xcb_buffer_len += xcb_block_len + xcb_pad
  10062. if uint32(0) != xcb_pad {
  10063. xcb_tmp += uintptr(xcb_pad)
  10064. xcb_pad = uint32(0)
  10065. }
  10066. xcb_block_len = uint32(0)
  10067. /* insert padding */
  10068. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10069. xcb_buffer_len += xcb_block_len + xcb_pad
  10070. if uint32(0) != xcb_pad {
  10071. xcb_tmp += uintptr(xcb_pad)
  10072. xcb_pad = uint32(0)
  10073. }
  10074. xcb_block_len = uint32(0)
  10075. return libc.Int32FromUint32(xcb_buffer_len)
  10076. }
  10077. func Xxcb_setup_request_authorization_protocol_name(tls *libc.TLS, R uintptr) (r uintptr) {
  10078. return R + libc.UintptrFromInt32(1)*12
  10079. }
  10080. func Xxcb_setup_request_authorization_protocol_name_length(tls *libc.TLS, R uintptr) (r int32) {
  10081. return libc.Int32FromUint16((*Txcb_setup_request_t)(unsafe.Pointer(R)).Fauthorization_protocol_name_len)
  10082. }
  10083. func Xxcb_setup_request_authorization_protocol_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  10084. var i Txcb_generic_iterator_t
  10085. _ = i
  10086. i.Fdata = R + libc.UintptrFromInt32(1)*12 + uintptr((*Txcb_setup_request_t)(unsafe.Pointer(R)).Fauthorization_protocol_name_len)
  10087. i.Frem = 0
  10088. i.Findex = int32(int64(i.Fdata) - int64(R))
  10089. return i
  10090. }
  10091. func Xxcb_setup_request_authorization_protocol_data(tls *libc.TLS, R uintptr) (r uintptr) {
  10092. var prev Txcb_generic_iterator_t
  10093. _ = prev
  10094. prev = Xxcb_setup_request_authorization_protocol_name_end(tls, R)
  10095. return prev.Fdata + uintptr(-prev.Findex&(libc.Int32FromInt32(4)-libc.Int32FromInt32(1))) + libc.UintptrFromInt32(0)
  10096. }
  10097. func Xxcb_setup_request_authorization_protocol_data_length(tls *libc.TLS, R uintptr) (r int32) {
  10098. return libc.Int32FromUint16((*Txcb_setup_request_t)(unsafe.Pointer(R)).Fauthorization_protocol_data_len)
  10099. }
  10100. func Xxcb_setup_request_authorization_protocol_data_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  10101. var i, prev Txcb_generic_iterator_t
  10102. _, _ = i, prev
  10103. prev = Xxcb_setup_request_authorization_protocol_name_end(tls, R)
  10104. i.Fdata = prev.Fdata + uintptr(-prev.Findex&(libc.Int32FromInt32(4)-libc.Int32FromInt32(1))) + uintptr((*Txcb_setup_request_t)(unsafe.Pointer(R)).Fauthorization_protocol_data_len)
  10105. i.Frem = 0
  10106. i.Findex = int32(int64(i.Fdata) - int64(R))
  10107. return i
  10108. }
  10109. func Xxcb_setup_request_next(tls *libc.TLS, i uintptr) {
  10110. var R uintptr
  10111. var child Txcb_generic_iterator_t
  10112. _, _ = R, child
  10113. R = (*Txcb_setup_request_iterator_t)(unsafe.Pointer(i)).Fdata
  10114. child.Fdata = R + uintptr(Xxcb_setup_request_sizeof(tls, R))
  10115. (*Txcb_setup_request_iterator_t)(unsafe.Pointer(i)).Findex = int32(int64(child.Fdata) - int64((*Txcb_setup_request_iterator_t)(unsafe.Pointer(i)).Fdata))
  10116. (*Txcb_setup_request_iterator_t)(unsafe.Pointer(i)).Frem--
  10117. (*Txcb_setup_request_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  10118. }
  10119. func Xxcb_setup_request_end(tls *libc.TLS, _i Txcb_setup_request_iterator_t) (r Txcb_generic_iterator_t) {
  10120. bp := tls.Alloc(16)
  10121. defer tls.Free(16)
  10122. *(*Txcb_setup_request_iterator_t)(unsafe.Pointer(bp)) = _i
  10123. var ret Txcb_generic_iterator_t
  10124. _ = ret
  10125. for (*(*Txcb_setup_request_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  10126. Xxcb_setup_request_next(tls, bp)
  10127. }
  10128. ret.Fdata = (*(*Txcb_setup_request_iterator_t)(unsafe.Pointer(bp))).Fdata
  10129. ret.Frem = (*(*Txcb_setup_request_iterator_t)(unsafe.Pointer(bp))).Frem
  10130. ret.Findex = (*(*Txcb_setup_request_iterator_t)(unsafe.Pointer(bp))).Findex
  10131. return ret
  10132. }
  10133. func Xxcb_setup_failed_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  10134. var _aux, xcb_tmp uintptr
  10135. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  10136. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  10137. xcb_tmp = _buffer
  10138. _aux = _buffer
  10139. xcb_buffer_len = uint32(0)
  10140. xcb_block_len = uint32(0)
  10141. xcb_pad = uint32(0)
  10142. xcb_align_to = uint32(0)
  10143. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  10144. xcb_tmp += uintptr(xcb_block_len)
  10145. xcb_buffer_len += xcb_block_len
  10146. xcb_block_len = uint32(0)
  10147. /* reason */
  10148. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_setup_failed_t)(unsafe.Pointer(_aux)).Freason_len)*libc.Uint64FromInt64(1))
  10149. xcb_tmp += uintptr(xcb_block_len)
  10150. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  10151. /* insert padding */
  10152. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10153. xcb_buffer_len += xcb_block_len + xcb_pad
  10154. if uint32(0) != xcb_pad {
  10155. xcb_tmp += uintptr(xcb_pad)
  10156. xcb_pad = uint32(0)
  10157. }
  10158. xcb_block_len = uint32(0)
  10159. return libc.Int32FromUint32(xcb_buffer_len)
  10160. }
  10161. func Xxcb_setup_failed_reason(tls *libc.TLS, R uintptr) (r uintptr) {
  10162. return R + libc.UintptrFromInt32(1)*8
  10163. }
  10164. func Xxcb_setup_failed_reason_length(tls *libc.TLS, R uintptr) (r int32) {
  10165. return libc.Int32FromUint8((*Txcb_setup_failed_t)(unsafe.Pointer(R)).Freason_len)
  10166. }
  10167. func Xxcb_setup_failed_reason_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  10168. var i Txcb_generic_iterator_t
  10169. _ = i
  10170. i.Fdata = R + libc.UintptrFromInt32(1)*8 + uintptr((*Txcb_setup_failed_t)(unsafe.Pointer(R)).Freason_len)
  10171. i.Frem = 0
  10172. i.Findex = int32(int64(i.Fdata) - int64(R))
  10173. return i
  10174. }
  10175. func Xxcb_setup_failed_next(tls *libc.TLS, i uintptr) {
  10176. var R uintptr
  10177. var child Txcb_generic_iterator_t
  10178. _, _ = R, child
  10179. R = (*Txcb_setup_failed_iterator_t)(unsafe.Pointer(i)).Fdata
  10180. child.Fdata = R + uintptr(Xxcb_setup_failed_sizeof(tls, R))
  10181. (*Txcb_setup_failed_iterator_t)(unsafe.Pointer(i)).Findex = int32(int64(child.Fdata) - int64((*Txcb_setup_failed_iterator_t)(unsafe.Pointer(i)).Fdata))
  10182. (*Txcb_setup_failed_iterator_t)(unsafe.Pointer(i)).Frem--
  10183. (*Txcb_setup_failed_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  10184. }
  10185. func Xxcb_setup_failed_end(tls *libc.TLS, _i Txcb_setup_failed_iterator_t) (r Txcb_generic_iterator_t) {
  10186. bp := tls.Alloc(16)
  10187. defer tls.Free(16)
  10188. *(*Txcb_setup_failed_iterator_t)(unsafe.Pointer(bp)) = _i
  10189. var ret Txcb_generic_iterator_t
  10190. _ = ret
  10191. for (*(*Txcb_setup_failed_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  10192. Xxcb_setup_failed_next(tls, bp)
  10193. }
  10194. ret.Fdata = (*(*Txcb_setup_failed_iterator_t)(unsafe.Pointer(bp))).Fdata
  10195. ret.Frem = (*(*Txcb_setup_failed_iterator_t)(unsafe.Pointer(bp))).Frem
  10196. ret.Findex = (*(*Txcb_setup_failed_iterator_t)(unsafe.Pointer(bp))).Findex
  10197. return ret
  10198. }
  10199. func Xxcb_setup_authenticate_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  10200. var _aux, xcb_tmp uintptr
  10201. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  10202. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  10203. xcb_tmp = _buffer
  10204. _aux = _buffer
  10205. xcb_buffer_len = uint32(0)
  10206. xcb_block_len = uint32(0)
  10207. xcb_pad = uint32(0)
  10208. xcb_align_to = uint32(0)
  10209. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  10210. xcb_tmp += uintptr(xcb_block_len)
  10211. xcb_buffer_len += xcb_block_len
  10212. xcb_block_len = uint32(0)
  10213. /* reason */
  10214. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_setup_authenticate_t)(unsafe.Pointer(_aux)).Flength)*libc.Int32FromInt32(4))*libc.Uint64FromInt64(1))
  10215. xcb_tmp += uintptr(xcb_block_len)
  10216. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  10217. /* insert padding */
  10218. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10219. xcb_buffer_len += xcb_block_len + xcb_pad
  10220. if uint32(0) != xcb_pad {
  10221. xcb_tmp += uintptr(xcb_pad)
  10222. xcb_pad = uint32(0)
  10223. }
  10224. xcb_block_len = uint32(0)
  10225. return libc.Int32FromUint32(xcb_buffer_len)
  10226. }
  10227. func Xxcb_setup_authenticate_reason(tls *libc.TLS, R uintptr) (r uintptr) {
  10228. return R + libc.UintptrFromInt32(1)*8
  10229. }
  10230. func Xxcb_setup_authenticate_reason_length(tls *libc.TLS, R uintptr) (r int32) {
  10231. return libc.Int32FromUint16((*Txcb_setup_authenticate_t)(unsafe.Pointer(R)).Flength) * int32(4)
  10232. }
  10233. func Xxcb_setup_authenticate_reason_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  10234. var i Txcb_generic_iterator_t
  10235. _ = i
  10236. i.Fdata = R + libc.UintptrFromInt32(1)*8 + uintptr(libc.Int32FromUint16((*Txcb_setup_authenticate_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4))
  10237. i.Frem = 0
  10238. i.Findex = int32(int64(i.Fdata) - int64(R))
  10239. return i
  10240. }
  10241. func Xxcb_setup_authenticate_next(tls *libc.TLS, i uintptr) {
  10242. var R uintptr
  10243. var child Txcb_generic_iterator_t
  10244. _, _ = R, child
  10245. R = (*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(i)).Fdata
  10246. child.Fdata = R + uintptr(Xxcb_setup_authenticate_sizeof(tls, R))
  10247. (*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(i)).Findex = int32(int64(child.Fdata) - int64((*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(i)).Fdata))
  10248. (*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(i)).Frem--
  10249. (*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  10250. }
  10251. func Xxcb_setup_authenticate_end(tls *libc.TLS, _i Txcb_setup_authenticate_iterator_t) (r Txcb_generic_iterator_t) {
  10252. bp := tls.Alloc(16)
  10253. defer tls.Free(16)
  10254. *(*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(bp)) = _i
  10255. var ret Txcb_generic_iterator_t
  10256. _ = ret
  10257. for (*(*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  10258. Xxcb_setup_authenticate_next(tls, bp)
  10259. }
  10260. ret.Fdata = (*(*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(bp))).Fdata
  10261. ret.Frem = (*(*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(bp))).Frem
  10262. ret.Findex = (*(*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(bp))).Findex
  10263. return ret
  10264. }
  10265. func Xxcb_setup_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  10266. var _aux, xcb_tmp uintptr
  10267. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  10268. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  10269. xcb_tmp = _buffer
  10270. _aux = _buffer
  10271. xcb_buffer_len = uint32(0)
  10272. xcb_block_len = uint32(0)
  10273. xcb_pad = uint32(0)
  10274. xcb_align_to = uint32(0)
  10275. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(40))
  10276. xcb_tmp += uintptr(xcb_block_len)
  10277. xcb_buffer_len += xcb_block_len
  10278. xcb_block_len = uint32(0)
  10279. /* vendor */
  10280. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_setup_t)(unsafe.Pointer(_aux)).Fvendor_len)*libc.Uint64FromInt64(1))
  10281. xcb_tmp += uintptr(xcb_block_len)
  10282. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  10283. xcb_align_to = uint32(4)
  10284. /* insert padding */
  10285. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10286. xcb_buffer_len += xcb_block_len + xcb_pad
  10287. if uint32(0) != xcb_pad {
  10288. xcb_tmp += uintptr(xcb_pad)
  10289. xcb_pad = uint32(0)
  10290. }
  10291. xcb_block_len = uint32(0)
  10292. /* insert padding */
  10293. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10294. xcb_buffer_len += xcb_block_len + xcb_pad
  10295. if uint32(0) != xcb_pad {
  10296. xcb_tmp += uintptr(xcb_pad)
  10297. xcb_pad = uint32(0)
  10298. }
  10299. xcb_block_len = uint32(0)
  10300. /* pixmap_formats */
  10301. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_setup_t)(unsafe.Pointer(_aux)).Fpixmap_formats_len)*libc.Uint64FromInt64(8))
  10302. xcb_tmp += uintptr(xcb_block_len)
  10303. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  10304. /* insert padding */
  10305. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10306. xcb_buffer_len += xcb_block_len + xcb_pad
  10307. if uint32(0) != xcb_pad {
  10308. xcb_tmp += uintptr(xcb_pad)
  10309. xcb_pad = uint32(0)
  10310. }
  10311. xcb_block_len = uint32(0)
  10312. /* roots */
  10313. i = uint32(0)
  10314. for {
  10315. if !(i < uint32((*Txcb_setup_t)(unsafe.Pointer(_aux)).Froots_len)) {
  10316. break
  10317. }
  10318. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_screen_sizeof(tls, xcb_tmp))
  10319. xcb_block_len += xcb_tmp_len
  10320. xcb_tmp += uintptr(xcb_tmp_len)
  10321. goto _1
  10322. _1:
  10323. ;
  10324. i++
  10325. }
  10326. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10327. /* insert padding */
  10328. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10329. xcb_buffer_len += xcb_block_len + xcb_pad
  10330. if uint32(0) != xcb_pad {
  10331. xcb_tmp += uintptr(xcb_pad)
  10332. xcb_pad = uint32(0)
  10333. }
  10334. xcb_block_len = uint32(0)
  10335. return libc.Int32FromUint32(xcb_buffer_len)
  10336. }
  10337. func Xxcb_setup_vendor(tls *libc.TLS, R uintptr) (r uintptr) {
  10338. return R + libc.UintptrFromInt32(1)*40
  10339. }
  10340. func Xxcb_setup_vendor_length(tls *libc.TLS, R uintptr) (r int32) {
  10341. return libc.Int32FromUint16((*Txcb_setup_t)(unsafe.Pointer(R)).Fvendor_len)
  10342. }
  10343. func Xxcb_setup_vendor_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  10344. var i Txcb_generic_iterator_t
  10345. _ = i
  10346. i.Fdata = R + libc.UintptrFromInt32(1)*40 + uintptr((*Txcb_setup_t)(unsafe.Pointer(R)).Fvendor_len)
  10347. i.Frem = 0
  10348. i.Findex = int32(int64(i.Fdata) - int64(R))
  10349. return i
  10350. }
  10351. func Xxcb_setup_pixmap_formats(tls *libc.TLS, R uintptr) (r uintptr) {
  10352. var prev Txcb_generic_iterator_t
  10353. _ = prev
  10354. prev = Xxcb_setup_vendor_end(tls, R)
  10355. return prev.Fdata + uintptr(-prev.Findex&(libc.Int32FromInt32(4)-libc.Int32FromInt32(1))) + libc.UintptrFromInt32(0)
  10356. }
  10357. func Xxcb_setup_pixmap_formats_length(tls *libc.TLS, R uintptr) (r int32) {
  10358. return libc.Int32FromUint8((*Txcb_setup_t)(unsafe.Pointer(R)).Fpixmap_formats_len)
  10359. }
  10360. func Xxcb_setup_pixmap_formats_iterator(tls *libc.TLS, R uintptr) (r Txcb_format_iterator_t) {
  10361. var i Txcb_format_iterator_t
  10362. var prev Txcb_generic_iterator_t
  10363. _, _ = i, prev
  10364. prev = Xxcb_setup_vendor_end(tls, R)
  10365. i.Fdata = prev.Fdata + uintptr(-prev.Findex&(libc.Int32FromInt32(4)-libc.Int32FromInt32(1)))
  10366. i.Frem = libc.Int32FromUint8((*Txcb_setup_t)(unsafe.Pointer(R)).Fpixmap_formats_len)
  10367. i.Findex = int32(int64(i.Fdata) - int64(R))
  10368. return i
  10369. }
  10370. func Xxcb_setup_roots_length(tls *libc.TLS, R uintptr) (r int32) {
  10371. return libc.Int32FromUint8((*Txcb_setup_t)(unsafe.Pointer(R)).Froots_len)
  10372. }
  10373. func Xxcb_setup_roots_iterator(tls *libc.TLS, R uintptr) (r Txcb_screen_iterator_t) {
  10374. var i Txcb_screen_iterator_t
  10375. var prev Txcb_generic_iterator_t
  10376. _, _ = i, prev
  10377. prev = Xxcb_format_end(tls, Xxcb_setup_pixmap_formats_iterator(tls, R))
  10378. i.Fdata = prev.Fdata + uintptr(libc.Uint64FromInt32(-prev.Findex)&libc.Uint64FromInt32(3))
  10379. i.Frem = libc.Int32FromUint8((*Txcb_setup_t)(unsafe.Pointer(R)).Froots_len)
  10380. i.Findex = int32(int64(i.Fdata) - int64(R))
  10381. return i
  10382. }
  10383. func Xxcb_setup_next(tls *libc.TLS, i uintptr) {
  10384. var R uintptr
  10385. var child Txcb_generic_iterator_t
  10386. _, _ = R, child
  10387. R = (*Txcb_setup_iterator_t)(unsafe.Pointer(i)).Fdata
  10388. child.Fdata = R + uintptr(Xxcb_setup_sizeof(tls, R))
  10389. (*Txcb_setup_iterator_t)(unsafe.Pointer(i)).Findex = int32(int64(child.Fdata) - int64((*Txcb_setup_iterator_t)(unsafe.Pointer(i)).Fdata))
  10390. (*Txcb_setup_iterator_t)(unsafe.Pointer(i)).Frem--
  10391. (*Txcb_setup_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  10392. }
  10393. func Xxcb_setup_end(tls *libc.TLS, _i Txcb_setup_iterator_t) (r Txcb_generic_iterator_t) {
  10394. bp := tls.Alloc(16)
  10395. defer tls.Free(16)
  10396. *(*Txcb_setup_iterator_t)(unsafe.Pointer(bp)) = _i
  10397. var ret Txcb_generic_iterator_t
  10398. _ = ret
  10399. for (*(*Txcb_setup_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  10400. Xxcb_setup_next(tls, bp)
  10401. }
  10402. ret.Fdata = (*(*Txcb_setup_iterator_t)(unsafe.Pointer(bp))).Fdata
  10403. ret.Frem = (*(*Txcb_setup_iterator_t)(unsafe.Pointer(bp))).Frem
  10404. ret.Findex = (*(*Txcb_setup_iterator_t)(unsafe.Pointer(bp))).Findex
  10405. return ret
  10406. }
  10407. func Xxcb_client_message_data_next(tls *libc.TLS, i uintptr) {
  10408. var p1 uintptr
  10409. _ = p1
  10410. (*Txcb_client_message_data_iterator_t)(unsafe.Pointer(i)).Frem--
  10411. (*Txcb_client_message_data_iterator_t)(unsafe.Pointer(i)).Fdata += 20
  10412. p1 = i + 12
  10413. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(20))
  10414. }
  10415. func Xxcb_client_message_data_end(tls *libc.TLS, i Txcb_client_message_data_iterator_t) (r Txcb_generic_iterator_t) {
  10416. var ret Txcb_generic_iterator_t
  10417. _ = ret
  10418. ret.Fdata = i.Fdata + uintptr(i.Frem)*20
  10419. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  10420. ret.Frem = 0
  10421. return ret
  10422. }
  10423. func Xxcb_create_window_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  10424. bp := tls.Alloc(16)
  10425. defer tls.Free(16)
  10426. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  10427. var xcb_out, xcb_tmp uintptr
  10428. var xcb_parts [16]Tiovec
  10429. var _ /* xcb_pad0 at bp+0 */ [3]int8
  10430. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  10431. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  10432. xcb_buffer_len = uint32(0)
  10433. xcb_align_to = uint32(0)
  10434. xcb_padding_offset = uint32(0)
  10435. xcb_pad = uint32(0)
  10436. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  10437. xcb_parts_idx = uint32(0)
  10438. xcb_block_len = uint32(0)
  10439. if value_mask&uint32(_XCB_CW_BACK_PIXMAP) != 0 {
  10440. /* xcb_create_window_value_list_t.background_pixmap */
  10441. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  10442. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10443. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10444. xcb_parts_idx++
  10445. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10446. }
  10447. if value_mask&uint32(_XCB_CW_BACK_PIXEL) != 0 {
  10448. /* xcb_create_window_value_list_t.background_pixel */
  10449. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  10450. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10451. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10452. xcb_parts_idx++
  10453. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10454. }
  10455. if value_mask&uint32(_XCB_CW_BORDER_PIXMAP) != 0 {
  10456. /* xcb_create_window_value_list_t.border_pixmap */
  10457. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  10458. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10459. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10460. xcb_parts_idx++
  10461. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10462. }
  10463. if value_mask&uint32(_XCB_CW_BORDER_PIXEL) != 0 {
  10464. /* xcb_create_window_value_list_t.border_pixel */
  10465. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  10466. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10467. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10468. xcb_parts_idx++
  10469. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10470. }
  10471. if value_mask&uint32(_XCB_CW_BIT_GRAVITY) != 0 {
  10472. /* xcb_create_window_value_list_t.bit_gravity */
  10473. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  10474. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10475. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10476. xcb_parts_idx++
  10477. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10478. }
  10479. if value_mask&uint32(_XCB_CW_WIN_GRAVITY) != 0 {
  10480. /* xcb_create_window_value_list_t.win_gravity */
  10481. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  10482. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10483. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10484. xcb_parts_idx++
  10485. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10486. }
  10487. if value_mask&uint32(_XCB_CW_BACKING_STORE) != 0 {
  10488. /* xcb_create_window_value_list_t.backing_store */
  10489. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  10490. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10491. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10492. xcb_parts_idx++
  10493. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10494. }
  10495. if value_mask&uint32(_XCB_CW_BACKING_PLANES) != 0 {
  10496. /* xcb_create_window_value_list_t.backing_planes */
  10497. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 28
  10498. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10499. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10500. xcb_parts_idx++
  10501. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10502. }
  10503. if value_mask&uint32(_XCB_CW_BACKING_PIXEL) != 0 {
  10504. /* xcb_create_window_value_list_t.backing_pixel */
  10505. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 32
  10506. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10507. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10508. xcb_parts_idx++
  10509. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10510. }
  10511. if value_mask&uint32(_XCB_CW_OVERRIDE_REDIRECT) != 0 {
  10512. /* xcb_create_window_value_list_t.override_redirect */
  10513. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 36
  10514. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10515. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10516. xcb_parts_idx++
  10517. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10518. }
  10519. if value_mask&uint32(_XCB_CW_SAVE_UNDER) != 0 {
  10520. /* xcb_create_window_value_list_t.save_under */
  10521. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 40
  10522. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10523. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10524. xcb_parts_idx++
  10525. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10526. }
  10527. if value_mask&uint32(_XCB_CW_EVENT_MASK) != 0 {
  10528. /* xcb_create_window_value_list_t.event_mask */
  10529. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 44
  10530. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10531. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10532. xcb_parts_idx++
  10533. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10534. }
  10535. if value_mask&uint32(_XCB_CW_DONT_PROPAGATE) != 0 {
  10536. /* xcb_create_window_value_list_t.do_not_propogate_mask */
  10537. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 48
  10538. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10539. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10540. xcb_parts_idx++
  10541. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10542. }
  10543. if value_mask&uint32(_XCB_CW_COLORMAP) != 0 {
  10544. /* xcb_create_window_value_list_t.colormap */
  10545. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 52
  10546. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10547. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10548. xcb_parts_idx++
  10549. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10550. }
  10551. if value_mask&uint32(_XCB_CW_CURSOR) != 0 {
  10552. /* xcb_create_window_value_list_t.cursor */
  10553. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 56
  10554. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10555. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10556. xcb_parts_idx++
  10557. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10558. }
  10559. /* insert padding */
  10560. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  10561. xcb_buffer_len += xcb_block_len + xcb_pad
  10562. if uint32(0) != xcb_pad {
  10563. xcb_parts[xcb_parts_idx].Fiov_base = bp
  10564. xcb_parts[xcb_parts_idx].Fiov_len = uint64(xcb_pad)
  10565. xcb_parts_idx++
  10566. xcb_pad = uint32(0)
  10567. }
  10568. xcb_block_len = uint32(0)
  10569. xcb_padding_offset = uint32(0)
  10570. if libc.UintptrFromInt32(0) == xcb_out {
  10571. /* allocate memory */
  10572. xcb_out = libc.Xmalloc(tls, uint64(xcb_buffer_len))
  10573. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  10574. }
  10575. xcb_tmp = xcb_out
  10576. i = uint32(0)
  10577. for {
  10578. if !(i < xcb_parts_idx) {
  10579. break
  10580. }
  10581. if uintptr(0) != xcb_parts[i].Fiov_base && uint64(0) != xcb_parts[i].Fiov_len {
  10582. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  10583. }
  10584. if uint64(0) != xcb_parts[i].Fiov_len {
  10585. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  10586. }
  10587. goto _1
  10588. _1:
  10589. ;
  10590. i++
  10591. }
  10592. return libc.Int32FromUint32(xcb_buffer_len)
  10593. }
  10594. func Xxcb_create_window_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  10595. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  10596. var xcb_tmp uintptr
  10597. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  10598. xcb_tmp = _buffer
  10599. xcb_buffer_len = uint32(0)
  10600. xcb_block_len = uint32(0)
  10601. xcb_pad = uint32(0)
  10602. xcb_align_to = uint32(0)
  10603. xcb_padding_offset = uint32(0)
  10604. if value_mask&uint32(_XCB_CW_BACK_PIXMAP) != 0 {
  10605. /* xcb_create_window_value_list_t.background_pixmap */
  10606. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbackground_pixmap = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  10607. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10608. xcb_tmp += uintptr(4)
  10609. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10610. }
  10611. if value_mask&uint32(_XCB_CW_BACK_PIXEL) != 0 {
  10612. /* xcb_create_window_value_list_t.background_pixel */
  10613. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbackground_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10614. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10615. xcb_tmp += uintptr(4)
  10616. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10617. }
  10618. if value_mask&uint32(_XCB_CW_BORDER_PIXMAP) != 0 {
  10619. /* xcb_create_window_value_list_t.border_pixmap */
  10620. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fborder_pixmap = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  10621. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10622. xcb_tmp += uintptr(4)
  10623. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10624. }
  10625. if value_mask&uint32(_XCB_CW_BORDER_PIXEL) != 0 {
  10626. /* xcb_create_window_value_list_t.border_pixel */
  10627. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fborder_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10628. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10629. xcb_tmp += uintptr(4)
  10630. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10631. }
  10632. if value_mask&uint32(_XCB_CW_BIT_GRAVITY) != 0 {
  10633. /* xcb_create_window_value_list_t.bit_gravity */
  10634. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbit_gravity = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10635. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10636. xcb_tmp += uintptr(4)
  10637. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10638. }
  10639. if value_mask&uint32(_XCB_CW_WIN_GRAVITY) != 0 {
  10640. /* xcb_create_window_value_list_t.win_gravity */
  10641. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fwin_gravity = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10642. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10643. xcb_tmp += uintptr(4)
  10644. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10645. }
  10646. if value_mask&uint32(_XCB_CW_BACKING_STORE) != 0 {
  10647. /* xcb_create_window_value_list_t.backing_store */
  10648. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbacking_store = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10649. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10650. xcb_tmp += uintptr(4)
  10651. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10652. }
  10653. if value_mask&uint32(_XCB_CW_BACKING_PLANES) != 0 {
  10654. /* xcb_create_window_value_list_t.backing_planes */
  10655. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbacking_planes = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10656. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10657. xcb_tmp += uintptr(4)
  10658. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10659. }
  10660. if value_mask&uint32(_XCB_CW_BACKING_PIXEL) != 0 {
  10661. /* xcb_create_window_value_list_t.backing_pixel */
  10662. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbacking_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10663. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10664. xcb_tmp += uintptr(4)
  10665. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10666. }
  10667. if value_mask&uint32(_XCB_CW_OVERRIDE_REDIRECT) != 0 {
  10668. /* xcb_create_window_value_list_t.override_redirect */
  10669. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Foverride_redirect = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  10670. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10671. xcb_tmp += uintptr(4)
  10672. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10673. }
  10674. if value_mask&uint32(_XCB_CW_SAVE_UNDER) != 0 {
  10675. /* xcb_create_window_value_list_t.save_under */
  10676. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fsave_under = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  10677. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10678. xcb_tmp += uintptr(4)
  10679. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10680. }
  10681. if value_mask&uint32(_XCB_CW_EVENT_MASK) != 0 {
  10682. /* xcb_create_window_value_list_t.event_mask */
  10683. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fevent_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10684. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10685. xcb_tmp += uintptr(4)
  10686. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10687. }
  10688. if value_mask&uint32(_XCB_CW_DONT_PROPAGATE) != 0 {
  10689. /* xcb_create_window_value_list_t.do_not_propogate_mask */
  10690. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fdo_not_propogate_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10691. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10692. xcb_tmp += uintptr(4)
  10693. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10694. }
  10695. if value_mask&uint32(_XCB_CW_COLORMAP) != 0 {
  10696. /* xcb_create_window_value_list_t.colormap */
  10697. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fcolormap = *(*Txcb_colormap_t)(unsafe.Pointer(xcb_tmp))
  10698. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10699. xcb_tmp += uintptr(4)
  10700. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10701. }
  10702. if value_mask&uint32(_XCB_CW_CURSOR) != 0 {
  10703. /* xcb_create_window_value_list_t.cursor */
  10704. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fcursor = *(*Txcb_cursor_t)(unsafe.Pointer(xcb_tmp))
  10705. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10706. xcb_tmp += uintptr(4)
  10707. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10708. }
  10709. /* insert padding */
  10710. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  10711. xcb_buffer_len += xcb_block_len + xcb_pad
  10712. if uint32(0) != xcb_pad {
  10713. xcb_tmp += uintptr(xcb_pad)
  10714. xcb_pad = uint32(0)
  10715. }
  10716. xcb_block_len = uint32(0)
  10717. xcb_padding_offset = uint32(0)
  10718. return libc.Int32FromUint32(xcb_buffer_len)
  10719. }
  10720. func Xxcb_create_window_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t) (r int32) {
  10721. bp := tls.Alloc(64)
  10722. defer tls.Free(64)
  10723. var _ /* _aux at bp+0 */ Txcb_create_window_value_list_t
  10724. return Xxcb_create_window_value_list_unpack(tls, _buffer, value_mask, bp)
  10725. }
  10726. func Xxcb_create_window_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  10727. var _aux, xcb_tmp uintptr
  10728. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  10729. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  10730. xcb_tmp = _buffer
  10731. _aux = _buffer
  10732. xcb_buffer_len = uint32(0)
  10733. xcb_block_len = uint32(0)
  10734. xcb_pad = uint32(0)
  10735. xcb_align_to = uint32(0)
  10736. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  10737. xcb_tmp += uintptr(xcb_block_len)
  10738. xcb_buffer_len += xcb_block_len
  10739. xcb_block_len = uint32(0)
  10740. /* value_list */
  10741. xcb_block_len += libc.Uint32FromInt32(Xxcb_create_window_value_list_sizeof(tls, xcb_tmp, (*Txcb_create_window_request_t)(unsafe.Pointer(_aux)).Fvalue_mask))
  10742. xcb_tmp += uintptr(xcb_block_len)
  10743. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  10744. /* insert padding */
  10745. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10746. xcb_buffer_len += xcb_block_len + xcb_pad
  10747. if uint32(0) != xcb_pad {
  10748. xcb_tmp += uintptr(xcb_pad)
  10749. xcb_pad = uint32(0)
  10750. }
  10751. xcb_block_len = uint32(0)
  10752. return libc.Int32FromUint32(xcb_buffer_len)
  10753. }
  10754. func Xxcb_create_window_checked(tls *libc.TLS, c uintptr, depth Tuint8_t, wid Txcb_window_t, parent Txcb_window_t, x Tint16_t, y Tint16_t, width Tuint16_t, height Tuint16_t, border_width Tuint16_t, _class Tuint16_t, visual Txcb_visualid_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  10755. bp := tls.Alloc(112)
  10756. defer tls.Free(112)
  10757. var xcb_ret Txcb_void_cookie_t
  10758. var _ /* xcb_out at bp+80 */ Txcb_create_window_request_t
  10759. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  10760. _ = xcb_ret
  10761. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fdepth = depth
  10762. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fwid = wid
  10763. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fparent = parent
  10764. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fx = x
  10765. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fy = y
  10766. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fwidth = width
  10767. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fheight = height
  10768. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fborder_width = border_width
  10769. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).F_class = _class
  10770. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fvisual = visual
  10771. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  10772. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  10773. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(32)
  10774. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10775. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  10776. /* xcb_create_window_value_list_t value_list */
  10777. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  10778. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_create_window_value_list_sizeof(tls, value_list, value_mask))
  10779. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req)))
  10780. return xcb_ret
  10781. }
  10782. var _xcb_req = Txcb_protocol_request_t{
  10783. Fcount: uint64(3),
  10784. Fopcode: uint8(m_XCB_CREATE_WINDOW),
  10785. Fisvoid: uint8(1),
  10786. }
  10787. func Xxcb_create_window(tls *libc.TLS, c uintptr, depth Tuint8_t, wid Txcb_window_t, parent Txcb_window_t, x Tint16_t, y Tint16_t, width Tuint16_t, height Tuint16_t, border_width Tuint16_t, _class Tuint16_t, visual Txcb_visualid_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  10788. bp := tls.Alloc(112)
  10789. defer tls.Free(112)
  10790. var xcb_ret Txcb_void_cookie_t
  10791. var _ /* xcb_out at bp+80 */ Txcb_create_window_request_t
  10792. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  10793. _ = xcb_ret
  10794. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fdepth = depth
  10795. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fwid = wid
  10796. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fparent = parent
  10797. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fx = x
  10798. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fy = y
  10799. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fwidth = width
  10800. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fheight = height
  10801. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fborder_width = border_width
  10802. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).F_class = _class
  10803. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fvisual = visual
  10804. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  10805. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  10806. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(32)
  10807. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10808. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  10809. /* xcb_create_window_value_list_t value_list */
  10810. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  10811. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_create_window_value_list_sizeof(tls, value_list, value_mask))
  10812. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req1)))
  10813. return xcb_ret
  10814. }
  10815. var _xcb_req1 = Txcb_protocol_request_t{
  10816. Fcount: uint64(3),
  10817. Fopcode: uint8(m_XCB_CREATE_WINDOW),
  10818. Fisvoid: uint8(1),
  10819. }
  10820. func Xxcb_create_window_aux_checked(tls *libc.TLS, c uintptr, depth Tuint8_t, wid Txcb_window_t, parent Txcb_window_t, x Tint16_t, y Tint16_t, width Tuint16_t, height Tuint16_t, border_width Tuint16_t, _class Tuint16_t, visual Txcb_visualid_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  10821. bp := tls.Alloc(128)
  10822. defer tls.Free(128)
  10823. var xcb_ret Txcb_void_cookie_t
  10824. var _ /* xcb_aux0 at bp+112 */ uintptr
  10825. var _ /* xcb_out at bp+80 */ Txcb_create_window_request_t
  10826. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  10827. _ = xcb_ret
  10828. *(*uintptr)(unsafe.Pointer(bp + 112)) = uintptr(0)
  10829. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fdepth = depth
  10830. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fwid = wid
  10831. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fparent = parent
  10832. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fx = x
  10833. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fy = y
  10834. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fwidth = width
  10835. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fheight = height
  10836. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fborder_width = border_width
  10837. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).F_class = _class
  10838. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fvisual = visual
  10839. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  10840. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  10841. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(32)
  10842. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10843. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  10844. /* xcb_create_window_value_list_t value_list */
  10845. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_create_window_value_list_serialize(tls, bp+112, value_mask, value_list))
  10846. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 112))
  10847. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req2)))
  10848. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 112)))
  10849. return xcb_ret
  10850. }
  10851. var _xcb_req2 = Txcb_protocol_request_t{
  10852. Fcount: uint64(3),
  10853. Fopcode: uint8(m_XCB_CREATE_WINDOW),
  10854. Fisvoid: uint8(1),
  10855. }
  10856. func Xxcb_create_window_aux(tls *libc.TLS, c uintptr, depth Tuint8_t, wid Txcb_window_t, parent Txcb_window_t, x Tint16_t, y Tint16_t, width Tuint16_t, height Tuint16_t, border_width Tuint16_t, _class Tuint16_t, visual Txcb_visualid_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  10857. bp := tls.Alloc(128)
  10858. defer tls.Free(128)
  10859. var xcb_ret Txcb_void_cookie_t
  10860. var _ /* xcb_aux0 at bp+112 */ uintptr
  10861. var _ /* xcb_out at bp+80 */ Txcb_create_window_request_t
  10862. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  10863. _ = xcb_ret
  10864. *(*uintptr)(unsafe.Pointer(bp + 112)) = uintptr(0)
  10865. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fdepth = depth
  10866. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fwid = wid
  10867. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fparent = parent
  10868. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fx = x
  10869. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fy = y
  10870. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fwidth = width
  10871. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fheight = height
  10872. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fborder_width = border_width
  10873. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).F_class = _class
  10874. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fvisual = visual
  10875. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  10876. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  10877. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(32)
  10878. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10879. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  10880. /* xcb_create_window_value_list_t value_list */
  10881. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_create_window_value_list_serialize(tls, bp+112, value_mask, value_list))
  10882. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 112))
  10883. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req3)))
  10884. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 112)))
  10885. return xcb_ret
  10886. }
  10887. var _xcb_req3 = Txcb_protocol_request_t{
  10888. Fcount: uint64(3),
  10889. Fopcode: uint8(m_XCB_CREATE_WINDOW),
  10890. Fisvoid: uint8(1),
  10891. }
  10892. func Xxcb_create_window_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  10893. return R + libc.UintptrFromInt32(1)*32
  10894. }
  10895. func Xxcb_change_window_attributes_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  10896. bp := tls.Alloc(16)
  10897. defer tls.Free(16)
  10898. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  10899. var xcb_out, xcb_tmp uintptr
  10900. var xcb_parts [16]Tiovec
  10901. var _ /* xcb_pad0 at bp+0 */ [3]int8
  10902. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  10903. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  10904. xcb_buffer_len = uint32(0)
  10905. xcb_align_to = uint32(0)
  10906. xcb_padding_offset = uint32(0)
  10907. xcb_pad = uint32(0)
  10908. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  10909. xcb_parts_idx = uint32(0)
  10910. xcb_block_len = uint32(0)
  10911. if value_mask&uint32(_XCB_CW_BACK_PIXMAP) != 0 {
  10912. /* xcb_change_window_attributes_value_list_t.background_pixmap */
  10913. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  10914. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10915. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10916. xcb_parts_idx++
  10917. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10918. }
  10919. if value_mask&uint32(_XCB_CW_BACK_PIXEL) != 0 {
  10920. /* xcb_change_window_attributes_value_list_t.background_pixel */
  10921. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  10922. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10923. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10924. xcb_parts_idx++
  10925. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10926. }
  10927. if value_mask&uint32(_XCB_CW_BORDER_PIXMAP) != 0 {
  10928. /* xcb_change_window_attributes_value_list_t.border_pixmap */
  10929. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  10930. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10931. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10932. xcb_parts_idx++
  10933. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10934. }
  10935. if value_mask&uint32(_XCB_CW_BORDER_PIXEL) != 0 {
  10936. /* xcb_change_window_attributes_value_list_t.border_pixel */
  10937. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  10938. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10939. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10940. xcb_parts_idx++
  10941. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10942. }
  10943. if value_mask&uint32(_XCB_CW_BIT_GRAVITY) != 0 {
  10944. /* xcb_change_window_attributes_value_list_t.bit_gravity */
  10945. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  10946. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10947. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10948. xcb_parts_idx++
  10949. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10950. }
  10951. if value_mask&uint32(_XCB_CW_WIN_GRAVITY) != 0 {
  10952. /* xcb_change_window_attributes_value_list_t.win_gravity */
  10953. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  10954. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10955. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10956. xcb_parts_idx++
  10957. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10958. }
  10959. if value_mask&uint32(_XCB_CW_BACKING_STORE) != 0 {
  10960. /* xcb_change_window_attributes_value_list_t.backing_store */
  10961. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  10962. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10963. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10964. xcb_parts_idx++
  10965. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10966. }
  10967. if value_mask&uint32(_XCB_CW_BACKING_PLANES) != 0 {
  10968. /* xcb_change_window_attributes_value_list_t.backing_planes */
  10969. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 28
  10970. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10971. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10972. xcb_parts_idx++
  10973. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10974. }
  10975. if value_mask&uint32(_XCB_CW_BACKING_PIXEL) != 0 {
  10976. /* xcb_change_window_attributes_value_list_t.backing_pixel */
  10977. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 32
  10978. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10979. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10980. xcb_parts_idx++
  10981. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10982. }
  10983. if value_mask&uint32(_XCB_CW_OVERRIDE_REDIRECT) != 0 {
  10984. /* xcb_change_window_attributes_value_list_t.override_redirect */
  10985. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 36
  10986. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10987. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10988. xcb_parts_idx++
  10989. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10990. }
  10991. if value_mask&uint32(_XCB_CW_SAVE_UNDER) != 0 {
  10992. /* xcb_change_window_attributes_value_list_t.save_under */
  10993. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 40
  10994. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  10995. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  10996. xcb_parts_idx++
  10997. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  10998. }
  10999. if value_mask&uint32(_XCB_CW_EVENT_MASK) != 0 {
  11000. /* xcb_change_window_attributes_value_list_t.event_mask */
  11001. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 44
  11002. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11003. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  11004. xcb_parts_idx++
  11005. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11006. }
  11007. if value_mask&uint32(_XCB_CW_DONT_PROPAGATE) != 0 {
  11008. /* xcb_change_window_attributes_value_list_t.do_not_propogate_mask */
  11009. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 48
  11010. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11011. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  11012. xcb_parts_idx++
  11013. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11014. }
  11015. if value_mask&uint32(_XCB_CW_COLORMAP) != 0 {
  11016. /* xcb_change_window_attributes_value_list_t.colormap */
  11017. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 52
  11018. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11019. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  11020. xcb_parts_idx++
  11021. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11022. }
  11023. if value_mask&uint32(_XCB_CW_CURSOR) != 0 {
  11024. /* xcb_change_window_attributes_value_list_t.cursor */
  11025. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 56
  11026. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11027. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  11028. xcb_parts_idx++
  11029. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11030. }
  11031. /* insert padding */
  11032. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  11033. xcb_buffer_len += xcb_block_len + xcb_pad
  11034. if uint32(0) != xcb_pad {
  11035. xcb_parts[xcb_parts_idx].Fiov_base = bp
  11036. xcb_parts[xcb_parts_idx].Fiov_len = uint64(xcb_pad)
  11037. xcb_parts_idx++
  11038. xcb_pad = uint32(0)
  11039. }
  11040. xcb_block_len = uint32(0)
  11041. xcb_padding_offset = uint32(0)
  11042. if libc.UintptrFromInt32(0) == xcb_out {
  11043. /* allocate memory */
  11044. xcb_out = libc.Xmalloc(tls, uint64(xcb_buffer_len))
  11045. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  11046. }
  11047. xcb_tmp = xcb_out
  11048. i = uint32(0)
  11049. for {
  11050. if !(i < xcb_parts_idx) {
  11051. break
  11052. }
  11053. if uintptr(0) != xcb_parts[i].Fiov_base && uint64(0) != xcb_parts[i].Fiov_len {
  11054. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  11055. }
  11056. if uint64(0) != xcb_parts[i].Fiov_len {
  11057. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  11058. }
  11059. goto _1
  11060. _1:
  11061. ;
  11062. i++
  11063. }
  11064. return libc.Int32FromUint32(xcb_buffer_len)
  11065. }
  11066. func Xxcb_change_window_attributes_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  11067. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  11068. var xcb_tmp uintptr
  11069. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  11070. xcb_tmp = _buffer
  11071. xcb_buffer_len = uint32(0)
  11072. xcb_block_len = uint32(0)
  11073. xcb_pad = uint32(0)
  11074. xcb_align_to = uint32(0)
  11075. xcb_padding_offset = uint32(0)
  11076. if value_mask&uint32(_XCB_CW_BACK_PIXMAP) != 0 {
  11077. /* xcb_change_window_attributes_value_list_t.background_pixmap */
  11078. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbackground_pixmap = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  11079. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11080. xcb_tmp += uintptr(4)
  11081. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11082. }
  11083. if value_mask&uint32(_XCB_CW_BACK_PIXEL) != 0 {
  11084. /* xcb_change_window_attributes_value_list_t.background_pixel */
  11085. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbackground_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11086. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11087. xcb_tmp += uintptr(4)
  11088. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11089. }
  11090. if value_mask&uint32(_XCB_CW_BORDER_PIXMAP) != 0 {
  11091. /* xcb_change_window_attributes_value_list_t.border_pixmap */
  11092. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fborder_pixmap = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  11093. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11094. xcb_tmp += uintptr(4)
  11095. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11096. }
  11097. if value_mask&uint32(_XCB_CW_BORDER_PIXEL) != 0 {
  11098. /* xcb_change_window_attributes_value_list_t.border_pixel */
  11099. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fborder_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11100. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11101. xcb_tmp += uintptr(4)
  11102. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11103. }
  11104. if value_mask&uint32(_XCB_CW_BIT_GRAVITY) != 0 {
  11105. /* xcb_change_window_attributes_value_list_t.bit_gravity */
  11106. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbit_gravity = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11107. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11108. xcb_tmp += uintptr(4)
  11109. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11110. }
  11111. if value_mask&uint32(_XCB_CW_WIN_GRAVITY) != 0 {
  11112. /* xcb_change_window_attributes_value_list_t.win_gravity */
  11113. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fwin_gravity = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11114. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11115. xcb_tmp += uintptr(4)
  11116. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11117. }
  11118. if value_mask&uint32(_XCB_CW_BACKING_STORE) != 0 {
  11119. /* xcb_change_window_attributes_value_list_t.backing_store */
  11120. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbacking_store = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11121. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11122. xcb_tmp += uintptr(4)
  11123. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11124. }
  11125. if value_mask&uint32(_XCB_CW_BACKING_PLANES) != 0 {
  11126. /* xcb_change_window_attributes_value_list_t.backing_planes */
  11127. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbacking_planes = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11128. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11129. xcb_tmp += uintptr(4)
  11130. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11131. }
  11132. if value_mask&uint32(_XCB_CW_BACKING_PIXEL) != 0 {
  11133. /* xcb_change_window_attributes_value_list_t.backing_pixel */
  11134. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbacking_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11135. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11136. xcb_tmp += uintptr(4)
  11137. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11138. }
  11139. if value_mask&uint32(_XCB_CW_OVERRIDE_REDIRECT) != 0 {
  11140. /* xcb_change_window_attributes_value_list_t.override_redirect */
  11141. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Foverride_redirect = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  11142. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11143. xcb_tmp += uintptr(4)
  11144. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11145. }
  11146. if value_mask&uint32(_XCB_CW_SAVE_UNDER) != 0 {
  11147. /* xcb_change_window_attributes_value_list_t.save_under */
  11148. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fsave_under = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  11149. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11150. xcb_tmp += uintptr(4)
  11151. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11152. }
  11153. if value_mask&uint32(_XCB_CW_EVENT_MASK) != 0 {
  11154. /* xcb_change_window_attributes_value_list_t.event_mask */
  11155. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fevent_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11156. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11157. xcb_tmp += uintptr(4)
  11158. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11159. }
  11160. if value_mask&uint32(_XCB_CW_DONT_PROPAGATE) != 0 {
  11161. /* xcb_change_window_attributes_value_list_t.do_not_propogate_mask */
  11162. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fdo_not_propogate_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11163. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11164. xcb_tmp += uintptr(4)
  11165. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11166. }
  11167. if value_mask&uint32(_XCB_CW_COLORMAP) != 0 {
  11168. /* xcb_change_window_attributes_value_list_t.colormap */
  11169. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fcolormap = *(*Txcb_colormap_t)(unsafe.Pointer(xcb_tmp))
  11170. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11171. xcb_tmp += uintptr(4)
  11172. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11173. }
  11174. if value_mask&uint32(_XCB_CW_CURSOR) != 0 {
  11175. /* xcb_change_window_attributes_value_list_t.cursor */
  11176. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fcursor = *(*Txcb_cursor_t)(unsafe.Pointer(xcb_tmp))
  11177. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11178. xcb_tmp += uintptr(4)
  11179. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11180. }
  11181. /* insert padding */
  11182. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  11183. xcb_buffer_len += xcb_block_len + xcb_pad
  11184. if uint32(0) != xcb_pad {
  11185. xcb_tmp += uintptr(xcb_pad)
  11186. xcb_pad = uint32(0)
  11187. }
  11188. xcb_block_len = uint32(0)
  11189. xcb_padding_offset = uint32(0)
  11190. return libc.Int32FromUint32(xcb_buffer_len)
  11191. }
  11192. func Xxcb_change_window_attributes_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t) (r int32) {
  11193. bp := tls.Alloc(64)
  11194. defer tls.Free(64)
  11195. var _ /* _aux at bp+0 */ Txcb_change_window_attributes_value_list_t
  11196. return Xxcb_change_window_attributes_value_list_unpack(tls, _buffer, value_mask, bp)
  11197. }
  11198. func Xxcb_change_window_attributes_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  11199. var _aux, xcb_tmp uintptr
  11200. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  11201. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  11202. xcb_tmp = _buffer
  11203. _aux = _buffer
  11204. xcb_buffer_len = uint32(0)
  11205. xcb_block_len = uint32(0)
  11206. xcb_pad = uint32(0)
  11207. xcb_align_to = uint32(0)
  11208. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  11209. xcb_tmp += uintptr(xcb_block_len)
  11210. xcb_buffer_len += xcb_block_len
  11211. xcb_block_len = uint32(0)
  11212. /* value_list */
  11213. xcb_block_len += libc.Uint32FromInt32(Xxcb_change_window_attributes_value_list_sizeof(tls, xcb_tmp, (*Txcb_change_window_attributes_request_t)(unsafe.Pointer(_aux)).Fvalue_mask))
  11214. xcb_tmp += uintptr(xcb_block_len)
  11215. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  11216. /* insert padding */
  11217. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  11218. xcb_buffer_len += xcb_block_len + xcb_pad
  11219. if uint32(0) != xcb_pad {
  11220. xcb_tmp += uintptr(xcb_pad)
  11221. xcb_pad = uint32(0)
  11222. }
  11223. xcb_block_len = uint32(0)
  11224. return libc.Int32FromUint32(xcb_buffer_len)
  11225. }
  11226. func Xxcb_change_window_attributes_checked(tls *libc.TLS, c uintptr, window Txcb_window_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  11227. bp := tls.Alloc(96)
  11228. defer tls.Free(96)
  11229. var xcb_ret Txcb_void_cookie_t
  11230. var _ /* xcb_out at bp+80 */ Txcb_change_window_attributes_request_t
  11231. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  11232. _ = xcb_ret
  11233. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  11234. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fwindow = window
  11235. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  11236. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  11237. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  11238. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11239. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11240. /* xcb_change_window_attributes_value_list_t value_list */
  11241. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  11242. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_window_attributes_value_list_sizeof(tls, value_list, value_mask))
  11243. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req4)))
  11244. return xcb_ret
  11245. }
  11246. var _xcb_req4 = Txcb_protocol_request_t{
  11247. Fcount: uint64(3),
  11248. Fopcode: uint8(m_XCB_CHANGE_WINDOW_ATTRIBUTES),
  11249. Fisvoid: uint8(1),
  11250. }
  11251. func Xxcb_change_window_attributes(tls *libc.TLS, c uintptr, window Txcb_window_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  11252. bp := tls.Alloc(96)
  11253. defer tls.Free(96)
  11254. var xcb_ret Txcb_void_cookie_t
  11255. var _ /* xcb_out at bp+80 */ Txcb_change_window_attributes_request_t
  11256. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  11257. _ = xcb_ret
  11258. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  11259. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fwindow = window
  11260. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  11261. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  11262. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  11263. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11264. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11265. /* xcb_change_window_attributes_value_list_t value_list */
  11266. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  11267. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_window_attributes_value_list_sizeof(tls, value_list, value_mask))
  11268. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req5)))
  11269. return xcb_ret
  11270. }
  11271. var _xcb_req5 = Txcb_protocol_request_t{
  11272. Fcount: uint64(3),
  11273. Fopcode: uint8(m_XCB_CHANGE_WINDOW_ATTRIBUTES),
  11274. Fisvoid: uint8(1),
  11275. }
  11276. func Xxcb_change_window_attributes_aux_checked(tls *libc.TLS, c uintptr, window Txcb_window_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  11277. bp := tls.Alloc(112)
  11278. defer tls.Free(112)
  11279. var xcb_ret Txcb_void_cookie_t
  11280. var _ /* xcb_aux0 at bp+96 */ uintptr
  11281. var _ /* xcb_out at bp+80 */ Txcb_change_window_attributes_request_t
  11282. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  11283. _ = xcb_ret
  11284. *(*uintptr)(unsafe.Pointer(bp + 96)) = uintptr(0)
  11285. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  11286. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fwindow = window
  11287. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  11288. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  11289. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  11290. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11291. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11292. /* xcb_change_window_attributes_value_list_t value_list */
  11293. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_window_attributes_value_list_serialize(tls, bp+96, value_mask, value_list))
  11294. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 96))
  11295. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req6)))
  11296. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))
  11297. return xcb_ret
  11298. }
  11299. var _xcb_req6 = Txcb_protocol_request_t{
  11300. Fcount: uint64(3),
  11301. Fopcode: uint8(m_XCB_CHANGE_WINDOW_ATTRIBUTES),
  11302. Fisvoid: uint8(1),
  11303. }
  11304. func Xxcb_change_window_attributes_aux(tls *libc.TLS, c uintptr, window Txcb_window_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  11305. bp := tls.Alloc(112)
  11306. defer tls.Free(112)
  11307. var xcb_ret Txcb_void_cookie_t
  11308. var _ /* xcb_aux0 at bp+96 */ uintptr
  11309. var _ /* xcb_out at bp+80 */ Txcb_change_window_attributes_request_t
  11310. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  11311. _ = xcb_ret
  11312. *(*uintptr)(unsafe.Pointer(bp + 96)) = uintptr(0)
  11313. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  11314. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fwindow = window
  11315. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  11316. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  11317. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  11318. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11319. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11320. /* xcb_change_window_attributes_value_list_t value_list */
  11321. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_window_attributes_value_list_serialize(tls, bp+96, value_mask, value_list))
  11322. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 96))
  11323. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req7)))
  11324. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))
  11325. return xcb_ret
  11326. }
  11327. var _xcb_req7 = Txcb_protocol_request_t{
  11328. Fcount: uint64(3),
  11329. Fopcode: uint8(m_XCB_CHANGE_WINDOW_ATTRIBUTES),
  11330. Fisvoid: uint8(1),
  11331. }
  11332. func Xxcb_change_window_attributes_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  11333. return R + libc.UintptrFromInt32(1)*12
  11334. }
  11335. func Xxcb_get_window_attributes(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_get_window_attributes_cookie_t) {
  11336. bp := tls.Alloc(80)
  11337. defer tls.Free(80)
  11338. var xcb_ret Txcb_get_window_attributes_cookie_t
  11339. var _ /* xcb_out at bp+64 */ Txcb_get_window_attributes_request_t
  11340. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11341. _ = xcb_ret
  11342. (*(*Txcb_get_window_attributes_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11343. (*(*Txcb_get_window_attributes_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11344. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11345. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11346. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11347. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11348. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req8)))
  11349. return xcb_ret
  11350. }
  11351. var _xcb_req8 = Txcb_protocol_request_t{
  11352. Fcount: uint64(2),
  11353. Fopcode: uint8(m_XCB_GET_WINDOW_ATTRIBUTES),
  11354. }
  11355. func Xxcb_get_window_attributes_unchecked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_get_window_attributes_cookie_t) {
  11356. bp := tls.Alloc(80)
  11357. defer tls.Free(80)
  11358. var xcb_ret Txcb_get_window_attributes_cookie_t
  11359. var _ /* xcb_out at bp+64 */ Txcb_get_window_attributes_request_t
  11360. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11361. _ = xcb_ret
  11362. (*(*Txcb_get_window_attributes_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11363. (*(*Txcb_get_window_attributes_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11364. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11365. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11366. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11367. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11368. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req9)))
  11369. return xcb_ret
  11370. }
  11371. var _xcb_req9 = Txcb_protocol_request_t{
  11372. Fcount: uint64(2),
  11373. Fopcode: uint8(m_XCB_GET_WINDOW_ATTRIBUTES),
  11374. }
  11375. func Xxcb_get_window_attributes_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_window_attributes_cookie_t, e uintptr) (r uintptr) {
  11376. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  11377. }
  11378. func Xxcb_destroy_window_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11379. bp := tls.Alloc(80)
  11380. defer tls.Free(80)
  11381. var xcb_ret Txcb_void_cookie_t
  11382. var _ /* xcb_out at bp+64 */ Txcb_destroy_window_request_t
  11383. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11384. _ = xcb_ret
  11385. (*(*Txcb_destroy_window_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11386. (*(*Txcb_destroy_window_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11387. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11388. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11389. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11390. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11391. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req10)))
  11392. return xcb_ret
  11393. }
  11394. var _xcb_req10 = Txcb_protocol_request_t{
  11395. Fcount: uint64(2),
  11396. Fopcode: uint8(m_XCB_DESTROY_WINDOW),
  11397. Fisvoid: uint8(1),
  11398. }
  11399. func Xxcb_destroy_window(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11400. bp := tls.Alloc(80)
  11401. defer tls.Free(80)
  11402. var xcb_ret Txcb_void_cookie_t
  11403. var _ /* xcb_out at bp+64 */ Txcb_destroy_window_request_t
  11404. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11405. _ = xcb_ret
  11406. (*(*Txcb_destroy_window_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11407. (*(*Txcb_destroy_window_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11408. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11409. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11410. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11411. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11412. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req11)))
  11413. return xcb_ret
  11414. }
  11415. var _xcb_req11 = Txcb_protocol_request_t{
  11416. Fcount: uint64(2),
  11417. Fopcode: uint8(m_XCB_DESTROY_WINDOW),
  11418. Fisvoid: uint8(1),
  11419. }
  11420. func Xxcb_destroy_subwindows_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11421. bp := tls.Alloc(80)
  11422. defer tls.Free(80)
  11423. var xcb_ret Txcb_void_cookie_t
  11424. var _ /* xcb_out at bp+64 */ Txcb_destroy_subwindows_request_t
  11425. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11426. _ = xcb_ret
  11427. (*(*Txcb_destroy_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11428. (*(*Txcb_destroy_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11429. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11430. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11431. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11432. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11433. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req12)))
  11434. return xcb_ret
  11435. }
  11436. var _xcb_req12 = Txcb_protocol_request_t{
  11437. Fcount: uint64(2),
  11438. Fopcode: uint8(m_XCB_DESTROY_SUBWINDOWS),
  11439. Fisvoid: uint8(1),
  11440. }
  11441. func Xxcb_destroy_subwindows(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11442. bp := tls.Alloc(80)
  11443. defer tls.Free(80)
  11444. var xcb_ret Txcb_void_cookie_t
  11445. var _ /* xcb_out at bp+64 */ Txcb_destroy_subwindows_request_t
  11446. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11447. _ = xcb_ret
  11448. (*(*Txcb_destroy_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11449. (*(*Txcb_destroy_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11450. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11451. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11452. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11453. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11454. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req13)))
  11455. return xcb_ret
  11456. }
  11457. var _xcb_req13 = Txcb_protocol_request_t{
  11458. Fcount: uint64(2),
  11459. Fopcode: uint8(m_XCB_DESTROY_SUBWINDOWS),
  11460. Fisvoid: uint8(1),
  11461. }
  11462. func Xxcb_change_save_set_checked(tls *libc.TLS, c uintptr, mode Tuint8_t, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11463. bp := tls.Alloc(80)
  11464. defer tls.Free(80)
  11465. var xcb_ret Txcb_void_cookie_t
  11466. var _ /* xcb_out at bp+64 */ Txcb_change_save_set_request_t
  11467. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11468. _ = xcb_ret
  11469. (*(*Txcb_change_save_set_request_t)(unsafe.Pointer(bp + 64))).Fmode = mode
  11470. (*(*Txcb_change_save_set_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11471. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11472. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11473. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11474. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11475. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req14)))
  11476. return xcb_ret
  11477. }
  11478. var _xcb_req14 = Txcb_protocol_request_t{
  11479. Fcount: uint64(2),
  11480. Fopcode: uint8(m_XCB_CHANGE_SAVE_SET),
  11481. Fisvoid: uint8(1),
  11482. }
  11483. func Xxcb_change_save_set(tls *libc.TLS, c uintptr, mode Tuint8_t, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11484. bp := tls.Alloc(80)
  11485. defer tls.Free(80)
  11486. var xcb_ret Txcb_void_cookie_t
  11487. var _ /* xcb_out at bp+64 */ Txcb_change_save_set_request_t
  11488. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11489. _ = xcb_ret
  11490. (*(*Txcb_change_save_set_request_t)(unsafe.Pointer(bp + 64))).Fmode = mode
  11491. (*(*Txcb_change_save_set_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11492. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11493. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11494. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11495. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11496. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req15)))
  11497. return xcb_ret
  11498. }
  11499. var _xcb_req15 = Txcb_protocol_request_t{
  11500. Fcount: uint64(2),
  11501. Fopcode: uint8(m_XCB_CHANGE_SAVE_SET),
  11502. Fisvoid: uint8(1),
  11503. }
  11504. func Xxcb_reparent_window_checked(tls *libc.TLS, c uintptr, window Txcb_window_t, parent Txcb_window_t, x Tint16_t, y Tint16_t) (r Txcb_void_cookie_t) {
  11505. bp := tls.Alloc(80)
  11506. defer tls.Free(80)
  11507. var xcb_ret Txcb_void_cookie_t
  11508. var _ /* xcb_out at bp+64 */ Txcb_reparent_window_request_t
  11509. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11510. _ = xcb_ret
  11511. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11512. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11513. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 64))).Fparent = parent
  11514. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 64))).Fx = x
  11515. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 64))).Fy = y
  11516. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11517. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  11518. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11519. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11520. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req16)))
  11521. return xcb_ret
  11522. }
  11523. var _xcb_req16 = Txcb_protocol_request_t{
  11524. Fcount: uint64(2),
  11525. Fopcode: uint8(m_XCB_REPARENT_WINDOW),
  11526. Fisvoid: uint8(1),
  11527. }
  11528. func Xxcb_reparent_window(tls *libc.TLS, c uintptr, window Txcb_window_t, parent Txcb_window_t, x Tint16_t, y Tint16_t) (r Txcb_void_cookie_t) {
  11529. bp := tls.Alloc(80)
  11530. defer tls.Free(80)
  11531. var xcb_ret Txcb_void_cookie_t
  11532. var _ /* xcb_out at bp+64 */ Txcb_reparent_window_request_t
  11533. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11534. _ = xcb_ret
  11535. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11536. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11537. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 64))).Fparent = parent
  11538. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 64))).Fx = x
  11539. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 64))).Fy = y
  11540. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11541. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  11542. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11543. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11544. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req17)))
  11545. return xcb_ret
  11546. }
  11547. var _xcb_req17 = Txcb_protocol_request_t{
  11548. Fcount: uint64(2),
  11549. Fopcode: uint8(m_XCB_REPARENT_WINDOW),
  11550. Fisvoid: uint8(1),
  11551. }
  11552. func Xxcb_map_window_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11553. bp := tls.Alloc(80)
  11554. defer tls.Free(80)
  11555. var xcb_ret Txcb_void_cookie_t
  11556. var _ /* xcb_out at bp+64 */ Txcb_map_window_request_t
  11557. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11558. _ = xcb_ret
  11559. (*(*Txcb_map_window_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11560. (*(*Txcb_map_window_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11561. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11562. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11563. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11564. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11565. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req18)))
  11566. return xcb_ret
  11567. }
  11568. var _xcb_req18 = Txcb_protocol_request_t{
  11569. Fcount: uint64(2),
  11570. Fopcode: uint8(m_XCB_MAP_WINDOW),
  11571. Fisvoid: uint8(1),
  11572. }
  11573. func Xxcb_map_window(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11574. bp := tls.Alloc(80)
  11575. defer tls.Free(80)
  11576. var xcb_ret Txcb_void_cookie_t
  11577. var _ /* xcb_out at bp+64 */ Txcb_map_window_request_t
  11578. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11579. _ = xcb_ret
  11580. (*(*Txcb_map_window_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11581. (*(*Txcb_map_window_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11582. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11583. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11584. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11585. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11586. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req19)))
  11587. return xcb_ret
  11588. }
  11589. var _xcb_req19 = Txcb_protocol_request_t{
  11590. Fcount: uint64(2),
  11591. Fopcode: uint8(m_XCB_MAP_WINDOW),
  11592. Fisvoid: uint8(1),
  11593. }
  11594. func Xxcb_map_subwindows_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11595. bp := tls.Alloc(80)
  11596. defer tls.Free(80)
  11597. var xcb_ret Txcb_void_cookie_t
  11598. var _ /* xcb_out at bp+64 */ Txcb_map_subwindows_request_t
  11599. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11600. _ = xcb_ret
  11601. (*(*Txcb_map_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11602. (*(*Txcb_map_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11603. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11604. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11605. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11606. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11607. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req20)))
  11608. return xcb_ret
  11609. }
  11610. var _xcb_req20 = Txcb_protocol_request_t{
  11611. Fcount: uint64(2),
  11612. Fopcode: uint8(m_XCB_MAP_SUBWINDOWS),
  11613. Fisvoid: uint8(1),
  11614. }
  11615. func Xxcb_map_subwindows(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11616. bp := tls.Alloc(80)
  11617. defer tls.Free(80)
  11618. var xcb_ret Txcb_void_cookie_t
  11619. var _ /* xcb_out at bp+64 */ Txcb_map_subwindows_request_t
  11620. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11621. _ = xcb_ret
  11622. (*(*Txcb_map_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11623. (*(*Txcb_map_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11624. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11625. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11626. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11627. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11628. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req21)))
  11629. return xcb_ret
  11630. }
  11631. var _xcb_req21 = Txcb_protocol_request_t{
  11632. Fcount: uint64(2),
  11633. Fopcode: uint8(m_XCB_MAP_SUBWINDOWS),
  11634. Fisvoid: uint8(1),
  11635. }
  11636. func Xxcb_unmap_window_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11637. bp := tls.Alloc(80)
  11638. defer tls.Free(80)
  11639. var xcb_ret Txcb_void_cookie_t
  11640. var _ /* xcb_out at bp+64 */ Txcb_unmap_window_request_t
  11641. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11642. _ = xcb_ret
  11643. (*(*Txcb_unmap_window_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11644. (*(*Txcb_unmap_window_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11645. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11646. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11647. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11648. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11649. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req22)))
  11650. return xcb_ret
  11651. }
  11652. var _xcb_req22 = Txcb_protocol_request_t{
  11653. Fcount: uint64(2),
  11654. Fopcode: uint8(m_XCB_UNMAP_WINDOW),
  11655. Fisvoid: uint8(1),
  11656. }
  11657. func Xxcb_unmap_window(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11658. bp := tls.Alloc(80)
  11659. defer tls.Free(80)
  11660. var xcb_ret Txcb_void_cookie_t
  11661. var _ /* xcb_out at bp+64 */ Txcb_unmap_window_request_t
  11662. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11663. _ = xcb_ret
  11664. (*(*Txcb_unmap_window_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11665. (*(*Txcb_unmap_window_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11666. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11667. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11668. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11669. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11670. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req23)))
  11671. return xcb_ret
  11672. }
  11673. var _xcb_req23 = Txcb_protocol_request_t{
  11674. Fcount: uint64(2),
  11675. Fopcode: uint8(m_XCB_UNMAP_WINDOW),
  11676. Fisvoid: uint8(1),
  11677. }
  11678. func Xxcb_unmap_subwindows_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11679. bp := tls.Alloc(80)
  11680. defer tls.Free(80)
  11681. var xcb_ret Txcb_void_cookie_t
  11682. var _ /* xcb_out at bp+64 */ Txcb_unmap_subwindows_request_t
  11683. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11684. _ = xcb_ret
  11685. (*(*Txcb_unmap_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11686. (*(*Txcb_unmap_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11687. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11688. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11689. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11690. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11691. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req24)))
  11692. return xcb_ret
  11693. }
  11694. var _xcb_req24 = Txcb_protocol_request_t{
  11695. Fcount: uint64(2),
  11696. Fopcode: uint8(m_XCB_UNMAP_SUBWINDOWS),
  11697. Fisvoid: uint8(1),
  11698. }
  11699. func Xxcb_unmap_subwindows(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11700. bp := tls.Alloc(80)
  11701. defer tls.Free(80)
  11702. var xcb_ret Txcb_void_cookie_t
  11703. var _ /* xcb_out at bp+64 */ Txcb_unmap_subwindows_request_t
  11704. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11705. _ = xcb_ret
  11706. (*(*Txcb_unmap_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  11707. (*(*Txcb_unmap_subwindows_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  11708. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  11709. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  11710. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11711. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11712. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req25)))
  11713. return xcb_ret
  11714. }
  11715. var _xcb_req25 = Txcb_protocol_request_t{
  11716. Fcount: uint64(2),
  11717. Fopcode: uint8(m_XCB_UNMAP_SUBWINDOWS),
  11718. Fisvoid: uint8(1),
  11719. }
  11720. func Xxcb_configure_window_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint16_t, _aux uintptr) (r int32) {
  11721. bp := tls.Alloc(16)
  11722. defer tls.Free(16)
  11723. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  11724. var xcb_out, xcb_tmp uintptr
  11725. var xcb_parts [8]Tiovec
  11726. var _ /* xcb_pad0 at bp+0 */ [3]int8
  11727. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  11728. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  11729. xcb_buffer_len = uint32(0)
  11730. xcb_align_to = uint32(0)
  11731. xcb_padding_offset = uint32(0)
  11732. xcb_pad = uint32(0)
  11733. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  11734. xcb_parts_idx = uint32(0)
  11735. xcb_block_len = uint32(0)
  11736. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_X) != 0 {
  11737. /* xcb_configure_window_value_list_t.x */
  11738. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  11739. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11740. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  11741. xcb_parts_idx++
  11742. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11743. }
  11744. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_Y) != 0 {
  11745. /* xcb_configure_window_value_list_t.y */
  11746. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  11747. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11748. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  11749. xcb_parts_idx++
  11750. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11751. }
  11752. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_WIDTH) != 0 {
  11753. /* xcb_configure_window_value_list_t.width */
  11754. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  11755. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11756. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  11757. xcb_parts_idx++
  11758. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11759. }
  11760. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_HEIGHT) != 0 {
  11761. /* xcb_configure_window_value_list_t.height */
  11762. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  11763. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11764. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  11765. xcb_parts_idx++
  11766. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11767. }
  11768. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_BORDER_WIDTH) != 0 {
  11769. /* xcb_configure_window_value_list_t.border_width */
  11770. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  11771. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11772. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  11773. xcb_parts_idx++
  11774. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11775. }
  11776. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_SIBLING) != 0 {
  11777. /* xcb_configure_window_value_list_t.sibling */
  11778. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  11779. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11780. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  11781. xcb_parts_idx++
  11782. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11783. }
  11784. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_STACK_MODE) != 0 {
  11785. /* xcb_configure_window_value_list_t.stack_mode */
  11786. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  11787. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11788. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  11789. xcb_parts_idx++
  11790. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11791. }
  11792. /* insert padding */
  11793. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  11794. xcb_buffer_len += xcb_block_len + xcb_pad
  11795. if uint32(0) != xcb_pad {
  11796. xcb_parts[xcb_parts_idx].Fiov_base = bp
  11797. xcb_parts[xcb_parts_idx].Fiov_len = uint64(xcb_pad)
  11798. xcb_parts_idx++
  11799. xcb_pad = uint32(0)
  11800. }
  11801. xcb_block_len = uint32(0)
  11802. xcb_padding_offset = uint32(0)
  11803. if libc.UintptrFromInt32(0) == xcb_out {
  11804. /* allocate memory */
  11805. xcb_out = libc.Xmalloc(tls, uint64(xcb_buffer_len))
  11806. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  11807. }
  11808. xcb_tmp = xcb_out
  11809. i = uint32(0)
  11810. for {
  11811. if !(i < xcb_parts_idx) {
  11812. break
  11813. }
  11814. if uintptr(0) != xcb_parts[i].Fiov_base && uint64(0) != xcb_parts[i].Fiov_len {
  11815. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  11816. }
  11817. if uint64(0) != xcb_parts[i].Fiov_len {
  11818. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  11819. }
  11820. goto _1
  11821. _1:
  11822. ;
  11823. i++
  11824. }
  11825. return libc.Int32FromUint32(xcb_buffer_len)
  11826. }
  11827. func Xxcb_configure_window_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint16_t, _aux uintptr) (r int32) {
  11828. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  11829. var xcb_tmp uintptr
  11830. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  11831. xcb_tmp = _buffer
  11832. xcb_buffer_len = uint32(0)
  11833. xcb_block_len = uint32(0)
  11834. xcb_pad = uint32(0)
  11835. xcb_align_to = uint32(0)
  11836. xcb_padding_offset = uint32(0)
  11837. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_X) != 0 {
  11838. /* xcb_configure_window_value_list_t.x */
  11839. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fx = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  11840. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11841. xcb_tmp += uintptr(4)
  11842. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11843. }
  11844. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_Y) != 0 {
  11845. /* xcb_configure_window_value_list_t.y */
  11846. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fy = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  11847. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11848. xcb_tmp += uintptr(4)
  11849. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11850. }
  11851. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_WIDTH) != 0 {
  11852. /* xcb_configure_window_value_list_t.width */
  11853. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fwidth = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11854. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11855. xcb_tmp += uintptr(4)
  11856. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11857. }
  11858. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_HEIGHT) != 0 {
  11859. /* xcb_configure_window_value_list_t.height */
  11860. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fheight = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11861. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11862. xcb_tmp += uintptr(4)
  11863. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11864. }
  11865. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_BORDER_WIDTH) != 0 {
  11866. /* xcb_configure_window_value_list_t.border_width */
  11867. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fborder_width = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11868. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11869. xcb_tmp += uintptr(4)
  11870. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11871. }
  11872. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_SIBLING) != 0 {
  11873. /* xcb_configure_window_value_list_t.sibling */
  11874. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fsibling = *(*Txcb_window_t)(unsafe.Pointer(xcb_tmp))
  11875. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11876. xcb_tmp += uintptr(4)
  11877. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11878. }
  11879. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_STACK_MODE) != 0 {
  11880. /* xcb_configure_window_value_list_t.stack_mode */
  11881. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fstack_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11882. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  11883. xcb_tmp += uintptr(4)
  11884. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  11885. }
  11886. /* insert padding */
  11887. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  11888. xcb_buffer_len += xcb_block_len + xcb_pad
  11889. if uint32(0) != xcb_pad {
  11890. xcb_tmp += uintptr(xcb_pad)
  11891. xcb_pad = uint32(0)
  11892. }
  11893. xcb_block_len = uint32(0)
  11894. xcb_padding_offset = uint32(0)
  11895. return libc.Int32FromUint32(xcb_buffer_len)
  11896. }
  11897. func Xxcb_configure_window_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint16_t) (r int32) {
  11898. bp := tls.Alloc(32)
  11899. defer tls.Free(32)
  11900. var _ /* _aux at bp+0 */ Txcb_configure_window_value_list_t
  11901. return Xxcb_configure_window_value_list_unpack(tls, _buffer, value_mask, bp)
  11902. }
  11903. func Xxcb_configure_window_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  11904. var _aux, xcb_tmp uintptr
  11905. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  11906. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  11907. xcb_tmp = _buffer
  11908. _aux = _buffer
  11909. xcb_buffer_len = uint32(0)
  11910. xcb_block_len = uint32(0)
  11911. xcb_pad = uint32(0)
  11912. xcb_align_to = uint32(0)
  11913. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  11914. xcb_tmp += uintptr(xcb_block_len)
  11915. xcb_buffer_len += xcb_block_len
  11916. xcb_block_len = uint32(0)
  11917. /* value_list */
  11918. xcb_block_len += libc.Uint32FromInt32(Xxcb_configure_window_value_list_sizeof(tls, xcb_tmp, (*Txcb_configure_window_request_t)(unsafe.Pointer(_aux)).Fvalue_mask))
  11919. xcb_tmp += uintptr(xcb_block_len)
  11920. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  11921. /* insert padding */
  11922. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  11923. xcb_buffer_len += xcb_block_len + xcb_pad
  11924. if uint32(0) != xcb_pad {
  11925. xcb_tmp += uintptr(xcb_pad)
  11926. xcb_pad = uint32(0)
  11927. }
  11928. xcb_block_len = uint32(0)
  11929. return libc.Int32FromUint32(xcb_buffer_len)
  11930. }
  11931. func Xxcb_configure_window_checked(tls *libc.TLS, c uintptr, window Txcb_window_t, value_mask Tuint16_t, value_list uintptr) (r Txcb_void_cookie_t) {
  11932. bp := tls.Alloc(96)
  11933. defer tls.Free(96)
  11934. var xcb_ret Txcb_void_cookie_t
  11935. var _ /* xcb_out at bp+80 */ Txcb_configure_window_request_t
  11936. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  11937. _ = xcb_ret
  11938. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  11939. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fwindow = window
  11940. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  11941. libc.Xmemset(tls, bp+80+10, 0, uint64(2))
  11942. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  11943. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  11944. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11945. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11946. /* xcb_configure_window_value_list_t value_list */
  11947. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  11948. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_configure_window_value_list_sizeof(tls, value_list, value_mask))
  11949. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req26)))
  11950. return xcb_ret
  11951. }
  11952. var _xcb_req26 = Txcb_protocol_request_t{
  11953. Fcount: uint64(3),
  11954. Fopcode: uint8(m_XCB_CONFIGURE_WINDOW),
  11955. Fisvoid: uint8(1),
  11956. }
  11957. func Xxcb_configure_window(tls *libc.TLS, c uintptr, window Txcb_window_t, value_mask Tuint16_t, value_list uintptr) (r Txcb_void_cookie_t) {
  11958. bp := tls.Alloc(96)
  11959. defer tls.Free(96)
  11960. var xcb_ret Txcb_void_cookie_t
  11961. var _ /* xcb_out at bp+80 */ Txcb_configure_window_request_t
  11962. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  11963. _ = xcb_ret
  11964. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  11965. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fwindow = window
  11966. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  11967. libc.Xmemset(tls, bp+80+10, 0, uint64(2))
  11968. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  11969. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  11970. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11971. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  11972. /* xcb_configure_window_value_list_t value_list */
  11973. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  11974. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_configure_window_value_list_sizeof(tls, value_list, value_mask))
  11975. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req27)))
  11976. return xcb_ret
  11977. }
  11978. var _xcb_req27 = Txcb_protocol_request_t{
  11979. Fcount: uint64(3),
  11980. Fopcode: uint8(m_XCB_CONFIGURE_WINDOW),
  11981. Fisvoid: uint8(1),
  11982. }
  11983. func Xxcb_configure_window_aux_checked(tls *libc.TLS, c uintptr, window Txcb_window_t, value_mask Tuint16_t, value_list uintptr) (r Txcb_void_cookie_t) {
  11984. bp := tls.Alloc(112)
  11985. defer tls.Free(112)
  11986. var xcb_ret Txcb_void_cookie_t
  11987. var _ /* xcb_aux0 at bp+96 */ uintptr
  11988. var _ /* xcb_out at bp+80 */ Txcb_configure_window_request_t
  11989. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  11990. _ = xcb_ret
  11991. *(*uintptr)(unsafe.Pointer(bp + 96)) = uintptr(0)
  11992. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  11993. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fwindow = window
  11994. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  11995. libc.Xmemset(tls, bp+80+10, 0, uint64(2))
  11996. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  11997. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  11998. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11999. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12000. /* xcb_configure_window_value_list_t value_list */
  12001. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_configure_window_value_list_serialize(tls, bp+96, value_mask, value_list))
  12002. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 96))
  12003. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req28)))
  12004. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))
  12005. return xcb_ret
  12006. }
  12007. var _xcb_req28 = Txcb_protocol_request_t{
  12008. Fcount: uint64(3),
  12009. Fopcode: uint8(m_XCB_CONFIGURE_WINDOW),
  12010. Fisvoid: uint8(1),
  12011. }
  12012. func Xxcb_configure_window_aux(tls *libc.TLS, c uintptr, window Txcb_window_t, value_mask Tuint16_t, value_list uintptr) (r Txcb_void_cookie_t) {
  12013. bp := tls.Alloc(112)
  12014. defer tls.Free(112)
  12015. var xcb_ret Txcb_void_cookie_t
  12016. var _ /* xcb_aux0 at bp+96 */ uintptr
  12017. var _ /* xcb_out at bp+80 */ Txcb_configure_window_request_t
  12018. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  12019. _ = xcb_ret
  12020. *(*uintptr)(unsafe.Pointer(bp + 96)) = uintptr(0)
  12021. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  12022. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fwindow = window
  12023. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  12024. libc.Xmemset(tls, bp+80+10, 0, uint64(2))
  12025. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  12026. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  12027. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12028. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12029. /* xcb_configure_window_value_list_t value_list */
  12030. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_configure_window_value_list_serialize(tls, bp+96, value_mask, value_list))
  12031. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 96))
  12032. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req29)))
  12033. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))
  12034. return xcb_ret
  12035. }
  12036. var _xcb_req29 = Txcb_protocol_request_t{
  12037. Fcount: uint64(3),
  12038. Fopcode: uint8(m_XCB_CONFIGURE_WINDOW),
  12039. Fisvoid: uint8(1),
  12040. }
  12041. func Xxcb_configure_window_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  12042. return R + libc.UintptrFromInt32(1)*12
  12043. }
  12044. func Xxcb_circulate_window_checked(tls *libc.TLS, c uintptr, direction Tuint8_t, window Txcb_window_t) (r Txcb_void_cookie_t) {
  12045. bp := tls.Alloc(80)
  12046. defer tls.Free(80)
  12047. var xcb_ret Txcb_void_cookie_t
  12048. var _ /* xcb_out at bp+64 */ Txcb_circulate_window_request_t
  12049. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12050. _ = xcb_ret
  12051. (*(*Txcb_circulate_window_request_t)(unsafe.Pointer(bp + 64))).Fdirection = direction
  12052. (*(*Txcb_circulate_window_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  12053. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12054. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12055. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12056. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12057. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req30)))
  12058. return xcb_ret
  12059. }
  12060. var _xcb_req30 = Txcb_protocol_request_t{
  12061. Fcount: uint64(2),
  12062. Fopcode: uint8(m_XCB_CIRCULATE_WINDOW),
  12063. Fisvoid: uint8(1),
  12064. }
  12065. func Xxcb_circulate_window(tls *libc.TLS, c uintptr, direction Tuint8_t, window Txcb_window_t) (r Txcb_void_cookie_t) {
  12066. bp := tls.Alloc(80)
  12067. defer tls.Free(80)
  12068. var xcb_ret Txcb_void_cookie_t
  12069. var _ /* xcb_out at bp+64 */ Txcb_circulate_window_request_t
  12070. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12071. _ = xcb_ret
  12072. (*(*Txcb_circulate_window_request_t)(unsafe.Pointer(bp + 64))).Fdirection = direction
  12073. (*(*Txcb_circulate_window_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  12074. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12075. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12076. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12077. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12078. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req31)))
  12079. return xcb_ret
  12080. }
  12081. var _xcb_req31 = Txcb_protocol_request_t{
  12082. Fcount: uint64(2),
  12083. Fopcode: uint8(m_XCB_CIRCULATE_WINDOW),
  12084. Fisvoid: uint8(1),
  12085. }
  12086. func Xxcb_get_geometry(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t) (r Txcb_get_geometry_cookie_t) {
  12087. bp := tls.Alloc(80)
  12088. defer tls.Free(80)
  12089. var xcb_ret Txcb_get_geometry_cookie_t
  12090. var _ /* xcb_out at bp+64 */ Txcb_get_geometry_request_t
  12091. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12092. _ = xcb_ret
  12093. (*(*Txcb_get_geometry_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12094. (*(*Txcb_get_geometry_request_t)(unsafe.Pointer(bp + 64))).Fdrawable = drawable
  12095. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12096. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12097. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12098. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12099. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req32)))
  12100. return xcb_ret
  12101. }
  12102. var _xcb_req32 = Txcb_protocol_request_t{
  12103. Fcount: uint64(2),
  12104. Fopcode: uint8(m_XCB_GET_GEOMETRY),
  12105. }
  12106. func Xxcb_get_geometry_unchecked(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t) (r Txcb_get_geometry_cookie_t) {
  12107. bp := tls.Alloc(80)
  12108. defer tls.Free(80)
  12109. var xcb_ret Txcb_get_geometry_cookie_t
  12110. var _ /* xcb_out at bp+64 */ Txcb_get_geometry_request_t
  12111. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12112. _ = xcb_ret
  12113. (*(*Txcb_get_geometry_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12114. (*(*Txcb_get_geometry_request_t)(unsafe.Pointer(bp + 64))).Fdrawable = drawable
  12115. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12116. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12117. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12118. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12119. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req33)))
  12120. return xcb_ret
  12121. }
  12122. var _xcb_req33 = Txcb_protocol_request_t{
  12123. Fcount: uint64(2),
  12124. Fopcode: uint8(m_XCB_GET_GEOMETRY),
  12125. }
  12126. func Xxcb_get_geometry_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_geometry_cookie_t, e uintptr) (r uintptr) {
  12127. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12128. }
  12129. func Xxcb_query_tree_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  12130. var _aux, xcb_tmp uintptr
  12131. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  12132. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  12133. xcb_tmp = _buffer
  12134. _aux = _buffer
  12135. xcb_buffer_len = uint32(0)
  12136. xcb_block_len = uint32(0)
  12137. xcb_pad = uint32(0)
  12138. xcb_align_to = uint32(0)
  12139. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  12140. xcb_tmp += uintptr(xcb_block_len)
  12141. xcb_buffer_len += xcb_block_len
  12142. xcb_block_len = uint32(0)
  12143. /* children */
  12144. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_query_tree_reply_t)(unsafe.Pointer(_aux)).Fchildren_len)*libc.Uint64FromInt64(4))
  12145. xcb_tmp += uintptr(xcb_block_len)
  12146. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  12147. /* insert padding */
  12148. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  12149. xcb_buffer_len += xcb_block_len + xcb_pad
  12150. if uint32(0) != xcb_pad {
  12151. xcb_tmp += uintptr(xcb_pad)
  12152. xcb_pad = uint32(0)
  12153. }
  12154. xcb_block_len = uint32(0)
  12155. return libc.Int32FromUint32(xcb_buffer_len)
  12156. }
  12157. func Xxcb_query_tree(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_query_tree_cookie_t) {
  12158. bp := tls.Alloc(80)
  12159. defer tls.Free(80)
  12160. var xcb_ret Txcb_query_tree_cookie_t
  12161. var _ /* xcb_out at bp+64 */ Txcb_query_tree_request_t
  12162. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12163. _ = xcb_ret
  12164. (*(*Txcb_query_tree_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12165. (*(*Txcb_query_tree_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  12166. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12167. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12168. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12169. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12170. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req34)))
  12171. return xcb_ret
  12172. }
  12173. var _xcb_req34 = Txcb_protocol_request_t{
  12174. Fcount: uint64(2),
  12175. Fopcode: uint8(m_XCB_QUERY_TREE),
  12176. }
  12177. func Xxcb_query_tree_unchecked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_query_tree_cookie_t) {
  12178. bp := tls.Alloc(80)
  12179. defer tls.Free(80)
  12180. var xcb_ret Txcb_query_tree_cookie_t
  12181. var _ /* xcb_out at bp+64 */ Txcb_query_tree_request_t
  12182. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12183. _ = xcb_ret
  12184. (*(*Txcb_query_tree_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12185. (*(*Txcb_query_tree_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  12186. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12187. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12188. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12189. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12190. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req35)))
  12191. return xcb_ret
  12192. }
  12193. var _xcb_req35 = Txcb_protocol_request_t{
  12194. Fcount: uint64(2),
  12195. Fopcode: uint8(m_XCB_QUERY_TREE),
  12196. }
  12197. func Xxcb_query_tree_children(tls *libc.TLS, R uintptr) (r uintptr) {
  12198. return R + libc.UintptrFromInt32(1)*32
  12199. }
  12200. func Xxcb_query_tree_children_length(tls *libc.TLS, R uintptr) (r int32) {
  12201. return libc.Int32FromUint16((*Txcb_query_tree_reply_t)(unsafe.Pointer(R)).Fchildren_len)
  12202. }
  12203. func Xxcb_query_tree_children_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  12204. var i Txcb_generic_iterator_t
  12205. _ = i
  12206. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_query_tree_reply_t)(unsafe.Pointer(R)).Fchildren_len)*4
  12207. i.Frem = 0
  12208. i.Findex = int32(int64(i.Fdata) - int64(R))
  12209. return i
  12210. }
  12211. func Xxcb_query_tree_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_tree_cookie_t, e uintptr) (r uintptr) {
  12212. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12213. }
  12214. func Xxcb_intern_atom_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  12215. var _aux, xcb_tmp uintptr
  12216. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  12217. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  12218. xcb_tmp = _buffer
  12219. _aux = _buffer
  12220. xcb_buffer_len = uint32(0)
  12221. xcb_block_len = uint32(0)
  12222. xcb_pad = uint32(0)
  12223. xcb_align_to = uint32(0)
  12224. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  12225. xcb_tmp += uintptr(xcb_block_len)
  12226. xcb_buffer_len += xcb_block_len
  12227. xcb_block_len = uint32(0)
  12228. /* name */
  12229. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_intern_atom_request_t)(unsafe.Pointer(_aux)).Fname_len)*libc.Uint64FromInt64(1))
  12230. xcb_tmp += uintptr(xcb_block_len)
  12231. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  12232. /* insert padding */
  12233. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  12234. xcb_buffer_len += xcb_block_len + xcb_pad
  12235. if uint32(0) != xcb_pad {
  12236. xcb_tmp += uintptr(xcb_pad)
  12237. xcb_pad = uint32(0)
  12238. }
  12239. xcb_block_len = uint32(0)
  12240. return libc.Int32FromUint32(xcb_buffer_len)
  12241. }
  12242. func Xxcb_intern_atom(tls *libc.TLS, c uintptr, only_if_exists Tuint8_t, name_len Tuint16_t, name uintptr) (r Txcb_intern_atom_cookie_t) {
  12243. bp := tls.Alloc(112)
  12244. defer tls.Free(112)
  12245. var xcb_ret Txcb_intern_atom_cookie_t
  12246. var _ /* xcb_out at bp+96 */ Txcb_intern_atom_request_t
  12247. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  12248. _ = xcb_ret
  12249. (*(*Txcb_intern_atom_request_t)(unsafe.Pointer(bp + 96))).Fonly_if_exists = only_if_exists
  12250. (*(*Txcb_intern_atom_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  12251. libc.Xmemset(tls, bp+96+6, 0, uint64(2))
  12252. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  12253. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12254. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12255. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12256. /* char name */
  12257. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  12258. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  12259. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  12260. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  12261. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req36)))
  12262. return xcb_ret
  12263. }
  12264. var _xcb_req36 = Txcb_protocol_request_t{
  12265. Fcount: uint64(4),
  12266. Fopcode: uint8(m_XCB_INTERN_ATOM),
  12267. }
  12268. func Xxcb_intern_atom_unchecked(tls *libc.TLS, c uintptr, only_if_exists Tuint8_t, name_len Tuint16_t, name uintptr) (r Txcb_intern_atom_cookie_t) {
  12269. bp := tls.Alloc(112)
  12270. defer tls.Free(112)
  12271. var xcb_ret Txcb_intern_atom_cookie_t
  12272. var _ /* xcb_out at bp+96 */ Txcb_intern_atom_request_t
  12273. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  12274. _ = xcb_ret
  12275. (*(*Txcb_intern_atom_request_t)(unsafe.Pointer(bp + 96))).Fonly_if_exists = only_if_exists
  12276. (*(*Txcb_intern_atom_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  12277. libc.Xmemset(tls, bp+96+6, 0, uint64(2))
  12278. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  12279. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12280. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12281. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12282. /* char name */
  12283. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  12284. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  12285. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  12286. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  12287. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req37)))
  12288. return xcb_ret
  12289. }
  12290. var _xcb_req37 = Txcb_protocol_request_t{
  12291. Fcount: uint64(4),
  12292. Fopcode: uint8(m_XCB_INTERN_ATOM),
  12293. }
  12294. func Xxcb_intern_atom_reply(tls *libc.TLS, c uintptr, cookie Txcb_intern_atom_cookie_t, e uintptr) (r uintptr) {
  12295. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12296. }
  12297. func Xxcb_get_atom_name_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  12298. var _aux, xcb_tmp uintptr
  12299. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  12300. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  12301. xcb_tmp = _buffer
  12302. _aux = _buffer
  12303. xcb_buffer_len = uint32(0)
  12304. xcb_block_len = uint32(0)
  12305. xcb_pad = uint32(0)
  12306. xcb_align_to = uint32(0)
  12307. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  12308. xcb_tmp += uintptr(xcb_block_len)
  12309. xcb_buffer_len += xcb_block_len
  12310. xcb_block_len = uint32(0)
  12311. /* name */
  12312. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_get_atom_name_reply_t)(unsafe.Pointer(_aux)).Fname_len)*libc.Uint64FromInt64(1))
  12313. xcb_tmp += uintptr(xcb_block_len)
  12314. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  12315. /* insert padding */
  12316. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  12317. xcb_buffer_len += xcb_block_len + xcb_pad
  12318. if uint32(0) != xcb_pad {
  12319. xcb_tmp += uintptr(xcb_pad)
  12320. xcb_pad = uint32(0)
  12321. }
  12322. xcb_block_len = uint32(0)
  12323. return libc.Int32FromUint32(xcb_buffer_len)
  12324. }
  12325. func Xxcb_get_atom_name(tls *libc.TLS, c uintptr, atom Txcb_atom_t) (r Txcb_get_atom_name_cookie_t) {
  12326. bp := tls.Alloc(80)
  12327. defer tls.Free(80)
  12328. var xcb_ret Txcb_get_atom_name_cookie_t
  12329. var _ /* xcb_out at bp+64 */ Txcb_get_atom_name_request_t
  12330. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12331. _ = xcb_ret
  12332. (*(*Txcb_get_atom_name_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12333. (*(*Txcb_get_atom_name_request_t)(unsafe.Pointer(bp + 64))).Fatom = atom
  12334. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12335. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12336. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12337. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12338. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req38)))
  12339. return xcb_ret
  12340. }
  12341. var _xcb_req38 = Txcb_protocol_request_t{
  12342. Fcount: uint64(2),
  12343. Fopcode: uint8(m_XCB_GET_ATOM_NAME),
  12344. }
  12345. func Xxcb_get_atom_name_unchecked(tls *libc.TLS, c uintptr, atom Txcb_atom_t) (r Txcb_get_atom_name_cookie_t) {
  12346. bp := tls.Alloc(80)
  12347. defer tls.Free(80)
  12348. var xcb_ret Txcb_get_atom_name_cookie_t
  12349. var _ /* xcb_out at bp+64 */ Txcb_get_atom_name_request_t
  12350. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12351. _ = xcb_ret
  12352. (*(*Txcb_get_atom_name_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12353. (*(*Txcb_get_atom_name_request_t)(unsafe.Pointer(bp + 64))).Fatom = atom
  12354. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12355. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12356. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12357. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12358. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req39)))
  12359. return xcb_ret
  12360. }
  12361. var _xcb_req39 = Txcb_protocol_request_t{
  12362. Fcount: uint64(2),
  12363. Fopcode: uint8(m_XCB_GET_ATOM_NAME),
  12364. }
  12365. func Xxcb_get_atom_name_name(tls *libc.TLS, R uintptr) (r uintptr) {
  12366. return R + libc.UintptrFromInt32(1)*32
  12367. }
  12368. func Xxcb_get_atom_name_name_length(tls *libc.TLS, R uintptr) (r int32) {
  12369. return libc.Int32FromUint16((*Txcb_get_atom_name_reply_t)(unsafe.Pointer(R)).Fname_len)
  12370. }
  12371. func Xxcb_get_atom_name_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  12372. var i Txcb_generic_iterator_t
  12373. _ = i
  12374. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_get_atom_name_reply_t)(unsafe.Pointer(R)).Fname_len)
  12375. i.Frem = 0
  12376. i.Findex = int32(int64(i.Fdata) - int64(R))
  12377. return i
  12378. }
  12379. func Xxcb_get_atom_name_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_atom_name_cookie_t, e uintptr) (r uintptr) {
  12380. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12381. }
  12382. func Xxcb_change_property_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  12383. var _aux, xcb_tmp uintptr
  12384. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  12385. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  12386. xcb_tmp = _buffer
  12387. _aux = _buffer
  12388. xcb_buffer_len = uint32(0)
  12389. xcb_block_len = uint32(0)
  12390. xcb_pad = uint32(0)
  12391. xcb_align_to = uint32(0)
  12392. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(24))
  12393. xcb_tmp += uintptr(xcb_block_len)
  12394. xcb_buffer_len += xcb_block_len
  12395. xcb_block_len = uint32(0)
  12396. /* data */
  12397. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_change_property_request_t)(unsafe.Pointer(_aux)).Fdata_len*uint32((*Txcb_change_property_request_t)(unsafe.Pointer(_aux)).Fformat)/libc.Uint32FromInt32(8))*libc.Uint64FromInt64(1))
  12398. xcb_tmp += uintptr(xcb_block_len)
  12399. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  12400. /* insert padding */
  12401. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  12402. xcb_buffer_len += xcb_block_len + xcb_pad
  12403. if uint32(0) != xcb_pad {
  12404. xcb_tmp += uintptr(xcb_pad)
  12405. xcb_pad = uint32(0)
  12406. }
  12407. xcb_block_len = uint32(0)
  12408. return libc.Int32FromUint32(xcb_buffer_len)
  12409. }
  12410. func Xxcb_change_property_checked(tls *libc.TLS, c uintptr, mode Tuint8_t, window Txcb_window_t, property Txcb_atom_t, type1 Txcb_atom_t, format Tuint8_t, data_len Tuint32_t, data uintptr) (r Txcb_void_cookie_t) {
  12411. bp := tls.Alloc(128)
  12412. defer tls.Free(128)
  12413. var xcb_ret Txcb_void_cookie_t
  12414. var _ /* xcb_out at bp+96 */ Txcb_change_property_request_t
  12415. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  12416. _ = xcb_ret
  12417. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Fmode = mode
  12418. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Fwindow = window
  12419. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Fproperty = property
  12420. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Ftype1 = type1
  12421. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Fformat = format
  12422. libc.Xmemset(tls, bp+96+17, 0, uint64(3))
  12423. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Fdata_len = data_len
  12424. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  12425. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  12426. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12427. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12428. /* void data */
  12429. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = data
  12430. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(data_len*uint32(format)/libc.Uint32FromInt32(8)) * uint64(1)
  12431. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  12432. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  12433. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req40)))
  12434. return xcb_ret
  12435. }
  12436. var _xcb_req40 = Txcb_protocol_request_t{
  12437. Fcount: uint64(4),
  12438. Fopcode: uint8(m_XCB_CHANGE_PROPERTY),
  12439. Fisvoid: uint8(1),
  12440. }
  12441. func Xxcb_change_property(tls *libc.TLS, c uintptr, mode Tuint8_t, window Txcb_window_t, property Txcb_atom_t, type1 Txcb_atom_t, format Tuint8_t, data_len Tuint32_t, data uintptr) (r Txcb_void_cookie_t) {
  12442. bp := tls.Alloc(128)
  12443. defer tls.Free(128)
  12444. var xcb_ret Txcb_void_cookie_t
  12445. var _ /* xcb_out at bp+96 */ Txcb_change_property_request_t
  12446. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  12447. _ = xcb_ret
  12448. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Fmode = mode
  12449. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Fwindow = window
  12450. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Fproperty = property
  12451. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Ftype1 = type1
  12452. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Fformat = format
  12453. libc.Xmemset(tls, bp+96+17, 0, uint64(3))
  12454. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 96))).Fdata_len = data_len
  12455. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  12456. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  12457. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12458. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12459. /* void data */
  12460. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = data
  12461. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(data_len*uint32(format)/libc.Uint32FromInt32(8)) * uint64(1)
  12462. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  12463. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  12464. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req41)))
  12465. return xcb_ret
  12466. }
  12467. var _xcb_req41 = Txcb_protocol_request_t{
  12468. Fcount: uint64(4),
  12469. Fopcode: uint8(m_XCB_CHANGE_PROPERTY),
  12470. Fisvoid: uint8(1),
  12471. }
  12472. func Xxcb_change_property_data(tls *libc.TLS, R uintptr) (r uintptr) {
  12473. return R + libc.UintptrFromInt32(1)*24
  12474. }
  12475. func Xxcb_change_property_data_length(tls *libc.TLS, R uintptr) (r int32) {
  12476. return libc.Int32FromUint32((*Txcb_change_property_request_t)(unsafe.Pointer(R)).Fdata_len * uint32((*Txcb_change_property_request_t)(unsafe.Pointer(R)).Fformat) / libc.Uint32FromInt32(8))
  12477. }
  12478. func Xxcb_change_property_data_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  12479. var i Txcb_generic_iterator_t
  12480. _ = i
  12481. i.Fdata = R + libc.UintptrFromInt32(1)*24 + uintptr((*Txcb_change_property_request_t)(unsafe.Pointer(R)).Fdata_len*uint32((*Txcb_change_property_request_t)(unsafe.Pointer(R)).Fformat)/libc.Uint32FromInt32(8))
  12482. i.Frem = 0
  12483. i.Findex = int32(int64(i.Fdata) - int64(R))
  12484. return i
  12485. }
  12486. func Xxcb_delete_property_checked(tls *libc.TLS, c uintptr, window Txcb_window_t, property Txcb_atom_t) (r Txcb_void_cookie_t) {
  12487. bp := tls.Alloc(80)
  12488. defer tls.Free(80)
  12489. var xcb_ret Txcb_void_cookie_t
  12490. var _ /* xcb_out at bp+64 */ Txcb_delete_property_request_t
  12491. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12492. _ = xcb_ret
  12493. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12494. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  12495. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 64))).Fproperty = property
  12496. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12497. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  12498. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12499. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12500. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req42)))
  12501. return xcb_ret
  12502. }
  12503. var _xcb_req42 = Txcb_protocol_request_t{
  12504. Fcount: uint64(2),
  12505. Fopcode: uint8(m_XCB_DELETE_PROPERTY),
  12506. Fisvoid: uint8(1),
  12507. }
  12508. func Xxcb_delete_property(tls *libc.TLS, c uintptr, window Txcb_window_t, property Txcb_atom_t) (r Txcb_void_cookie_t) {
  12509. bp := tls.Alloc(80)
  12510. defer tls.Free(80)
  12511. var xcb_ret Txcb_void_cookie_t
  12512. var _ /* xcb_out at bp+64 */ Txcb_delete_property_request_t
  12513. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12514. _ = xcb_ret
  12515. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12516. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  12517. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 64))).Fproperty = property
  12518. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12519. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  12520. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12521. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12522. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req43)))
  12523. return xcb_ret
  12524. }
  12525. var _xcb_req43 = Txcb_protocol_request_t{
  12526. Fcount: uint64(2),
  12527. Fopcode: uint8(m_XCB_DELETE_PROPERTY),
  12528. Fisvoid: uint8(1),
  12529. }
  12530. func Xxcb_get_property_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  12531. var _aux, xcb_tmp uintptr
  12532. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  12533. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  12534. xcb_tmp = _buffer
  12535. _aux = _buffer
  12536. xcb_buffer_len = uint32(0)
  12537. xcb_block_len = uint32(0)
  12538. xcb_pad = uint32(0)
  12539. xcb_align_to = uint32(0)
  12540. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  12541. xcb_tmp += uintptr(xcb_block_len)
  12542. xcb_buffer_len += xcb_block_len
  12543. xcb_block_len = uint32(0)
  12544. /* value */
  12545. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_get_property_reply_t)(unsafe.Pointer(_aux)).Fvalue_len*libc.Uint32FromInt32(libc.Int32FromUint8((*Txcb_get_property_reply_t)(unsafe.Pointer(_aux)).Fformat)/libc.Int32FromInt32(8)))*libc.Uint64FromInt64(1))
  12546. xcb_tmp += uintptr(xcb_block_len)
  12547. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  12548. /* insert padding */
  12549. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  12550. xcb_buffer_len += xcb_block_len + xcb_pad
  12551. if uint32(0) != xcb_pad {
  12552. xcb_tmp += uintptr(xcb_pad)
  12553. xcb_pad = uint32(0)
  12554. }
  12555. xcb_block_len = uint32(0)
  12556. return libc.Int32FromUint32(xcb_buffer_len)
  12557. }
  12558. func Xxcb_get_property(tls *libc.TLS, c uintptr, _delete Tuint8_t, window Txcb_window_t, property Txcb_atom_t, type1 Txcb_atom_t, long_offset Tuint32_t, long_length Tuint32_t) (r Txcb_get_property_cookie_t) {
  12559. bp := tls.Alloc(96)
  12560. defer tls.Free(96)
  12561. var xcb_ret Txcb_get_property_cookie_t
  12562. var _ /* xcb_out at bp+64 */ Txcb_get_property_request_t
  12563. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12564. _ = xcb_ret
  12565. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).F_delete = _delete
  12566. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  12567. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).Fproperty = property
  12568. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).Ftype1 = type1
  12569. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).Flong_offset = long_offset
  12570. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).Flong_length = long_length
  12571. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12572. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  12573. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12574. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12575. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req44)))
  12576. return xcb_ret
  12577. }
  12578. var _xcb_req44 = Txcb_protocol_request_t{
  12579. Fcount: uint64(2),
  12580. Fopcode: uint8(m_XCB_GET_PROPERTY),
  12581. }
  12582. func Xxcb_get_property_unchecked(tls *libc.TLS, c uintptr, _delete Tuint8_t, window Txcb_window_t, property Txcb_atom_t, type1 Txcb_atom_t, long_offset Tuint32_t, long_length Tuint32_t) (r Txcb_get_property_cookie_t) {
  12583. bp := tls.Alloc(96)
  12584. defer tls.Free(96)
  12585. var xcb_ret Txcb_get_property_cookie_t
  12586. var _ /* xcb_out at bp+64 */ Txcb_get_property_request_t
  12587. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12588. _ = xcb_ret
  12589. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).F_delete = _delete
  12590. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  12591. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).Fproperty = property
  12592. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).Ftype1 = type1
  12593. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).Flong_offset = long_offset
  12594. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 64))).Flong_length = long_length
  12595. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12596. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  12597. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12598. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12599. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req45)))
  12600. return xcb_ret
  12601. }
  12602. var _xcb_req45 = Txcb_protocol_request_t{
  12603. Fcount: uint64(2),
  12604. Fopcode: uint8(m_XCB_GET_PROPERTY),
  12605. }
  12606. func Xxcb_get_property_value(tls *libc.TLS, R uintptr) (r uintptr) {
  12607. return R + libc.UintptrFromInt32(1)*32
  12608. }
  12609. func Xxcb_get_property_value_length(tls *libc.TLS, R uintptr) (r int32) {
  12610. return libc.Int32FromUint32((*Txcb_get_property_reply_t)(unsafe.Pointer(R)).Fvalue_len * libc.Uint32FromInt32(libc.Int32FromUint8((*Txcb_get_property_reply_t)(unsafe.Pointer(R)).Fformat)/libc.Int32FromInt32(8)))
  12611. }
  12612. func Xxcb_get_property_value_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  12613. var i Txcb_generic_iterator_t
  12614. _ = i
  12615. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_get_property_reply_t)(unsafe.Pointer(R)).Fvalue_len*libc.Uint32FromInt32(libc.Int32FromUint8((*Txcb_get_property_reply_t)(unsafe.Pointer(R)).Fformat)/libc.Int32FromInt32(8)))
  12616. i.Frem = 0
  12617. i.Findex = int32(int64(i.Fdata) - int64(R))
  12618. return i
  12619. }
  12620. func Xxcb_get_property_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_property_cookie_t, e uintptr) (r uintptr) {
  12621. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12622. }
  12623. func Xxcb_list_properties_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  12624. var _aux, xcb_tmp uintptr
  12625. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  12626. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  12627. xcb_tmp = _buffer
  12628. _aux = _buffer
  12629. xcb_buffer_len = uint32(0)
  12630. xcb_block_len = uint32(0)
  12631. xcb_pad = uint32(0)
  12632. xcb_align_to = uint32(0)
  12633. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  12634. xcb_tmp += uintptr(xcb_block_len)
  12635. xcb_buffer_len += xcb_block_len
  12636. xcb_block_len = uint32(0)
  12637. /* atoms */
  12638. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_list_properties_reply_t)(unsafe.Pointer(_aux)).Fatoms_len)*libc.Uint64FromInt64(4))
  12639. xcb_tmp += uintptr(xcb_block_len)
  12640. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  12641. /* insert padding */
  12642. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  12643. xcb_buffer_len += xcb_block_len + xcb_pad
  12644. if uint32(0) != xcb_pad {
  12645. xcb_tmp += uintptr(xcb_pad)
  12646. xcb_pad = uint32(0)
  12647. }
  12648. xcb_block_len = uint32(0)
  12649. return libc.Int32FromUint32(xcb_buffer_len)
  12650. }
  12651. func Xxcb_list_properties(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_list_properties_cookie_t) {
  12652. bp := tls.Alloc(80)
  12653. defer tls.Free(80)
  12654. var xcb_ret Txcb_list_properties_cookie_t
  12655. var _ /* xcb_out at bp+64 */ Txcb_list_properties_request_t
  12656. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12657. _ = xcb_ret
  12658. (*(*Txcb_list_properties_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12659. (*(*Txcb_list_properties_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  12660. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12661. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12662. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12663. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12664. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req46)))
  12665. return xcb_ret
  12666. }
  12667. var _xcb_req46 = Txcb_protocol_request_t{
  12668. Fcount: uint64(2),
  12669. Fopcode: uint8(m_XCB_LIST_PROPERTIES),
  12670. }
  12671. func Xxcb_list_properties_unchecked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_list_properties_cookie_t) {
  12672. bp := tls.Alloc(80)
  12673. defer tls.Free(80)
  12674. var xcb_ret Txcb_list_properties_cookie_t
  12675. var _ /* xcb_out at bp+64 */ Txcb_list_properties_request_t
  12676. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12677. _ = xcb_ret
  12678. (*(*Txcb_list_properties_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12679. (*(*Txcb_list_properties_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  12680. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12681. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12682. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12683. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12684. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req47)))
  12685. return xcb_ret
  12686. }
  12687. var _xcb_req47 = Txcb_protocol_request_t{
  12688. Fcount: uint64(2),
  12689. Fopcode: uint8(m_XCB_LIST_PROPERTIES),
  12690. }
  12691. func Xxcb_list_properties_atoms(tls *libc.TLS, R uintptr) (r uintptr) {
  12692. return R + libc.UintptrFromInt32(1)*32
  12693. }
  12694. func Xxcb_list_properties_atoms_length(tls *libc.TLS, R uintptr) (r int32) {
  12695. return libc.Int32FromUint16((*Txcb_list_properties_reply_t)(unsafe.Pointer(R)).Fatoms_len)
  12696. }
  12697. func Xxcb_list_properties_atoms_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  12698. var i Txcb_generic_iterator_t
  12699. _ = i
  12700. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_list_properties_reply_t)(unsafe.Pointer(R)).Fatoms_len)*4
  12701. i.Frem = 0
  12702. i.Findex = int32(int64(i.Fdata) - int64(R))
  12703. return i
  12704. }
  12705. func Xxcb_list_properties_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_properties_cookie_t, e uintptr) (r uintptr) {
  12706. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12707. }
  12708. func Xxcb_set_selection_owner_checked(tls *libc.TLS, c uintptr, owner Txcb_window_t, selection Txcb_atom_t, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12709. bp := tls.Alloc(80)
  12710. defer tls.Free(80)
  12711. var xcb_ret Txcb_void_cookie_t
  12712. var _ /* xcb_out at bp+64 */ Txcb_set_selection_owner_request_t
  12713. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12714. _ = xcb_ret
  12715. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12716. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Fowner = owner
  12717. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Fselection = selection
  12718. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  12719. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12720. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  12721. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12722. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12723. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req48)))
  12724. return xcb_ret
  12725. }
  12726. var _xcb_req48 = Txcb_protocol_request_t{
  12727. Fcount: uint64(2),
  12728. Fopcode: uint8(m_XCB_SET_SELECTION_OWNER),
  12729. Fisvoid: uint8(1),
  12730. }
  12731. func Xxcb_set_selection_owner(tls *libc.TLS, c uintptr, owner Txcb_window_t, selection Txcb_atom_t, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12732. bp := tls.Alloc(80)
  12733. defer tls.Free(80)
  12734. var xcb_ret Txcb_void_cookie_t
  12735. var _ /* xcb_out at bp+64 */ Txcb_set_selection_owner_request_t
  12736. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12737. _ = xcb_ret
  12738. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12739. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Fowner = owner
  12740. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Fselection = selection
  12741. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  12742. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12743. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  12744. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12745. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12746. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req49)))
  12747. return xcb_ret
  12748. }
  12749. var _xcb_req49 = Txcb_protocol_request_t{
  12750. Fcount: uint64(2),
  12751. Fopcode: uint8(m_XCB_SET_SELECTION_OWNER),
  12752. Fisvoid: uint8(1),
  12753. }
  12754. func Xxcb_get_selection_owner(tls *libc.TLS, c uintptr, selection Txcb_atom_t) (r Txcb_get_selection_owner_cookie_t) {
  12755. bp := tls.Alloc(80)
  12756. defer tls.Free(80)
  12757. var xcb_ret Txcb_get_selection_owner_cookie_t
  12758. var _ /* xcb_out at bp+64 */ Txcb_get_selection_owner_request_t
  12759. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12760. _ = xcb_ret
  12761. (*(*Txcb_get_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12762. (*(*Txcb_get_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Fselection = selection
  12763. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12764. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12765. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12766. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12767. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req50)))
  12768. return xcb_ret
  12769. }
  12770. var _xcb_req50 = Txcb_protocol_request_t{
  12771. Fcount: uint64(2),
  12772. Fopcode: uint8(m_XCB_GET_SELECTION_OWNER),
  12773. }
  12774. func Xxcb_get_selection_owner_unchecked(tls *libc.TLS, c uintptr, selection Txcb_atom_t) (r Txcb_get_selection_owner_cookie_t) {
  12775. bp := tls.Alloc(80)
  12776. defer tls.Free(80)
  12777. var xcb_ret Txcb_get_selection_owner_cookie_t
  12778. var _ /* xcb_out at bp+64 */ Txcb_get_selection_owner_request_t
  12779. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12780. _ = xcb_ret
  12781. (*(*Txcb_get_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12782. (*(*Txcb_get_selection_owner_request_t)(unsafe.Pointer(bp + 64))).Fselection = selection
  12783. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12784. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12785. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12786. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12787. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req51)))
  12788. return xcb_ret
  12789. }
  12790. var _xcb_req51 = Txcb_protocol_request_t{
  12791. Fcount: uint64(2),
  12792. Fopcode: uint8(m_XCB_GET_SELECTION_OWNER),
  12793. }
  12794. func Xxcb_get_selection_owner_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_selection_owner_cookie_t, e uintptr) (r uintptr) {
  12795. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12796. }
  12797. func Xxcb_convert_selection_checked(tls *libc.TLS, c uintptr, requestor Txcb_window_t, selection Txcb_atom_t, target Txcb_atom_t, property Txcb_atom_t, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12798. bp := tls.Alloc(96)
  12799. defer tls.Free(96)
  12800. var xcb_ret Txcb_void_cookie_t
  12801. var _ /* xcb_out at bp+64 */ Txcb_convert_selection_request_t
  12802. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12803. _ = xcb_ret
  12804. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12805. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Frequestor = requestor
  12806. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Fselection = selection
  12807. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Ftarget = target
  12808. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Fproperty = property
  12809. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  12810. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12811. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  12812. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12813. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12814. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req52)))
  12815. return xcb_ret
  12816. }
  12817. var _xcb_req52 = Txcb_protocol_request_t{
  12818. Fcount: uint64(2),
  12819. Fopcode: uint8(m_XCB_CONVERT_SELECTION),
  12820. Fisvoid: uint8(1),
  12821. }
  12822. func Xxcb_convert_selection(tls *libc.TLS, c uintptr, requestor Txcb_window_t, selection Txcb_atom_t, target Txcb_atom_t, property Txcb_atom_t, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12823. bp := tls.Alloc(96)
  12824. defer tls.Free(96)
  12825. var xcb_ret Txcb_void_cookie_t
  12826. var _ /* xcb_out at bp+64 */ Txcb_convert_selection_request_t
  12827. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12828. _ = xcb_ret
  12829. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12830. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Frequestor = requestor
  12831. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Fselection = selection
  12832. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Ftarget = target
  12833. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Fproperty = property
  12834. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  12835. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12836. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  12837. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12838. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12839. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req53)))
  12840. return xcb_ret
  12841. }
  12842. var _xcb_req53 = Txcb_protocol_request_t{
  12843. Fcount: uint64(2),
  12844. Fopcode: uint8(m_XCB_CONVERT_SELECTION),
  12845. Fisvoid: uint8(1),
  12846. }
  12847. func Xxcb_send_event_checked(tls *libc.TLS, c uintptr, propagate Tuint8_t, destination Txcb_window_t, event_mask Tuint32_t, event uintptr) (r Txcb_void_cookie_t) {
  12848. bp := tls.Alloc(112)
  12849. defer tls.Free(112)
  12850. var xcb_ret Txcb_void_cookie_t
  12851. var _ /* xcb_out at bp+64 */ Txcb_send_event_request_t
  12852. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12853. _ = xcb_ret
  12854. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 64))).Fpropagate = propagate
  12855. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 64))).Fdestination = destination
  12856. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 64))).Fevent_mask = event_mask
  12857. libc.Xmemcpy(tls, bp+64+12, event, uint64(32))
  12858. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12859. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(44)
  12860. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12861. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12862. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req54)))
  12863. return xcb_ret
  12864. }
  12865. var _xcb_req54 = Txcb_protocol_request_t{
  12866. Fcount: uint64(2),
  12867. Fopcode: uint8(m_XCB_SEND_EVENT),
  12868. Fisvoid: uint8(1),
  12869. }
  12870. func Xxcb_send_event(tls *libc.TLS, c uintptr, propagate Tuint8_t, destination Txcb_window_t, event_mask Tuint32_t, event uintptr) (r Txcb_void_cookie_t) {
  12871. bp := tls.Alloc(112)
  12872. defer tls.Free(112)
  12873. var xcb_ret Txcb_void_cookie_t
  12874. var _ /* xcb_out at bp+64 */ Txcb_send_event_request_t
  12875. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12876. _ = xcb_ret
  12877. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 64))).Fpropagate = propagate
  12878. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 64))).Fdestination = destination
  12879. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 64))).Fevent_mask = event_mask
  12880. libc.Xmemcpy(tls, bp+64+12, event, uint64(32))
  12881. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12882. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(44)
  12883. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12884. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12885. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req55)))
  12886. return xcb_ret
  12887. }
  12888. var _xcb_req55 = Txcb_protocol_request_t{
  12889. Fcount: uint64(2),
  12890. Fopcode: uint8(m_XCB_SEND_EVENT),
  12891. Fisvoid: uint8(1),
  12892. }
  12893. func Xxcb_grab_pointer(tls *libc.TLS, c uintptr, owner_events Tuint8_t, grab_window Txcb_window_t, event_mask Tuint16_t, pointer_mode Tuint8_t, keyboard_mode Tuint8_t, confine_to Txcb_window_t, cursor Txcb_cursor_t, time Txcb_timestamp_t) (r Txcb_grab_pointer_cookie_t) {
  12894. bp := tls.Alloc(96)
  12895. defer tls.Free(96)
  12896. var xcb_ret Txcb_grab_pointer_cookie_t
  12897. var _ /* xcb_out at bp+64 */ Txcb_grab_pointer_request_t
  12898. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12899. _ = xcb_ret
  12900. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fowner_events = owner_events
  12901. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  12902. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fevent_mask = event_mask
  12903. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fpointer_mode = pointer_mode
  12904. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fkeyboard_mode = keyboard_mode
  12905. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fconfine_to = confine_to
  12906. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fcursor = cursor
  12907. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  12908. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12909. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  12910. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12911. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12912. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req56)))
  12913. return xcb_ret
  12914. }
  12915. var _xcb_req56 = Txcb_protocol_request_t{
  12916. Fcount: uint64(2),
  12917. Fopcode: uint8(m_XCB_GRAB_POINTER),
  12918. }
  12919. func Xxcb_grab_pointer_unchecked(tls *libc.TLS, c uintptr, owner_events Tuint8_t, grab_window Txcb_window_t, event_mask Tuint16_t, pointer_mode Tuint8_t, keyboard_mode Tuint8_t, confine_to Txcb_window_t, cursor Txcb_cursor_t, time Txcb_timestamp_t) (r Txcb_grab_pointer_cookie_t) {
  12920. bp := tls.Alloc(96)
  12921. defer tls.Free(96)
  12922. var xcb_ret Txcb_grab_pointer_cookie_t
  12923. var _ /* xcb_out at bp+64 */ Txcb_grab_pointer_request_t
  12924. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12925. _ = xcb_ret
  12926. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fowner_events = owner_events
  12927. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  12928. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fevent_mask = event_mask
  12929. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fpointer_mode = pointer_mode
  12930. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fkeyboard_mode = keyboard_mode
  12931. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fconfine_to = confine_to
  12932. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fcursor = cursor
  12933. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  12934. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12935. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  12936. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12937. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12938. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req57)))
  12939. return xcb_ret
  12940. }
  12941. var _xcb_req57 = Txcb_protocol_request_t{
  12942. Fcount: uint64(2),
  12943. Fopcode: uint8(m_XCB_GRAB_POINTER),
  12944. }
  12945. func Xxcb_grab_pointer_reply(tls *libc.TLS, c uintptr, cookie Txcb_grab_pointer_cookie_t, e uintptr) (r uintptr) {
  12946. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12947. }
  12948. func Xxcb_ungrab_pointer_checked(tls *libc.TLS, c uintptr, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12949. bp := tls.Alloc(80)
  12950. defer tls.Free(80)
  12951. var xcb_ret Txcb_void_cookie_t
  12952. var _ /* xcb_out at bp+64 */ Txcb_ungrab_pointer_request_t
  12953. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12954. _ = xcb_ret
  12955. (*(*Txcb_ungrab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12956. (*(*Txcb_ungrab_pointer_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  12957. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12958. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12959. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12960. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12961. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req58)))
  12962. return xcb_ret
  12963. }
  12964. var _xcb_req58 = Txcb_protocol_request_t{
  12965. Fcount: uint64(2),
  12966. Fopcode: uint8(m_XCB_UNGRAB_POINTER),
  12967. Fisvoid: uint8(1),
  12968. }
  12969. func Xxcb_ungrab_pointer(tls *libc.TLS, c uintptr, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12970. bp := tls.Alloc(80)
  12971. defer tls.Free(80)
  12972. var xcb_ret Txcb_void_cookie_t
  12973. var _ /* xcb_out at bp+64 */ Txcb_ungrab_pointer_request_t
  12974. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12975. _ = xcb_ret
  12976. (*(*Txcb_ungrab_pointer_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  12977. (*(*Txcb_ungrab_pointer_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  12978. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  12979. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  12980. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12981. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  12982. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req59)))
  12983. return xcb_ret
  12984. }
  12985. var _xcb_req59 = Txcb_protocol_request_t{
  12986. Fcount: uint64(2),
  12987. Fopcode: uint8(m_XCB_UNGRAB_POINTER),
  12988. Fisvoid: uint8(1),
  12989. }
  12990. func Xxcb_grab_button_checked(tls *libc.TLS, c uintptr, owner_events Tuint8_t, grab_window Txcb_window_t, event_mask Tuint16_t, pointer_mode Tuint8_t, keyboard_mode Tuint8_t, confine_to Txcb_window_t, cursor Txcb_cursor_t, button Tuint8_t, modifiers Tuint16_t) (r Txcb_void_cookie_t) {
  12991. bp := tls.Alloc(96)
  12992. defer tls.Free(96)
  12993. var xcb_ret Txcb_void_cookie_t
  12994. var _ /* xcb_out at bp+64 */ Txcb_grab_button_request_t
  12995. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12996. _ = xcb_ret
  12997. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fowner_events = owner_events
  12998. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  12999. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fevent_mask = event_mask
  13000. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fpointer_mode = pointer_mode
  13001. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fkeyboard_mode = keyboard_mode
  13002. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fconfine_to = confine_to
  13003. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fcursor = cursor
  13004. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fbutton = button
  13005. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13006. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fmodifiers = modifiers
  13007. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13008. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  13009. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13010. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13011. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req60)))
  13012. return xcb_ret
  13013. }
  13014. var _xcb_req60 = Txcb_protocol_request_t{
  13015. Fcount: uint64(2),
  13016. Fopcode: uint8(m_XCB_GRAB_BUTTON),
  13017. Fisvoid: uint8(1),
  13018. }
  13019. func Xxcb_grab_button(tls *libc.TLS, c uintptr, owner_events Tuint8_t, grab_window Txcb_window_t, event_mask Tuint16_t, pointer_mode Tuint8_t, keyboard_mode Tuint8_t, confine_to Txcb_window_t, cursor Txcb_cursor_t, button Tuint8_t, modifiers Tuint16_t) (r Txcb_void_cookie_t) {
  13020. bp := tls.Alloc(96)
  13021. defer tls.Free(96)
  13022. var xcb_ret Txcb_void_cookie_t
  13023. var _ /* xcb_out at bp+64 */ Txcb_grab_button_request_t
  13024. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13025. _ = xcb_ret
  13026. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fowner_events = owner_events
  13027. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  13028. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fevent_mask = event_mask
  13029. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fpointer_mode = pointer_mode
  13030. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fkeyboard_mode = keyboard_mode
  13031. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fconfine_to = confine_to
  13032. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fcursor = cursor
  13033. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fbutton = button
  13034. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13035. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 64))).Fmodifiers = modifiers
  13036. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13037. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  13038. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13039. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13040. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req61)))
  13041. return xcb_ret
  13042. }
  13043. var _xcb_req61 = Txcb_protocol_request_t{
  13044. Fcount: uint64(2),
  13045. Fopcode: uint8(m_XCB_GRAB_BUTTON),
  13046. Fisvoid: uint8(1),
  13047. }
  13048. func Xxcb_ungrab_button_checked(tls *libc.TLS, c uintptr, button Tuint8_t, grab_window Txcb_window_t, modifiers Tuint16_t) (r Txcb_void_cookie_t) {
  13049. bp := tls.Alloc(80)
  13050. defer tls.Free(80)
  13051. var xcb_ret Txcb_void_cookie_t
  13052. var _ /* xcb_out at bp+64 */ Txcb_ungrab_button_request_t
  13053. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13054. _ = xcb_ret
  13055. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 64))).Fbutton = button
  13056. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  13057. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 64))).Fmodifiers = modifiers
  13058. libc.Xmemset(tls, bp+64+10, 0, uint64(2))
  13059. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13060. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  13061. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13062. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13063. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req62)))
  13064. return xcb_ret
  13065. }
  13066. var _xcb_req62 = Txcb_protocol_request_t{
  13067. Fcount: uint64(2),
  13068. Fopcode: uint8(m_XCB_UNGRAB_BUTTON),
  13069. Fisvoid: uint8(1),
  13070. }
  13071. func Xxcb_ungrab_button(tls *libc.TLS, c uintptr, button Tuint8_t, grab_window Txcb_window_t, modifiers Tuint16_t) (r Txcb_void_cookie_t) {
  13072. bp := tls.Alloc(80)
  13073. defer tls.Free(80)
  13074. var xcb_ret Txcb_void_cookie_t
  13075. var _ /* xcb_out at bp+64 */ Txcb_ungrab_button_request_t
  13076. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13077. _ = xcb_ret
  13078. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 64))).Fbutton = button
  13079. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  13080. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 64))).Fmodifiers = modifiers
  13081. libc.Xmemset(tls, bp+64+10, 0, uint64(2))
  13082. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13083. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  13084. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13085. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13086. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req63)))
  13087. return xcb_ret
  13088. }
  13089. var _xcb_req63 = Txcb_protocol_request_t{
  13090. Fcount: uint64(2),
  13091. Fopcode: uint8(m_XCB_UNGRAB_BUTTON),
  13092. Fisvoid: uint8(1),
  13093. }
  13094. func Xxcb_change_active_pointer_grab_checked(tls *libc.TLS, c uintptr, cursor Txcb_cursor_t, time Txcb_timestamp_t, event_mask Tuint16_t) (r Txcb_void_cookie_t) {
  13095. bp := tls.Alloc(80)
  13096. defer tls.Free(80)
  13097. var xcb_ret Txcb_void_cookie_t
  13098. var _ /* xcb_out at bp+64 */ Txcb_change_active_pointer_grab_request_t
  13099. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13100. _ = xcb_ret
  13101. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13102. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 64))).Fcursor = cursor
  13103. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  13104. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 64))).Fevent_mask = event_mask
  13105. libc.Xmemset(tls, bp+64+14, 0, uint64(2))
  13106. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13107. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  13108. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13109. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13110. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req64)))
  13111. return xcb_ret
  13112. }
  13113. var _xcb_req64 = Txcb_protocol_request_t{
  13114. Fcount: uint64(2),
  13115. Fopcode: uint8(m_XCB_CHANGE_ACTIVE_POINTER_GRAB),
  13116. Fisvoid: uint8(1),
  13117. }
  13118. func Xxcb_change_active_pointer_grab(tls *libc.TLS, c uintptr, cursor Txcb_cursor_t, time Txcb_timestamp_t, event_mask Tuint16_t) (r Txcb_void_cookie_t) {
  13119. bp := tls.Alloc(80)
  13120. defer tls.Free(80)
  13121. var xcb_ret Txcb_void_cookie_t
  13122. var _ /* xcb_out at bp+64 */ Txcb_change_active_pointer_grab_request_t
  13123. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13124. _ = xcb_ret
  13125. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13126. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 64))).Fcursor = cursor
  13127. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  13128. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 64))).Fevent_mask = event_mask
  13129. libc.Xmemset(tls, bp+64+14, 0, uint64(2))
  13130. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13131. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  13132. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13133. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13134. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req65)))
  13135. return xcb_ret
  13136. }
  13137. var _xcb_req65 = Txcb_protocol_request_t{
  13138. Fcount: uint64(2),
  13139. Fopcode: uint8(m_XCB_CHANGE_ACTIVE_POINTER_GRAB),
  13140. Fisvoid: uint8(1),
  13141. }
  13142. func Xxcb_grab_keyboard(tls *libc.TLS, c uintptr, owner_events Tuint8_t, grab_window Txcb_window_t, time Txcb_timestamp_t, pointer_mode Tuint8_t, keyboard_mode Tuint8_t) (r Txcb_grab_keyboard_cookie_t) {
  13143. bp := tls.Alloc(80)
  13144. defer tls.Free(80)
  13145. var xcb_ret Txcb_grab_keyboard_cookie_t
  13146. var _ /* xcb_out at bp+64 */ Txcb_grab_keyboard_request_t
  13147. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13148. _ = xcb_ret
  13149. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Fowner_events = owner_events
  13150. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  13151. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  13152. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Fpointer_mode = pointer_mode
  13153. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Fkeyboard_mode = keyboard_mode
  13154. libc.Xmemset(tls, bp+64+14, 0, uint64(2))
  13155. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13156. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  13157. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13158. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13159. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req66)))
  13160. return xcb_ret
  13161. }
  13162. var _xcb_req66 = Txcb_protocol_request_t{
  13163. Fcount: uint64(2),
  13164. Fopcode: uint8(m_XCB_GRAB_KEYBOARD),
  13165. }
  13166. func Xxcb_grab_keyboard_unchecked(tls *libc.TLS, c uintptr, owner_events Tuint8_t, grab_window Txcb_window_t, time Txcb_timestamp_t, pointer_mode Tuint8_t, keyboard_mode Tuint8_t) (r Txcb_grab_keyboard_cookie_t) {
  13167. bp := tls.Alloc(80)
  13168. defer tls.Free(80)
  13169. var xcb_ret Txcb_grab_keyboard_cookie_t
  13170. var _ /* xcb_out at bp+64 */ Txcb_grab_keyboard_request_t
  13171. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13172. _ = xcb_ret
  13173. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Fowner_events = owner_events
  13174. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  13175. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  13176. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Fpointer_mode = pointer_mode
  13177. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Fkeyboard_mode = keyboard_mode
  13178. libc.Xmemset(tls, bp+64+14, 0, uint64(2))
  13179. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13180. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  13181. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13182. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13183. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req67)))
  13184. return xcb_ret
  13185. }
  13186. var _xcb_req67 = Txcb_protocol_request_t{
  13187. Fcount: uint64(2),
  13188. Fopcode: uint8(m_XCB_GRAB_KEYBOARD),
  13189. }
  13190. func Xxcb_grab_keyboard_reply(tls *libc.TLS, c uintptr, cookie Txcb_grab_keyboard_cookie_t, e uintptr) (r uintptr) {
  13191. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  13192. }
  13193. func Xxcb_ungrab_keyboard_checked(tls *libc.TLS, c uintptr, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  13194. bp := tls.Alloc(80)
  13195. defer tls.Free(80)
  13196. var xcb_ret Txcb_void_cookie_t
  13197. var _ /* xcb_out at bp+64 */ Txcb_ungrab_keyboard_request_t
  13198. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13199. _ = xcb_ret
  13200. (*(*Txcb_ungrab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13201. (*(*Txcb_ungrab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  13202. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13203. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  13204. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13205. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13206. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req68)))
  13207. return xcb_ret
  13208. }
  13209. var _xcb_req68 = Txcb_protocol_request_t{
  13210. Fcount: uint64(2),
  13211. Fopcode: uint8(m_XCB_UNGRAB_KEYBOARD),
  13212. Fisvoid: uint8(1),
  13213. }
  13214. func Xxcb_ungrab_keyboard(tls *libc.TLS, c uintptr, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  13215. bp := tls.Alloc(80)
  13216. defer tls.Free(80)
  13217. var xcb_ret Txcb_void_cookie_t
  13218. var _ /* xcb_out at bp+64 */ Txcb_ungrab_keyboard_request_t
  13219. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13220. _ = xcb_ret
  13221. (*(*Txcb_ungrab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13222. (*(*Txcb_ungrab_keyboard_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  13223. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13224. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  13225. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13226. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13227. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req69)))
  13228. return xcb_ret
  13229. }
  13230. var _xcb_req69 = Txcb_protocol_request_t{
  13231. Fcount: uint64(2),
  13232. Fopcode: uint8(m_XCB_UNGRAB_KEYBOARD),
  13233. Fisvoid: uint8(1),
  13234. }
  13235. func Xxcb_grab_key_checked(tls *libc.TLS, c uintptr, owner_events Tuint8_t, grab_window Txcb_window_t, modifiers Tuint16_t, key Txcb_keycode_t, pointer_mode Tuint8_t, keyboard_mode Tuint8_t) (r Txcb_void_cookie_t) {
  13236. bp := tls.Alloc(80)
  13237. defer tls.Free(80)
  13238. var xcb_ret Txcb_void_cookie_t
  13239. var _ /* xcb_out at bp+64 */ Txcb_grab_key_request_t
  13240. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13241. _ = xcb_ret
  13242. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fowner_events = owner_events
  13243. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  13244. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fmodifiers = modifiers
  13245. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fkey = key
  13246. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fpointer_mode = pointer_mode
  13247. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fkeyboard_mode = keyboard_mode
  13248. libc.Xmemset(tls, bp+64+13, 0, uint64(3))
  13249. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13250. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  13251. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13252. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13253. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req70)))
  13254. return xcb_ret
  13255. }
  13256. var _xcb_req70 = Txcb_protocol_request_t{
  13257. Fcount: uint64(2),
  13258. Fopcode: uint8(m_XCB_GRAB_KEY),
  13259. Fisvoid: uint8(1),
  13260. }
  13261. func Xxcb_grab_key(tls *libc.TLS, c uintptr, owner_events Tuint8_t, grab_window Txcb_window_t, modifiers Tuint16_t, key Txcb_keycode_t, pointer_mode Tuint8_t, keyboard_mode Tuint8_t) (r Txcb_void_cookie_t) {
  13262. bp := tls.Alloc(80)
  13263. defer tls.Free(80)
  13264. var xcb_ret Txcb_void_cookie_t
  13265. var _ /* xcb_out at bp+64 */ Txcb_grab_key_request_t
  13266. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13267. _ = xcb_ret
  13268. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fowner_events = owner_events
  13269. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  13270. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fmodifiers = modifiers
  13271. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fkey = key
  13272. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fpointer_mode = pointer_mode
  13273. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 64))).Fkeyboard_mode = keyboard_mode
  13274. libc.Xmemset(tls, bp+64+13, 0, uint64(3))
  13275. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13276. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  13277. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13278. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13279. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req71)))
  13280. return xcb_ret
  13281. }
  13282. var _xcb_req71 = Txcb_protocol_request_t{
  13283. Fcount: uint64(2),
  13284. Fopcode: uint8(m_XCB_GRAB_KEY),
  13285. Fisvoid: uint8(1),
  13286. }
  13287. func Xxcb_ungrab_key_checked(tls *libc.TLS, c uintptr, key Txcb_keycode_t, grab_window Txcb_window_t, modifiers Tuint16_t) (r Txcb_void_cookie_t) {
  13288. bp := tls.Alloc(80)
  13289. defer tls.Free(80)
  13290. var xcb_ret Txcb_void_cookie_t
  13291. var _ /* xcb_out at bp+64 */ Txcb_ungrab_key_request_t
  13292. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13293. _ = xcb_ret
  13294. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 64))).Fkey = key
  13295. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  13296. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 64))).Fmodifiers = modifiers
  13297. libc.Xmemset(tls, bp+64+10, 0, uint64(2))
  13298. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13299. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  13300. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13301. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13302. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req72)))
  13303. return xcb_ret
  13304. }
  13305. var _xcb_req72 = Txcb_protocol_request_t{
  13306. Fcount: uint64(2),
  13307. Fopcode: uint8(m_XCB_UNGRAB_KEY),
  13308. Fisvoid: uint8(1),
  13309. }
  13310. func Xxcb_ungrab_key(tls *libc.TLS, c uintptr, key Txcb_keycode_t, grab_window Txcb_window_t, modifiers Tuint16_t) (r Txcb_void_cookie_t) {
  13311. bp := tls.Alloc(80)
  13312. defer tls.Free(80)
  13313. var xcb_ret Txcb_void_cookie_t
  13314. var _ /* xcb_out at bp+64 */ Txcb_ungrab_key_request_t
  13315. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13316. _ = xcb_ret
  13317. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 64))).Fkey = key
  13318. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 64))).Fgrab_window = grab_window
  13319. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 64))).Fmodifiers = modifiers
  13320. libc.Xmemset(tls, bp+64+10, 0, uint64(2))
  13321. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13322. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  13323. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13324. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13325. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req73)))
  13326. return xcb_ret
  13327. }
  13328. var _xcb_req73 = Txcb_protocol_request_t{
  13329. Fcount: uint64(2),
  13330. Fopcode: uint8(m_XCB_UNGRAB_KEY),
  13331. Fisvoid: uint8(1),
  13332. }
  13333. func Xxcb_allow_events_checked(tls *libc.TLS, c uintptr, mode Tuint8_t, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  13334. bp := tls.Alloc(80)
  13335. defer tls.Free(80)
  13336. var xcb_ret Txcb_void_cookie_t
  13337. var _ /* xcb_out at bp+64 */ Txcb_allow_events_request_t
  13338. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13339. _ = xcb_ret
  13340. (*(*Txcb_allow_events_request_t)(unsafe.Pointer(bp + 64))).Fmode = mode
  13341. (*(*Txcb_allow_events_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  13342. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13343. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  13344. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13345. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13346. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req74)))
  13347. return xcb_ret
  13348. }
  13349. var _xcb_req74 = Txcb_protocol_request_t{
  13350. Fcount: uint64(2),
  13351. Fopcode: uint8(m_XCB_ALLOW_EVENTS),
  13352. Fisvoid: uint8(1),
  13353. }
  13354. func Xxcb_allow_events(tls *libc.TLS, c uintptr, mode Tuint8_t, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  13355. bp := tls.Alloc(80)
  13356. defer tls.Free(80)
  13357. var xcb_ret Txcb_void_cookie_t
  13358. var _ /* xcb_out at bp+64 */ Txcb_allow_events_request_t
  13359. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13360. _ = xcb_ret
  13361. (*(*Txcb_allow_events_request_t)(unsafe.Pointer(bp + 64))).Fmode = mode
  13362. (*(*Txcb_allow_events_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  13363. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13364. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  13365. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13366. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13367. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req75)))
  13368. return xcb_ret
  13369. }
  13370. var _xcb_req75 = Txcb_protocol_request_t{
  13371. Fcount: uint64(2),
  13372. Fopcode: uint8(m_XCB_ALLOW_EVENTS),
  13373. Fisvoid: uint8(1),
  13374. }
  13375. func Xxcb_grab_server_checked(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  13376. bp := tls.Alloc(80)
  13377. defer tls.Free(80)
  13378. var xcb_ret Txcb_void_cookie_t
  13379. var _ /* xcb_out at bp+64 */ Txcb_grab_server_request_t
  13380. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13381. _ = xcb_ret
  13382. (*(*Txcb_grab_server_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13383. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13384. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  13385. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13386. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13387. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req76)))
  13388. return xcb_ret
  13389. }
  13390. var _xcb_req76 = Txcb_protocol_request_t{
  13391. Fcount: uint64(2),
  13392. Fopcode: uint8(m_XCB_GRAB_SERVER),
  13393. Fisvoid: uint8(1),
  13394. }
  13395. func Xxcb_grab_server(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  13396. bp := tls.Alloc(80)
  13397. defer tls.Free(80)
  13398. var xcb_ret Txcb_void_cookie_t
  13399. var _ /* xcb_out at bp+64 */ Txcb_grab_server_request_t
  13400. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13401. _ = xcb_ret
  13402. (*(*Txcb_grab_server_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13403. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13404. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  13405. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13406. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13407. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req77)))
  13408. return xcb_ret
  13409. }
  13410. var _xcb_req77 = Txcb_protocol_request_t{
  13411. Fcount: uint64(2),
  13412. Fopcode: uint8(m_XCB_GRAB_SERVER),
  13413. Fisvoid: uint8(1),
  13414. }
  13415. func Xxcb_ungrab_server_checked(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  13416. bp := tls.Alloc(80)
  13417. defer tls.Free(80)
  13418. var xcb_ret Txcb_void_cookie_t
  13419. var _ /* xcb_out at bp+64 */ Txcb_ungrab_server_request_t
  13420. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13421. _ = xcb_ret
  13422. (*(*Txcb_ungrab_server_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13423. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13424. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  13425. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13426. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13427. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req78)))
  13428. return xcb_ret
  13429. }
  13430. var _xcb_req78 = Txcb_protocol_request_t{
  13431. Fcount: uint64(2),
  13432. Fopcode: uint8(m_XCB_UNGRAB_SERVER),
  13433. Fisvoid: uint8(1),
  13434. }
  13435. func Xxcb_ungrab_server(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  13436. bp := tls.Alloc(80)
  13437. defer tls.Free(80)
  13438. var xcb_ret Txcb_void_cookie_t
  13439. var _ /* xcb_out at bp+64 */ Txcb_ungrab_server_request_t
  13440. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13441. _ = xcb_ret
  13442. (*(*Txcb_ungrab_server_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13443. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13444. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  13445. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13446. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13447. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req79)))
  13448. return xcb_ret
  13449. }
  13450. var _xcb_req79 = Txcb_protocol_request_t{
  13451. Fcount: uint64(2),
  13452. Fopcode: uint8(m_XCB_UNGRAB_SERVER),
  13453. Fisvoid: uint8(1),
  13454. }
  13455. func Xxcb_query_pointer(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_query_pointer_cookie_t) {
  13456. bp := tls.Alloc(80)
  13457. defer tls.Free(80)
  13458. var xcb_ret Txcb_query_pointer_cookie_t
  13459. var _ /* xcb_out at bp+64 */ Txcb_query_pointer_request_t
  13460. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13461. _ = xcb_ret
  13462. (*(*Txcb_query_pointer_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13463. (*(*Txcb_query_pointer_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  13464. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13465. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  13466. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13467. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13468. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req80)))
  13469. return xcb_ret
  13470. }
  13471. var _xcb_req80 = Txcb_protocol_request_t{
  13472. Fcount: uint64(2),
  13473. Fopcode: uint8(m_XCB_QUERY_POINTER),
  13474. }
  13475. func Xxcb_query_pointer_unchecked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_query_pointer_cookie_t) {
  13476. bp := tls.Alloc(80)
  13477. defer tls.Free(80)
  13478. var xcb_ret Txcb_query_pointer_cookie_t
  13479. var _ /* xcb_out at bp+64 */ Txcb_query_pointer_request_t
  13480. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13481. _ = xcb_ret
  13482. (*(*Txcb_query_pointer_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13483. (*(*Txcb_query_pointer_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  13484. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13485. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  13486. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13487. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13488. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req81)))
  13489. return xcb_ret
  13490. }
  13491. var _xcb_req81 = Txcb_protocol_request_t{
  13492. Fcount: uint64(2),
  13493. Fopcode: uint8(m_XCB_QUERY_POINTER),
  13494. }
  13495. func Xxcb_query_pointer_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_pointer_cookie_t, e uintptr) (r uintptr) {
  13496. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  13497. }
  13498. func Xxcb_timecoord_next(tls *libc.TLS, i uintptr) {
  13499. var p1 uintptr
  13500. _ = p1
  13501. (*Txcb_timecoord_iterator_t)(unsafe.Pointer(i)).Frem--
  13502. (*Txcb_timecoord_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  13503. p1 = i + 12
  13504. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(8))
  13505. }
  13506. func Xxcb_timecoord_end(tls *libc.TLS, i Txcb_timecoord_iterator_t) (r Txcb_generic_iterator_t) {
  13507. var ret Txcb_generic_iterator_t
  13508. _ = ret
  13509. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  13510. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  13511. ret.Frem = 0
  13512. return ret
  13513. }
  13514. func Xxcb_get_motion_events_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  13515. var _aux, xcb_tmp uintptr
  13516. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  13517. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  13518. xcb_tmp = _buffer
  13519. _aux = _buffer
  13520. xcb_buffer_len = uint32(0)
  13521. xcb_block_len = uint32(0)
  13522. xcb_pad = uint32(0)
  13523. xcb_align_to = uint32(0)
  13524. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  13525. xcb_tmp += uintptr(xcb_block_len)
  13526. xcb_buffer_len += xcb_block_len
  13527. xcb_block_len = uint32(0)
  13528. /* events */
  13529. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_get_motion_events_reply_t)(unsafe.Pointer(_aux)).Fevents_len)*libc.Uint64FromInt64(8))
  13530. xcb_tmp += uintptr(xcb_block_len)
  13531. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  13532. /* insert padding */
  13533. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  13534. xcb_buffer_len += xcb_block_len + xcb_pad
  13535. if uint32(0) != xcb_pad {
  13536. xcb_tmp += uintptr(xcb_pad)
  13537. xcb_pad = uint32(0)
  13538. }
  13539. xcb_block_len = uint32(0)
  13540. return libc.Int32FromUint32(xcb_buffer_len)
  13541. }
  13542. func Xxcb_get_motion_events(tls *libc.TLS, c uintptr, window Txcb_window_t, start Txcb_timestamp_t, stop Txcb_timestamp_t) (r Txcb_get_motion_events_cookie_t) {
  13543. bp := tls.Alloc(80)
  13544. defer tls.Free(80)
  13545. var xcb_ret Txcb_get_motion_events_cookie_t
  13546. var _ /* xcb_out at bp+64 */ Txcb_get_motion_events_request_t
  13547. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13548. _ = xcb_ret
  13549. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13550. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  13551. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 64))).Fstart = start
  13552. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 64))).Fstop = stop
  13553. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13554. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  13555. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13556. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13557. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req82)))
  13558. return xcb_ret
  13559. }
  13560. var _xcb_req82 = Txcb_protocol_request_t{
  13561. Fcount: uint64(2),
  13562. Fopcode: uint8(m_XCB_GET_MOTION_EVENTS),
  13563. }
  13564. func Xxcb_get_motion_events_unchecked(tls *libc.TLS, c uintptr, window Txcb_window_t, start Txcb_timestamp_t, stop Txcb_timestamp_t) (r Txcb_get_motion_events_cookie_t) {
  13565. bp := tls.Alloc(80)
  13566. defer tls.Free(80)
  13567. var xcb_ret Txcb_get_motion_events_cookie_t
  13568. var _ /* xcb_out at bp+64 */ Txcb_get_motion_events_request_t
  13569. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13570. _ = xcb_ret
  13571. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13572. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  13573. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 64))).Fstart = start
  13574. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 64))).Fstop = stop
  13575. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13576. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  13577. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13578. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13579. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req83)))
  13580. return xcb_ret
  13581. }
  13582. var _xcb_req83 = Txcb_protocol_request_t{
  13583. Fcount: uint64(2),
  13584. Fopcode: uint8(m_XCB_GET_MOTION_EVENTS),
  13585. }
  13586. func Xxcb_get_motion_events_events(tls *libc.TLS, R uintptr) (r uintptr) {
  13587. return R + libc.UintptrFromInt32(1)*32
  13588. }
  13589. func Xxcb_get_motion_events_events_length(tls *libc.TLS, R uintptr) (r int32) {
  13590. return libc.Int32FromUint32((*Txcb_get_motion_events_reply_t)(unsafe.Pointer(R)).Fevents_len)
  13591. }
  13592. func Xxcb_get_motion_events_events_iterator(tls *libc.TLS, R uintptr) (r Txcb_timecoord_iterator_t) {
  13593. var i Txcb_timecoord_iterator_t
  13594. _ = i
  13595. i.Fdata = R + libc.UintptrFromInt32(1)*32
  13596. i.Frem = libc.Int32FromUint32((*Txcb_get_motion_events_reply_t)(unsafe.Pointer(R)).Fevents_len)
  13597. i.Findex = int32(int64(i.Fdata) - int64(R))
  13598. return i
  13599. }
  13600. func Xxcb_get_motion_events_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_motion_events_cookie_t, e uintptr) (r uintptr) {
  13601. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  13602. }
  13603. func Xxcb_translate_coordinates(tls *libc.TLS, c uintptr, src_window Txcb_window_t, dst_window Txcb_window_t, src_x Tint16_t, src_y Tint16_t) (r Txcb_translate_coordinates_cookie_t) {
  13604. bp := tls.Alloc(80)
  13605. defer tls.Free(80)
  13606. var xcb_ret Txcb_translate_coordinates_cookie_t
  13607. var _ /* xcb_out at bp+64 */ Txcb_translate_coordinates_request_t
  13608. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13609. _ = xcb_ret
  13610. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13611. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 64))).Fsrc_window = src_window
  13612. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 64))).Fdst_window = dst_window
  13613. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 64))).Fsrc_x = src_x
  13614. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 64))).Fsrc_y = src_y
  13615. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13616. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  13617. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13618. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13619. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req84)))
  13620. return xcb_ret
  13621. }
  13622. var _xcb_req84 = Txcb_protocol_request_t{
  13623. Fcount: uint64(2),
  13624. Fopcode: uint8(m_XCB_TRANSLATE_COORDINATES),
  13625. }
  13626. func Xxcb_translate_coordinates_unchecked(tls *libc.TLS, c uintptr, src_window Txcb_window_t, dst_window Txcb_window_t, src_x Tint16_t, src_y Tint16_t) (r Txcb_translate_coordinates_cookie_t) {
  13627. bp := tls.Alloc(80)
  13628. defer tls.Free(80)
  13629. var xcb_ret Txcb_translate_coordinates_cookie_t
  13630. var _ /* xcb_out at bp+64 */ Txcb_translate_coordinates_request_t
  13631. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13632. _ = xcb_ret
  13633. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13634. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 64))).Fsrc_window = src_window
  13635. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 64))).Fdst_window = dst_window
  13636. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 64))).Fsrc_x = src_x
  13637. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 64))).Fsrc_y = src_y
  13638. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13639. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  13640. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13641. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13642. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req85)))
  13643. return xcb_ret
  13644. }
  13645. var _xcb_req85 = Txcb_protocol_request_t{
  13646. Fcount: uint64(2),
  13647. Fopcode: uint8(m_XCB_TRANSLATE_COORDINATES),
  13648. }
  13649. func Xxcb_translate_coordinates_reply(tls *libc.TLS, c uintptr, cookie Txcb_translate_coordinates_cookie_t, e uintptr) (r uintptr) {
  13650. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  13651. }
  13652. func Xxcb_warp_pointer_checked(tls *libc.TLS, c uintptr, src_window Txcb_window_t, dst_window Txcb_window_t, src_x Tint16_t, src_y Tint16_t, src_width Tuint16_t, src_height Tuint16_t, dst_x Tint16_t, dst_y Tint16_t) (r Txcb_void_cookie_t) {
  13653. bp := tls.Alloc(96)
  13654. defer tls.Free(96)
  13655. var xcb_ret Txcb_void_cookie_t
  13656. var _ /* xcb_out at bp+64 */ Txcb_warp_pointer_request_t
  13657. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13658. _ = xcb_ret
  13659. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13660. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fsrc_window = src_window
  13661. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fdst_window = dst_window
  13662. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fsrc_x = src_x
  13663. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fsrc_y = src_y
  13664. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fsrc_width = src_width
  13665. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fsrc_height = src_height
  13666. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fdst_x = dst_x
  13667. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fdst_y = dst_y
  13668. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13669. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  13670. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13671. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13672. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req86)))
  13673. return xcb_ret
  13674. }
  13675. var _xcb_req86 = Txcb_protocol_request_t{
  13676. Fcount: uint64(2),
  13677. Fopcode: uint8(m_XCB_WARP_POINTER),
  13678. Fisvoid: uint8(1),
  13679. }
  13680. func Xxcb_warp_pointer(tls *libc.TLS, c uintptr, src_window Txcb_window_t, dst_window Txcb_window_t, src_x Tint16_t, src_y Tint16_t, src_width Tuint16_t, src_height Tuint16_t, dst_x Tint16_t, dst_y Tint16_t) (r Txcb_void_cookie_t) {
  13681. bp := tls.Alloc(96)
  13682. defer tls.Free(96)
  13683. var xcb_ret Txcb_void_cookie_t
  13684. var _ /* xcb_out at bp+64 */ Txcb_warp_pointer_request_t
  13685. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13686. _ = xcb_ret
  13687. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13688. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fsrc_window = src_window
  13689. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fdst_window = dst_window
  13690. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fsrc_x = src_x
  13691. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fsrc_y = src_y
  13692. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fsrc_width = src_width
  13693. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fsrc_height = src_height
  13694. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fdst_x = dst_x
  13695. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 64))).Fdst_y = dst_y
  13696. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13697. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  13698. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13699. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13700. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req87)))
  13701. return xcb_ret
  13702. }
  13703. var _xcb_req87 = Txcb_protocol_request_t{
  13704. Fcount: uint64(2),
  13705. Fopcode: uint8(m_XCB_WARP_POINTER),
  13706. Fisvoid: uint8(1),
  13707. }
  13708. func Xxcb_set_input_focus_checked(tls *libc.TLS, c uintptr, revert_to Tuint8_t, focus Txcb_window_t, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  13709. bp := tls.Alloc(80)
  13710. defer tls.Free(80)
  13711. var xcb_ret Txcb_void_cookie_t
  13712. var _ /* xcb_out at bp+64 */ Txcb_set_input_focus_request_t
  13713. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13714. _ = xcb_ret
  13715. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 64))).Frevert_to = revert_to
  13716. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 64))).Ffocus = focus
  13717. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  13718. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13719. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  13720. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13721. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13722. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req88)))
  13723. return xcb_ret
  13724. }
  13725. var _xcb_req88 = Txcb_protocol_request_t{
  13726. Fcount: uint64(2),
  13727. Fopcode: uint8(m_XCB_SET_INPUT_FOCUS),
  13728. Fisvoid: uint8(1),
  13729. }
  13730. func Xxcb_set_input_focus(tls *libc.TLS, c uintptr, revert_to Tuint8_t, focus Txcb_window_t, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  13731. bp := tls.Alloc(80)
  13732. defer tls.Free(80)
  13733. var xcb_ret Txcb_void_cookie_t
  13734. var _ /* xcb_out at bp+64 */ Txcb_set_input_focus_request_t
  13735. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13736. _ = xcb_ret
  13737. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 64))).Frevert_to = revert_to
  13738. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 64))).Ffocus = focus
  13739. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 64))).Ftime = time
  13740. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13741. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  13742. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13743. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13744. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req89)))
  13745. return xcb_ret
  13746. }
  13747. var _xcb_req89 = Txcb_protocol_request_t{
  13748. Fcount: uint64(2),
  13749. Fopcode: uint8(m_XCB_SET_INPUT_FOCUS),
  13750. Fisvoid: uint8(1),
  13751. }
  13752. func Xxcb_get_input_focus(tls *libc.TLS, c uintptr) (r Txcb_get_input_focus_cookie_t) {
  13753. bp := tls.Alloc(80)
  13754. defer tls.Free(80)
  13755. var xcb_ret Txcb_get_input_focus_cookie_t
  13756. var _ /* xcb_out at bp+64 */ Txcb_get_input_focus_request_t
  13757. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13758. _ = xcb_ret
  13759. (*(*Txcb_get_input_focus_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13760. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13761. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  13762. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13763. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13764. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req90)))
  13765. return xcb_ret
  13766. }
  13767. var _xcb_req90 = Txcb_protocol_request_t{
  13768. Fcount: uint64(2),
  13769. Fopcode: uint8(m_XCB_GET_INPUT_FOCUS),
  13770. }
  13771. func Xxcb_get_input_focus_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_input_focus_cookie_t) {
  13772. bp := tls.Alloc(80)
  13773. defer tls.Free(80)
  13774. var xcb_ret Txcb_get_input_focus_cookie_t
  13775. var _ /* xcb_out at bp+64 */ Txcb_get_input_focus_request_t
  13776. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13777. _ = xcb_ret
  13778. (*(*Txcb_get_input_focus_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13779. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13780. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  13781. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13782. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13783. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req91)))
  13784. return xcb_ret
  13785. }
  13786. var _xcb_req91 = Txcb_protocol_request_t{
  13787. Fcount: uint64(2),
  13788. Fopcode: uint8(m_XCB_GET_INPUT_FOCUS),
  13789. }
  13790. func Xxcb_get_input_focus_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_input_focus_cookie_t, e uintptr) (r uintptr) {
  13791. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  13792. }
  13793. func Xxcb_query_keymap(tls *libc.TLS, c uintptr) (r Txcb_query_keymap_cookie_t) {
  13794. bp := tls.Alloc(80)
  13795. defer tls.Free(80)
  13796. var xcb_ret Txcb_query_keymap_cookie_t
  13797. var _ /* xcb_out at bp+64 */ Txcb_query_keymap_request_t
  13798. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13799. _ = xcb_ret
  13800. (*(*Txcb_query_keymap_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13801. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13802. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  13803. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13804. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13805. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req92)))
  13806. return xcb_ret
  13807. }
  13808. var _xcb_req92 = Txcb_protocol_request_t{
  13809. Fcount: uint64(2),
  13810. Fopcode: uint8(m_XCB_QUERY_KEYMAP),
  13811. }
  13812. func Xxcb_query_keymap_unchecked(tls *libc.TLS, c uintptr) (r Txcb_query_keymap_cookie_t) {
  13813. bp := tls.Alloc(80)
  13814. defer tls.Free(80)
  13815. var xcb_ret Txcb_query_keymap_cookie_t
  13816. var _ /* xcb_out at bp+64 */ Txcb_query_keymap_request_t
  13817. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13818. _ = xcb_ret
  13819. (*(*Txcb_query_keymap_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13820. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13821. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  13822. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13823. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13824. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req93)))
  13825. return xcb_ret
  13826. }
  13827. var _xcb_req93 = Txcb_protocol_request_t{
  13828. Fcount: uint64(2),
  13829. Fopcode: uint8(m_XCB_QUERY_KEYMAP),
  13830. }
  13831. func Xxcb_query_keymap_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_keymap_cookie_t, e uintptr) (r uintptr) {
  13832. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  13833. }
  13834. func Xxcb_open_font_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  13835. var _aux, xcb_tmp uintptr
  13836. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  13837. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  13838. xcb_tmp = _buffer
  13839. _aux = _buffer
  13840. xcb_buffer_len = uint32(0)
  13841. xcb_block_len = uint32(0)
  13842. xcb_pad = uint32(0)
  13843. xcb_align_to = uint32(0)
  13844. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  13845. xcb_tmp += uintptr(xcb_block_len)
  13846. xcb_buffer_len += xcb_block_len
  13847. xcb_block_len = uint32(0)
  13848. /* name */
  13849. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_open_font_request_t)(unsafe.Pointer(_aux)).Fname_len)*libc.Uint64FromInt64(1))
  13850. xcb_tmp += uintptr(xcb_block_len)
  13851. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  13852. /* insert padding */
  13853. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  13854. xcb_buffer_len += xcb_block_len + xcb_pad
  13855. if uint32(0) != xcb_pad {
  13856. xcb_tmp += uintptr(xcb_pad)
  13857. xcb_pad = uint32(0)
  13858. }
  13859. xcb_block_len = uint32(0)
  13860. return libc.Int32FromUint32(xcb_buffer_len)
  13861. }
  13862. func Xxcb_open_font_checked(tls *libc.TLS, c uintptr, fid Txcb_font_t, name_len Tuint16_t, name uintptr) (r Txcb_void_cookie_t) {
  13863. bp := tls.Alloc(112)
  13864. defer tls.Free(112)
  13865. var xcb_ret Txcb_void_cookie_t
  13866. var _ /* xcb_out at bp+96 */ Txcb_open_font_request_t
  13867. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13868. _ = xcb_ret
  13869. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  13870. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 96))).Ffid = fid
  13871. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  13872. libc.Xmemset(tls, bp+96+10, 0, uint64(2))
  13873. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  13874. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  13875. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13876. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13877. /* char name */
  13878. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  13879. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  13880. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13881. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  13882. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req94)))
  13883. return xcb_ret
  13884. }
  13885. var _xcb_req94 = Txcb_protocol_request_t{
  13886. Fcount: uint64(4),
  13887. Fopcode: uint8(m_XCB_OPEN_FONT),
  13888. Fisvoid: uint8(1),
  13889. }
  13890. func Xxcb_open_font(tls *libc.TLS, c uintptr, fid Txcb_font_t, name_len Tuint16_t, name uintptr) (r Txcb_void_cookie_t) {
  13891. bp := tls.Alloc(112)
  13892. defer tls.Free(112)
  13893. var xcb_ret Txcb_void_cookie_t
  13894. var _ /* xcb_out at bp+96 */ Txcb_open_font_request_t
  13895. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13896. _ = xcb_ret
  13897. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  13898. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 96))).Ffid = fid
  13899. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  13900. libc.Xmemset(tls, bp+96+10, 0, uint64(2))
  13901. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  13902. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  13903. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13904. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13905. /* char name */
  13906. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  13907. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  13908. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13909. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  13910. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req95)))
  13911. return xcb_ret
  13912. }
  13913. var _xcb_req95 = Txcb_protocol_request_t{
  13914. Fcount: uint64(4),
  13915. Fopcode: uint8(m_XCB_OPEN_FONT),
  13916. Fisvoid: uint8(1),
  13917. }
  13918. func Xxcb_open_font_name(tls *libc.TLS, R uintptr) (r uintptr) {
  13919. return R + libc.UintptrFromInt32(1)*12
  13920. }
  13921. func Xxcb_open_font_name_length(tls *libc.TLS, R uintptr) (r int32) {
  13922. return libc.Int32FromUint16((*Txcb_open_font_request_t)(unsafe.Pointer(R)).Fname_len)
  13923. }
  13924. func Xxcb_open_font_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  13925. var i Txcb_generic_iterator_t
  13926. _ = i
  13927. i.Fdata = R + libc.UintptrFromInt32(1)*12 + uintptr((*Txcb_open_font_request_t)(unsafe.Pointer(R)).Fname_len)
  13928. i.Frem = 0
  13929. i.Findex = int32(int64(i.Fdata) - int64(R))
  13930. return i
  13931. }
  13932. func Xxcb_close_font_checked(tls *libc.TLS, c uintptr, font Txcb_font_t) (r Txcb_void_cookie_t) {
  13933. bp := tls.Alloc(80)
  13934. defer tls.Free(80)
  13935. var xcb_ret Txcb_void_cookie_t
  13936. var _ /* xcb_out at bp+64 */ Txcb_close_font_request_t
  13937. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13938. _ = xcb_ret
  13939. (*(*Txcb_close_font_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13940. (*(*Txcb_close_font_request_t)(unsafe.Pointer(bp + 64))).Ffont = font
  13941. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13942. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  13943. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13944. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13945. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req96)))
  13946. return xcb_ret
  13947. }
  13948. var _xcb_req96 = Txcb_protocol_request_t{
  13949. Fcount: uint64(2),
  13950. Fopcode: uint8(m_XCB_CLOSE_FONT),
  13951. Fisvoid: uint8(1),
  13952. }
  13953. func Xxcb_close_font(tls *libc.TLS, c uintptr, font Txcb_font_t) (r Txcb_void_cookie_t) {
  13954. bp := tls.Alloc(80)
  13955. defer tls.Free(80)
  13956. var xcb_ret Txcb_void_cookie_t
  13957. var _ /* xcb_out at bp+64 */ Txcb_close_font_request_t
  13958. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13959. _ = xcb_ret
  13960. (*(*Txcb_close_font_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  13961. (*(*Txcb_close_font_request_t)(unsafe.Pointer(bp + 64))).Ffont = font
  13962. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  13963. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  13964. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13965. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  13966. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req97)))
  13967. return xcb_ret
  13968. }
  13969. var _xcb_req97 = Txcb_protocol_request_t{
  13970. Fcount: uint64(2),
  13971. Fopcode: uint8(m_XCB_CLOSE_FONT),
  13972. Fisvoid: uint8(1),
  13973. }
  13974. func Xxcb_fontprop_next(tls *libc.TLS, i uintptr) {
  13975. var p1 uintptr
  13976. _ = p1
  13977. (*Txcb_fontprop_iterator_t)(unsafe.Pointer(i)).Frem--
  13978. (*Txcb_fontprop_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  13979. p1 = i + 12
  13980. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(8))
  13981. }
  13982. func Xxcb_fontprop_end(tls *libc.TLS, i Txcb_fontprop_iterator_t) (r Txcb_generic_iterator_t) {
  13983. var ret Txcb_generic_iterator_t
  13984. _ = ret
  13985. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  13986. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  13987. ret.Frem = 0
  13988. return ret
  13989. }
  13990. func Xxcb_charinfo_next(tls *libc.TLS, i uintptr) {
  13991. var p1 uintptr
  13992. _ = p1
  13993. (*Txcb_charinfo_iterator_t)(unsafe.Pointer(i)).Frem--
  13994. (*Txcb_charinfo_iterator_t)(unsafe.Pointer(i)).Fdata += 12
  13995. p1 = i + 12
  13996. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(12))
  13997. }
  13998. func Xxcb_charinfo_end(tls *libc.TLS, i Txcb_charinfo_iterator_t) (r Txcb_generic_iterator_t) {
  13999. var ret Txcb_generic_iterator_t
  14000. _ = ret
  14001. ret.Fdata = i.Fdata + uintptr(i.Frem)*12
  14002. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  14003. ret.Frem = 0
  14004. return ret
  14005. }
  14006. func Xxcb_query_font_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  14007. var _aux, xcb_tmp uintptr
  14008. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  14009. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  14010. xcb_tmp = _buffer
  14011. _aux = _buffer
  14012. xcb_buffer_len = uint32(0)
  14013. xcb_block_len = uint32(0)
  14014. xcb_pad = uint32(0)
  14015. xcb_align_to = uint32(0)
  14016. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(60))
  14017. xcb_tmp += uintptr(xcb_block_len)
  14018. xcb_buffer_len += xcb_block_len
  14019. xcb_block_len = uint32(0)
  14020. /* properties */
  14021. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_query_font_reply_t)(unsafe.Pointer(_aux)).Fproperties_len)*libc.Uint64FromInt64(8))
  14022. xcb_tmp += uintptr(xcb_block_len)
  14023. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14024. /* insert padding */
  14025. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  14026. xcb_buffer_len += xcb_block_len + xcb_pad
  14027. if uint32(0) != xcb_pad {
  14028. xcb_tmp += uintptr(xcb_pad)
  14029. xcb_pad = uint32(0)
  14030. }
  14031. xcb_block_len = uint32(0)
  14032. /* char_infos */
  14033. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_query_font_reply_t)(unsafe.Pointer(_aux)).Fchar_infos_len)*libc.Uint64FromInt64(12))
  14034. xcb_tmp += uintptr(xcb_block_len)
  14035. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  14036. /* insert padding */
  14037. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  14038. xcb_buffer_len += xcb_block_len + xcb_pad
  14039. if uint32(0) != xcb_pad {
  14040. xcb_tmp += uintptr(xcb_pad)
  14041. xcb_pad = uint32(0)
  14042. }
  14043. xcb_block_len = uint32(0)
  14044. return libc.Int32FromUint32(xcb_buffer_len)
  14045. }
  14046. func Xxcb_query_font(tls *libc.TLS, c uintptr, font Txcb_fontable_t) (r Txcb_query_font_cookie_t) {
  14047. bp := tls.Alloc(80)
  14048. defer tls.Free(80)
  14049. var xcb_ret Txcb_query_font_cookie_t
  14050. var _ /* xcb_out at bp+64 */ Txcb_query_font_request_t
  14051. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  14052. _ = xcb_ret
  14053. (*(*Txcb_query_font_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  14054. (*(*Txcb_query_font_request_t)(unsafe.Pointer(bp + 64))).Ffont = font
  14055. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  14056. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14057. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14058. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14059. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req98)))
  14060. return xcb_ret
  14061. }
  14062. var _xcb_req98 = Txcb_protocol_request_t{
  14063. Fcount: uint64(2),
  14064. Fopcode: uint8(m_XCB_QUERY_FONT),
  14065. }
  14066. func Xxcb_query_font_unchecked(tls *libc.TLS, c uintptr, font Txcb_fontable_t) (r Txcb_query_font_cookie_t) {
  14067. bp := tls.Alloc(80)
  14068. defer tls.Free(80)
  14069. var xcb_ret Txcb_query_font_cookie_t
  14070. var _ /* xcb_out at bp+64 */ Txcb_query_font_request_t
  14071. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  14072. _ = xcb_ret
  14073. (*(*Txcb_query_font_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  14074. (*(*Txcb_query_font_request_t)(unsafe.Pointer(bp + 64))).Ffont = font
  14075. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  14076. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14077. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14078. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14079. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req99)))
  14080. return xcb_ret
  14081. }
  14082. var _xcb_req99 = Txcb_protocol_request_t{
  14083. Fcount: uint64(2),
  14084. Fopcode: uint8(m_XCB_QUERY_FONT),
  14085. }
  14086. func Xxcb_query_font_properties(tls *libc.TLS, R uintptr) (r uintptr) {
  14087. return R + libc.UintptrFromInt32(1)*60
  14088. }
  14089. func Xxcb_query_font_properties_length(tls *libc.TLS, R uintptr) (r int32) {
  14090. return libc.Int32FromUint16((*Txcb_query_font_reply_t)(unsafe.Pointer(R)).Fproperties_len)
  14091. }
  14092. func Xxcb_query_font_properties_iterator(tls *libc.TLS, R uintptr) (r Txcb_fontprop_iterator_t) {
  14093. var i Txcb_fontprop_iterator_t
  14094. _ = i
  14095. i.Fdata = R + libc.UintptrFromInt32(1)*60
  14096. i.Frem = libc.Int32FromUint16((*Txcb_query_font_reply_t)(unsafe.Pointer(R)).Fproperties_len)
  14097. i.Findex = int32(int64(i.Fdata) - int64(R))
  14098. return i
  14099. }
  14100. func Xxcb_query_font_char_infos(tls *libc.TLS, R uintptr) (r uintptr) {
  14101. var prev Txcb_generic_iterator_t
  14102. _ = prev
  14103. prev = Xxcb_fontprop_end(tls, Xxcb_query_font_properties_iterator(tls, R))
  14104. return prev.Fdata + uintptr(libc.Uint64FromInt32(-prev.Findex)&libc.Uint64FromInt32(3)) + libc.UintptrFromInt32(0)
  14105. }
  14106. func Xxcb_query_font_char_infos_length(tls *libc.TLS, R uintptr) (r int32) {
  14107. return libc.Int32FromUint32((*Txcb_query_font_reply_t)(unsafe.Pointer(R)).Fchar_infos_len)
  14108. }
  14109. func Xxcb_query_font_char_infos_iterator(tls *libc.TLS, R uintptr) (r Txcb_charinfo_iterator_t) {
  14110. var i Txcb_charinfo_iterator_t
  14111. var prev Txcb_generic_iterator_t
  14112. _, _ = i, prev
  14113. prev = Xxcb_fontprop_end(tls, Xxcb_query_font_properties_iterator(tls, R))
  14114. i.Fdata = prev.Fdata + uintptr(libc.Uint64FromInt32(-prev.Findex)&libc.Uint64FromInt32(3))
  14115. i.Frem = libc.Int32FromUint32((*Txcb_query_font_reply_t)(unsafe.Pointer(R)).Fchar_infos_len)
  14116. i.Findex = int32(int64(i.Fdata) - int64(R))
  14117. return i
  14118. }
  14119. func Xxcb_query_font_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_font_cookie_t, e uintptr) (r uintptr) {
  14120. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  14121. }
  14122. func Xxcb_query_text_extents_sizeof(tls *libc.TLS, _buffer uintptr, string_len Tuint32_t) (r int32) {
  14123. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  14124. var xcb_tmp uintptr
  14125. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  14126. xcb_tmp = _buffer
  14127. xcb_buffer_len = uint32(0)
  14128. xcb_block_len = uint32(0)
  14129. xcb_pad = uint32(0)
  14130. xcb_align_to = uint32(0)
  14131. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  14132. xcb_tmp += uintptr(xcb_block_len)
  14133. xcb_buffer_len += xcb_block_len
  14134. xcb_block_len = uint32(0)
  14135. /* string */
  14136. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(string_len)*libc.Uint64FromInt64(2))
  14137. xcb_tmp += uintptr(xcb_block_len)
  14138. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  14139. /* insert padding */
  14140. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  14141. xcb_buffer_len += xcb_block_len + xcb_pad
  14142. if uint32(0) != xcb_pad {
  14143. xcb_tmp += uintptr(xcb_pad)
  14144. xcb_pad = uint32(0)
  14145. }
  14146. xcb_block_len = uint32(0)
  14147. return libc.Int32FromUint32(xcb_buffer_len)
  14148. }
  14149. func Xxcb_query_text_extents(tls *libc.TLS, c uintptr, font Txcb_fontable_t, string_len Tuint32_t, string1 uintptr) (r Txcb_query_text_extents_cookie_t) {
  14150. bp := tls.Alloc(112)
  14151. defer tls.Free(112)
  14152. var xcb_ret Txcb_query_text_extents_cookie_t
  14153. var _ /* xcb_out at bp+96 */ Txcb_query_text_extents_request_t
  14154. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  14155. _ = xcb_ret
  14156. (*(*Txcb_query_text_extents_request_t)(unsafe.Pointer(bp + 96))).Fodd_length = uint8(string_len & libc.Uint32FromInt32(1))
  14157. (*(*Txcb_query_text_extents_request_t)(unsafe.Pointer(bp + 96))).Ffont = font
  14158. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  14159. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14160. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14161. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14162. /* xcb_char2b_t string */
  14163. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  14164. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(string_len) * uint64(2)
  14165. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  14166. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  14167. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req100)))
  14168. return xcb_ret
  14169. }
  14170. var _xcb_req100 = Txcb_protocol_request_t{
  14171. Fcount: uint64(4),
  14172. Fopcode: uint8(m_XCB_QUERY_TEXT_EXTENTS),
  14173. }
  14174. func Xxcb_query_text_extents_unchecked(tls *libc.TLS, c uintptr, font Txcb_fontable_t, string_len Tuint32_t, string1 uintptr) (r Txcb_query_text_extents_cookie_t) {
  14175. bp := tls.Alloc(112)
  14176. defer tls.Free(112)
  14177. var xcb_ret Txcb_query_text_extents_cookie_t
  14178. var _ /* xcb_out at bp+96 */ Txcb_query_text_extents_request_t
  14179. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  14180. _ = xcb_ret
  14181. (*(*Txcb_query_text_extents_request_t)(unsafe.Pointer(bp + 96))).Fodd_length = uint8(string_len & libc.Uint32FromInt32(1))
  14182. (*(*Txcb_query_text_extents_request_t)(unsafe.Pointer(bp + 96))).Ffont = font
  14183. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  14184. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14185. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14186. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14187. /* xcb_char2b_t string */
  14188. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  14189. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(string_len) * uint64(2)
  14190. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  14191. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  14192. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req101)))
  14193. return xcb_ret
  14194. }
  14195. var _xcb_req101 = Txcb_protocol_request_t{
  14196. Fcount: uint64(4),
  14197. Fopcode: uint8(m_XCB_QUERY_TEXT_EXTENTS),
  14198. }
  14199. func Xxcb_query_text_extents_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_text_extents_cookie_t, e uintptr) (r uintptr) {
  14200. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  14201. }
  14202. func Xxcb_str_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  14203. var _aux, xcb_tmp uintptr
  14204. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  14205. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  14206. xcb_tmp = _buffer
  14207. _aux = _buffer
  14208. xcb_buffer_len = uint32(0)
  14209. xcb_block_len = uint32(0)
  14210. xcb_pad = uint32(0)
  14211. xcb_align_to = uint32(0)
  14212. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(1))
  14213. xcb_tmp += uintptr(xcb_block_len)
  14214. xcb_buffer_len += xcb_block_len
  14215. xcb_block_len = uint32(0)
  14216. /* name */
  14217. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_str_t)(unsafe.Pointer(_aux)).Fname_len)*libc.Uint64FromInt64(1))
  14218. xcb_tmp += uintptr(xcb_block_len)
  14219. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  14220. /* insert padding */
  14221. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  14222. xcb_buffer_len += xcb_block_len + xcb_pad
  14223. if uint32(0) != xcb_pad {
  14224. xcb_tmp += uintptr(xcb_pad)
  14225. xcb_pad = uint32(0)
  14226. }
  14227. xcb_block_len = uint32(0)
  14228. return libc.Int32FromUint32(xcb_buffer_len)
  14229. }
  14230. func Xxcb_str_name(tls *libc.TLS, R uintptr) (r uintptr) {
  14231. return R + libc.UintptrFromInt32(1)
  14232. }
  14233. func Xxcb_str_name_length(tls *libc.TLS, R uintptr) (r int32) {
  14234. return libc.Int32FromUint8((*Txcb_str_t)(unsafe.Pointer(R)).Fname_len)
  14235. }
  14236. func Xxcb_str_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  14237. var i Txcb_generic_iterator_t
  14238. _ = i
  14239. i.Fdata = R + libc.UintptrFromInt32(1) + uintptr((*Txcb_str_t)(unsafe.Pointer(R)).Fname_len)
  14240. i.Frem = 0
  14241. i.Findex = int32(int64(i.Fdata) - int64(R))
  14242. return i
  14243. }
  14244. func Xxcb_str_next(tls *libc.TLS, i uintptr) {
  14245. var R uintptr
  14246. var child Txcb_generic_iterator_t
  14247. _, _ = R, child
  14248. R = (*Txcb_str_iterator_t)(unsafe.Pointer(i)).Fdata
  14249. child.Fdata = R + uintptr(Xxcb_str_sizeof(tls, R))
  14250. (*Txcb_str_iterator_t)(unsafe.Pointer(i)).Findex = int32(int64(child.Fdata) - int64((*Txcb_str_iterator_t)(unsafe.Pointer(i)).Fdata))
  14251. (*Txcb_str_iterator_t)(unsafe.Pointer(i)).Frem--
  14252. (*Txcb_str_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  14253. }
  14254. func Xxcb_str_end(tls *libc.TLS, _i Txcb_str_iterator_t) (r Txcb_generic_iterator_t) {
  14255. bp := tls.Alloc(16)
  14256. defer tls.Free(16)
  14257. *(*Txcb_str_iterator_t)(unsafe.Pointer(bp)) = _i
  14258. var ret Txcb_generic_iterator_t
  14259. _ = ret
  14260. for (*(*Txcb_str_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  14261. Xxcb_str_next(tls, bp)
  14262. }
  14263. ret.Fdata = (*(*Txcb_str_iterator_t)(unsafe.Pointer(bp))).Fdata
  14264. ret.Frem = (*(*Txcb_str_iterator_t)(unsafe.Pointer(bp))).Frem
  14265. ret.Findex = (*(*Txcb_str_iterator_t)(unsafe.Pointer(bp))).Findex
  14266. return ret
  14267. }
  14268. func Xxcb_list_fonts_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  14269. var _aux, xcb_tmp uintptr
  14270. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  14271. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  14272. xcb_tmp = _buffer
  14273. _aux = _buffer
  14274. xcb_buffer_len = uint32(0)
  14275. xcb_block_len = uint32(0)
  14276. xcb_pad = uint32(0)
  14277. xcb_align_to = uint32(0)
  14278. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  14279. xcb_tmp += uintptr(xcb_block_len)
  14280. xcb_buffer_len += xcb_block_len
  14281. xcb_block_len = uint32(0)
  14282. /* pattern */
  14283. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_list_fonts_request_t)(unsafe.Pointer(_aux)).Fpattern_len)*libc.Uint64FromInt64(1))
  14284. xcb_tmp += uintptr(xcb_block_len)
  14285. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  14286. /* insert padding */
  14287. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  14288. xcb_buffer_len += xcb_block_len + xcb_pad
  14289. if uint32(0) != xcb_pad {
  14290. xcb_tmp += uintptr(xcb_pad)
  14291. xcb_pad = uint32(0)
  14292. }
  14293. xcb_block_len = uint32(0)
  14294. return libc.Int32FromUint32(xcb_buffer_len)
  14295. }
  14296. func Xxcb_list_fonts(tls *libc.TLS, c uintptr, max_names Tuint16_t, pattern_len Tuint16_t, pattern uintptr) (r Txcb_list_fonts_cookie_t) {
  14297. bp := tls.Alloc(112)
  14298. defer tls.Free(112)
  14299. var xcb_ret Txcb_list_fonts_cookie_t
  14300. var _ /* xcb_out at bp+96 */ Txcb_list_fonts_request_t
  14301. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  14302. _ = xcb_ret
  14303. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  14304. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 96))).Fmax_names = max_names
  14305. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 96))).Fpattern_len = pattern_len
  14306. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  14307. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14308. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14309. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14310. /* char pattern */
  14311. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pattern
  14312. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(pattern_len) * uint64(1)
  14313. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  14314. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  14315. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req102)))
  14316. return xcb_ret
  14317. }
  14318. var _xcb_req102 = Txcb_protocol_request_t{
  14319. Fcount: uint64(4),
  14320. Fopcode: uint8(m_XCB_LIST_FONTS),
  14321. }
  14322. func Xxcb_list_fonts_unchecked(tls *libc.TLS, c uintptr, max_names Tuint16_t, pattern_len Tuint16_t, pattern uintptr) (r Txcb_list_fonts_cookie_t) {
  14323. bp := tls.Alloc(112)
  14324. defer tls.Free(112)
  14325. var xcb_ret Txcb_list_fonts_cookie_t
  14326. var _ /* xcb_out at bp+96 */ Txcb_list_fonts_request_t
  14327. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  14328. _ = xcb_ret
  14329. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  14330. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 96))).Fmax_names = max_names
  14331. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 96))).Fpattern_len = pattern_len
  14332. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  14333. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14334. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14335. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14336. /* char pattern */
  14337. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pattern
  14338. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(pattern_len) * uint64(1)
  14339. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  14340. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  14341. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req103)))
  14342. return xcb_ret
  14343. }
  14344. var _xcb_req103 = Txcb_protocol_request_t{
  14345. Fcount: uint64(4),
  14346. Fopcode: uint8(m_XCB_LIST_FONTS),
  14347. }
  14348. func Xxcb_list_fonts_names_length(tls *libc.TLS, R uintptr) (r int32) {
  14349. return libc.Int32FromUint16((*Txcb_list_fonts_reply_t)(unsafe.Pointer(R)).Fnames_len)
  14350. }
  14351. func Xxcb_list_fonts_names_iterator(tls *libc.TLS, R uintptr) (r Txcb_str_iterator_t) {
  14352. var i Txcb_str_iterator_t
  14353. _ = i
  14354. i.Fdata = R + libc.UintptrFromInt32(1)*32
  14355. i.Frem = libc.Int32FromUint16((*Txcb_list_fonts_reply_t)(unsafe.Pointer(R)).Fnames_len)
  14356. i.Findex = int32(int64(i.Fdata) - int64(R))
  14357. return i
  14358. }
  14359. func Xxcb_list_fonts_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_fonts_cookie_t, e uintptr) (r uintptr) {
  14360. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  14361. }
  14362. func Xxcb_list_fonts_with_info_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  14363. var _aux, xcb_tmp uintptr
  14364. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  14365. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  14366. xcb_tmp = _buffer
  14367. _aux = _buffer
  14368. xcb_buffer_len = uint32(0)
  14369. xcb_block_len = uint32(0)
  14370. xcb_pad = uint32(0)
  14371. xcb_align_to = uint32(0)
  14372. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  14373. xcb_tmp += uintptr(xcb_block_len)
  14374. xcb_buffer_len += xcb_block_len
  14375. xcb_block_len = uint32(0)
  14376. /* pattern */
  14377. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(_aux)).Fpattern_len)*libc.Uint64FromInt64(1))
  14378. xcb_tmp += uintptr(xcb_block_len)
  14379. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  14380. /* insert padding */
  14381. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  14382. xcb_buffer_len += xcb_block_len + xcb_pad
  14383. if uint32(0) != xcb_pad {
  14384. xcb_tmp += uintptr(xcb_pad)
  14385. xcb_pad = uint32(0)
  14386. }
  14387. xcb_block_len = uint32(0)
  14388. return libc.Int32FromUint32(xcb_buffer_len)
  14389. }
  14390. func Xxcb_list_fonts_with_info(tls *libc.TLS, c uintptr, max_names Tuint16_t, pattern_len Tuint16_t, pattern uintptr) (r Txcb_list_fonts_with_info_cookie_t) {
  14391. bp := tls.Alloc(112)
  14392. defer tls.Free(112)
  14393. var xcb_ret Txcb_list_fonts_with_info_cookie_t
  14394. var _ /* xcb_out at bp+96 */ Txcb_list_fonts_with_info_request_t
  14395. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  14396. _ = xcb_ret
  14397. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  14398. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 96))).Fmax_names = max_names
  14399. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 96))).Fpattern_len = pattern_len
  14400. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  14401. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14402. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14403. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14404. /* char pattern */
  14405. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pattern
  14406. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(pattern_len) * uint64(1)
  14407. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  14408. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  14409. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req104)))
  14410. return xcb_ret
  14411. }
  14412. var _xcb_req104 = Txcb_protocol_request_t{
  14413. Fcount: uint64(4),
  14414. Fopcode: uint8(m_XCB_LIST_FONTS_WITH_INFO),
  14415. }
  14416. func Xxcb_list_fonts_with_info_unchecked(tls *libc.TLS, c uintptr, max_names Tuint16_t, pattern_len Tuint16_t, pattern uintptr) (r Txcb_list_fonts_with_info_cookie_t) {
  14417. bp := tls.Alloc(112)
  14418. defer tls.Free(112)
  14419. var xcb_ret Txcb_list_fonts_with_info_cookie_t
  14420. var _ /* xcb_out at bp+96 */ Txcb_list_fonts_with_info_request_t
  14421. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  14422. _ = xcb_ret
  14423. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  14424. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 96))).Fmax_names = max_names
  14425. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 96))).Fpattern_len = pattern_len
  14426. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  14427. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14428. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14429. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14430. /* char pattern */
  14431. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pattern
  14432. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(pattern_len) * uint64(1)
  14433. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  14434. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  14435. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req105)))
  14436. return xcb_ret
  14437. }
  14438. var _xcb_req105 = Txcb_protocol_request_t{
  14439. Fcount: uint64(4),
  14440. Fopcode: uint8(m_XCB_LIST_FONTS_WITH_INFO),
  14441. }
  14442. func Xxcb_list_fonts_with_info_properties(tls *libc.TLS, R uintptr) (r uintptr) {
  14443. return R + libc.UintptrFromInt32(1)*60
  14444. }
  14445. func Xxcb_list_fonts_with_info_properties_length(tls *libc.TLS, R uintptr) (r int32) {
  14446. return libc.Int32FromUint16((*Txcb_list_fonts_with_info_reply_t)(unsafe.Pointer(R)).Fproperties_len)
  14447. }
  14448. func Xxcb_list_fonts_with_info_properties_iterator(tls *libc.TLS, R uintptr) (r Txcb_fontprop_iterator_t) {
  14449. var i Txcb_fontprop_iterator_t
  14450. _ = i
  14451. i.Fdata = R + libc.UintptrFromInt32(1)*60
  14452. i.Frem = libc.Int32FromUint16((*Txcb_list_fonts_with_info_reply_t)(unsafe.Pointer(R)).Fproperties_len)
  14453. i.Findex = int32(int64(i.Fdata) - int64(R))
  14454. return i
  14455. }
  14456. func Xxcb_list_fonts_with_info_name(tls *libc.TLS, R uintptr) (r uintptr) {
  14457. var prev Txcb_generic_iterator_t
  14458. _ = prev
  14459. prev = Xxcb_fontprop_end(tls, Xxcb_list_fonts_with_info_properties_iterator(tls, R))
  14460. return prev.Fdata + uintptr(libc.Uint64FromInt32(-prev.Findex)&(libc.Uint64FromInt64(1)-libc.Uint64FromInt32(1))) + libc.UintptrFromInt32(0)
  14461. }
  14462. func Xxcb_list_fonts_with_info_name_length(tls *libc.TLS, R uintptr) (r int32) {
  14463. return libc.Int32FromUint8((*Txcb_list_fonts_with_info_reply_t)(unsafe.Pointer(R)).Fname_len)
  14464. }
  14465. func Xxcb_list_fonts_with_info_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  14466. var i, prev Txcb_generic_iterator_t
  14467. _, _ = i, prev
  14468. prev = Xxcb_fontprop_end(tls, Xxcb_list_fonts_with_info_properties_iterator(tls, R))
  14469. i.Fdata = prev.Fdata + uintptr(libc.Uint64FromInt32(-prev.Findex)&(libc.Uint64FromInt64(1)-libc.Uint64FromInt32(1))) + uintptr((*Txcb_list_fonts_with_info_reply_t)(unsafe.Pointer(R)).Fname_len)
  14470. i.Frem = 0
  14471. i.Findex = int32(int64(i.Fdata) - int64(R))
  14472. return i
  14473. }
  14474. func Xxcb_list_fonts_with_info_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_fonts_with_info_cookie_t, e uintptr) (r uintptr) {
  14475. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  14476. }
  14477. func Xxcb_set_font_path_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  14478. var _aux, xcb_tmp uintptr
  14479. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  14480. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  14481. xcb_tmp = _buffer
  14482. _aux = _buffer
  14483. xcb_buffer_len = uint32(0)
  14484. xcb_block_len = uint32(0)
  14485. xcb_pad = uint32(0)
  14486. xcb_align_to = uint32(0)
  14487. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  14488. xcb_tmp += uintptr(xcb_block_len)
  14489. xcb_buffer_len += xcb_block_len
  14490. xcb_block_len = uint32(0)
  14491. /* font */
  14492. i = uint32(0)
  14493. for {
  14494. if !(i < uint32((*Txcb_set_font_path_request_t)(unsafe.Pointer(_aux)).Ffont_qty)) {
  14495. break
  14496. }
  14497. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_str_sizeof(tls, xcb_tmp))
  14498. xcb_block_len += xcb_tmp_len
  14499. xcb_tmp += uintptr(xcb_tmp_len)
  14500. goto _1
  14501. _1:
  14502. ;
  14503. i++
  14504. }
  14505. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  14506. /* insert padding */
  14507. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  14508. xcb_buffer_len += xcb_block_len + xcb_pad
  14509. if uint32(0) != xcb_pad {
  14510. xcb_tmp += uintptr(xcb_pad)
  14511. xcb_pad = uint32(0)
  14512. }
  14513. xcb_block_len = uint32(0)
  14514. return libc.Int32FromUint32(xcb_buffer_len)
  14515. }
  14516. func Xxcb_set_font_path_checked(tls *libc.TLS, c uintptr, font_qty Tuint16_t, font uintptr) (r Txcb_void_cookie_t) {
  14517. bp := tls.Alloc(112)
  14518. defer tls.Free(112)
  14519. var i, xcb_tmp_len uint32
  14520. var xcb_ret Txcb_void_cookie_t
  14521. var xcb_tmp uintptr
  14522. var _ /* xcb_out at bp+96 */ Txcb_set_font_path_request_t
  14523. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  14524. _, _, _, _ = i, xcb_ret, xcb_tmp, xcb_tmp_len
  14525. (*(*Txcb_set_font_path_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  14526. (*(*Txcb_set_font_path_request_t)(unsafe.Pointer(bp + 96))).Ffont_qty = font_qty
  14527. libc.Xmemset(tls, bp+96+6, 0, uint64(2))
  14528. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  14529. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14530. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14531. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14532. /* xcb_str_t font */
  14533. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = font
  14534. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(0)
  14535. xcb_tmp = font
  14536. i = uint32(0)
  14537. for {
  14538. if !(i < uint32(font_qty)) {
  14539. break
  14540. }
  14541. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_str_sizeof(tls, xcb_tmp))
  14542. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len += uint64(xcb_tmp_len)
  14543. xcb_tmp += uintptr(xcb_tmp_len)
  14544. goto _1
  14545. _1:
  14546. ;
  14547. i++
  14548. }
  14549. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  14550. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  14551. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req106)))
  14552. return xcb_ret
  14553. }
  14554. var _xcb_req106 = Txcb_protocol_request_t{
  14555. Fcount: uint64(4),
  14556. Fopcode: uint8(m_XCB_SET_FONT_PATH),
  14557. Fisvoid: uint8(1),
  14558. }
  14559. func Xxcb_set_font_path(tls *libc.TLS, c uintptr, font_qty Tuint16_t, font uintptr) (r Txcb_void_cookie_t) {
  14560. bp := tls.Alloc(112)
  14561. defer tls.Free(112)
  14562. var i, xcb_tmp_len uint32
  14563. var xcb_ret Txcb_void_cookie_t
  14564. var xcb_tmp uintptr
  14565. var _ /* xcb_out at bp+96 */ Txcb_set_font_path_request_t
  14566. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  14567. _, _, _, _ = i, xcb_ret, xcb_tmp, xcb_tmp_len
  14568. (*(*Txcb_set_font_path_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  14569. (*(*Txcb_set_font_path_request_t)(unsafe.Pointer(bp + 96))).Ffont_qty = font_qty
  14570. libc.Xmemset(tls, bp+96+6, 0, uint64(2))
  14571. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  14572. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14573. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14574. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14575. /* xcb_str_t font */
  14576. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = font
  14577. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(0)
  14578. xcb_tmp = font
  14579. i = uint32(0)
  14580. for {
  14581. if !(i < uint32(font_qty)) {
  14582. break
  14583. }
  14584. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_str_sizeof(tls, xcb_tmp))
  14585. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len += uint64(xcb_tmp_len)
  14586. xcb_tmp += uintptr(xcb_tmp_len)
  14587. goto _1
  14588. _1:
  14589. ;
  14590. i++
  14591. }
  14592. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  14593. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  14594. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req107)))
  14595. return xcb_ret
  14596. }
  14597. var _xcb_req107 = Txcb_protocol_request_t{
  14598. Fcount: uint64(4),
  14599. Fopcode: uint8(m_XCB_SET_FONT_PATH),
  14600. Fisvoid: uint8(1),
  14601. }
  14602. func Xxcb_set_font_path_font_length(tls *libc.TLS, R uintptr) (r int32) {
  14603. return libc.Int32FromUint16((*Txcb_set_font_path_request_t)(unsafe.Pointer(R)).Ffont_qty)
  14604. }
  14605. func Xxcb_set_font_path_font_iterator(tls *libc.TLS, R uintptr) (r Txcb_str_iterator_t) {
  14606. var i Txcb_str_iterator_t
  14607. _ = i
  14608. i.Fdata = R + libc.UintptrFromInt32(1)*8
  14609. i.Frem = libc.Int32FromUint16((*Txcb_set_font_path_request_t)(unsafe.Pointer(R)).Ffont_qty)
  14610. i.Findex = int32(int64(i.Fdata) - int64(R))
  14611. return i
  14612. }
  14613. func Xxcb_get_font_path_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  14614. var _aux, xcb_tmp uintptr
  14615. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  14616. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  14617. xcb_tmp = _buffer
  14618. _aux = _buffer
  14619. xcb_buffer_len = uint32(0)
  14620. xcb_block_len = uint32(0)
  14621. xcb_pad = uint32(0)
  14622. xcb_align_to = uint32(0)
  14623. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  14624. xcb_tmp += uintptr(xcb_block_len)
  14625. xcb_buffer_len += xcb_block_len
  14626. xcb_block_len = uint32(0)
  14627. /* path */
  14628. i = uint32(0)
  14629. for {
  14630. if !(i < uint32((*Txcb_get_font_path_reply_t)(unsafe.Pointer(_aux)).Fpath_len)) {
  14631. break
  14632. }
  14633. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_str_sizeof(tls, xcb_tmp))
  14634. xcb_block_len += xcb_tmp_len
  14635. xcb_tmp += uintptr(xcb_tmp_len)
  14636. goto _1
  14637. _1:
  14638. ;
  14639. i++
  14640. }
  14641. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  14642. /* insert padding */
  14643. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  14644. xcb_buffer_len += xcb_block_len + xcb_pad
  14645. if uint32(0) != xcb_pad {
  14646. xcb_tmp += uintptr(xcb_pad)
  14647. xcb_pad = uint32(0)
  14648. }
  14649. xcb_block_len = uint32(0)
  14650. return libc.Int32FromUint32(xcb_buffer_len)
  14651. }
  14652. func Xxcb_get_font_path(tls *libc.TLS, c uintptr) (r Txcb_get_font_path_cookie_t) {
  14653. bp := tls.Alloc(80)
  14654. defer tls.Free(80)
  14655. var xcb_ret Txcb_get_font_path_cookie_t
  14656. var _ /* xcb_out at bp+64 */ Txcb_get_font_path_request_t
  14657. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  14658. _ = xcb_ret
  14659. (*(*Txcb_get_font_path_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  14660. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  14661. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  14662. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14663. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14664. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req108)))
  14665. return xcb_ret
  14666. }
  14667. var _xcb_req108 = Txcb_protocol_request_t{
  14668. Fcount: uint64(2),
  14669. Fopcode: uint8(m_XCB_GET_FONT_PATH),
  14670. }
  14671. func Xxcb_get_font_path_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_font_path_cookie_t) {
  14672. bp := tls.Alloc(80)
  14673. defer tls.Free(80)
  14674. var xcb_ret Txcb_get_font_path_cookie_t
  14675. var _ /* xcb_out at bp+64 */ Txcb_get_font_path_request_t
  14676. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  14677. _ = xcb_ret
  14678. (*(*Txcb_get_font_path_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  14679. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  14680. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  14681. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14682. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14683. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req109)))
  14684. return xcb_ret
  14685. }
  14686. var _xcb_req109 = Txcb_protocol_request_t{
  14687. Fcount: uint64(2),
  14688. Fopcode: uint8(m_XCB_GET_FONT_PATH),
  14689. }
  14690. func Xxcb_get_font_path_path_length(tls *libc.TLS, R uintptr) (r int32) {
  14691. return libc.Int32FromUint16((*Txcb_get_font_path_reply_t)(unsafe.Pointer(R)).Fpath_len)
  14692. }
  14693. func Xxcb_get_font_path_path_iterator(tls *libc.TLS, R uintptr) (r Txcb_str_iterator_t) {
  14694. var i Txcb_str_iterator_t
  14695. _ = i
  14696. i.Fdata = R + libc.UintptrFromInt32(1)*32
  14697. i.Frem = libc.Int32FromUint16((*Txcb_get_font_path_reply_t)(unsafe.Pointer(R)).Fpath_len)
  14698. i.Findex = int32(int64(i.Fdata) - int64(R))
  14699. return i
  14700. }
  14701. func Xxcb_get_font_path_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_font_path_cookie_t, e uintptr) (r uintptr) {
  14702. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  14703. }
  14704. func Xxcb_create_pixmap_checked(tls *libc.TLS, c uintptr, depth Tuint8_t, pid Txcb_pixmap_t, drawable Txcb_drawable_t, width Tuint16_t, height Tuint16_t) (r Txcb_void_cookie_t) {
  14705. bp := tls.Alloc(80)
  14706. defer tls.Free(80)
  14707. var xcb_ret Txcb_void_cookie_t
  14708. var _ /* xcb_out at bp+64 */ Txcb_create_pixmap_request_t
  14709. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  14710. _ = xcb_ret
  14711. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fdepth = depth
  14712. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fpid = pid
  14713. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fdrawable = drawable
  14714. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  14715. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  14716. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  14717. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  14718. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14719. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14720. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req110)))
  14721. return xcb_ret
  14722. }
  14723. var _xcb_req110 = Txcb_protocol_request_t{
  14724. Fcount: uint64(2),
  14725. Fopcode: uint8(m_XCB_CREATE_PIXMAP),
  14726. Fisvoid: uint8(1),
  14727. }
  14728. func Xxcb_create_pixmap(tls *libc.TLS, c uintptr, depth Tuint8_t, pid Txcb_pixmap_t, drawable Txcb_drawable_t, width Tuint16_t, height Tuint16_t) (r Txcb_void_cookie_t) {
  14729. bp := tls.Alloc(80)
  14730. defer tls.Free(80)
  14731. var xcb_ret Txcb_void_cookie_t
  14732. var _ /* xcb_out at bp+64 */ Txcb_create_pixmap_request_t
  14733. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  14734. _ = xcb_ret
  14735. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fdepth = depth
  14736. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fpid = pid
  14737. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fdrawable = drawable
  14738. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  14739. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  14740. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  14741. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  14742. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14743. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14744. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req111)))
  14745. return xcb_ret
  14746. }
  14747. var _xcb_req111 = Txcb_protocol_request_t{
  14748. Fcount: uint64(2),
  14749. Fopcode: uint8(m_XCB_CREATE_PIXMAP),
  14750. Fisvoid: uint8(1),
  14751. }
  14752. func Xxcb_free_pixmap_checked(tls *libc.TLS, c uintptr, pixmap Txcb_pixmap_t) (r Txcb_void_cookie_t) {
  14753. bp := tls.Alloc(80)
  14754. defer tls.Free(80)
  14755. var xcb_ret Txcb_void_cookie_t
  14756. var _ /* xcb_out at bp+64 */ Txcb_free_pixmap_request_t
  14757. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  14758. _ = xcb_ret
  14759. (*(*Txcb_free_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  14760. (*(*Txcb_free_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fpixmap = pixmap
  14761. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  14762. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14763. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14764. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14765. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req112)))
  14766. return xcb_ret
  14767. }
  14768. var _xcb_req112 = Txcb_protocol_request_t{
  14769. Fcount: uint64(2),
  14770. Fopcode: uint8(m_XCB_FREE_PIXMAP),
  14771. Fisvoid: uint8(1),
  14772. }
  14773. func Xxcb_free_pixmap(tls *libc.TLS, c uintptr, pixmap Txcb_pixmap_t) (r Txcb_void_cookie_t) {
  14774. bp := tls.Alloc(80)
  14775. defer tls.Free(80)
  14776. var xcb_ret Txcb_void_cookie_t
  14777. var _ /* xcb_out at bp+64 */ Txcb_free_pixmap_request_t
  14778. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  14779. _ = xcb_ret
  14780. (*(*Txcb_free_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  14781. (*(*Txcb_free_pixmap_request_t)(unsafe.Pointer(bp + 64))).Fpixmap = pixmap
  14782. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  14783. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  14784. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14785. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  14786. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req113)))
  14787. return xcb_ret
  14788. }
  14789. var _xcb_req113 = Txcb_protocol_request_t{
  14790. Fcount: uint64(2),
  14791. Fopcode: uint8(m_XCB_FREE_PIXMAP),
  14792. Fisvoid: uint8(1),
  14793. }
  14794. func Xxcb_create_gc_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  14795. bp := tls.Alloc(16)
  14796. defer tls.Free(16)
  14797. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  14798. var xcb_out, xcb_tmp uintptr
  14799. var xcb_parts [24]Tiovec
  14800. var _ /* xcb_pad0 at bp+0 */ [3]int8
  14801. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  14802. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  14803. xcb_buffer_len = uint32(0)
  14804. xcb_align_to = uint32(0)
  14805. xcb_padding_offset = uint32(0)
  14806. xcb_pad = uint32(0)
  14807. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  14808. xcb_parts_idx = uint32(0)
  14809. xcb_block_len = uint32(0)
  14810. if value_mask&uint32(_XCB_GC_FUNCTION) != 0 {
  14811. /* xcb_create_gc_value_list_t.function */
  14812. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  14813. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14814. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14815. xcb_parts_idx++
  14816. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14817. }
  14818. if value_mask&uint32(_XCB_GC_PLANE_MASK) != 0 {
  14819. /* xcb_create_gc_value_list_t.plane_mask */
  14820. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  14821. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14822. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14823. xcb_parts_idx++
  14824. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14825. }
  14826. if value_mask&uint32(_XCB_GC_FOREGROUND) != 0 {
  14827. /* xcb_create_gc_value_list_t.foreground */
  14828. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  14829. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14830. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14831. xcb_parts_idx++
  14832. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14833. }
  14834. if value_mask&uint32(_XCB_GC_BACKGROUND) != 0 {
  14835. /* xcb_create_gc_value_list_t.background */
  14836. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  14837. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14838. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14839. xcb_parts_idx++
  14840. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14841. }
  14842. if value_mask&uint32(_XCB_GC_LINE_WIDTH) != 0 {
  14843. /* xcb_create_gc_value_list_t.line_width */
  14844. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  14845. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14846. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14847. xcb_parts_idx++
  14848. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14849. }
  14850. if value_mask&uint32(_XCB_GC_LINE_STYLE) != 0 {
  14851. /* xcb_create_gc_value_list_t.line_style */
  14852. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  14853. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14854. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14855. xcb_parts_idx++
  14856. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14857. }
  14858. if value_mask&uint32(_XCB_GC_CAP_STYLE) != 0 {
  14859. /* xcb_create_gc_value_list_t.cap_style */
  14860. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  14861. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14862. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14863. xcb_parts_idx++
  14864. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14865. }
  14866. if value_mask&uint32(_XCB_GC_JOIN_STYLE) != 0 {
  14867. /* xcb_create_gc_value_list_t.join_style */
  14868. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 28
  14869. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14870. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14871. xcb_parts_idx++
  14872. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14873. }
  14874. if value_mask&uint32(_XCB_GC_FILL_STYLE) != 0 {
  14875. /* xcb_create_gc_value_list_t.fill_style */
  14876. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 32
  14877. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14878. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14879. xcb_parts_idx++
  14880. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14881. }
  14882. if value_mask&uint32(_XCB_GC_FILL_RULE) != 0 {
  14883. /* xcb_create_gc_value_list_t.fill_rule */
  14884. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 36
  14885. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14886. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14887. xcb_parts_idx++
  14888. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14889. }
  14890. if value_mask&uint32(_XCB_GC_TILE) != 0 {
  14891. /* xcb_create_gc_value_list_t.tile */
  14892. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 40
  14893. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14894. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14895. xcb_parts_idx++
  14896. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14897. }
  14898. if value_mask&uint32(_XCB_GC_STIPPLE) != 0 {
  14899. /* xcb_create_gc_value_list_t.stipple */
  14900. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 44
  14901. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14902. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14903. xcb_parts_idx++
  14904. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14905. }
  14906. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_X) != 0 {
  14907. /* xcb_create_gc_value_list_t.tile_stipple_x_origin */
  14908. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 48
  14909. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14910. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14911. xcb_parts_idx++
  14912. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14913. }
  14914. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_Y) != 0 {
  14915. /* xcb_create_gc_value_list_t.tile_stipple_y_origin */
  14916. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 52
  14917. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14918. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14919. xcb_parts_idx++
  14920. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14921. }
  14922. if value_mask&uint32(_XCB_GC_FONT) != 0 {
  14923. /* xcb_create_gc_value_list_t.font */
  14924. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 56
  14925. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14926. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14927. xcb_parts_idx++
  14928. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14929. }
  14930. if value_mask&uint32(_XCB_GC_SUBWINDOW_MODE) != 0 {
  14931. /* xcb_create_gc_value_list_t.subwindow_mode */
  14932. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 60
  14933. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14934. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14935. xcb_parts_idx++
  14936. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14937. }
  14938. if value_mask&uint32(_XCB_GC_GRAPHICS_EXPOSURES) != 0 {
  14939. /* xcb_create_gc_value_list_t.graphics_exposures */
  14940. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 64
  14941. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14942. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14943. xcb_parts_idx++
  14944. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14945. }
  14946. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_X) != 0 {
  14947. /* xcb_create_gc_value_list_t.clip_x_origin */
  14948. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 68
  14949. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14950. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14951. xcb_parts_idx++
  14952. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14953. }
  14954. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_Y) != 0 {
  14955. /* xcb_create_gc_value_list_t.clip_y_origin */
  14956. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 72
  14957. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14958. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14959. xcb_parts_idx++
  14960. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14961. }
  14962. if value_mask&uint32(_XCB_GC_CLIP_MASK) != 0 {
  14963. /* xcb_create_gc_value_list_t.clip_mask */
  14964. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 76
  14965. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14966. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14967. xcb_parts_idx++
  14968. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14969. }
  14970. if value_mask&uint32(_XCB_GC_DASH_OFFSET) != 0 {
  14971. /* xcb_create_gc_value_list_t.dash_offset */
  14972. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 80
  14973. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14974. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14975. xcb_parts_idx++
  14976. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14977. }
  14978. if value_mask&uint32(_XCB_GC_DASH_LIST) != 0 {
  14979. /* xcb_create_gc_value_list_t.dashes */
  14980. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 84
  14981. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14982. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14983. xcb_parts_idx++
  14984. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14985. }
  14986. if value_mask&uint32(_XCB_GC_ARC_MODE) != 0 {
  14987. /* xcb_create_gc_value_list_t.arc_mode */
  14988. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 88
  14989. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  14990. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  14991. xcb_parts_idx++
  14992. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  14993. }
  14994. /* insert padding */
  14995. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  14996. xcb_buffer_len += xcb_block_len + xcb_pad
  14997. if uint32(0) != xcb_pad {
  14998. xcb_parts[xcb_parts_idx].Fiov_base = bp
  14999. xcb_parts[xcb_parts_idx].Fiov_len = uint64(xcb_pad)
  15000. xcb_parts_idx++
  15001. xcb_pad = uint32(0)
  15002. }
  15003. xcb_block_len = uint32(0)
  15004. xcb_padding_offset = uint32(0)
  15005. if libc.UintptrFromInt32(0) == xcb_out {
  15006. /* allocate memory */
  15007. xcb_out = libc.Xmalloc(tls, uint64(xcb_buffer_len))
  15008. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  15009. }
  15010. xcb_tmp = xcb_out
  15011. i = uint32(0)
  15012. for {
  15013. if !(i < xcb_parts_idx) {
  15014. break
  15015. }
  15016. if uintptr(0) != xcb_parts[i].Fiov_base && uint64(0) != xcb_parts[i].Fiov_len {
  15017. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  15018. }
  15019. if uint64(0) != xcb_parts[i].Fiov_len {
  15020. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  15021. }
  15022. goto _1
  15023. _1:
  15024. ;
  15025. i++
  15026. }
  15027. return libc.Int32FromUint32(xcb_buffer_len)
  15028. }
  15029. func Xxcb_create_gc_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  15030. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  15031. var xcb_tmp uintptr
  15032. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  15033. xcb_tmp = _buffer
  15034. xcb_buffer_len = uint32(0)
  15035. xcb_block_len = uint32(0)
  15036. xcb_pad = uint32(0)
  15037. xcb_align_to = uint32(0)
  15038. xcb_padding_offset = uint32(0)
  15039. if value_mask&uint32(_XCB_GC_FUNCTION) != 0 {
  15040. /* xcb_create_gc_value_list_t.function */
  15041. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ffunction = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15042. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15043. xcb_tmp += uintptr(4)
  15044. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15045. }
  15046. if value_mask&uint32(_XCB_GC_PLANE_MASK) != 0 {
  15047. /* xcb_create_gc_value_list_t.plane_mask */
  15048. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fplane_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15049. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15050. xcb_tmp += uintptr(4)
  15051. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15052. }
  15053. if value_mask&uint32(_XCB_GC_FOREGROUND) != 0 {
  15054. /* xcb_create_gc_value_list_t.foreground */
  15055. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fforeground = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15056. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15057. xcb_tmp += uintptr(4)
  15058. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15059. }
  15060. if value_mask&uint32(_XCB_GC_BACKGROUND) != 0 {
  15061. /* xcb_create_gc_value_list_t.background */
  15062. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fbackground = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15063. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15064. xcb_tmp += uintptr(4)
  15065. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15066. }
  15067. if value_mask&uint32(_XCB_GC_LINE_WIDTH) != 0 {
  15068. /* xcb_create_gc_value_list_t.line_width */
  15069. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fline_width = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15070. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15071. xcb_tmp += uintptr(4)
  15072. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15073. }
  15074. if value_mask&uint32(_XCB_GC_LINE_STYLE) != 0 {
  15075. /* xcb_create_gc_value_list_t.line_style */
  15076. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fline_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15077. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15078. xcb_tmp += uintptr(4)
  15079. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15080. }
  15081. if value_mask&uint32(_XCB_GC_CAP_STYLE) != 0 {
  15082. /* xcb_create_gc_value_list_t.cap_style */
  15083. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fcap_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15084. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15085. xcb_tmp += uintptr(4)
  15086. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15087. }
  15088. if value_mask&uint32(_XCB_GC_JOIN_STYLE) != 0 {
  15089. /* xcb_create_gc_value_list_t.join_style */
  15090. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fjoin_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15091. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15092. xcb_tmp += uintptr(4)
  15093. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15094. }
  15095. if value_mask&uint32(_XCB_GC_FILL_STYLE) != 0 {
  15096. /* xcb_create_gc_value_list_t.fill_style */
  15097. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ffill_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15098. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15099. xcb_tmp += uintptr(4)
  15100. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15101. }
  15102. if value_mask&uint32(_XCB_GC_FILL_RULE) != 0 {
  15103. /* xcb_create_gc_value_list_t.fill_rule */
  15104. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ffill_rule = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15105. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15106. xcb_tmp += uintptr(4)
  15107. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15108. }
  15109. if value_mask&uint32(_XCB_GC_TILE) != 0 {
  15110. /* xcb_create_gc_value_list_t.tile */
  15111. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  15112. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15113. xcb_tmp += uintptr(4)
  15114. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15115. }
  15116. if value_mask&uint32(_XCB_GC_STIPPLE) != 0 {
  15117. /* xcb_create_gc_value_list_t.stipple */
  15118. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fstipple = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  15119. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15120. xcb_tmp += uintptr(4)
  15121. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15122. }
  15123. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_X) != 0 {
  15124. /* xcb_create_gc_value_list_t.tile_stipple_x_origin */
  15125. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile_stipple_x_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  15126. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15127. xcb_tmp += uintptr(4)
  15128. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15129. }
  15130. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_Y) != 0 {
  15131. /* xcb_create_gc_value_list_t.tile_stipple_y_origin */
  15132. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile_stipple_y_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  15133. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15134. xcb_tmp += uintptr(4)
  15135. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15136. }
  15137. if value_mask&uint32(_XCB_GC_FONT) != 0 {
  15138. /* xcb_create_gc_value_list_t.font */
  15139. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ffont = *(*Txcb_font_t)(unsafe.Pointer(xcb_tmp))
  15140. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15141. xcb_tmp += uintptr(4)
  15142. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15143. }
  15144. if value_mask&uint32(_XCB_GC_SUBWINDOW_MODE) != 0 {
  15145. /* xcb_create_gc_value_list_t.subwindow_mode */
  15146. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fsubwindow_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15147. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15148. xcb_tmp += uintptr(4)
  15149. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15150. }
  15151. if value_mask&uint32(_XCB_GC_GRAPHICS_EXPOSURES) != 0 {
  15152. /* xcb_create_gc_value_list_t.graphics_exposures */
  15153. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fgraphics_exposures = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  15154. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15155. xcb_tmp += uintptr(4)
  15156. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15157. }
  15158. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_X) != 0 {
  15159. /* xcb_create_gc_value_list_t.clip_x_origin */
  15160. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_x_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  15161. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15162. xcb_tmp += uintptr(4)
  15163. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15164. }
  15165. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_Y) != 0 {
  15166. /* xcb_create_gc_value_list_t.clip_y_origin */
  15167. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_y_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  15168. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15169. xcb_tmp += uintptr(4)
  15170. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15171. }
  15172. if value_mask&uint32(_XCB_GC_CLIP_MASK) != 0 {
  15173. /* xcb_create_gc_value_list_t.clip_mask */
  15174. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_mask = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  15175. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15176. xcb_tmp += uintptr(4)
  15177. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15178. }
  15179. if value_mask&uint32(_XCB_GC_DASH_OFFSET) != 0 {
  15180. /* xcb_create_gc_value_list_t.dash_offset */
  15181. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fdash_offset = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15182. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15183. xcb_tmp += uintptr(4)
  15184. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15185. }
  15186. if value_mask&uint32(_XCB_GC_DASH_LIST) != 0 {
  15187. /* xcb_create_gc_value_list_t.dashes */
  15188. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fdashes = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15189. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15190. xcb_tmp += uintptr(4)
  15191. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15192. }
  15193. if value_mask&uint32(_XCB_GC_ARC_MODE) != 0 {
  15194. /* xcb_create_gc_value_list_t.arc_mode */
  15195. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Farc_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15196. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15197. xcb_tmp += uintptr(4)
  15198. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15199. }
  15200. /* insert padding */
  15201. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  15202. xcb_buffer_len += xcb_block_len + xcb_pad
  15203. if uint32(0) != xcb_pad {
  15204. xcb_tmp += uintptr(xcb_pad)
  15205. xcb_pad = uint32(0)
  15206. }
  15207. xcb_block_len = uint32(0)
  15208. xcb_padding_offset = uint32(0)
  15209. return libc.Int32FromUint32(xcb_buffer_len)
  15210. }
  15211. func Xxcb_create_gc_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t) (r int32) {
  15212. bp := tls.Alloc(96)
  15213. defer tls.Free(96)
  15214. var _ /* _aux at bp+0 */ Txcb_create_gc_value_list_t
  15215. return Xxcb_create_gc_value_list_unpack(tls, _buffer, value_mask, bp)
  15216. }
  15217. func Xxcb_create_gc_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  15218. var _aux, xcb_tmp uintptr
  15219. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  15220. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  15221. xcb_tmp = _buffer
  15222. _aux = _buffer
  15223. xcb_buffer_len = uint32(0)
  15224. xcb_block_len = uint32(0)
  15225. xcb_pad = uint32(0)
  15226. xcb_align_to = uint32(0)
  15227. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(16))
  15228. xcb_tmp += uintptr(xcb_block_len)
  15229. xcb_buffer_len += xcb_block_len
  15230. xcb_block_len = uint32(0)
  15231. /* value_list */
  15232. xcb_block_len += libc.Uint32FromInt32(Xxcb_create_gc_value_list_sizeof(tls, xcb_tmp, (*Txcb_create_gc_request_t)(unsafe.Pointer(_aux)).Fvalue_mask))
  15233. xcb_tmp += uintptr(xcb_block_len)
  15234. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  15235. /* insert padding */
  15236. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  15237. xcb_buffer_len += xcb_block_len + xcb_pad
  15238. if uint32(0) != xcb_pad {
  15239. xcb_tmp += uintptr(xcb_pad)
  15240. xcb_pad = uint32(0)
  15241. }
  15242. xcb_block_len = uint32(0)
  15243. return libc.Int32FromUint32(xcb_buffer_len)
  15244. }
  15245. func Xxcb_create_gc_checked(tls *libc.TLS, c uintptr, cid Txcb_gcontext_t, drawable Txcb_drawable_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  15246. bp := tls.Alloc(96)
  15247. defer tls.Free(96)
  15248. var xcb_ret Txcb_void_cookie_t
  15249. var _ /* xcb_out at bp+80 */ Txcb_create_gc_request_t
  15250. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  15251. _ = xcb_ret
  15252. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  15253. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fcid = cid
  15254. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fdrawable = drawable
  15255. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  15256. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  15257. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  15258. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15259. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  15260. /* xcb_create_gc_value_list_t value_list */
  15261. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  15262. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_create_gc_value_list_sizeof(tls, value_list, value_mask))
  15263. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req114)))
  15264. return xcb_ret
  15265. }
  15266. var _xcb_req114 = Txcb_protocol_request_t{
  15267. Fcount: uint64(3),
  15268. Fopcode: uint8(m_XCB_CREATE_GC),
  15269. Fisvoid: uint8(1),
  15270. }
  15271. func Xxcb_create_gc(tls *libc.TLS, c uintptr, cid Txcb_gcontext_t, drawable Txcb_drawable_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  15272. bp := tls.Alloc(96)
  15273. defer tls.Free(96)
  15274. var xcb_ret Txcb_void_cookie_t
  15275. var _ /* xcb_out at bp+80 */ Txcb_create_gc_request_t
  15276. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  15277. _ = xcb_ret
  15278. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  15279. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fcid = cid
  15280. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fdrawable = drawable
  15281. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  15282. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  15283. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  15284. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15285. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  15286. /* xcb_create_gc_value_list_t value_list */
  15287. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  15288. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_create_gc_value_list_sizeof(tls, value_list, value_mask))
  15289. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req115)))
  15290. return xcb_ret
  15291. }
  15292. var _xcb_req115 = Txcb_protocol_request_t{
  15293. Fcount: uint64(3),
  15294. Fopcode: uint8(m_XCB_CREATE_GC),
  15295. Fisvoid: uint8(1),
  15296. }
  15297. func Xxcb_create_gc_aux_checked(tls *libc.TLS, c uintptr, cid Txcb_gcontext_t, drawable Txcb_drawable_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  15298. bp := tls.Alloc(112)
  15299. defer tls.Free(112)
  15300. var xcb_ret Txcb_void_cookie_t
  15301. var _ /* xcb_aux0 at bp+96 */ uintptr
  15302. var _ /* xcb_out at bp+80 */ Txcb_create_gc_request_t
  15303. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  15304. _ = xcb_ret
  15305. *(*uintptr)(unsafe.Pointer(bp + 96)) = uintptr(0)
  15306. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  15307. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fcid = cid
  15308. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fdrawable = drawable
  15309. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  15310. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  15311. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  15312. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15313. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  15314. /* xcb_create_gc_value_list_t value_list */
  15315. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_create_gc_value_list_serialize(tls, bp+96, value_mask, value_list))
  15316. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 96))
  15317. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req116)))
  15318. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))
  15319. return xcb_ret
  15320. }
  15321. var _xcb_req116 = Txcb_protocol_request_t{
  15322. Fcount: uint64(3),
  15323. Fopcode: uint8(m_XCB_CREATE_GC),
  15324. Fisvoid: uint8(1),
  15325. }
  15326. func Xxcb_create_gc_aux(tls *libc.TLS, c uintptr, cid Txcb_gcontext_t, drawable Txcb_drawable_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  15327. bp := tls.Alloc(112)
  15328. defer tls.Free(112)
  15329. var xcb_ret Txcb_void_cookie_t
  15330. var _ /* xcb_aux0 at bp+96 */ uintptr
  15331. var _ /* xcb_out at bp+80 */ Txcb_create_gc_request_t
  15332. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  15333. _ = xcb_ret
  15334. *(*uintptr)(unsafe.Pointer(bp + 96)) = uintptr(0)
  15335. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  15336. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fcid = cid
  15337. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fdrawable = drawable
  15338. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  15339. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  15340. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  15341. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15342. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  15343. /* xcb_create_gc_value_list_t value_list */
  15344. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_create_gc_value_list_serialize(tls, bp+96, value_mask, value_list))
  15345. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 96))
  15346. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req117)))
  15347. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))
  15348. return xcb_ret
  15349. }
  15350. var _xcb_req117 = Txcb_protocol_request_t{
  15351. Fcount: uint64(3),
  15352. Fopcode: uint8(m_XCB_CREATE_GC),
  15353. Fisvoid: uint8(1),
  15354. }
  15355. func Xxcb_create_gc_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  15356. return R + libc.UintptrFromInt32(1)*16
  15357. }
  15358. func Xxcb_change_gc_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  15359. bp := tls.Alloc(16)
  15360. defer tls.Free(16)
  15361. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  15362. var xcb_out, xcb_tmp uintptr
  15363. var xcb_parts [24]Tiovec
  15364. var _ /* xcb_pad0 at bp+0 */ [3]int8
  15365. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  15366. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  15367. xcb_buffer_len = uint32(0)
  15368. xcb_align_to = uint32(0)
  15369. xcb_padding_offset = uint32(0)
  15370. xcb_pad = uint32(0)
  15371. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  15372. xcb_parts_idx = uint32(0)
  15373. xcb_block_len = uint32(0)
  15374. if value_mask&uint32(_XCB_GC_FUNCTION) != 0 {
  15375. /* xcb_change_gc_value_list_t.function */
  15376. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  15377. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15378. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15379. xcb_parts_idx++
  15380. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15381. }
  15382. if value_mask&uint32(_XCB_GC_PLANE_MASK) != 0 {
  15383. /* xcb_change_gc_value_list_t.plane_mask */
  15384. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  15385. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15386. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15387. xcb_parts_idx++
  15388. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15389. }
  15390. if value_mask&uint32(_XCB_GC_FOREGROUND) != 0 {
  15391. /* xcb_change_gc_value_list_t.foreground */
  15392. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  15393. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15394. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15395. xcb_parts_idx++
  15396. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15397. }
  15398. if value_mask&uint32(_XCB_GC_BACKGROUND) != 0 {
  15399. /* xcb_change_gc_value_list_t.background */
  15400. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  15401. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15402. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15403. xcb_parts_idx++
  15404. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15405. }
  15406. if value_mask&uint32(_XCB_GC_LINE_WIDTH) != 0 {
  15407. /* xcb_change_gc_value_list_t.line_width */
  15408. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  15409. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15410. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15411. xcb_parts_idx++
  15412. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15413. }
  15414. if value_mask&uint32(_XCB_GC_LINE_STYLE) != 0 {
  15415. /* xcb_change_gc_value_list_t.line_style */
  15416. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  15417. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15418. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15419. xcb_parts_idx++
  15420. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15421. }
  15422. if value_mask&uint32(_XCB_GC_CAP_STYLE) != 0 {
  15423. /* xcb_change_gc_value_list_t.cap_style */
  15424. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  15425. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15426. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15427. xcb_parts_idx++
  15428. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15429. }
  15430. if value_mask&uint32(_XCB_GC_JOIN_STYLE) != 0 {
  15431. /* xcb_change_gc_value_list_t.join_style */
  15432. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 28
  15433. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15434. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15435. xcb_parts_idx++
  15436. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15437. }
  15438. if value_mask&uint32(_XCB_GC_FILL_STYLE) != 0 {
  15439. /* xcb_change_gc_value_list_t.fill_style */
  15440. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 32
  15441. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15442. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15443. xcb_parts_idx++
  15444. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15445. }
  15446. if value_mask&uint32(_XCB_GC_FILL_RULE) != 0 {
  15447. /* xcb_change_gc_value_list_t.fill_rule */
  15448. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 36
  15449. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15450. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15451. xcb_parts_idx++
  15452. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15453. }
  15454. if value_mask&uint32(_XCB_GC_TILE) != 0 {
  15455. /* xcb_change_gc_value_list_t.tile */
  15456. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 40
  15457. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15458. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15459. xcb_parts_idx++
  15460. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15461. }
  15462. if value_mask&uint32(_XCB_GC_STIPPLE) != 0 {
  15463. /* xcb_change_gc_value_list_t.stipple */
  15464. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 44
  15465. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15466. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15467. xcb_parts_idx++
  15468. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15469. }
  15470. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_X) != 0 {
  15471. /* xcb_change_gc_value_list_t.tile_stipple_x_origin */
  15472. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 48
  15473. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15474. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15475. xcb_parts_idx++
  15476. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15477. }
  15478. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_Y) != 0 {
  15479. /* xcb_change_gc_value_list_t.tile_stipple_y_origin */
  15480. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 52
  15481. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15482. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15483. xcb_parts_idx++
  15484. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15485. }
  15486. if value_mask&uint32(_XCB_GC_FONT) != 0 {
  15487. /* xcb_change_gc_value_list_t.font */
  15488. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 56
  15489. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15490. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15491. xcb_parts_idx++
  15492. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15493. }
  15494. if value_mask&uint32(_XCB_GC_SUBWINDOW_MODE) != 0 {
  15495. /* xcb_change_gc_value_list_t.subwindow_mode */
  15496. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 60
  15497. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15498. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15499. xcb_parts_idx++
  15500. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15501. }
  15502. if value_mask&uint32(_XCB_GC_GRAPHICS_EXPOSURES) != 0 {
  15503. /* xcb_change_gc_value_list_t.graphics_exposures */
  15504. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 64
  15505. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15506. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15507. xcb_parts_idx++
  15508. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15509. }
  15510. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_X) != 0 {
  15511. /* xcb_change_gc_value_list_t.clip_x_origin */
  15512. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 68
  15513. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15514. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15515. xcb_parts_idx++
  15516. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15517. }
  15518. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_Y) != 0 {
  15519. /* xcb_change_gc_value_list_t.clip_y_origin */
  15520. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 72
  15521. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15522. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15523. xcb_parts_idx++
  15524. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15525. }
  15526. if value_mask&uint32(_XCB_GC_CLIP_MASK) != 0 {
  15527. /* xcb_change_gc_value_list_t.clip_mask */
  15528. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 76
  15529. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15530. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15531. xcb_parts_idx++
  15532. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15533. }
  15534. if value_mask&uint32(_XCB_GC_DASH_OFFSET) != 0 {
  15535. /* xcb_change_gc_value_list_t.dash_offset */
  15536. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 80
  15537. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15538. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15539. xcb_parts_idx++
  15540. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15541. }
  15542. if value_mask&uint32(_XCB_GC_DASH_LIST) != 0 {
  15543. /* xcb_change_gc_value_list_t.dashes */
  15544. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 84
  15545. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15546. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15547. xcb_parts_idx++
  15548. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15549. }
  15550. if value_mask&uint32(_XCB_GC_ARC_MODE) != 0 {
  15551. /* xcb_change_gc_value_list_t.arc_mode */
  15552. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 88
  15553. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15554. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  15555. xcb_parts_idx++
  15556. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15557. }
  15558. /* insert padding */
  15559. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  15560. xcb_buffer_len += xcb_block_len + xcb_pad
  15561. if uint32(0) != xcb_pad {
  15562. xcb_parts[xcb_parts_idx].Fiov_base = bp
  15563. xcb_parts[xcb_parts_idx].Fiov_len = uint64(xcb_pad)
  15564. xcb_parts_idx++
  15565. xcb_pad = uint32(0)
  15566. }
  15567. xcb_block_len = uint32(0)
  15568. xcb_padding_offset = uint32(0)
  15569. if libc.UintptrFromInt32(0) == xcb_out {
  15570. /* allocate memory */
  15571. xcb_out = libc.Xmalloc(tls, uint64(xcb_buffer_len))
  15572. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  15573. }
  15574. xcb_tmp = xcb_out
  15575. i = uint32(0)
  15576. for {
  15577. if !(i < xcb_parts_idx) {
  15578. break
  15579. }
  15580. if uintptr(0) != xcb_parts[i].Fiov_base && uint64(0) != xcb_parts[i].Fiov_len {
  15581. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  15582. }
  15583. if uint64(0) != xcb_parts[i].Fiov_len {
  15584. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  15585. }
  15586. goto _1
  15587. _1:
  15588. ;
  15589. i++
  15590. }
  15591. return libc.Int32FromUint32(xcb_buffer_len)
  15592. }
  15593. func Xxcb_change_gc_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  15594. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  15595. var xcb_tmp uintptr
  15596. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  15597. xcb_tmp = _buffer
  15598. xcb_buffer_len = uint32(0)
  15599. xcb_block_len = uint32(0)
  15600. xcb_pad = uint32(0)
  15601. xcb_align_to = uint32(0)
  15602. xcb_padding_offset = uint32(0)
  15603. if value_mask&uint32(_XCB_GC_FUNCTION) != 0 {
  15604. /* xcb_change_gc_value_list_t.function */
  15605. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ffunction = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15606. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15607. xcb_tmp += uintptr(4)
  15608. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15609. }
  15610. if value_mask&uint32(_XCB_GC_PLANE_MASK) != 0 {
  15611. /* xcb_change_gc_value_list_t.plane_mask */
  15612. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fplane_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15613. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15614. xcb_tmp += uintptr(4)
  15615. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15616. }
  15617. if value_mask&uint32(_XCB_GC_FOREGROUND) != 0 {
  15618. /* xcb_change_gc_value_list_t.foreground */
  15619. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fforeground = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15620. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15621. xcb_tmp += uintptr(4)
  15622. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15623. }
  15624. if value_mask&uint32(_XCB_GC_BACKGROUND) != 0 {
  15625. /* xcb_change_gc_value_list_t.background */
  15626. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fbackground = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15627. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15628. xcb_tmp += uintptr(4)
  15629. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15630. }
  15631. if value_mask&uint32(_XCB_GC_LINE_WIDTH) != 0 {
  15632. /* xcb_change_gc_value_list_t.line_width */
  15633. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fline_width = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15634. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15635. xcb_tmp += uintptr(4)
  15636. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15637. }
  15638. if value_mask&uint32(_XCB_GC_LINE_STYLE) != 0 {
  15639. /* xcb_change_gc_value_list_t.line_style */
  15640. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fline_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15641. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15642. xcb_tmp += uintptr(4)
  15643. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15644. }
  15645. if value_mask&uint32(_XCB_GC_CAP_STYLE) != 0 {
  15646. /* xcb_change_gc_value_list_t.cap_style */
  15647. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fcap_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15648. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15649. xcb_tmp += uintptr(4)
  15650. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15651. }
  15652. if value_mask&uint32(_XCB_GC_JOIN_STYLE) != 0 {
  15653. /* xcb_change_gc_value_list_t.join_style */
  15654. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fjoin_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15655. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15656. xcb_tmp += uintptr(4)
  15657. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15658. }
  15659. if value_mask&uint32(_XCB_GC_FILL_STYLE) != 0 {
  15660. /* xcb_change_gc_value_list_t.fill_style */
  15661. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ffill_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15662. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15663. xcb_tmp += uintptr(4)
  15664. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15665. }
  15666. if value_mask&uint32(_XCB_GC_FILL_RULE) != 0 {
  15667. /* xcb_change_gc_value_list_t.fill_rule */
  15668. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ffill_rule = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15669. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15670. xcb_tmp += uintptr(4)
  15671. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15672. }
  15673. if value_mask&uint32(_XCB_GC_TILE) != 0 {
  15674. /* xcb_change_gc_value_list_t.tile */
  15675. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  15676. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15677. xcb_tmp += uintptr(4)
  15678. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15679. }
  15680. if value_mask&uint32(_XCB_GC_STIPPLE) != 0 {
  15681. /* xcb_change_gc_value_list_t.stipple */
  15682. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fstipple = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  15683. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15684. xcb_tmp += uintptr(4)
  15685. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15686. }
  15687. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_X) != 0 {
  15688. /* xcb_change_gc_value_list_t.tile_stipple_x_origin */
  15689. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile_stipple_x_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  15690. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15691. xcb_tmp += uintptr(4)
  15692. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15693. }
  15694. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_Y) != 0 {
  15695. /* xcb_change_gc_value_list_t.tile_stipple_y_origin */
  15696. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile_stipple_y_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  15697. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15698. xcb_tmp += uintptr(4)
  15699. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15700. }
  15701. if value_mask&uint32(_XCB_GC_FONT) != 0 {
  15702. /* xcb_change_gc_value_list_t.font */
  15703. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ffont = *(*Txcb_font_t)(unsafe.Pointer(xcb_tmp))
  15704. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15705. xcb_tmp += uintptr(4)
  15706. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15707. }
  15708. if value_mask&uint32(_XCB_GC_SUBWINDOW_MODE) != 0 {
  15709. /* xcb_change_gc_value_list_t.subwindow_mode */
  15710. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fsubwindow_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15711. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15712. xcb_tmp += uintptr(4)
  15713. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15714. }
  15715. if value_mask&uint32(_XCB_GC_GRAPHICS_EXPOSURES) != 0 {
  15716. /* xcb_change_gc_value_list_t.graphics_exposures */
  15717. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fgraphics_exposures = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  15718. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15719. xcb_tmp += uintptr(4)
  15720. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15721. }
  15722. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_X) != 0 {
  15723. /* xcb_change_gc_value_list_t.clip_x_origin */
  15724. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_x_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  15725. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15726. xcb_tmp += uintptr(4)
  15727. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15728. }
  15729. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_Y) != 0 {
  15730. /* xcb_change_gc_value_list_t.clip_y_origin */
  15731. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_y_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  15732. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15733. xcb_tmp += uintptr(4)
  15734. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15735. }
  15736. if value_mask&uint32(_XCB_GC_CLIP_MASK) != 0 {
  15737. /* xcb_change_gc_value_list_t.clip_mask */
  15738. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_mask = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  15739. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15740. xcb_tmp += uintptr(4)
  15741. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15742. }
  15743. if value_mask&uint32(_XCB_GC_DASH_OFFSET) != 0 {
  15744. /* xcb_change_gc_value_list_t.dash_offset */
  15745. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fdash_offset = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15746. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15747. xcb_tmp += uintptr(4)
  15748. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15749. }
  15750. if value_mask&uint32(_XCB_GC_DASH_LIST) != 0 {
  15751. /* xcb_change_gc_value_list_t.dashes */
  15752. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fdashes = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15753. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15754. xcb_tmp += uintptr(4)
  15755. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15756. }
  15757. if value_mask&uint32(_XCB_GC_ARC_MODE) != 0 {
  15758. /* xcb_change_gc_value_list_t.arc_mode */
  15759. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Farc_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  15760. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  15761. xcb_tmp += uintptr(4)
  15762. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  15763. }
  15764. /* insert padding */
  15765. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  15766. xcb_buffer_len += xcb_block_len + xcb_pad
  15767. if uint32(0) != xcb_pad {
  15768. xcb_tmp += uintptr(xcb_pad)
  15769. xcb_pad = uint32(0)
  15770. }
  15771. xcb_block_len = uint32(0)
  15772. xcb_padding_offset = uint32(0)
  15773. return libc.Int32FromUint32(xcb_buffer_len)
  15774. }
  15775. func Xxcb_change_gc_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t) (r int32) {
  15776. bp := tls.Alloc(96)
  15777. defer tls.Free(96)
  15778. var _ /* _aux at bp+0 */ Txcb_change_gc_value_list_t
  15779. return Xxcb_change_gc_value_list_unpack(tls, _buffer, value_mask, bp)
  15780. }
  15781. func Xxcb_change_gc_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  15782. var _aux, xcb_tmp uintptr
  15783. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  15784. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  15785. xcb_tmp = _buffer
  15786. _aux = _buffer
  15787. xcb_buffer_len = uint32(0)
  15788. xcb_block_len = uint32(0)
  15789. xcb_pad = uint32(0)
  15790. xcb_align_to = uint32(0)
  15791. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  15792. xcb_tmp += uintptr(xcb_block_len)
  15793. xcb_buffer_len += xcb_block_len
  15794. xcb_block_len = uint32(0)
  15795. /* value_list */
  15796. xcb_block_len += libc.Uint32FromInt32(Xxcb_change_gc_value_list_sizeof(tls, xcb_tmp, (*Txcb_change_gc_request_t)(unsafe.Pointer(_aux)).Fvalue_mask))
  15797. xcb_tmp += uintptr(xcb_block_len)
  15798. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  15799. /* insert padding */
  15800. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  15801. xcb_buffer_len += xcb_block_len + xcb_pad
  15802. if uint32(0) != xcb_pad {
  15803. xcb_tmp += uintptr(xcb_pad)
  15804. xcb_pad = uint32(0)
  15805. }
  15806. xcb_block_len = uint32(0)
  15807. return libc.Int32FromUint32(xcb_buffer_len)
  15808. }
  15809. func Xxcb_change_gc_checked(tls *libc.TLS, c uintptr, gc Txcb_gcontext_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  15810. bp := tls.Alloc(96)
  15811. defer tls.Free(96)
  15812. var xcb_ret Txcb_void_cookie_t
  15813. var _ /* xcb_out at bp+80 */ Txcb_change_gc_request_t
  15814. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  15815. _ = xcb_ret
  15816. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  15817. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fgc = gc
  15818. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  15819. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  15820. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  15821. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15822. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  15823. /* xcb_change_gc_value_list_t value_list */
  15824. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  15825. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_gc_value_list_sizeof(tls, value_list, value_mask))
  15826. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req118)))
  15827. return xcb_ret
  15828. }
  15829. var _xcb_req118 = Txcb_protocol_request_t{
  15830. Fcount: uint64(3),
  15831. Fopcode: uint8(m_XCB_CHANGE_GC),
  15832. Fisvoid: uint8(1),
  15833. }
  15834. func Xxcb_change_gc(tls *libc.TLS, c uintptr, gc Txcb_gcontext_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  15835. bp := tls.Alloc(96)
  15836. defer tls.Free(96)
  15837. var xcb_ret Txcb_void_cookie_t
  15838. var _ /* xcb_out at bp+80 */ Txcb_change_gc_request_t
  15839. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  15840. _ = xcb_ret
  15841. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  15842. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fgc = gc
  15843. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  15844. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  15845. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  15846. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15847. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  15848. /* xcb_change_gc_value_list_t value_list */
  15849. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  15850. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_gc_value_list_sizeof(tls, value_list, value_mask))
  15851. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req119)))
  15852. return xcb_ret
  15853. }
  15854. var _xcb_req119 = Txcb_protocol_request_t{
  15855. Fcount: uint64(3),
  15856. Fopcode: uint8(m_XCB_CHANGE_GC),
  15857. Fisvoid: uint8(1),
  15858. }
  15859. func Xxcb_change_gc_aux_checked(tls *libc.TLS, c uintptr, gc Txcb_gcontext_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  15860. bp := tls.Alloc(112)
  15861. defer tls.Free(112)
  15862. var xcb_ret Txcb_void_cookie_t
  15863. var _ /* xcb_aux0 at bp+96 */ uintptr
  15864. var _ /* xcb_out at bp+80 */ Txcb_change_gc_request_t
  15865. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  15866. _ = xcb_ret
  15867. *(*uintptr)(unsafe.Pointer(bp + 96)) = uintptr(0)
  15868. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  15869. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fgc = gc
  15870. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  15871. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  15872. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  15873. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15874. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  15875. /* xcb_change_gc_value_list_t value_list */
  15876. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_gc_value_list_serialize(tls, bp+96, value_mask, value_list))
  15877. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 96))
  15878. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req120)))
  15879. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))
  15880. return xcb_ret
  15881. }
  15882. var _xcb_req120 = Txcb_protocol_request_t{
  15883. Fcount: uint64(3),
  15884. Fopcode: uint8(m_XCB_CHANGE_GC),
  15885. Fisvoid: uint8(1),
  15886. }
  15887. func Xxcb_change_gc_aux(tls *libc.TLS, c uintptr, gc Txcb_gcontext_t, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  15888. bp := tls.Alloc(112)
  15889. defer tls.Free(112)
  15890. var xcb_ret Txcb_void_cookie_t
  15891. var _ /* xcb_aux0 at bp+96 */ uintptr
  15892. var _ /* xcb_out at bp+80 */ Txcb_change_gc_request_t
  15893. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  15894. _ = xcb_ret
  15895. *(*uintptr)(unsafe.Pointer(bp + 96)) = uintptr(0)
  15896. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  15897. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fgc = gc
  15898. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  15899. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  15900. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  15901. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15902. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  15903. /* xcb_change_gc_value_list_t value_list */
  15904. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_gc_value_list_serialize(tls, bp+96, value_mask, value_list))
  15905. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 96))
  15906. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req121)))
  15907. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))
  15908. return xcb_ret
  15909. }
  15910. var _xcb_req121 = Txcb_protocol_request_t{
  15911. Fcount: uint64(3),
  15912. Fopcode: uint8(m_XCB_CHANGE_GC),
  15913. Fisvoid: uint8(1),
  15914. }
  15915. func Xxcb_change_gc_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  15916. return R + libc.UintptrFromInt32(1)*12
  15917. }
  15918. func Xxcb_copy_gc_checked(tls *libc.TLS, c uintptr, src_gc Txcb_gcontext_t, dst_gc Txcb_gcontext_t, value_mask Tuint32_t) (r Txcb_void_cookie_t) {
  15919. bp := tls.Alloc(80)
  15920. defer tls.Free(80)
  15921. var xcb_ret Txcb_void_cookie_t
  15922. var _ /* xcb_out at bp+64 */ Txcb_copy_gc_request_t
  15923. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15924. _ = xcb_ret
  15925. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  15926. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 64))).Fsrc_gc = src_gc
  15927. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 64))).Fdst_gc = dst_gc
  15928. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 64))).Fvalue_mask = value_mask
  15929. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  15930. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  15931. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15932. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  15933. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req122)))
  15934. return xcb_ret
  15935. }
  15936. var _xcb_req122 = Txcb_protocol_request_t{
  15937. Fcount: uint64(2),
  15938. Fopcode: uint8(m_XCB_COPY_GC),
  15939. Fisvoid: uint8(1),
  15940. }
  15941. func Xxcb_copy_gc(tls *libc.TLS, c uintptr, src_gc Txcb_gcontext_t, dst_gc Txcb_gcontext_t, value_mask Tuint32_t) (r Txcb_void_cookie_t) {
  15942. bp := tls.Alloc(80)
  15943. defer tls.Free(80)
  15944. var xcb_ret Txcb_void_cookie_t
  15945. var _ /* xcb_out at bp+64 */ Txcb_copy_gc_request_t
  15946. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15947. _ = xcb_ret
  15948. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  15949. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 64))).Fsrc_gc = src_gc
  15950. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 64))).Fdst_gc = dst_gc
  15951. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 64))).Fvalue_mask = value_mask
  15952. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  15953. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  15954. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15955. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  15956. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req123)))
  15957. return xcb_ret
  15958. }
  15959. var _xcb_req123 = Txcb_protocol_request_t{
  15960. Fcount: uint64(2),
  15961. Fopcode: uint8(m_XCB_COPY_GC),
  15962. Fisvoid: uint8(1),
  15963. }
  15964. func Xxcb_set_dashes_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  15965. var _aux, xcb_tmp uintptr
  15966. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  15967. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  15968. xcb_tmp = _buffer
  15969. _aux = _buffer
  15970. xcb_buffer_len = uint32(0)
  15971. xcb_block_len = uint32(0)
  15972. xcb_pad = uint32(0)
  15973. xcb_align_to = uint32(0)
  15974. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  15975. xcb_tmp += uintptr(xcb_block_len)
  15976. xcb_buffer_len += xcb_block_len
  15977. xcb_block_len = uint32(0)
  15978. /* dashes */
  15979. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_set_dashes_request_t)(unsafe.Pointer(_aux)).Fdashes_len)*libc.Uint64FromInt64(1))
  15980. xcb_tmp += uintptr(xcb_block_len)
  15981. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  15982. /* insert padding */
  15983. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  15984. xcb_buffer_len += xcb_block_len + xcb_pad
  15985. if uint32(0) != xcb_pad {
  15986. xcb_tmp += uintptr(xcb_pad)
  15987. xcb_pad = uint32(0)
  15988. }
  15989. xcb_block_len = uint32(0)
  15990. return libc.Int32FromUint32(xcb_buffer_len)
  15991. }
  15992. func Xxcb_set_dashes_checked(tls *libc.TLS, c uintptr, gc Txcb_gcontext_t, dash_offset Tuint16_t, dashes_len Tuint16_t, dashes uintptr) (r Txcb_void_cookie_t) {
  15993. bp := tls.Alloc(112)
  15994. defer tls.Free(112)
  15995. var xcb_ret Txcb_void_cookie_t
  15996. var _ /* xcb_out at bp+96 */ Txcb_set_dashes_request_t
  15997. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15998. _ = xcb_ret
  15999. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  16000. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16001. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 96))).Fdash_offset = dash_offset
  16002. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 96))).Fdashes_len = dashes_len
  16003. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16004. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16005. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16006. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16007. /* uint8_t dashes */
  16008. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = dashes
  16009. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(dashes_len) * uint64(1)
  16010. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16011. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16012. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req124)))
  16013. return xcb_ret
  16014. }
  16015. var _xcb_req124 = Txcb_protocol_request_t{
  16016. Fcount: uint64(4),
  16017. Fopcode: uint8(m_XCB_SET_DASHES),
  16018. Fisvoid: uint8(1),
  16019. }
  16020. func Xxcb_set_dashes(tls *libc.TLS, c uintptr, gc Txcb_gcontext_t, dash_offset Tuint16_t, dashes_len Tuint16_t, dashes uintptr) (r Txcb_void_cookie_t) {
  16021. bp := tls.Alloc(112)
  16022. defer tls.Free(112)
  16023. var xcb_ret Txcb_void_cookie_t
  16024. var _ /* xcb_out at bp+96 */ Txcb_set_dashes_request_t
  16025. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16026. _ = xcb_ret
  16027. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  16028. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16029. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 96))).Fdash_offset = dash_offset
  16030. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 96))).Fdashes_len = dashes_len
  16031. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16032. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16033. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16034. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16035. /* uint8_t dashes */
  16036. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = dashes
  16037. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(dashes_len) * uint64(1)
  16038. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16039. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16040. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req125)))
  16041. return xcb_ret
  16042. }
  16043. var _xcb_req125 = Txcb_protocol_request_t{
  16044. Fcount: uint64(4),
  16045. Fopcode: uint8(m_XCB_SET_DASHES),
  16046. Fisvoid: uint8(1),
  16047. }
  16048. func Xxcb_set_dashes_dashes(tls *libc.TLS, R uintptr) (r uintptr) {
  16049. return R + libc.UintptrFromInt32(1)*12
  16050. }
  16051. func Xxcb_set_dashes_dashes_length(tls *libc.TLS, R uintptr) (r int32) {
  16052. return libc.Int32FromUint16((*Txcb_set_dashes_request_t)(unsafe.Pointer(R)).Fdashes_len)
  16053. }
  16054. func Xxcb_set_dashes_dashes_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  16055. var i Txcb_generic_iterator_t
  16056. _ = i
  16057. i.Fdata = R + libc.UintptrFromInt32(1)*12 + uintptr((*Txcb_set_dashes_request_t)(unsafe.Pointer(R)).Fdashes_len)
  16058. i.Frem = 0
  16059. i.Findex = int32(int64(i.Fdata) - int64(R))
  16060. return i
  16061. }
  16062. func Xxcb_set_clip_rectangles_sizeof(tls *libc.TLS, _buffer uintptr, rectangles_len Tuint32_t) (r int32) {
  16063. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16064. var xcb_tmp uintptr
  16065. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16066. xcb_tmp = _buffer
  16067. xcb_buffer_len = uint32(0)
  16068. xcb_block_len = uint32(0)
  16069. xcb_pad = uint32(0)
  16070. xcb_align_to = uint32(0)
  16071. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  16072. xcb_tmp += uintptr(xcb_block_len)
  16073. xcb_buffer_len += xcb_block_len
  16074. xcb_block_len = uint32(0)
  16075. /* rectangles */
  16076. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(rectangles_len)*libc.Uint64FromInt64(8))
  16077. xcb_tmp += uintptr(xcb_block_len)
  16078. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  16079. /* insert padding */
  16080. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16081. xcb_buffer_len += xcb_block_len + xcb_pad
  16082. if uint32(0) != xcb_pad {
  16083. xcb_tmp += uintptr(xcb_pad)
  16084. xcb_pad = uint32(0)
  16085. }
  16086. xcb_block_len = uint32(0)
  16087. return libc.Int32FromUint32(xcb_buffer_len)
  16088. }
  16089. func Xxcb_set_clip_rectangles_checked(tls *libc.TLS, c uintptr, ordering Tuint8_t, gc Txcb_gcontext_t, clip_x_origin Tint16_t, clip_y_origin Tint16_t, rectangles_len Tuint32_t, rectangles uintptr) (r Txcb_void_cookie_t) {
  16090. bp := tls.Alloc(112)
  16091. defer tls.Free(112)
  16092. var xcb_ret Txcb_void_cookie_t
  16093. var _ /* xcb_out at bp+96 */ Txcb_set_clip_rectangles_request_t
  16094. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16095. _ = xcb_ret
  16096. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 96))).Fordering = ordering
  16097. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16098. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 96))).Fclip_x_origin = clip_x_origin
  16099. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 96))).Fclip_y_origin = clip_y_origin
  16100. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16101. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16102. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16103. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16104. /* xcb_rectangle_t rectangles */
  16105. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  16106. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(rectangles_len) * uint64(8)
  16107. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16108. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16109. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req126)))
  16110. return xcb_ret
  16111. }
  16112. var _xcb_req126 = Txcb_protocol_request_t{
  16113. Fcount: uint64(4),
  16114. Fopcode: uint8(m_XCB_SET_CLIP_RECTANGLES),
  16115. Fisvoid: uint8(1),
  16116. }
  16117. func Xxcb_set_clip_rectangles(tls *libc.TLS, c uintptr, ordering Tuint8_t, gc Txcb_gcontext_t, clip_x_origin Tint16_t, clip_y_origin Tint16_t, rectangles_len Tuint32_t, rectangles uintptr) (r Txcb_void_cookie_t) {
  16118. bp := tls.Alloc(112)
  16119. defer tls.Free(112)
  16120. var xcb_ret Txcb_void_cookie_t
  16121. var _ /* xcb_out at bp+96 */ Txcb_set_clip_rectangles_request_t
  16122. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16123. _ = xcb_ret
  16124. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 96))).Fordering = ordering
  16125. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16126. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 96))).Fclip_x_origin = clip_x_origin
  16127. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 96))).Fclip_y_origin = clip_y_origin
  16128. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16129. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16130. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16131. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16132. /* xcb_rectangle_t rectangles */
  16133. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  16134. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(rectangles_len) * uint64(8)
  16135. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16136. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16137. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req127)))
  16138. return xcb_ret
  16139. }
  16140. var _xcb_req127 = Txcb_protocol_request_t{
  16141. Fcount: uint64(4),
  16142. Fopcode: uint8(m_XCB_SET_CLIP_RECTANGLES),
  16143. Fisvoid: uint8(1),
  16144. }
  16145. func Xxcb_set_clip_rectangles_rectangles(tls *libc.TLS, R uintptr) (r uintptr) {
  16146. return R + libc.UintptrFromInt32(1)*12
  16147. }
  16148. func Xxcb_set_clip_rectangles_rectangles_length(tls *libc.TLS, R uintptr) (r int32) {
  16149. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(8))
  16150. }
  16151. func Xxcb_set_clip_rectangles_rectangles_iterator(tls *libc.TLS, R uintptr) (r Txcb_rectangle_iterator_t) {
  16152. var i Txcb_rectangle_iterator_t
  16153. _ = i
  16154. i.Fdata = R + libc.UintptrFromInt32(1)*12
  16155. i.Frem = libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(8))
  16156. i.Findex = int32(int64(i.Fdata) - int64(R))
  16157. return i
  16158. }
  16159. func Xxcb_free_gc_checked(tls *libc.TLS, c uintptr, gc Txcb_gcontext_t) (r Txcb_void_cookie_t) {
  16160. bp := tls.Alloc(80)
  16161. defer tls.Free(80)
  16162. var xcb_ret Txcb_void_cookie_t
  16163. var _ /* xcb_out at bp+64 */ Txcb_free_gc_request_t
  16164. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16165. _ = xcb_ret
  16166. (*(*Txcb_free_gc_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  16167. (*(*Txcb_free_gc_request_t)(unsafe.Pointer(bp + 64))).Fgc = gc
  16168. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  16169. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  16170. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16171. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16172. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req128)))
  16173. return xcb_ret
  16174. }
  16175. var _xcb_req128 = Txcb_protocol_request_t{
  16176. Fcount: uint64(2),
  16177. Fopcode: uint8(m_XCB_FREE_GC),
  16178. Fisvoid: uint8(1),
  16179. }
  16180. func Xxcb_free_gc(tls *libc.TLS, c uintptr, gc Txcb_gcontext_t) (r Txcb_void_cookie_t) {
  16181. bp := tls.Alloc(80)
  16182. defer tls.Free(80)
  16183. var xcb_ret Txcb_void_cookie_t
  16184. var _ /* xcb_out at bp+64 */ Txcb_free_gc_request_t
  16185. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16186. _ = xcb_ret
  16187. (*(*Txcb_free_gc_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  16188. (*(*Txcb_free_gc_request_t)(unsafe.Pointer(bp + 64))).Fgc = gc
  16189. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  16190. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  16191. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16192. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16193. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req129)))
  16194. return xcb_ret
  16195. }
  16196. var _xcb_req129 = Txcb_protocol_request_t{
  16197. Fcount: uint64(2),
  16198. Fopcode: uint8(m_XCB_FREE_GC),
  16199. Fisvoid: uint8(1),
  16200. }
  16201. func Xxcb_clear_area_checked(tls *libc.TLS, c uintptr, exposures Tuint8_t, window Txcb_window_t, x Tint16_t, y Tint16_t, width Tuint16_t, height Tuint16_t) (r Txcb_void_cookie_t) {
  16202. bp := tls.Alloc(80)
  16203. defer tls.Free(80)
  16204. var xcb_ret Txcb_void_cookie_t
  16205. var _ /* xcb_out at bp+64 */ Txcb_clear_area_request_t
  16206. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16207. _ = xcb_ret
  16208. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fexposures = exposures
  16209. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  16210. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fx = x
  16211. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fy = y
  16212. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  16213. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  16214. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  16215. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  16216. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16217. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16218. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req130)))
  16219. return xcb_ret
  16220. }
  16221. var _xcb_req130 = Txcb_protocol_request_t{
  16222. Fcount: uint64(2),
  16223. Fopcode: uint8(m_XCB_CLEAR_AREA),
  16224. Fisvoid: uint8(1),
  16225. }
  16226. func Xxcb_clear_area(tls *libc.TLS, c uintptr, exposures Tuint8_t, window Txcb_window_t, x Tint16_t, y Tint16_t, width Tuint16_t, height Tuint16_t) (r Txcb_void_cookie_t) {
  16227. bp := tls.Alloc(80)
  16228. defer tls.Free(80)
  16229. var xcb_ret Txcb_void_cookie_t
  16230. var _ /* xcb_out at bp+64 */ Txcb_clear_area_request_t
  16231. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16232. _ = xcb_ret
  16233. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fexposures = exposures
  16234. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  16235. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fx = x
  16236. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fy = y
  16237. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  16238. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  16239. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  16240. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  16241. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16242. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16243. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req131)))
  16244. return xcb_ret
  16245. }
  16246. var _xcb_req131 = Txcb_protocol_request_t{
  16247. Fcount: uint64(2),
  16248. Fopcode: uint8(m_XCB_CLEAR_AREA),
  16249. Fisvoid: uint8(1),
  16250. }
  16251. func Xxcb_copy_area_checked(tls *libc.TLS, c uintptr, src_drawable Txcb_drawable_t, dst_drawable Txcb_drawable_t, gc Txcb_gcontext_t, src_x Tint16_t, src_y Tint16_t, dst_x Tint16_t, dst_y Tint16_t, width Tuint16_t, height Tuint16_t) (r Txcb_void_cookie_t) {
  16252. bp := tls.Alloc(96)
  16253. defer tls.Free(96)
  16254. var xcb_ret Txcb_void_cookie_t
  16255. var _ /* xcb_out at bp+64 */ Txcb_copy_area_request_t
  16256. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16257. _ = xcb_ret
  16258. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  16259. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fsrc_drawable = src_drawable
  16260. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fdst_drawable = dst_drawable
  16261. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fgc = gc
  16262. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fsrc_x = src_x
  16263. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fsrc_y = src_y
  16264. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fdst_x = dst_x
  16265. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fdst_y = dst_y
  16266. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  16267. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  16268. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  16269. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(28)
  16270. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16271. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16272. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req132)))
  16273. return xcb_ret
  16274. }
  16275. var _xcb_req132 = Txcb_protocol_request_t{
  16276. Fcount: uint64(2),
  16277. Fopcode: uint8(m_XCB_COPY_AREA),
  16278. Fisvoid: uint8(1),
  16279. }
  16280. func Xxcb_copy_area(tls *libc.TLS, c uintptr, src_drawable Txcb_drawable_t, dst_drawable Txcb_drawable_t, gc Txcb_gcontext_t, src_x Tint16_t, src_y Tint16_t, dst_x Tint16_t, dst_y Tint16_t, width Tuint16_t, height Tuint16_t) (r Txcb_void_cookie_t) {
  16281. bp := tls.Alloc(96)
  16282. defer tls.Free(96)
  16283. var xcb_ret Txcb_void_cookie_t
  16284. var _ /* xcb_out at bp+64 */ Txcb_copy_area_request_t
  16285. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16286. _ = xcb_ret
  16287. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  16288. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fsrc_drawable = src_drawable
  16289. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fdst_drawable = dst_drawable
  16290. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fgc = gc
  16291. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fsrc_x = src_x
  16292. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fsrc_y = src_y
  16293. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fdst_x = dst_x
  16294. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fdst_y = dst_y
  16295. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  16296. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  16297. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  16298. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(28)
  16299. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16300. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16301. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req133)))
  16302. return xcb_ret
  16303. }
  16304. var _xcb_req133 = Txcb_protocol_request_t{
  16305. Fcount: uint64(2),
  16306. Fopcode: uint8(m_XCB_COPY_AREA),
  16307. Fisvoid: uint8(1),
  16308. }
  16309. func Xxcb_copy_plane_checked(tls *libc.TLS, c uintptr, src_drawable Txcb_drawable_t, dst_drawable Txcb_drawable_t, gc Txcb_gcontext_t, src_x Tint16_t, src_y Tint16_t, dst_x Tint16_t, dst_y Tint16_t, width Tuint16_t, height Tuint16_t, bit_plane Tuint32_t) (r Txcb_void_cookie_t) {
  16310. bp := tls.Alloc(96)
  16311. defer tls.Free(96)
  16312. var xcb_ret Txcb_void_cookie_t
  16313. var _ /* xcb_out at bp+64 */ Txcb_copy_plane_request_t
  16314. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16315. _ = xcb_ret
  16316. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  16317. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fsrc_drawable = src_drawable
  16318. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fdst_drawable = dst_drawable
  16319. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fgc = gc
  16320. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fsrc_x = src_x
  16321. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fsrc_y = src_y
  16322. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fdst_x = dst_x
  16323. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fdst_y = dst_y
  16324. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  16325. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  16326. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fbit_plane = bit_plane
  16327. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  16328. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(32)
  16329. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16330. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16331. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req134)))
  16332. return xcb_ret
  16333. }
  16334. var _xcb_req134 = Txcb_protocol_request_t{
  16335. Fcount: uint64(2),
  16336. Fopcode: uint8(m_XCB_COPY_PLANE),
  16337. Fisvoid: uint8(1),
  16338. }
  16339. func Xxcb_copy_plane(tls *libc.TLS, c uintptr, src_drawable Txcb_drawable_t, dst_drawable Txcb_drawable_t, gc Txcb_gcontext_t, src_x Tint16_t, src_y Tint16_t, dst_x Tint16_t, dst_y Tint16_t, width Tuint16_t, height Tuint16_t, bit_plane Tuint32_t) (r Txcb_void_cookie_t) {
  16340. bp := tls.Alloc(96)
  16341. defer tls.Free(96)
  16342. var xcb_ret Txcb_void_cookie_t
  16343. var _ /* xcb_out at bp+64 */ Txcb_copy_plane_request_t
  16344. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16345. _ = xcb_ret
  16346. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  16347. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fsrc_drawable = src_drawable
  16348. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fdst_drawable = dst_drawable
  16349. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fgc = gc
  16350. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fsrc_x = src_x
  16351. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fsrc_y = src_y
  16352. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fdst_x = dst_x
  16353. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fdst_y = dst_y
  16354. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  16355. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  16356. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 64))).Fbit_plane = bit_plane
  16357. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  16358. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(32)
  16359. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16360. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16361. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req135)))
  16362. return xcb_ret
  16363. }
  16364. var _xcb_req135 = Txcb_protocol_request_t{
  16365. Fcount: uint64(2),
  16366. Fopcode: uint8(m_XCB_COPY_PLANE),
  16367. Fisvoid: uint8(1),
  16368. }
  16369. func Xxcb_poly_point_sizeof(tls *libc.TLS, _buffer uintptr, points_len Tuint32_t) (r int32) {
  16370. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16371. var xcb_tmp uintptr
  16372. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16373. xcb_tmp = _buffer
  16374. xcb_buffer_len = uint32(0)
  16375. xcb_block_len = uint32(0)
  16376. xcb_pad = uint32(0)
  16377. xcb_align_to = uint32(0)
  16378. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  16379. xcb_tmp += uintptr(xcb_block_len)
  16380. xcb_buffer_len += xcb_block_len
  16381. xcb_block_len = uint32(0)
  16382. /* points */
  16383. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(points_len)*libc.Uint64FromInt64(4))
  16384. xcb_tmp += uintptr(xcb_block_len)
  16385. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  16386. /* insert padding */
  16387. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16388. xcb_buffer_len += xcb_block_len + xcb_pad
  16389. if uint32(0) != xcb_pad {
  16390. xcb_tmp += uintptr(xcb_pad)
  16391. xcb_pad = uint32(0)
  16392. }
  16393. xcb_block_len = uint32(0)
  16394. return libc.Int32FromUint32(xcb_buffer_len)
  16395. }
  16396. func Xxcb_poly_point_checked(tls *libc.TLS, c uintptr, coordinate_mode Tuint8_t, drawable Txcb_drawable_t, gc Txcb_gcontext_t, points_len Tuint32_t, points uintptr) (r Txcb_void_cookie_t) {
  16397. bp := tls.Alloc(112)
  16398. defer tls.Free(112)
  16399. var xcb_ret Txcb_void_cookie_t
  16400. var _ /* xcb_out at bp+96 */ Txcb_poly_point_request_t
  16401. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16402. _ = xcb_ret
  16403. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 96))).Fcoordinate_mode = coordinate_mode
  16404. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16405. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16406. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16407. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16408. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16409. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16410. /* xcb_point_t points */
  16411. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  16412. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(points_len) * uint64(4)
  16413. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16414. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16415. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req136)))
  16416. return xcb_ret
  16417. }
  16418. var _xcb_req136 = Txcb_protocol_request_t{
  16419. Fcount: uint64(4),
  16420. Fopcode: uint8(m_XCB_POLY_POINT),
  16421. Fisvoid: uint8(1),
  16422. }
  16423. func Xxcb_poly_point(tls *libc.TLS, c uintptr, coordinate_mode Tuint8_t, drawable Txcb_drawable_t, gc Txcb_gcontext_t, points_len Tuint32_t, points uintptr) (r Txcb_void_cookie_t) {
  16424. bp := tls.Alloc(112)
  16425. defer tls.Free(112)
  16426. var xcb_ret Txcb_void_cookie_t
  16427. var _ /* xcb_out at bp+96 */ Txcb_poly_point_request_t
  16428. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16429. _ = xcb_ret
  16430. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 96))).Fcoordinate_mode = coordinate_mode
  16431. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16432. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16433. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16434. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16435. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16436. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16437. /* xcb_point_t points */
  16438. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  16439. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(points_len) * uint64(4)
  16440. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16441. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16442. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req137)))
  16443. return xcb_ret
  16444. }
  16445. var _xcb_req137 = Txcb_protocol_request_t{
  16446. Fcount: uint64(4),
  16447. Fopcode: uint8(m_XCB_POLY_POINT),
  16448. Fisvoid: uint8(1),
  16449. }
  16450. func Xxcb_poly_point_points(tls *libc.TLS, R uintptr) (r uintptr) {
  16451. return R + libc.UintptrFromInt32(1)*12
  16452. }
  16453. func Xxcb_poly_point_points_length(tls *libc.TLS, R uintptr) (r int32) {
  16454. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_point_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(4))
  16455. }
  16456. func Xxcb_poly_point_points_iterator(tls *libc.TLS, R uintptr) (r Txcb_point_iterator_t) {
  16457. var i Txcb_point_iterator_t
  16458. _ = i
  16459. i.Fdata = R + libc.UintptrFromInt32(1)*12
  16460. i.Frem = libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_point_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(4))
  16461. i.Findex = int32(int64(i.Fdata) - int64(R))
  16462. return i
  16463. }
  16464. func Xxcb_poly_line_sizeof(tls *libc.TLS, _buffer uintptr, points_len Tuint32_t) (r int32) {
  16465. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16466. var xcb_tmp uintptr
  16467. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16468. xcb_tmp = _buffer
  16469. xcb_buffer_len = uint32(0)
  16470. xcb_block_len = uint32(0)
  16471. xcb_pad = uint32(0)
  16472. xcb_align_to = uint32(0)
  16473. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  16474. xcb_tmp += uintptr(xcb_block_len)
  16475. xcb_buffer_len += xcb_block_len
  16476. xcb_block_len = uint32(0)
  16477. /* points */
  16478. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(points_len)*libc.Uint64FromInt64(4))
  16479. xcb_tmp += uintptr(xcb_block_len)
  16480. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  16481. /* insert padding */
  16482. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16483. xcb_buffer_len += xcb_block_len + xcb_pad
  16484. if uint32(0) != xcb_pad {
  16485. xcb_tmp += uintptr(xcb_pad)
  16486. xcb_pad = uint32(0)
  16487. }
  16488. xcb_block_len = uint32(0)
  16489. return libc.Int32FromUint32(xcb_buffer_len)
  16490. }
  16491. func Xxcb_poly_line_checked(tls *libc.TLS, c uintptr, coordinate_mode Tuint8_t, drawable Txcb_drawable_t, gc Txcb_gcontext_t, points_len Tuint32_t, points uintptr) (r Txcb_void_cookie_t) {
  16492. bp := tls.Alloc(112)
  16493. defer tls.Free(112)
  16494. var xcb_ret Txcb_void_cookie_t
  16495. var _ /* xcb_out at bp+96 */ Txcb_poly_line_request_t
  16496. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16497. _ = xcb_ret
  16498. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 96))).Fcoordinate_mode = coordinate_mode
  16499. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16500. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16501. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16502. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16503. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16504. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16505. /* xcb_point_t points */
  16506. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  16507. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(points_len) * uint64(4)
  16508. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16509. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16510. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req138)))
  16511. return xcb_ret
  16512. }
  16513. var _xcb_req138 = Txcb_protocol_request_t{
  16514. Fcount: uint64(4),
  16515. Fopcode: uint8(m_XCB_POLY_LINE),
  16516. Fisvoid: uint8(1),
  16517. }
  16518. func Xxcb_poly_line(tls *libc.TLS, c uintptr, coordinate_mode Tuint8_t, drawable Txcb_drawable_t, gc Txcb_gcontext_t, points_len Tuint32_t, points uintptr) (r Txcb_void_cookie_t) {
  16519. bp := tls.Alloc(112)
  16520. defer tls.Free(112)
  16521. var xcb_ret Txcb_void_cookie_t
  16522. var _ /* xcb_out at bp+96 */ Txcb_poly_line_request_t
  16523. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16524. _ = xcb_ret
  16525. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 96))).Fcoordinate_mode = coordinate_mode
  16526. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16527. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16528. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16529. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16530. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16531. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16532. /* xcb_point_t points */
  16533. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  16534. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(points_len) * uint64(4)
  16535. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16536. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16537. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req139)))
  16538. return xcb_ret
  16539. }
  16540. var _xcb_req139 = Txcb_protocol_request_t{
  16541. Fcount: uint64(4),
  16542. Fopcode: uint8(m_XCB_POLY_LINE),
  16543. Fisvoid: uint8(1),
  16544. }
  16545. func Xxcb_poly_line_points(tls *libc.TLS, R uintptr) (r uintptr) {
  16546. return R + libc.UintptrFromInt32(1)*12
  16547. }
  16548. func Xxcb_poly_line_points_length(tls *libc.TLS, R uintptr) (r int32) {
  16549. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_line_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(4))
  16550. }
  16551. func Xxcb_poly_line_points_iterator(tls *libc.TLS, R uintptr) (r Txcb_point_iterator_t) {
  16552. var i Txcb_point_iterator_t
  16553. _ = i
  16554. i.Fdata = R + libc.UintptrFromInt32(1)*12
  16555. i.Frem = libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_line_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(4))
  16556. i.Findex = int32(int64(i.Fdata) - int64(R))
  16557. return i
  16558. }
  16559. func Xxcb_segment_next(tls *libc.TLS, i uintptr) {
  16560. var p1 uintptr
  16561. _ = p1
  16562. (*Txcb_segment_iterator_t)(unsafe.Pointer(i)).Frem--
  16563. (*Txcb_segment_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  16564. p1 = i + 12
  16565. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(8))
  16566. }
  16567. func Xxcb_segment_end(tls *libc.TLS, i Txcb_segment_iterator_t) (r Txcb_generic_iterator_t) {
  16568. var ret Txcb_generic_iterator_t
  16569. _ = ret
  16570. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  16571. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  16572. ret.Frem = 0
  16573. return ret
  16574. }
  16575. func Xxcb_poly_segment_sizeof(tls *libc.TLS, _buffer uintptr, segments_len Tuint32_t) (r int32) {
  16576. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16577. var xcb_tmp uintptr
  16578. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16579. xcb_tmp = _buffer
  16580. xcb_buffer_len = uint32(0)
  16581. xcb_block_len = uint32(0)
  16582. xcb_pad = uint32(0)
  16583. xcb_align_to = uint32(0)
  16584. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  16585. xcb_tmp += uintptr(xcb_block_len)
  16586. xcb_buffer_len += xcb_block_len
  16587. xcb_block_len = uint32(0)
  16588. /* segments */
  16589. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(segments_len)*libc.Uint64FromInt64(8))
  16590. xcb_tmp += uintptr(xcb_block_len)
  16591. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  16592. /* insert padding */
  16593. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16594. xcb_buffer_len += xcb_block_len + xcb_pad
  16595. if uint32(0) != xcb_pad {
  16596. xcb_tmp += uintptr(xcb_pad)
  16597. xcb_pad = uint32(0)
  16598. }
  16599. xcb_block_len = uint32(0)
  16600. return libc.Int32FromUint32(xcb_buffer_len)
  16601. }
  16602. func Xxcb_poly_segment_checked(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, segments_len Tuint32_t, segments uintptr) (r Txcb_void_cookie_t) {
  16603. bp := tls.Alloc(112)
  16604. defer tls.Free(112)
  16605. var xcb_ret Txcb_void_cookie_t
  16606. var _ /* xcb_out at bp+96 */ Txcb_poly_segment_request_t
  16607. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16608. _ = xcb_ret
  16609. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  16610. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16611. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16612. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16613. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16614. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16615. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16616. /* xcb_segment_t segments */
  16617. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = segments
  16618. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(segments_len) * uint64(8)
  16619. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16620. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16621. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req140)))
  16622. return xcb_ret
  16623. }
  16624. var _xcb_req140 = Txcb_protocol_request_t{
  16625. Fcount: uint64(4),
  16626. Fopcode: uint8(m_XCB_POLY_SEGMENT),
  16627. Fisvoid: uint8(1),
  16628. }
  16629. func Xxcb_poly_segment(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, segments_len Tuint32_t, segments uintptr) (r Txcb_void_cookie_t) {
  16630. bp := tls.Alloc(112)
  16631. defer tls.Free(112)
  16632. var xcb_ret Txcb_void_cookie_t
  16633. var _ /* xcb_out at bp+96 */ Txcb_poly_segment_request_t
  16634. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16635. _ = xcb_ret
  16636. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  16637. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16638. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16639. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16640. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16641. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16642. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16643. /* xcb_segment_t segments */
  16644. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = segments
  16645. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(segments_len) * uint64(8)
  16646. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16647. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16648. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req141)))
  16649. return xcb_ret
  16650. }
  16651. var _xcb_req141 = Txcb_protocol_request_t{
  16652. Fcount: uint64(4),
  16653. Fopcode: uint8(m_XCB_POLY_SEGMENT),
  16654. Fisvoid: uint8(1),
  16655. }
  16656. func Xxcb_poly_segment_segments(tls *libc.TLS, R uintptr) (r uintptr) {
  16657. return R + libc.UintptrFromInt32(1)*12
  16658. }
  16659. func Xxcb_poly_segment_segments_length(tls *libc.TLS, R uintptr) (r int32) {
  16660. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_segment_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(8))
  16661. }
  16662. func Xxcb_poly_segment_segments_iterator(tls *libc.TLS, R uintptr) (r Txcb_segment_iterator_t) {
  16663. var i Txcb_segment_iterator_t
  16664. _ = i
  16665. i.Fdata = R + libc.UintptrFromInt32(1)*12
  16666. i.Frem = libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_segment_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(8))
  16667. i.Findex = int32(int64(i.Fdata) - int64(R))
  16668. return i
  16669. }
  16670. func Xxcb_poly_rectangle_sizeof(tls *libc.TLS, _buffer uintptr, rectangles_len Tuint32_t) (r int32) {
  16671. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16672. var xcb_tmp uintptr
  16673. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16674. xcb_tmp = _buffer
  16675. xcb_buffer_len = uint32(0)
  16676. xcb_block_len = uint32(0)
  16677. xcb_pad = uint32(0)
  16678. xcb_align_to = uint32(0)
  16679. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  16680. xcb_tmp += uintptr(xcb_block_len)
  16681. xcb_buffer_len += xcb_block_len
  16682. xcb_block_len = uint32(0)
  16683. /* rectangles */
  16684. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(rectangles_len)*libc.Uint64FromInt64(8))
  16685. xcb_tmp += uintptr(xcb_block_len)
  16686. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  16687. /* insert padding */
  16688. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16689. xcb_buffer_len += xcb_block_len + xcb_pad
  16690. if uint32(0) != xcb_pad {
  16691. xcb_tmp += uintptr(xcb_pad)
  16692. xcb_pad = uint32(0)
  16693. }
  16694. xcb_block_len = uint32(0)
  16695. return libc.Int32FromUint32(xcb_buffer_len)
  16696. }
  16697. func Xxcb_poly_rectangle_checked(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, rectangles_len Tuint32_t, rectangles uintptr) (r Txcb_void_cookie_t) {
  16698. bp := tls.Alloc(112)
  16699. defer tls.Free(112)
  16700. var xcb_ret Txcb_void_cookie_t
  16701. var _ /* xcb_out at bp+96 */ Txcb_poly_rectangle_request_t
  16702. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16703. _ = xcb_ret
  16704. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  16705. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16706. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16707. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16708. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16709. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16710. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16711. /* xcb_rectangle_t rectangles */
  16712. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  16713. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(rectangles_len) * uint64(8)
  16714. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16715. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16716. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req142)))
  16717. return xcb_ret
  16718. }
  16719. var _xcb_req142 = Txcb_protocol_request_t{
  16720. Fcount: uint64(4),
  16721. Fopcode: uint8(m_XCB_POLY_RECTANGLE),
  16722. Fisvoid: uint8(1),
  16723. }
  16724. func Xxcb_poly_rectangle(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, rectangles_len Tuint32_t, rectangles uintptr) (r Txcb_void_cookie_t) {
  16725. bp := tls.Alloc(112)
  16726. defer tls.Free(112)
  16727. var xcb_ret Txcb_void_cookie_t
  16728. var _ /* xcb_out at bp+96 */ Txcb_poly_rectangle_request_t
  16729. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16730. _ = xcb_ret
  16731. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  16732. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16733. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16734. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16735. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16736. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16737. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16738. /* xcb_rectangle_t rectangles */
  16739. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  16740. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(rectangles_len) * uint64(8)
  16741. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16742. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16743. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req143)))
  16744. return xcb_ret
  16745. }
  16746. var _xcb_req143 = Txcb_protocol_request_t{
  16747. Fcount: uint64(4),
  16748. Fopcode: uint8(m_XCB_POLY_RECTANGLE),
  16749. Fisvoid: uint8(1),
  16750. }
  16751. func Xxcb_poly_rectangle_rectangles(tls *libc.TLS, R uintptr) (r uintptr) {
  16752. return R + libc.UintptrFromInt32(1)*12
  16753. }
  16754. func Xxcb_poly_rectangle_rectangles_length(tls *libc.TLS, R uintptr) (r int32) {
  16755. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_rectangle_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(8))
  16756. }
  16757. func Xxcb_poly_rectangle_rectangles_iterator(tls *libc.TLS, R uintptr) (r Txcb_rectangle_iterator_t) {
  16758. var i Txcb_rectangle_iterator_t
  16759. _ = i
  16760. i.Fdata = R + libc.UintptrFromInt32(1)*12
  16761. i.Frem = libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_rectangle_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(8))
  16762. i.Findex = int32(int64(i.Fdata) - int64(R))
  16763. return i
  16764. }
  16765. func Xxcb_poly_arc_sizeof(tls *libc.TLS, _buffer uintptr, arcs_len Tuint32_t) (r int32) {
  16766. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16767. var xcb_tmp uintptr
  16768. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16769. xcb_tmp = _buffer
  16770. xcb_buffer_len = uint32(0)
  16771. xcb_block_len = uint32(0)
  16772. xcb_pad = uint32(0)
  16773. xcb_align_to = uint32(0)
  16774. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  16775. xcb_tmp += uintptr(xcb_block_len)
  16776. xcb_buffer_len += xcb_block_len
  16777. xcb_block_len = uint32(0)
  16778. /* arcs */
  16779. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(arcs_len)*libc.Uint64FromInt64(12))
  16780. xcb_tmp += uintptr(xcb_block_len)
  16781. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  16782. /* insert padding */
  16783. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16784. xcb_buffer_len += xcb_block_len + xcb_pad
  16785. if uint32(0) != xcb_pad {
  16786. xcb_tmp += uintptr(xcb_pad)
  16787. xcb_pad = uint32(0)
  16788. }
  16789. xcb_block_len = uint32(0)
  16790. return libc.Int32FromUint32(xcb_buffer_len)
  16791. }
  16792. func Xxcb_poly_arc_checked(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, arcs_len Tuint32_t, arcs uintptr) (r Txcb_void_cookie_t) {
  16793. bp := tls.Alloc(112)
  16794. defer tls.Free(112)
  16795. var xcb_ret Txcb_void_cookie_t
  16796. var _ /* xcb_out at bp+96 */ Txcb_poly_arc_request_t
  16797. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16798. _ = xcb_ret
  16799. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  16800. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16801. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16802. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16803. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16804. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16805. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16806. /* xcb_arc_t arcs */
  16807. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = arcs
  16808. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(arcs_len) * uint64(12)
  16809. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16810. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16811. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req144)))
  16812. return xcb_ret
  16813. }
  16814. var _xcb_req144 = Txcb_protocol_request_t{
  16815. Fcount: uint64(4),
  16816. Fopcode: uint8(m_XCB_POLY_ARC),
  16817. Fisvoid: uint8(1),
  16818. }
  16819. func Xxcb_poly_arc(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, arcs_len Tuint32_t, arcs uintptr) (r Txcb_void_cookie_t) {
  16820. bp := tls.Alloc(112)
  16821. defer tls.Free(112)
  16822. var xcb_ret Txcb_void_cookie_t
  16823. var _ /* xcb_out at bp+96 */ Txcb_poly_arc_request_t
  16824. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16825. _ = xcb_ret
  16826. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  16827. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16828. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16829. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16830. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  16831. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16832. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16833. /* xcb_arc_t arcs */
  16834. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = arcs
  16835. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(arcs_len) * uint64(12)
  16836. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16837. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16838. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req145)))
  16839. return xcb_ret
  16840. }
  16841. var _xcb_req145 = Txcb_protocol_request_t{
  16842. Fcount: uint64(4),
  16843. Fopcode: uint8(m_XCB_POLY_ARC),
  16844. Fisvoid: uint8(1),
  16845. }
  16846. func Xxcb_poly_arc_arcs(tls *libc.TLS, R uintptr) (r uintptr) {
  16847. return R + libc.UintptrFromInt32(1)*12
  16848. }
  16849. func Xxcb_poly_arc_arcs_length(tls *libc.TLS, R uintptr) (r int32) {
  16850. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_arc_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(12))
  16851. }
  16852. func Xxcb_poly_arc_arcs_iterator(tls *libc.TLS, R uintptr) (r Txcb_arc_iterator_t) {
  16853. var i Txcb_arc_iterator_t
  16854. _ = i
  16855. i.Fdata = R + libc.UintptrFromInt32(1)*12
  16856. i.Frem = libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_arc_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(12))
  16857. i.Findex = int32(int64(i.Fdata) - int64(R))
  16858. return i
  16859. }
  16860. func Xxcb_fill_poly_sizeof(tls *libc.TLS, _buffer uintptr, points_len Tuint32_t) (r int32) {
  16861. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16862. var xcb_tmp uintptr
  16863. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16864. xcb_tmp = _buffer
  16865. xcb_buffer_len = uint32(0)
  16866. xcb_block_len = uint32(0)
  16867. xcb_pad = uint32(0)
  16868. xcb_align_to = uint32(0)
  16869. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(16))
  16870. xcb_tmp += uintptr(xcb_block_len)
  16871. xcb_buffer_len += xcb_block_len
  16872. xcb_block_len = uint32(0)
  16873. /* points */
  16874. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(points_len)*libc.Uint64FromInt64(4))
  16875. xcb_tmp += uintptr(xcb_block_len)
  16876. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  16877. /* insert padding */
  16878. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16879. xcb_buffer_len += xcb_block_len + xcb_pad
  16880. if uint32(0) != xcb_pad {
  16881. xcb_tmp += uintptr(xcb_pad)
  16882. xcb_pad = uint32(0)
  16883. }
  16884. xcb_block_len = uint32(0)
  16885. return libc.Int32FromUint32(xcb_buffer_len)
  16886. }
  16887. func Xxcb_fill_poly_checked(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, shape Tuint8_t, coordinate_mode Tuint8_t, points_len Tuint32_t, points uintptr) (r Txcb_void_cookie_t) {
  16888. bp := tls.Alloc(112)
  16889. defer tls.Free(112)
  16890. var xcb_ret Txcb_void_cookie_t
  16891. var _ /* xcb_out at bp+96 */ Txcb_fill_poly_request_t
  16892. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16893. _ = xcb_ret
  16894. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  16895. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16896. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16897. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 96))).Fshape = shape
  16898. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 96))).Fcoordinate_mode = coordinate_mode
  16899. libc.Xmemset(tls, bp+96+14, 0, uint64(2))
  16900. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16901. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  16902. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16903. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16904. /* xcb_point_t points */
  16905. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  16906. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(points_len) * uint64(4)
  16907. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16908. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16909. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req146)))
  16910. return xcb_ret
  16911. }
  16912. var _xcb_req146 = Txcb_protocol_request_t{
  16913. Fcount: uint64(4),
  16914. Fopcode: uint8(m_XCB_FILL_POLY),
  16915. Fisvoid: uint8(1),
  16916. }
  16917. func Xxcb_fill_poly(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, shape Tuint8_t, coordinate_mode Tuint8_t, points_len Tuint32_t, points uintptr) (r Txcb_void_cookie_t) {
  16918. bp := tls.Alloc(112)
  16919. defer tls.Free(112)
  16920. var xcb_ret Txcb_void_cookie_t
  16921. var _ /* xcb_out at bp+96 */ Txcb_fill_poly_request_t
  16922. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16923. _ = xcb_ret
  16924. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  16925. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16926. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16927. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 96))).Fshape = shape
  16928. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 96))).Fcoordinate_mode = coordinate_mode
  16929. libc.Xmemset(tls, bp+96+14, 0, uint64(2))
  16930. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16931. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  16932. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16933. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  16934. /* xcb_point_t points */
  16935. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  16936. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(points_len) * uint64(4)
  16937. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16938. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  16939. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req147)))
  16940. return xcb_ret
  16941. }
  16942. var _xcb_req147 = Txcb_protocol_request_t{
  16943. Fcount: uint64(4),
  16944. Fopcode: uint8(m_XCB_FILL_POLY),
  16945. Fisvoid: uint8(1),
  16946. }
  16947. func Xxcb_fill_poly_points(tls *libc.TLS, R uintptr) (r uintptr) {
  16948. return R + libc.UintptrFromInt32(1)*16
  16949. }
  16950. func Xxcb_fill_poly_points_length(tls *libc.TLS, R uintptr) (r int32) {
  16951. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_fill_poly_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(16)) / libc.Uint64FromInt64(4))
  16952. }
  16953. func Xxcb_fill_poly_points_iterator(tls *libc.TLS, R uintptr) (r Txcb_point_iterator_t) {
  16954. var i Txcb_point_iterator_t
  16955. _ = i
  16956. i.Fdata = R + libc.UintptrFromInt32(1)*16
  16957. i.Frem = libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_fill_poly_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(16)) / libc.Uint64FromInt64(4))
  16958. i.Findex = int32(int64(i.Fdata) - int64(R))
  16959. return i
  16960. }
  16961. func Xxcb_poly_fill_rectangle_sizeof(tls *libc.TLS, _buffer uintptr, rectangles_len Tuint32_t) (r int32) {
  16962. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16963. var xcb_tmp uintptr
  16964. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16965. xcb_tmp = _buffer
  16966. xcb_buffer_len = uint32(0)
  16967. xcb_block_len = uint32(0)
  16968. xcb_pad = uint32(0)
  16969. xcb_align_to = uint32(0)
  16970. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  16971. xcb_tmp += uintptr(xcb_block_len)
  16972. xcb_buffer_len += xcb_block_len
  16973. xcb_block_len = uint32(0)
  16974. /* rectangles */
  16975. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(rectangles_len)*libc.Uint64FromInt64(8))
  16976. xcb_tmp += uintptr(xcb_block_len)
  16977. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  16978. /* insert padding */
  16979. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16980. xcb_buffer_len += xcb_block_len + xcb_pad
  16981. if uint32(0) != xcb_pad {
  16982. xcb_tmp += uintptr(xcb_pad)
  16983. xcb_pad = uint32(0)
  16984. }
  16985. xcb_block_len = uint32(0)
  16986. return libc.Int32FromUint32(xcb_buffer_len)
  16987. }
  16988. func Xxcb_poly_fill_rectangle_checked(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, rectangles_len Tuint32_t, rectangles uintptr) (r Txcb_void_cookie_t) {
  16989. bp := tls.Alloc(112)
  16990. defer tls.Free(112)
  16991. var xcb_ret Txcb_void_cookie_t
  16992. var _ /* xcb_out at bp+96 */ Txcb_poly_fill_rectangle_request_t
  16993. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16994. _ = xcb_ret
  16995. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  16996. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  16997. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  16998. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  16999. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  17000. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17001. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17002. /* xcb_rectangle_t rectangles */
  17003. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  17004. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(rectangles_len) * uint64(8)
  17005. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17006. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17007. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req148)))
  17008. return xcb_ret
  17009. }
  17010. var _xcb_req148 = Txcb_protocol_request_t{
  17011. Fcount: uint64(4),
  17012. Fopcode: uint8(m_XCB_POLY_FILL_RECTANGLE),
  17013. Fisvoid: uint8(1),
  17014. }
  17015. func Xxcb_poly_fill_rectangle(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, rectangles_len Tuint32_t, rectangles uintptr) (r Txcb_void_cookie_t) {
  17016. bp := tls.Alloc(112)
  17017. defer tls.Free(112)
  17018. var xcb_ret Txcb_void_cookie_t
  17019. var _ /* xcb_out at bp+96 */ Txcb_poly_fill_rectangle_request_t
  17020. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17021. _ = xcb_ret
  17022. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  17023. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17024. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17025. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17026. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  17027. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17028. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17029. /* xcb_rectangle_t rectangles */
  17030. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  17031. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(rectangles_len) * uint64(8)
  17032. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17033. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17034. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req149)))
  17035. return xcb_ret
  17036. }
  17037. var _xcb_req149 = Txcb_protocol_request_t{
  17038. Fcount: uint64(4),
  17039. Fopcode: uint8(m_XCB_POLY_FILL_RECTANGLE),
  17040. Fisvoid: uint8(1),
  17041. }
  17042. func Xxcb_poly_fill_rectangle_rectangles(tls *libc.TLS, R uintptr) (r uintptr) {
  17043. return R + libc.UintptrFromInt32(1)*12
  17044. }
  17045. func Xxcb_poly_fill_rectangle_rectangles_length(tls *libc.TLS, R uintptr) (r int32) {
  17046. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(8))
  17047. }
  17048. func Xxcb_poly_fill_rectangle_rectangles_iterator(tls *libc.TLS, R uintptr) (r Txcb_rectangle_iterator_t) {
  17049. var i Txcb_rectangle_iterator_t
  17050. _ = i
  17051. i.Fdata = R + libc.UintptrFromInt32(1)*12
  17052. i.Frem = libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(8))
  17053. i.Findex = int32(int64(i.Fdata) - int64(R))
  17054. return i
  17055. }
  17056. func Xxcb_poly_fill_arc_sizeof(tls *libc.TLS, _buffer uintptr, arcs_len Tuint32_t) (r int32) {
  17057. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17058. var xcb_tmp uintptr
  17059. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17060. xcb_tmp = _buffer
  17061. xcb_buffer_len = uint32(0)
  17062. xcb_block_len = uint32(0)
  17063. xcb_pad = uint32(0)
  17064. xcb_align_to = uint32(0)
  17065. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  17066. xcb_tmp += uintptr(xcb_block_len)
  17067. xcb_buffer_len += xcb_block_len
  17068. xcb_block_len = uint32(0)
  17069. /* arcs */
  17070. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(arcs_len)*libc.Uint64FromInt64(12))
  17071. xcb_tmp += uintptr(xcb_block_len)
  17072. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  17073. /* insert padding */
  17074. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17075. xcb_buffer_len += xcb_block_len + xcb_pad
  17076. if uint32(0) != xcb_pad {
  17077. xcb_tmp += uintptr(xcb_pad)
  17078. xcb_pad = uint32(0)
  17079. }
  17080. xcb_block_len = uint32(0)
  17081. return libc.Int32FromUint32(xcb_buffer_len)
  17082. }
  17083. func Xxcb_poly_fill_arc_checked(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, arcs_len Tuint32_t, arcs uintptr) (r Txcb_void_cookie_t) {
  17084. bp := tls.Alloc(112)
  17085. defer tls.Free(112)
  17086. var xcb_ret Txcb_void_cookie_t
  17087. var _ /* xcb_out at bp+96 */ Txcb_poly_fill_arc_request_t
  17088. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17089. _ = xcb_ret
  17090. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  17091. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17092. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17093. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17094. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  17095. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17096. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17097. /* xcb_arc_t arcs */
  17098. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = arcs
  17099. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(arcs_len) * uint64(12)
  17100. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17101. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17102. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req150)))
  17103. return xcb_ret
  17104. }
  17105. var _xcb_req150 = Txcb_protocol_request_t{
  17106. Fcount: uint64(4),
  17107. Fopcode: uint8(m_XCB_POLY_FILL_ARC),
  17108. Fisvoid: uint8(1),
  17109. }
  17110. func Xxcb_poly_fill_arc(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, arcs_len Tuint32_t, arcs uintptr) (r Txcb_void_cookie_t) {
  17111. bp := tls.Alloc(112)
  17112. defer tls.Free(112)
  17113. var xcb_ret Txcb_void_cookie_t
  17114. var _ /* xcb_out at bp+96 */ Txcb_poly_fill_arc_request_t
  17115. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17116. _ = xcb_ret
  17117. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  17118. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17119. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17120. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17121. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  17122. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17123. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17124. /* xcb_arc_t arcs */
  17125. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = arcs
  17126. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(arcs_len) * uint64(12)
  17127. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17128. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17129. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req151)))
  17130. return xcb_ret
  17131. }
  17132. var _xcb_req151 = Txcb_protocol_request_t{
  17133. Fcount: uint64(4),
  17134. Fopcode: uint8(m_XCB_POLY_FILL_ARC),
  17135. Fisvoid: uint8(1),
  17136. }
  17137. func Xxcb_poly_fill_arc_arcs(tls *libc.TLS, R uintptr) (r uintptr) {
  17138. return R + libc.UintptrFromInt32(1)*12
  17139. }
  17140. func Xxcb_poly_fill_arc_arcs_length(tls *libc.TLS, R uintptr) (r int32) {
  17141. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(12))
  17142. }
  17143. func Xxcb_poly_fill_arc_arcs_iterator(tls *libc.TLS, R uintptr) (r Txcb_arc_iterator_t) {
  17144. var i Txcb_arc_iterator_t
  17145. _ = i
  17146. i.Fdata = R + libc.UintptrFromInt32(1)*12
  17147. i.Frem = libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(12))
  17148. i.Findex = int32(int64(i.Fdata) - int64(R))
  17149. return i
  17150. }
  17151. func Xxcb_put_image_sizeof(tls *libc.TLS, _buffer uintptr, data_len Tuint32_t) (r int32) {
  17152. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17153. var xcb_tmp uintptr
  17154. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17155. xcb_tmp = _buffer
  17156. xcb_buffer_len = uint32(0)
  17157. xcb_block_len = uint32(0)
  17158. xcb_pad = uint32(0)
  17159. xcb_align_to = uint32(0)
  17160. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(24))
  17161. xcb_tmp += uintptr(xcb_block_len)
  17162. xcb_buffer_len += xcb_block_len
  17163. xcb_block_len = uint32(0)
  17164. /* data */
  17165. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(data_len)*libc.Uint64FromInt64(1))
  17166. xcb_tmp += uintptr(xcb_block_len)
  17167. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  17168. /* insert padding */
  17169. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17170. xcb_buffer_len += xcb_block_len + xcb_pad
  17171. if uint32(0) != xcb_pad {
  17172. xcb_tmp += uintptr(xcb_pad)
  17173. xcb_pad = uint32(0)
  17174. }
  17175. xcb_block_len = uint32(0)
  17176. return libc.Int32FromUint32(xcb_buffer_len)
  17177. }
  17178. func Xxcb_put_image_checked(tls *libc.TLS, c uintptr, format Tuint8_t, drawable Txcb_drawable_t, gc Txcb_gcontext_t, width Tuint16_t, height Tuint16_t, dst_x Tint16_t, dst_y Tint16_t, left_pad Tuint8_t, depth Tuint8_t, data_len Tuint32_t, data uintptr) (r Txcb_void_cookie_t) {
  17179. bp := tls.Alloc(128)
  17180. defer tls.Free(128)
  17181. var xcb_ret Txcb_void_cookie_t
  17182. var _ /* xcb_out at bp+96 */ Txcb_put_image_request_t
  17183. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17184. _ = xcb_ret
  17185. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fformat = format
  17186. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17187. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17188. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fwidth = width
  17189. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fheight = height
  17190. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fdst_x = dst_x
  17191. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fdst_y = dst_y
  17192. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fleft_pad = left_pad
  17193. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fdepth = depth
  17194. libc.Xmemset(tls, bp+96+22, 0, uint64(2))
  17195. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17196. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  17197. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17198. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17199. /* uint8_t data */
  17200. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = data
  17201. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(data_len) * uint64(1)
  17202. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17203. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17204. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req152)))
  17205. return xcb_ret
  17206. }
  17207. var _xcb_req152 = Txcb_protocol_request_t{
  17208. Fcount: uint64(4),
  17209. Fopcode: uint8(m_XCB_PUT_IMAGE),
  17210. Fisvoid: uint8(1),
  17211. }
  17212. func Xxcb_put_image(tls *libc.TLS, c uintptr, format Tuint8_t, drawable Txcb_drawable_t, gc Txcb_gcontext_t, width Tuint16_t, height Tuint16_t, dst_x Tint16_t, dst_y Tint16_t, left_pad Tuint8_t, depth Tuint8_t, data_len Tuint32_t, data uintptr) (r Txcb_void_cookie_t) {
  17213. bp := tls.Alloc(128)
  17214. defer tls.Free(128)
  17215. var xcb_ret Txcb_void_cookie_t
  17216. var _ /* xcb_out at bp+96 */ Txcb_put_image_request_t
  17217. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17218. _ = xcb_ret
  17219. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fformat = format
  17220. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17221. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17222. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fwidth = width
  17223. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fheight = height
  17224. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fdst_x = dst_x
  17225. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fdst_y = dst_y
  17226. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fleft_pad = left_pad
  17227. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 96))).Fdepth = depth
  17228. libc.Xmemset(tls, bp+96+22, 0, uint64(2))
  17229. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17230. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(24)
  17231. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17232. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17233. /* uint8_t data */
  17234. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = data
  17235. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(data_len) * uint64(1)
  17236. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17237. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17238. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req153)))
  17239. return xcb_ret
  17240. }
  17241. var _xcb_req153 = Txcb_protocol_request_t{
  17242. Fcount: uint64(4),
  17243. Fopcode: uint8(m_XCB_PUT_IMAGE),
  17244. Fisvoid: uint8(1),
  17245. }
  17246. func Xxcb_put_image_data(tls *libc.TLS, R uintptr) (r uintptr) {
  17247. return R + libc.UintptrFromInt32(1)*24
  17248. }
  17249. func Xxcb_put_image_data_length(tls *libc.TLS, R uintptr) (r int32) {
  17250. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_put_image_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(24)) / libc.Uint64FromInt64(1))
  17251. }
  17252. func Xxcb_put_image_data_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  17253. var i Txcb_generic_iterator_t
  17254. _ = i
  17255. i.Fdata = R + libc.UintptrFromInt32(1)*24 + uintptr((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_put_image_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4))-libc.Uint64FromInt64(24))/libc.Uint64FromInt64(1))
  17256. i.Frem = 0
  17257. i.Findex = int32(int64(i.Fdata) - int64(R))
  17258. return i
  17259. }
  17260. func Xxcb_get_image_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  17261. var _aux, xcb_tmp uintptr
  17262. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17263. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17264. xcb_tmp = _buffer
  17265. _aux = _buffer
  17266. xcb_buffer_len = uint32(0)
  17267. xcb_block_len = uint32(0)
  17268. xcb_pad = uint32(0)
  17269. xcb_align_to = uint32(0)
  17270. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  17271. xcb_tmp += uintptr(xcb_block_len)
  17272. xcb_buffer_len += xcb_block_len
  17273. xcb_block_len = uint32(0)
  17274. /* data */
  17275. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_get_image_reply_t)(unsafe.Pointer(_aux)).Flength*libc.Uint32FromInt32(4))*libc.Uint64FromInt64(1))
  17276. xcb_tmp += uintptr(xcb_block_len)
  17277. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  17278. /* insert padding */
  17279. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17280. xcb_buffer_len += xcb_block_len + xcb_pad
  17281. if uint32(0) != xcb_pad {
  17282. xcb_tmp += uintptr(xcb_pad)
  17283. xcb_pad = uint32(0)
  17284. }
  17285. xcb_block_len = uint32(0)
  17286. return libc.Int32FromUint32(xcb_buffer_len)
  17287. }
  17288. func Xxcb_get_image(tls *libc.TLS, c uintptr, format Tuint8_t, drawable Txcb_drawable_t, x Tint16_t, y Tint16_t, width Tuint16_t, height Tuint16_t, plane_mask Tuint32_t) (r Txcb_get_image_cookie_t) {
  17289. bp := tls.Alloc(96)
  17290. defer tls.Free(96)
  17291. var xcb_ret Txcb_get_image_cookie_t
  17292. var _ /* xcb_out at bp+64 */ Txcb_get_image_request_t
  17293. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17294. _ = xcb_ret
  17295. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fformat = format
  17296. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fdrawable = drawable
  17297. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fx = x
  17298. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fy = y
  17299. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  17300. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  17301. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fplane_mask = plane_mask
  17302. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17303. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(20)
  17304. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17305. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17306. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req154)))
  17307. return xcb_ret
  17308. }
  17309. var _xcb_req154 = Txcb_protocol_request_t{
  17310. Fcount: uint64(2),
  17311. Fopcode: uint8(m_XCB_GET_IMAGE),
  17312. }
  17313. func Xxcb_get_image_unchecked(tls *libc.TLS, c uintptr, format Tuint8_t, drawable Txcb_drawable_t, x Tint16_t, y Tint16_t, width Tuint16_t, height Tuint16_t, plane_mask Tuint32_t) (r Txcb_get_image_cookie_t) {
  17314. bp := tls.Alloc(96)
  17315. defer tls.Free(96)
  17316. var xcb_ret Txcb_get_image_cookie_t
  17317. var _ /* xcb_out at bp+64 */ Txcb_get_image_request_t
  17318. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17319. _ = xcb_ret
  17320. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fformat = format
  17321. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fdrawable = drawable
  17322. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fx = x
  17323. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fy = y
  17324. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  17325. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  17326. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 64))).Fplane_mask = plane_mask
  17327. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17328. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(20)
  17329. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17330. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17331. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req155)))
  17332. return xcb_ret
  17333. }
  17334. var _xcb_req155 = Txcb_protocol_request_t{
  17335. Fcount: uint64(2),
  17336. Fopcode: uint8(m_XCB_GET_IMAGE),
  17337. }
  17338. func Xxcb_get_image_data(tls *libc.TLS, R uintptr) (r uintptr) {
  17339. return R + libc.UintptrFromInt32(1)*32
  17340. }
  17341. func Xxcb_get_image_data_length(tls *libc.TLS, R uintptr) (r int32) {
  17342. return libc.Int32FromUint32((*Txcb_get_image_reply_t)(unsafe.Pointer(R)).Flength * libc.Uint32FromInt32(4))
  17343. }
  17344. func Xxcb_get_image_data_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  17345. var i Txcb_generic_iterator_t
  17346. _ = i
  17347. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_get_image_reply_t)(unsafe.Pointer(R)).Flength*libc.Uint32FromInt32(4))
  17348. i.Frem = 0
  17349. i.Findex = int32(int64(i.Fdata) - int64(R))
  17350. return i
  17351. }
  17352. func Xxcb_get_image_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_image_cookie_t, e uintptr) (r uintptr) {
  17353. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  17354. }
  17355. func Xxcb_poly_text_8_sizeof(tls *libc.TLS, _buffer uintptr, items_len Tuint32_t) (r int32) {
  17356. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17357. var xcb_tmp uintptr
  17358. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17359. xcb_tmp = _buffer
  17360. xcb_buffer_len = uint32(0)
  17361. xcb_block_len = uint32(0)
  17362. xcb_pad = uint32(0)
  17363. xcb_align_to = uint32(0)
  17364. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(16))
  17365. xcb_tmp += uintptr(xcb_block_len)
  17366. xcb_buffer_len += xcb_block_len
  17367. xcb_block_len = uint32(0)
  17368. /* items */
  17369. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(items_len)*libc.Uint64FromInt64(1))
  17370. xcb_tmp += uintptr(xcb_block_len)
  17371. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  17372. /* insert padding */
  17373. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17374. xcb_buffer_len += xcb_block_len + xcb_pad
  17375. if uint32(0) != xcb_pad {
  17376. xcb_tmp += uintptr(xcb_pad)
  17377. xcb_pad = uint32(0)
  17378. }
  17379. xcb_block_len = uint32(0)
  17380. return libc.Int32FromUint32(xcb_buffer_len)
  17381. }
  17382. func Xxcb_poly_text_8_checked(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, x Tint16_t, y Tint16_t, items_len Tuint32_t, items uintptr) (r Txcb_void_cookie_t) {
  17383. bp := tls.Alloc(112)
  17384. defer tls.Free(112)
  17385. var xcb_ret Txcb_void_cookie_t
  17386. var _ /* xcb_out at bp+96 */ Txcb_poly_text_8_request_t
  17387. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17388. _ = xcb_ret
  17389. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  17390. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17391. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17392. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 96))).Fx = x
  17393. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 96))).Fy = y
  17394. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17395. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  17396. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17397. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17398. /* uint8_t items */
  17399. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  17400. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(items_len) * uint64(1)
  17401. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17402. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17403. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req156)))
  17404. return xcb_ret
  17405. }
  17406. var _xcb_req156 = Txcb_protocol_request_t{
  17407. Fcount: uint64(4),
  17408. Fopcode: uint8(m_XCB_POLY_TEXT_8),
  17409. Fisvoid: uint8(1),
  17410. }
  17411. func Xxcb_poly_text_8(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, x Tint16_t, y Tint16_t, items_len Tuint32_t, items uintptr) (r Txcb_void_cookie_t) {
  17412. bp := tls.Alloc(112)
  17413. defer tls.Free(112)
  17414. var xcb_ret Txcb_void_cookie_t
  17415. var _ /* xcb_out at bp+96 */ Txcb_poly_text_8_request_t
  17416. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17417. _ = xcb_ret
  17418. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  17419. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17420. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17421. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 96))).Fx = x
  17422. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 96))).Fy = y
  17423. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17424. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  17425. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17426. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17427. /* uint8_t items */
  17428. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  17429. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(items_len) * uint64(1)
  17430. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17431. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17432. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req157)))
  17433. return xcb_ret
  17434. }
  17435. var _xcb_req157 = Txcb_protocol_request_t{
  17436. Fcount: uint64(4),
  17437. Fopcode: uint8(m_XCB_POLY_TEXT_8),
  17438. Fisvoid: uint8(1),
  17439. }
  17440. func Xxcb_poly_text_8_items(tls *libc.TLS, R uintptr) (r uintptr) {
  17441. return R + libc.UintptrFromInt32(1)*16
  17442. }
  17443. func Xxcb_poly_text_8_items_length(tls *libc.TLS, R uintptr) (r int32) {
  17444. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_text_8_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(16)) / libc.Uint64FromInt64(1))
  17445. }
  17446. func Xxcb_poly_text_8_items_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  17447. var i Txcb_generic_iterator_t
  17448. _ = i
  17449. i.Fdata = R + libc.UintptrFromInt32(1)*16 + uintptr((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_text_8_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4))-libc.Uint64FromInt64(16))/libc.Uint64FromInt64(1))
  17450. i.Frem = 0
  17451. i.Findex = int32(int64(i.Fdata) - int64(R))
  17452. return i
  17453. }
  17454. func Xxcb_poly_text_16_sizeof(tls *libc.TLS, _buffer uintptr, items_len Tuint32_t) (r int32) {
  17455. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17456. var xcb_tmp uintptr
  17457. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17458. xcb_tmp = _buffer
  17459. xcb_buffer_len = uint32(0)
  17460. xcb_block_len = uint32(0)
  17461. xcb_pad = uint32(0)
  17462. xcb_align_to = uint32(0)
  17463. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(16))
  17464. xcb_tmp += uintptr(xcb_block_len)
  17465. xcb_buffer_len += xcb_block_len
  17466. xcb_block_len = uint32(0)
  17467. /* items */
  17468. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(items_len)*libc.Uint64FromInt64(1))
  17469. xcb_tmp += uintptr(xcb_block_len)
  17470. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  17471. /* insert padding */
  17472. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17473. xcb_buffer_len += xcb_block_len + xcb_pad
  17474. if uint32(0) != xcb_pad {
  17475. xcb_tmp += uintptr(xcb_pad)
  17476. xcb_pad = uint32(0)
  17477. }
  17478. xcb_block_len = uint32(0)
  17479. return libc.Int32FromUint32(xcb_buffer_len)
  17480. }
  17481. func Xxcb_poly_text_16_checked(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, x Tint16_t, y Tint16_t, items_len Tuint32_t, items uintptr) (r Txcb_void_cookie_t) {
  17482. bp := tls.Alloc(112)
  17483. defer tls.Free(112)
  17484. var xcb_ret Txcb_void_cookie_t
  17485. var _ /* xcb_out at bp+96 */ Txcb_poly_text_16_request_t
  17486. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17487. _ = xcb_ret
  17488. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  17489. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17490. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17491. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 96))).Fx = x
  17492. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 96))).Fy = y
  17493. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17494. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  17495. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17496. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17497. /* uint8_t items */
  17498. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  17499. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(items_len) * uint64(1)
  17500. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17501. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17502. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req158)))
  17503. return xcb_ret
  17504. }
  17505. var _xcb_req158 = Txcb_protocol_request_t{
  17506. Fcount: uint64(4),
  17507. Fopcode: uint8(m_XCB_POLY_TEXT_16),
  17508. Fisvoid: uint8(1),
  17509. }
  17510. func Xxcb_poly_text_16(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t, gc Txcb_gcontext_t, x Tint16_t, y Tint16_t, items_len Tuint32_t, items uintptr) (r Txcb_void_cookie_t) {
  17511. bp := tls.Alloc(112)
  17512. defer tls.Free(112)
  17513. var xcb_ret Txcb_void_cookie_t
  17514. var _ /* xcb_out at bp+96 */ Txcb_poly_text_16_request_t
  17515. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17516. _ = xcb_ret
  17517. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  17518. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17519. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17520. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 96))).Fx = x
  17521. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 96))).Fy = y
  17522. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17523. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  17524. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17525. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17526. /* uint8_t items */
  17527. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  17528. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(items_len) * uint64(1)
  17529. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17530. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17531. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req159)))
  17532. return xcb_ret
  17533. }
  17534. var _xcb_req159 = Txcb_protocol_request_t{
  17535. Fcount: uint64(4),
  17536. Fopcode: uint8(m_XCB_POLY_TEXT_16),
  17537. Fisvoid: uint8(1),
  17538. }
  17539. func Xxcb_poly_text_16_items(tls *libc.TLS, R uintptr) (r uintptr) {
  17540. return R + libc.UintptrFromInt32(1)*16
  17541. }
  17542. func Xxcb_poly_text_16_items_length(tls *libc.TLS, R uintptr) (r int32) {
  17543. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_text_16_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(16)) / libc.Uint64FromInt64(1))
  17544. }
  17545. func Xxcb_poly_text_16_items_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  17546. var i Txcb_generic_iterator_t
  17547. _ = i
  17548. i.Fdata = R + libc.UintptrFromInt32(1)*16 + uintptr((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_poly_text_16_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4))-libc.Uint64FromInt64(16))/libc.Uint64FromInt64(1))
  17549. i.Frem = 0
  17550. i.Findex = int32(int64(i.Fdata) - int64(R))
  17551. return i
  17552. }
  17553. func Xxcb_image_text_8_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  17554. var _aux, xcb_tmp uintptr
  17555. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17556. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17557. xcb_tmp = _buffer
  17558. _aux = _buffer
  17559. xcb_buffer_len = uint32(0)
  17560. xcb_block_len = uint32(0)
  17561. xcb_pad = uint32(0)
  17562. xcb_align_to = uint32(0)
  17563. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(16))
  17564. xcb_tmp += uintptr(xcb_block_len)
  17565. xcb_buffer_len += xcb_block_len
  17566. xcb_block_len = uint32(0)
  17567. /* string */
  17568. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_image_text_8_request_t)(unsafe.Pointer(_aux)).Fstring_len)*libc.Uint64FromInt64(1))
  17569. xcb_tmp += uintptr(xcb_block_len)
  17570. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  17571. /* insert padding */
  17572. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17573. xcb_buffer_len += xcb_block_len + xcb_pad
  17574. if uint32(0) != xcb_pad {
  17575. xcb_tmp += uintptr(xcb_pad)
  17576. xcb_pad = uint32(0)
  17577. }
  17578. xcb_block_len = uint32(0)
  17579. return libc.Int32FromUint32(xcb_buffer_len)
  17580. }
  17581. func Xxcb_image_text_8_checked(tls *libc.TLS, c uintptr, string_len Tuint8_t, drawable Txcb_drawable_t, gc Txcb_gcontext_t, x Tint16_t, y Tint16_t, string1 uintptr) (r Txcb_void_cookie_t) {
  17582. bp := tls.Alloc(112)
  17583. defer tls.Free(112)
  17584. var xcb_ret Txcb_void_cookie_t
  17585. var _ /* xcb_out at bp+96 */ Txcb_image_text_8_request_t
  17586. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17587. _ = xcb_ret
  17588. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 96))).Fstring_len = string_len
  17589. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17590. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17591. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 96))).Fx = x
  17592. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 96))).Fy = y
  17593. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17594. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  17595. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17596. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17597. /* char string */
  17598. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  17599. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(string_len) * uint64(1)
  17600. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17601. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17602. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req160)))
  17603. return xcb_ret
  17604. }
  17605. var _xcb_req160 = Txcb_protocol_request_t{
  17606. Fcount: uint64(4),
  17607. Fopcode: uint8(m_XCB_IMAGE_TEXT_8),
  17608. Fisvoid: uint8(1),
  17609. }
  17610. func Xxcb_image_text_8(tls *libc.TLS, c uintptr, string_len Tuint8_t, drawable Txcb_drawable_t, gc Txcb_gcontext_t, x Tint16_t, y Tint16_t, string1 uintptr) (r Txcb_void_cookie_t) {
  17611. bp := tls.Alloc(112)
  17612. defer tls.Free(112)
  17613. var xcb_ret Txcb_void_cookie_t
  17614. var _ /* xcb_out at bp+96 */ Txcb_image_text_8_request_t
  17615. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17616. _ = xcb_ret
  17617. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 96))).Fstring_len = string_len
  17618. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17619. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17620. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 96))).Fx = x
  17621. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 96))).Fy = y
  17622. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17623. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  17624. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17625. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17626. /* char string */
  17627. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  17628. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(string_len) * uint64(1)
  17629. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17630. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17631. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req161)))
  17632. return xcb_ret
  17633. }
  17634. var _xcb_req161 = Txcb_protocol_request_t{
  17635. Fcount: uint64(4),
  17636. Fopcode: uint8(m_XCB_IMAGE_TEXT_8),
  17637. Fisvoid: uint8(1),
  17638. }
  17639. func Xxcb_image_text_8_string(tls *libc.TLS, R uintptr) (r uintptr) {
  17640. return R + libc.UintptrFromInt32(1)*16
  17641. }
  17642. func Xxcb_image_text_8_string_length(tls *libc.TLS, R uintptr) (r int32) {
  17643. return libc.Int32FromUint8((*Txcb_image_text_8_request_t)(unsafe.Pointer(R)).Fstring_len)
  17644. }
  17645. func Xxcb_image_text_8_string_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  17646. var i Txcb_generic_iterator_t
  17647. _ = i
  17648. i.Fdata = R + libc.UintptrFromInt32(1)*16 + uintptr((*Txcb_image_text_8_request_t)(unsafe.Pointer(R)).Fstring_len)
  17649. i.Frem = 0
  17650. i.Findex = int32(int64(i.Fdata) - int64(R))
  17651. return i
  17652. }
  17653. func Xxcb_image_text_16_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  17654. var _aux, xcb_tmp uintptr
  17655. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17656. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17657. xcb_tmp = _buffer
  17658. _aux = _buffer
  17659. xcb_buffer_len = uint32(0)
  17660. xcb_block_len = uint32(0)
  17661. xcb_pad = uint32(0)
  17662. xcb_align_to = uint32(0)
  17663. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(16))
  17664. xcb_tmp += uintptr(xcb_block_len)
  17665. xcb_buffer_len += xcb_block_len
  17666. xcb_block_len = uint32(0)
  17667. /* string */
  17668. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_image_text_16_request_t)(unsafe.Pointer(_aux)).Fstring_len)*libc.Uint64FromInt64(2))
  17669. xcb_tmp += uintptr(xcb_block_len)
  17670. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  17671. /* insert padding */
  17672. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17673. xcb_buffer_len += xcb_block_len + xcb_pad
  17674. if uint32(0) != xcb_pad {
  17675. xcb_tmp += uintptr(xcb_pad)
  17676. xcb_pad = uint32(0)
  17677. }
  17678. xcb_block_len = uint32(0)
  17679. return libc.Int32FromUint32(xcb_buffer_len)
  17680. }
  17681. func Xxcb_image_text_16_checked(tls *libc.TLS, c uintptr, string_len Tuint8_t, drawable Txcb_drawable_t, gc Txcb_gcontext_t, x Tint16_t, y Tint16_t, string1 uintptr) (r Txcb_void_cookie_t) {
  17682. bp := tls.Alloc(112)
  17683. defer tls.Free(112)
  17684. var xcb_ret Txcb_void_cookie_t
  17685. var _ /* xcb_out at bp+96 */ Txcb_image_text_16_request_t
  17686. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17687. _ = xcb_ret
  17688. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 96))).Fstring_len = string_len
  17689. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17690. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17691. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 96))).Fx = x
  17692. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 96))).Fy = y
  17693. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17694. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  17695. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17696. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17697. /* xcb_char2b_t string */
  17698. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  17699. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(string_len) * uint64(2)
  17700. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17701. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17702. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req162)))
  17703. return xcb_ret
  17704. }
  17705. var _xcb_req162 = Txcb_protocol_request_t{
  17706. Fcount: uint64(4),
  17707. Fopcode: uint8(m_XCB_IMAGE_TEXT_16),
  17708. Fisvoid: uint8(1),
  17709. }
  17710. func Xxcb_image_text_16(tls *libc.TLS, c uintptr, string_len Tuint8_t, drawable Txcb_drawable_t, gc Txcb_gcontext_t, x Tint16_t, y Tint16_t, string1 uintptr) (r Txcb_void_cookie_t) {
  17711. bp := tls.Alloc(112)
  17712. defer tls.Free(112)
  17713. var xcb_ret Txcb_void_cookie_t
  17714. var _ /* xcb_out at bp+96 */ Txcb_image_text_16_request_t
  17715. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17716. _ = xcb_ret
  17717. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 96))).Fstring_len = string_len
  17718. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 96))).Fdrawable = drawable
  17719. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 96))).Fgc = gc
  17720. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 96))).Fx = x
  17721. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 96))).Fy = y
  17722. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  17723. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  17724. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17725. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17726. /* xcb_char2b_t string */
  17727. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  17728. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(string_len) * uint64(2)
  17729. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17730. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  17731. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req163)))
  17732. return xcb_ret
  17733. }
  17734. var _xcb_req163 = Txcb_protocol_request_t{
  17735. Fcount: uint64(4),
  17736. Fopcode: uint8(m_XCB_IMAGE_TEXT_16),
  17737. Fisvoid: uint8(1),
  17738. }
  17739. func Xxcb_image_text_16_string(tls *libc.TLS, R uintptr) (r uintptr) {
  17740. return R + libc.UintptrFromInt32(1)*16
  17741. }
  17742. func Xxcb_image_text_16_string_length(tls *libc.TLS, R uintptr) (r int32) {
  17743. return libc.Int32FromUint8((*Txcb_image_text_16_request_t)(unsafe.Pointer(R)).Fstring_len)
  17744. }
  17745. func Xxcb_image_text_16_string_iterator(tls *libc.TLS, R uintptr) (r Txcb_char2b_iterator_t) {
  17746. var i Txcb_char2b_iterator_t
  17747. _ = i
  17748. i.Fdata = R + libc.UintptrFromInt32(1)*16
  17749. i.Frem = libc.Int32FromUint8((*Txcb_image_text_16_request_t)(unsafe.Pointer(R)).Fstring_len)
  17750. i.Findex = int32(int64(i.Fdata) - int64(R))
  17751. return i
  17752. }
  17753. func Xxcb_create_colormap_checked(tls *libc.TLS, c uintptr, alloc Tuint8_t, mid Txcb_colormap_t, window Txcb_window_t, visual Txcb_visualid_t) (r Txcb_void_cookie_t) {
  17754. bp := tls.Alloc(80)
  17755. defer tls.Free(80)
  17756. var xcb_ret Txcb_void_cookie_t
  17757. var _ /* xcb_out at bp+64 */ Txcb_create_colormap_request_t
  17758. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17759. _ = xcb_ret
  17760. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 64))).Falloc = alloc
  17761. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 64))).Fmid = mid
  17762. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  17763. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 64))).Fvisual = visual
  17764. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17765. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  17766. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17767. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17768. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req164)))
  17769. return xcb_ret
  17770. }
  17771. var _xcb_req164 = Txcb_protocol_request_t{
  17772. Fcount: uint64(2),
  17773. Fopcode: uint8(m_XCB_CREATE_COLORMAP),
  17774. Fisvoid: uint8(1),
  17775. }
  17776. func Xxcb_create_colormap(tls *libc.TLS, c uintptr, alloc Tuint8_t, mid Txcb_colormap_t, window Txcb_window_t, visual Txcb_visualid_t) (r Txcb_void_cookie_t) {
  17777. bp := tls.Alloc(80)
  17778. defer tls.Free(80)
  17779. var xcb_ret Txcb_void_cookie_t
  17780. var _ /* xcb_out at bp+64 */ Txcb_create_colormap_request_t
  17781. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17782. _ = xcb_ret
  17783. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 64))).Falloc = alloc
  17784. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 64))).Fmid = mid
  17785. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  17786. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 64))).Fvisual = visual
  17787. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17788. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  17789. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17790. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17791. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req165)))
  17792. return xcb_ret
  17793. }
  17794. var _xcb_req165 = Txcb_protocol_request_t{
  17795. Fcount: uint64(2),
  17796. Fopcode: uint8(m_XCB_CREATE_COLORMAP),
  17797. Fisvoid: uint8(1),
  17798. }
  17799. func Xxcb_free_colormap_checked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17800. bp := tls.Alloc(80)
  17801. defer tls.Free(80)
  17802. var xcb_ret Txcb_void_cookie_t
  17803. var _ /* xcb_out at bp+64 */ Txcb_free_colormap_request_t
  17804. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17805. _ = xcb_ret
  17806. (*(*Txcb_free_colormap_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  17807. (*(*Txcb_free_colormap_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  17808. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17809. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  17810. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17811. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17812. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req166)))
  17813. return xcb_ret
  17814. }
  17815. var _xcb_req166 = Txcb_protocol_request_t{
  17816. Fcount: uint64(2),
  17817. Fopcode: uint8(m_XCB_FREE_COLORMAP),
  17818. Fisvoid: uint8(1),
  17819. }
  17820. func Xxcb_free_colormap(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17821. bp := tls.Alloc(80)
  17822. defer tls.Free(80)
  17823. var xcb_ret Txcb_void_cookie_t
  17824. var _ /* xcb_out at bp+64 */ Txcb_free_colormap_request_t
  17825. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17826. _ = xcb_ret
  17827. (*(*Txcb_free_colormap_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  17828. (*(*Txcb_free_colormap_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  17829. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17830. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  17831. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17832. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17833. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req167)))
  17834. return xcb_ret
  17835. }
  17836. var _xcb_req167 = Txcb_protocol_request_t{
  17837. Fcount: uint64(2),
  17838. Fopcode: uint8(m_XCB_FREE_COLORMAP),
  17839. Fisvoid: uint8(1),
  17840. }
  17841. func Xxcb_copy_colormap_and_free_checked(tls *libc.TLS, c uintptr, mid Txcb_colormap_t, src_cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17842. bp := tls.Alloc(80)
  17843. defer tls.Free(80)
  17844. var xcb_ret Txcb_void_cookie_t
  17845. var _ /* xcb_out at bp+64 */ Txcb_copy_colormap_and_free_request_t
  17846. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17847. _ = xcb_ret
  17848. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  17849. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 64))).Fmid = mid
  17850. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 64))).Fsrc_cmap = src_cmap
  17851. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17852. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  17853. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17854. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17855. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req168)))
  17856. return xcb_ret
  17857. }
  17858. var _xcb_req168 = Txcb_protocol_request_t{
  17859. Fcount: uint64(2),
  17860. Fopcode: uint8(m_XCB_COPY_COLORMAP_AND_FREE),
  17861. Fisvoid: uint8(1),
  17862. }
  17863. func Xxcb_copy_colormap_and_free(tls *libc.TLS, c uintptr, mid Txcb_colormap_t, src_cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17864. bp := tls.Alloc(80)
  17865. defer tls.Free(80)
  17866. var xcb_ret Txcb_void_cookie_t
  17867. var _ /* xcb_out at bp+64 */ Txcb_copy_colormap_and_free_request_t
  17868. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17869. _ = xcb_ret
  17870. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  17871. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 64))).Fmid = mid
  17872. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 64))).Fsrc_cmap = src_cmap
  17873. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17874. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  17875. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17876. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17877. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req169)))
  17878. return xcb_ret
  17879. }
  17880. var _xcb_req169 = Txcb_protocol_request_t{
  17881. Fcount: uint64(2),
  17882. Fopcode: uint8(m_XCB_COPY_COLORMAP_AND_FREE),
  17883. Fisvoid: uint8(1),
  17884. }
  17885. func Xxcb_install_colormap_checked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17886. bp := tls.Alloc(80)
  17887. defer tls.Free(80)
  17888. var xcb_ret Txcb_void_cookie_t
  17889. var _ /* xcb_out at bp+64 */ Txcb_install_colormap_request_t
  17890. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17891. _ = xcb_ret
  17892. (*(*Txcb_install_colormap_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  17893. (*(*Txcb_install_colormap_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  17894. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17895. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  17896. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17897. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17898. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req170)))
  17899. return xcb_ret
  17900. }
  17901. var _xcb_req170 = Txcb_protocol_request_t{
  17902. Fcount: uint64(2),
  17903. Fopcode: uint8(m_XCB_INSTALL_COLORMAP),
  17904. Fisvoid: uint8(1),
  17905. }
  17906. func Xxcb_install_colormap(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17907. bp := tls.Alloc(80)
  17908. defer tls.Free(80)
  17909. var xcb_ret Txcb_void_cookie_t
  17910. var _ /* xcb_out at bp+64 */ Txcb_install_colormap_request_t
  17911. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17912. _ = xcb_ret
  17913. (*(*Txcb_install_colormap_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  17914. (*(*Txcb_install_colormap_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  17915. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17916. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  17917. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17918. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17919. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req171)))
  17920. return xcb_ret
  17921. }
  17922. var _xcb_req171 = Txcb_protocol_request_t{
  17923. Fcount: uint64(2),
  17924. Fopcode: uint8(m_XCB_INSTALL_COLORMAP),
  17925. Fisvoid: uint8(1),
  17926. }
  17927. func Xxcb_uninstall_colormap_checked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17928. bp := tls.Alloc(80)
  17929. defer tls.Free(80)
  17930. var xcb_ret Txcb_void_cookie_t
  17931. var _ /* xcb_out at bp+64 */ Txcb_uninstall_colormap_request_t
  17932. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17933. _ = xcb_ret
  17934. (*(*Txcb_uninstall_colormap_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  17935. (*(*Txcb_uninstall_colormap_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  17936. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17937. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  17938. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17939. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17940. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req172)))
  17941. return xcb_ret
  17942. }
  17943. var _xcb_req172 = Txcb_protocol_request_t{
  17944. Fcount: uint64(2),
  17945. Fopcode: uint8(m_XCB_UNINSTALL_COLORMAP),
  17946. Fisvoid: uint8(1),
  17947. }
  17948. func Xxcb_uninstall_colormap(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17949. bp := tls.Alloc(80)
  17950. defer tls.Free(80)
  17951. var xcb_ret Txcb_void_cookie_t
  17952. var _ /* xcb_out at bp+64 */ Txcb_uninstall_colormap_request_t
  17953. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17954. _ = xcb_ret
  17955. (*(*Txcb_uninstall_colormap_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  17956. (*(*Txcb_uninstall_colormap_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  17957. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  17958. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  17959. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17960. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  17961. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req173)))
  17962. return xcb_ret
  17963. }
  17964. var _xcb_req173 = Txcb_protocol_request_t{
  17965. Fcount: uint64(2),
  17966. Fopcode: uint8(m_XCB_UNINSTALL_COLORMAP),
  17967. Fisvoid: uint8(1),
  17968. }
  17969. func Xxcb_list_installed_colormaps_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  17970. var _aux, xcb_tmp uintptr
  17971. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17972. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17973. xcb_tmp = _buffer
  17974. _aux = _buffer
  17975. xcb_buffer_len = uint32(0)
  17976. xcb_block_len = uint32(0)
  17977. xcb_pad = uint32(0)
  17978. xcb_align_to = uint32(0)
  17979. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  17980. xcb_tmp += uintptr(xcb_block_len)
  17981. xcb_buffer_len += xcb_block_len
  17982. xcb_block_len = uint32(0)
  17983. /* cmaps */
  17984. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_list_installed_colormaps_reply_t)(unsafe.Pointer(_aux)).Fcmaps_len)*libc.Uint64FromInt64(4))
  17985. xcb_tmp += uintptr(xcb_block_len)
  17986. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  17987. /* insert padding */
  17988. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17989. xcb_buffer_len += xcb_block_len + xcb_pad
  17990. if uint32(0) != xcb_pad {
  17991. xcb_tmp += uintptr(xcb_pad)
  17992. xcb_pad = uint32(0)
  17993. }
  17994. xcb_block_len = uint32(0)
  17995. return libc.Int32FromUint32(xcb_buffer_len)
  17996. }
  17997. func Xxcb_list_installed_colormaps(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_list_installed_colormaps_cookie_t) {
  17998. bp := tls.Alloc(80)
  17999. defer tls.Free(80)
  18000. var xcb_ret Txcb_list_installed_colormaps_cookie_t
  18001. var _ /* xcb_out at bp+64 */ Txcb_list_installed_colormaps_request_t
  18002. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18003. _ = xcb_ret
  18004. (*(*Txcb_list_installed_colormaps_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  18005. (*(*Txcb_list_installed_colormaps_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  18006. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  18007. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  18008. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18009. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18010. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req174)))
  18011. return xcb_ret
  18012. }
  18013. var _xcb_req174 = Txcb_protocol_request_t{
  18014. Fcount: uint64(2),
  18015. Fopcode: uint8(m_XCB_LIST_INSTALLED_COLORMAPS),
  18016. }
  18017. func Xxcb_list_installed_colormaps_unchecked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_list_installed_colormaps_cookie_t) {
  18018. bp := tls.Alloc(80)
  18019. defer tls.Free(80)
  18020. var xcb_ret Txcb_list_installed_colormaps_cookie_t
  18021. var _ /* xcb_out at bp+64 */ Txcb_list_installed_colormaps_request_t
  18022. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18023. _ = xcb_ret
  18024. (*(*Txcb_list_installed_colormaps_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  18025. (*(*Txcb_list_installed_colormaps_request_t)(unsafe.Pointer(bp + 64))).Fwindow = window
  18026. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  18027. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  18028. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18029. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18030. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req175)))
  18031. return xcb_ret
  18032. }
  18033. var _xcb_req175 = Txcb_protocol_request_t{
  18034. Fcount: uint64(2),
  18035. Fopcode: uint8(m_XCB_LIST_INSTALLED_COLORMAPS),
  18036. }
  18037. func Xxcb_list_installed_colormaps_cmaps(tls *libc.TLS, R uintptr) (r uintptr) {
  18038. return R + libc.UintptrFromInt32(1)*32
  18039. }
  18040. func Xxcb_list_installed_colormaps_cmaps_length(tls *libc.TLS, R uintptr) (r int32) {
  18041. return libc.Int32FromUint16((*Txcb_list_installed_colormaps_reply_t)(unsafe.Pointer(R)).Fcmaps_len)
  18042. }
  18043. func Xxcb_list_installed_colormaps_cmaps_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  18044. var i Txcb_generic_iterator_t
  18045. _ = i
  18046. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_list_installed_colormaps_reply_t)(unsafe.Pointer(R)).Fcmaps_len)*4
  18047. i.Frem = 0
  18048. i.Findex = int32(int64(i.Fdata) - int64(R))
  18049. return i
  18050. }
  18051. func Xxcb_list_installed_colormaps_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_installed_colormaps_cookie_t, e uintptr) (r uintptr) {
  18052. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18053. }
  18054. func Xxcb_alloc_color(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, red Tuint16_t, green Tuint16_t, blue Tuint16_t) (r Txcb_alloc_color_cookie_t) {
  18055. bp := tls.Alloc(80)
  18056. defer tls.Free(80)
  18057. var xcb_ret Txcb_alloc_color_cookie_t
  18058. var _ /* xcb_out at bp+64 */ Txcb_alloc_color_request_t
  18059. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18060. _ = xcb_ret
  18061. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  18062. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  18063. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 64))).Fred = red
  18064. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 64))).Fgreen = green
  18065. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 64))).Fblue = blue
  18066. libc.Xmemset(tls, bp+64+14, 0, uint64(2))
  18067. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  18068. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  18069. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18070. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18071. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req176)))
  18072. return xcb_ret
  18073. }
  18074. var _xcb_req176 = Txcb_protocol_request_t{
  18075. Fcount: uint64(2),
  18076. Fopcode: uint8(m_XCB_ALLOC_COLOR),
  18077. }
  18078. func Xxcb_alloc_color_unchecked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, red Tuint16_t, green Tuint16_t, blue Tuint16_t) (r Txcb_alloc_color_cookie_t) {
  18079. bp := tls.Alloc(80)
  18080. defer tls.Free(80)
  18081. var xcb_ret Txcb_alloc_color_cookie_t
  18082. var _ /* xcb_out at bp+64 */ Txcb_alloc_color_request_t
  18083. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18084. _ = xcb_ret
  18085. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  18086. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  18087. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 64))).Fred = red
  18088. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 64))).Fgreen = green
  18089. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 64))).Fblue = blue
  18090. libc.Xmemset(tls, bp+64+14, 0, uint64(2))
  18091. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  18092. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  18093. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18094. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18095. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req177)))
  18096. return xcb_ret
  18097. }
  18098. var _xcb_req177 = Txcb_protocol_request_t{
  18099. Fcount: uint64(2),
  18100. Fopcode: uint8(m_XCB_ALLOC_COLOR),
  18101. }
  18102. func Xxcb_alloc_color_reply(tls *libc.TLS, c uintptr, cookie Txcb_alloc_color_cookie_t, e uintptr) (r uintptr) {
  18103. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18104. }
  18105. func Xxcb_alloc_named_color_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  18106. var _aux, xcb_tmp uintptr
  18107. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18108. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18109. xcb_tmp = _buffer
  18110. _aux = _buffer
  18111. xcb_buffer_len = uint32(0)
  18112. xcb_block_len = uint32(0)
  18113. xcb_pad = uint32(0)
  18114. xcb_align_to = uint32(0)
  18115. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  18116. xcb_tmp += uintptr(xcb_block_len)
  18117. xcb_buffer_len += xcb_block_len
  18118. xcb_block_len = uint32(0)
  18119. /* name */
  18120. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_alloc_named_color_request_t)(unsafe.Pointer(_aux)).Fname_len)*libc.Uint64FromInt64(1))
  18121. xcb_tmp += uintptr(xcb_block_len)
  18122. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  18123. /* insert padding */
  18124. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18125. xcb_buffer_len += xcb_block_len + xcb_pad
  18126. if uint32(0) != xcb_pad {
  18127. xcb_tmp += uintptr(xcb_pad)
  18128. xcb_pad = uint32(0)
  18129. }
  18130. xcb_block_len = uint32(0)
  18131. return libc.Int32FromUint32(xcb_buffer_len)
  18132. }
  18133. func Xxcb_alloc_named_color(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, name_len Tuint16_t, name uintptr) (r Txcb_alloc_named_color_cookie_t) {
  18134. bp := tls.Alloc(112)
  18135. defer tls.Free(112)
  18136. var xcb_ret Txcb_alloc_named_color_cookie_t
  18137. var _ /* xcb_out at bp+96 */ Txcb_alloc_named_color_request_t
  18138. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18139. _ = xcb_ret
  18140. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  18141. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18142. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  18143. libc.Xmemset(tls, bp+96+10, 0, uint64(2))
  18144. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18145. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  18146. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18147. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18148. /* char name */
  18149. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  18150. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  18151. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18152. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18153. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req178)))
  18154. return xcb_ret
  18155. }
  18156. var _xcb_req178 = Txcb_protocol_request_t{
  18157. Fcount: uint64(4),
  18158. Fopcode: uint8(m_XCB_ALLOC_NAMED_COLOR),
  18159. }
  18160. func Xxcb_alloc_named_color_unchecked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, name_len Tuint16_t, name uintptr) (r Txcb_alloc_named_color_cookie_t) {
  18161. bp := tls.Alloc(112)
  18162. defer tls.Free(112)
  18163. var xcb_ret Txcb_alloc_named_color_cookie_t
  18164. var _ /* xcb_out at bp+96 */ Txcb_alloc_named_color_request_t
  18165. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18166. _ = xcb_ret
  18167. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  18168. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18169. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  18170. libc.Xmemset(tls, bp+96+10, 0, uint64(2))
  18171. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18172. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  18173. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18174. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18175. /* char name */
  18176. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  18177. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  18178. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18179. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18180. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req179)))
  18181. return xcb_ret
  18182. }
  18183. var _xcb_req179 = Txcb_protocol_request_t{
  18184. Fcount: uint64(4),
  18185. Fopcode: uint8(m_XCB_ALLOC_NAMED_COLOR),
  18186. }
  18187. func Xxcb_alloc_named_color_reply(tls *libc.TLS, c uintptr, cookie Txcb_alloc_named_color_cookie_t, e uintptr) (r uintptr) {
  18188. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18189. }
  18190. func Xxcb_alloc_color_cells_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  18191. var _aux, xcb_tmp uintptr
  18192. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18193. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18194. xcb_tmp = _buffer
  18195. _aux = _buffer
  18196. xcb_buffer_len = uint32(0)
  18197. xcb_block_len = uint32(0)
  18198. xcb_pad = uint32(0)
  18199. xcb_align_to = uint32(0)
  18200. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  18201. xcb_tmp += uintptr(xcb_block_len)
  18202. xcb_buffer_len += xcb_block_len
  18203. xcb_block_len = uint32(0)
  18204. /* pixels */
  18205. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(_aux)).Fpixels_len)*libc.Uint64FromInt64(4))
  18206. xcb_tmp += uintptr(xcb_block_len)
  18207. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  18208. /* insert padding */
  18209. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18210. xcb_buffer_len += xcb_block_len + xcb_pad
  18211. if uint32(0) != xcb_pad {
  18212. xcb_tmp += uintptr(xcb_pad)
  18213. xcb_pad = uint32(0)
  18214. }
  18215. xcb_block_len = uint32(0)
  18216. /* masks */
  18217. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(_aux)).Fmasks_len)*libc.Uint64FromInt64(4))
  18218. xcb_tmp += uintptr(xcb_block_len)
  18219. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  18220. /* insert padding */
  18221. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18222. xcb_buffer_len += xcb_block_len + xcb_pad
  18223. if uint32(0) != xcb_pad {
  18224. xcb_tmp += uintptr(xcb_pad)
  18225. xcb_pad = uint32(0)
  18226. }
  18227. xcb_block_len = uint32(0)
  18228. return libc.Int32FromUint32(xcb_buffer_len)
  18229. }
  18230. func Xxcb_alloc_color_cells(tls *libc.TLS, c uintptr, contiguous Tuint8_t, cmap Txcb_colormap_t, colors Tuint16_t, planes Tuint16_t) (r Txcb_alloc_color_cells_cookie_t) {
  18231. bp := tls.Alloc(80)
  18232. defer tls.Free(80)
  18233. var xcb_ret Txcb_alloc_color_cells_cookie_t
  18234. var _ /* xcb_out at bp+64 */ Txcb_alloc_color_cells_request_t
  18235. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18236. _ = xcb_ret
  18237. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 64))).Fcontiguous = contiguous
  18238. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  18239. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 64))).Fcolors = colors
  18240. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 64))).Fplanes = planes
  18241. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  18242. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  18243. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18244. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18245. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req180)))
  18246. return xcb_ret
  18247. }
  18248. var _xcb_req180 = Txcb_protocol_request_t{
  18249. Fcount: uint64(2),
  18250. Fopcode: uint8(m_XCB_ALLOC_COLOR_CELLS),
  18251. }
  18252. func Xxcb_alloc_color_cells_unchecked(tls *libc.TLS, c uintptr, contiguous Tuint8_t, cmap Txcb_colormap_t, colors Tuint16_t, planes Tuint16_t) (r Txcb_alloc_color_cells_cookie_t) {
  18253. bp := tls.Alloc(80)
  18254. defer tls.Free(80)
  18255. var xcb_ret Txcb_alloc_color_cells_cookie_t
  18256. var _ /* xcb_out at bp+64 */ Txcb_alloc_color_cells_request_t
  18257. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18258. _ = xcb_ret
  18259. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 64))).Fcontiguous = contiguous
  18260. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  18261. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 64))).Fcolors = colors
  18262. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 64))).Fplanes = planes
  18263. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  18264. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  18265. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18266. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18267. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req181)))
  18268. return xcb_ret
  18269. }
  18270. var _xcb_req181 = Txcb_protocol_request_t{
  18271. Fcount: uint64(2),
  18272. Fopcode: uint8(m_XCB_ALLOC_COLOR_CELLS),
  18273. }
  18274. func Xxcb_alloc_color_cells_pixels(tls *libc.TLS, R uintptr) (r uintptr) {
  18275. return R + libc.UintptrFromInt32(1)*32
  18276. }
  18277. func Xxcb_alloc_color_cells_pixels_length(tls *libc.TLS, R uintptr) (r int32) {
  18278. return libc.Int32FromUint16((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(R)).Fpixels_len)
  18279. }
  18280. func Xxcb_alloc_color_cells_pixels_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  18281. var i Txcb_generic_iterator_t
  18282. _ = i
  18283. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(R)).Fpixels_len)*4
  18284. i.Frem = 0
  18285. i.Findex = int32(int64(i.Fdata) - int64(R))
  18286. return i
  18287. }
  18288. func Xxcb_alloc_color_cells_masks(tls *libc.TLS, R uintptr) (r uintptr) {
  18289. var prev Txcb_generic_iterator_t
  18290. _ = prev
  18291. prev = Xxcb_alloc_color_cells_pixels_end(tls, R)
  18292. return prev.Fdata + uintptr(libc.Uint64FromInt32(-prev.Findex)&(libc.Uint64FromInt64(4)-libc.Uint64FromInt32(1))) + libc.UintptrFromInt32(0)
  18293. }
  18294. func Xxcb_alloc_color_cells_masks_length(tls *libc.TLS, R uintptr) (r int32) {
  18295. return libc.Int32FromUint16((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(R)).Fmasks_len)
  18296. }
  18297. func Xxcb_alloc_color_cells_masks_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  18298. var i, prev Txcb_generic_iterator_t
  18299. _, _ = i, prev
  18300. prev = Xxcb_alloc_color_cells_pixels_end(tls, R)
  18301. i.Fdata = prev.Fdata + uintptr(libc.Uint64FromInt32(-prev.Findex)&(libc.Uint64FromInt64(4)-libc.Uint64FromInt32(1))) + uintptr((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(R)).Fmasks_len)*4
  18302. i.Frem = 0
  18303. i.Findex = int32(int64(i.Fdata) - int64(R))
  18304. return i
  18305. }
  18306. func Xxcb_alloc_color_cells_reply(tls *libc.TLS, c uintptr, cookie Txcb_alloc_color_cells_cookie_t, e uintptr) (r uintptr) {
  18307. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18308. }
  18309. func Xxcb_alloc_color_planes_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  18310. var _aux, xcb_tmp uintptr
  18311. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18312. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18313. xcb_tmp = _buffer
  18314. _aux = _buffer
  18315. xcb_buffer_len = uint32(0)
  18316. xcb_block_len = uint32(0)
  18317. xcb_pad = uint32(0)
  18318. xcb_align_to = uint32(0)
  18319. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  18320. xcb_tmp += uintptr(xcb_block_len)
  18321. xcb_buffer_len += xcb_block_len
  18322. xcb_block_len = uint32(0)
  18323. /* pixels */
  18324. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_alloc_color_planes_reply_t)(unsafe.Pointer(_aux)).Fpixels_len)*libc.Uint64FromInt64(4))
  18325. xcb_tmp += uintptr(xcb_block_len)
  18326. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  18327. /* insert padding */
  18328. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18329. xcb_buffer_len += xcb_block_len + xcb_pad
  18330. if uint32(0) != xcb_pad {
  18331. xcb_tmp += uintptr(xcb_pad)
  18332. xcb_pad = uint32(0)
  18333. }
  18334. xcb_block_len = uint32(0)
  18335. return libc.Int32FromUint32(xcb_buffer_len)
  18336. }
  18337. func Xxcb_alloc_color_planes(tls *libc.TLS, c uintptr, contiguous Tuint8_t, cmap Txcb_colormap_t, colors Tuint16_t, reds Tuint16_t, greens Tuint16_t, blues Tuint16_t) (r Txcb_alloc_color_planes_cookie_t) {
  18338. bp := tls.Alloc(80)
  18339. defer tls.Free(80)
  18340. var xcb_ret Txcb_alloc_color_planes_cookie_t
  18341. var _ /* xcb_out at bp+64 */ Txcb_alloc_color_planes_request_t
  18342. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18343. _ = xcb_ret
  18344. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Fcontiguous = contiguous
  18345. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  18346. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Fcolors = colors
  18347. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Freds = reds
  18348. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Fgreens = greens
  18349. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Fblues = blues
  18350. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  18351. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  18352. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18353. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18354. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req182)))
  18355. return xcb_ret
  18356. }
  18357. var _xcb_req182 = Txcb_protocol_request_t{
  18358. Fcount: uint64(2),
  18359. Fopcode: uint8(m_XCB_ALLOC_COLOR_PLANES),
  18360. }
  18361. func Xxcb_alloc_color_planes_unchecked(tls *libc.TLS, c uintptr, contiguous Tuint8_t, cmap Txcb_colormap_t, colors Tuint16_t, reds Tuint16_t, greens Tuint16_t, blues Tuint16_t) (r Txcb_alloc_color_planes_cookie_t) {
  18362. bp := tls.Alloc(80)
  18363. defer tls.Free(80)
  18364. var xcb_ret Txcb_alloc_color_planes_cookie_t
  18365. var _ /* xcb_out at bp+64 */ Txcb_alloc_color_planes_request_t
  18366. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18367. _ = xcb_ret
  18368. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Fcontiguous = contiguous
  18369. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Fcmap = cmap
  18370. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Fcolors = colors
  18371. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Freds = reds
  18372. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Fgreens = greens
  18373. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 64))).Fblues = blues
  18374. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  18375. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  18376. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18377. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18378. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req183)))
  18379. return xcb_ret
  18380. }
  18381. var _xcb_req183 = Txcb_protocol_request_t{
  18382. Fcount: uint64(2),
  18383. Fopcode: uint8(m_XCB_ALLOC_COLOR_PLANES),
  18384. }
  18385. func Xxcb_alloc_color_planes_pixels(tls *libc.TLS, R uintptr) (r uintptr) {
  18386. return R + libc.UintptrFromInt32(1)*32
  18387. }
  18388. func Xxcb_alloc_color_planes_pixels_length(tls *libc.TLS, R uintptr) (r int32) {
  18389. return libc.Int32FromUint16((*Txcb_alloc_color_planes_reply_t)(unsafe.Pointer(R)).Fpixels_len)
  18390. }
  18391. func Xxcb_alloc_color_planes_pixels_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  18392. var i Txcb_generic_iterator_t
  18393. _ = i
  18394. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_alloc_color_planes_reply_t)(unsafe.Pointer(R)).Fpixels_len)*4
  18395. i.Frem = 0
  18396. i.Findex = int32(int64(i.Fdata) - int64(R))
  18397. return i
  18398. }
  18399. func Xxcb_alloc_color_planes_reply(tls *libc.TLS, c uintptr, cookie Txcb_alloc_color_planes_cookie_t, e uintptr) (r uintptr) {
  18400. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18401. }
  18402. func Xxcb_free_colors_sizeof(tls *libc.TLS, _buffer uintptr, pixels_len Tuint32_t) (r int32) {
  18403. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18404. var xcb_tmp uintptr
  18405. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18406. xcb_tmp = _buffer
  18407. xcb_buffer_len = uint32(0)
  18408. xcb_block_len = uint32(0)
  18409. xcb_pad = uint32(0)
  18410. xcb_align_to = uint32(0)
  18411. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  18412. xcb_tmp += uintptr(xcb_block_len)
  18413. xcb_buffer_len += xcb_block_len
  18414. xcb_block_len = uint32(0)
  18415. /* pixels */
  18416. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(pixels_len)*libc.Uint64FromInt64(4))
  18417. xcb_tmp += uintptr(xcb_block_len)
  18418. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  18419. /* insert padding */
  18420. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18421. xcb_buffer_len += xcb_block_len + xcb_pad
  18422. if uint32(0) != xcb_pad {
  18423. xcb_tmp += uintptr(xcb_pad)
  18424. xcb_pad = uint32(0)
  18425. }
  18426. xcb_block_len = uint32(0)
  18427. return libc.Int32FromUint32(xcb_buffer_len)
  18428. }
  18429. func Xxcb_free_colors_checked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, plane_mask Tuint32_t, pixels_len Tuint32_t, pixels uintptr) (r Txcb_void_cookie_t) {
  18430. bp := tls.Alloc(112)
  18431. defer tls.Free(112)
  18432. var xcb_ret Txcb_void_cookie_t
  18433. var _ /* xcb_out at bp+96 */ Txcb_free_colors_request_t
  18434. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18435. _ = xcb_ret
  18436. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  18437. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18438. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 96))).Fplane_mask = plane_mask
  18439. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18440. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  18441. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18442. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18443. /* uint32_t pixels */
  18444. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pixels
  18445. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(pixels_len) * uint64(4)
  18446. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18447. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18448. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req184)))
  18449. return xcb_ret
  18450. }
  18451. var _xcb_req184 = Txcb_protocol_request_t{
  18452. Fcount: uint64(4),
  18453. Fopcode: uint8(m_XCB_FREE_COLORS),
  18454. Fisvoid: uint8(1),
  18455. }
  18456. func Xxcb_free_colors(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, plane_mask Tuint32_t, pixels_len Tuint32_t, pixels uintptr) (r Txcb_void_cookie_t) {
  18457. bp := tls.Alloc(112)
  18458. defer tls.Free(112)
  18459. var xcb_ret Txcb_void_cookie_t
  18460. var _ /* xcb_out at bp+96 */ Txcb_free_colors_request_t
  18461. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18462. _ = xcb_ret
  18463. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  18464. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18465. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 96))).Fplane_mask = plane_mask
  18466. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18467. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  18468. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18469. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18470. /* uint32_t pixels */
  18471. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pixels
  18472. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(pixels_len) * uint64(4)
  18473. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18474. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18475. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req185)))
  18476. return xcb_ret
  18477. }
  18478. var _xcb_req185 = Txcb_protocol_request_t{
  18479. Fcount: uint64(4),
  18480. Fopcode: uint8(m_XCB_FREE_COLORS),
  18481. Fisvoid: uint8(1),
  18482. }
  18483. func Xxcb_free_colors_pixels(tls *libc.TLS, R uintptr) (r uintptr) {
  18484. return R + libc.UintptrFromInt32(1)*12
  18485. }
  18486. func Xxcb_free_colors_pixels_length(tls *libc.TLS, R uintptr) (r int32) {
  18487. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_free_colors_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(12)) / libc.Uint64FromInt64(4))
  18488. }
  18489. func Xxcb_free_colors_pixels_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  18490. var i Txcb_generic_iterator_t
  18491. _ = i
  18492. i.Fdata = R + libc.UintptrFromInt32(1)*12 + uintptr((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_free_colors_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4))-libc.Uint64FromInt64(12))/libc.Uint64FromInt64(4))*4
  18493. i.Frem = 0
  18494. i.Findex = int32(int64(i.Fdata) - int64(R))
  18495. return i
  18496. }
  18497. func Xxcb_coloritem_next(tls *libc.TLS, i uintptr) {
  18498. var p1 uintptr
  18499. _ = p1
  18500. (*Txcb_coloritem_iterator_t)(unsafe.Pointer(i)).Frem--
  18501. (*Txcb_coloritem_iterator_t)(unsafe.Pointer(i)).Fdata += 12
  18502. p1 = i + 12
  18503. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(12))
  18504. }
  18505. func Xxcb_coloritem_end(tls *libc.TLS, i Txcb_coloritem_iterator_t) (r Txcb_generic_iterator_t) {
  18506. var ret Txcb_generic_iterator_t
  18507. _ = ret
  18508. ret.Fdata = i.Fdata + uintptr(i.Frem)*12
  18509. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  18510. ret.Frem = 0
  18511. return ret
  18512. }
  18513. func Xxcb_store_colors_sizeof(tls *libc.TLS, _buffer uintptr, items_len Tuint32_t) (r int32) {
  18514. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18515. var xcb_tmp uintptr
  18516. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18517. xcb_tmp = _buffer
  18518. xcb_buffer_len = uint32(0)
  18519. xcb_block_len = uint32(0)
  18520. xcb_pad = uint32(0)
  18521. xcb_align_to = uint32(0)
  18522. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  18523. xcb_tmp += uintptr(xcb_block_len)
  18524. xcb_buffer_len += xcb_block_len
  18525. xcb_block_len = uint32(0)
  18526. /* items */
  18527. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(items_len)*libc.Uint64FromInt64(12))
  18528. xcb_tmp += uintptr(xcb_block_len)
  18529. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  18530. /* insert padding */
  18531. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18532. xcb_buffer_len += xcb_block_len + xcb_pad
  18533. if uint32(0) != xcb_pad {
  18534. xcb_tmp += uintptr(xcb_pad)
  18535. xcb_pad = uint32(0)
  18536. }
  18537. xcb_block_len = uint32(0)
  18538. return libc.Int32FromUint32(xcb_buffer_len)
  18539. }
  18540. func Xxcb_store_colors_checked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, items_len Tuint32_t, items uintptr) (r Txcb_void_cookie_t) {
  18541. bp := tls.Alloc(112)
  18542. defer tls.Free(112)
  18543. var xcb_ret Txcb_void_cookie_t
  18544. var _ /* xcb_out at bp+96 */ Txcb_store_colors_request_t
  18545. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18546. _ = xcb_ret
  18547. (*(*Txcb_store_colors_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  18548. (*(*Txcb_store_colors_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18549. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18550. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  18551. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18552. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18553. /* xcb_coloritem_t items */
  18554. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  18555. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(items_len) * uint64(12)
  18556. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18557. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18558. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req186)))
  18559. return xcb_ret
  18560. }
  18561. var _xcb_req186 = Txcb_protocol_request_t{
  18562. Fcount: uint64(4),
  18563. Fopcode: uint8(m_XCB_STORE_COLORS),
  18564. Fisvoid: uint8(1),
  18565. }
  18566. func Xxcb_store_colors(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, items_len Tuint32_t, items uintptr) (r Txcb_void_cookie_t) {
  18567. bp := tls.Alloc(112)
  18568. defer tls.Free(112)
  18569. var xcb_ret Txcb_void_cookie_t
  18570. var _ /* xcb_out at bp+96 */ Txcb_store_colors_request_t
  18571. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18572. _ = xcb_ret
  18573. (*(*Txcb_store_colors_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  18574. (*(*Txcb_store_colors_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18575. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18576. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  18577. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18578. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18579. /* xcb_coloritem_t items */
  18580. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  18581. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(items_len) * uint64(12)
  18582. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18583. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18584. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req187)))
  18585. return xcb_ret
  18586. }
  18587. var _xcb_req187 = Txcb_protocol_request_t{
  18588. Fcount: uint64(4),
  18589. Fopcode: uint8(m_XCB_STORE_COLORS),
  18590. Fisvoid: uint8(1),
  18591. }
  18592. func Xxcb_store_colors_items(tls *libc.TLS, R uintptr) (r uintptr) {
  18593. return R + libc.UintptrFromInt32(1)*8
  18594. }
  18595. func Xxcb_store_colors_items_length(tls *libc.TLS, R uintptr) (r int32) {
  18596. return libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_store_colors_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(8)) / libc.Uint64FromInt64(12))
  18597. }
  18598. func Xxcb_store_colors_items_iterator(tls *libc.TLS, R uintptr) (r Txcb_coloritem_iterator_t) {
  18599. var i Txcb_coloritem_iterator_t
  18600. _ = i
  18601. i.Fdata = R + libc.UintptrFromInt32(1)*8
  18602. i.Frem = libc.Int32FromUint64((libc.Uint64FromInt32(libc.Int32FromUint16((*Txcb_store_colors_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint64FromInt64(8)) / libc.Uint64FromInt64(12))
  18603. i.Findex = int32(int64(i.Fdata) - int64(R))
  18604. return i
  18605. }
  18606. func Xxcb_store_named_color_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  18607. var _aux, xcb_tmp uintptr
  18608. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18609. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18610. xcb_tmp = _buffer
  18611. _aux = _buffer
  18612. xcb_buffer_len = uint32(0)
  18613. xcb_block_len = uint32(0)
  18614. xcb_pad = uint32(0)
  18615. xcb_align_to = uint32(0)
  18616. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(16))
  18617. xcb_tmp += uintptr(xcb_block_len)
  18618. xcb_buffer_len += xcb_block_len
  18619. xcb_block_len = uint32(0)
  18620. /* name */
  18621. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_store_named_color_request_t)(unsafe.Pointer(_aux)).Fname_len)*libc.Uint64FromInt64(1))
  18622. xcb_tmp += uintptr(xcb_block_len)
  18623. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  18624. /* insert padding */
  18625. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18626. xcb_buffer_len += xcb_block_len + xcb_pad
  18627. if uint32(0) != xcb_pad {
  18628. xcb_tmp += uintptr(xcb_pad)
  18629. xcb_pad = uint32(0)
  18630. }
  18631. xcb_block_len = uint32(0)
  18632. return libc.Int32FromUint32(xcb_buffer_len)
  18633. }
  18634. func Xxcb_store_named_color_checked(tls *libc.TLS, c uintptr, flags Tuint8_t, cmap Txcb_colormap_t, pixel Tuint32_t, name_len Tuint16_t, name uintptr) (r Txcb_void_cookie_t) {
  18635. bp := tls.Alloc(112)
  18636. defer tls.Free(112)
  18637. var xcb_ret Txcb_void_cookie_t
  18638. var _ /* xcb_out at bp+96 */ Txcb_store_named_color_request_t
  18639. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18640. _ = xcb_ret
  18641. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 96))).Fflags = flags
  18642. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18643. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 96))).Fpixel = pixel
  18644. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  18645. libc.Xmemset(tls, bp+96+14, 0, uint64(2))
  18646. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18647. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  18648. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18649. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18650. /* char name */
  18651. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  18652. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  18653. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18654. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18655. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req188)))
  18656. return xcb_ret
  18657. }
  18658. var _xcb_req188 = Txcb_protocol_request_t{
  18659. Fcount: uint64(4),
  18660. Fopcode: uint8(m_XCB_STORE_NAMED_COLOR),
  18661. Fisvoid: uint8(1),
  18662. }
  18663. func Xxcb_store_named_color(tls *libc.TLS, c uintptr, flags Tuint8_t, cmap Txcb_colormap_t, pixel Tuint32_t, name_len Tuint16_t, name uintptr) (r Txcb_void_cookie_t) {
  18664. bp := tls.Alloc(112)
  18665. defer tls.Free(112)
  18666. var xcb_ret Txcb_void_cookie_t
  18667. var _ /* xcb_out at bp+96 */ Txcb_store_named_color_request_t
  18668. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18669. _ = xcb_ret
  18670. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 96))).Fflags = flags
  18671. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18672. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 96))).Fpixel = pixel
  18673. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  18674. libc.Xmemset(tls, bp+96+14, 0, uint64(2))
  18675. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18676. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(16)
  18677. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18678. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18679. /* char name */
  18680. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  18681. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  18682. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18683. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18684. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req189)))
  18685. return xcb_ret
  18686. }
  18687. var _xcb_req189 = Txcb_protocol_request_t{
  18688. Fcount: uint64(4),
  18689. Fopcode: uint8(m_XCB_STORE_NAMED_COLOR),
  18690. Fisvoid: uint8(1),
  18691. }
  18692. func Xxcb_store_named_color_name(tls *libc.TLS, R uintptr) (r uintptr) {
  18693. return R + libc.UintptrFromInt32(1)*16
  18694. }
  18695. func Xxcb_store_named_color_name_length(tls *libc.TLS, R uintptr) (r int32) {
  18696. return libc.Int32FromUint16((*Txcb_store_named_color_request_t)(unsafe.Pointer(R)).Fname_len)
  18697. }
  18698. func Xxcb_store_named_color_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  18699. var i Txcb_generic_iterator_t
  18700. _ = i
  18701. i.Fdata = R + libc.UintptrFromInt32(1)*16 + uintptr((*Txcb_store_named_color_request_t)(unsafe.Pointer(R)).Fname_len)
  18702. i.Frem = 0
  18703. i.Findex = int32(int64(i.Fdata) - int64(R))
  18704. return i
  18705. }
  18706. func Xxcb_rgb_next(tls *libc.TLS, i uintptr) {
  18707. var p1 uintptr
  18708. _ = p1
  18709. (*Txcb_rgb_iterator_t)(unsafe.Pointer(i)).Frem--
  18710. (*Txcb_rgb_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  18711. p1 = i + 12
  18712. *(*int32)(unsafe.Pointer(p1)) = int32(uint64(*(*int32)(unsafe.Pointer(p1))) + libc.Uint64FromInt64(8))
  18713. }
  18714. func Xxcb_rgb_end(tls *libc.TLS, i Txcb_rgb_iterator_t) (r Txcb_generic_iterator_t) {
  18715. var ret Txcb_generic_iterator_t
  18716. _ = ret
  18717. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  18718. ret.Findex = int32(int64(i.Findex) + (int64(ret.Fdata) - int64(i.Fdata)))
  18719. ret.Frem = 0
  18720. return ret
  18721. }
  18722. func Xxcb_query_colors_sizeof(tls *libc.TLS, _buffer uintptr, pixels_len Tuint32_t) (r int32) {
  18723. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18724. var xcb_tmp uintptr
  18725. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18726. xcb_tmp = _buffer
  18727. xcb_buffer_len = uint32(0)
  18728. xcb_block_len = uint32(0)
  18729. xcb_pad = uint32(0)
  18730. xcb_align_to = uint32(0)
  18731. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  18732. xcb_tmp += uintptr(xcb_block_len)
  18733. xcb_buffer_len += xcb_block_len
  18734. xcb_block_len = uint32(0)
  18735. /* pixels */
  18736. xcb_block_len = uint32(uint64(xcb_block_len) + uint64(pixels_len)*libc.Uint64FromInt64(4))
  18737. xcb_tmp += uintptr(xcb_block_len)
  18738. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  18739. /* insert padding */
  18740. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18741. xcb_buffer_len += xcb_block_len + xcb_pad
  18742. if uint32(0) != xcb_pad {
  18743. xcb_tmp += uintptr(xcb_pad)
  18744. xcb_pad = uint32(0)
  18745. }
  18746. xcb_block_len = uint32(0)
  18747. return libc.Int32FromUint32(xcb_buffer_len)
  18748. }
  18749. func Xxcb_query_colors(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, pixels_len Tuint32_t, pixels uintptr) (r Txcb_query_colors_cookie_t) {
  18750. bp := tls.Alloc(112)
  18751. defer tls.Free(112)
  18752. var xcb_ret Txcb_query_colors_cookie_t
  18753. var _ /* xcb_out at bp+96 */ Txcb_query_colors_request_t
  18754. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18755. _ = xcb_ret
  18756. (*(*Txcb_query_colors_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  18757. (*(*Txcb_query_colors_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18758. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18759. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  18760. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18761. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18762. /* uint32_t pixels */
  18763. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pixels
  18764. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(pixels_len) * uint64(4)
  18765. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18766. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18767. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req190)))
  18768. return xcb_ret
  18769. }
  18770. var _xcb_req190 = Txcb_protocol_request_t{
  18771. Fcount: uint64(4),
  18772. Fopcode: uint8(m_XCB_QUERY_COLORS),
  18773. }
  18774. func Xxcb_query_colors_unchecked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, pixels_len Tuint32_t, pixels uintptr) (r Txcb_query_colors_cookie_t) {
  18775. bp := tls.Alloc(112)
  18776. defer tls.Free(112)
  18777. var xcb_ret Txcb_query_colors_cookie_t
  18778. var _ /* xcb_out at bp+96 */ Txcb_query_colors_request_t
  18779. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18780. _ = xcb_ret
  18781. (*(*Txcb_query_colors_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  18782. (*(*Txcb_query_colors_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18783. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18784. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  18785. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18786. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18787. /* uint32_t pixels */
  18788. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pixels
  18789. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(pixels_len) * uint64(4)
  18790. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18791. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18792. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req191)))
  18793. return xcb_ret
  18794. }
  18795. var _xcb_req191 = Txcb_protocol_request_t{
  18796. Fcount: uint64(4),
  18797. Fopcode: uint8(m_XCB_QUERY_COLORS),
  18798. }
  18799. func Xxcb_query_colors_colors(tls *libc.TLS, R uintptr) (r uintptr) {
  18800. return R + libc.UintptrFromInt32(1)*32
  18801. }
  18802. func Xxcb_query_colors_colors_length(tls *libc.TLS, R uintptr) (r int32) {
  18803. return libc.Int32FromUint16((*Txcb_query_colors_reply_t)(unsafe.Pointer(R)).Fcolors_len)
  18804. }
  18805. func Xxcb_query_colors_colors_iterator(tls *libc.TLS, R uintptr) (r Txcb_rgb_iterator_t) {
  18806. var i Txcb_rgb_iterator_t
  18807. _ = i
  18808. i.Fdata = R + libc.UintptrFromInt32(1)*32
  18809. i.Frem = libc.Int32FromUint16((*Txcb_query_colors_reply_t)(unsafe.Pointer(R)).Fcolors_len)
  18810. i.Findex = int32(int64(i.Fdata) - int64(R))
  18811. return i
  18812. }
  18813. func Xxcb_query_colors_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_colors_cookie_t, e uintptr) (r uintptr) {
  18814. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18815. }
  18816. func Xxcb_lookup_color_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  18817. var _aux, xcb_tmp uintptr
  18818. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18819. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18820. xcb_tmp = _buffer
  18821. _aux = _buffer
  18822. xcb_buffer_len = uint32(0)
  18823. xcb_block_len = uint32(0)
  18824. xcb_pad = uint32(0)
  18825. xcb_align_to = uint32(0)
  18826. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  18827. xcb_tmp += uintptr(xcb_block_len)
  18828. xcb_buffer_len += xcb_block_len
  18829. xcb_block_len = uint32(0)
  18830. /* name */
  18831. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_lookup_color_request_t)(unsafe.Pointer(_aux)).Fname_len)*libc.Uint64FromInt64(1))
  18832. xcb_tmp += uintptr(xcb_block_len)
  18833. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  18834. /* insert padding */
  18835. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18836. xcb_buffer_len += xcb_block_len + xcb_pad
  18837. if uint32(0) != xcb_pad {
  18838. xcb_tmp += uintptr(xcb_pad)
  18839. xcb_pad = uint32(0)
  18840. }
  18841. xcb_block_len = uint32(0)
  18842. return libc.Int32FromUint32(xcb_buffer_len)
  18843. }
  18844. func Xxcb_lookup_color(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, name_len Tuint16_t, name uintptr) (r Txcb_lookup_color_cookie_t) {
  18845. bp := tls.Alloc(112)
  18846. defer tls.Free(112)
  18847. var xcb_ret Txcb_lookup_color_cookie_t
  18848. var _ /* xcb_out at bp+96 */ Txcb_lookup_color_request_t
  18849. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18850. _ = xcb_ret
  18851. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  18852. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18853. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  18854. libc.Xmemset(tls, bp+96+10, 0, uint64(2))
  18855. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18856. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  18857. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18858. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18859. /* char name */
  18860. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  18861. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  18862. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18863. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18864. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req192)))
  18865. return xcb_ret
  18866. }
  18867. var _xcb_req192 = Txcb_protocol_request_t{
  18868. Fcount: uint64(4),
  18869. Fopcode: uint8(m_XCB_LOOKUP_COLOR),
  18870. }
  18871. func Xxcb_lookup_color_unchecked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, name_len Tuint16_t, name uintptr) (r Txcb_lookup_color_cookie_t) {
  18872. bp := tls.Alloc(112)
  18873. defer tls.Free(112)
  18874. var xcb_ret Txcb_lookup_color_cookie_t
  18875. var _ /* xcb_out at bp+96 */ Txcb_lookup_color_request_t
  18876. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18877. _ = xcb_ret
  18878. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  18879. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 96))).Fcmap = cmap
  18880. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  18881. libc.Xmemset(tls, bp+96+10, 0, uint64(2))
  18882. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  18883. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  18884. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18885. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18886. /* char name */
  18887. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  18888. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  18889. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18890. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  18891. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req193)))
  18892. return xcb_ret
  18893. }
  18894. var _xcb_req193 = Txcb_protocol_request_t{
  18895. Fcount: uint64(4),
  18896. Fopcode: uint8(m_XCB_LOOKUP_COLOR),
  18897. }
  18898. func Xxcb_lookup_color_reply(tls *libc.TLS, c uintptr, cookie Txcb_lookup_color_cookie_t, e uintptr) (r uintptr) {
  18899. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18900. }
  18901. func Xxcb_create_cursor_checked(tls *libc.TLS, c uintptr, cid Txcb_cursor_t, source Txcb_pixmap_t, mask Txcb_pixmap_t, fore_red Tuint16_t, fore_green Tuint16_t, fore_blue Tuint16_t, back_red Tuint16_t, back_green Tuint16_t, back_blue Tuint16_t, x Tuint16_t, y Tuint16_t) (r Txcb_void_cookie_t) {
  18902. bp := tls.Alloc(96)
  18903. defer tls.Free(96)
  18904. var xcb_ret Txcb_void_cookie_t
  18905. var _ /* xcb_out at bp+64 */ Txcb_create_cursor_request_t
  18906. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18907. _ = xcb_ret
  18908. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  18909. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fcid = cid
  18910. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fsource = source
  18911. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fmask = mask
  18912. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_red = fore_red
  18913. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_green = fore_green
  18914. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_blue = fore_blue
  18915. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_red = back_red
  18916. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_green = back_green
  18917. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_blue = back_blue
  18918. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fx = x
  18919. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fy = y
  18920. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  18921. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(32)
  18922. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18923. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18924. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req194)))
  18925. return xcb_ret
  18926. }
  18927. var _xcb_req194 = Txcb_protocol_request_t{
  18928. Fcount: uint64(2),
  18929. Fopcode: uint8(m_XCB_CREATE_CURSOR),
  18930. Fisvoid: uint8(1),
  18931. }
  18932. func Xxcb_create_cursor(tls *libc.TLS, c uintptr, cid Txcb_cursor_t, source Txcb_pixmap_t, mask Txcb_pixmap_t, fore_red Tuint16_t, fore_green Tuint16_t, fore_blue Tuint16_t, back_red Tuint16_t, back_green Tuint16_t, back_blue Tuint16_t, x Tuint16_t, y Tuint16_t) (r Txcb_void_cookie_t) {
  18933. bp := tls.Alloc(96)
  18934. defer tls.Free(96)
  18935. var xcb_ret Txcb_void_cookie_t
  18936. var _ /* xcb_out at bp+64 */ Txcb_create_cursor_request_t
  18937. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18938. _ = xcb_ret
  18939. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  18940. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fcid = cid
  18941. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fsource = source
  18942. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fmask = mask
  18943. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_red = fore_red
  18944. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_green = fore_green
  18945. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_blue = fore_blue
  18946. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_red = back_red
  18947. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_green = back_green
  18948. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_blue = back_blue
  18949. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fx = x
  18950. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 64))).Fy = y
  18951. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  18952. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(32)
  18953. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18954. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18955. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req195)))
  18956. return xcb_ret
  18957. }
  18958. var _xcb_req195 = Txcb_protocol_request_t{
  18959. Fcount: uint64(2),
  18960. Fopcode: uint8(m_XCB_CREATE_CURSOR),
  18961. Fisvoid: uint8(1),
  18962. }
  18963. func Xxcb_create_glyph_cursor_checked(tls *libc.TLS, c uintptr, cid Txcb_cursor_t, source_font Txcb_font_t, mask_font Txcb_font_t, source_char Tuint16_t, mask_char Tuint16_t, fore_red Tuint16_t, fore_green Tuint16_t, fore_blue Tuint16_t, back_red Tuint16_t, back_green Tuint16_t, back_blue Tuint16_t) (r Txcb_void_cookie_t) {
  18964. bp := tls.Alloc(96)
  18965. defer tls.Free(96)
  18966. var xcb_ret Txcb_void_cookie_t
  18967. var _ /* xcb_out at bp+64 */ Txcb_create_glyph_cursor_request_t
  18968. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18969. _ = xcb_ret
  18970. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  18971. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fcid = cid
  18972. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fsource_font = source_font
  18973. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fmask_font = mask_font
  18974. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fsource_char = source_char
  18975. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fmask_char = mask_char
  18976. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_red = fore_red
  18977. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_green = fore_green
  18978. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_blue = fore_blue
  18979. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_red = back_red
  18980. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_green = back_green
  18981. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_blue = back_blue
  18982. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  18983. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(32)
  18984. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18985. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  18986. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req196)))
  18987. return xcb_ret
  18988. }
  18989. var _xcb_req196 = Txcb_protocol_request_t{
  18990. Fcount: uint64(2),
  18991. Fopcode: uint8(m_XCB_CREATE_GLYPH_CURSOR),
  18992. Fisvoid: uint8(1),
  18993. }
  18994. func Xxcb_create_glyph_cursor(tls *libc.TLS, c uintptr, cid Txcb_cursor_t, source_font Txcb_font_t, mask_font Txcb_font_t, source_char Tuint16_t, mask_char Tuint16_t, fore_red Tuint16_t, fore_green Tuint16_t, fore_blue Tuint16_t, back_red Tuint16_t, back_green Tuint16_t, back_blue Tuint16_t) (r Txcb_void_cookie_t) {
  18995. bp := tls.Alloc(96)
  18996. defer tls.Free(96)
  18997. var xcb_ret Txcb_void_cookie_t
  18998. var _ /* xcb_out at bp+64 */ Txcb_create_glyph_cursor_request_t
  18999. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19000. _ = xcb_ret
  19001. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19002. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fcid = cid
  19003. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fsource_font = source_font
  19004. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fmask_font = mask_font
  19005. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fsource_char = source_char
  19006. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fmask_char = mask_char
  19007. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_red = fore_red
  19008. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_green = fore_green
  19009. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_blue = fore_blue
  19010. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_red = back_red
  19011. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_green = back_green
  19012. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_blue = back_blue
  19013. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19014. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(32)
  19015. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19016. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19017. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req197)))
  19018. return xcb_ret
  19019. }
  19020. var _xcb_req197 = Txcb_protocol_request_t{
  19021. Fcount: uint64(2),
  19022. Fopcode: uint8(m_XCB_CREATE_GLYPH_CURSOR),
  19023. Fisvoid: uint8(1),
  19024. }
  19025. func Xxcb_free_cursor_checked(tls *libc.TLS, c uintptr, cursor Txcb_cursor_t) (r Txcb_void_cookie_t) {
  19026. bp := tls.Alloc(80)
  19027. defer tls.Free(80)
  19028. var xcb_ret Txcb_void_cookie_t
  19029. var _ /* xcb_out at bp+64 */ Txcb_free_cursor_request_t
  19030. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19031. _ = xcb_ret
  19032. (*(*Txcb_free_cursor_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19033. (*(*Txcb_free_cursor_request_t)(unsafe.Pointer(bp + 64))).Fcursor = cursor
  19034. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19035. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  19036. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19037. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19038. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req198)))
  19039. return xcb_ret
  19040. }
  19041. var _xcb_req198 = Txcb_protocol_request_t{
  19042. Fcount: uint64(2),
  19043. Fopcode: uint8(m_XCB_FREE_CURSOR),
  19044. Fisvoid: uint8(1),
  19045. }
  19046. func Xxcb_free_cursor(tls *libc.TLS, c uintptr, cursor Txcb_cursor_t) (r Txcb_void_cookie_t) {
  19047. bp := tls.Alloc(80)
  19048. defer tls.Free(80)
  19049. var xcb_ret Txcb_void_cookie_t
  19050. var _ /* xcb_out at bp+64 */ Txcb_free_cursor_request_t
  19051. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19052. _ = xcb_ret
  19053. (*(*Txcb_free_cursor_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19054. (*(*Txcb_free_cursor_request_t)(unsafe.Pointer(bp + 64))).Fcursor = cursor
  19055. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19056. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  19057. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19058. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19059. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req199)))
  19060. return xcb_ret
  19061. }
  19062. var _xcb_req199 = Txcb_protocol_request_t{
  19063. Fcount: uint64(2),
  19064. Fopcode: uint8(m_XCB_FREE_CURSOR),
  19065. Fisvoid: uint8(1),
  19066. }
  19067. func Xxcb_recolor_cursor_checked(tls *libc.TLS, c uintptr, cursor Txcb_cursor_t, fore_red Tuint16_t, fore_green Tuint16_t, fore_blue Tuint16_t, back_red Tuint16_t, back_green Tuint16_t, back_blue Tuint16_t) (r Txcb_void_cookie_t) {
  19068. bp := tls.Alloc(96)
  19069. defer tls.Free(96)
  19070. var xcb_ret Txcb_void_cookie_t
  19071. var _ /* xcb_out at bp+64 */ Txcb_recolor_cursor_request_t
  19072. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19073. _ = xcb_ret
  19074. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19075. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Fcursor = cursor
  19076. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_red = fore_red
  19077. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_green = fore_green
  19078. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_blue = fore_blue
  19079. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_red = back_red
  19080. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_green = back_green
  19081. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_blue = back_blue
  19082. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19083. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(20)
  19084. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19085. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19086. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req200)))
  19087. return xcb_ret
  19088. }
  19089. var _xcb_req200 = Txcb_protocol_request_t{
  19090. Fcount: uint64(2),
  19091. Fopcode: uint8(m_XCB_RECOLOR_CURSOR),
  19092. Fisvoid: uint8(1),
  19093. }
  19094. func Xxcb_recolor_cursor(tls *libc.TLS, c uintptr, cursor Txcb_cursor_t, fore_red Tuint16_t, fore_green Tuint16_t, fore_blue Tuint16_t, back_red Tuint16_t, back_green Tuint16_t, back_blue Tuint16_t) (r Txcb_void_cookie_t) {
  19095. bp := tls.Alloc(96)
  19096. defer tls.Free(96)
  19097. var xcb_ret Txcb_void_cookie_t
  19098. var _ /* xcb_out at bp+64 */ Txcb_recolor_cursor_request_t
  19099. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19100. _ = xcb_ret
  19101. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19102. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Fcursor = cursor
  19103. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_red = fore_red
  19104. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_green = fore_green
  19105. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Ffore_blue = fore_blue
  19106. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_red = back_red
  19107. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_green = back_green
  19108. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 64))).Fback_blue = back_blue
  19109. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19110. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(20)
  19111. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19112. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19113. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req201)))
  19114. return xcb_ret
  19115. }
  19116. var _xcb_req201 = Txcb_protocol_request_t{
  19117. Fcount: uint64(2),
  19118. Fopcode: uint8(m_XCB_RECOLOR_CURSOR),
  19119. Fisvoid: uint8(1),
  19120. }
  19121. func Xxcb_query_best_size(tls *libc.TLS, c uintptr, _class Tuint8_t, drawable Txcb_drawable_t, width Tuint16_t, height Tuint16_t) (r Txcb_query_best_size_cookie_t) {
  19122. bp := tls.Alloc(80)
  19123. defer tls.Free(80)
  19124. var xcb_ret Txcb_query_best_size_cookie_t
  19125. var _ /* xcb_out at bp+64 */ Txcb_query_best_size_request_t
  19126. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19127. _ = xcb_ret
  19128. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 64))).F_class = _class
  19129. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 64))).Fdrawable = drawable
  19130. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  19131. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  19132. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19133. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  19134. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19135. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19136. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req202)))
  19137. return xcb_ret
  19138. }
  19139. var _xcb_req202 = Txcb_protocol_request_t{
  19140. Fcount: uint64(2),
  19141. Fopcode: uint8(m_XCB_QUERY_BEST_SIZE),
  19142. }
  19143. func Xxcb_query_best_size_unchecked(tls *libc.TLS, c uintptr, _class Tuint8_t, drawable Txcb_drawable_t, width Tuint16_t, height Tuint16_t) (r Txcb_query_best_size_cookie_t) {
  19144. bp := tls.Alloc(80)
  19145. defer tls.Free(80)
  19146. var xcb_ret Txcb_query_best_size_cookie_t
  19147. var _ /* xcb_out at bp+64 */ Txcb_query_best_size_request_t
  19148. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19149. _ = xcb_ret
  19150. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 64))).F_class = _class
  19151. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 64))).Fdrawable = drawable
  19152. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 64))).Fwidth = width
  19153. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 64))).Fheight = height
  19154. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19155. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  19156. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19157. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19158. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req203)))
  19159. return xcb_ret
  19160. }
  19161. var _xcb_req203 = Txcb_protocol_request_t{
  19162. Fcount: uint64(2),
  19163. Fopcode: uint8(m_XCB_QUERY_BEST_SIZE),
  19164. }
  19165. func Xxcb_query_best_size_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_best_size_cookie_t, e uintptr) (r uintptr) {
  19166. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  19167. }
  19168. func Xxcb_query_extension_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19169. var _aux, xcb_tmp uintptr
  19170. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  19171. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  19172. xcb_tmp = _buffer
  19173. _aux = _buffer
  19174. xcb_buffer_len = uint32(0)
  19175. xcb_block_len = uint32(0)
  19176. xcb_pad = uint32(0)
  19177. xcb_align_to = uint32(0)
  19178. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  19179. xcb_tmp += uintptr(xcb_block_len)
  19180. xcb_buffer_len += xcb_block_len
  19181. xcb_block_len = uint32(0)
  19182. /* name */
  19183. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_query_extension_request_t)(unsafe.Pointer(_aux)).Fname_len)*libc.Uint64FromInt64(1))
  19184. xcb_tmp += uintptr(xcb_block_len)
  19185. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  19186. /* insert padding */
  19187. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19188. xcb_buffer_len += xcb_block_len + xcb_pad
  19189. if uint32(0) != xcb_pad {
  19190. xcb_tmp += uintptr(xcb_pad)
  19191. xcb_pad = uint32(0)
  19192. }
  19193. xcb_block_len = uint32(0)
  19194. return libc.Int32FromUint32(xcb_buffer_len)
  19195. }
  19196. func Xxcb_query_extension(tls *libc.TLS, c uintptr, name_len Tuint16_t, name uintptr) (r Txcb_query_extension_cookie_t) {
  19197. bp := tls.Alloc(112)
  19198. defer tls.Free(112)
  19199. var xcb_ret Txcb_query_extension_cookie_t
  19200. var _ /* xcb_out at bp+96 */ Txcb_query_extension_request_t
  19201. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19202. _ = xcb_ret
  19203. (*(*Txcb_query_extension_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  19204. (*(*Txcb_query_extension_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  19205. libc.Xmemset(tls, bp+96+6, 0, uint64(2))
  19206. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  19207. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  19208. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19209. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19210. /* char name */
  19211. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  19212. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  19213. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  19214. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  19215. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req204)))
  19216. return xcb_ret
  19217. }
  19218. var _xcb_req204 = Txcb_protocol_request_t{
  19219. Fcount: uint64(4),
  19220. Fopcode: uint8(m_XCB_QUERY_EXTENSION),
  19221. }
  19222. func Xxcb_query_extension_unchecked(tls *libc.TLS, c uintptr, name_len Tuint16_t, name uintptr) (r Txcb_query_extension_cookie_t) {
  19223. bp := tls.Alloc(112)
  19224. defer tls.Free(112)
  19225. var xcb_ret Txcb_query_extension_cookie_t
  19226. var _ /* xcb_out at bp+96 */ Txcb_query_extension_request_t
  19227. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19228. _ = xcb_ret
  19229. (*(*Txcb_query_extension_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  19230. (*(*Txcb_query_extension_request_t)(unsafe.Pointer(bp + 96))).Fname_len = name_len
  19231. libc.Xmemset(tls, bp+96+6, 0, uint64(2))
  19232. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  19233. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  19234. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19235. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19236. /* char name */
  19237. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  19238. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(name_len) * uint64(1)
  19239. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  19240. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  19241. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req205)))
  19242. return xcb_ret
  19243. }
  19244. var _xcb_req205 = Txcb_protocol_request_t{
  19245. Fcount: uint64(4),
  19246. Fopcode: uint8(m_XCB_QUERY_EXTENSION),
  19247. }
  19248. func Xxcb_query_extension_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_extension_cookie_t, e uintptr) (r uintptr) {
  19249. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  19250. }
  19251. func Xxcb_list_extensions_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19252. var _aux, xcb_tmp uintptr
  19253. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  19254. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  19255. xcb_tmp = _buffer
  19256. _aux = _buffer
  19257. xcb_buffer_len = uint32(0)
  19258. xcb_block_len = uint32(0)
  19259. xcb_pad = uint32(0)
  19260. xcb_align_to = uint32(0)
  19261. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  19262. xcb_tmp += uintptr(xcb_block_len)
  19263. xcb_buffer_len += xcb_block_len
  19264. xcb_block_len = uint32(0)
  19265. /* names */
  19266. i = uint32(0)
  19267. for {
  19268. if !(i < uint32((*Txcb_list_extensions_reply_t)(unsafe.Pointer(_aux)).Fnames_len)) {
  19269. break
  19270. }
  19271. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_str_sizeof(tls, xcb_tmp))
  19272. xcb_block_len += xcb_tmp_len
  19273. xcb_tmp += uintptr(xcb_tmp_len)
  19274. goto _1
  19275. _1:
  19276. ;
  19277. i++
  19278. }
  19279. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  19280. /* insert padding */
  19281. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19282. xcb_buffer_len += xcb_block_len + xcb_pad
  19283. if uint32(0) != xcb_pad {
  19284. xcb_tmp += uintptr(xcb_pad)
  19285. xcb_pad = uint32(0)
  19286. }
  19287. xcb_block_len = uint32(0)
  19288. return libc.Int32FromUint32(xcb_buffer_len)
  19289. }
  19290. func Xxcb_list_extensions(tls *libc.TLS, c uintptr) (r Txcb_list_extensions_cookie_t) {
  19291. bp := tls.Alloc(80)
  19292. defer tls.Free(80)
  19293. var xcb_ret Txcb_list_extensions_cookie_t
  19294. var _ /* xcb_out at bp+64 */ Txcb_list_extensions_request_t
  19295. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19296. _ = xcb_ret
  19297. (*(*Txcb_list_extensions_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19298. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19299. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  19300. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19301. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19302. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req206)))
  19303. return xcb_ret
  19304. }
  19305. var _xcb_req206 = Txcb_protocol_request_t{
  19306. Fcount: uint64(2),
  19307. Fopcode: uint8(m_XCB_LIST_EXTENSIONS),
  19308. }
  19309. func Xxcb_list_extensions_unchecked(tls *libc.TLS, c uintptr) (r Txcb_list_extensions_cookie_t) {
  19310. bp := tls.Alloc(80)
  19311. defer tls.Free(80)
  19312. var xcb_ret Txcb_list_extensions_cookie_t
  19313. var _ /* xcb_out at bp+64 */ Txcb_list_extensions_request_t
  19314. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19315. _ = xcb_ret
  19316. (*(*Txcb_list_extensions_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19317. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19318. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  19319. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19320. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19321. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req207)))
  19322. return xcb_ret
  19323. }
  19324. var _xcb_req207 = Txcb_protocol_request_t{
  19325. Fcount: uint64(2),
  19326. Fopcode: uint8(m_XCB_LIST_EXTENSIONS),
  19327. }
  19328. func Xxcb_list_extensions_names_length(tls *libc.TLS, R uintptr) (r int32) {
  19329. return libc.Int32FromUint8((*Txcb_list_extensions_reply_t)(unsafe.Pointer(R)).Fnames_len)
  19330. }
  19331. func Xxcb_list_extensions_names_iterator(tls *libc.TLS, R uintptr) (r Txcb_str_iterator_t) {
  19332. var i Txcb_str_iterator_t
  19333. _ = i
  19334. i.Fdata = R + libc.UintptrFromInt32(1)*32
  19335. i.Frem = libc.Int32FromUint8((*Txcb_list_extensions_reply_t)(unsafe.Pointer(R)).Fnames_len)
  19336. i.Findex = int32(int64(i.Fdata) - int64(R))
  19337. return i
  19338. }
  19339. func Xxcb_list_extensions_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_extensions_cookie_t, e uintptr) (r uintptr) {
  19340. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  19341. }
  19342. func Xxcb_change_keyboard_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19343. var _aux, xcb_tmp uintptr
  19344. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  19345. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  19346. xcb_tmp = _buffer
  19347. _aux = _buffer
  19348. xcb_buffer_len = uint32(0)
  19349. xcb_block_len = uint32(0)
  19350. xcb_pad = uint32(0)
  19351. xcb_align_to = uint32(0)
  19352. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  19353. xcb_tmp += uintptr(xcb_block_len)
  19354. xcb_buffer_len += xcb_block_len
  19355. xcb_block_len = uint32(0)
  19356. /* keysyms */
  19357. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt32(libc.Int32FromUint8((*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(_aux)).Fkeycode_count)*libc.Int32FromUint8((*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(_aux)).Fkeysyms_per_keycode))*libc.Uint64FromInt64(4))
  19358. xcb_tmp += uintptr(xcb_block_len)
  19359. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19360. /* insert padding */
  19361. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19362. xcb_buffer_len += xcb_block_len + xcb_pad
  19363. if uint32(0) != xcb_pad {
  19364. xcb_tmp += uintptr(xcb_pad)
  19365. xcb_pad = uint32(0)
  19366. }
  19367. xcb_block_len = uint32(0)
  19368. return libc.Int32FromUint32(xcb_buffer_len)
  19369. }
  19370. func Xxcb_change_keyboard_mapping_checked(tls *libc.TLS, c uintptr, keycode_count Tuint8_t, first_keycode Txcb_keycode_t, keysyms_per_keycode Tuint8_t, keysyms uintptr) (r Txcb_void_cookie_t) {
  19371. bp := tls.Alloc(112)
  19372. defer tls.Free(112)
  19373. var xcb_ret Txcb_void_cookie_t
  19374. var _ /* xcb_out at bp+96 */ Txcb_change_keyboard_mapping_request_t
  19375. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19376. _ = xcb_ret
  19377. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 96))).Fkeycode_count = keycode_count
  19378. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 96))).Ffirst_keycode = first_keycode
  19379. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 96))).Fkeysyms_per_keycode = keysyms_per_keycode
  19380. libc.Xmemset(tls, bp+96+6, 0, uint64(2))
  19381. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  19382. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  19383. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19384. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19385. /* xcb_keysym_t keysyms */
  19386. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = keysyms
  19387. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(libc.Int32FromUint8(keycode_count)*libc.Int32FromUint8(keysyms_per_keycode)) * uint64(4)
  19388. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  19389. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  19390. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req208)))
  19391. return xcb_ret
  19392. }
  19393. var _xcb_req208 = Txcb_protocol_request_t{
  19394. Fcount: uint64(4),
  19395. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_MAPPING),
  19396. Fisvoid: uint8(1),
  19397. }
  19398. func Xxcb_change_keyboard_mapping(tls *libc.TLS, c uintptr, keycode_count Tuint8_t, first_keycode Txcb_keycode_t, keysyms_per_keycode Tuint8_t, keysyms uintptr) (r Txcb_void_cookie_t) {
  19399. bp := tls.Alloc(112)
  19400. defer tls.Free(112)
  19401. var xcb_ret Txcb_void_cookie_t
  19402. var _ /* xcb_out at bp+96 */ Txcb_change_keyboard_mapping_request_t
  19403. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19404. _ = xcb_ret
  19405. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 96))).Fkeycode_count = keycode_count
  19406. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 96))).Ffirst_keycode = first_keycode
  19407. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 96))).Fkeysyms_per_keycode = keysyms_per_keycode
  19408. libc.Xmemset(tls, bp+96+6, 0, uint64(2))
  19409. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  19410. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  19411. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19412. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19413. /* xcb_keysym_t keysyms */
  19414. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = keysyms
  19415. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(libc.Int32FromUint8(keycode_count)*libc.Int32FromUint8(keysyms_per_keycode)) * uint64(4)
  19416. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  19417. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  19418. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req209)))
  19419. return xcb_ret
  19420. }
  19421. var _xcb_req209 = Txcb_protocol_request_t{
  19422. Fcount: uint64(4),
  19423. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_MAPPING),
  19424. Fisvoid: uint8(1),
  19425. }
  19426. func Xxcb_change_keyboard_mapping_keysyms(tls *libc.TLS, R uintptr) (r uintptr) {
  19427. return R + libc.UintptrFromInt32(1)*8
  19428. }
  19429. func Xxcb_change_keyboard_mapping_keysyms_length(tls *libc.TLS, R uintptr) (r int32) {
  19430. return libc.Int32FromUint8((*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(R)).Fkeycode_count) * libc.Int32FromUint8((*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(R)).Fkeysyms_per_keycode)
  19431. }
  19432. func Xxcb_change_keyboard_mapping_keysyms_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  19433. var i Txcb_generic_iterator_t
  19434. _ = i
  19435. i.Fdata = R + libc.UintptrFromInt32(1)*8 + uintptr(libc.Int32FromUint8((*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(R)).Fkeycode_count)*libc.Int32FromUint8((*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(R)).Fkeysyms_per_keycode))*4
  19436. i.Frem = 0
  19437. i.Findex = int32(int64(i.Fdata) - int64(R))
  19438. return i
  19439. }
  19440. func Xxcb_get_keyboard_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19441. var _aux, xcb_tmp uintptr
  19442. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  19443. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  19444. xcb_tmp = _buffer
  19445. _aux = _buffer
  19446. xcb_buffer_len = uint32(0)
  19447. xcb_block_len = uint32(0)
  19448. xcb_pad = uint32(0)
  19449. xcb_align_to = uint32(0)
  19450. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  19451. xcb_tmp += uintptr(xcb_block_len)
  19452. xcb_buffer_len += xcb_block_len
  19453. xcb_block_len = uint32(0)
  19454. /* keysyms */
  19455. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_get_keyboard_mapping_reply_t)(unsafe.Pointer(_aux)).Flength)*libc.Uint64FromInt64(4))
  19456. xcb_tmp += uintptr(xcb_block_len)
  19457. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19458. /* insert padding */
  19459. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19460. xcb_buffer_len += xcb_block_len + xcb_pad
  19461. if uint32(0) != xcb_pad {
  19462. xcb_tmp += uintptr(xcb_pad)
  19463. xcb_pad = uint32(0)
  19464. }
  19465. xcb_block_len = uint32(0)
  19466. return libc.Int32FromUint32(xcb_buffer_len)
  19467. }
  19468. func Xxcb_get_keyboard_mapping(tls *libc.TLS, c uintptr, first_keycode Txcb_keycode_t, count Tuint8_t) (r Txcb_get_keyboard_mapping_cookie_t) {
  19469. bp := tls.Alloc(80)
  19470. defer tls.Free(80)
  19471. var xcb_ret Txcb_get_keyboard_mapping_cookie_t
  19472. var _ /* xcb_out at bp+66 */ Txcb_get_keyboard_mapping_request_t
  19473. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19474. _ = xcb_ret
  19475. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 66))).Fpad0 = uint8(0)
  19476. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 66))).Ffirst_keycode = first_keycode
  19477. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 66))).Fcount = count
  19478. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 66
  19479. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(6)
  19480. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19481. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19482. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req210)))
  19483. return xcb_ret
  19484. }
  19485. var _xcb_req210 = Txcb_protocol_request_t{
  19486. Fcount: uint64(2),
  19487. Fopcode: uint8(m_XCB_GET_KEYBOARD_MAPPING),
  19488. }
  19489. func Xxcb_get_keyboard_mapping_unchecked(tls *libc.TLS, c uintptr, first_keycode Txcb_keycode_t, count Tuint8_t) (r Txcb_get_keyboard_mapping_cookie_t) {
  19490. bp := tls.Alloc(80)
  19491. defer tls.Free(80)
  19492. var xcb_ret Txcb_get_keyboard_mapping_cookie_t
  19493. var _ /* xcb_out at bp+66 */ Txcb_get_keyboard_mapping_request_t
  19494. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19495. _ = xcb_ret
  19496. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 66))).Fpad0 = uint8(0)
  19497. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 66))).Ffirst_keycode = first_keycode
  19498. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 66))).Fcount = count
  19499. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 66
  19500. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(6)
  19501. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19502. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19503. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req211)))
  19504. return xcb_ret
  19505. }
  19506. var _xcb_req211 = Txcb_protocol_request_t{
  19507. Fcount: uint64(2),
  19508. Fopcode: uint8(m_XCB_GET_KEYBOARD_MAPPING),
  19509. }
  19510. func Xxcb_get_keyboard_mapping_keysyms(tls *libc.TLS, R uintptr) (r uintptr) {
  19511. return R + libc.UintptrFromInt32(1)*32
  19512. }
  19513. func Xxcb_get_keyboard_mapping_keysyms_length(tls *libc.TLS, R uintptr) (r int32) {
  19514. return libc.Int32FromUint32((*Txcb_get_keyboard_mapping_reply_t)(unsafe.Pointer(R)).Flength)
  19515. }
  19516. func Xxcb_get_keyboard_mapping_keysyms_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  19517. var i Txcb_generic_iterator_t
  19518. _ = i
  19519. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_get_keyboard_mapping_reply_t)(unsafe.Pointer(R)).Flength)*4
  19520. i.Frem = 0
  19521. i.Findex = int32(int64(i.Fdata) - int64(R))
  19522. return i
  19523. }
  19524. func Xxcb_get_keyboard_mapping_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_keyboard_mapping_cookie_t, e uintptr) (r uintptr) {
  19525. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  19526. }
  19527. func Xxcb_change_keyboard_control_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  19528. bp := tls.Alloc(16)
  19529. defer tls.Free(16)
  19530. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  19531. var xcb_out, xcb_tmp uintptr
  19532. var xcb_parts [9]Tiovec
  19533. var _ /* xcb_pad0 at bp+0 */ [3]int8
  19534. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  19535. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  19536. xcb_buffer_len = uint32(0)
  19537. xcb_align_to = uint32(0)
  19538. xcb_padding_offset = uint32(0)
  19539. xcb_pad = uint32(0)
  19540. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  19541. xcb_parts_idx = uint32(0)
  19542. xcb_block_len = uint32(0)
  19543. if value_mask&uint32(_XCB_KB_KEY_CLICK_PERCENT) != 0 {
  19544. /* xcb_change_keyboard_control_value_list_t.key_click_percent */
  19545. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  19546. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19547. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  19548. xcb_parts_idx++
  19549. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19550. }
  19551. if value_mask&uint32(_XCB_KB_BELL_PERCENT) != 0 {
  19552. /* xcb_change_keyboard_control_value_list_t.bell_percent */
  19553. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  19554. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19555. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  19556. xcb_parts_idx++
  19557. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19558. }
  19559. if value_mask&uint32(_XCB_KB_BELL_PITCH) != 0 {
  19560. /* xcb_change_keyboard_control_value_list_t.bell_pitch */
  19561. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  19562. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19563. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  19564. xcb_parts_idx++
  19565. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19566. }
  19567. if value_mask&uint32(_XCB_KB_BELL_DURATION) != 0 {
  19568. /* xcb_change_keyboard_control_value_list_t.bell_duration */
  19569. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  19570. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19571. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  19572. xcb_parts_idx++
  19573. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19574. }
  19575. if value_mask&uint32(_XCB_KB_LED) != 0 {
  19576. /* xcb_change_keyboard_control_value_list_t.led */
  19577. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  19578. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19579. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  19580. xcb_parts_idx++
  19581. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19582. }
  19583. if value_mask&uint32(_XCB_KB_LED_MODE) != 0 {
  19584. /* xcb_change_keyboard_control_value_list_t.led_mode */
  19585. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  19586. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19587. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  19588. xcb_parts_idx++
  19589. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19590. }
  19591. if value_mask&uint32(_XCB_KB_KEY) != 0 {
  19592. /* xcb_change_keyboard_control_value_list_t.key */
  19593. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  19594. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19595. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  19596. xcb_parts_idx++
  19597. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19598. }
  19599. if value_mask&uint32(_XCB_KB_AUTO_REPEAT_MODE) != 0 {
  19600. /* xcb_change_keyboard_control_value_list_t.auto_repeat_mode */
  19601. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 28
  19602. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19603. xcb_parts[xcb_parts_idx].Fiov_len = uint64(4)
  19604. xcb_parts_idx++
  19605. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19606. }
  19607. /* insert padding */
  19608. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  19609. xcb_buffer_len += xcb_block_len + xcb_pad
  19610. if uint32(0) != xcb_pad {
  19611. xcb_parts[xcb_parts_idx].Fiov_base = bp
  19612. xcb_parts[xcb_parts_idx].Fiov_len = uint64(xcb_pad)
  19613. xcb_parts_idx++
  19614. xcb_pad = uint32(0)
  19615. }
  19616. xcb_block_len = uint32(0)
  19617. xcb_padding_offset = uint32(0)
  19618. if libc.UintptrFromInt32(0) == xcb_out {
  19619. /* allocate memory */
  19620. xcb_out = libc.Xmalloc(tls, uint64(xcb_buffer_len))
  19621. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  19622. }
  19623. xcb_tmp = xcb_out
  19624. i = uint32(0)
  19625. for {
  19626. if !(i < xcb_parts_idx) {
  19627. break
  19628. }
  19629. if uintptr(0) != xcb_parts[i].Fiov_base && uint64(0) != xcb_parts[i].Fiov_len {
  19630. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  19631. }
  19632. if uint64(0) != xcb_parts[i].Fiov_len {
  19633. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  19634. }
  19635. goto _1
  19636. _1:
  19637. ;
  19638. i++
  19639. }
  19640. return libc.Int32FromUint32(xcb_buffer_len)
  19641. }
  19642. func Xxcb_change_keyboard_control_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  19643. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  19644. var xcb_tmp uintptr
  19645. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  19646. xcb_tmp = _buffer
  19647. xcb_buffer_len = uint32(0)
  19648. xcb_block_len = uint32(0)
  19649. xcb_pad = uint32(0)
  19650. xcb_align_to = uint32(0)
  19651. xcb_padding_offset = uint32(0)
  19652. if value_mask&uint32(_XCB_KB_KEY_CLICK_PERCENT) != 0 {
  19653. /* xcb_change_keyboard_control_value_list_t.key_click_percent */
  19654. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fkey_click_percent = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  19655. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19656. xcb_tmp += uintptr(4)
  19657. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19658. }
  19659. if value_mask&uint32(_XCB_KB_BELL_PERCENT) != 0 {
  19660. /* xcb_change_keyboard_control_value_list_t.bell_percent */
  19661. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fbell_percent = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  19662. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19663. xcb_tmp += uintptr(4)
  19664. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19665. }
  19666. if value_mask&uint32(_XCB_KB_BELL_PITCH) != 0 {
  19667. /* xcb_change_keyboard_control_value_list_t.bell_pitch */
  19668. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fbell_pitch = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  19669. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19670. xcb_tmp += uintptr(4)
  19671. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19672. }
  19673. if value_mask&uint32(_XCB_KB_BELL_DURATION) != 0 {
  19674. /* xcb_change_keyboard_control_value_list_t.bell_duration */
  19675. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fbell_duration = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  19676. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19677. xcb_tmp += uintptr(4)
  19678. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19679. }
  19680. if value_mask&uint32(_XCB_KB_LED) != 0 {
  19681. /* xcb_change_keyboard_control_value_list_t.led */
  19682. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fled = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  19683. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19684. xcb_tmp += uintptr(4)
  19685. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19686. }
  19687. if value_mask&uint32(_XCB_KB_LED_MODE) != 0 {
  19688. /* xcb_change_keyboard_control_value_list_t.led_mode */
  19689. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fled_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  19690. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19691. xcb_tmp += uintptr(4)
  19692. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19693. }
  19694. if value_mask&uint32(_XCB_KB_KEY) != 0 {
  19695. /* xcb_change_keyboard_control_value_list_t.key */
  19696. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fkey = *(*Txcb_keycode32_t)(unsafe.Pointer(xcb_tmp))
  19697. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19698. xcb_tmp += uintptr(4)
  19699. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19700. }
  19701. if value_mask&uint32(_XCB_KB_AUTO_REPEAT_MODE) != 0 {
  19702. /* xcb_change_keyboard_control_value_list_t.auto_repeat_mode */
  19703. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fauto_repeat_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  19704. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  19705. xcb_tmp += uintptr(4)
  19706. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  19707. }
  19708. /* insert padding */
  19709. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  19710. xcb_buffer_len += xcb_block_len + xcb_pad
  19711. if uint32(0) != xcb_pad {
  19712. xcb_tmp += uintptr(xcb_pad)
  19713. xcb_pad = uint32(0)
  19714. }
  19715. xcb_block_len = uint32(0)
  19716. xcb_padding_offset = uint32(0)
  19717. return libc.Int32FromUint32(xcb_buffer_len)
  19718. }
  19719. func Xxcb_change_keyboard_control_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t) (r int32) {
  19720. bp := tls.Alloc(32)
  19721. defer tls.Free(32)
  19722. var _ /* _aux at bp+0 */ Txcb_change_keyboard_control_value_list_t
  19723. return Xxcb_change_keyboard_control_value_list_unpack(tls, _buffer, value_mask, bp)
  19724. }
  19725. func Xxcb_change_keyboard_control_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19726. var _aux, xcb_tmp uintptr
  19727. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  19728. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  19729. xcb_tmp = _buffer
  19730. _aux = _buffer
  19731. xcb_buffer_len = uint32(0)
  19732. xcb_block_len = uint32(0)
  19733. xcb_pad = uint32(0)
  19734. xcb_align_to = uint32(0)
  19735. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  19736. xcb_tmp += uintptr(xcb_block_len)
  19737. xcb_buffer_len += xcb_block_len
  19738. xcb_block_len = uint32(0)
  19739. /* value_list */
  19740. xcb_block_len += libc.Uint32FromInt32(Xxcb_change_keyboard_control_value_list_sizeof(tls, xcb_tmp, (*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(_aux)).Fvalue_mask))
  19741. xcb_tmp += uintptr(xcb_block_len)
  19742. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  19743. /* insert padding */
  19744. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19745. xcb_buffer_len += xcb_block_len + xcb_pad
  19746. if uint32(0) != xcb_pad {
  19747. xcb_tmp += uintptr(xcb_pad)
  19748. xcb_pad = uint32(0)
  19749. }
  19750. xcb_block_len = uint32(0)
  19751. return libc.Int32FromUint32(xcb_buffer_len)
  19752. }
  19753. func Xxcb_change_keyboard_control_checked(tls *libc.TLS, c uintptr, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  19754. bp := tls.Alloc(96)
  19755. defer tls.Free(96)
  19756. var xcb_ret Txcb_void_cookie_t
  19757. var _ /* xcb_out at bp+80 */ Txcb_change_keyboard_control_request_t
  19758. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  19759. _ = xcb_ret
  19760. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  19761. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  19762. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  19763. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  19764. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19765. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19766. /* xcb_change_keyboard_control_value_list_t value_list */
  19767. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  19768. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_keyboard_control_value_list_sizeof(tls, value_list, value_mask))
  19769. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req212)))
  19770. return xcb_ret
  19771. }
  19772. var _xcb_req212 = Txcb_protocol_request_t{
  19773. Fcount: uint64(3),
  19774. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_CONTROL),
  19775. Fisvoid: uint8(1),
  19776. }
  19777. func Xxcb_change_keyboard_control(tls *libc.TLS, c uintptr, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  19778. bp := tls.Alloc(96)
  19779. defer tls.Free(96)
  19780. var xcb_ret Txcb_void_cookie_t
  19781. var _ /* xcb_out at bp+80 */ Txcb_change_keyboard_control_request_t
  19782. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  19783. _ = xcb_ret
  19784. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  19785. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  19786. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  19787. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  19788. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19789. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19790. /* xcb_change_keyboard_control_value_list_t value_list */
  19791. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  19792. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_keyboard_control_value_list_sizeof(tls, value_list, value_mask))
  19793. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req213)))
  19794. return xcb_ret
  19795. }
  19796. var _xcb_req213 = Txcb_protocol_request_t{
  19797. Fcount: uint64(3),
  19798. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_CONTROL),
  19799. Fisvoid: uint8(1),
  19800. }
  19801. func Xxcb_change_keyboard_control_aux_checked(tls *libc.TLS, c uintptr, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  19802. bp := tls.Alloc(96)
  19803. defer tls.Free(96)
  19804. var xcb_ret Txcb_void_cookie_t
  19805. var _ /* xcb_aux0 at bp+88 */ uintptr
  19806. var _ /* xcb_out at bp+80 */ Txcb_change_keyboard_control_request_t
  19807. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  19808. _ = xcb_ret
  19809. *(*uintptr)(unsafe.Pointer(bp + 88)) = uintptr(0)
  19810. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  19811. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  19812. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  19813. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  19814. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19815. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19816. /* xcb_change_keyboard_control_value_list_t value_list */
  19817. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_keyboard_control_value_list_serialize(tls, bp+88, value_mask, value_list))
  19818. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 88))
  19819. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req214)))
  19820. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 88)))
  19821. return xcb_ret
  19822. }
  19823. var _xcb_req214 = Txcb_protocol_request_t{
  19824. Fcount: uint64(3),
  19825. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_CONTROL),
  19826. Fisvoid: uint8(1),
  19827. }
  19828. func Xxcb_change_keyboard_control_aux(tls *libc.TLS, c uintptr, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  19829. bp := tls.Alloc(96)
  19830. defer tls.Free(96)
  19831. var xcb_ret Txcb_void_cookie_t
  19832. var _ /* xcb_aux0 at bp+88 */ uintptr
  19833. var _ /* xcb_out at bp+80 */ Txcb_change_keyboard_control_request_t
  19834. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  19835. _ = xcb_ret
  19836. *(*uintptr)(unsafe.Pointer(bp + 88)) = uintptr(0)
  19837. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 80))).Fpad0 = uint8(0)
  19838. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 80))).Fvalue_mask = value_mask
  19839. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 80
  19840. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  19841. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19842. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19843. /* xcb_change_keyboard_control_value_list_t value_list */
  19844. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(Xxcb_change_keyboard_control_value_list_serialize(tls, bp+88, value_mask, value_list))
  19845. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 88))
  19846. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req215)))
  19847. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 88)))
  19848. return xcb_ret
  19849. }
  19850. var _xcb_req215 = Txcb_protocol_request_t{
  19851. Fcount: uint64(3),
  19852. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_CONTROL),
  19853. Fisvoid: uint8(1),
  19854. }
  19855. func Xxcb_change_keyboard_control_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  19856. return R + libc.UintptrFromInt32(1)*8
  19857. }
  19858. func Xxcb_get_keyboard_control(tls *libc.TLS, c uintptr) (r Txcb_get_keyboard_control_cookie_t) {
  19859. bp := tls.Alloc(80)
  19860. defer tls.Free(80)
  19861. var xcb_ret Txcb_get_keyboard_control_cookie_t
  19862. var _ /* xcb_out at bp+64 */ Txcb_get_keyboard_control_request_t
  19863. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19864. _ = xcb_ret
  19865. (*(*Txcb_get_keyboard_control_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19866. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19867. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  19868. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19869. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19870. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req216)))
  19871. return xcb_ret
  19872. }
  19873. var _xcb_req216 = Txcb_protocol_request_t{
  19874. Fcount: uint64(2),
  19875. Fopcode: uint8(m_XCB_GET_KEYBOARD_CONTROL),
  19876. }
  19877. func Xxcb_get_keyboard_control_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_keyboard_control_cookie_t) {
  19878. bp := tls.Alloc(80)
  19879. defer tls.Free(80)
  19880. var xcb_ret Txcb_get_keyboard_control_cookie_t
  19881. var _ /* xcb_out at bp+64 */ Txcb_get_keyboard_control_request_t
  19882. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19883. _ = xcb_ret
  19884. (*(*Txcb_get_keyboard_control_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19885. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19886. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  19887. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19888. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19889. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req217)))
  19890. return xcb_ret
  19891. }
  19892. var _xcb_req217 = Txcb_protocol_request_t{
  19893. Fcount: uint64(2),
  19894. Fopcode: uint8(m_XCB_GET_KEYBOARD_CONTROL),
  19895. }
  19896. func Xxcb_get_keyboard_control_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_keyboard_control_cookie_t, e uintptr) (r uintptr) {
  19897. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  19898. }
  19899. func Xxcb_bell_checked(tls *libc.TLS, c uintptr, percent Tint8_t) (r Txcb_void_cookie_t) {
  19900. bp := tls.Alloc(80)
  19901. defer tls.Free(80)
  19902. var xcb_ret Txcb_void_cookie_t
  19903. var _ /* xcb_out at bp+64 */ Txcb_bell_request_t
  19904. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19905. _ = xcb_ret
  19906. (*(*Txcb_bell_request_t)(unsafe.Pointer(bp + 64))).Fpercent = percent
  19907. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19908. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  19909. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19910. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19911. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req218)))
  19912. return xcb_ret
  19913. }
  19914. var _xcb_req218 = Txcb_protocol_request_t{
  19915. Fcount: uint64(2),
  19916. Fopcode: uint8(m_XCB_BELL),
  19917. Fisvoid: uint8(1),
  19918. }
  19919. func Xxcb_bell(tls *libc.TLS, c uintptr, percent Tint8_t) (r Txcb_void_cookie_t) {
  19920. bp := tls.Alloc(80)
  19921. defer tls.Free(80)
  19922. var xcb_ret Txcb_void_cookie_t
  19923. var _ /* xcb_out at bp+64 */ Txcb_bell_request_t
  19924. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19925. _ = xcb_ret
  19926. (*(*Txcb_bell_request_t)(unsafe.Pointer(bp + 64))).Fpercent = percent
  19927. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19928. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  19929. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19930. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19931. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req219)))
  19932. return xcb_ret
  19933. }
  19934. var _xcb_req219 = Txcb_protocol_request_t{
  19935. Fcount: uint64(2),
  19936. Fopcode: uint8(m_XCB_BELL),
  19937. Fisvoid: uint8(1),
  19938. }
  19939. func Xxcb_change_pointer_control_checked(tls *libc.TLS, c uintptr, acceleration_numerator Tint16_t, acceleration_denominator Tint16_t, threshold Tint16_t, do_acceleration Tuint8_t, do_threshold Tuint8_t) (r Txcb_void_cookie_t) {
  19940. bp := tls.Alloc(80)
  19941. defer tls.Free(80)
  19942. var xcb_ret Txcb_void_cookie_t
  19943. var _ /* xcb_out at bp+64 */ Txcb_change_pointer_control_request_t
  19944. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19945. _ = xcb_ret
  19946. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19947. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Facceleration_numerator = acceleration_numerator
  19948. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Facceleration_denominator = acceleration_denominator
  19949. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Fthreshold = threshold
  19950. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Fdo_acceleration = do_acceleration
  19951. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Fdo_threshold = do_threshold
  19952. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19953. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  19954. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19955. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19956. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req220)))
  19957. return xcb_ret
  19958. }
  19959. var _xcb_req220 = Txcb_protocol_request_t{
  19960. Fcount: uint64(2),
  19961. Fopcode: uint8(m_XCB_CHANGE_POINTER_CONTROL),
  19962. Fisvoid: uint8(1),
  19963. }
  19964. func Xxcb_change_pointer_control(tls *libc.TLS, c uintptr, acceleration_numerator Tint16_t, acceleration_denominator Tint16_t, threshold Tint16_t, do_acceleration Tuint8_t, do_threshold Tuint8_t) (r Txcb_void_cookie_t) {
  19965. bp := tls.Alloc(80)
  19966. defer tls.Free(80)
  19967. var xcb_ret Txcb_void_cookie_t
  19968. var _ /* xcb_out at bp+64 */ Txcb_change_pointer_control_request_t
  19969. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19970. _ = xcb_ret
  19971. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19972. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Facceleration_numerator = acceleration_numerator
  19973. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Facceleration_denominator = acceleration_denominator
  19974. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Fthreshold = threshold
  19975. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Fdo_acceleration = do_acceleration
  19976. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Fdo_threshold = do_threshold
  19977. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19978. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  19979. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19980. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  19981. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req221)))
  19982. return xcb_ret
  19983. }
  19984. var _xcb_req221 = Txcb_protocol_request_t{
  19985. Fcount: uint64(2),
  19986. Fopcode: uint8(m_XCB_CHANGE_POINTER_CONTROL),
  19987. Fisvoid: uint8(1),
  19988. }
  19989. func Xxcb_get_pointer_control(tls *libc.TLS, c uintptr) (r Txcb_get_pointer_control_cookie_t) {
  19990. bp := tls.Alloc(80)
  19991. defer tls.Free(80)
  19992. var xcb_ret Txcb_get_pointer_control_cookie_t
  19993. var _ /* xcb_out at bp+64 */ Txcb_get_pointer_control_request_t
  19994. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19995. _ = xcb_ret
  19996. (*(*Txcb_get_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  19997. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  19998. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  19999. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20000. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20001. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req222)))
  20002. return xcb_ret
  20003. }
  20004. var _xcb_req222 = Txcb_protocol_request_t{
  20005. Fcount: uint64(2),
  20006. Fopcode: uint8(m_XCB_GET_POINTER_CONTROL),
  20007. }
  20008. func Xxcb_get_pointer_control_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_pointer_control_cookie_t) {
  20009. bp := tls.Alloc(80)
  20010. defer tls.Free(80)
  20011. var xcb_ret Txcb_get_pointer_control_cookie_t
  20012. var _ /* xcb_out at bp+64 */ Txcb_get_pointer_control_request_t
  20013. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20014. _ = xcb_ret
  20015. (*(*Txcb_get_pointer_control_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20016. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20017. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20018. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20019. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20020. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req223)))
  20021. return xcb_ret
  20022. }
  20023. var _xcb_req223 = Txcb_protocol_request_t{
  20024. Fcount: uint64(2),
  20025. Fopcode: uint8(m_XCB_GET_POINTER_CONTROL),
  20026. }
  20027. func Xxcb_get_pointer_control_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_pointer_control_cookie_t, e uintptr) (r uintptr) {
  20028. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20029. }
  20030. func Xxcb_set_screen_saver_checked(tls *libc.TLS, c uintptr, timeout Tint16_t, interval Tint16_t, prefer_blanking Tuint8_t, allow_exposures Tuint8_t) (r Txcb_void_cookie_t) {
  20031. bp := tls.Alloc(80)
  20032. defer tls.Free(80)
  20033. var xcb_ret Txcb_void_cookie_t
  20034. var _ /* xcb_out at bp+64 */ Txcb_set_screen_saver_request_t
  20035. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20036. _ = xcb_ret
  20037. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20038. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Ftimeout = timeout
  20039. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Finterval = interval
  20040. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Fprefer_blanking = prefer_blanking
  20041. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Fallow_exposures = allow_exposures
  20042. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20043. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(10)
  20044. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20045. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20046. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req224)))
  20047. return xcb_ret
  20048. }
  20049. var _xcb_req224 = Txcb_protocol_request_t{
  20050. Fcount: uint64(2),
  20051. Fopcode: uint8(m_XCB_SET_SCREEN_SAVER),
  20052. Fisvoid: uint8(1),
  20053. }
  20054. func Xxcb_set_screen_saver(tls *libc.TLS, c uintptr, timeout Tint16_t, interval Tint16_t, prefer_blanking Tuint8_t, allow_exposures Tuint8_t) (r Txcb_void_cookie_t) {
  20055. bp := tls.Alloc(80)
  20056. defer tls.Free(80)
  20057. var xcb_ret Txcb_void_cookie_t
  20058. var _ /* xcb_out at bp+64 */ Txcb_set_screen_saver_request_t
  20059. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20060. _ = xcb_ret
  20061. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20062. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Ftimeout = timeout
  20063. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Finterval = interval
  20064. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Fprefer_blanking = prefer_blanking
  20065. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Fallow_exposures = allow_exposures
  20066. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20067. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(10)
  20068. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20069. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20070. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req225)))
  20071. return xcb_ret
  20072. }
  20073. var _xcb_req225 = Txcb_protocol_request_t{
  20074. Fcount: uint64(2),
  20075. Fopcode: uint8(m_XCB_SET_SCREEN_SAVER),
  20076. Fisvoid: uint8(1),
  20077. }
  20078. func Xxcb_get_screen_saver(tls *libc.TLS, c uintptr) (r Txcb_get_screen_saver_cookie_t) {
  20079. bp := tls.Alloc(80)
  20080. defer tls.Free(80)
  20081. var xcb_ret Txcb_get_screen_saver_cookie_t
  20082. var _ /* xcb_out at bp+64 */ Txcb_get_screen_saver_request_t
  20083. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20084. _ = xcb_ret
  20085. (*(*Txcb_get_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20086. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20087. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20088. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20089. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20090. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req226)))
  20091. return xcb_ret
  20092. }
  20093. var _xcb_req226 = Txcb_protocol_request_t{
  20094. Fcount: uint64(2),
  20095. Fopcode: uint8(m_XCB_GET_SCREEN_SAVER),
  20096. }
  20097. func Xxcb_get_screen_saver_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_screen_saver_cookie_t) {
  20098. bp := tls.Alloc(80)
  20099. defer tls.Free(80)
  20100. var xcb_ret Txcb_get_screen_saver_cookie_t
  20101. var _ /* xcb_out at bp+64 */ Txcb_get_screen_saver_request_t
  20102. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20103. _ = xcb_ret
  20104. (*(*Txcb_get_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20105. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20106. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20107. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20108. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20109. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req227)))
  20110. return xcb_ret
  20111. }
  20112. var _xcb_req227 = Txcb_protocol_request_t{
  20113. Fcount: uint64(2),
  20114. Fopcode: uint8(m_XCB_GET_SCREEN_SAVER),
  20115. }
  20116. func Xxcb_get_screen_saver_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_screen_saver_cookie_t, e uintptr) (r uintptr) {
  20117. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20118. }
  20119. func Xxcb_change_hosts_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  20120. var _aux, xcb_tmp uintptr
  20121. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  20122. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  20123. xcb_tmp = _buffer
  20124. _aux = _buffer
  20125. xcb_buffer_len = uint32(0)
  20126. xcb_block_len = uint32(0)
  20127. xcb_pad = uint32(0)
  20128. xcb_align_to = uint32(0)
  20129. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(8))
  20130. xcb_tmp += uintptr(xcb_block_len)
  20131. xcb_buffer_len += xcb_block_len
  20132. xcb_block_len = uint32(0)
  20133. /* address */
  20134. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_change_hosts_request_t)(unsafe.Pointer(_aux)).Faddress_len)*libc.Uint64FromInt64(1))
  20135. xcb_tmp += uintptr(xcb_block_len)
  20136. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  20137. /* insert padding */
  20138. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  20139. xcb_buffer_len += xcb_block_len + xcb_pad
  20140. if uint32(0) != xcb_pad {
  20141. xcb_tmp += uintptr(xcb_pad)
  20142. xcb_pad = uint32(0)
  20143. }
  20144. xcb_block_len = uint32(0)
  20145. return libc.Int32FromUint32(xcb_buffer_len)
  20146. }
  20147. func Xxcb_change_hosts_checked(tls *libc.TLS, c uintptr, mode Tuint8_t, family Tuint8_t, address_len Tuint16_t, address uintptr) (r Txcb_void_cookie_t) {
  20148. bp := tls.Alloc(112)
  20149. defer tls.Free(112)
  20150. var xcb_ret Txcb_void_cookie_t
  20151. var _ /* xcb_out at bp+96 */ Txcb_change_hosts_request_t
  20152. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  20153. _ = xcb_ret
  20154. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 96))).Fmode = mode
  20155. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 96))).Ffamily = family
  20156. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  20157. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 96))).Faddress_len = address_len
  20158. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  20159. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  20160. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20161. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20162. /* uint8_t address */
  20163. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = address
  20164. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(address_len) * uint64(1)
  20165. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  20166. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  20167. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req228)))
  20168. return xcb_ret
  20169. }
  20170. var _xcb_req228 = Txcb_protocol_request_t{
  20171. Fcount: uint64(4),
  20172. Fopcode: uint8(m_XCB_CHANGE_HOSTS),
  20173. Fisvoid: uint8(1),
  20174. }
  20175. func Xxcb_change_hosts(tls *libc.TLS, c uintptr, mode Tuint8_t, family Tuint8_t, address_len Tuint16_t, address uintptr) (r Txcb_void_cookie_t) {
  20176. bp := tls.Alloc(112)
  20177. defer tls.Free(112)
  20178. var xcb_ret Txcb_void_cookie_t
  20179. var _ /* xcb_out at bp+96 */ Txcb_change_hosts_request_t
  20180. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  20181. _ = xcb_ret
  20182. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 96))).Fmode = mode
  20183. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 96))).Ffamily = family
  20184. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  20185. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 96))).Faddress_len = address_len
  20186. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  20187. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  20188. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20189. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20190. /* uint8_t address */
  20191. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = address
  20192. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(address_len) * uint64(1)
  20193. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  20194. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  20195. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req229)))
  20196. return xcb_ret
  20197. }
  20198. var _xcb_req229 = Txcb_protocol_request_t{
  20199. Fcount: uint64(4),
  20200. Fopcode: uint8(m_XCB_CHANGE_HOSTS),
  20201. Fisvoid: uint8(1),
  20202. }
  20203. func Xxcb_change_hosts_address(tls *libc.TLS, R uintptr) (r uintptr) {
  20204. return R + libc.UintptrFromInt32(1)*8
  20205. }
  20206. func Xxcb_change_hosts_address_length(tls *libc.TLS, R uintptr) (r int32) {
  20207. return libc.Int32FromUint16((*Txcb_change_hosts_request_t)(unsafe.Pointer(R)).Faddress_len)
  20208. }
  20209. func Xxcb_change_hosts_address_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  20210. var i Txcb_generic_iterator_t
  20211. _ = i
  20212. i.Fdata = R + libc.UintptrFromInt32(1)*8 + uintptr((*Txcb_change_hosts_request_t)(unsafe.Pointer(R)).Faddress_len)
  20213. i.Frem = 0
  20214. i.Findex = int32(int64(i.Fdata) - int64(R))
  20215. return i
  20216. }
  20217. func Xxcb_host_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  20218. var _aux, xcb_tmp uintptr
  20219. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  20220. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  20221. xcb_tmp = _buffer
  20222. _aux = _buffer
  20223. xcb_buffer_len = uint32(0)
  20224. xcb_block_len = uint32(0)
  20225. xcb_pad = uint32(0)
  20226. xcb_align_to = uint32(0)
  20227. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  20228. xcb_tmp += uintptr(xcb_block_len)
  20229. xcb_buffer_len += xcb_block_len
  20230. xcb_block_len = uint32(0)
  20231. /* address */
  20232. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_host_t)(unsafe.Pointer(_aux)).Faddress_len)*libc.Uint64FromInt64(1))
  20233. xcb_tmp += uintptr(xcb_block_len)
  20234. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  20235. xcb_align_to = uint32(4)
  20236. /* insert padding */
  20237. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  20238. xcb_buffer_len += xcb_block_len + xcb_pad
  20239. if uint32(0) != xcb_pad {
  20240. xcb_tmp += uintptr(xcb_pad)
  20241. xcb_pad = uint32(0)
  20242. }
  20243. xcb_block_len = uint32(0)
  20244. /* insert padding */
  20245. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  20246. xcb_buffer_len += xcb_block_len + xcb_pad
  20247. if uint32(0) != xcb_pad {
  20248. xcb_tmp += uintptr(xcb_pad)
  20249. xcb_pad = uint32(0)
  20250. }
  20251. xcb_block_len = uint32(0)
  20252. return libc.Int32FromUint32(xcb_buffer_len)
  20253. }
  20254. func Xxcb_host_address(tls *libc.TLS, R uintptr) (r uintptr) {
  20255. return R + libc.UintptrFromInt32(1)*4
  20256. }
  20257. func Xxcb_host_address_length(tls *libc.TLS, R uintptr) (r int32) {
  20258. return libc.Int32FromUint16((*Txcb_host_t)(unsafe.Pointer(R)).Faddress_len)
  20259. }
  20260. func Xxcb_host_address_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  20261. var i Txcb_generic_iterator_t
  20262. _ = i
  20263. i.Fdata = R + libc.UintptrFromInt32(1)*4 + uintptr((*Txcb_host_t)(unsafe.Pointer(R)).Faddress_len)
  20264. i.Frem = 0
  20265. i.Findex = int32(int64(i.Fdata) - int64(R))
  20266. return i
  20267. }
  20268. func Xxcb_host_next(tls *libc.TLS, i uintptr) {
  20269. var R uintptr
  20270. var child Txcb_generic_iterator_t
  20271. _, _ = R, child
  20272. R = (*Txcb_host_iterator_t)(unsafe.Pointer(i)).Fdata
  20273. child.Fdata = R + uintptr(Xxcb_host_sizeof(tls, R))
  20274. (*Txcb_host_iterator_t)(unsafe.Pointer(i)).Findex = int32(int64(child.Fdata) - int64((*Txcb_host_iterator_t)(unsafe.Pointer(i)).Fdata))
  20275. (*Txcb_host_iterator_t)(unsafe.Pointer(i)).Frem--
  20276. (*Txcb_host_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  20277. }
  20278. func Xxcb_host_end(tls *libc.TLS, _i Txcb_host_iterator_t) (r Txcb_generic_iterator_t) {
  20279. bp := tls.Alloc(16)
  20280. defer tls.Free(16)
  20281. *(*Txcb_host_iterator_t)(unsafe.Pointer(bp)) = _i
  20282. var ret Txcb_generic_iterator_t
  20283. _ = ret
  20284. for (*(*Txcb_host_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  20285. Xxcb_host_next(tls, bp)
  20286. }
  20287. ret.Fdata = (*(*Txcb_host_iterator_t)(unsafe.Pointer(bp))).Fdata
  20288. ret.Frem = (*(*Txcb_host_iterator_t)(unsafe.Pointer(bp))).Frem
  20289. ret.Findex = (*(*Txcb_host_iterator_t)(unsafe.Pointer(bp))).Findex
  20290. return ret
  20291. }
  20292. func Xxcb_list_hosts_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  20293. var _aux, xcb_tmp uintptr
  20294. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  20295. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  20296. xcb_tmp = _buffer
  20297. _aux = _buffer
  20298. xcb_buffer_len = uint32(0)
  20299. xcb_block_len = uint32(0)
  20300. xcb_pad = uint32(0)
  20301. xcb_align_to = uint32(0)
  20302. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  20303. xcb_tmp += uintptr(xcb_block_len)
  20304. xcb_buffer_len += xcb_block_len
  20305. xcb_block_len = uint32(0)
  20306. /* hosts */
  20307. i = uint32(0)
  20308. for {
  20309. if !(i < uint32((*Txcb_list_hosts_reply_t)(unsafe.Pointer(_aux)).Fhosts_len)) {
  20310. break
  20311. }
  20312. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_host_sizeof(tls, xcb_tmp))
  20313. xcb_block_len += xcb_tmp_len
  20314. xcb_tmp += uintptr(xcb_tmp_len)
  20315. goto _1
  20316. _1:
  20317. ;
  20318. i++
  20319. }
  20320. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 2))
  20321. /* insert padding */
  20322. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  20323. xcb_buffer_len += xcb_block_len + xcb_pad
  20324. if uint32(0) != xcb_pad {
  20325. xcb_tmp += uintptr(xcb_pad)
  20326. xcb_pad = uint32(0)
  20327. }
  20328. xcb_block_len = uint32(0)
  20329. return libc.Int32FromUint32(xcb_buffer_len)
  20330. }
  20331. func Xxcb_list_hosts(tls *libc.TLS, c uintptr) (r Txcb_list_hosts_cookie_t) {
  20332. bp := tls.Alloc(80)
  20333. defer tls.Free(80)
  20334. var xcb_ret Txcb_list_hosts_cookie_t
  20335. var _ /* xcb_out at bp+64 */ Txcb_list_hosts_request_t
  20336. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20337. _ = xcb_ret
  20338. (*(*Txcb_list_hosts_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20339. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20340. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20341. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20342. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20343. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req230)))
  20344. return xcb_ret
  20345. }
  20346. var _xcb_req230 = Txcb_protocol_request_t{
  20347. Fcount: uint64(2),
  20348. Fopcode: uint8(m_XCB_LIST_HOSTS),
  20349. }
  20350. func Xxcb_list_hosts_unchecked(tls *libc.TLS, c uintptr) (r Txcb_list_hosts_cookie_t) {
  20351. bp := tls.Alloc(80)
  20352. defer tls.Free(80)
  20353. var xcb_ret Txcb_list_hosts_cookie_t
  20354. var _ /* xcb_out at bp+64 */ Txcb_list_hosts_request_t
  20355. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20356. _ = xcb_ret
  20357. (*(*Txcb_list_hosts_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20358. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20359. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20360. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20361. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20362. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req231)))
  20363. return xcb_ret
  20364. }
  20365. var _xcb_req231 = Txcb_protocol_request_t{
  20366. Fcount: uint64(2),
  20367. Fopcode: uint8(m_XCB_LIST_HOSTS),
  20368. }
  20369. func Xxcb_list_hosts_hosts_length(tls *libc.TLS, R uintptr) (r int32) {
  20370. return libc.Int32FromUint16((*Txcb_list_hosts_reply_t)(unsafe.Pointer(R)).Fhosts_len)
  20371. }
  20372. func Xxcb_list_hosts_hosts_iterator(tls *libc.TLS, R uintptr) (r Txcb_host_iterator_t) {
  20373. var i Txcb_host_iterator_t
  20374. _ = i
  20375. i.Fdata = R + libc.UintptrFromInt32(1)*32
  20376. i.Frem = libc.Int32FromUint16((*Txcb_list_hosts_reply_t)(unsafe.Pointer(R)).Fhosts_len)
  20377. i.Findex = int32(int64(i.Fdata) - int64(R))
  20378. return i
  20379. }
  20380. func Xxcb_list_hosts_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_hosts_cookie_t, e uintptr) (r uintptr) {
  20381. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20382. }
  20383. func Xxcb_set_access_control_checked(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  20384. bp := tls.Alloc(80)
  20385. defer tls.Free(80)
  20386. var xcb_ret Txcb_void_cookie_t
  20387. var _ /* xcb_out at bp+64 */ Txcb_set_access_control_request_t
  20388. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20389. _ = xcb_ret
  20390. (*(*Txcb_set_access_control_request_t)(unsafe.Pointer(bp + 64))).Fmode = mode
  20391. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20392. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20393. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20394. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20395. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req232)))
  20396. return xcb_ret
  20397. }
  20398. var _xcb_req232 = Txcb_protocol_request_t{
  20399. Fcount: uint64(2),
  20400. Fopcode: uint8(m_XCB_SET_ACCESS_CONTROL),
  20401. Fisvoid: uint8(1),
  20402. }
  20403. func Xxcb_set_access_control(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  20404. bp := tls.Alloc(80)
  20405. defer tls.Free(80)
  20406. var xcb_ret Txcb_void_cookie_t
  20407. var _ /* xcb_out at bp+64 */ Txcb_set_access_control_request_t
  20408. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20409. _ = xcb_ret
  20410. (*(*Txcb_set_access_control_request_t)(unsafe.Pointer(bp + 64))).Fmode = mode
  20411. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20412. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20413. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20414. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20415. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req233)))
  20416. return xcb_ret
  20417. }
  20418. var _xcb_req233 = Txcb_protocol_request_t{
  20419. Fcount: uint64(2),
  20420. Fopcode: uint8(m_XCB_SET_ACCESS_CONTROL),
  20421. Fisvoid: uint8(1),
  20422. }
  20423. func Xxcb_set_close_down_mode_checked(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  20424. bp := tls.Alloc(80)
  20425. defer tls.Free(80)
  20426. var xcb_ret Txcb_void_cookie_t
  20427. var _ /* xcb_out at bp+64 */ Txcb_set_close_down_mode_request_t
  20428. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20429. _ = xcb_ret
  20430. (*(*Txcb_set_close_down_mode_request_t)(unsafe.Pointer(bp + 64))).Fmode = mode
  20431. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20432. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20433. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20434. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20435. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req234)))
  20436. return xcb_ret
  20437. }
  20438. var _xcb_req234 = Txcb_protocol_request_t{
  20439. Fcount: uint64(2),
  20440. Fopcode: uint8(m_XCB_SET_CLOSE_DOWN_MODE),
  20441. Fisvoid: uint8(1),
  20442. }
  20443. func Xxcb_set_close_down_mode(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  20444. bp := tls.Alloc(80)
  20445. defer tls.Free(80)
  20446. var xcb_ret Txcb_void_cookie_t
  20447. var _ /* xcb_out at bp+64 */ Txcb_set_close_down_mode_request_t
  20448. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20449. _ = xcb_ret
  20450. (*(*Txcb_set_close_down_mode_request_t)(unsafe.Pointer(bp + 64))).Fmode = mode
  20451. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20452. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20453. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20454. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20455. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req235)))
  20456. return xcb_ret
  20457. }
  20458. var _xcb_req235 = Txcb_protocol_request_t{
  20459. Fcount: uint64(2),
  20460. Fopcode: uint8(m_XCB_SET_CLOSE_DOWN_MODE),
  20461. Fisvoid: uint8(1),
  20462. }
  20463. func Xxcb_kill_client_checked(tls *libc.TLS, c uintptr, resource Tuint32_t) (r Txcb_void_cookie_t) {
  20464. bp := tls.Alloc(80)
  20465. defer tls.Free(80)
  20466. var xcb_ret Txcb_void_cookie_t
  20467. var _ /* xcb_out at bp+64 */ Txcb_kill_client_request_t
  20468. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20469. _ = xcb_ret
  20470. (*(*Txcb_kill_client_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20471. (*(*Txcb_kill_client_request_t)(unsafe.Pointer(bp + 64))).Fresource = resource
  20472. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20473. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  20474. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20475. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20476. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req236)))
  20477. return xcb_ret
  20478. }
  20479. var _xcb_req236 = Txcb_protocol_request_t{
  20480. Fcount: uint64(2),
  20481. Fopcode: uint8(m_XCB_KILL_CLIENT),
  20482. Fisvoid: uint8(1),
  20483. }
  20484. func Xxcb_kill_client(tls *libc.TLS, c uintptr, resource Tuint32_t) (r Txcb_void_cookie_t) {
  20485. bp := tls.Alloc(80)
  20486. defer tls.Free(80)
  20487. var xcb_ret Txcb_void_cookie_t
  20488. var _ /* xcb_out at bp+64 */ Txcb_kill_client_request_t
  20489. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20490. _ = xcb_ret
  20491. (*(*Txcb_kill_client_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20492. (*(*Txcb_kill_client_request_t)(unsafe.Pointer(bp + 64))).Fresource = resource
  20493. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20494. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  20495. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20496. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20497. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req237)))
  20498. return xcb_ret
  20499. }
  20500. var _xcb_req237 = Txcb_protocol_request_t{
  20501. Fcount: uint64(2),
  20502. Fopcode: uint8(m_XCB_KILL_CLIENT),
  20503. Fisvoid: uint8(1),
  20504. }
  20505. func Xxcb_rotate_properties_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  20506. var _aux, xcb_tmp uintptr
  20507. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  20508. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  20509. xcb_tmp = _buffer
  20510. _aux = _buffer
  20511. xcb_buffer_len = uint32(0)
  20512. xcb_block_len = uint32(0)
  20513. xcb_pad = uint32(0)
  20514. xcb_align_to = uint32(0)
  20515. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(12))
  20516. xcb_tmp += uintptr(xcb_block_len)
  20517. xcb_buffer_len += xcb_block_len
  20518. xcb_block_len = uint32(0)
  20519. /* atoms */
  20520. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_rotate_properties_request_t)(unsafe.Pointer(_aux)).Fatoms_len)*libc.Uint64FromInt64(4))
  20521. xcb_tmp += uintptr(xcb_block_len)
  20522. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  20523. /* insert padding */
  20524. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  20525. xcb_buffer_len += xcb_block_len + xcb_pad
  20526. if uint32(0) != xcb_pad {
  20527. xcb_tmp += uintptr(xcb_pad)
  20528. xcb_pad = uint32(0)
  20529. }
  20530. xcb_block_len = uint32(0)
  20531. return libc.Int32FromUint32(xcb_buffer_len)
  20532. }
  20533. func Xxcb_rotate_properties_checked(tls *libc.TLS, c uintptr, window Txcb_window_t, atoms_len Tuint16_t, delta Tint16_t, atoms uintptr) (r Txcb_void_cookie_t) {
  20534. bp := tls.Alloc(112)
  20535. defer tls.Free(112)
  20536. var xcb_ret Txcb_void_cookie_t
  20537. var _ /* xcb_out at bp+96 */ Txcb_rotate_properties_request_t
  20538. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  20539. _ = xcb_ret
  20540. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  20541. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 96))).Fwindow = window
  20542. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 96))).Fatoms_len = atoms_len
  20543. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 96))).Fdelta = delta
  20544. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  20545. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  20546. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20547. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20548. /* xcb_atom_t atoms */
  20549. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = atoms
  20550. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(atoms_len) * uint64(4)
  20551. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  20552. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  20553. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req238)))
  20554. return xcb_ret
  20555. }
  20556. var _xcb_req238 = Txcb_protocol_request_t{
  20557. Fcount: uint64(4),
  20558. Fopcode: uint8(m_XCB_ROTATE_PROPERTIES),
  20559. Fisvoid: uint8(1),
  20560. }
  20561. func Xxcb_rotate_properties(tls *libc.TLS, c uintptr, window Txcb_window_t, atoms_len Tuint16_t, delta Tint16_t, atoms uintptr) (r Txcb_void_cookie_t) {
  20562. bp := tls.Alloc(112)
  20563. defer tls.Free(112)
  20564. var xcb_ret Txcb_void_cookie_t
  20565. var _ /* xcb_out at bp+96 */ Txcb_rotate_properties_request_t
  20566. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  20567. _ = xcb_ret
  20568. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 96))).Fpad0 = uint8(0)
  20569. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 96))).Fwindow = window
  20570. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 96))).Fatoms_len = atoms_len
  20571. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 96))).Fdelta = delta
  20572. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  20573. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(12)
  20574. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20575. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20576. /* xcb_atom_t atoms */
  20577. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = atoms
  20578. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(atoms_len) * uint64(4)
  20579. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  20580. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  20581. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req239)))
  20582. return xcb_ret
  20583. }
  20584. var _xcb_req239 = Txcb_protocol_request_t{
  20585. Fcount: uint64(4),
  20586. Fopcode: uint8(m_XCB_ROTATE_PROPERTIES),
  20587. Fisvoid: uint8(1),
  20588. }
  20589. func Xxcb_rotate_properties_atoms(tls *libc.TLS, R uintptr) (r uintptr) {
  20590. return R + libc.UintptrFromInt32(1)*12
  20591. }
  20592. func Xxcb_rotate_properties_atoms_length(tls *libc.TLS, R uintptr) (r int32) {
  20593. return libc.Int32FromUint16((*Txcb_rotate_properties_request_t)(unsafe.Pointer(R)).Fatoms_len)
  20594. }
  20595. func Xxcb_rotate_properties_atoms_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  20596. var i Txcb_generic_iterator_t
  20597. _ = i
  20598. i.Fdata = R + libc.UintptrFromInt32(1)*12 + uintptr((*Txcb_rotate_properties_request_t)(unsafe.Pointer(R)).Fatoms_len)*4
  20599. i.Frem = 0
  20600. i.Findex = int32(int64(i.Fdata) - int64(R))
  20601. return i
  20602. }
  20603. func Xxcb_force_screen_saver_checked(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  20604. bp := tls.Alloc(80)
  20605. defer tls.Free(80)
  20606. var xcb_ret Txcb_void_cookie_t
  20607. var _ /* xcb_out at bp+64 */ Txcb_force_screen_saver_request_t
  20608. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20609. _ = xcb_ret
  20610. (*(*Txcb_force_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Fmode = mode
  20611. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20612. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20613. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20614. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20615. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req240)))
  20616. return xcb_ret
  20617. }
  20618. var _xcb_req240 = Txcb_protocol_request_t{
  20619. Fcount: uint64(2),
  20620. Fopcode: uint8(m_XCB_FORCE_SCREEN_SAVER),
  20621. Fisvoid: uint8(1),
  20622. }
  20623. func Xxcb_force_screen_saver(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  20624. bp := tls.Alloc(80)
  20625. defer tls.Free(80)
  20626. var xcb_ret Txcb_void_cookie_t
  20627. var _ /* xcb_out at bp+64 */ Txcb_force_screen_saver_request_t
  20628. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20629. _ = xcb_ret
  20630. (*(*Txcb_force_screen_saver_request_t)(unsafe.Pointer(bp + 64))).Fmode = mode
  20631. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20632. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20633. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20634. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20635. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req241)))
  20636. return xcb_ret
  20637. }
  20638. var _xcb_req241 = Txcb_protocol_request_t{
  20639. Fcount: uint64(2),
  20640. Fopcode: uint8(m_XCB_FORCE_SCREEN_SAVER),
  20641. Fisvoid: uint8(1),
  20642. }
  20643. func Xxcb_set_pointer_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  20644. var _aux, xcb_tmp uintptr
  20645. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  20646. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  20647. xcb_tmp = _buffer
  20648. _aux = _buffer
  20649. xcb_buffer_len = uint32(0)
  20650. xcb_block_len = uint32(0)
  20651. xcb_pad = uint32(0)
  20652. xcb_align_to = uint32(0)
  20653. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  20654. xcb_tmp += uintptr(xcb_block_len)
  20655. xcb_buffer_len += xcb_block_len
  20656. xcb_block_len = uint32(0)
  20657. /* map */
  20658. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_set_pointer_mapping_request_t)(unsafe.Pointer(_aux)).Fmap_len)*libc.Uint64FromInt64(1))
  20659. xcb_tmp += uintptr(xcb_block_len)
  20660. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  20661. /* insert padding */
  20662. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  20663. xcb_buffer_len += xcb_block_len + xcb_pad
  20664. if uint32(0) != xcb_pad {
  20665. xcb_tmp += uintptr(xcb_pad)
  20666. xcb_pad = uint32(0)
  20667. }
  20668. xcb_block_len = uint32(0)
  20669. return libc.Int32FromUint32(xcb_buffer_len)
  20670. }
  20671. func Xxcb_set_pointer_mapping(tls *libc.TLS, c uintptr, map_len Tuint8_t, map1 uintptr) (r Txcb_set_pointer_mapping_cookie_t) {
  20672. bp := tls.Alloc(112)
  20673. defer tls.Free(112)
  20674. var xcb_ret Txcb_set_pointer_mapping_cookie_t
  20675. var _ /* xcb_out at bp+96 */ Txcb_set_pointer_mapping_request_t
  20676. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  20677. _ = xcb_ret
  20678. (*(*Txcb_set_pointer_mapping_request_t)(unsafe.Pointer(bp + 96))).Fmap_len = map_len
  20679. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  20680. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20681. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20682. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20683. /* uint8_t map */
  20684. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = map1
  20685. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(map_len) * uint64(1)
  20686. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  20687. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  20688. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req242)))
  20689. return xcb_ret
  20690. }
  20691. var _xcb_req242 = Txcb_protocol_request_t{
  20692. Fcount: uint64(4),
  20693. Fopcode: uint8(m_XCB_SET_POINTER_MAPPING),
  20694. }
  20695. func Xxcb_set_pointer_mapping_unchecked(tls *libc.TLS, c uintptr, map_len Tuint8_t, map1 uintptr) (r Txcb_set_pointer_mapping_cookie_t) {
  20696. bp := tls.Alloc(112)
  20697. defer tls.Free(112)
  20698. var xcb_ret Txcb_set_pointer_mapping_cookie_t
  20699. var _ /* xcb_out at bp+96 */ Txcb_set_pointer_mapping_request_t
  20700. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  20701. _ = xcb_ret
  20702. (*(*Txcb_set_pointer_mapping_request_t)(unsafe.Pointer(bp + 96))).Fmap_len = map_len
  20703. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  20704. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20705. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20706. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20707. /* uint8_t map */
  20708. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = map1
  20709. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint64(map_len) * uint64(1)
  20710. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  20711. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  20712. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req243)))
  20713. return xcb_ret
  20714. }
  20715. var _xcb_req243 = Txcb_protocol_request_t{
  20716. Fcount: uint64(4),
  20717. Fopcode: uint8(m_XCB_SET_POINTER_MAPPING),
  20718. }
  20719. func Xxcb_set_pointer_mapping_reply(tls *libc.TLS, c uintptr, cookie Txcb_set_pointer_mapping_cookie_t, e uintptr) (r uintptr) {
  20720. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20721. }
  20722. func Xxcb_get_pointer_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  20723. var _aux, xcb_tmp uintptr
  20724. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  20725. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  20726. xcb_tmp = _buffer
  20727. _aux = _buffer
  20728. xcb_buffer_len = uint32(0)
  20729. xcb_block_len = uint32(0)
  20730. xcb_pad = uint32(0)
  20731. xcb_align_to = uint32(0)
  20732. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  20733. xcb_tmp += uintptr(xcb_block_len)
  20734. xcb_buffer_len += xcb_block_len
  20735. xcb_block_len = uint32(0)
  20736. /* map */
  20737. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_get_pointer_mapping_reply_t)(unsafe.Pointer(_aux)).Fmap_len)*libc.Uint64FromInt64(1))
  20738. xcb_tmp += uintptr(xcb_block_len)
  20739. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  20740. /* insert padding */
  20741. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  20742. xcb_buffer_len += xcb_block_len + xcb_pad
  20743. if uint32(0) != xcb_pad {
  20744. xcb_tmp += uintptr(xcb_pad)
  20745. xcb_pad = uint32(0)
  20746. }
  20747. xcb_block_len = uint32(0)
  20748. return libc.Int32FromUint32(xcb_buffer_len)
  20749. }
  20750. func Xxcb_get_pointer_mapping(tls *libc.TLS, c uintptr) (r Txcb_get_pointer_mapping_cookie_t) {
  20751. bp := tls.Alloc(80)
  20752. defer tls.Free(80)
  20753. var xcb_ret Txcb_get_pointer_mapping_cookie_t
  20754. var _ /* xcb_out at bp+64 */ Txcb_get_pointer_mapping_request_t
  20755. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20756. _ = xcb_ret
  20757. (*(*Txcb_get_pointer_mapping_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20758. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20759. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20760. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20761. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20762. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req244)))
  20763. return xcb_ret
  20764. }
  20765. var _xcb_req244 = Txcb_protocol_request_t{
  20766. Fcount: uint64(2),
  20767. Fopcode: uint8(m_XCB_GET_POINTER_MAPPING),
  20768. }
  20769. func Xxcb_get_pointer_mapping_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_pointer_mapping_cookie_t) {
  20770. bp := tls.Alloc(80)
  20771. defer tls.Free(80)
  20772. var xcb_ret Txcb_get_pointer_mapping_cookie_t
  20773. var _ /* xcb_out at bp+64 */ Txcb_get_pointer_mapping_request_t
  20774. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20775. _ = xcb_ret
  20776. (*(*Txcb_get_pointer_mapping_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20777. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20778. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20779. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20780. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20781. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req245)))
  20782. return xcb_ret
  20783. }
  20784. var _xcb_req245 = Txcb_protocol_request_t{
  20785. Fcount: uint64(2),
  20786. Fopcode: uint8(m_XCB_GET_POINTER_MAPPING),
  20787. }
  20788. func Xxcb_get_pointer_mapping_map(tls *libc.TLS, R uintptr) (r uintptr) {
  20789. return R + libc.UintptrFromInt32(1)*32
  20790. }
  20791. func Xxcb_get_pointer_mapping_map_length(tls *libc.TLS, R uintptr) (r int32) {
  20792. return libc.Int32FromUint8((*Txcb_get_pointer_mapping_reply_t)(unsafe.Pointer(R)).Fmap_len)
  20793. }
  20794. func Xxcb_get_pointer_mapping_map_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  20795. var i Txcb_generic_iterator_t
  20796. _ = i
  20797. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_get_pointer_mapping_reply_t)(unsafe.Pointer(R)).Fmap_len)
  20798. i.Frem = 0
  20799. i.Findex = int32(int64(i.Fdata) - int64(R))
  20800. return i
  20801. }
  20802. func Xxcb_get_pointer_mapping_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_pointer_mapping_cookie_t, e uintptr) (r uintptr) {
  20803. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20804. }
  20805. func Xxcb_set_modifier_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  20806. var _aux, xcb_tmp uintptr
  20807. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  20808. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  20809. xcb_tmp = _buffer
  20810. _aux = _buffer
  20811. xcb_buffer_len = uint32(0)
  20812. xcb_block_len = uint32(0)
  20813. xcb_pad = uint32(0)
  20814. xcb_align_to = uint32(0)
  20815. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(4))
  20816. xcb_tmp += uintptr(xcb_block_len)
  20817. xcb_buffer_len += xcb_block_len
  20818. xcb_block_len = uint32(0)
  20819. /* keycodes */
  20820. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt32(libc.Int32FromUint8((*Txcb_set_modifier_mapping_request_t)(unsafe.Pointer(_aux)).Fkeycodes_per_modifier)*libc.Int32FromInt32(8))*libc.Uint64FromInt64(1))
  20821. xcb_tmp += uintptr(xcb_block_len)
  20822. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  20823. /* insert padding */
  20824. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  20825. xcb_buffer_len += xcb_block_len + xcb_pad
  20826. if uint32(0) != xcb_pad {
  20827. xcb_tmp += uintptr(xcb_pad)
  20828. xcb_pad = uint32(0)
  20829. }
  20830. xcb_block_len = uint32(0)
  20831. return libc.Int32FromUint32(xcb_buffer_len)
  20832. }
  20833. func Xxcb_set_modifier_mapping(tls *libc.TLS, c uintptr, keycodes_per_modifier Tuint8_t, keycodes uintptr) (r Txcb_set_modifier_mapping_cookie_t) {
  20834. bp := tls.Alloc(112)
  20835. defer tls.Free(112)
  20836. var xcb_ret Txcb_set_modifier_mapping_cookie_t
  20837. var _ /* xcb_out at bp+96 */ Txcb_set_modifier_mapping_request_t
  20838. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  20839. _ = xcb_ret
  20840. (*(*Txcb_set_modifier_mapping_request_t)(unsafe.Pointer(bp + 96))).Fkeycodes_per_modifier = keycodes_per_modifier
  20841. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  20842. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20843. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20844. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20845. /* xcb_keycode_t keycodes */
  20846. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = keycodes
  20847. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(libc.Int32FromUint8(keycodes_per_modifier)*libc.Int32FromInt32(8)) * uint64(1)
  20848. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  20849. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  20850. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req246)))
  20851. return xcb_ret
  20852. }
  20853. var _xcb_req246 = Txcb_protocol_request_t{
  20854. Fcount: uint64(4),
  20855. Fopcode: uint8(m_XCB_SET_MODIFIER_MAPPING),
  20856. }
  20857. func Xxcb_set_modifier_mapping_unchecked(tls *libc.TLS, c uintptr, keycodes_per_modifier Tuint8_t, keycodes uintptr) (r Txcb_set_modifier_mapping_cookie_t) {
  20858. bp := tls.Alloc(112)
  20859. defer tls.Free(112)
  20860. var xcb_ret Txcb_set_modifier_mapping_cookie_t
  20861. var _ /* xcb_out at bp+96 */ Txcb_set_modifier_mapping_request_t
  20862. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  20863. _ = xcb_ret
  20864. (*(*Txcb_set_modifier_mapping_request_t)(unsafe.Pointer(bp + 96))).Fkeycodes_per_modifier = keycodes_per_modifier
  20865. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 96
  20866. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20867. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20868. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20869. /* xcb_keycode_t keycodes */
  20870. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = keycodes
  20871. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint64FromInt32(libc.Int32FromUint8(keycodes_per_modifier)*libc.Int32FromInt32(8)) * uint64(1)
  20872. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  20873. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint64(3)
  20874. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req247)))
  20875. return xcb_ret
  20876. }
  20877. var _xcb_req247 = Txcb_protocol_request_t{
  20878. Fcount: uint64(4),
  20879. Fopcode: uint8(m_XCB_SET_MODIFIER_MAPPING),
  20880. }
  20881. func Xxcb_set_modifier_mapping_reply(tls *libc.TLS, c uintptr, cookie Txcb_set_modifier_mapping_cookie_t, e uintptr) (r uintptr) {
  20882. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20883. }
  20884. func Xxcb_get_modifier_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  20885. var _aux, xcb_tmp uintptr
  20886. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  20887. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  20888. xcb_tmp = _buffer
  20889. _aux = _buffer
  20890. xcb_buffer_len = uint32(0)
  20891. xcb_block_len = uint32(0)
  20892. xcb_pad = uint32(0)
  20893. xcb_align_to = uint32(0)
  20894. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  20895. xcb_tmp += uintptr(xcb_block_len)
  20896. xcb_buffer_len += xcb_block_len
  20897. xcb_block_len = uint32(0)
  20898. /* keycodes */
  20899. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt32(libc.Int32FromUint8((*Txcb_get_modifier_mapping_reply_t)(unsafe.Pointer(_aux)).Fkeycodes_per_modifier)*libc.Int32FromInt32(8))*libc.Uint64FromInt64(1))
  20900. xcb_tmp += uintptr(xcb_block_len)
  20901. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 1))
  20902. /* insert padding */
  20903. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  20904. xcb_buffer_len += xcb_block_len + xcb_pad
  20905. if uint32(0) != xcb_pad {
  20906. xcb_tmp += uintptr(xcb_pad)
  20907. xcb_pad = uint32(0)
  20908. }
  20909. xcb_block_len = uint32(0)
  20910. return libc.Int32FromUint32(xcb_buffer_len)
  20911. }
  20912. func Xxcb_get_modifier_mapping(tls *libc.TLS, c uintptr) (r Txcb_get_modifier_mapping_cookie_t) {
  20913. bp := tls.Alloc(80)
  20914. defer tls.Free(80)
  20915. var xcb_ret Txcb_get_modifier_mapping_cookie_t
  20916. var _ /* xcb_out at bp+64 */ Txcb_get_modifier_mapping_request_t
  20917. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20918. _ = xcb_ret
  20919. (*(*Txcb_get_modifier_mapping_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20920. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20921. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20922. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20923. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20924. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req248)))
  20925. return xcb_ret
  20926. }
  20927. var _xcb_req248 = Txcb_protocol_request_t{
  20928. Fcount: uint64(2),
  20929. Fopcode: uint8(m_XCB_GET_MODIFIER_MAPPING),
  20930. }
  20931. func Xxcb_get_modifier_mapping_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_modifier_mapping_cookie_t) {
  20932. bp := tls.Alloc(80)
  20933. defer tls.Free(80)
  20934. var xcb_ret Txcb_get_modifier_mapping_cookie_t
  20935. var _ /* xcb_out at bp+64 */ Txcb_get_modifier_mapping_request_t
  20936. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20937. _ = xcb_ret
  20938. (*(*Txcb_get_modifier_mapping_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20939. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20940. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20941. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20942. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20943. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req249)))
  20944. return xcb_ret
  20945. }
  20946. var _xcb_req249 = Txcb_protocol_request_t{
  20947. Fcount: uint64(2),
  20948. Fopcode: uint8(m_XCB_GET_MODIFIER_MAPPING),
  20949. }
  20950. func Xxcb_get_modifier_mapping_keycodes(tls *libc.TLS, R uintptr) (r uintptr) {
  20951. return R + libc.UintptrFromInt32(1)*32
  20952. }
  20953. func Xxcb_get_modifier_mapping_keycodes_length(tls *libc.TLS, R uintptr) (r int32) {
  20954. return libc.Int32FromUint8((*Txcb_get_modifier_mapping_reply_t)(unsafe.Pointer(R)).Fkeycodes_per_modifier) * int32(8)
  20955. }
  20956. func Xxcb_get_modifier_mapping_keycodes_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  20957. var i Txcb_generic_iterator_t
  20958. _ = i
  20959. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr(libc.Int32FromUint8((*Txcb_get_modifier_mapping_reply_t)(unsafe.Pointer(R)).Fkeycodes_per_modifier)*libc.Int32FromInt32(8))
  20960. i.Frem = 0
  20961. i.Findex = int32(int64(i.Fdata) - int64(R))
  20962. return i
  20963. }
  20964. func Xxcb_get_modifier_mapping_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_modifier_mapping_cookie_t, e uintptr) (r uintptr) {
  20965. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20966. }
  20967. func Xxcb_no_operation_checked(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  20968. bp := tls.Alloc(80)
  20969. defer tls.Free(80)
  20970. var xcb_ret Txcb_void_cookie_t
  20971. var _ /* xcb_out at bp+64 */ Txcb_no_operation_request_t
  20972. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20973. _ = xcb_ret
  20974. (*(*Txcb_no_operation_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20975. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20976. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20977. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20978. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20979. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req250)))
  20980. return xcb_ret
  20981. }
  20982. var _xcb_req250 = Txcb_protocol_request_t{
  20983. Fcount: uint64(2),
  20984. Fopcode: uint8(m_XCB_NO_OPERATION),
  20985. Fisvoid: uint8(1),
  20986. }
  20987. func Xxcb_no_operation(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  20988. bp := tls.Alloc(80)
  20989. defer tls.Free(80)
  20990. var xcb_ret Txcb_void_cookie_t
  20991. var _ /* xcb_out at bp+64 */ Txcb_no_operation_request_t
  20992. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20993. _ = xcb_ret
  20994. (*(*Txcb_no_operation_request_t)(unsafe.Pointer(bp + 64))).Fpad0 = uint8(0)
  20995. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  20996. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  20997. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20998. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  20999. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req251)))
  21000. return xcb_ret
  21001. }
  21002. var _xcb_req251 = Txcb_protocol_request_t{
  21003. Fcount: uint64(2),
  21004. Fopcode: uint8(m_XCB_NO_OPERATION),
  21005. Fisvoid: uint8(1),
  21006. }
  21007. func Xxcb_big_requests_enable(tls *libc.TLS, c uintptr) (r Txcb_big_requests_enable_cookie_t) {
  21008. bp := tls.Alloc(80)
  21009. defer tls.Free(80)
  21010. var xcb_ret Txcb_big_requests_enable_cookie_t
  21011. var _ /* xcb_out at bp+64 */ Txcb_big_requests_enable_request_t
  21012. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  21013. _ = xcb_ret
  21014. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  21015. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  21016. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  21017. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  21018. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req252)))
  21019. return xcb_ret
  21020. }
  21021. var _xcb_req252 = Txcb_protocol_request_t{
  21022. Fcount: uint64(2),
  21023. Fext: uintptr(unsafe.Pointer(&Xxcb_big_requests_id)),
  21024. }
  21025. func Xxcb_big_requests_enable_unchecked(tls *libc.TLS, c uintptr) (r Txcb_big_requests_enable_cookie_t) {
  21026. bp := tls.Alloc(80)
  21027. defer tls.Free(80)
  21028. var xcb_ret Txcb_big_requests_enable_cookie_t
  21029. var _ /* xcb_out at bp+64 */ Txcb_big_requests_enable_request_t
  21030. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  21031. _ = xcb_ret
  21032. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  21033. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  21034. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  21035. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  21036. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req253)))
  21037. return xcb_ret
  21038. }
  21039. var _xcb_req253 = Txcb_protocol_request_t{
  21040. Fcount: uint64(2),
  21041. Fext: uintptr(unsafe.Pointer(&Xxcb_big_requests_id)),
  21042. }
  21043. func Xxcb_big_requests_enable_reply(tls *libc.TLS, c uintptr, cookie Txcb_big_requests_enable_cookie_t, e uintptr) (r uintptr) {
  21044. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  21045. }
  21046. func Xxcb_xc_misc_get_version(tls *libc.TLS, c uintptr, client_major_version Tuint16_t, client_minor_version Tuint16_t) (r Txcb_xc_misc_get_version_cookie_t) {
  21047. bp := tls.Alloc(80)
  21048. defer tls.Free(80)
  21049. var xcb_ret Txcb_xc_misc_get_version_cookie_t
  21050. var _ /* xcb_out at bp+64 */ Txcb_xc_misc_get_version_request_t
  21051. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  21052. _ = xcb_ret
  21053. (*(*Txcb_xc_misc_get_version_request_t)(unsafe.Pointer(bp + 64))).Fclient_major_version = client_major_version
  21054. (*(*Txcb_xc_misc_get_version_request_t)(unsafe.Pointer(bp + 64))).Fclient_minor_version = client_minor_version
  21055. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  21056. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  21057. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  21058. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  21059. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req254)))
  21060. return xcb_ret
  21061. }
  21062. var _xcb_req254 = Txcb_protocol_request_t{
  21063. Fcount: uint64(2),
  21064. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  21065. }
  21066. func Xxcb_xc_misc_get_version_unchecked(tls *libc.TLS, c uintptr, client_major_version Tuint16_t, client_minor_version Tuint16_t) (r Txcb_xc_misc_get_version_cookie_t) {
  21067. bp := tls.Alloc(80)
  21068. defer tls.Free(80)
  21069. var xcb_ret Txcb_xc_misc_get_version_cookie_t
  21070. var _ /* xcb_out at bp+64 */ Txcb_xc_misc_get_version_request_t
  21071. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  21072. _ = xcb_ret
  21073. (*(*Txcb_xc_misc_get_version_request_t)(unsafe.Pointer(bp + 64))).Fclient_major_version = client_major_version
  21074. (*(*Txcb_xc_misc_get_version_request_t)(unsafe.Pointer(bp + 64))).Fclient_minor_version = client_minor_version
  21075. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  21076. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  21077. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  21078. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  21079. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req255)))
  21080. return xcb_ret
  21081. }
  21082. var _xcb_req255 = Txcb_protocol_request_t{
  21083. Fcount: uint64(2),
  21084. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  21085. }
  21086. func Xxcb_xc_misc_get_version_reply(tls *libc.TLS, c uintptr, cookie Txcb_xc_misc_get_version_cookie_t, e uintptr) (r uintptr) {
  21087. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  21088. }
  21089. func Xxcb_xc_misc_get_xid_range(tls *libc.TLS, c uintptr) (r Txcb_xc_misc_get_xid_range_cookie_t) {
  21090. bp := tls.Alloc(80)
  21091. defer tls.Free(80)
  21092. var xcb_ret Txcb_xc_misc_get_xid_range_cookie_t
  21093. var _ /* xcb_out at bp+64 */ Txcb_xc_misc_get_xid_range_request_t
  21094. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  21095. _ = xcb_ret
  21096. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  21097. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  21098. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  21099. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  21100. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req256)))
  21101. return xcb_ret
  21102. }
  21103. var _xcb_req256 = Txcb_protocol_request_t{
  21104. Fcount: uint64(2),
  21105. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  21106. Fopcode: uint8(m_XCB_XC_MISC_GET_XID_RANGE),
  21107. }
  21108. func Xxcb_xc_misc_get_xid_range_unchecked(tls *libc.TLS, c uintptr) (r Txcb_xc_misc_get_xid_range_cookie_t) {
  21109. bp := tls.Alloc(80)
  21110. defer tls.Free(80)
  21111. var xcb_ret Txcb_xc_misc_get_xid_range_cookie_t
  21112. var _ /* xcb_out at bp+64 */ Txcb_xc_misc_get_xid_range_request_t
  21113. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  21114. _ = xcb_ret
  21115. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  21116. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(4)
  21117. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  21118. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  21119. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req257)))
  21120. return xcb_ret
  21121. }
  21122. var _xcb_req257 = Txcb_protocol_request_t{
  21123. Fcount: uint64(2),
  21124. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  21125. Fopcode: uint8(m_XCB_XC_MISC_GET_XID_RANGE),
  21126. }
  21127. func Xxcb_xc_misc_get_xid_range_reply(tls *libc.TLS, c uintptr, cookie Txcb_xc_misc_get_xid_range_cookie_t, e uintptr) (r uintptr) {
  21128. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  21129. }
  21130. func Xxcb_xc_misc_get_xid_list_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  21131. var _aux, xcb_tmp uintptr
  21132. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  21133. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  21134. xcb_tmp = _buffer
  21135. _aux = _buffer
  21136. xcb_buffer_len = uint32(0)
  21137. xcb_block_len = uint32(0)
  21138. xcb_pad = uint32(0)
  21139. xcb_align_to = uint32(0)
  21140. xcb_block_len = uint32(uint64(xcb_block_len) + libc.Uint64FromInt64(32))
  21141. xcb_tmp += uintptr(xcb_block_len)
  21142. xcb_buffer_len += xcb_block_len
  21143. xcb_block_len = uint32(0)
  21144. /* ids */
  21145. xcb_block_len = uint32(uint64(xcb_block_len) + uint64((*Txcb_xc_misc_get_xid_list_reply_t)(unsafe.Pointer(_aux)).Fids_len)*libc.Uint64FromInt64(4))
  21146. xcb_tmp += uintptr(xcb_block_len)
  21147. xcb_align_to = uint32(uint64(libc.UintptrFromInt32(0) + 4))
  21148. /* insert padding */
  21149. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  21150. xcb_buffer_len += xcb_block_len + xcb_pad
  21151. if uint32(0) != xcb_pad {
  21152. xcb_tmp += uintptr(xcb_pad)
  21153. xcb_pad = uint32(0)
  21154. }
  21155. xcb_block_len = uint32(0)
  21156. return libc.Int32FromUint32(xcb_buffer_len)
  21157. }
  21158. func Xxcb_xc_misc_get_xid_list(tls *libc.TLS, c uintptr, count Tuint32_t) (r Txcb_xc_misc_get_xid_list_cookie_t) {
  21159. bp := tls.Alloc(80)
  21160. defer tls.Free(80)
  21161. var xcb_ret Txcb_xc_misc_get_xid_list_cookie_t
  21162. var _ /* xcb_out at bp+64 */ Txcb_xc_misc_get_xid_list_request_t
  21163. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  21164. _ = xcb_ret
  21165. (*(*Txcb_xc_misc_get_xid_list_request_t)(unsafe.Pointer(bp + 64))).Fcount = count
  21166. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  21167. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  21168. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  21169. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  21170. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req258)))
  21171. return xcb_ret
  21172. }
  21173. var _xcb_req258 = Txcb_protocol_request_t{
  21174. Fcount: uint64(2),
  21175. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  21176. Fopcode: uint8(m_XCB_XC_MISC_GET_XID_LIST),
  21177. }
  21178. func Xxcb_xc_misc_get_xid_list_unchecked(tls *libc.TLS, c uintptr, count Tuint32_t) (r Txcb_xc_misc_get_xid_list_cookie_t) {
  21179. bp := tls.Alloc(80)
  21180. defer tls.Free(80)
  21181. var xcb_ret Txcb_xc_misc_get_xid_list_cookie_t
  21182. var _ /* xcb_out at bp+64 */ Txcb_xc_misc_get_xid_list_request_t
  21183. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  21184. _ = xcb_ret
  21185. (*(*Txcb_xc_misc_get_xid_list_request_t)(unsafe.Pointer(bp + 64))).Fcount = count
  21186. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 64
  21187. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint64(8)
  21188. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  21189. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint64(3)
  21190. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*16, uintptr(unsafe.Pointer(&_xcb_req259)))
  21191. return xcb_ret
  21192. }
  21193. var _xcb_req259 = Txcb_protocol_request_t{
  21194. Fcount: uint64(2),
  21195. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  21196. Fopcode: uint8(m_XCB_XC_MISC_GET_XID_LIST),
  21197. }
  21198. func Xxcb_xc_misc_get_xid_list_ids(tls *libc.TLS, R uintptr) (r uintptr) {
  21199. return R + libc.UintptrFromInt32(1)*32
  21200. }
  21201. func Xxcb_xc_misc_get_xid_list_ids_length(tls *libc.TLS, R uintptr) (r int32) {
  21202. return libc.Int32FromUint32((*Txcb_xc_misc_get_xid_list_reply_t)(unsafe.Pointer(R)).Fids_len)
  21203. }
  21204. func Xxcb_xc_misc_get_xid_list_ids_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  21205. var i Txcb_generic_iterator_t
  21206. _ = i
  21207. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_xc_misc_get_xid_list_reply_t)(unsafe.Pointer(R)).Fids_len)*4
  21208. i.Frem = 0
  21209. i.Findex = int32(int64(i.Fdata) - int64(R))
  21210. return i
  21211. }
  21212. func Xxcb_xc_misc_get_xid_list_reply(tls *libc.TLS, c uintptr, cookie Txcb_xc_misc_get_xid_list_cookie_t, e uintptr) (r uintptr) {
  21213. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  21214. }
  21215. func __ccgo_fp(f interface{}) uintptr {
  21216. type iface [2]uintptr
  21217. return (*iface)(unsafe.Pointer(&f))[1]
  21218. }
  21219. /**
  21220. * @}
  21221. */
  21222. var Xxcb_big_requests_id = Txcb_extension_t{
  21223. Fname: __ccgo_ts + 99,
  21224. }
  21225. /**
  21226. * @}
  21227. */
  21228. var Xxcb_xc_misc_id = Txcb_extension_t{
  21229. Fname: __ccgo_ts + 112,
  21230. }
  21231. var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data
  21232. var __ccgo_ts1 = "GLX\x00unix\x00DISPLAY\x00unix:\x00%s%d\x00tcp\x00inet\x00inet6\x00localhost\x00%hu\x00XDM-AUTHORIZATION-1\x00MIT-MAGIC-COOKIE-1\x00%d\x00BIG-REQUESTS\x00XC-MISC\x00"