ccgo_linux_386.go 827 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228
  1. // Code generated for linux/386 by 'generator --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-macro=m_ --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -extended-errors -ignore-unsupported-alignment -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libXau/include/linux/386 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libXdmcp/include/linux/386 -lXau -lXdmcp -o libxcb.go --package-name libxcb src/.libs/libxcb.a', DO NOT EDIT.
  2. //go:build linux && 386
  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_ALG = "PF_ALG"
  14. const m_AF_APPLETALK = "PF_APPLETALK"
  15. const m_AF_ASH = "PF_ASH"
  16. const m_AF_ATMPVC = "PF_ATMPVC"
  17. const m_AF_ATMSVC = "PF_ATMSVC"
  18. const m_AF_AX25 = "PF_AX25"
  19. const m_AF_BLUETOOTH = "PF_BLUETOOTH"
  20. const m_AF_BRIDGE = "PF_BRIDGE"
  21. const m_AF_CAIF = "PF_CAIF"
  22. const m_AF_CAN = "PF_CAN"
  23. const m_AF_DECnet = "PF_DECnet"
  24. const m_AF_ECONET = "PF_ECONET"
  25. const m_AF_FILE = "AF_LOCAL"
  26. const m_AF_IB = "PF_IB"
  27. const m_AF_IEEE802154 = "PF_IEEE802154"
  28. const m_AF_INET = "PF_INET"
  29. const m_AF_INET6 = "PF_INET6"
  30. const m_AF_IPX = "PF_IPX"
  31. const m_AF_IRDA = "PF_IRDA"
  32. const m_AF_ISDN = "PF_ISDN"
  33. const m_AF_IUCV = "PF_IUCV"
  34. const m_AF_KCM = "PF_KCM"
  35. const m_AF_KEY = "PF_KEY"
  36. const m_AF_LLC = "PF_LLC"
  37. const m_AF_LOCAL = "PF_LOCAL"
  38. const m_AF_MAX = "PF_MAX"
  39. const m_AF_MPLS = "PF_MPLS"
  40. const m_AF_NETBEUI = "PF_NETBEUI"
  41. const m_AF_NETLINK = "PF_NETLINK"
  42. const m_AF_NETROM = "PF_NETROM"
  43. const m_AF_NFC = "PF_NFC"
  44. const m_AF_PACKET = "PF_PACKET"
  45. const m_AF_PHONET = "PF_PHONET"
  46. const m_AF_PPPOX = "PF_PPPOX"
  47. const m_AF_QIPCRTR = "PF_QIPCRTR"
  48. const m_AF_RDS = "PF_RDS"
  49. const m_AF_ROSE = "PF_ROSE"
  50. const m_AF_ROUTE = "PF_ROUTE"
  51. const m_AF_RXRPC = "PF_RXRPC"
  52. const m_AF_SECURITY = "PF_SECURITY"
  53. const m_AF_SMC = "PF_SMC"
  54. const m_AF_SNA = "PF_SNA"
  55. const m_AF_TIPC = "PF_TIPC"
  56. const m_AF_UNIX = "AF_LOCAL"
  57. const m_AF_UNSPEC = "PF_UNSPEC"
  58. const m_AF_VSOCK = "PF_VSOCK"
  59. const m_AF_WANPIPE = "PF_WANPIPE"
  60. const m_AF_X25 = "PF_X25"
  61. const m_AF_XDP = "PF_XDP"
  62. const m_ARG_MAX = 131072
  63. const m_AT_EACCESS = 0x200
  64. const m_AT_EMPTY_PATH = 0x1000
  65. const m_AT_NO_AUTOMOUNT = 0x800
  66. const m_AT_RECURSIVE = 0x8000
  67. const m_AT_REMOVEDIR = 0x200
  68. const m_AT_STATX_DONT_SYNC = 0x4000
  69. const m_AT_STATX_FORCE_SYNC = 0x2000
  70. const m_AT_STATX_SYNC_AS_STAT = 0x0000
  71. const m_AT_STATX_SYNC_TYPE = 0x6000
  72. const m_AT_SYMLINK_FOLLOW = 0x400
  73. const m_AT_SYMLINK_NOFOLLOW = 0x100
  74. const m_BC_BASE_MAX = 99
  75. const m_BC_DIM_MAX = 2048
  76. const m_BC_SCALE_MAX = 99
  77. const m_BC_STRING_MAX = 1000
  78. const m_BIG_ENDIAN = "__BIG_ENDIAN"
  79. const m_BUFSIZ = 1024
  80. const m_BYTE_ORDER = "__BYTE_ORDER"
  81. const m_CHARCLASS_NAME_MAX = 14
  82. const m_CHAR_BIT = 8
  83. const m_CHAR_MAX = 255
  84. const m_CHAR_MIN = 0
  85. const m_CLOCKS_PER_SEC = 1000000
  86. const m_CLOCK_BOOTTIME = 7
  87. const m_CLOCK_BOOTTIME_ALARM = 9
  88. const m_CLOCK_MONOTONIC = 1
  89. const m_CLOCK_MONOTONIC_COARSE = 6
  90. const m_CLOCK_MONOTONIC_RAW = 4
  91. const m_CLOCK_PROCESS_CPUTIME_ID = 2
  92. const m_CLOCK_REALTIME = 0
  93. const m_CLOCK_REALTIME_ALARM = 8
  94. const m_CLOCK_REALTIME_COARSE = 5
  95. const m_CLOCK_SGI_CYCLE = 10
  96. const m_CLOCK_TAI = 11
  97. const m_CLOCK_THREAD_CPUTIME_ID = 3
  98. const m_CLONE_CHILD_CLEARTID = 0x00200000
  99. const m_CLONE_CHILD_SETTID = 0x01000000
  100. const m_CLONE_DETACHED = 0x00400000
  101. const m_CLONE_FILES = 0x00000400
  102. const m_CLONE_FS = 0x00000200
  103. const m_CLONE_IO = 0x80000000
  104. const m_CLONE_NEWCGROUP = 0x02000000
  105. const m_CLONE_NEWIPC = 0x08000000
  106. const m_CLONE_NEWNET = 0x40000000
  107. const m_CLONE_NEWNS = 0x00020000
  108. const m_CLONE_NEWPID = 0x20000000
  109. const m_CLONE_NEWTIME = 0x00000080
  110. const m_CLONE_NEWUSER = 0x10000000
  111. const m_CLONE_NEWUTS = 0x04000000
  112. const m_CLONE_PARENT = 0x00008000
  113. const m_CLONE_PARENT_SETTID = 0x00100000
  114. const m_CLONE_PIDFD = 0x00001000
  115. const m_CLONE_PTRACE = 0x00002000
  116. const m_CLONE_SETTLS = 0x00080000
  117. const m_CLONE_SIGHAND = 0x00000800
  118. const m_CLONE_SYSVSEM = 0x00040000
  119. const m_CLONE_THREAD = 0x00010000
  120. const m_CLONE_UNTRACED = 0x00800000
  121. const m_CLONE_VFORK = 0x00004000
  122. const m_CLONE_VM = 0x00000100
  123. const m_COLL_WEIGHTS_MAX = 2
  124. const m_CPU_SETSIZE = 1024
  125. const m_CSIGNAL = 0x000000ff
  126. const m_DELAYTIMER_MAX = 0x7fffffff
  127. const m_DN_ACCESS = 0x00000001
  128. const m_DN_ATTRIB = 0x00000020
  129. const m_DN_CREATE = 0x00000004
  130. const m_DN_DELETE = 0x00000008
  131. const m_DN_MODIFY = 0x00000002
  132. const m_DN_MULTISHOT = 0x80000000
  133. const m_DN_RENAME = 0x00000010
  134. const m_E2BIG = 7
  135. const m_EACCES = 13
  136. const m_EADDRINUSE = 98
  137. const m_EADDRNOTAVAIL = 99
  138. const m_EADV = 68
  139. const m_EAFNOSUPPORT = 97
  140. const m_EAGAIN = 11
  141. const m_EALREADY = 114
  142. const m_EBADE = 52
  143. const m_EBADF = 9
  144. const m_EBADFD = 77
  145. const m_EBADMSG = 74
  146. const m_EBADR = 53
  147. const m_EBADRQC = 56
  148. const m_EBADSLT = 57
  149. const m_EBFONT = 59
  150. const m_EBUSY = 16
  151. const m_ECANCELED = 125
  152. const m_ECHILD = 10
  153. const m_ECHRNG = 44
  154. const m_ECOMM = 70
  155. const m_ECONNABORTED = 103
  156. const m_ECONNREFUSED = 111
  157. const m_ECONNRESET = 104
  158. const m_EDEADLK = 35
  159. const m_EDEADLOCK = "EDEADLK"
  160. const m_EDESTADDRREQ = 89
  161. const m_EDOM = 33
  162. const m_EDOTDOT = 73
  163. const m_EDQUOT = 122
  164. const m_EEXIST = 17
  165. const m_EFAULT = 14
  166. const m_EFBIG = 27
  167. const m_EHOSTDOWN = 112
  168. const m_EHOSTUNREACH = 113
  169. const m_EHWPOISON = 133
  170. const m_EIDRM = 43
  171. const m_EILSEQ = 84
  172. const m_EINPROGRESS = 115
  173. const m_EINTR = 4
  174. const m_EINVAL = 22
  175. const m_EIO = 5
  176. const m_EISCONN = 106
  177. const m_EISDIR = 21
  178. const m_EISNAM = 120
  179. const m_EKEYEXPIRED = 127
  180. const m_EKEYREJECTED = 129
  181. const m_EKEYREVOKED = 128
  182. const m_EL2HLT = 51
  183. const m_EL2NSYNC = 45
  184. const m_EL3HLT = 46
  185. const m_EL3RST = 47
  186. const m_ELIBACC = 79
  187. const m_ELIBBAD = 80
  188. const m_ELIBEXEC = 83
  189. const m_ELIBMAX = 82
  190. const m_ELIBSCN = 81
  191. const m_ELNRNG = 48
  192. const m_ELOOP = 40
  193. const m_EMEDIUMTYPE = 124
  194. const m_EMFILE = 24
  195. const m_EMLINK = 31
  196. const m_EMSGSIZE = 90
  197. const m_EMULTIHOP = 72
  198. const m_ENAMETOOLONG = 36
  199. const m_ENAVAIL = 119
  200. const m_ENETDOWN = 100
  201. const m_ENETRESET = 102
  202. const m_ENETUNREACH = 101
  203. const m_ENFILE = 23
  204. const m_ENOANO = 55
  205. const m_ENOBUFS = 105
  206. const m_ENOCSI = 50
  207. const m_ENODATA = 61
  208. const m_ENODEV = 19
  209. const m_ENOENT = 2
  210. const m_ENOEXEC = 8
  211. const m_ENOKEY = 126
  212. const m_ENOLCK = 37
  213. const m_ENOLINK = 67
  214. const m_ENOMEDIUM = 123
  215. const m_ENOMEM = 12
  216. const m_ENOMSG = 42
  217. const m_ENONET = 64
  218. const m_ENOPKG = 65
  219. const m_ENOPROTOOPT = 92
  220. const m_ENOSPC = 28
  221. const m_ENOSR = 63
  222. const m_ENOSTR = 60
  223. const m_ENOSYS = 38
  224. const m_ENOTBLK = 15
  225. const m_ENOTCONN = 107
  226. const m_ENOTDIR = 20
  227. const m_ENOTEMPTY = 39
  228. const m_ENOTNAM = 118
  229. const m_ENOTRECOVERABLE = 131
  230. const m_ENOTSOCK = 88
  231. const m_ENOTSUP = "EOPNOTSUPP"
  232. const m_ENOTTY = 25
  233. const m_ENOTUNIQ = 76
  234. const m_ENXIO = 6
  235. const m_EOPNOTSUPP = 95
  236. const m_EOVERFLOW = 75
  237. const m_EOWNERDEAD = 130
  238. const m_EPERM = 1
  239. const m_EPFNOSUPPORT = 96
  240. const m_EPIPE = 32
  241. const m_EPROTO = 71
  242. const m_EPROTONOSUPPORT = 93
  243. const m_EPROTOTYPE = 91
  244. const m_ERANGE = 34
  245. const m_EREMCHG = 78
  246. const m_EREMOTE = 66
  247. const m_EREMOTEIO = 121
  248. const m_ERESTART = 85
  249. const m_ERFKILL = 132
  250. const m_EROFS = 30
  251. const m_ESHUTDOWN = 108
  252. const m_ESOCKTNOSUPPORT = 94
  253. const m_ESPIPE = 29
  254. const m_ESRCH = 3
  255. const m_ESRMNT = 69
  256. const m_ESTALE = 116
  257. const m_ESTRPIPE = 86
  258. const m_ETIME = 62
  259. const m_ETIMEDOUT = 110
  260. const m_ETOOMANYREFS = 109
  261. const m_ETXTBSY = 26
  262. const m_EUCLEAN = 117
  263. const m_EUNATCH = 49
  264. const m_EUSERS = 87
  265. const m_EWOULDBLOCK = "EAGAIN"
  266. const m_EXDEV = 18
  267. const m_EXFULL = 54
  268. const m_EXIT_FAILURE = 1
  269. const m_EXIT_SUCCESS = 0
  270. const m_EXPR_NEST_MAX = 32
  271. const m_FALLOC_FL_KEEP_SIZE = 1
  272. const m_FALLOC_FL_PUNCH_HOLE = 2
  273. const m_FAPPEND = "O_APPEND"
  274. const m_FASYNC = "O_ASYNC"
  275. const m_FD_CLOEXEC = 1
  276. const m_FD_SETSIZE = 1024
  277. const m_FFSYNC = "O_SYNC"
  278. const m_FILENAME_MAX = 4096
  279. const m_FILESIZEBITS = 64
  280. const m_FNDELAY = "O_NDELAY"
  281. const m_FNONBLOCK = "O_NONBLOCK"
  282. const m_FOPEN_MAX = 1000
  283. const m_F_ADD_SEALS = 1033
  284. const m_F_CANCELLK = 1029
  285. const m_F_DUPFD = 0
  286. const m_F_DUPFD_CLOEXEC = 1030
  287. const m_F_GETFD = 1
  288. const m_F_GETFL = 3
  289. const m_F_GETLEASE = 1025
  290. const m_F_GETLK = 12
  291. const m_F_GETOWN = 9
  292. const m_F_GETOWNER_UIDS = 17
  293. const m_F_GETOWN_EX = 16
  294. const m_F_GETPIPE_SZ = 1032
  295. const m_F_GETSIG = 11
  296. const m_F_GET_FILE_RW_HINT = 1037
  297. const m_F_GET_RW_HINT = 1035
  298. const m_F_GET_SEALS = 1034
  299. const m_F_LOCK = 1
  300. const m_F_NOTIFY = 1026
  301. const m_F_OFD_GETLK = 36
  302. const m_F_OFD_SETLK = 37
  303. const m_F_OFD_SETLKW = 38
  304. const m_F_OK = 0
  305. const m_F_OWNER_GID = 2
  306. const m_F_OWNER_PGRP = 2
  307. const m_F_OWNER_PID = 1
  308. const m_F_OWNER_TID = 0
  309. const m_F_RDLCK = 0
  310. const m_F_SEAL_FUTURE_WRITE = 0x0010
  311. const m_F_SEAL_GROW = 0x0004
  312. const m_F_SEAL_SEAL = 0x0001
  313. const m_F_SEAL_SHRINK = 0x0002
  314. const m_F_SEAL_WRITE = 0x0008
  315. const m_F_SETFD = 2
  316. const m_F_SETFL = 4
  317. const m_F_SETLEASE = 1024
  318. const m_F_SETLK = 13
  319. const m_F_SETLKW = 14
  320. const m_F_SETOWN = 8
  321. const m_F_SETOWN_EX = 15
  322. const m_F_SETPIPE_SZ = 1031
  323. const m_F_SETSIG = 10
  324. const m_F_SET_FILE_RW_HINT = 1038
  325. const m_F_SET_RW_HINT = 1036
  326. const m_F_TEST = 3
  327. const m_F_TLOCK = 2
  328. const m_F_ULOCK = 0
  329. const m_F_UNLCK = 2
  330. const m_F_WRLCK = 1
  331. const m_HASXDMAUTH = 1
  332. const m_HAVE_ABSTRACT_SOCKETS = 1
  333. const m_HAVE_CONFIG_H = 1
  334. const m_HAVE_DLFCN_H = 1
  335. const m_HAVE_GETADDRINFO = 1
  336. const m_HAVE_INTTYPES_H = 1
  337. const m_HAVE_SENDMSG = 1
  338. const m_HAVE_STDINT_H = 1
  339. const m_HAVE_STDIO_H = 1
  340. const m_HAVE_STDLIB_H = 1
  341. const m_HAVE_STRINGS_H = 1
  342. const m_HAVE_STRING_H = 1
  343. const m_HAVE_SYS_STAT_H = 1
  344. const m_HAVE_SYS_TYPES_H = 1
  345. const m_HAVE_UNISTD_H = 1
  346. const m_HAVE_WCHAR_H = 1
  347. const m_HOST_NAME_MAX = 255
  348. const m_INET6_ADDRSTRLEN = 46
  349. const m_INET_ADDRSTRLEN = 16
  350. const m_INT16_MAX = 0x7fff
  351. const m_INT32_MAX = 0x7fffffff
  352. const m_INT64_MAX = 0x7fffffffffffffff
  353. const m_INT8_MAX = 0x7f
  354. const m_INTMAX_MAX = "INT64_MAX"
  355. const m_INTMAX_MIN = "INT64_MIN"
  356. const m_INTPTR_MAX = "INT32_MAX"
  357. const m_INTPTR_MIN = "INT32_MIN"
  358. const m_INT_FAST16_MAX = "INT32_MAX"
  359. const m_INT_FAST16_MIN = "INT32_MIN"
  360. const m_INT_FAST32_MAX = "INT32_MAX"
  361. const m_INT_FAST32_MIN = "INT32_MIN"
  362. const m_INT_FAST64_MAX = "INT64_MAX"
  363. const m_INT_FAST64_MIN = "INT64_MIN"
  364. const m_INT_FAST8_MAX = "INT8_MAX"
  365. const m_INT_FAST8_MIN = "INT8_MIN"
  366. const m_INT_LEAST16_MAX = "INT16_MAX"
  367. const m_INT_LEAST16_MIN = "INT16_MIN"
  368. const m_INT_LEAST32_MAX = "INT32_MAX"
  369. const m_INT_LEAST32_MIN = "INT32_MIN"
  370. const m_INT_LEAST64_MAX = "INT64_MAX"
  371. const m_INT_LEAST64_MIN = "INT64_MIN"
  372. const m_INT_LEAST8_MAX = "INT8_MAX"
  373. const m_INT_LEAST8_MIN = "INT8_MIN"
  374. const m_INT_MAX = 0x7fffffff
  375. const m_IN_CLASSA_MAX = 128
  376. const m_IN_CLASSA_NET = 0xff000000
  377. const m_IN_CLASSA_NSHIFT = 24
  378. const m_IN_CLASSB_MAX = 65536
  379. const m_IN_CLASSB_NET = 0xffff0000
  380. const m_IN_CLASSB_NSHIFT = 16
  381. const m_IN_CLASSC_NET = 0xffffff00
  382. const m_IN_CLASSC_NSHIFT = 8
  383. const m_IN_LOOPBACKNET = 127
  384. const m_IOV_MAX = 1024
  385. const m_IPPORT_RESERVED = 1024
  386. const m_IPPROTO_AH = 51
  387. const m_IPPROTO_BEETPH = 94
  388. const m_IPPROTO_COMP = 108
  389. const m_IPPROTO_DCCP = 33
  390. const m_IPPROTO_DSTOPTS = 60
  391. const m_IPPROTO_EGP = 8
  392. const m_IPPROTO_ENCAP = 98
  393. const m_IPPROTO_ESP = 50
  394. const m_IPPROTO_ETHERNET = 143
  395. const m_IPPROTO_FRAGMENT = 44
  396. const m_IPPROTO_GRE = 47
  397. const m_IPPROTO_HOPOPTS = 0
  398. const m_IPPROTO_ICMP = 1
  399. const m_IPPROTO_ICMPV6 = 58
  400. const m_IPPROTO_IDP = 22
  401. const m_IPPROTO_IGMP = 2
  402. const m_IPPROTO_IP = 0
  403. const m_IPPROTO_IPIP = 4
  404. const m_IPPROTO_IPV6 = 41
  405. const m_IPPROTO_MAX = 263
  406. const m_IPPROTO_MH = 135
  407. const m_IPPROTO_MPLS = 137
  408. const m_IPPROTO_MPTCP = 262
  409. const m_IPPROTO_MTP = 92
  410. const m_IPPROTO_NONE = 59
  411. const m_IPPROTO_PIM = 103
  412. const m_IPPROTO_PUP = 12
  413. const m_IPPROTO_RAW = 255
  414. const m_IPPROTO_ROUTING = 43
  415. const m_IPPROTO_RSVP = 46
  416. const m_IPPROTO_SCTP = 132
  417. const m_IPPROTO_TCP = 6
  418. const m_IPPROTO_TP = 29
  419. const m_IPPROTO_UDP = 17
  420. const m_IPPROTO_UDPLITE = 136
  421. const m_IPV6_2292DSTOPTS = 4
  422. const m_IPV6_2292HOPLIMIT = 8
  423. const m_IPV6_2292HOPOPTS = 3
  424. const m_IPV6_2292PKTINFO = 2
  425. const m_IPV6_2292PKTOPTIONS = 6
  426. const m_IPV6_2292RTHDR = 5
  427. const m_IPV6_ADDRFORM = 1
  428. const m_IPV6_ADDR_PREFERENCES = 72
  429. const m_IPV6_ADD_MEMBERSHIP = "IPV6_JOIN_GROUP"
  430. const m_IPV6_AUTHHDR = 10
  431. const m_IPV6_AUTOFLOWLABEL = 70
  432. const m_IPV6_CHECKSUM = 7
  433. const m_IPV6_DONTFRAG = 62
  434. const m_IPV6_DROP_MEMBERSHIP = "IPV6_LEAVE_GROUP"
  435. const m_IPV6_DSTOPTS = 59
  436. const m_IPV6_FREEBIND = 78
  437. const m_IPV6_HDRINCL = 36
  438. const m_IPV6_HOPLIMIT = 52
  439. const m_IPV6_HOPOPTS = 54
  440. const m_IPV6_IPSEC_POLICY = 34
  441. const m_IPV6_JOIN_ANYCAST = 27
  442. const m_IPV6_JOIN_GROUP = 20
  443. const m_IPV6_LEAVE_ANYCAST = 28
  444. const m_IPV6_LEAVE_GROUP = 21
  445. const m_IPV6_MINHOPCOUNT = 73
  446. const m_IPV6_MTU = 24
  447. const m_IPV6_MTU_DISCOVER = 23
  448. const m_IPV6_MULTICAST_ALL = 29
  449. const m_IPV6_MULTICAST_HOPS = 18
  450. const m_IPV6_MULTICAST_IF = 17
  451. const m_IPV6_MULTICAST_LOOP = 19
  452. const m_IPV6_NEXTHOP = 9
  453. const m_IPV6_ORIGDSTADDR = 74
  454. const m_IPV6_PATHMTU = 61
  455. const m_IPV6_PKTINFO = 50
  456. const m_IPV6_PMTUDISC_DO = 2
  457. const m_IPV6_PMTUDISC_DONT = 0
  458. const m_IPV6_PMTUDISC_INTERFACE = 4
  459. const m_IPV6_PMTUDISC_OMIT = 5
  460. const m_IPV6_PMTUDISC_PROBE = 3
  461. const m_IPV6_PMTUDISC_WANT = 1
  462. const m_IPV6_PREFER_SRC_CGA = 0x0008
  463. const m_IPV6_PREFER_SRC_COA = 0x0004
  464. const m_IPV6_PREFER_SRC_HOME = 0x0400
  465. const m_IPV6_PREFER_SRC_NONCGA = 0x0800
  466. const m_IPV6_PREFER_SRC_PUBLIC = 0x0002
  467. const m_IPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x0100
  468. const m_IPV6_PREFER_SRC_TMP = 0x0001
  469. const m_IPV6_RECVDSTOPTS = 58
  470. const m_IPV6_RECVERR = 25
  471. const m_IPV6_RECVFRAGSIZE = 77
  472. const m_IPV6_RECVHOPLIMIT = 51
  473. const m_IPV6_RECVHOPOPTS = 53
  474. const m_IPV6_RECVORIGDSTADDR = "IPV6_ORIGDSTADDR"
  475. const m_IPV6_RECVPATHMTU = 60
  476. const m_IPV6_RECVPKTINFO = 49
  477. const m_IPV6_RECVRTHDR = 56
  478. const m_IPV6_RECVTCLASS = 66
  479. const m_IPV6_ROUTER_ALERT = 22
  480. const m_IPV6_ROUTER_ALERT_ISOLATE = 30
  481. const m_IPV6_RTHDR = 57
  482. const m_IPV6_RTHDRDSTOPTS = 55
  483. const m_IPV6_RTHDR_LOOSE = 0
  484. const m_IPV6_RTHDR_STRICT = 1
  485. const m_IPV6_RTHDR_TYPE_0 = 0
  486. const m_IPV6_RXDSTOPTS = "IPV6_DSTOPTS"
  487. const m_IPV6_RXHOPOPTS = "IPV6_HOPOPTS"
  488. const m_IPV6_TCLASS = 67
  489. const m_IPV6_TRANSPARENT = 75
  490. const m_IPV6_UNICAST_HOPS = 16
  491. const m_IPV6_UNICAST_IF = 76
  492. const m_IPV6_V6ONLY = 26
  493. const m_IPV6_XFRM_POLICY = 35
  494. const m_IP_ADD_MEMBERSHIP = 35
  495. const m_IP_ADD_SOURCE_MEMBERSHIP = 39
  496. const m_IP_BIND_ADDRESS_NO_PORT = 24
  497. const m_IP_BLOCK_SOURCE = 38
  498. const m_IP_CHECKSUM = 23
  499. const m_IP_DEFAULT_MULTICAST_LOOP = 1
  500. const m_IP_DEFAULT_MULTICAST_TTL = 1
  501. const m_IP_DROP_MEMBERSHIP = 36
  502. const m_IP_DROP_SOURCE_MEMBERSHIP = 40
  503. const m_IP_FREEBIND = 15
  504. const m_IP_HDRINCL = 3
  505. const m_IP_IPSEC_POLICY = 16
  506. const m_IP_MAX_MEMBERSHIPS = 20
  507. const m_IP_MINTTL = 21
  508. const m_IP_MSFILTER = 41
  509. const m_IP_MTU = 14
  510. const m_IP_MTU_DISCOVER = 10
  511. const m_IP_MULTICAST_ALL = 49
  512. const m_IP_MULTICAST_IF = 32
  513. const m_IP_MULTICAST_LOOP = 34
  514. const m_IP_MULTICAST_TTL = 33
  515. const m_IP_NODEFRAG = 22
  516. const m_IP_OPTIONS = 4
  517. const m_IP_ORIGDSTADDR = 20
  518. const m_IP_PASSSEC = 18
  519. const m_IP_PKTINFO = 8
  520. const m_IP_PKTOPTIONS = 9
  521. const m_IP_PMTUDISC = 10
  522. const m_IP_PMTUDISC_DO = 2
  523. const m_IP_PMTUDISC_DONT = 0
  524. const m_IP_PMTUDISC_INTERFACE = 4
  525. const m_IP_PMTUDISC_OMIT = 5
  526. const m_IP_PMTUDISC_PROBE = 3
  527. const m_IP_PMTUDISC_WANT = 1
  528. const m_IP_RECVERR = 11
  529. const m_IP_RECVERR_RFC4884 = 26
  530. const m_IP_RECVFRAGSIZE = 25
  531. const m_IP_RECVOPTS = 6
  532. const m_IP_RECVORIGDSTADDR = "IP_ORIGDSTADDR"
  533. const m_IP_RECVRETOPTS = "IP_RETOPTS"
  534. const m_IP_RECVTOS = 13
  535. const m_IP_RECVTTL = 12
  536. const m_IP_RETOPTS = 7
  537. const m_IP_ROUTER_ALERT = 5
  538. const m_IP_TOS = 1
  539. const m_IP_TRANSPARENT = 19
  540. const m_IP_TTL = 2
  541. const m_IP_UNBLOCK_SOURCE = 37
  542. const m_IP_UNICAST_IF = 50
  543. const m_IP_XFRM_POLICY = 17
  544. const m_LINE_MAX = 4096
  545. const m_LITTLE_ENDIAN = "__LITTLE_ENDIAN"
  546. const m_LLONG_MAX = 0x7fffffffffffffff
  547. const m_LOGIN_NAME_MAX = 256
  548. const m_LONG_BIT = 32
  549. const m_LONG_MAX = "__LONG_MAX"
  550. const m_LT_OBJDIR = ".libs/"
  551. const m_L_INCR = 1
  552. const m_L_SET = 0
  553. const m_L_XTND = 2
  554. const m_L_ctermid = 20
  555. const m_L_cuserid = 20
  556. const m_L_tmpnam = 20
  557. const m_MAX_HANDLE_SZ = 128
  558. const m_MB_LEN_MAX = 4
  559. const m_MCAST_BLOCK_SOURCE = 43
  560. const m_MCAST_EXCLUDE = 0
  561. const m_MCAST_INCLUDE = 1
  562. const m_MCAST_JOIN_GROUP = 42
  563. const m_MCAST_JOIN_SOURCE_GROUP = 46
  564. const m_MCAST_LEAVE_GROUP = 45
  565. const m_MCAST_LEAVE_SOURCE_GROUP = 47
  566. const m_MCAST_MSFILTER = 48
  567. const m_MCAST_UNBLOCK_SOURCE = 44
  568. const m_MQ_PRIO_MAX = 32768
  569. const m_MSG_BATCH = 0x40000
  570. const m_MSG_CMSG_CLOEXEC = 0x40000000
  571. const m_MSG_CONFIRM = 0x0800
  572. const m_MSG_CTRUNC = 0x0008
  573. const m_MSG_DONTROUTE = 0x0004
  574. const m_MSG_DONTWAIT = 0x0040
  575. const m_MSG_EOR = 0x0080
  576. const m_MSG_ERRQUEUE = 0x2000
  577. const m_MSG_FASTOPEN = 0x20000000
  578. const m_MSG_FIN = 0x0200
  579. const m_MSG_MORE = 0x8000
  580. const m_MSG_NOSIGNAL = 0x4000
  581. const m_MSG_OOB = 0x0001
  582. const m_MSG_PEEK = 0x0002
  583. const m_MSG_PROXY = 0x0010
  584. const m_MSG_RST = 0x1000
  585. const m_MSG_SYN = 0x0400
  586. const m_MSG_TRUNC = 0x0020
  587. const m_MSG_WAITALL = 0x0100
  588. const m_MSG_WAITFORONE = 0x10000
  589. const m_MSG_ZEROCOPY = 0x4000000
  590. const m_NAME_MAX = 255
  591. const m_NDEBUG = 1
  592. const m_NGROUPS_MAX = 32
  593. const m_NL_ARGMAX = 9
  594. const m_NL_LANGMAX = 32
  595. const m_NL_MSGMAX = 32767
  596. const m_NL_NMAX = 16
  597. const m_NL_SETMAX = 255
  598. const m_NL_TEXTMAX = 2048
  599. const m_NZERO = 20
  600. const m_O_APPEND = 02000
  601. const m_O_ASYNC = 020000
  602. const m_O_CLOEXEC = 02000000
  603. const m_O_CREAT = 0100
  604. const m_O_DIRECT = 040000
  605. const m_O_DIRECTORY = 0200000
  606. const m_O_DSYNC = 010000
  607. const m_O_EXCL = 0200
  608. const m_O_EXEC = "O_PATH"
  609. const m_O_LARGEFILE = 0100000
  610. const m_O_NDELAY = "O_NONBLOCK"
  611. const m_O_NOATIME = 01000000
  612. const m_O_NOCTTY = 0400
  613. const m_O_NOFOLLOW = 0400000
  614. const m_O_NONBLOCK = 2048
  615. const m_O_PATH = 010000000
  616. const m_O_RDONLY = 00
  617. const m_O_RDWR = 02
  618. const m_O_RSYNC = 04010000
  619. const m_O_SEARCH = "O_PATH"
  620. const m_O_SYNC = 04010000
  621. const m_O_TMPFILE = 020200000
  622. const m_O_TRUNC = 01000
  623. const m_O_TTY_INIT = 0
  624. const m_O_WRONLY = 01
  625. const m_PACKAGE = "libxcb"
  626. const m_PACKAGE_BUGREPORT = "https://gitlab.freedesktop.org/xorg/lib/libxcb/issues"
  627. const m_PACKAGE_NAME = "libxcb"
  628. const m_PACKAGE_STRING = "libxcb 1.15"
  629. const m_PACKAGE_TARNAME = "libxcb"
  630. const m_PACKAGE_URL = ""
  631. const m_PACKAGE_VERSION = "1.15"
  632. const m_PACKAGE_VERSION_MAJOR = 1
  633. const m_PACKAGE_VERSION_MINOR = 15
  634. const m_PACKAGE_VERSION_PATCHLEVEL = 0
  635. const m_PAGESIZE = 4096
  636. const m_PAGE_SIZE = "PAGESIZE"
  637. const m_PATH_MAX = 4096
  638. const m_PDP_ENDIAN = "__PDP_ENDIAN"
  639. const m_PF_ALG = 38
  640. const m_PF_APPLETALK = 5
  641. const m_PF_ASH = 18
  642. const m_PF_ATMPVC = 8
  643. const m_PF_ATMSVC = 20
  644. const m_PF_AX25 = 3
  645. const m_PF_BLUETOOTH = 31
  646. const m_PF_BRIDGE = 7
  647. const m_PF_CAIF = 37
  648. const m_PF_CAN = 29
  649. const m_PF_DECnet = 12
  650. const m_PF_ECONET = 19
  651. const m_PF_FILE = "PF_LOCAL"
  652. const m_PF_IB = 27
  653. const m_PF_IEEE802154 = 36
  654. const m_PF_INET = 2
  655. const m_PF_INET6 = 10
  656. const m_PF_IPX = 4
  657. const m_PF_IRDA = 23
  658. const m_PF_ISDN = 34
  659. const m_PF_IUCV = 32
  660. const m_PF_KCM = 41
  661. const m_PF_KEY = 15
  662. const m_PF_LLC = 26
  663. const m_PF_LOCAL = 1
  664. const m_PF_MAX = 45
  665. const m_PF_MPLS = 28
  666. const m_PF_NETBEUI = 13
  667. const m_PF_NETLINK = 16
  668. const m_PF_NETROM = 6
  669. const m_PF_NFC = 39
  670. const m_PF_PACKET = 17
  671. const m_PF_PHONET = 35
  672. const m_PF_PPPOX = 24
  673. const m_PF_QIPCRTR = 42
  674. const m_PF_RDS = 21
  675. const m_PF_ROSE = 11
  676. const m_PF_ROUTE = "PF_NETLINK"
  677. const m_PF_RXRPC = 33
  678. const m_PF_SECURITY = 14
  679. const m_PF_SMC = 43
  680. const m_PF_SNA = 22
  681. const m_PF_TIPC = 30
  682. const m_PF_UNIX = "PF_LOCAL"
  683. const m_PF_UNSPEC = 0
  684. const m_PF_VSOCK = 40
  685. const m_PF_WANPIPE = 25
  686. const m_PF_X25 = 9
  687. const m_PF_XDP = 44
  688. const m_PIPE_BUF = 4096
  689. const m_POLLERR = 0x008
  690. const m_POLLHUP = 0x010
  691. const m_POLLIN = 1
  692. const m_POLLMSG = 0x400
  693. const m_POLLNVAL = 0x020
  694. const m_POLLOUT = 4
  695. const m_POLLPRI = 0x002
  696. const m_POLLRDBAND = 0x080
  697. const m_POLLRDHUP = 0x2000
  698. const m_POLLRDNORM = 0x040
  699. const m_POLLWRBAND = 0x200
  700. const m_POLLWRNORM = 0x100
  701. const m_POSIX_CLOSE_RESTART = 0
  702. const m_POSIX_FADV_DONTNEED = 4
  703. const m_POSIX_FADV_NOREUSE = 5
  704. const m_POSIX_FADV_NORMAL = 0
  705. const m_POSIX_FADV_RANDOM = 1
  706. const m_POSIX_FADV_SEQUENTIAL = 2
  707. const m_POSIX_FADV_WILLNEED = 3
  708. const m_PRIX16 = "X"
  709. const m_PRIX32 = "X"
  710. const m_PRIX8 = "X"
  711. const m_PRIXFAST16 = "X"
  712. const m_PRIXFAST32 = "X"
  713. const m_PRIXFAST8 = "X"
  714. const m_PRIXLEAST16 = "X"
  715. const m_PRIXLEAST32 = "X"
  716. const m_PRIXLEAST8 = "X"
  717. const m_PRId16 = "d"
  718. const m_PRId32 = "d"
  719. const m_PRId8 = "d"
  720. const m_PRIdFAST16 = "d"
  721. const m_PRIdFAST32 = "d"
  722. const m_PRIdFAST8 = "d"
  723. const m_PRIdLEAST16 = "d"
  724. const m_PRIdLEAST32 = "d"
  725. const m_PRIdLEAST8 = "d"
  726. const m_PRIi16 = "i"
  727. const m_PRIi32 = "i"
  728. const m_PRIi8 = "i"
  729. const m_PRIiFAST16 = "i"
  730. const m_PRIiFAST32 = "i"
  731. const m_PRIiFAST8 = "i"
  732. const m_PRIiLEAST16 = "i"
  733. const m_PRIiLEAST32 = "i"
  734. const m_PRIiLEAST8 = "i"
  735. const m_PRIo16 = "o"
  736. const m_PRIo32 = "o"
  737. const m_PRIo8 = "o"
  738. const m_PRIoFAST16 = "o"
  739. const m_PRIoFAST32 = "o"
  740. const m_PRIoFAST8 = "o"
  741. const m_PRIoLEAST16 = "o"
  742. const m_PRIoLEAST32 = "o"
  743. const m_PRIoLEAST8 = "o"
  744. const m_PRIu16 = "u"
  745. const m_PRIu32 = "u"
  746. const m_PRIu8 = "u"
  747. const m_PRIuFAST16 = "u"
  748. const m_PRIuFAST32 = "u"
  749. const m_PRIuFAST8 = "u"
  750. const m_PRIuLEAST16 = "u"
  751. const m_PRIuLEAST32 = "u"
  752. const m_PRIuLEAST8 = "u"
  753. const m_PRIx16 = "x"
  754. const m_PRIx32 = "x"
  755. const m_PRIx8 = "x"
  756. const m_PRIxFAST16 = "x"
  757. const m_PRIxFAST32 = "x"
  758. const m_PRIxFAST8 = "x"
  759. const m_PRIxLEAST16 = "x"
  760. const m_PRIxLEAST32 = "x"
  761. const m_PRIxLEAST8 = "x"
  762. const m_PTHREAD_CANCEL_ASYNCHRONOUS = 1
  763. const m_PTHREAD_CANCEL_DEFERRED = 0
  764. const m_PTHREAD_CANCEL_DISABLE = 1
  765. const m_PTHREAD_CANCEL_ENABLE = 0
  766. const m_PTHREAD_CANCEL_MASKED = 2
  767. const m_PTHREAD_CREATE_DETACHED = 1
  768. const m_PTHREAD_CREATE_JOINABLE = 0
  769. const m_PTHREAD_DESTRUCTOR_ITERATIONS = 4
  770. const m_PTHREAD_EXPLICIT_SCHED = 1
  771. const m_PTHREAD_INHERIT_SCHED = 0
  772. const m_PTHREAD_KEYS_MAX = 128
  773. const m_PTHREAD_MUTEX_DEFAULT = 0
  774. const m_PTHREAD_MUTEX_ERRORCHECK = 2
  775. const m_PTHREAD_MUTEX_NORMAL = 0
  776. const m_PTHREAD_MUTEX_RECURSIVE = 1
  777. const m_PTHREAD_MUTEX_ROBUST = 1
  778. const m_PTHREAD_MUTEX_STALLED = 0
  779. const m_PTHREAD_ONCE_INIT = 0
  780. const m_PTHREAD_PRIO_INHERIT = 1
  781. const m_PTHREAD_PRIO_NONE = 0
  782. const m_PTHREAD_PRIO_PROTECT = 2
  783. const m_PTHREAD_PROCESS_PRIVATE = 0
  784. const m_PTHREAD_PROCESS_SHARED = 1
  785. const m_PTHREAD_SCOPE_PROCESS = 1
  786. const m_PTHREAD_SCOPE_SYSTEM = 0
  787. const m_PTHREAD_STACK_MIN = 2048
  788. const m_PTRDIFF_MAX = "INT32_MAX"
  789. const m_PTRDIFF_MIN = "INT32_MIN"
  790. const m_P_tmpdir = "/tmp"
  791. const m_RAND_MAX = 0x7fffffff
  792. const m_RE_DUP_MAX = 255
  793. const m_RWF_APPEND = 0x00000010
  794. const m_RWF_DSYNC = 0x00000002
  795. const m_RWF_HIPRI = 0x00000001
  796. const m_RWF_NOWAIT = 0x00000008
  797. const m_RWF_SYNC = 0x00000004
  798. const m_RWF_WRITE_LIFE_NOT_SET = 0
  799. const m_RWH_WRITE_LIFE_EXTREME = 5
  800. const m_RWH_WRITE_LIFE_LONG = 4
  801. const m_RWH_WRITE_LIFE_MEDIUM = 3
  802. const m_RWH_WRITE_LIFE_NONE = 1
  803. const m_RWH_WRITE_LIFE_SHORT = 2
  804. const m_R_OK = 4
  805. const m_SCHAR_MAX = 127
  806. const m_SCHED_BATCH = 3
  807. const m_SCHED_DEADLINE = 6
  808. const m_SCHED_FIFO = 1
  809. const m_SCHED_IDLE = 5
  810. const m_SCHED_OTHER = 0
  811. const m_SCHED_RESET_ON_FORK = 0x40000000
  812. const m_SCHED_RR = 2
  813. const m_SCM_CREDENTIALS = 0x02
  814. const m_SCM_RIGHTS = 1
  815. const m_SCM_TIMESTAMP = "SO_TIMESTAMP"
  816. const m_SCM_TIMESTAMPING = "SO_TIMESTAMPING"
  817. const m_SCM_TIMESTAMPING_OPT_STATS = 54
  818. const m_SCM_TIMESTAMPING_PKTINFO = 58
  819. const m_SCM_TIMESTAMPNS = "SO_TIMESTAMPNS"
  820. const m_SCM_TXTIME = "SO_TXTIME"
  821. const m_SCM_WIFI_STATUS = "SO_WIFI_STATUS"
  822. const m_SCNd16 = "hd"
  823. const m_SCNd32 = "d"
  824. const m_SCNd8 = "hhd"
  825. const m_SCNdFAST16 = "d"
  826. const m_SCNdFAST32 = "d"
  827. const m_SCNdFAST8 = "hhd"
  828. const m_SCNdLEAST16 = "hd"
  829. const m_SCNdLEAST32 = "d"
  830. const m_SCNdLEAST8 = "hhd"
  831. const m_SCNi16 = "hi"
  832. const m_SCNi32 = "i"
  833. const m_SCNi8 = "hhi"
  834. const m_SCNiFAST16 = "i"
  835. const m_SCNiFAST32 = "i"
  836. const m_SCNiFAST8 = "hhi"
  837. const m_SCNiLEAST16 = "hi"
  838. const m_SCNiLEAST32 = "i"
  839. const m_SCNiLEAST8 = "hhi"
  840. const m_SCNo16 = "ho"
  841. const m_SCNo32 = "o"
  842. const m_SCNo8 = "hho"
  843. const m_SCNoFAST16 = "o"
  844. const m_SCNoFAST32 = "o"
  845. const m_SCNoFAST8 = "hho"
  846. const m_SCNoLEAST16 = "ho"
  847. const m_SCNoLEAST32 = "o"
  848. const m_SCNoLEAST8 = "hho"
  849. const m_SCNu16 = "hu"
  850. const m_SCNu32 = "u"
  851. const m_SCNu8 = "hhu"
  852. const m_SCNuFAST16 = "u"
  853. const m_SCNuFAST32 = "u"
  854. const m_SCNuFAST8 = "hhu"
  855. const m_SCNuLEAST16 = "hu"
  856. const m_SCNuLEAST32 = "u"
  857. const m_SCNuLEAST8 = "hhu"
  858. const m_SCNx16 = "hx"
  859. const m_SCNx32 = "x"
  860. const m_SCNx8 = "hhx"
  861. const m_SCNxFAST16 = "x"
  862. const m_SCNxFAST32 = "x"
  863. const m_SCNxFAST8 = "hhx"
  864. const m_SCNxLEAST16 = "hx"
  865. const m_SCNxLEAST32 = "x"
  866. const m_SCNxLEAST8 = "hhx"
  867. const m_SEEK_DATA = 3
  868. const m_SEEK_HOLE = 4
  869. const m_SEM_NSEMS_MAX = 256
  870. const m_SEM_VALUE_MAX = 0x7fffffff
  871. const m_SHRT_MAX = 0x7fff
  872. const m_SHUT_RD = 0
  873. const m_SHUT_RDWR = 2
  874. const m_SHUT_WR = 1
  875. const m_SIG_ATOMIC_MAX = "INT32_MAX"
  876. const m_SIG_ATOMIC_MIN = "INT32_MIN"
  877. const m_SIZE_MAX = "UINT32_MAX"
  878. const m_SOCK_CLOEXEC = 02000000
  879. const m_SOCK_DCCP = 6
  880. const m_SOCK_DGRAM = 2
  881. const m_SOCK_NONBLOCK = 04000
  882. const m_SOCK_PACKET = 10
  883. const m_SOCK_RAW = 3
  884. const m_SOCK_RDM = 4
  885. const m_SOCK_SEQPACKET = 5
  886. const m_SOCK_STREAM = 1
  887. const m_SOL_AAL = 265
  888. const m_SOL_ALG = 279
  889. const m_SOL_ATM = 264
  890. const m_SOL_BLUETOOTH = 274
  891. const m_SOL_CAIF = 278
  892. const m_SOL_DCCP = 269
  893. const m_SOL_DECNET = 261
  894. const m_SOL_ICMPV6 = 58
  895. const m_SOL_IP = 0
  896. const m_SOL_IPV6 = 41
  897. const m_SOL_IRDA = 266
  898. const m_SOL_IUCV = 277
  899. const m_SOL_KCM = 281
  900. const m_SOL_LLC = 268
  901. const m_SOL_NETBEUI = 267
  902. const m_SOL_NETLINK = 270
  903. const m_SOL_NFC = 280
  904. const m_SOL_PACKET = 263
  905. const m_SOL_PNPIPE = 275
  906. const m_SOL_PPPOL2TP = 273
  907. const m_SOL_RAW = 255
  908. const m_SOL_RDS = 276
  909. const m_SOL_RXRPC = 272
  910. const m_SOL_SOCKET = 1
  911. const m_SOL_TIPC = 271
  912. const m_SOL_TLS = 282
  913. const m_SOL_X25 = 262
  914. const m_SOL_XDP = 283
  915. const m_SOMAXCONN = 128
  916. const m_SO_ACCEPTCONN = 30
  917. const m_SO_ATTACH_BPF = 50
  918. const m_SO_ATTACH_FILTER = 26
  919. const m_SO_ATTACH_REUSEPORT_CBPF = 51
  920. const m_SO_ATTACH_REUSEPORT_EBPF = 52
  921. const m_SO_BINDTODEVICE = 25
  922. const m_SO_BINDTOIFINDEX = 62
  923. const m_SO_BPF_EXTENSIONS = 48
  924. const m_SO_BROADCAST = 6
  925. const m_SO_BSDCOMPAT = 14
  926. const m_SO_BUSY_POLL = 46
  927. const m_SO_BUSY_POLL_BUDGET = 70
  928. const m_SO_CNX_ADVICE = 53
  929. const m_SO_COOKIE = 57
  930. const m_SO_DEBUG = 1
  931. const m_SO_DETACH_BPF = "SO_DETACH_FILTER"
  932. const m_SO_DETACH_FILTER = 27
  933. const m_SO_DETACH_REUSEPORT_BPF = 68
  934. const m_SO_DOMAIN = 39
  935. const m_SO_DONTROUTE = 5
  936. const m_SO_ERROR = 4
  937. const m_SO_GET_FILTER = "SO_ATTACH_FILTER"
  938. const m_SO_INCOMING_CPU = 49
  939. const m_SO_INCOMING_NAPI_ID = 56
  940. const m_SO_KEEPALIVE = 9
  941. const m_SO_LINGER = 13
  942. const m_SO_LOCK_FILTER = 44
  943. const m_SO_MARK = 36
  944. const m_SO_MAX_PACING_RATE = 47
  945. const m_SO_MEMINFO = 55
  946. const m_SO_NOFCS = 43
  947. const m_SO_NO_CHECK = 11
  948. const m_SO_OOBINLINE = 10
  949. const m_SO_PASSCRED = 16
  950. const m_SO_PASSSEC = 34
  951. const m_SO_PEEK_OFF = 42
  952. const m_SO_PEERCRED = 17
  953. const m_SO_PEERGROUPS = 59
  954. const m_SO_PEERNAME = 28
  955. const m_SO_PEERSEC = 31
  956. const m_SO_PREFER_BUSY_POLL = 69
  957. const m_SO_PRIORITY = 12
  958. const m_SO_PROTOCOL = 38
  959. const m_SO_RCVBUF = 8
  960. const m_SO_RCVBUFFORCE = 33
  961. const m_SO_RCVLOWAT = 18
  962. const m_SO_RCVTIMEO = 66
  963. const m_SO_REUSEADDR = 2
  964. const m_SO_REUSEPORT = 15
  965. const m_SO_RXQ_OVFL = 40
  966. const m_SO_SECURITY_AUTHENTICATION = 22
  967. const m_SO_SECURITY_ENCRYPTION_NETWORK = 24
  968. const m_SO_SECURITY_ENCRYPTION_TRANSPORT = 23
  969. const m_SO_SELECT_ERR_QUEUE = 45
  970. const m_SO_SNDBUF = 7
  971. const m_SO_SNDBUFFORCE = 32
  972. const m_SO_SNDLOWAT = 19
  973. const m_SO_SNDTIMEO = 67
  974. const m_SO_TIMESTAMP = 63
  975. const m_SO_TIMESTAMPING = 65
  976. const m_SO_TIMESTAMPNS = 64
  977. const m_SO_TXTIME = 61
  978. const m_SO_TYPE = 3
  979. const m_SO_WIFI_STATUS = 41
  980. const m_SO_ZEROCOPY = 60
  981. const m_SPLICE_F_GIFT = 8
  982. const m_SPLICE_F_MORE = 4
  983. const m_SPLICE_F_MOVE = 1
  984. const m_SPLICE_F_NONBLOCK = 2
  985. const m_SSIZE_MAX = "LONG_MAX"
  986. const m_STDC_HEADERS = 1
  987. const m_STDERR_FILENO = 2
  988. const m_STDIN_FILENO = 0
  989. const m_STDOUT_FILENO = 1
  990. const m_SYMLOOP_MAX = 40
  991. const m_SYNC_FILE_RANGE_WAIT_AFTER = 4
  992. const m_SYNC_FILE_RANGE_WAIT_BEFORE = 1
  993. const m_SYNC_FILE_RANGE_WRITE = 2
  994. const m_S_IRGRP = 0040
  995. const m_S_IROTH = 0004
  996. const m_S_IRUSR = 0400
  997. const m_S_IRWXG = 0070
  998. const m_S_IRWXO = 0007
  999. const m_S_IRWXU = 0700
  1000. const m_S_ISGID = 02000
  1001. const m_S_ISUID = 04000
  1002. const m_S_ISVTX = 01000
  1003. const m_S_IWGRP = 0020
  1004. const m_S_IWOTH = 0002
  1005. const m_S_IWUSR = 0200
  1006. const m_S_IXGRP = 0010
  1007. const m_S_IXOTH = 0001
  1008. const m_S_IXUSR = 0100
  1009. const m_TIMER_ABSTIME = 1
  1010. const m_TIME_UTC = 1
  1011. const m_TMP_MAX = 10000
  1012. const m_TTY_NAME_MAX = 32
  1013. const m_TZNAME_MAX = 6
  1014. const m_UCHAR_MAX = 255
  1015. const m_UINT16_MAX = 0xffff
  1016. const m_UINT32_MAX = "0xffffffffu"
  1017. const m_UINT64_MAX = "0xffffffffffffffffu"
  1018. const m_UINT8_MAX = 0xff
  1019. const m_UINTMAX_MAX = "UINT64_MAX"
  1020. const m_UINTPTR_MAX = "UINT32_MAX"
  1021. const m_UINT_FAST16_MAX = "UINT32_MAX"
  1022. const m_UINT_FAST32_MAX = "UINT32_MAX"
  1023. const m_UINT_FAST64_MAX = "UINT64_MAX"
  1024. const m_UINT_FAST8_MAX = "UINT8_MAX"
  1025. const m_UINT_LEAST16_MAX = "UINT16_MAX"
  1026. const m_UINT_LEAST32_MAX = "UINT32_MAX"
  1027. const m_UINT_LEAST64_MAX = "UINT64_MAX"
  1028. const m_UINT_LEAST8_MAX = "UINT8_MAX"
  1029. const m_UINT_MAX = 0xffffffff
  1030. const m_UIO_MAXIOV = 1024
  1031. const m_USE_POLL = 1
  1032. const m_USHRT_MAX = 0xffff
  1033. const m_VERSION = "1.15"
  1034. const m_WINT_MAX = "UINT32_MAX"
  1035. const m_WINT_MIN = 0
  1036. const m_WNOHANG = 1
  1037. const m_WORD_BIT = 32
  1038. const m_WUNTRACED = 2
  1039. const m_W_OK = 2
  1040. const m_XCB_ACCESS = 10
  1041. const m_XCB_ALLOC = 11
  1042. const m_XCB_ALLOC_COLOR = 84
  1043. const m_XCB_ALLOC_COLOR_CELLS = 86
  1044. const m_XCB_ALLOC_COLOR_PLANES = 87
  1045. const m_XCB_ALLOC_NAMED_COLOR = 85
  1046. const m_XCB_ALLOW_EVENTS = 35
  1047. const m_XCB_ATOM = 5
  1048. const m_XCB_BELL = 104
  1049. const m_XCB_BIGREQUESTS_MAJOR_VERSION = 0
  1050. const m_XCB_BIGREQUESTS_MINOR_VERSION = 0
  1051. const m_XCB_BIG_REQUESTS_ENABLE = 0
  1052. const m_XCB_BUTTON_PRESS = 4
  1053. const m_XCB_BUTTON_RELEASE = 5
  1054. const m_XCB_CHANGE_ACTIVE_POINTER_GRAB = 30
  1055. const m_XCB_CHANGE_GC = 56
  1056. const m_XCB_CHANGE_HOSTS = 109
  1057. const m_XCB_CHANGE_KEYBOARD_CONTROL = 102
  1058. const m_XCB_CHANGE_KEYBOARD_MAPPING = 100
  1059. const m_XCB_CHANGE_POINTER_CONTROL = 105
  1060. const m_XCB_CHANGE_PROPERTY = 18
  1061. const m_XCB_CHANGE_SAVE_SET = 6
  1062. const m_XCB_CHANGE_WINDOW_ATTRIBUTES = 2
  1063. const m_XCB_CIRCULATE_NOTIFY = 26
  1064. const m_XCB_CIRCULATE_REQUEST = 27
  1065. const m_XCB_CIRCULATE_WINDOW = 13
  1066. const m_XCB_CLEAR_AREA = 61
  1067. const m_XCB_CLIENT_MESSAGE = 33
  1068. const m_XCB_CLOSE_FONT = 46
  1069. const m_XCB_COLORMAP = 12
  1070. const m_XCB_COLORMAP_NOTIFY = 32
  1071. const m_XCB_CONFIGURE_NOTIFY = 22
  1072. const m_XCB_CONFIGURE_REQUEST = 23
  1073. const m_XCB_CONFIGURE_WINDOW = 12
  1074. const m_XCB_CONN_CLOSED_EXT_NOTSUPPORTED = 2
  1075. const m_XCB_CONN_CLOSED_FDPASSING_FAILED = 7
  1076. const m_XCB_CONN_CLOSED_INVALID_SCREEN = 6
  1077. const m_XCB_CONN_CLOSED_MEM_INSUFFICIENT = 3
  1078. const m_XCB_CONN_CLOSED_PARSE_ERR = 5
  1079. const m_XCB_CONN_CLOSED_REQ_LEN_EXCEED = 4
  1080. const m_XCB_CONN_ERROR = 1
  1081. const m_XCB_CONVERT_SELECTION = 24
  1082. const m_XCB_COPY_AREA = 62
  1083. const m_XCB_COPY_COLORMAP_AND_FREE = 80
  1084. const m_XCB_COPY_FROM_PARENT = 0
  1085. const m_XCB_COPY_GC = 57
  1086. const m_XCB_COPY_PLANE = 63
  1087. const m_XCB_CREATE_COLORMAP = 78
  1088. const m_XCB_CREATE_CURSOR = 93
  1089. const m_XCB_CREATE_GC = 55
  1090. const m_XCB_CREATE_GLYPH_CURSOR = 94
  1091. const m_XCB_CREATE_NOTIFY = 16
  1092. const m_XCB_CREATE_PIXMAP = 53
  1093. const m_XCB_CREATE_WINDOW = 1
  1094. const m_XCB_CURRENT_TIME = 0
  1095. const m_XCB_CURSOR = 6
  1096. const m_XCB_DELETE_PROPERTY = 19
  1097. const m_XCB_DESTROY_NOTIFY = 17
  1098. const m_XCB_DESTROY_SUBWINDOWS = 5
  1099. const m_XCB_DESTROY_WINDOW = 4
  1100. const m_XCB_DRAWABLE = 9
  1101. const m_XCB_ENTER_NOTIFY = 7
  1102. const m_XCB_EXPOSE = 12
  1103. const m_XCB_FILL_POLY = 69
  1104. const m_XCB_FOCUS_IN = 9
  1105. const m_XCB_FOCUS_OUT = 10
  1106. const m_XCB_FONT = 7
  1107. const m_XCB_FORCE_SCREEN_SAVER = 115
  1108. const m_XCB_FREE_COLORMAP = 79
  1109. const m_XCB_FREE_COLORS = 88
  1110. const m_XCB_FREE_CURSOR = 95
  1111. const m_XCB_FREE_GC = 60
  1112. const m_XCB_FREE_PIXMAP = 54
  1113. const m_XCB_GET_ATOM_NAME = 17
  1114. const m_XCB_GET_FONT_PATH = 52
  1115. const m_XCB_GET_GEOMETRY = 14
  1116. const m_XCB_GET_IMAGE = 73
  1117. const m_XCB_GET_INPUT_FOCUS = 43
  1118. const m_XCB_GET_KEYBOARD_CONTROL = 103
  1119. const m_XCB_GET_KEYBOARD_MAPPING = 101
  1120. const m_XCB_GET_MODIFIER_MAPPING = 119
  1121. const m_XCB_GET_MOTION_EVENTS = 39
  1122. const m_XCB_GET_POINTER_CONTROL = 106
  1123. const m_XCB_GET_POINTER_MAPPING = 117
  1124. const m_XCB_GET_PROPERTY = 20
  1125. const m_XCB_GET_SCREEN_SAVER = 108
  1126. const m_XCB_GET_SELECTION_OWNER = 23
  1127. const m_XCB_GET_WINDOW_ATTRIBUTES = 3
  1128. const m_XCB_GE_GENERIC = 35
  1129. const m_XCB_GRAB_BUTTON = 28
  1130. const m_XCB_GRAB_KEY = 33
  1131. const m_XCB_GRAB_KEYBOARD = 31
  1132. const m_XCB_GRAB_POINTER = 26
  1133. const m_XCB_GRAB_SERVER = 36
  1134. const m_XCB_GRAPHICS_EXPOSURE = 13
  1135. const m_XCB_GRAVITY_NOTIFY = 24
  1136. const m_XCB_G_CONTEXT = 13
  1137. const m_XCB_ID_CHOICE = 14
  1138. const m_XCB_IMAGE_TEXT_16 = 77
  1139. const m_XCB_IMAGE_TEXT_8 = 76
  1140. const m_XCB_IMPLEMENTATION = 17
  1141. const m_XCB_INSTALL_COLORMAP = 81
  1142. const m_XCB_INTERN_ATOM = 16
  1143. const m_XCB_KEYMAP_NOTIFY = 11
  1144. const m_XCB_KEY_PRESS = 2
  1145. const m_XCB_KEY_RELEASE = 3
  1146. const m_XCB_KILL_CLIENT = 113
  1147. const m_XCB_LEAVE_NOTIFY = 8
  1148. const m_XCB_LENGTH = 16
  1149. const m_XCB_LIST_EXTENSIONS = 99
  1150. const m_XCB_LIST_FONTS = 49
  1151. const m_XCB_LIST_FONTS_WITH_INFO = 50
  1152. const m_XCB_LIST_HOSTS = 110
  1153. const m_XCB_LIST_INSTALLED_COLORMAPS = 83
  1154. const m_XCB_LIST_PROPERTIES = 21
  1155. const m_XCB_LOOKUP_COLOR = 92
  1156. const m_XCB_MAPPING_NOTIFY = 34
  1157. const m_XCB_MAP_NOTIFY = 19
  1158. const m_XCB_MAP_REQUEST = 20
  1159. const m_XCB_MAP_SUBWINDOWS = 9
  1160. const m_XCB_MAP_WINDOW = 8
  1161. const m_XCB_MATCH = 8
  1162. const m_XCB_MAX_PASS_FD = 16
  1163. const m_XCB_MOTION_NOTIFY = 6
  1164. const m_XCB_NAME = 15
  1165. const m_XCB_NONE = 0
  1166. const m_XCB_NO_EXPOSURE = 14
  1167. const m_XCB_NO_OPERATION = 127
  1168. const m_XCB_NO_SYMBOL = 0
  1169. const m_XCB_OPEN_FONT = 45
  1170. const m_XCB_PIXMAP = 4
  1171. const m_XCB_POLY_ARC = 68
  1172. const m_XCB_POLY_FILL_ARC = 71
  1173. const m_XCB_POLY_FILL_RECTANGLE = 70
  1174. const m_XCB_POLY_LINE = 65
  1175. const m_XCB_POLY_POINT = 64
  1176. const m_XCB_POLY_RECTANGLE = 67
  1177. const m_XCB_POLY_SEGMENT = 66
  1178. const m_XCB_POLY_TEXT_16 = 75
  1179. const m_XCB_POLY_TEXT_8 = 74
  1180. const m_XCB_PROPERTY_NOTIFY = 28
  1181. const m_XCB_PUT_IMAGE = 72
  1182. const m_XCB_QUERY_BEST_SIZE = 97
  1183. const m_XCB_QUERY_COLORS = 91
  1184. const m_XCB_QUERY_EXTENSION = 98
  1185. const m_XCB_QUERY_FONT = 47
  1186. const m_XCB_QUERY_KEYMAP = 44
  1187. const m_XCB_QUERY_POINTER = 38
  1188. const m_XCB_QUERY_TEXT_EXTENTS = 48
  1189. const m_XCB_QUERY_TREE = 15
  1190. const m_XCB_QUEUE_BUFFER_SIZE = 16384
  1191. const m_XCB_RECOLOR_CURSOR = 96
  1192. const m_XCB_REPARENT_NOTIFY = 21
  1193. const m_XCB_REPARENT_WINDOW = 7
  1194. const m_XCB_REQUEST = 1
  1195. const m_XCB_RESIZE_REQUEST = 25
  1196. const m_XCB_ROTATE_PROPERTIES = 114
  1197. const m_XCB_SELECTION_CLEAR = 29
  1198. const m_XCB_SELECTION_NOTIFY = 31
  1199. const m_XCB_SELECTION_REQUEST = 30
  1200. const m_XCB_SEND_EVENT = 25
  1201. const m_XCB_SET_ACCESS_CONTROL = 111
  1202. const m_XCB_SET_CLIP_RECTANGLES = 59
  1203. const m_XCB_SET_CLOSE_DOWN_MODE = 112
  1204. const m_XCB_SET_DASHES = 58
  1205. const m_XCB_SET_FONT_PATH = 51
  1206. const m_XCB_SET_INPUT_FOCUS = 42
  1207. const m_XCB_SET_MODIFIER_MAPPING = 118
  1208. const m_XCB_SET_POINTER_MAPPING = 116
  1209. const m_XCB_SET_SCREEN_SAVER = 107
  1210. const m_XCB_SET_SELECTION_OWNER = 22
  1211. const m_XCB_STORE_COLORS = 89
  1212. const m_XCB_STORE_NAMED_COLOR = 90
  1213. const m_XCB_TRANSLATE_COORDINATES = 40
  1214. const m_XCB_UNGRAB_BUTTON = 29
  1215. const m_XCB_UNGRAB_KEY = 34
  1216. const m_XCB_UNGRAB_KEYBOARD = 32
  1217. const m_XCB_UNGRAB_POINTER = 27
  1218. const m_XCB_UNGRAB_SERVER = 37
  1219. const m_XCB_UNINSTALL_COLORMAP = 82
  1220. const m_XCB_UNMAP_NOTIFY = 18
  1221. const m_XCB_UNMAP_SUBWINDOWS = 11
  1222. const m_XCB_UNMAP_WINDOW = 10
  1223. const m_XCB_VALUE = 2
  1224. const m_XCB_VISIBILITY_NOTIFY = 15
  1225. const m_XCB_WARP_POINTER = 41
  1226. const m_XCB_WINDOW = 3
  1227. const m_X_OK = 1
  1228. const m_X_PROTOCOL = 11
  1229. const m_X_PROTOCOL_REVISION = 0
  1230. const m_X_TCP_PORT = 6000
  1231. const m__ALL_SOURCE = 1
  1232. const m__CS_GNU_LIBC_VERSION = 2
  1233. const m__CS_GNU_LIBPTHREAD_VERSION = 3
  1234. const m__CS_PATH = 0
  1235. const m__CS_POSIX_V5_WIDTH_RESTRICTED_ENVS = 4
  1236. const m__CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116
  1237. const m__CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 1117
  1238. const m__CS_POSIX_V6_ILP32_OFF32_LIBS = 1118
  1239. const m__CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 1119
  1240. const m__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 1120
  1241. const m__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 1121
  1242. const m__CS_POSIX_V6_ILP32_OFFBIG_LIBS = 1122
  1243. const m__CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123
  1244. const m__CS_POSIX_V6_LP64_OFF64_CFLAGS = 1124
  1245. const m__CS_POSIX_V6_LP64_OFF64_LDFLAGS = 1125
  1246. const m__CS_POSIX_V6_LP64_OFF64_LIBS = 1126
  1247. const m__CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 1127
  1248. const m__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 1128
  1249. const m__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 1129
  1250. const m__CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 1130
  1251. const m__CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131
  1252. const m__CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 1
  1253. const m__CS_POSIX_V7_ILP32_OFF32_CFLAGS = 1132
  1254. const m__CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 1133
  1255. const m__CS_POSIX_V7_ILP32_OFF32_LIBS = 1134
  1256. const m__CS_POSIX_V7_ILP32_OFF32_LINTFLAGS = 1135
  1257. const m__CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 1136
  1258. const m__CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 1137
  1259. const m__CS_POSIX_V7_ILP32_OFFBIG_LIBS = 1138
  1260. const m__CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139
  1261. const m__CS_POSIX_V7_LP64_OFF64_CFLAGS = 1140
  1262. const m__CS_POSIX_V7_LP64_OFF64_LDFLAGS = 1141
  1263. const m__CS_POSIX_V7_LP64_OFF64_LIBS = 1142
  1264. const m__CS_POSIX_V7_LP64_OFF64_LINTFLAGS = 1143
  1265. const m__CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 1144
  1266. const m__CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 1145
  1267. const m__CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 1146
  1268. const m__CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147
  1269. const m__CS_POSIX_V7_THREADS_CFLAGS = 1150
  1270. const m__CS_POSIX_V7_THREADS_LDFLAGS = 1151
  1271. const m__CS_POSIX_V7_WIDTH_RESTRICTED_ENVS = 5
  1272. const m__CS_V6_ENV = 1148
  1273. const m__CS_V7_ENV = 1149
  1274. const m__DARWIN_C_SOURCE = 1
  1275. const m__FILE_OFFSET_BITS = 64
  1276. const m__GNU_SOURCE = 1
  1277. const m__HPUX_ALT_XOPEN_SOCKET_API = 1
  1278. const m__ILP32 = 1
  1279. const m__IOFBF = 0
  1280. const m__IOLBF = 1
  1281. const m__IONBF = 2
  1282. const m__NETBSD_SOURCE = 1
  1283. const m__OPENBSD_SOURCE = 1
  1284. const m__PC_2_SYMLINKS = 20
  1285. const m__PC_ALLOC_SIZE_MIN = 18
  1286. const m__PC_ASYNC_IO = 10
  1287. const m__PC_CHOWN_RESTRICTED = 6
  1288. const m__PC_FILESIZEBITS = 13
  1289. const m__PC_LINK_MAX = 0
  1290. const m__PC_MAX_CANON = 1
  1291. const m__PC_MAX_INPUT = 2
  1292. const m__PC_NAME_MAX = 3
  1293. const m__PC_NO_TRUNC = 7
  1294. const m__PC_PATH_MAX = 4
  1295. const m__PC_PIPE_BUF = 5
  1296. const m__PC_PRIO_IO = 11
  1297. const m__PC_REC_INCR_XFER_SIZE = 14
  1298. const m__PC_REC_MAX_XFER_SIZE = 15
  1299. const m__PC_REC_MIN_XFER_SIZE = 16
  1300. const m__PC_REC_XFER_ALIGN = 17
  1301. const m__PC_SOCK_MAXBUF = 12
  1302. const m__PC_SYMLINK_MAX = 19
  1303. const m__PC_SYNC_IO = 9
  1304. const m__PC_VDISABLE = 8
  1305. const m__POSIX2_BC_BASE_MAX = 99
  1306. const m__POSIX2_BC_DIM_MAX = 2048
  1307. const m__POSIX2_BC_SCALE_MAX = 99
  1308. const m__POSIX2_BC_STRING_MAX = 1000
  1309. const m__POSIX2_CHARCLASS_NAME_MAX = 14
  1310. const m__POSIX2_COLL_WEIGHTS_MAX = 2
  1311. const m__POSIX2_C_BIND = "_POSIX_VERSION"
  1312. const m__POSIX2_EXPR_NEST_MAX = 32
  1313. const m__POSIX2_LINE_MAX = 2048
  1314. const m__POSIX2_RE_DUP_MAX = 255
  1315. const m__POSIX2_VERSION = "_POSIX_VERSION"
  1316. const m__POSIX_ADVISORY_INFO = "_POSIX_VERSION"
  1317. const m__POSIX_AIO_LISTIO_MAX = 2
  1318. const m__POSIX_AIO_MAX = 1
  1319. const m__POSIX_ARG_MAX = 4096
  1320. const m__POSIX_ASYNCHRONOUS_IO = "_POSIX_VERSION"
  1321. const m__POSIX_BARRIERS = "_POSIX_VERSION"
  1322. const m__POSIX_CHILD_MAX = 25
  1323. const m__POSIX_CHOWN_RESTRICTED = 1
  1324. const m__POSIX_CLOCKRES_MIN = 20000000
  1325. const m__POSIX_CLOCK_SELECTION = "_POSIX_VERSION"
  1326. const m__POSIX_CPUTIME = "_POSIX_VERSION"
  1327. const m__POSIX_DELAYTIMER_MAX = 32
  1328. const m__POSIX_FSYNC = "_POSIX_VERSION"
  1329. const m__POSIX_HOST_NAME_MAX = 255
  1330. const m__POSIX_IPV6 = "_POSIX_VERSION"
  1331. const m__POSIX_JOB_CONTROL = 1
  1332. const m__POSIX_LINK_MAX = 8
  1333. const m__POSIX_LOGIN_NAME_MAX = 9
  1334. const m__POSIX_MAPPED_FILES = "_POSIX_VERSION"
  1335. const m__POSIX_MAX_CANON = 255
  1336. const m__POSIX_MAX_INPUT = 255
  1337. const m__POSIX_MEMLOCK = "_POSIX_VERSION"
  1338. const m__POSIX_MEMLOCK_RANGE = "_POSIX_VERSION"
  1339. const m__POSIX_MEMORY_PROTECTION = "_POSIX_VERSION"
  1340. const m__POSIX_MESSAGE_PASSING = "_POSIX_VERSION"
  1341. const m__POSIX_MONOTONIC_CLOCK = "_POSIX_VERSION"
  1342. const m__POSIX_MQ_OPEN_MAX = 8
  1343. const m__POSIX_MQ_PRIO_MAX = 32
  1344. const m__POSIX_NAME_MAX = 14
  1345. const m__POSIX_NGROUPS_MAX = 8
  1346. const m__POSIX_NO_TRUNC = 1
  1347. const m__POSIX_OPEN_MAX = 20
  1348. const m__POSIX_PATH_MAX = 256
  1349. const m__POSIX_PIPE_BUF = 512
  1350. const m__POSIX_PTHREAD_SEMANTICS = 1
  1351. const m__POSIX_RAW_SOCKETS = "_POSIX_VERSION"
  1352. const m__POSIX_READER_WRITER_LOCKS = "_POSIX_VERSION"
  1353. const m__POSIX_REALTIME_SIGNALS = "_POSIX_VERSION"
  1354. const m__POSIX_REGEXP = 1
  1355. const m__POSIX_RE_DUP_MAX = 255
  1356. const m__POSIX_RTSIG_MAX = 8
  1357. const m__POSIX_SAVED_IDS = 1
  1358. const m__POSIX_SEMAPHORES = "_POSIX_VERSION"
  1359. const m__POSIX_SEM_NSEMS_MAX = 256
  1360. const m__POSIX_SEM_VALUE_MAX = 32767
  1361. const m__POSIX_SHARED_MEMORY_OBJECTS = "_POSIX_VERSION"
  1362. const m__POSIX_SHELL = 1
  1363. const m__POSIX_SIGQUEUE_MAX = 32
  1364. const m__POSIX_SPAWN = "_POSIX_VERSION"
  1365. const m__POSIX_SPIN_LOCKS = "_POSIX_VERSION"
  1366. const m__POSIX_SSIZE_MAX = 32767
  1367. const m__POSIX_SS_REPL_MAX = 4
  1368. const m__POSIX_STREAM_MAX = 8
  1369. const m__POSIX_SYMLINK_MAX = 255
  1370. const m__POSIX_SYMLOOP_MAX = 8
  1371. const m__POSIX_THREADS = "_POSIX_VERSION"
  1372. const m__POSIX_THREAD_ATTR_STACKADDR = "_POSIX_VERSION"
  1373. const m__POSIX_THREAD_ATTR_STACKSIZE = "_POSIX_VERSION"
  1374. const m__POSIX_THREAD_CPUTIME = "_POSIX_VERSION"
  1375. const m__POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
  1376. const m__POSIX_THREAD_KEYS_MAX = 128
  1377. const m__POSIX_THREAD_PRIORITY_SCHEDULING = "_POSIX_VERSION"
  1378. const m__POSIX_THREAD_PROCESS_SHARED = "_POSIX_VERSION"
  1379. const m__POSIX_THREAD_SAFE_FUNCTIONS = "_POSIX_VERSION"
  1380. const m__POSIX_THREAD_THREADS_MAX = 64
  1381. const m__POSIX_TIMEOUTS = "_POSIX_VERSION"
  1382. const m__POSIX_TIMERS = "_POSIX_VERSION"
  1383. const m__POSIX_TIMER_MAX = 32
  1384. const m__POSIX_TRACE_EVENT_NAME_MAX = 30
  1385. const m__POSIX_TRACE_NAME_MAX = 8
  1386. const m__POSIX_TRACE_SYS_MAX = 8
  1387. const m__POSIX_TRACE_USER_EVENT_MAX = 32
  1388. const m__POSIX_TTY_NAME_MAX = 9
  1389. const m__POSIX_TZNAME_MAX = 6
  1390. const m__POSIX_V6_ILP32_OFFBIG = 1
  1391. const m__POSIX_V7_ILP32_OFFBIG = 1
  1392. const m__POSIX_VDISABLE = 0
  1393. const m__POSIX_VERSION = 200809
  1394. const m__REDIR_TIME64 = 1
  1395. const m__SC_2_CHAR_TERM = 95
  1396. const m__SC_2_C_BIND = 47
  1397. const m__SC_2_C_DEV = 48
  1398. const m__SC_2_FORT_DEV = 49
  1399. const m__SC_2_FORT_RUN = 50
  1400. const m__SC_2_LOCALEDEF = 52
  1401. const m__SC_2_PBS = 168
  1402. const m__SC_2_PBS_ACCOUNTING = 169
  1403. const m__SC_2_PBS_CHECKPOINT = 175
  1404. const m__SC_2_PBS_LOCATE = 170
  1405. const m__SC_2_PBS_MESSAGE = 171
  1406. const m__SC_2_PBS_TRACK = 172
  1407. const m__SC_2_SW_DEV = 51
  1408. const m__SC_2_UPE = 97
  1409. const m__SC_2_VERSION = 46
  1410. const m__SC_ADVISORY_INFO = 132
  1411. const m__SC_AIO_LISTIO_MAX = 23
  1412. const m__SC_AIO_MAX = 24
  1413. const m__SC_AIO_PRIO_DELTA_MAX = 25
  1414. const m__SC_ARG_MAX = 0
  1415. const m__SC_ASYNCHRONOUS_IO = 12
  1416. const m__SC_ATEXIT_MAX = 87
  1417. const m__SC_AVPHYS_PAGES = 86
  1418. const m__SC_BARRIERS = 133
  1419. const m__SC_BC_BASE_MAX = 36
  1420. const m__SC_BC_DIM_MAX = 37
  1421. const m__SC_BC_SCALE_MAX = 38
  1422. const m__SC_BC_STRING_MAX = 39
  1423. const m__SC_CHILD_MAX = 1
  1424. const m__SC_CLK_TCK = 2
  1425. const m__SC_CLOCK_SELECTION = 137
  1426. const m__SC_COLL_WEIGHTS_MAX = 40
  1427. const m__SC_CPUTIME = 138
  1428. const m__SC_DELAYTIMER_MAX = 26
  1429. const m__SC_EXPR_NEST_MAX = 42
  1430. const m__SC_FSYNC = 15
  1431. const m__SC_GETGR_R_SIZE_MAX = 69
  1432. const m__SC_GETPW_R_SIZE_MAX = 70
  1433. const m__SC_HOST_NAME_MAX = 180
  1434. const m__SC_IOV_MAX = 60
  1435. const m__SC_IPV6 = 235
  1436. const m__SC_JOB_CONTROL = 7
  1437. const m__SC_LINE_MAX = 43
  1438. const m__SC_LOGIN_NAME_MAX = 71
  1439. const m__SC_MAPPED_FILES = 16
  1440. const m__SC_MEMLOCK = 17
  1441. const m__SC_MEMLOCK_RANGE = 18
  1442. const m__SC_MEMORY_PROTECTION = 19
  1443. const m__SC_MESSAGE_PASSING = 20
  1444. const m__SC_MINSIGSTKSZ = 249
  1445. const m__SC_MONOTONIC_CLOCK = 149
  1446. const m__SC_MQ_OPEN_MAX = 27
  1447. const m__SC_MQ_PRIO_MAX = 28
  1448. const m__SC_NGROUPS_MAX = 3
  1449. const m__SC_NPROCESSORS_CONF = 83
  1450. const m__SC_NPROCESSORS_ONLN = 84
  1451. const m__SC_NZERO = 109
  1452. const m__SC_OPEN_MAX = 4
  1453. const m__SC_PAGESIZE = 30
  1454. const m__SC_PAGE_SIZE = 30
  1455. const m__SC_PASS_MAX = 88
  1456. const m__SC_PHYS_PAGES = 85
  1457. const m__SC_PRIORITIZED_IO = 13
  1458. const m__SC_PRIORITY_SCHEDULING = 10
  1459. const m__SC_RAW_SOCKETS = 236
  1460. const m__SC_READER_WRITER_LOCKS = 153
  1461. const m__SC_REALTIME_SIGNALS = 9
  1462. const m__SC_REGEXP = 155
  1463. const m__SC_RE_DUP_MAX = 44
  1464. const m__SC_RTSIG_MAX = 31
  1465. const m__SC_SAVED_IDS = 8
  1466. const m__SC_SEMAPHORES = 21
  1467. const m__SC_SEM_NSEMS_MAX = 32
  1468. const m__SC_SEM_VALUE_MAX = 33
  1469. const m__SC_SHARED_MEMORY_OBJECTS = 22
  1470. const m__SC_SHELL = 157
  1471. const m__SC_SIGQUEUE_MAX = 34
  1472. const m__SC_SIGSTKSZ = 250
  1473. const m__SC_SPAWN = 159
  1474. const m__SC_SPIN_LOCKS = 154
  1475. const m__SC_SPORADIC_SERVER = 160
  1476. const m__SC_SS_REPL_MAX = 241
  1477. const m__SC_STREAMS = 174
  1478. const m__SC_STREAM_MAX = 5
  1479. const m__SC_SYMLOOP_MAX = 173
  1480. const m__SC_SYNCHRONIZED_IO = 14
  1481. const m__SC_THREADS = 67
  1482. const m__SC_THREAD_ATTR_STACKADDR = 77
  1483. const m__SC_THREAD_ATTR_STACKSIZE = 78
  1484. const m__SC_THREAD_CPUTIME = 139
  1485. const m__SC_THREAD_DESTRUCTOR_ITERATIONS = 73
  1486. const m__SC_THREAD_KEYS_MAX = 74
  1487. const m__SC_THREAD_PRIORITY_SCHEDULING = 79
  1488. const m__SC_THREAD_PRIO_INHERIT = 80
  1489. const m__SC_THREAD_PRIO_PROTECT = 81
  1490. const m__SC_THREAD_PROCESS_SHARED = 82
  1491. const m__SC_THREAD_ROBUST_PRIO_INHERIT = 247
  1492. const m__SC_THREAD_ROBUST_PRIO_PROTECT = 248
  1493. const m__SC_THREAD_SAFE_FUNCTIONS = 68
  1494. const m__SC_THREAD_SPORADIC_SERVER = 161
  1495. const m__SC_THREAD_STACK_MIN = 75
  1496. const m__SC_THREAD_THREADS_MAX = 76
  1497. const m__SC_TIMEOUTS = 164
  1498. const m__SC_TIMERS = 11
  1499. const m__SC_TIMER_MAX = 35
  1500. const m__SC_TRACE = 181
  1501. const m__SC_TRACE_EVENT_FILTER = 182
  1502. const m__SC_TRACE_EVENT_NAME_MAX = 242
  1503. const m__SC_TRACE_INHERIT = 183
  1504. const m__SC_TRACE_LOG = 184
  1505. const m__SC_TRACE_NAME_MAX = 243
  1506. const m__SC_TRACE_SYS_MAX = 244
  1507. const m__SC_TRACE_USER_EVENT_MAX = 245
  1508. const m__SC_TTY_NAME_MAX = 72
  1509. const m__SC_TYPED_MEMORY_OBJECTS = 165
  1510. const m__SC_TZNAME_MAX = 6
  1511. const m__SC_UIO_MAXIOV = 60
  1512. const m__SC_V6_ILP32_OFF32 = 176
  1513. const m__SC_V6_ILP32_OFFBIG = 177
  1514. const m__SC_V6_LP64_OFF64 = 178
  1515. const m__SC_V6_LPBIG_OFFBIG = 179
  1516. const m__SC_V7_ILP32_OFF32 = 237
  1517. const m__SC_V7_ILP32_OFFBIG = 238
  1518. const m__SC_V7_LP64_OFF64 = 239
  1519. const m__SC_V7_LPBIG_OFFBIG = 240
  1520. const m__SC_VERSION = 29
  1521. const m__SC_XBS5_ILP32_OFF32 = 125
  1522. const m__SC_XBS5_ILP32_OFFBIG = 126
  1523. const m__SC_XBS5_LP64_OFF64 = 127
  1524. const m__SC_XBS5_LPBIG_OFFBIG = 128
  1525. const m__SC_XOPEN_CRYPT = 92
  1526. const m__SC_XOPEN_ENH_I18N = 93
  1527. const m__SC_XOPEN_LEGACY = 129
  1528. const m__SC_XOPEN_REALTIME = 130
  1529. const m__SC_XOPEN_REALTIME_THREADS = 131
  1530. const m__SC_XOPEN_SHM = 94
  1531. const m__SC_XOPEN_STREAMS = 246
  1532. const m__SC_XOPEN_UNIX = 91
  1533. const m__SC_XOPEN_VERSION = 89
  1534. const m__SC_XOPEN_XCU_VERSION = 90
  1535. const m__SC_XOPEN_XPG2 = 98
  1536. const m__SC_XOPEN_XPG3 = 99
  1537. const m__SC_XOPEN_XPG4 = 100
  1538. const m__STDC_PREDEF_H = 1
  1539. const m__TANDEM_SOURCE = 1
  1540. const m__XOPEN_ENH_I18N = 1
  1541. const m__XOPEN_IOV_MAX = 16
  1542. const m__XOPEN_NAME_MAX = 255
  1543. const m__XOPEN_PATH_MAX = 1024
  1544. const m__XOPEN_UNIX = 1
  1545. const m__XOPEN_VERSION = 700
  1546. const m___ATOMIC_ACQUIRE = 2
  1547. const m___ATOMIC_ACQ_REL = 4
  1548. const m___ATOMIC_CONSUME = 1
  1549. const m___ATOMIC_HLE_ACQUIRE = 65536
  1550. const m___ATOMIC_HLE_RELEASE = 131072
  1551. const m___ATOMIC_RELAXED = 0
  1552. const m___ATOMIC_RELEASE = 3
  1553. const m___ATOMIC_SEQ_CST = 5
  1554. const m___BIGGEST_ALIGNMENT__ = 16
  1555. const m___BIG_ENDIAN = 4321
  1556. const m___BYTE_ORDER = 1234
  1557. const m___BYTE_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  1558. const m___CCGO__ = 1
  1559. const m___CHAR_BIT__ = 8
  1560. const m___DBL_DECIMAL_DIG__ = 17
  1561. const m___DBL_DIG__ = 15
  1562. const m___DBL_HAS_DENORM__ = 1
  1563. const m___DBL_HAS_INFINITY__ = 1
  1564. const m___DBL_HAS_QUIET_NAN__ = 1
  1565. const m___DBL_IS_IEC_60559__ = 2
  1566. const m___DBL_MANT_DIG__ = 53
  1567. const m___DBL_MAX_10_EXP__ = 308
  1568. const m___DBL_MAX_EXP__ = 1024
  1569. const m___DEC128_EPSILON__ = 1e-33
  1570. const m___DEC128_MANT_DIG__ = 34
  1571. const m___DEC128_MAX_EXP__ = 6145
  1572. const m___DEC128_MAX__ = "9.999999999999999999999999999999999E6144"
  1573. const m___DEC128_MIN__ = 1e-6143
  1574. const m___DEC128_SUBNORMAL_MIN__ = 0.000000000000000000000000000000001e-6143
  1575. const m___DEC32_EPSILON__ = 1e-6
  1576. const m___DEC32_MANT_DIG__ = 7
  1577. const m___DEC32_MAX_EXP__ = 97
  1578. const m___DEC32_MAX__ = 9.999999e96
  1579. const m___DEC32_MIN__ = 1e-95
  1580. const m___DEC32_SUBNORMAL_MIN__ = 0.000001e-95
  1581. const m___DEC64_EPSILON__ = 1e-15
  1582. const m___DEC64_MANT_DIG__ = 16
  1583. const m___DEC64_MAX_EXP__ = 385
  1584. const m___DEC64_MAX__ = "9.999999999999999E384"
  1585. const m___DEC64_MIN__ = 1e-383
  1586. const m___DEC64_SUBNORMAL_MIN__ = 0.000000000000001e-383
  1587. const m___DECIMAL_BID_FORMAT__ = 1
  1588. const m___DECIMAL_DIG__ = 17
  1589. const m___DEC_EVAL_METHOD__ = 2
  1590. const m___ELF__ = 1
  1591. const m___EXTENSIONS__ = 1
  1592. const m___FINITE_MATH_ONLY__ = 0
  1593. const m___FLOAT_WORD_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  1594. const m___FLT128_DECIMAL_DIG__ = 36
  1595. const m___FLT128_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  1596. const m___FLT128_DIG__ = 33
  1597. const m___FLT128_EPSILON__ = 1.92592994438723585305597794258492732e-34
  1598. const m___FLT128_HAS_DENORM__ = 1
  1599. const m___FLT128_HAS_INFINITY__ = 1
  1600. const m___FLT128_HAS_QUIET_NAN__ = 1
  1601. const m___FLT128_IS_IEC_60559__ = 2
  1602. const m___FLT128_MANT_DIG__ = 113
  1603. const m___FLT128_MAX_10_EXP__ = 4932
  1604. const m___FLT128_MAX_EXP__ = 16384
  1605. const m___FLT128_MAX__ = "1.18973149535723176508575932662800702e+4932"
  1606. const m___FLT128_MIN__ = 3.36210314311209350626267781732175260e-4932
  1607. const m___FLT128_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  1608. const m___FLT32X_DECIMAL_DIG__ = 17
  1609. const m___FLT32X_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  1610. const m___FLT32X_DIG__ = 15
  1611. const m___FLT32X_EPSILON__ = 2.22044604925031308084726333618164062e-16
  1612. const m___FLT32X_HAS_DENORM__ = 1
  1613. const m___FLT32X_HAS_INFINITY__ = 1
  1614. const m___FLT32X_HAS_QUIET_NAN__ = 1
  1615. const m___FLT32X_IS_IEC_60559__ = 2
  1616. const m___FLT32X_MANT_DIG__ = 53
  1617. const m___FLT32X_MAX_10_EXP__ = 308
  1618. const m___FLT32X_MAX_EXP__ = 1024
  1619. const m___FLT32X_MAX__ = 1.79769313486231570814527423731704357e+308
  1620. const m___FLT32X_MIN__ = 2.22507385850720138309023271733240406e-308
  1621. const m___FLT32X_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  1622. const m___FLT32_DECIMAL_DIG__ = 9
  1623. const m___FLT32_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  1624. const m___FLT32_DIG__ = 6
  1625. const m___FLT32_EPSILON__ = 1.19209289550781250000000000000000000e-7
  1626. const m___FLT32_HAS_DENORM__ = 1
  1627. const m___FLT32_HAS_INFINITY__ = 1
  1628. const m___FLT32_HAS_QUIET_NAN__ = 1
  1629. const m___FLT32_IS_IEC_60559__ = 2
  1630. const m___FLT32_MANT_DIG__ = 24
  1631. const m___FLT32_MAX_10_EXP__ = 38
  1632. const m___FLT32_MAX_EXP__ = 128
  1633. const m___FLT32_MAX__ = 3.40282346638528859811704183484516925e+38
  1634. const m___FLT32_MIN__ = 1.17549435082228750796873653722224568e-38
  1635. const m___FLT32_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  1636. const m___FLT64X_DECIMAL_DIG__ = 36
  1637. const m___FLT64X_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  1638. const m___FLT64X_DIG__ = 33
  1639. const m___FLT64X_EPSILON__ = 1.92592994438723585305597794258492732e-34
  1640. const m___FLT64X_HAS_DENORM__ = 1
  1641. const m___FLT64X_HAS_INFINITY__ = 1
  1642. const m___FLT64X_HAS_QUIET_NAN__ = 1
  1643. const m___FLT64X_IS_IEC_60559__ = 2
  1644. const m___FLT64X_MANT_DIG__ = 113
  1645. const m___FLT64X_MAX_10_EXP__ = 4932
  1646. const m___FLT64X_MAX_EXP__ = 16384
  1647. const m___FLT64X_MAX__ = "1.18973149535723176508575932662800702e+4932"
  1648. const m___FLT64X_MIN__ = 3.36210314311209350626267781732175260e-4932
  1649. const m___FLT64X_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  1650. const m___FLT64_DECIMAL_DIG__ = 17
  1651. const m___FLT64_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  1652. const m___FLT64_DIG__ = 15
  1653. const m___FLT64_EPSILON__ = 2.22044604925031308084726333618164062e-16
  1654. const m___FLT64_HAS_DENORM__ = 1
  1655. const m___FLT64_HAS_INFINITY__ = 1
  1656. const m___FLT64_HAS_QUIET_NAN__ = 1
  1657. const m___FLT64_IS_IEC_60559__ = 2
  1658. const m___FLT64_MANT_DIG__ = 53
  1659. const m___FLT64_MAX_10_EXP__ = 308
  1660. const m___FLT64_MAX_EXP__ = 1024
  1661. const m___FLT64_MAX__ = 1.79769313486231570814527423731704357e+308
  1662. const m___FLT64_MIN__ = 2.22507385850720138309023271733240406e-308
  1663. const m___FLT64_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  1664. const m___FLT_DECIMAL_DIG__ = 9
  1665. const m___FLT_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  1666. const m___FLT_DIG__ = 6
  1667. const m___FLT_EPSILON__ = 1.19209289550781250000000000000000000e-7
  1668. const m___FLT_EVAL_METHOD_TS_18661_3__ = 2
  1669. const m___FLT_EVAL_METHOD__ = 2
  1670. const m___FLT_HAS_DENORM__ = 1
  1671. const m___FLT_HAS_INFINITY__ = 1
  1672. const m___FLT_HAS_QUIET_NAN__ = 1
  1673. const m___FLT_IS_IEC_60559__ = 2
  1674. const m___FLT_MANT_DIG__ = 24
  1675. const m___FLT_MAX_10_EXP__ = 38
  1676. const m___FLT_MAX_EXP__ = 128
  1677. const m___FLT_MAX__ = 3.40282346638528859811704183484516925e+38
  1678. const m___FLT_MIN__ = 1.17549435082228750796873653722224568e-38
  1679. const m___FLT_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  1680. const m___FLT_RADIX__ = 2
  1681. const m___FUNCTION__ = "__func__"
  1682. const m___GCC_ASM_FLAG_OUTPUTS__ = 1
  1683. const m___GCC_ATOMIC_BOOL_LOCK_FREE = 2
  1684. const m___GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2
  1685. const m___GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2
  1686. const m___GCC_ATOMIC_CHAR_LOCK_FREE = 2
  1687. const m___GCC_ATOMIC_INT_LOCK_FREE = 2
  1688. const m___GCC_ATOMIC_LLONG_LOCK_FREE = 2
  1689. const m___GCC_ATOMIC_LONG_LOCK_FREE = 2
  1690. const m___GCC_ATOMIC_POINTER_LOCK_FREE = 2
  1691. const m___GCC_ATOMIC_SHORT_LOCK_FREE = 2
  1692. const m___GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1
  1693. const m___GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2
  1694. const m___GCC_CONSTRUCTIVE_SIZE = 64
  1695. const m___GCC_DESTRUCTIVE_SIZE = 64
  1696. const m___GCC_HAVE_DWARF2_CFI_ASM = 1
  1697. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1
  1698. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1
  1699. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1
  1700. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1
  1701. const m___GCC_IEC_559 = 2
  1702. const m___GCC_IEC_559_COMPLEX = 2
  1703. const m___GNUC_EXECUTION_CHARSET_NAME = "UTF-8"
  1704. const m___GNUC_MINOR__ = 2
  1705. const m___GNUC_PATCHLEVEL__ = 0
  1706. const m___GNUC_STDC_INLINE__ = 1
  1707. const m___GNUC_WIDE_EXECUTION_CHARSET_NAME = "UTF-32LE"
  1708. const m___GNUC__ = 12
  1709. const m___GXX_ABI_VERSION = 1017
  1710. const m___HAVE_SPECULATION_SAFE_VALUE = 1
  1711. const m___ILP32__ = 1
  1712. const m___INT16_MAX__ = 0x7fff
  1713. const m___INT32_MAX__ = 0x7fffffff
  1714. const m___INT32_TYPE__ = "int"
  1715. const m___INT64_MAX__ = 0x7fffffffffffffff
  1716. const m___INT8_MAX__ = 0x7f
  1717. const m___INTMAX_MAX__ = 0x7fffffffffffffff
  1718. const m___INTMAX_WIDTH__ = 64
  1719. const m___INTPTR_MAX__ = 0x7fffffff
  1720. const m___INTPTR_TYPE__ = "int"
  1721. const m___INTPTR_WIDTH__ = 32
  1722. const m___INT_FAST16_MAX__ = 0x7fffffff
  1723. const m___INT_FAST16_TYPE__ = "int"
  1724. const m___INT_FAST16_WIDTH__ = 32
  1725. const m___INT_FAST32_MAX__ = 0x7fffffff
  1726. const m___INT_FAST32_TYPE__ = "int"
  1727. const m___INT_FAST32_WIDTH__ = 32
  1728. const m___INT_FAST64_MAX__ = 0x7fffffffffffffff
  1729. const m___INT_FAST64_WIDTH__ = 64
  1730. const m___INT_FAST8_MAX__ = 0x7f
  1731. const m___INT_FAST8_WIDTH__ = 8
  1732. const m___INT_LEAST16_MAX__ = 0x7fff
  1733. const m___INT_LEAST16_WIDTH__ = 16
  1734. const m___INT_LEAST32_MAX__ = 0x7fffffff
  1735. const m___INT_LEAST32_TYPE__ = "int"
  1736. const m___INT_LEAST32_WIDTH__ = 32
  1737. const m___INT_LEAST64_MAX__ = 0x7fffffffffffffff
  1738. const m___INT_LEAST64_WIDTH__ = 64
  1739. const m___INT_LEAST8_MAX__ = 0x7f
  1740. const m___INT_LEAST8_WIDTH__ = 8
  1741. const m___INT_MAX__ = 0x7fffffff
  1742. const m___INT_WIDTH__ = 32
  1743. const m___LAHF_SAHF__ = 1
  1744. const m___LDBL_DECIMAL_DIG__ = 17
  1745. const m___LDBL_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  1746. const m___LDBL_DIG__ = 15
  1747. const m___LDBL_EPSILON__ = 2.22044604925031308084726333618164062e-16
  1748. const m___LDBL_HAS_DENORM__ = 1
  1749. const m___LDBL_HAS_INFINITY__ = 1
  1750. const m___LDBL_HAS_QUIET_NAN__ = 1
  1751. const m___LDBL_IS_IEC_60559__ = 2
  1752. const m___LDBL_MANT_DIG__ = 53
  1753. const m___LDBL_MAX_10_EXP__ = 308
  1754. const m___LDBL_MAX_EXP__ = 1024
  1755. const m___LDBL_MAX__ = 1.79769313486231570814527423731704357e+308
  1756. const m___LDBL_MIN__ = 2.22507385850720138309023271733240406e-308
  1757. const m___LDBL_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  1758. const m___LITTLE_ENDIAN = 1234
  1759. const m___LONG_DOUBLE_64__ = 1
  1760. const m___LONG_LONG_MAX__ = 0x7fffffffffffffff
  1761. const m___LONG_LONG_WIDTH__ = 64
  1762. const m___LONG_MAX = 0x7fffffff
  1763. const m___LONG_MAX__ = 0x7fffffff
  1764. const m___LONG_WIDTH__ = 32
  1765. const m___NO_INLINE__ = 1
  1766. const m___ORDER_BIG_ENDIAN__ = 4321
  1767. const m___ORDER_LITTLE_ENDIAN__ = 1234
  1768. const m___ORDER_PDP_ENDIAN__ = 3412
  1769. const m___PDP_ENDIAN = 3412
  1770. const m___PIC__ = 2
  1771. const m___PIE__ = 2
  1772. const m___PRAGMA_REDEFINE_EXTNAME = 1
  1773. const m___PRETTY_FUNCTION__ = "__func__"
  1774. const m___PRI64 = "ll"
  1775. const m___PRIPTR = ""
  1776. const m___PTRDIFF_MAX__ = 0x7fffffff
  1777. const m___PTRDIFF_TYPE__ = "int"
  1778. const m___PTRDIFF_WIDTH__ = 32
  1779. const m___SCHAR_MAX__ = 0x7f
  1780. const m___SCHAR_WIDTH__ = 8
  1781. const m___SEG_FS = 1
  1782. const m___SEG_GS = 1
  1783. const m___SHRT_MAX__ = 0x7fff
  1784. const m___SHRT_WIDTH__ = 16
  1785. const m___SIG_ATOMIC_MAX__ = 0x7fffffff
  1786. const m___SIG_ATOMIC_TYPE__ = "int"
  1787. const m___SIG_ATOMIC_WIDTH__ = 32
  1788. const m___SIZEOF_DOUBLE__ = 8
  1789. const m___SIZEOF_FLOAT128__ = 16
  1790. const m___SIZEOF_FLOAT80__ = 12
  1791. const m___SIZEOF_FLOAT__ = 4
  1792. const m___SIZEOF_INT__ = 4
  1793. const m___SIZEOF_LONG_DOUBLE__ = 8
  1794. const m___SIZEOF_LONG_LONG__ = 8
  1795. const m___SIZEOF_LONG__ = 4
  1796. const m___SIZEOF_POINTER__ = 4
  1797. const m___SIZEOF_PTRDIFF_T__ = 4
  1798. const m___SIZEOF_SHORT__ = 2
  1799. const m___SIZEOF_SIZE_T__ = 4
  1800. const m___SIZEOF_WCHAR_T__ = 4
  1801. const m___SIZEOF_WINT_T__ = 4
  1802. const m___SIZE_MAX__ = 0xffffffff
  1803. const m___SIZE_WIDTH__ = 32
  1804. const m___STDC_HOSTED__ = 1
  1805. const m___STDC_IEC_559_COMPLEX__ = 1
  1806. const m___STDC_IEC_559__ = 1
  1807. const m___STDC_IEC_60559_BFP__ = 201404
  1808. const m___STDC_IEC_60559_COMPLEX__ = 201404
  1809. const m___STDC_ISO_10646__ = 201706
  1810. const m___STDC_UTF_16__ = 1
  1811. const m___STDC_UTF_32__ = 1
  1812. const m___STDC_VERSION__ = 201710
  1813. const m___STDC_WANT_IEC_60559_ATTRIBS_EXT__ = 1
  1814. const m___STDC_WANT_IEC_60559_BFP_EXT__ = 1
  1815. const m___STDC_WANT_IEC_60559_DFP_EXT__ = 1
  1816. const m___STDC_WANT_IEC_60559_FUNCS_EXT__ = 1
  1817. const m___STDC_WANT_IEC_60559_TYPES_EXT__ = 1
  1818. const m___STDC_WANT_LIB_EXT2__ = 1
  1819. const m___STDC_WANT_MATH_SPEC_FUNCS__ = 1
  1820. const m___STDC__ = 1
  1821. const m___UAPI_DEF_IN6_ADDR = 0
  1822. const m___UAPI_DEF_IN6_ADDR_ALT = 0
  1823. const m___UAPI_DEF_IN6_PKTINFO = 0
  1824. const m___UAPI_DEF_IN_ADDR = 0
  1825. const m___UAPI_DEF_IN_CLASS = 0
  1826. const m___UAPI_DEF_IN_IPPROTO = 0
  1827. const m___UAPI_DEF_IN_PKTINFO = 0
  1828. const m___UAPI_DEF_IP6_MTUINFO = 0
  1829. const m___UAPI_DEF_IPPROTO_V6 = 0
  1830. const m___UAPI_DEF_IPV6_MREQ = 0
  1831. const m___UAPI_DEF_IPV6_OPTIONS = 0
  1832. const m___UAPI_DEF_IP_MREQ = 0
  1833. const m___UAPI_DEF_SOCKADDR_IN = 0
  1834. const m___UAPI_DEF_SOCKADDR_IN6 = 0
  1835. const m___UINT16_MAX__ = 0xffff
  1836. const m___UINT32_MAX__ = 0xffffffff
  1837. const m___UINT64_MAX__ = "0xffffffffffffffffU"
  1838. const m___UINT8_MAX__ = 0xff
  1839. const m___UINTMAX_MAX__ = "0xffffffffffffffffU"
  1840. const m___UINTPTR_MAX__ = 0xffffffff
  1841. const m___UINT_FAST16_MAX__ = 0xffffffff
  1842. const m___UINT_FAST32_MAX__ = 0xffffffff
  1843. const m___UINT_FAST64_MAX__ = "0xffffffffffffffffU"
  1844. const m___UINT_FAST8_MAX__ = 0xff
  1845. const m___UINT_LEAST16_MAX__ = 0xffff
  1846. const m___UINT_LEAST32_MAX__ = 0xffffffff
  1847. const m___UINT_LEAST64_MAX__ = "0xffffffffffffffffU"
  1848. const m___UINT_LEAST8_MAX__ = 0xff
  1849. const m___USE_TIME_BITS64 = 1
  1850. const m___VERSION__ = "12.2.0"
  1851. const m___WCHAR_MAX__ = 0x7fffffff
  1852. const m___WCHAR_WIDTH__ = 32
  1853. const m___WINT_MAX__ = 0xffffffff
  1854. const m___WINT_MIN__ = 0
  1855. const m___WINT_WIDTH__ = 32
  1856. const m___code_model_32__ = 1
  1857. const m___gnu_linux__ = 1
  1858. const m___i386 = 1
  1859. const m___i386__ = 1
  1860. const m___i686 = 1
  1861. const m___i686__ = 1
  1862. const m___inline = "inline"
  1863. const m___linux = 1
  1864. const m___linux__ = 1
  1865. const m___pentiumpro = 1
  1866. const m___pentiumpro__ = 1
  1867. const m___pic__ = 2
  1868. const m___pie__ = 2
  1869. const m___restrict = "restrict"
  1870. const m___restrict_arr = "restrict"
  1871. const m___tm_gmtoff = "tm_gmtoff"
  1872. const m___tm_zone = "tm_zone"
  1873. const m___unix = 1
  1874. const m___unix__ = 1
  1875. const m_alloca = "__builtin_alloca"
  1876. const m_i386 = 1
  1877. const m_linux = 1
  1878. const m_loff_t = "off_t"
  1879. const m_static_assert = "_Static_assert"
  1880. const m_unix = 1
  1881. type t__builtin_va_list = uintptr
  1882. type t__predefined_size_t = uint32
  1883. type t__predefined_wchar_t = int32
  1884. type t__predefined_ptrdiff_t = int32
  1885. type Tsize_t = uint32
  1886. type Tlocale_t = uintptr
  1887. type Tssize_t = int32
  1888. type Toff_t = int64
  1889. type Tva_list = uintptr
  1890. type t__isoc_va_list = uintptr
  1891. type Tfpos_t = struct {
  1892. F__lldata [0]int64
  1893. F__align [0]float64
  1894. F__opaque [16]int8
  1895. }
  1896. type T_G_fpos64_t = Tfpos_t
  1897. type Tcookie_io_functions_t = struct {
  1898. Fread uintptr
  1899. Fwrite uintptr
  1900. Fseek uintptr
  1901. Fclose1 uintptr
  1902. }
  1903. type T_IO_cookie_io_functions_t = Tcookie_io_functions_t
  1904. type Twchar_t = int32
  1905. type Tdiv_t = struct {
  1906. Fquot int32
  1907. Frem int32
  1908. }
  1909. type Tldiv_t = struct {
  1910. Fquot int32
  1911. Frem int32
  1912. }
  1913. type Tlldiv_t = struct {
  1914. Fquot int64
  1915. Frem int64
  1916. }
  1917. type Tmode_t = uint32
  1918. type Tpid_t = int32
  1919. type Tiovec = struct {
  1920. Fiov_base uintptr
  1921. Fiov_len Tsize_t
  1922. }
  1923. type Tflock = struct {
  1924. Fl_type int16
  1925. Fl_whence int16
  1926. Fl_start Toff_t
  1927. Fl_len Toff_t
  1928. Fl_pid Tpid_t
  1929. }
  1930. type Tfile_handle = struct {
  1931. Fhandle_bytes uint32
  1932. Fhandle_type int32
  1933. }
  1934. type Tf_owner_ex = struct {
  1935. Ftype1 int32
  1936. Fpid Tpid_t
  1937. }
  1938. type Tregister_t = int32
  1939. type Ttime_t = int64
  1940. type Tsuseconds_t = int64
  1941. type Tint8_t = int8
  1942. type Tint16_t = int16
  1943. type Tint32_t = int32
  1944. type Tint64_t = int64
  1945. type Tu_int64_t = uint64
  1946. type Tnlink_t = uint32
  1947. type Tino_t = uint64
  1948. type Tdev_t = uint64
  1949. type Tblksize_t = int32
  1950. type Tblkcnt_t = int64
  1951. type Tfsblkcnt_t = uint64
  1952. type Tfsfilcnt_t = uint64
  1953. type Ttimer_t = uintptr
  1954. type Tclockid_t = int32
  1955. type Tclock_t = int32
  1956. type Tid_t = uint32
  1957. type Tuid_t = uint32
  1958. type Tgid_t = uint32
  1959. type Tkey_t = int32
  1960. type Tuseconds_t = uint32
  1961. type Tpthread_t = uintptr
  1962. type Tpthread_once_t = int32
  1963. type Tpthread_key_t = uint32
  1964. type Tpthread_spinlock_t = int32
  1965. type Tpthread_mutexattr_t = struct {
  1966. F__attr uint32
  1967. }
  1968. type Tpthread_condattr_t = struct {
  1969. F__attr uint32
  1970. }
  1971. type Tpthread_barrierattr_t = struct {
  1972. F__attr uint32
  1973. }
  1974. type Tpthread_rwlockattr_t = struct {
  1975. F__attr [2]uint32
  1976. }
  1977. type Tpthread_attr_t = struct {
  1978. F__u struct {
  1979. F__vi [0][9]int32
  1980. F__s [0][9]uint32
  1981. F__i [9]int32
  1982. }
  1983. }
  1984. type Tpthread_mutex_t = struct {
  1985. F__u struct {
  1986. F__vi [0][6]int32
  1987. F__p [0][6]uintptr
  1988. F__i [6]int32
  1989. }
  1990. F__ccgo_room int32
  1991. }
  1992. type Tpthread_cond_t = struct {
  1993. F__u struct {
  1994. F__vi [0][12]int32
  1995. F__p [0][12]uintptr
  1996. F__i [12]int32
  1997. }
  1998. }
  1999. type Tpthread_rwlock_t = struct {
  2000. F__u struct {
  2001. F__vi [0][8]int32
  2002. F__p [0][8]uintptr
  2003. F__i [8]int32
  2004. }
  2005. }
  2006. type Tpthread_barrier_t = struct {
  2007. F__u struct {
  2008. F__vi [0][5]int32
  2009. F__p [0][5]uintptr
  2010. F__i [5]int32
  2011. }
  2012. }
  2013. type Tu_int8_t = uint8
  2014. type Tu_int16_t = uint16
  2015. type Tu_int32_t = uint32
  2016. type Tcaddr_t = uintptr
  2017. type Tu_char = uint8
  2018. type Tu_short = uint16
  2019. type Tushort = uint16
  2020. type Tu_int = uint32
  2021. type Tuint = uint32
  2022. type Tu_long = uint32
  2023. type Tulong = uint32
  2024. type Tquad_t = int64
  2025. type Tu_quad_t = uint64
  2026. type Tuint16_t = uint16
  2027. type Tuint32_t = uint32
  2028. type Tuint64_t = uint64
  2029. type Ttimeval = struct {
  2030. Ftv_sec Ttime_t
  2031. Ftv_usec Tsuseconds_t
  2032. }
  2033. type Ttimespec = struct {
  2034. Ftv_sec Ttime_t
  2035. Ftv_nsec int32
  2036. F__ccgo12 uint32
  2037. }
  2038. type Tsigset_t = struct {
  2039. F__bits [32]uint32
  2040. }
  2041. type t__sigset_t = Tsigset_t
  2042. type Tfd_mask = uint32
  2043. type Tfd_set = struct {
  2044. Ffds_bits [32]uint32
  2045. }
  2046. type Tuintptr_t = uint32
  2047. type Tintptr_t = int32
  2048. type Tintmax_t = int64
  2049. type Tuint8_t = uint8
  2050. type Tuintmax_t = uint64
  2051. type Tint_fast8_t = int8
  2052. type Tint_fast64_t = int64
  2053. type Tint_least8_t = int8
  2054. type Tint_least16_t = int16
  2055. type Tint_least32_t = int32
  2056. type Tint_least64_t = int64
  2057. type Tuint_fast8_t = uint8
  2058. type Tuint_fast64_t = uint64
  2059. type Tuint_least8_t = uint8
  2060. type Tuint_least16_t = uint16
  2061. type Tuint_least32_t = uint32
  2062. type Tuint_least64_t = uint64
  2063. type Tint_fast16_t = int32
  2064. type Tint_fast32_t = int32
  2065. type Tuint_fast16_t = uint32
  2066. type Tuint_fast32_t = uint32
  2067. type Tsched_param = struct {
  2068. Fsched_priority int32
  2069. F__reserved1 int32
  2070. F__reserved2 [4]int32
  2071. F__reserved3 int32
  2072. }
  2073. type Tcpu_set_t = struct {
  2074. F__bits [32]uint32
  2075. }
  2076. type Ttm = struct {
  2077. Ftm_sec int32
  2078. Ftm_min int32
  2079. Ftm_hour int32
  2080. Ftm_mday int32
  2081. Ftm_mon int32
  2082. Ftm_year int32
  2083. Ftm_wday int32
  2084. Ftm_yday int32
  2085. Ftm_isdst int32
  2086. Ftm_gmtoff int32
  2087. Ftm_zone uintptr
  2088. }
  2089. type Titimerspec = struct {
  2090. Fit_interval Ttimespec
  2091. Fit_value Ttimespec
  2092. }
  2093. type t__ptcb = struct {
  2094. F__f uintptr
  2095. F__x uintptr
  2096. F__next uintptr
  2097. }
  2098. type Tcpu_set_t1 = struct {
  2099. F__bits [32]uint32
  2100. }
  2101. type Txcb_connection_t = struct {
  2102. Fhas_error int32
  2103. Fsetup uintptr
  2104. Ffd int32
  2105. Fiolock Tpthread_mutex_t
  2106. Fin T_xcb_in
  2107. Fout T_xcb_out
  2108. Fext T_xcb_ext
  2109. Fxid T_xcb_xid
  2110. }
  2111. type Txcb_generic_iterator_t = struct {
  2112. Fdata uintptr
  2113. Frem int32
  2114. Findex int32
  2115. }
  2116. type Txcb_generic_reply_t = struct {
  2117. Fresponse_type Tuint8_t
  2118. Fpad0 Tuint8_t
  2119. Fsequence Tuint16_t
  2120. Flength Tuint32_t
  2121. }
  2122. type Txcb_generic_event_t = struct {
  2123. Fresponse_type Tuint8_t
  2124. Fpad0 Tuint8_t
  2125. Fsequence Tuint16_t
  2126. Fpad [7]Tuint32_t
  2127. Ffull_sequence Tuint32_t
  2128. }
  2129. type Txcb_raw_generic_event_t = struct {
  2130. Fresponse_type Tuint8_t
  2131. Fpad0 Tuint8_t
  2132. Fsequence Tuint16_t
  2133. Fpad [7]Tuint32_t
  2134. }
  2135. type Txcb_ge_event_t = struct {
  2136. Fresponse_type Tuint8_t
  2137. Fpad0 Tuint8_t
  2138. Fsequence Tuint16_t
  2139. Flength Tuint32_t
  2140. Fevent_type Tuint16_t
  2141. Fpad1 Tuint16_t
  2142. Fpad [5]Tuint32_t
  2143. Ffull_sequence Tuint32_t
  2144. }
  2145. type Txcb_generic_error_t = struct {
  2146. Fresponse_type Tuint8_t
  2147. Ferror_code Tuint8_t
  2148. Fsequence Tuint16_t
  2149. Fresource_id Tuint32_t
  2150. Fminor_code Tuint16_t
  2151. Fmajor_code Tuint8_t
  2152. Fpad0 Tuint8_t
  2153. Fpad [5]Tuint32_t
  2154. Ffull_sequence Tuint32_t
  2155. }
  2156. type Txcb_void_cookie_t = struct {
  2157. Fsequence uint32
  2158. }
  2159. type Txcb_char2b_t = struct {
  2160. Fbyte1 Tuint8_t
  2161. Fbyte2 Tuint8_t
  2162. }
  2163. type Txcb_char2b_iterator_t = struct {
  2164. Fdata uintptr
  2165. Frem int32
  2166. Findex int32
  2167. }
  2168. type Txcb_window_t = uint32
  2169. type Txcb_window_iterator_t = struct {
  2170. Fdata uintptr
  2171. Frem int32
  2172. Findex int32
  2173. }
  2174. type Txcb_pixmap_t = uint32
  2175. type Txcb_pixmap_iterator_t = struct {
  2176. Fdata uintptr
  2177. Frem int32
  2178. Findex int32
  2179. }
  2180. type Txcb_cursor_t = uint32
  2181. type Txcb_cursor_iterator_t = struct {
  2182. Fdata uintptr
  2183. Frem int32
  2184. Findex int32
  2185. }
  2186. type Txcb_font_t = uint32
  2187. type Txcb_font_iterator_t = struct {
  2188. Fdata uintptr
  2189. Frem int32
  2190. Findex int32
  2191. }
  2192. type Txcb_gcontext_t = uint32
  2193. type Txcb_gcontext_iterator_t = struct {
  2194. Fdata uintptr
  2195. Frem int32
  2196. Findex int32
  2197. }
  2198. type Txcb_colormap_t = uint32
  2199. type Txcb_colormap_iterator_t = struct {
  2200. Fdata uintptr
  2201. Frem int32
  2202. Findex int32
  2203. }
  2204. type Txcb_atom_t = uint32
  2205. type Txcb_atom_iterator_t = struct {
  2206. Fdata uintptr
  2207. Frem int32
  2208. Findex int32
  2209. }
  2210. type Txcb_drawable_t = uint32
  2211. type Txcb_drawable_iterator_t = struct {
  2212. Fdata uintptr
  2213. Frem int32
  2214. Findex int32
  2215. }
  2216. type Txcb_fontable_t = uint32
  2217. type Txcb_fontable_iterator_t = struct {
  2218. Fdata uintptr
  2219. Frem int32
  2220. Findex int32
  2221. }
  2222. type Txcb_bool32_t = uint32
  2223. type Txcb_bool32_iterator_t = struct {
  2224. Fdata uintptr
  2225. Frem int32
  2226. Findex int32
  2227. }
  2228. type Txcb_visualid_t = uint32
  2229. type Txcb_visualid_iterator_t = struct {
  2230. Fdata uintptr
  2231. Frem int32
  2232. Findex int32
  2233. }
  2234. type Txcb_timestamp_t = uint32
  2235. type Txcb_timestamp_iterator_t = struct {
  2236. Fdata uintptr
  2237. Frem int32
  2238. Findex int32
  2239. }
  2240. type Txcb_keysym_t = uint32
  2241. type Txcb_keysym_iterator_t = struct {
  2242. Fdata uintptr
  2243. Frem int32
  2244. Findex int32
  2245. }
  2246. type Txcb_keycode_t = uint8
  2247. type Txcb_keycode_iterator_t = struct {
  2248. Fdata uintptr
  2249. Frem int32
  2250. Findex int32
  2251. }
  2252. type Txcb_keycode32_t = uint32
  2253. type Txcb_keycode32_iterator_t = struct {
  2254. Fdata uintptr
  2255. Frem int32
  2256. Findex int32
  2257. }
  2258. type Txcb_button_t = uint8
  2259. type Txcb_button_iterator_t = struct {
  2260. Fdata uintptr
  2261. Frem int32
  2262. Findex int32
  2263. }
  2264. type Txcb_point_t = struct {
  2265. Fx Tint16_t
  2266. Fy Tint16_t
  2267. }
  2268. type Txcb_point_iterator_t = struct {
  2269. Fdata uintptr
  2270. Frem int32
  2271. Findex int32
  2272. }
  2273. type Txcb_rectangle_t = struct {
  2274. Fx Tint16_t
  2275. Fy Tint16_t
  2276. Fwidth Tuint16_t
  2277. Fheight Tuint16_t
  2278. }
  2279. type Txcb_rectangle_iterator_t = struct {
  2280. Fdata uintptr
  2281. Frem int32
  2282. Findex int32
  2283. }
  2284. type Txcb_arc_t = struct {
  2285. Fx Tint16_t
  2286. Fy Tint16_t
  2287. Fwidth Tuint16_t
  2288. Fheight Tuint16_t
  2289. Fangle1 Tint16_t
  2290. Fangle2 Tint16_t
  2291. }
  2292. type Txcb_arc_iterator_t = struct {
  2293. Fdata uintptr
  2294. Frem int32
  2295. Findex int32
  2296. }
  2297. type Txcb_format_t = struct {
  2298. Fdepth Tuint8_t
  2299. Fbits_per_pixel Tuint8_t
  2300. Fscanline_pad Tuint8_t
  2301. Fpad0 [5]Tuint8_t
  2302. }
  2303. type Txcb_format_iterator_t = struct {
  2304. Fdata uintptr
  2305. Frem int32
  2306. Findex int32
  2307. }
  2308. type Txcb_visual_class_t = int32
  2309. type _xcb_visual_class_t = int32
  2310. const _XCB_VISUAL_CLASS_STATIC_GRAY = 0
  2311. const _XCB_VISUAL_CLASS_GRAY_SCALE = 1
  2312. const _XCB_VISUAL_CLASS_STATIC_COLOR = 2
  2313. const _XCB_VISUAL_CLASS_PSEUDO_COLOR = 3
  2314. const _XCB_VISUAL_CLASS_TRUE_COLOR = 4
  2315. const _XCB_VISUAL_CLASS_DIRECT_COLOR = 5
  2316. type Txcb_visualtype_t = struct {
  2317. Fvisual_id Txcb_visualid_t
  2318. F_class Tuint8_t
  2319. Fbits_per_rgb_value Tuint8_t
  2320. Fcolormap_entries Tuint16_t
  2321. Fred_mask Tuint32_t
  2322. Fgreen_mask Tuint32_t
  2323. Fblue_mask Tuint32_t
  2324. Fpad0 [4]Tuint8_t
  2325. }
  2326. type Txcb_visualtype_iterator_t = struct {
  2327. Fdata uintptr
  2328. Frem int32
  2329. Findex int32
  2330. }
  2331. type Txcb_depth_t = struct {
  2332. Fdepth Tuint8_t
  2333. Fpad0 Tuint8_t
  2334. Fvisuals_len Tuint16_t
  2335. Fpad1 [4]Tuint8_t
  2336. }
  2337. type Txcb_depth_iterator_t = struct {
  2338. Fdata uintptr
  2339. Frem int32
  2340. Findex int32
  2341. }
  2342. type Txcb_event_mask_t = int32
  2343. type _xcb_event_mask_t = int32
  2344. const _XCB_EVENT_MASK_NO_EVENT = 0
  2345. const _XCB_EVENT_MASK_KEY_PRESS = 1
  2346. const _XCB_EVENT_MASK_KEY_RELEASE = 2
  2347. const _XCB_EVENT_MASK_BUTTON_PRESS = 4
  2348. const _XCB_EVENT_MASK_BUTTON_RELEASE = 8
  2349. const _XCB_EVENT_MASK_ENTER_WINDOW = 16
  2350. const _XCB_EVENT_MASK_LEAVE_WINDOW = 32
  2351. const _XCB_EVENT_MASK_POINTER_MOTION = 64
  2352. const _XCB_EVENT_MASK_POINTER_MOTION_HINT = 128
  2353. const _XCB_EVENT_MASK_BUTTON_1_MOTION = 256
  2354. const _XCB_EVENT_MASK_BUTTON_2_MOTION = 512
  2355. const _XCB_EVENT_MASK_BUTTON_3_MOTION = 1024
  2356. const _XCB_EVENT_MASK_BUTTON_4_MOTION = 2048
  2357. const _XCB_EVENT_MASK_BUTTON_5_MOTION = 4096
  2358. const _XCB_EVENT_MASK_BUTTON_MOTION = 8192
  2359. const _XCB_EVENT_MASK_KEYMAP_STATE = 16384
  2360. const _XCB_EVENT_MASK_EXPOSURE = 32768
  2361. const _XCB_EVENT_MASK_VISIBILITY_CHANGE = 65536
  2362. const _XCB_EVENT_MASK_STRUCTURE_NOTIFY = 131072
  2363. const _XCB_EVENT_MASK_RESIZE_REDIRECT = 262144
  2364. const _XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY = 524288
  2365. const _XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT = 1048576
  2366. const _XCB_EVENT_MASK_FOCUS_CHANGE = 2097152
  2367. const _XCB_EVENT_MASK_PROPERTY_CHANGE = 4194304
  2368. const _XCB_EVENT_MASK_COLOR_MAP_CHANGE = 8388608
  2369. const _XCB_EVENT_MASK_OWNER_GRAB_BUTTON = 16777216
  2370. type Txcb_backing_store_t = int32
  2371. type _xcb_backing_store_t = int32
  2372. const _XCB_BACKING_STORE_NOT_USEFUL = 0
  2373. const _XCB_BACKING_STORE_WHEN_MAPPED = 1
  2374. const _XCB_BACKING_STORE_ALWAYS = 2
  2375. type Txcb_screen_t = struct {
  2376. Froot Txcb_window_t
  2377. Fdefault_colormap Txcb_colormap_t
  2378. Fwhite_pixel Tuint32_t
  2379. Fblack_pixel Tuint32_t
  2380. Fcurrent_input_masks Tuint32_t
  2381. Fwidth_in_pixels Tuint16_t
  2382. Fheight_in_pixels Tuint16_t
  2383. Fwidth_in_millimeters Tuint16_t
  2384. Fheight_in_millimeters Tuint16_t
  2385. Fmin_installed_maps Tuint16_t
  2386. Fmax_installed_maps Tuint16_t
  2387. Froot_visual Txcb_visualid_t
  2388. Fbacking_stores Tuint8_t
  2389. Fsave_unders Tuint8_t
  2390. Froot_depth Tuint8_t
  2391. Fallowed_depths_len Tuint8_t
  2392. }
  2393. type Txcb_screen_iterator_t = struct {
  2394. Fdata uintptr
  2395. Frem int32
  2396. Findex int32
  2397. }
  2398. type Txcb_setup_request_t = struct {
  2399. Fbyte_order Tuint8_t
  2400. Fpad0 Tuint8_t
  2401. Fprotocol_major_version Tuint16_t
  2402. Fprotocol_minor_version Tuint16_t
  2403. Fauthorization_protocol_name_len Tuint16_t
  2404. Fauthorization_protocol_data_len Tuint16_t
  2405. Fpad1 [2]Tuint8_t
  2406. }
  2407. type Txcb_setup_request_iterator_t = struct {
  2408. Fdata uintptr
  2409. Frem int32
  2410. Findex int32
  2411. }
  2412. type Txcb_setup_failed_t = struct {
  2413. Fstatus Tuint8_t
  2414. Freason_len Tuint8_t
  2415. Fprotocol_major_version Tuint16_t
  2416. Fprotocol_minor_version Tuint16_t
  2417. Flength Tuint16_t
  2418. }
  2419. type Txcb_setup_failed_iterator_t = struct {
  2420. Fdata uintptr
  2421. Frem int32
  2422. Findex int32
  2423. }
  2424. type Txcb_setup_authenticate_t = struct {
  2425. Fstatus Tuint8_t
  2426. Fpad0 [5]Tuint8_t
  2427. Flength Tuint16_t
  2428. }
  2429. type Txcb_setup_authenticate_iterator_t = struct {
  2430. Fdata uintptr
  2431. Frem int32
  2432. Findex int32
  2433. }
  2434. type Txcb_image_order_t = int32
  2435. type _xcb_image_order_t = int32
  2436. const _XCB_IMAGE_ORDER_LSB_FIRST = 0
  2437. const _XCB_IMAGE_ORDER_MSB_FIRST = 1
  2438. type Txcb_setup_t = struct {
  2439. Fstatus Tuint8_t
  2440. Fpad0 Tuint8_t
  2441. Fprotocol_major_version Tuint16_t
  2442. Fprotocol_minor_version Tuint16_t
  2443. Flength Tuint16_t
  2444. Frelease_number Tuint32_t
  2445. Fresource_id_base Tuint32_t
  2446. Fresource_id_mask Tuint32_t
  2447. Fmotion_buffer_size Tuint32_t
  2448. Fvendor_len Tuint16_t
  2449. Fmaximum_request_length Tuint16_t
  2450. Froots_len Tuint8_t
  2451. Fpixmap_formats_len Tuint8_t
  2452. Fimage_byte_order Tuint8_t
  2453. Fbitmap_format_bit_order Tuint8_t
  2454. Fbitmap_format_scanline_unit Tuint8_t
  2455. Fbitmap_format_scanline_pad Tuint8_t
  2456. Fmin_keycode Txcb_keycode_t
  2457. Fmax_keycode Txcb_keycode_t
  2458. Fpad1 [4]Tuint8_t
  2459. }
  2460. type Txcb_setup_iterator_t = struct {
  2461. Fdata uintptr
  2462. Frem int32
  2463. Findex int32
  2464. }
  2465. type Txcb_mod_mask_t = int32
  2466. type _xcb_mod_mask_t = int32
  2467. const _XCB_MOD_MASK_SHIFT = 1
  2468. const _XCB_MOD_MASK_LOCK = 2
  2469. const _XCB_MOD_MASK_CONTROL = 4
  2470. const _XCB_MOD_MASK_1 = 8
  2471. const _XCB_MOD_MASK_2 = 16
  2472. const _XCB_MOD_MASK_3 = 32
  2473. const _XCB_MOD_MASK_4 = 64
  2474. const _XCB_MOD_MASK_5 = 128
  2475. const _XCB_MOD_MASK_ANY = 32768
  2476. type Txcb_key_but_mask_t = int32
  2477. type _xcb_key_but_mask_t = int32
  2478. const _XCB_KEY_BUT_MASK_SHIFT = 1
  2479. const _XCB_KEY_BUT_MASK_LOCK = 2
  2480. const _XCB_KEY_BUT_MASK_CONTROL = 4
  2481. const _XCB_KEY_BUT_MASK_MOD_1 = 8
  2482. const _XCB_KEY_BUT_MASK_MOD_2 = 16
  2483. const _XCB_KEY_BUT_MASK_MOD_3 = 32
  2484. const _XCB_KEY_BUT_MASK_MOD_4 = 64
  2485. const _XCB_KEY_BUT_MASK_MOD_5 = 128
  2486. const _XCB_KEY_BUT_MASK_BUTTON_1 = 256
  2487. const _XCB_KEY_BUT_MASK_BUTTON_2 = 512
  2488. const _XCB_KEY_BUT_MASK_BUTTON_3 = 1024
  2489. const _XCB_KEY_BUT_MASK_BUTTON_4 = 2048
  2490. const _XCB_KEY_BUT_MASK_BUTTON_5 = 4096
  2491. type Txcb_window_enum_t = int32
  2492. type _xcb_window_enum_t = int32
  2493. const _XCB_WINDOW_NONE = 0
  2494. type Txcb_key_press_event_t = struct {
  2495. Fresponse_type Tuint8_t
  2496. Fdetail Txcb_keycode_t
  2497. Fsequence Tuint16_t
  2498. Ftime Txcb_timestamp_t
  2499. Froot Txcb_window_t
  2500. Fevent Txcb_window_t
  2501. Fchild Txcb_window_t
  2502. Froot_x Tint16_t
  2503. Froot_y Tint16_t
  2504. Fevent_x Tint16_t
  2505. Fevent_y Tint16_t
  2506. Fstate Tuint16_t
  2507. Fsame_screen Tuint8_t
  2508. Fpad0 Tuint8_t
  2509. }
  2510. type Txcb_key_release_event_t = struct {
  2511. Fresponse_type Tuint8_t
  2512. Fdetail Txcb_keycode_t
  2513. Fsequence Tuint16_t
  2514. Ftime Txcb_timestamp_t
  2515. Froot Txcb_window_t
  2516. Fevent Txcb_window_t
  2517. Fchild Txcb_window_t
  2518. Froot_x Tint16_t
  2519. Froot_y Tint16_t
  2520. Fevent_x Tint16_t
  2521. Fevent_y Tint16_t
  2522. Fstate Tuint16_t
  2523. Fsame_screen Tuint8_t
  2524. Fpad0 Tuint8_t
  2525. }
  2526. type Txcb_key_press_event_t1 = Txcb_key_release_event_t
  2527. type Txcb_button_mask_t = int32
  2528. type _xcb_button_mask_t = int32
  2529. const _XCB_BUTTON_MASK_1 = 256
  2530. const _XCB_BUTTON_MASK_2 = 512
  2531. const _XCB_BUTTON_MASK_3 = 1024
  2532. const _XCB_BUTTON_MASK_4 = 2048
  2533. const _XCB_BUTTON_MASK_5 = 4096
  2534. const _XCB_BUTTON_MASK_ANY = 32768
  2535. type Txcb_button_press_event_t = struct {
  2536. Fresponse_type Tuint8_t
  2537. Fdetail Txcb_button_t
  2538. Fsequence Tuint16_t
  2539. Ftime Txcb_timestamp_t
  2540. Froot Txcb_window_t
  2541. Fevent Txcb_window_t
  2542. Fchild Txcb_window_t
  2543. Froot_x Tint16_t
  2544. Froot_y Tint16_t
  2545. Fevent_x Tint16_t
  2546. Fevent_y Tint16_t
  2547. Fstate Tuint16_t
  2548. Fsame_screen Tuint8_t
  2549. Fpad0 Tuint8_t
  2550. }
  2551. type Txcb_button_release_event_t = struct {
  2552. Fresponse_type Tuint8_t
  2553. Fdetail Txcb_button_t
  2554. Fsequence Tuint16_t
  2555. Ftime Txcb_timestamp_t
  2556. Froot Txcb_window_t
  2557. Fevent Txcb_window_t
  2558. Fchild Txcb_window_t
  2559. Froot_x Tint16_t
  2560. Froot_y Tint16_t
  2561. Fevent_x Tint16_t
  2562. Fevent_y Tint16_t
  2563. Fstate Tuint16_t
  2564. Fsame_screen Tuint8_t
  2565. Fpad0 Tuint8_t
  2566. }
  2567. type Txcb_button_press_event_t1 = Txcb_button_release_event_t
  2568. type Txcb_motion_t = int32
  2569. type _xcb_motion_t = int32
  2570. const _XCB_MOTION_NORMAL = 0
  2571. const _XCB_MOTION_HINT = 1
  2572. type Txcb_motion_notify_event_t = struct {
  2573. Fresponse_type Tuint8_t
  2574. Fdetail Tuint8_t
  2575. Fsequence Tuint16_t
  2576. Ftime Txcb_timestamp_t
  2577. Froot Txcb_window_t
  2578. Fevent Txcb_window_t
  2579. Fchild Txcb_window_t
  2580. Froot_x Tint16_t
  2581. Froot_y Tint16_t
  2582. Fevent_x Tint16_t
  2583. Fevent_y Tint16_t
  2584. Fstate Tuint16_t
  2585. Fsame_screen Tuint8_t
  2586. Fpad0 Tuint8_t
  2587. }
  2588. type Txcb_notify_detail_t = int32
  2589. type _xcb_notify_detail_t = int32
  2590. const _XCB_NOTIFY_DETAIL_ANCESTOR = 0
  2591. const _XCB_NOTIFY_DETAIL_VIRTUAL = 1
  2592. const _XCB_NOTIFY_DETAIL_INFERIOR = 2
  2593. const _XCB_NOTIFY_DETAIL_NONLINEAR = 3
  2594. const _XCB_NOTIFY_DETAIL_NONLINEAR_VIRTUAL = 4
  2595. const _XCB_NOTIFY_DETAIL_POINTER = 5
  2596. const _XCB_NOTIFY_DETAIL_POINTER_ROOT = 6
  2597. const _XCB_NOTIFY_DETAIL_NONE = 7
  2598. type Txcb_notify_mode_t = int32
  2599. type _xcb_notify_mode_t = int32
  2600. const _XCB_NOTIFY_MODE_NORMAL = 0
  2601. const _XCB_NOTIFY_MODE_GRAB = 1
  2602. const _XCB_NOTIFY_MODE_UNGRAB = 2
  2603. const _XCB_NOTIFY_MODE_WHILE_GRABBED = 3
  2604. type Txcb_enter_notify_event_t = struct {
  2605. Fresponse_type Tuint8_t
  2606. Fdetail Tuint8_t
  2607. Fsequence Tuint16_t
  2608. Ftime Txcb_timestamp_t
  2609. Froot Txcb_window_t
  2610. Fevent Txcb_window_t
  2611. Fchild Txcb_window_t
  2612. Froot_x Tint16_t
  2613. Froot_y Tint16_t
  2614. Fevent_x Tint16_t
  2615. Fevent_y Tint16_t
  2616. Fstate Tuint16_t
  2617. Fmode Tuint8_t
  2618. Fsame_screen_focus Tuint8_t
  2619. }
  2620. type Txcb_leave_notify_event_t = struct {
  2621. Fresponse_type Tuint8_t
  2622. Fdetail Tuint8_t
  2623. Fsequence Tuint16_t
  2624. Ftime Txcb_timestamp_t
  2625. Froot Txcb_window_t
  2626. Fevent Txcb_window_t
  2627. Fchild Txcb_window_t
  2628. Froot_x Tint16_t
  2629. Froot_y Tint16_t
  2630. Fevent_x Tint16_t
  2631. Fevent_y Tint16_t
  2632. Fstate Tuint16_t
  2633. Fmode Tuint8_t
  2634. Fsame_screen_focus Tuint8_t
  2635. }
  2636. type Txcb_enter_notify_event_t1 = Txcb_leave_notify_event_t
  2637. type Txcb_focus_in_event_t = struct {
  2638. Fresponse_type Tuint8_t
  2639. Fdetail Tuint8_t
  2640. Fsequence Tuint16_t
  2641. Fevent Txcb_window_t
  2642. Fmode Tuint8_t
  2643. Fpad0 [3]Tuint8_t
  2644. }
  2645. type Txcb_focus_out_event_t = struct {
  2646. Fresponse_type Tuint8_t
  2647. Fdetail Tuint8_t
  2648. Fsequence Tuint16_t
  2649. Fevent Txcb_window_t
  2650. Fmode Tuint8_t
  2651. Fpad0 [3]Tuint8_t
  2652. }
  2653. type Txcb_focus_in_event_t1 = Txcb_focus_out_event_t
  2654. type Txcb_keymap_notify_event_t = struct {
  2655. Fresponse_type Tuint8_t
  2656. Fkeys [31]Tuint8_t
  2657. }
  2658. type Txcb_expose_event_t = struct {
  2659. Fresponse_type Tuint8_t
  2660. Fpad0 Tuint8_t
  2661. Fsequence Tuint16_t
  2662. Fwindow Txcb_window_t
  2663. Fx Tuint16_t
  2664. Fy Tuint16_t
  2665. Fwidth Tuint16_t
  2666. Fheight Tuint16_t
  2667. Fcount Tuint16_t
  2668. Fpad1 [2]Tuint8_t
  2669. }
  2670. type Txcb_graphics_exposure_event_t = struct {
  2671. Fresponse_type Tuint8_t
  2672. Fpad0 Tuint8_t
  2673. Fsequence Tuint16_t
  2674. Fdrawable Txcb_drawable_t
  2675. Fx Tuint16_t
  2676. Fy Tuint16_t
  2677. Fwidth Tuint16_t
  2678. Fheight Tuint16_t
  2679. Fminor_opcode Tuint16_t
  2680. Fcount Tuint16_t
  2681. Fmajor_opcode Tuint8_t
  2682. Fpad1 [3]Tuint8_t
  2683. }
  2684. type Txcb_no_exposure_event_t = struct {
  2685. Fresponse_type Tuint8_t
  2686. Fpad0 Tuint8_t
  2687. Fsequence Tuint16_t
  2688. Fdrawable Txcb_drawable_t
  2689. Fminor_opcode Tuint16_t
  2690. Fmajor_opcode Tuint8_t
  2691. Fpad1 Tuint8_t
  2692. }
  2693. type Txcb_visibility_t = int32
  2694. type _xcb_visibility_t = int32
  2695. const _XCB_VISIBILITY_UNOBSCURED = 0
  2696. const _XCB_VISIBILITY_PARTIALLY_OBSCURED = 1
  2697. const _XCB_VISIBILITY_FULLY_OBSCURED = 2
  2698. type Txcb_visibility_notify_event_t = struct {
  2699. Fresponse_type Tuint8_t
  2700. Fpad0 Tuint8_t
  2701. Fsequence Tuint16_t
  2702. Fwindow Txcb_window_t
  2703. Fstate Tuint8_t
  2704. Fpad1 [3]Tuint8_t
  2705. }
  2706. type Txcb_create_notify_event_t = struct {
  2707. Fresponse_type Tuint8_t
  2708. Fpad0 Tuint8_t
  2709. Fsequence Tuint16_t
  2710. Fparent Txcb_window_t
  2711. Fwindow Txcb_window_t
  2712. Fx Tint16_t
  2713. Fy Tint16_t
  2714. Fwidth Tuint16_t
  2715. Fheight Tuint16_t
  2716. Fborder_width Tuint16_t
  2717. Foverride_redirect Tuint8_t
  2718. Fpad1 Tuint8_t
  2719. }
  2720. type Txcb_destroy_notify_event_t = struct {
  2721. Fresponse_type Tuint8_t
  2722. Fpad0 Tuint8_t
  2723. Fsequence Tuint16_t
  2724. Fevent Txcb_window_t
  2725. Fwindow Txcb_window_t
  2726. }
  2727. type Txcb_unmap_notify_event_t = struct {
  2728. Fresponse_type Tuint8_t
  2729. Fpad0 Tuint8_t
  2730. Fsequence Tuint16_t
  2731. Fevent Txcb_window_t
  2732. Fwindow Txcb_window_t
  2733. Ffrom_configure Tuint8_t
  2734. Fpad1 [3]Tuint8_t
  2735. }
  2736. type Txcb_map_notify_event_t = struct {
  2737. Fresponse_type Tuint8_t
  2738. Fpad0 Tuint8_t
  2739. Fsequence Tuint16_t
  2740. Fevent Txcb_window_t
  2741. Fwindow Txcb_window_t
  2742. Foverride_redirect Tuint8_t
  2743. Fpad1 [3]Tuint8_t
  2744. }
  2745. type Txcb_map_request_event_t = struct {
  2746. Fresponse_type Tuint8_t
  2747. Fpad0 Tuint8_t
  2748. Fsequence Tuint16_t
  2749. Fparent Txcb_window_t
  2750. Fwindow Txcb_window_t
  2751. }
  2752. type Txcb_reparent_notify_event_t = struct {
  2753. Fresponse_type Tuint8_t
  2754. Fpad0 Tuint8_t
  2755. Fsequence Tuint16_t
  2756. Fevent Txcb_window_t
  2757. Fwindow Txcb_window_t
  2758. Fparent Txcb_window_t
  2759. Fx Tint16_t
  2760. Fy Tint16_t
  2761. Foverride_redirect Tuint8_t
  2762. Fpad1 [3]Tuint8_t
  2763. }
  2764. type Txcb_configure_notify_event_t = struct {
  2765. Fresponse_type Tuint8_t
  2766. Fpad0 Tuint8_t
  2767. Fsequence Tuint16_t
  2768. Fevent Txcb_window_t
  2769. Fwindow Txcb_window_t
  2770. Fabove_sibling Txcb_window_t
  2771. Fx Tint16_t
  2772. Fy Tint16_t
  2773. Fwidth Tuint16_t
  2774. Fheight Tuint16_t
  2775. Fborder_width Tuint16_t
  2776. Foverride_redirect Tuint8_t
  2777. Fpad1 Tuint8_t
  2778. }
  2779. type Txcb_configure_request_event_t = struct {
  2780. Fresponse_type Tuint8_t
  2781. Fstack_mode Tuint8_t
  2782. Fsequence Tuint16_t
  2783. Fparent Txcb_window_t
  2784. Fwindow Txcb_window_t
  2785. Fsibling Txcb_window_t
  2786. Fx Tint16_t
  2787. Fy Tint16_t
  2788. Fwidth Tuint16_t
  2789. Fheight Tuint16_t
  2790. Fborder_width Tuint16_t
  2791. Fvalue_mask Tuint16_t
  2792. }
  2793. type Txcb_gravity_notify_event_t = struct {
  2794. Fresponse_type Tuint8_t
  2795. Fpad0 Tuint8_t
  2796. Fsequence Tuint16_t
  2797. Fevent Txcb_window_t
  2798. Fwindow Txcb_window_t
  2799. Fx Tint16_t
  2800. Fy Tint16_t
  2801. }
  2802. type Txcb_resize_request_event_t = struct {
  2803. Fresponse_type Tuint8_t
  2804. Fpad0 Tuint8_t
  2805. Fsequence Tuint16_t
  2806. Fwindow Txcb_window_t
  2807. Fwidth Tuint16_t
  2808. Fheight Tuint16_t
  2809. }
  2810. type Txcb_place_t = int32
  2811. type _xcb_place_t = int32
  2812. const _XCB_PLACE_ON_TOP = 0
  2813. const _XCB_PLACE_ON_BOTTOM = 1
  2814. type Txcb_circulate_notify_event_t = struct {
  2815. Fresponse_type Tuint8_t
  2816. Fpad0 Tuint8_t
  2817. Fsequence Tuint16_t
  2818. Fevent Txcb_window_t
  2819. Fwindow Txcb_window_t
  2820. Fpad1 [4]Tuint8_t
  2821. Fplace Tuint8_t
  2822. Fpad2 [3]Tuint8_t
  2823. }
  2824. type Txcb_circulate_request_event_t = struct {
  2825. Fresponse_type Tuint8_t
  2826. Fpad0 Tuint8_t
  2827. Fsequence Tuint16_t
  2828. Fevent Txcb_window_t
  2829. Fwindow Txcb_window_t
  2830. Fpad1 [4]Tuint8_t
  2831. Fplace Tuint8_t
  2832. Fpad2 [3]Tuint8_t
  2833. }
  2834. type Txcb_circulate_notify_event_t1 = Txcb_circulate_request_event_t
  2835. type Txcb_property_t = int32
  2836. type _xcb_property_t = int32
  2837. const _XCB_PROPERTY_NEW_VALUE = 0
  2838. const _XCB_PROPERTY_DELETE = 1
  2839. type Txcb_property_notify_event_t = struct {
  2840. Fresponse_type Tuint8_t
  2841. Fpad0 Tuint8_t
  2842. Fsequence Tuint16_t
  2843. Fwindow Txcb_window_t
  2844. Fatom Txcb_atom_t
  2845. Ftime Txcb_timestamp_t
  2846. Fstate Tuint8_t
  2847. Fpad1 [3]Tuint8_t
  2848. }
  2849. type Txcb_selection_clear_event_t = struct {
  2850. Fresponse_type Tuint8_t
  2851. Fpad0 Tuint8_t
  2852. Fsequence Tuint16_t
  2853. Ftime Txcb_timestamp_t
  2854. Fowner Txcb_window_t
  2855. Fselection Txcb_atom_t
  2856. }
  2857. type Txcb_time_t = int32
  2858. type _xcb_time_t = int32
  2859. const _XCB_TIME_CURRENT_TIME = 0
  2860. type Txcb_atom_enum_t = int32
  2861. type _xcb_atom_enum_t = int32
  2862. const _XCB_ATOM_NONE = 0
  2863. const _XCB_ATOM_ANY = 0
  2864. const _XCB_ATOM_PRIMARY = 1
  2865. const _XCB_ATOM_SECONDARY = 2
  2866. const _XCB_ATOM_ARC = 3
  2867. const _XCB_ATOM_ATOM = 4
  2868. const _XCB_ATOM_BITMAP = 5
  2869. const _XCB_ATOM_CARDINAL = 6
  2870. const _XCB_ATOM_COLORMAP = 7
  2871. const _XCB_ATOM_CURSOR = 8
  2872. const _XCB_ATOM_CUT_BUFFER0 = 9
  2873. const _XCB_ATOM_CUT_BUFFER1 = 10
  2874. const _XCB_ATOM_CUT_BUFFER2 = 11
  2875. const _XCB_ATOM_CUT_BUFFER3 = 12
  2876. const _XCB_ATOM_CUT_BUFFER4 = 13
  2877. const _XCB_ATOM_CUT_BUFFER5 = 14
  2878. const _XCB_ATOM_CUT_BUFFER6 = 15
  2879. const _XCB_ATOM_CUT_BUFFER7 = 16
  2880. const _XCB_ATOM_DRAWABLE = 17
  2881. const _XCB_ATOM_FONT = 18
  2882. const _XCB_ATOM_INTEGER = 19
  2883. const _XCB_ATOM_PIXMAP = 20
  2884. const _XCB_ATOM_POINT = 21
  2885. const _XCB_ATOM_RECTANGLE = 22
  2886. const _XCB_ATOM_RESOURCE_MANAGER = 23
  2887. const _XCB_ATOM_RGB_COLOR_MAP = 24
  2888. const _XCB_ATOM_RGB_BEST_MAP = 25
  2889. const _XCB_ATOM_RGB_BLUE_MAP = 26
  2890. const _XCB_ATOM_RGB_DEFAULT_MAP = 27
  2891. const _XCB_ATOM_RGB_GRAY_MAP = 28
  2892. const _XCB_ATOM_RGB_GREEN_MAP = 29
  2893. const _XCB_ATOM_RGB_RED_MAP = 30
  2894. const _XCB_ATOM_STRING = 31
  2895. const _XCB_ATOM_VISUALID = 32
  2896. const _XCB_ATOM_WINDOW = 33
  2897. const _XCB_ATOM_WM_COMMAND = 34
  2898. const _XCB_ATOM_WM_HINTS = 35
  2899. const _XCB_ATOM_WM_CLIENT_MACHINE = 36
  2900. const _XCB_ATOM_WM_ICON_NAME = 37
  2901. const _XCB_ATOM_WM_ICON_SIZE = 38
  2902. const _XCB_ATOM_WM_NAME = 39
  2903. const _XCB_ATOM_WM_NORMAL_HINTS = 40
  2904. const _XCB_ATOM_WM_SIZE_HINTS = 41
  2905. const _XCB_ATOM_WM_ZOOM_HINTS = 42
  2906. const _XCB_ATOM_MIN_SPACE = 43
  2907. const _XCB_ATOM_NORM_SPACE = 44
  2908. const _XCB_ATOM_MAX_SPACE = 45
  2909. const _XCB_ATOM_END_SPACE = 46
  2910. const _XCB_ATOM_SUPERSCRIPT_X = 47
  2911. const _XCB_ATOM_SUPERSCRIPT_Y = 48
  2912. const _XCB_ATOM_SUBSCRIPT_X = 49
  2913. const _XCB_ATOM_SUBSCRIPT_Y = 50
  2914. const _XCB_ATOM_UNDERLINE_POSITION = 51
  2915. const _XCB_ATOM_UNDERLINE_THICKNESS = 52
  2916. const _XCB_ATOM_STRIKEOUT_ASCENT = 53
  2917. const _XCB_ATOM_STRIKEOUT_DESCENT = 54
  2918. const _XCB_ATOM_ITALIC_ANGLE = 55
  2919. const _XCB_ATOM_X_HEIGHT = 56
  2920. const _XCB_ATOM_QUAD_WIDTH = 57
  2921. const _XCB_ATOM_WEIGHT = 58
  2922. const _XCB_ATOM_POINT_SIZE = 59
  2923. const _XCB_ATOM_RESOLUTION = 60
  2924. const _XCB_ATOM_COPYRIGHT = 61
  2925. const _XCB_ATOM_NOTICE = 62
  2926. const _XCB_ATOM_FONT_NAME = 63
  2927. const _XCB_ATOM_FAMILY_NAME = 64
  2928. const _XCB_ATOM_FULL_NAME = 65
  2929. const _XCB_ATOM_CAP_HEIGHT = 66
  2930. const _XCB_ATOM_WM_CLASS = 67
  2931. const _XCB_ATOM_WM_TRANSIENT_FOR = 68
  2932. type Txcb_selection_request_event_t = struct {
  2933. Fresponse_type Tuint8_t
  2934. Fpad0 Tuint8_t
  2935. Fsequence Tuint16_t
  2936. Ftime Txcb_timestamp_t
  2937. Fowner Txcb_window_t
  2938. Frequestor Txcb_window_t
  2939. Fselection Txcb_atom_t
  2940. Ftarget Txcb_atom_t
  2941. Fproperty Txcb_atom_t
  2942. }
  2943. type Txcb_selection_notify_event_t = struct {
  2944. Fresponse_type Tuint8_t
  2945. Fpad0 Tuint8_t
  2946. Fsequence Tuint16_t
  2947. Ftime Txcb_timestamp_t
  2948. Frequestor Txcb_window_t
  2949. Fselection Txcb_atom_t
  2950. Ftarget Txcb_atom_t
  2951. Fproperty Txcb_atom_t
  2952. }
  2953. type Txcb_colormap_state_t = int32
  2954. type _xcb_colormap_state_t = int32
  2955. const _XCB_COLORMAP_STATE_UNINSTALLED = 0
  2956. const _XCB_COLORMAP_STATE_INSTALLED = 1
  2957. type Txcb_colormap_enum_t = int32
  2958. type _xcb_colormap_enum_t = int32
  2959. const _XCB_COLORMAP_NONE = 0
  2960. type Txcb_colormap_notify_event_t = struct {
  2961. Fresponse_type Tuint8_t
  2962. Fpad0 Tuint8_t
  2963. Fsequence Tuint16_t
  2964. Fwindow Txcb_window_t
  2965. Fcolormap Txcb_colormap_t
  2966. F_new Tuint8_t
  2967. Fstate Tuint8_t
  2968. Fpad1 [2]Tuint8_t
  2969. }
  2970. type Txcb_client_message_data_t = struct {
  2971. Fdata16 [0][10]Tuint16_t
  2972. Fdata32 [0][5]Tuint32_t
  2973. Fdata8 [20]Tuint8_t
  2974. }
  2975. type Txcb_client_message_data_iterator_t = struct {
  2976. Fdata uintptr
  2977. Frem int32
  2978. Findex int32
  2979. }
  2980. type Txcb_client_message_event_t = struct {
  2981. Fresponse_type Tuint8_t
  2982. Fformat Tuint8_t
  2983. Fsequence Tuint16_t
  2984. Fwindow Txcb_window_t
  2985. Ftype1 Txcb_atom_t
  2986. Fdata Txcb_client_message_data_t
  2987. }
  2988. type Txcb_mapping_t = int32
  2989. type _xcb_mapping_t = int32
  2990. const _XCB_MAPPING_MODIFIER = 0
  2991. const _XCB_MAPPING_KEYBOARD = 1
  2992. const _XCB_MAPPING_POINTER = 2
  2993. type Txcb_mapping_notify_event_t = struct {
  2994. Fresponse_type Tuint8_t
  2995. Fpad0 Tuint8_t
  2996. Fsequence Tuint16_t
  2997. Frequest Tuint8_t
  2998. Ffirst_keycode Txcb_keycode_t
  2999. Fcount Tuint8_t
  3000. Fpad1 Tuint8_t
  3001. }
  3002. type Txcb_ge_generic_event_t = struct {
  3003. Fresponse_type Tuint8_t
  3004. Fextension Tuint8_t
  3005. Fsequence Tuint16_t
  3006. Flength Tuint32_t
  3007. Fevent_type Tuint16_t
  3008. Fpad0 [22]Tuint8_t
  3009. Ffull_sequence Tuint32_t
  3010. }
  3011. type Txcb_request_error_t = struct {
  3012. Fresponse_type Tuint8_t
  3013. Ferror_code Tuint8_t
  3014. Fsequence Tuint16_t
  3015. Fbad_value Tuint32_t
  3016. Fminor_opcode Tuint16_t
  3017. Fmajor_opcode Tuint8_t
  3018. Fpad0 Tuint8_t
  3019. }
  3020. type Txcb_value_error_t = struct {
  3021. Fresponse_type Tuint8_t
  3022. Ferror_code Tuint8_t
  3023. Fsequence Tuint16_t
  3024. Fbad_value Tuint32_t
  3025. Fminor_opcode Tuint16_t
  3026. Fmajor_opcode Tuint8_t
  3027. Fpad0 Tuint8_t
  3028. }
  3029. type Txcb_window_error_t = struct {
  3030. Fresponse_type Tuint8_t
  3031. Ferror_code Tuint8_t
  3032. Fsequence Tuint16_t
  3033. Fbad_value Tuint32_t
  3034. Fminor_opcode Tuint16_t
  3035. Fmajor_opcode Tuint8_t
  3036. Fpad0 Tuint8_t
  3037. }
  3038. type Txcb_value_error_t1 = Txcb_window_error_t
  3039. type Txcb_pixmap_error_t = struct {
  3040. Fresponse_type Tuint8_t
  3041. Ferror_code Tuint8_t
  3042. Fsequence Tuint16_t
  3043. Fbad_value Tuint32_t
  3044. Fminor_opcode Tuint16_t
  3045. Fmajor_opcode Tuint8_t
  3046. Fpad0 Tuint8_t
  3047. }
  3048. type Txcb_atom_error_t = struct {
  3049. Fresponse_type Tuint8_t
  3050. Ferror_code Tuint8_t
  3051. Fsequence Tuint16_t
  3052. Fbad_value Tuint32_t
  3053. Fminor_opcode Tuint16_t
  3054. Fmajor_opcode Tuint8_t
  3055. Fpad0 Tuint8_t
  3056. }
  3057. type Txcb_cursor_error_t = struct {
  3058. Fresponse_type Tuint8_t
  3059. Ferror_code Tuint8_t
  3060. Fsequence Tuint16_t
  3061. Fbad_value Tuint32_t
  3062. Fminor_opcode Tuint16_t
  3063. Fmajor_opcode Tuint8_t
  3064. Fpad0 Tuint8_t
  3065. }
  3066. type Txcb_font_error_t = struct {
  3067. Fresponse_type Tuint8_t
  3068. Ferror_code Tuint8_t
  3069. Fsequence Tuint16_t
  3070. Fbad_value Tuint32_t
  3071. Fminor_opcode Tuint16_t
  3072. Fmajor_opcode Tuint8_t
  3073. Fpad0 Tuint8_t
  3074. }
  3075. type Txcb_match_error_t = struct {
  3076. Fresponse_type Tuint8_t
  3077. Ferror_code Tuint8_t
  3078. Fsequence Tuint16_t
  3079. Fbad_value Tuint32_t
  3080. Fminor_opcode Tuint16_t
  3081. Fmajor_opcode Tuint8_t
  3082. Fpad0 Tuint8_t
  3083. }
  3084. type Txcb_request_error_t1 = Txcb_match_error_t
  3085. type Txcb_drawable_error_t = struct {
  3086. Fresponse_type Tuint8_t
  3087. Ferror_code Tuint8_t
  3088. Fsequence Tuint16_t
  3089. Fbad_value Tuint32_t
  3090. Fminor_opcode Tuint16_t
  3091. Fmajor_opcode Tuint8_t
  3092. Fpad0 Tuint8_t
  3093. }
  3094. type Txcb_access_error_t = struct {
  3095. Fresponse_type Tuint8_t
  3096. Ferror_code Tuint8_t
  3097. Fsequence Tuint16_t
  3098. Fbad_value Tuint32_t
  3099. Fminor_opcode Tuint16_t
  3100. Fmajor_opcode Tuint8_t
  3101. Fpad0 Tuint8_t
  3102. }
  3103. type Txcb_alloc_error_t = struct {
  3104. Fresponse_type Tuint8_t
  3105. Ferror_code Tuint8_t
  3106. Fsequence Tuint16_t
  3107. Fbad_value Tuint32_t
  3108. Fminor_opcode Tuint16_t
  3109. Fmajor_opcode Tuint8_t
  3110. Fpad0 Tuint8_t
  3111. }
  3112. type Txcb_colormap_error_t = struct {
  3113. Fresponse_type Tuint8_t
  3114. Ferror_code Tuint8_t
  3115. Fsequence Tuint16_t
  3116. Fbad_value Tuint32_t
  3117. Fminor_opcode Tuint16_t
  3118. Fmajor_opcode Tuint8_t
  3119. Fpad0 Tuint8_t
  3120. }
  3121. type Txcb_g_context_error_t = struct {
  3122. Fresponse_type Tuint8_t
  3123. Ferror_code Tuint8_t
  3124. Fsequence Tuint16_t
  3125. Fbad_value Tuint32_t
  3126. Fminor_opcode Tuint16_t
  3127. Fmajor_opcode Tuint8_t
  3128. Fpad0 Tuint8_t
  3129. }
  3130. type Txcb_id_choice_error_t = struct {
  3131. Fresponse_type Tuint8_t
  3132. Ferror_code Tuint8_t
  3133. Fsequence Tuint16_t
  3134. Fbad_value Tuint32_t
  3135. Fminor_opcode Tuint16_t
  3136. Fmajor_opcode Tuint8_t
  3137. Fpad0 Tuint8_t
  3138. }
  3139. type Txcb_name_error_t = struct {
  3140. Fresponse_type Tuint8_t
  3141. Ferror_code Tuint8_t
  3142. Fsequence Tuint16_t
  3143. Fbad_value Tuint32_t
  3144. Fminor_opcode Tuint16_t
  3145. Fmajor_opcode Tuint8_t
  3146. Fpad0 Tuint8_t
  3147. }
  3148. type Txcb_length_error_t = struct {
  3149. Fresponse_type Tuint8_t
  3150. Ferror_code Tuint8_t
  3151. Fsequence Tuint16_t
  3152. Fbad_value Tuint32_t
  3153. Fminor_opcode Tuint16_t
  3154. Fmajor_opcode Tuint8_t
  3155. Fpad0 Tuint8_t
  3156. }
  3157. type Txcb_implementation_error_t = struct {
  3158. Fresponse_type Tuint8_t
  3159. Ferror_code Tuint8_t
  3160. Fsequence Tuint16_t
  3161. Fbad_value Tuint32_t
  3162. Fminor_opcode Tuint16_t
  3163. Fmajor_opcode Tuint8_t
  3164. Fpad0 Tuint8_t
  3165. }
  3166. type Txcb_window_class_t = int32
  3167. type _xcb_window_class_t = int32
  3168. const _XCB_WINDOW_CLASS_COPY_FROM_PARENT = 0
  3169. const _XCB_WINDOW_CLASS_INPUT_OUTPUT = 1
  3170. const _XCB_WINDOW_CLASS_INPUT_ONLY = 2
  3171. type Txcb_cw_t = int32
  3172. type _xcb_cw_t = int32
  3173. const _XCB_CW_BACK_PIXMAP = 1
  3174. const _XCB_CW_BACK_PIXEL = 2
  3175. const _XCB_CW_BORDER_PIXMAP = 4
  3176. const _XCB_CW_BORDER_PIXEL = 8
  3177. const _XCB_CW_BIT_GRAVITY = 16
  3178. const _XCB_CW_WIN_GRAVITY = 32
  3179. const _XCB_CW_BACKING_STORE = 64
  3180. const _XCB_CW_BACKING_PLANES = 128
  3181. const _XCB_CW_BACKING_PIXEL = 256
  3182. const _XCB_CW_OVERRIDE_REDIRECT = 512
  3183. const _XCB_CW_SAVE_UNDER = 1024
  3184. const _XCB_CW_EVENT_MASK = 2048
  3185. const _XCB_CW_DONT_PROPAGATE = 4096
  3186. const _XCB_CW_COLORMAP = 8192
  3187. const _XCB_CW_CURSOR = 16384
  3188. type Txcb_back_pixmap_t = int32
  3189. type _xcb_back_pixmap_t = int32
  3190. const _XCB_BACK_PIXMAP_NONE = 0
  3191. const _XCB_BACK_PIXMAP_PARENT_RELATIVE = 1
  3192. type Txcb_gravity_t = int32
  3193. type _xcb_gravity_t = int32
  3194. const _XCB_GRAVITY_BIT_FORGET = 0
  3195. const _XCB_GRAVITY_WIN_UNMAP = 0
  3196. const _XCB_GRAVITY_NORTH_WEST = 1
  3197. const _XCB_GRAVITY_NORTH = 2
  3198. const _XCB_GRAVITY_NORTH_EAST = 3
  3199. const _XCB_GRAVITY_WEST = 4
  3200. const _XCB_GRAVITY_CENTER = 5
  3201. const _XCB_GRAVITY_EAST = 6
  3202. const _XCB_GRAVITY_SOUTH_WEST = 7
  3203. const _XCB_GRAVITY_SOUTH = 8
  3204. const _XCB_GRAVITY_SOUTH_EAST = 9
  3205. const _XCB_GRAVITY_STATIC = 10
  3206. type Txcb_create_window_value_list_t = struct {
  3207. Fbackground_pixmap Txcb_pixmap_t
  3208. Fbackground_pixel Tuint32_t
  3209. Fborder_pixmap Txcb_pixmap_t
  3210. Fborder_pixel Tuint32_t
  3211. Fbit_gravity Tuint32_t
  3212. Fwin_gravity Tuint32_t
  3213. Fbacking_store Tuint32_t
  3214. Fbacking_planes Tuint32_t
  3215. Fbacking_pixel Tuint32_t
  3216. Foverride_redirect Txcb_bool32_t
  3217. Fsave_under Txcb_bool32_t
  3218. Fevent_mask Tuint32_t
  3219. Fdo_not_propogate_mask Tuint32_t
  3220. Fcolormap Txcb_colormap_t
  3221. Fcursor Txcb_cursor_t
  3222. }
  3223. type Txcb_create_window_request_t = struct {
  3224. Fmajor_opcode Tuint8_t
  3225. Fdepth Tuint8_t
  3226. Flength Tuint16_t
  3227. Fwid Txcb_window_t
  3228. Fparent Txcb_window_t
  3229. Fx Tint16_t
  3230. Fy Tint16_t
  3231. Fwidth Tuint16_t
  3232. Fheight Tuint16_t
  3233. Fborder_width Tuint16_t
  3234. F_class Tuint16_t
  3235. Fvisual Txcb_visualid_t
  3236. Fvalue_mask Tuint32_t
  3237. }
  3238. type Txcb_change_window_attributes_value_list_t = struct {
  3239. Fbackground_pixmap Txcb_pixmap_t
  3240. Fbackground_pixel Tuint32_t
  3241. Fborder_pixmap Txcb_pixmap_t
  3242. Fborder_pixel Tuint32_t
  3243. Fbit_gravity Tuint32_t
  3244. Fwin_gravity Tuint32_t
  3245. Fbacking_store Tuint32_t
  3246. Fbacking_planes Tuint32_t
  3247. Fbacking_pixel Tuint32_t
  3248. Foverride_redirect Txcb_bool32_t
  3249. Fsave_under Txcb_bool32_t
  3250. Fevent_mask Tuint32_t
  3251. Fdo_not_propogate_mask Tuint32_t
  3252. Fcolormap Txcb_colormap_t
  3253. Fcursor Txcb_cursor_t
  3254. }
  3255. type Txcb_change_window_attributes_request_t = struct {
  3256. Fmajor_opcode Tuint8_t
  3257. Fpad0 Tuint8_t
  3258. Flength Tuint16_t
  3259. Fwindow Txcb_window_t
  3260. Fvalue_mask Tuint32_t
  3261. }
  3262. type Txcb_map_state_t = int32
  3263. type _xcb_map_state_t = int32
  3264. const _XCB_MAP_STATE_UNMAPPED = 0
  3265. const _XCB_MAP_STATE_UNVIEWABLE = 1
  3266. const _XCB_MAP_STATE_VIEWABLE = 2
  3267. type Txcb_get_window_attributes_cookie_t = struct {
  3268. Fsequence uint32
  3269. }
  3270. type Txcb_get_window_attributes_request_t = struct {
  3271. Fmajor_opcode Tuint8_t
  3272. Fpad0 Tuint8_t
  3273. Flength Tuint16_t
  3274. Fwindow Txcb_window_t
  3275. }
  3276. type Txcb_get_window_attributes_reply_t = struct {
  3277. Fresponse_type Tuint8_t
  3278. Fbacking_store Tuint8_t
  3279. Fsequence Tuint16_t
  3280. Flength Tuint32_t
  3281. Fvisual Txcb_visualid_t
  3282. F_class Tuint16_t
  3283. Fbit_gravity Tuint8_t
  3284. Fwin_gravity Tuint8_t
  3285. Fbacking_planes Tuint32_t
  3286. Fbacking_pixel Tuint32_t
  3287. Fsave_under Tuint8_t
  3288. Fmap_is_installed Tuint8_t
  3289. Fmap_state Tuint8_t
  3290. Foverride_redirect Tuint8_t
  3291. Fcolormap Txcb_colormap_t
  3292. Fall_event_masks Tuint32_t
  3293. Fyour_event_mask Tuint32_t
  3294. Fdo_not_propagate_mask Tuint16_t
  3295. Fpad0 [2]Tuint8_t
  3296. }
  3297. type Txcb_destroy_window_request_t = struct {
  3298. Fmajor_opcode Tuint8_t
  3299. Fpad0 Tuint8_t
  3300. Flength Tuint16_t
  3301. Fwindow Txcb_window_t
  3302. }
  3303. type Txcb_destroy_subwindows_request_t = struct {
  3304. Fmajor_opcode Tuint8_t
  3305. Fpad0 Tuint8_t
  3306. Flength Tuint16_t
  3307. Fwindow Txcb_window_t
  3308. }
  3309. type Txcb_set_mode_t = int32
  3310. type _xcb_set_mode_t = int32
  3311. const _XCB_SET_MODE_INSERT = 0
  3312. const _XCB_SET_MODE_DELETE = 1
  3313. type Txcb_change_save_set_request_t = struct {
  3314. Fmajor_opcode Tuint8_t
  3315. Fmode Tuint8_t
  3316. Flength Tuint16_t
  3317. Fwindow Txcb_window_t
  3318. }
  3319. type Txcb_reparent_window_request_t = struct {
  3320. Fmajor_opcode Tuint8_t
  3321. Fpad0 Tuint8_t
  3322. Flength Tuint16_t
  3323. Fwindow Txcb_window_t
  3324. Fparent Txcb_window_t
  3325. Fx Tint16_t
  3326. Fy Tint16_t
  3327. }
  3328. type Txcb_map_window_request_t = struct {
  3329. Fmajor_opcode Tuint8_t
  3330. Fpad0 Tuint8_t
  3331. Flength Tuint16_t
  3332. Fwindow Txcb_window_t
  3333. }
  3334. type Txcb_map_subwindows_request_t = struct {
  3335. Fmajor_opcode Tuint8_t
  3336. Fpad0 Tuint8_t
  3337. Flength Tuint16_t
  3338. Fwindow Txcb_window_t
  3339. }
  3340. type Txcb_unmap_window_request_t = struct {
  3341. Fmajor_opcode Tuint8_t
  3342. Fpad0 Tuint8_t
  3343. Flength Tuint16_t
  3344. Fwindow Txcb_window_t
  3345. }
  3346. type Txcb_unmap_subwindows_request_t = struct {
  3347. Fmajor_opcode Tuint8_t
  3348. Fpad0 Tuint8_t
  3349. Flength Tuint16_t
  3350. Fwindow Txcb_window_t
  3351. }
  3352. type Txcb_config_window_t = int32
  3353. type _xcb_config_window_t = int32
  3354. const _XCB_CONFIG_WINDOW_X = 1
  3355. const _XCB_CONFIG_WINDOW_Y = 2
  3356. const _XCB_CONFIG_WINDOW_WIDTH = 4
  3357. const _XCB_CONFIG_WINDOW_HEIGHT = 8
  3358. const _XCB_CONFIG_WINDOW_BORDER_WIDTH = 16
  3359. const _XCB_CONFIG_WINDOW_SIBLING = 32
  3360. const _XCB_CONFIG_WINDOW_STACK_MODE = 64
  3361. type Txcb_stack_mode_t = int32
  3362. type _xcb_stack_mode_t = int32
  3363. const _XCB_STACK_MODE_ABOVE = 0
  3364. const _XCB_STACK_MODE_BELOW = 1
  3365. const _XCB_STACK_MODE_TOP_IF = 2
  3366. const _XCB_STACK_MODE_BOTTOM_IF = 3
  3367. const _XCB_STACK_MODE_OPPOSITE = 4
  3368. type Txcb_configure_window_value_list_t = struct {
  3369. Fx Tint32_t
  3370. Fy Tint32_t
  3371. Fwidth Tuint32_t
  3372. Fheight Tuint32_t
  3373. Fborder_width Tuint32_t
  3374. Fsibling Txcb_window_t
  3375. Fstack_mode Tuint32_t
  3376. }
  3377. type Txcb_configure_window_request_t = struct {
  3378. Fmajor_opcode Tuint8_t
  3379. Fpad0 Tuint8_t
  3380. Flength Tuint16_t
  3381. Fwindow Txcb_window_t
  3382. Fvalue_mask Tuint16_t
  3383. Fpad1 [2]Tuint8_t
  3384. }
  3385. type Txcb_circulate_t = int32
  3386. type _xcb_circulate_t = int32
  3387. const _XCB_CIRCULATE_RAISE_LOWEST = 0
  3388. const _XCB_CIRCULATE_LOWER_HIGHEST = 1
  3389. type Txcb_circulate_window_request_t = struct {
  3390. Fmajor_opcode Tuint8_t
  3391. Fdirection Tuint8_t
  3392. Flength Tuint16_t
  3393. Fwindow Txcb_window_t
  3394. }
  3395. type Txcb_get_geometry_cookie_t = struct {
  3396. Fsequence uint32
  3397. }
  3398. type Txcb_get_geometry_request_t = struct {
  3399. Fmajor_opcode Tuint8_t
  3400. Fpad0 Tuint8_t
  3401. Flength Tuint16_t
  3402. Fdrawable Txcb_drawable_t
  3403. }
  3404. type Txcb_get_geometry_reply_t = struct {
  3405. Fresponse_type Tuint8_t
  3406. Fdepth Tuint8_t
  3407. Fsequence Tuint16_t
  3408. Flength Tuint32_t
  3409. Froot Txcb_window_t
  3410. Fx Tint16_t
  3411. Fy Tint16_t
  3412. Fwidth Tuint16_t
  3413. Fheight Tuint16_t
  3414. Fborder_width Tuint16_t
  3415. Fpad0 [2]Tuint8_t
  3416. }
  3417. type Txcb_query_tree_cookie_t = struct {
  3418. Fsequence uint32
  3419. }
  3420. type Txcb_query_tree_request_t = struct {
  3421. Fmajor_opcode Tuint8_t
  3422. Fpad0 Tuint8_t
  3423. Flength Tuint16_t
  3424. Fwindow Txcb_window_t
  3425. }
  3426. type Txcb_query_tree_reply_t = struct {
  3427. Fresponse_type Tuint8_t
  3428. Fpad0 Tuint8_t
  3429. Fsequence Tuint16_t
  3430. Flength Tuint32_t
  3431. Froot Txcb_window_t
  3432. Fparent Txcb_window_t
  3433. Fchildren_len Tuint16_t
  3434. Fpad1 [14]Tuint8_t
  3435. }
  3436. type Txcb_intern_atom_cookie_t = struct {
  3437. Fsequence uint32
  3438. }
  3439. type Txcb_intern_atom_request_t = struct {
  3440. Fmajor_opcode Tuint8_t
  3441. Fonly_if_exists Tuint8_t
  3442. Flength Tuint16_t
  3443. Fname_len Tuint16_t
  3444. Fpad0 [2]Tuint8_t
  3445. }
  3446. type Txcb_intern_atom_reply_t = struct {
  3447. Fresponse_type Tuint8_t
  3448. Fpad0 Tuint8_t
  3449. Fsequence Tuint16_t
  3450. Flength Tuint32_t
  3451. Fatom Txcb_atom_t
  3452. }
  3453. type Txcb_get_atom_name_cookie_t = struct {
  3454. Fsequence uint32
  3455. }
  3456. type Txcb_get_atom_name_request_t = struct {
  3457. Fmajor_opcode Tuint8_t
  3458. Fpad0 Tuint8_t
  3459. Flength Tuint16_t
  3460. Fatom Txcb_atom_t
  3461. }
  3462. type Txcb_get_atom_name_reply_t = struct {
  3463. Fresponse_type Tuint8_t
  3464. Fpad0 Tuint8_t
  3465. Fsequence Tuint16_t
  3466. Flength Tuint32_t
  3467. Fname_len Tuint16_t
  3468. Fpad1 [22]Tuint8_t
  3469. }
  3470. type Txcb_prop_mode_t = int32
  3471. type _xcb_prop_mode_t = int32
  3472. const _XCB_PROP_MODE_REPLACE = 0
  3473. const _XCB_PROP_MODE_PREPEND = 1
  3474. const _XCB_PROP_MODE_APPEND = 2
  3475. type Txcb_change_property_request_t = struct {
  3476. Fmajor_opcode Tuint8_t
  3477. Fmode Tuint8_t
  3478. Flength Tuint16_t
  3479. Fwindow Txcb_window_t
  3480. Fproperty Txcb_atom_t
  3481. Ftype1 Txcb_atom_t
  3482. Fformat Tuint8_t
  3483. Fpad0 [3]Tuint8_t
  3484. Fdata_len Tuint32_t
  3485. }
  3486. type Txcb_delete_property_request_t = struct {
  3487. Fmajor_opcode Tuint8_t
  3488. Fpad0 Tuint8_t
  3489. Flength Tuint16_t
  3490. Fwindow Txcb_window_t
  3491. Fproperty Txcb_atom_t
  3492. }
  3493. type Txcb_get_property_type_t = int32
  3494. type _xcb_get_property_type_t = int32
  3495. const _XCB_GET_PROPERTY_TYPE_ANY = 0
  3496. type Txcb_get_property_cookie_t = struct {
  3497. Fsequence uint32
  3498. }
  3499. type Txcb_get_property_request_t = struct {
  3500. Fmajor_opcode Tuint8_t
  3501. F_delete Tuint8_t
  3502. Flength Tuint16_t
  3503. Fwindow Txcb_window_t
  3504. Fproperty Txcb_atom_t
  3505. Ftype1 Txcb_atom_t
  3506. Flong_offset Tuint32_t
  3507. Flong_length Tuint32_t
  3508. }
  3509. type Txcb_get_property_reply_t = struct {
  3510. Fresponse_type Tuint8_t
  3511. Fformat Tuint8_t
  3512. Fsequence Tuint16_t
  3513. Flength Tuint32_t
  3514. Ftype1 Txcb_atom_t
  3515. Fbytes_after Tuint32_t
  3516. Fvalue_len Tuint32_t
  3517. Fpad0 [12]Tuint8_t
  3518. }
  3519. type Txcb_list_properties_cookie_t = struct {
  3520. Fsequence uint32
  3521. }
  3522. type Txcb_list_properties_request_t = struct {
  3523. Fmajor_opcode Tuint8_t
  3524. Fpad0 Tuint8_t
  3525. Flength Tuint16_t
  3526. Fwindow Txcb_window_t
  3527. }
  3528. type Txcb_list_properties_reply_t = struct {
  3529. Fresponse_type Tuint8_t
  3530. Fpad0 Tuint8_t
  3531. Fsequence Tuint16_t
  3532. Flength Tuint32_t
  3533. Fatoms_len Tuint16_t
  3534. Fpad1 [22]Tuint8_t
  3535. }
  3536. type Txcb_set_selection_owner_request_t = struct {
  3537. Fmajor_opcode Tuint8_t
  3538. Fpad0 Tuint8_t
  3539. Flength Tuint16_t
  3540. Fowner Txcb_window_t
  3541. Fselection Txcb_atom_t
  3542. Ftime Txcb_timestamp_t
  3543. }
  3544. type Txcb_get_selection_owner_cookie_t = struct {
  3545. Fsequence uint32
  3546. }
  3547. type Txcb_get_selection_owner_request_t = struct {
  3548. Fmajor_opcode Tuint8_t
  3549. Fpad0 Tuint8_t
  3550. Flength Tuint16_t
  3551. Fselection Txcb_atom_t
  3552. }
  3553. type Txcb_get_selection_owner_reply_t = struct {
  3554. Fresponse_type Tuint8_t
  3555. Fpad0 Tuint8_t
  3556. Fsequence Tuint16_t
  3557. Flength Tuint32_t
  3558. Fowner Txcb_window_t
  3559. }
  3560. type Txcb_convert_selection_request_t = struct {
  3561. Fmajor_opcode Tuint8_t
  3562. Fpad0 Tuint8_t
  3563. Flength Tuint16_t
  3564. Frequestor Txcb_window_t
  3565. Fselection Txcb_atom_t
  3566. Ftarget Txcb_atom_t
  3567. Fproperty Txcb_atom_t
  3568. Ftime Txcb_timestamp_t
  3569. }
  3570. type Txcb_send_event_dest_t = int32
  3571. type _xcb_send_event_dest_t = int32
  3572. const _XCB_SEND_EVENT_DEST_POINTER_WINDOW = 0
  3573. const _XCB_SEND_EVENT_DEST_ITEM_FOCUS = 1
  3574. type Txcb_send_event_request_t = struct {
  3575. Fmajor_opcode Tuint8_t
  3576. Fpropagate Tuint8_t
  3577. Flength Tuint16_t
  3578. Fdestination Txcb_window_t
  3579. Fevent_mask Tuint32_t
  3580. Fevent [32]int8
  3581. }
  3582. type Txcb_grab_mode_t = int32
  3583. type _xcb_grab_mode_t = int32
  3584. const _XCB_GRAB_MODE_SYNC = 0
  3585. const _XCB_GRAB_MODE_ASYNC = 1
  3586. type Txcb_grab_status_t = int32
  3587. type _xcb_grab_status_t = int32
  3588. const _XCB_GRAB_STATUS_SUCCESS = 0
  3589. const _XCB_GRAB_STATUS_ALREADY_GRABBED = 1
  3590. const _XCB_GRAB_STATUS_INVALID_TIME = 2
  3591. const _XCB_GRAB_STATUS_NOT_VIEWABLE = 3
  3592. const _XCB_GRAB_STATUS_FROZEN = 4
  3593. type Txcb_cursor_enum_t = int32
  3594. type _xcb_cursor_enum_t = int32
  3595. const _XCB_CURSOR_NONE = 0
  3596. type Txcb_grab_pointer_cookie_t = struct {
  3597. Fsequence uint32
  3598. }
  3599. type Txcb_grab_pointer_request_t = struct {
  3600. Fmajor_opcode Tuint8_t
  3601. Fowner_events Tuint8_t
  3602. Flength Tuint16_t
  3603. Fgrab_window Txcb_window_t
  3604. Fevent_mask Tuint16_t
  3605. Fpointer_mode Tuint8_t
  3606. Fkeyboard_mode Tuint8_t
  3607. Fconfine_to Txcb_window_t
  3608. Fcursor Txcb_cursor_t
  3609. Ftime Txcb_timestamp_t
  3610. }
  3611. type Txcb_grab_pointer_reply_t = struct {
  3612. Fresponse_type Tuint8_t
  3613. Fstatus Tuint8_t
  3614. Fsequence Tuint16_t
  3615. Flength Tuint32_t
  3616. }
  3617. type Txcb_ungrab_pointer_request_t = struct {
  3618. Fmajor_opcode Tuint8_t
  3619. Fpad0 Tuint8_t
  3620. Flength Tuint16_t
  3621. Ftime Txcb_timestamp_t
  3622. }
  3623. type Txcb_button_index_t = int32
  3624. type _xcb_button_index_t = int32
  3625. const _XCB_BUTTON_INDEX_ANY = 0
  3626. const _XCB_BUTTON_INDEX_1 = 1
  3627. const _XCB_BUTTON_INDEX_2 = 2
  3628. const _XCB_BUTTON_INDEX_3 = 3
  3629. const _XCB_BUTTON_INDEX_4 = 4
  3630. const _XCB_BUTTON_INDEX_5 = 5
  3631. type Txcb_grab_button_request_t = struct {
  3632. Fmajor_opcode Tuint8_t
  3633. Fowner_events Tuint8_t
  3634. Flength Tuint16_t
  3635. Fgrab_window Txcb_window_t
  3636. Fevent_mask Tuint16_t
  3637. Fpointer_mode Tuint8_t
  3638. Fkeyboard_mode Tuint8_t
  3639. Fconfine_to Txcb_window_t
  3640. Fcursor Txcb_cursor_t
  3641. Fbutton Tuint8_t
  3642. Fpad0 Tuint8_t
  3643. Fmodifiers Tuint16_t
  3644. }
  3645. type Txcb_ungrab_button_request_t = struct {
  3646. Fmajor_opcode Tuint8_t
  3647. Fbutton Tuint8_t
  3648. Flength Tuint16_t
  3649. Fgrab_window Txcb_window_t
  3650. Fmodifiers Tuint16_t
  3651. Fpad0 [2]Tuint8_t
  3652. }
  3653. type Txcb_change_active_pointer_grab_request_t = struct {
  3654. Fmajor_opcode Tuint8_t
  3655. Fpad0 Tuint8_t
  3656. Flength Tuint16_t
  3657. Fcursor Txcb_cursor_t
  3658. Ftime Txcb_timestamp_t
  3659. Fevent_mask Tuint16_t
  3660. Fpad1 [2]Tuint8_t
  3661. }
  3662. type Txcb_grab_keyboard_cookie_t = struct {
  3663. Fsequence uint32
  3664. }
  3665. type Txcb_grab_keyboard_request_t = struct {
  3666. Fmajor_opcode Tuint8_t
  3667. Fowner_events Tuint8_t
  3668. Flength Tuint16_t
  3669. Fgrab_window Txcb_window_t
  3670. Ftime Txcb_timestamp_t
  3671. Fpointer_mode Tuint8_t
  3672. Fkeyboard_mode Tuint8_t
  3673. Fpad0 [2]Tuint8_t
  3674. }
  3675. type Txcb_grab_keyboard_reply_t = struct {
  3676. Fresponse_type Tuint8_t
  3677. Fstatus Tuint8_t
  3678. Fsequence Tuint16_t
  3679. Flength Tuint32_t
  3680. }
  3681. type Txcb_ungrab_keyboard_request_t = struct {
  3682. Fmajor_opcode Tuint8_t
  3683. Fpad0 Tuint8_t
  3684. Flength Tuint16_t
  3685. Ftime Txcb_timestamp_t
  3686. }
  3687. type Txcb_grab_t = int32
  3688. type _xcb_grab_t = int32
  3689. const _XCB_GRAB_ANY = 0
  3690. type Txcb_grab_key_request_t = struct {
  3691. Fmajor_opcode Tuint8_t
  3692. Fowner_events Tuint8_t
  3693. Flength Tuint16_t
  3694. Fgrab_window Txcb_window_t
  3695. Fmodifiers Tuint16_t
  3696. Fkey Txcb_keycode_t
  3697. Fpointer_mode Tuint8_t
  3698. Fkeyboard_mode Tuint8_t
  3699. Fpad0 [3]Tuint8_t
  3700. }
  3701. type Txcb_ungrab_key_request_t = struct {
  3702. Fmajor_opcode Tuint8_t
  3703. Fkey Txcb_keycode_t
  3704. Flength Tuint16_t
  3705. Fgrab_window Txcb_window_t
  3706. Fmodifiers Tuint16_t
  3707. Fpad0 [2]Tuint8_t
  3708. }
  3709. type Txcb_allow_t = int32
  3710. type _xcb_allow_t = int32
  3711. const _XCB_ALLOW_ASYNC_POINTER = 0
  3712. const _XCB_ALLOW_SYNC_POINTER = 1
  3713. const _XCB_ALLOW_REPLAY_POINTER = 2
  3714. const _XCB_ALLOW_ASYNC_KEYBOARD = 3
  3715. const _XCB_ALLOW_SYNC_KEYBOARD = 4
  3716. const _XCB_ALLOW_REPLAY_KEYBOARD = 5
  3717. const _XCB_ALLOW_ASYNC_BOTH = 6
  3718. const _XCB_ALLOW_SYNC_BOTH = 7
  3719. type Txcb_allow_events_request_t = struct {
  3720. Fmajor_opcode Tuint8_t
  3721. Fmode Tuint8_t
  3722. Flength Tuint16_t
  3723. Ftime Txcb_timestamp_t
  3724. }
  3725. type Txcb_grab_server_request_t = struct {
  3726. Fmajor_opcode Tuint8_t
  3727. Fpad0 Tuint8_t
  3728. Flength Tuint16_t
  3729. }
  3730. type Txcb_ungrab_server_request_t = struct {
  3731. Fmajor_opcode Tuint8_t
  3732. Fpad0 Tuint8_t
  3733. Flength Tuint16_t
  3734. }
  3735. type Txcb_query_pointer_cookie_t = struct {
  3736. Fsequence uint32
  3737. }
  3738. type Txcb_query_pointer_request_t = struct {
  3739. Fmajor_opcode Tuint8_t
  3740. Fpad0 Tuint8_t
  3741. Flength Tuint16_t
  3742. Fwindow Txcb_window_t
  3743. }
  3744. type Txcb_query_pointer_reply_t = struct {
  3745. Fresponse_type Tuint8_t
  3746. Fsame_screen Tuint8_t
  3747. Fsequence Tuint16_t
  3748. Flength Tuint32_t
  3749. Froot Txcb_window_t
  3750. Fchild Txcb_window_t
  3751. Froot_x Tint16_t
  3752. Froot_y Tint16_t
  3753. Fwin_x Tint16_t
  3754. Fwin_y Tint16_t
  3755. Fmask Tuint16_t
  3756. Fpad0 [2]Tuint8_t
  3757. }
  3758. type Txcb_timecoord_t = struct {
  3759. Ftime Txcb_timestamp_t
  3760. Fx Tint16_t
  3761. Fy Tint16_t
  3762. }
  3763. type Txcb_timecoord_iterator_t = struct {
  3764. Fdata uintptr
  3765. Frem int32
  3766. Findex int32
  3767. }
  3768. type Txcb_get_motion_events_cookie_t = struct {
  3769. Fsequence uint32
  3770. }
  3771. type Txcb_get_motion_events_request_t = struct {
  3772. Fmajor_opcode Tuint8_t
  3773. Fpad0 Tuint8_t
  3774. Flength Tuint16_t
  3775. Fwindow Txcb_window_t
  3776. Fstart Txcb_timestamp_t
  3777. Fstop Txcb_timestamp_t
  3778. }
  3779. type Txcb_get_motion_events_reply_t = struct {
  3780. Fresponse_type Tuint8_t
  3781. Fpad0 Tuint8_t
  3782. Fsequence Tuint16_t
  3783. Flength Tuint32_t
  3784. Fevents_len Tuint32_t
  3785. Fpad1 [20]Tuint8_t
  3786. }
  3787. type Txcb_translate_coordinates_cookie_t = struct {
  3788. Fsequence uint32
  3789. }
  3790. type Txcb_translate_coordinates_request_t = struct {
  3791. Fmajor_opcode Tuint8_t
  3792. Fpad0 Tuint8_t
  3793. Flength Tuint16_t
  3794. Fsrc_window Txcb_window_t
  3795. Fdst_window Txcb_window_t
  3796. Fsrc_x Tint16_t
  3797. Fsrc_y Tint16_t
  3798. }
  3799. type Txcb_translate_coordinates_reply_t = struct {
  3800. Fresponse_type Tuint8_t
  3801. Fsame_screen Tuint8_t
  3802. Fsequence Tuint16_t
  3803. Flength Tuint32_t
  3804. Fchild Txcb_window_t
  3805. Fdst_x Tint16_t
  3806. Fdst_y Tint16_t
  3807. }
  3808. type Txcb_warp_pointer_request_t = struct {
  3809. Fmajor_opcode Tuint8_t
  3810. Fpad0 Tuint8_t
  3811. Flength Tuint16_t
  3812. Fsrc_window Txcb_window_t
  3813. Fdst_window Txcb_window_t
  3814. Fsrc_x Tint16_t
  3815. Fsrc_y Tint16_t
  3816. Fsrc_width Tuint16_t
  3817. Fsrc_height Tuint16_t
  3818. Fdst_x Tint16_t
  3819. Fdst_y Tint16_t
  3820. }
  3821. type Txcb_input_focus_t = int32
  3822. type _xcb_input_focus_t = int32
  3823. const _XCB_INPUT_FOCUS_NONE = 0
  3824. const _XCB_INPUT_FOCUS_POINTER_ROOT = 1
  3825. const _XCB_INPUT_FOCUS_PARENT = 2
  3826. const _XCB_INPUT_FOCUS_FOLLOW_KEYBOARD = 3
  3827. type Txcb_set_input_focus_request_t = struct {
  3828. Fmajor_opcode Tuint8_t
  3829. Frevert_to Tuint8_t
  3830. Flength Tuint16_t
  3831. Ffocus Txcb_window_t
  3832. Ftime Txcb_timestamp_t
  3833. }
  3834. type Txcb_get_input_focus_cookie_t = struct {
  3835. Fsequence uint32
  3836. }
  3837. type Txcb_get_input_focus_request_t = struct {
  3838. Fmajor_opcode Tuint8_t
  3839. Fpad0 Tuint8_t
  3840. Flength Tuint16_t
  3841. }
  3842. type Txcb_get_input_focus_reply_t = struct {
  3843. Fresponse_type Tuint8_t
  3844. Frevert_to Tuint8_t
  3845. Fsequence Tuint16_t
  3846. Flength Tuint32_t
  3847. Ffocus Txcb_window_t
  3848. }
  3849. type Txcb_query_keymap_cookie_t = struct {
  3850. Fsequence uint32
  3851. }
  3852. type Txcb_query_keymap_request_t = struct {
  3853. Fmajor_opcode Tuint8_t
  3854. Fpad0 Tuint8_t
  3855. Flength Tuint16_t
  3856. }
  3857. type Txcb_query_keymap_reply_t = struct {
  3858. Fresponse_type Tuint8_t
  3859. Fpad0 Tuint8_t
  3860. Fsequence Tuint16_t
  3861. Flength Tuint32_t
  3862. Fkeys [32]Tuint8_t
  3863. }
  3864. type Txcb_open_font_request_t = struct {
  3865. Fmajor_opcode Tuint8_t
  3866. Fpad0 Tuint8_t
  3867. Flength Tuint16_t
  3868. Ffid Txcb_font_t
  3869. Fname_len Tuint16_t
  3870. Fpad1 [2]Tuint8_t
  3871. }
  3872. type Txcb_close_font_request_t = struct {
  3873. Fmajor_opcode Tuint8_t
  3874. Fpad0 Tuint8_t
  3875. Flength Tuint16_t
  3876. Ffont Txcb_font_t
  3877. }
  3878. type Txcb_font_draw_t = int32
  3879. type _xcb_font_draw_t = int32
  3880. const _XCB_FONT_DRAW_LEFT_TO_RIGHT = 0
  3881. const _XCB_FONT_DRAW_RIGHT_TO_LEFT = 1
  3882. type Txcb_fontprop_t = struct {
  3883. Fname Txcb_atom_t
  3884. Fvalue Tuint32_t
  3885. }
  3886. type Txcb_fontprop_iterator_t = struct {
  3887. Fdata uintptr
  3888. Frem int32
  3889. Findex int32
  3890. }
  3891. type Txcb_charinfo_t = struct {
  3892. Fleft_side_bearing Tint16_t
  3893. Fright_side_bearing Tint16_t
  3894. Fcharacter_width Tint16_t
  3895. Fascent Tint16_t
  3896. Fdescent Tint16_t
  3897. Fattributes Tuint16_t
  3898. }
  3899. type Txcb_charinfo_iterator_t = struct {
  3900. Fdata uintptr
  3901. Frem int32
  3902. Findex int32
  3903. }
  3904. type Txcb_query_font_cookie_t = struct {
  3905. Fsequence uint32
  3906. }
  3907. type Txcb_query_font_request_t = struct {
  3908. Fmajor_opcode Tuint8_t
  3909. Fpad0 Tuint8_t
  3910. Flength Tuint16_t
  3911. Ffont Txcb_fontable_t
  3912. }
  3913. type Txcb_query_font_reply_t = struct {
  3914. Fresponse_type Tuint8_t
  3915. Fpad0 Tuint8_t
  3916. Fsequence Tuint16_t
  3917. Flength Tuint32_t
  3918. Fmin_bounds Txcb_charinfo_t
  3919. Fpad1 [4]Tuint8_t
  3920. Fmax_bounds Txcb_charinfo_t
  3921. Fpad2 [4]Tuint8_t
  3922. Fmin_char_or_byte2 Tuint16_t
  3923. Fmax_char_or_byte2 Tuint16_t
  3924. Fdefault_char Tuint16_t
  3925. Fproperties_len Tuint16_t
  3926. Fdraw_direction Tuint8_t
  3927. Fmin_byte1 Tuint8_t
  3928. Fmax_byte1 Tuint8_t
  3929. Fall_chars_exist Tuint8_t
  3930. Ffont_ascent Tint16_t
  3931. Ffont_descent Tint16_t
  3932. Fchar_infos_len Tuint32_t
  3933. }
  3934. type Txcb_query_text_extents_cookie_t = struct {
  3935. Fsequence uint32
  3936. }
  3937. type Txcb_query_text_extents_request_t = struct {
  3938. Fmajor_opcode Tuint8_t
  3939. Fodd_length Tuint8_t
  3940. Flength Tuint16_t
  3941. Ffont Txcb_fontable_t
  3942. }
  3943. type Txcb_query_text_extents_reply_t = struct {
  3944. Fresponse_type Tuint8_t
  3945. Fdraw_direction Tuint8_t
  3946. Fsequence Tuint16_t
  3947. Flength Tuint32_t
  3948. Ffont_ascent Tint16_t
  3949. Ffont_descent Tint16_t
  3950. Foverall_ascent Tint16_t
  3951. Foverall_descent Tint16_t
  3952. Foverall_width Tint32_t
  3953. Foverall_left Tint32_t
  3954. Foverall_right Tint32_t
  3955. }
  3956. type Txcb_str_t = struct {
  3957. Fname_len Tuint8_t
  3958. }
  3959. type Txcb_str_iterator_t = struct {
  3960. Fdata uintptr
  3961. Frem int32
  3962. Findex int32
  3963. }
  3964. type Txcb_list_fonts_cookie_t = struct {
  3965. Fsequence uint32
  3966. }
  3967. type Txcb_list_fonts_request_t = struct {
  3968. Fmajor_opcode Tuint8_t
  3969. Fpad0 Tuint8_t
  3970. Flength Tuint16_t
  3971. Fmax_names Tuint16_t
  3972. Fpattern_len Tuint16_t
  3973. }
  3974. type Txcb_list_fonts_reply_t = struct {
  3975. Fresponse_type Tuint8_t
  3976. Fpad0 Tuint8_t
  3977. Fsequence Tuint16_t
  3978. Flength Tuint32_t
  3979. Fnames_len Tuint16_t
  3980. Fpad1 [22]Tuint8_t
  3981. }
  3982. type Txcb_list_fonts_with_info_cookie_t = struct {
  3983. Fsequence uint32
  3984. }
  3985. type Txcb_list_fonts_with_info_request_t = struct {
  3986. Fmajor_opcode Tuint8_t
  3987. Fpad0 Tuint8_t
  3988. Flength Tuint16_t
  3989. Fmax_names Tuint16_t
  3990. Fpattern_len Tuint16_t
  3991. }
  3992. type Txcb_list_fonts_with_info_reply_t = struct {
  3993. Fresponse_type Tuint8_t
  3994. Fname_len Tuint8_t
  3995. Fsequence Tuint16_t
  3996. Flength Tuint32_t
  3997. Fmin_bounds Txcb_charinfo_t
  3998. Fpad0 [4]Tuint8_t
  3999. Fmax_bounds Txcb_charinfo_t
  4000. Fpad1 [4]Tuint8_t
  4001. Fmin_char_or_byte2 Tuint16_t
  4002. Fmax_char_or_byte2 Tuint16_t
  4003. Fdefault_char Tuint16_t
  4004. Fproperties_len Tuint16_t
  4005. Fdraw_direction Tuint8_t
  4006. Fmin_byte1 Tuint8_t
  4007. Fmax_byte1 Tuint8_t
  4008. Fall_chars_exist Tuint8_t
  4009. Ffont_ascent Tint16_t
  4010. Ffont_descent Tint16_t
  4011. Freplies_hint Tuint32_t
  4012. }
  4013. type Txcb_set_font_path_request_t = struct {
  4014. Fmajor_opcode Tuint8_t
  4015. Fpad0 Tuint8_t
  4016. Flength Tuint16_t
  4017. Ffont_qty Tuint16_t
  4018. Fpad1 [2]Tuint8_t
  4019. }
  4020. type Txcb_get_font_path_cookie_t = struct {
  4021. Fsequence uint32
  4022. }
  4023. type Txcb_get_font_path_request_t = struct {
  4024. Fmajor_opcode Tuint8_t
  4025. Fpad0 Tuint8_t
  4026. Flength Tuint16_t
  4027. }
  4028. type Txcb_get_font_path_reply_t = struct {
  4029. Fresponse_type Tuint8_t
  4030. Fpad0 Tuint8_t
  4031. Fsequence Tuint16_t
  4032. Flength Tuint32_t
  4033. Fpath_len Tuint16_t
  4034. Fpad1 [22]Tuint8_t
  4035. }
  4036. type Txcb_create_pixmap_request_t = struct {
  4037. Fmajor_opcode Tuint8_t
  4038. Fdepth Tuint8_t
  4039. Flength Tuint16_t
  4040. Fpid Txcb_pixmap_t
  4041. Fdrawable Txcb_drawable_t
  4042. Fwidth Tuint16_t
  4043. Fheight Tuint16_t
  4044. }
  4045. type Txcb_free_pixmap_request_t = struct {
  4046. Fmajor_opcode Tuint8_t
  4047. Fpad0 Tuint8_t
  4048. Flength Tuint16_t
  4049. Fpixmap Txcb_pixmap_t
  4050. }
  4051. type Txcb_gc_t = int32
  4052. type _xcb_gc_t = int32
  4053. const _XCB_GC_FUNCTION = 1
  4054. const _XCB_GC_PLANE_MASK = 2
  4055. const _XCB_GC_FOREGROUND = 4
  4056. const _XCB_GC_BACKGROUND = 8
  4057. const _XCB_GC_LINE_WIDTH = 16
  4058. const _XCB_GC_LINE_STYLE = 32
  4059. const _XCB_GC_CAP_STYLE = 64
  4060. const _XCB_GC_JOIN_STYLE = 128
  4061. const _XCB_GC_FILL_STYLE = 256
  4062. const _XCB_GC_FILL_RULE = 512
  4063. const _XCB_GC_TILE = 1024
  4064. const _XCB_GC_STIPPLE = 2048
  4065. const _XCB_GC_TILE_STIPPLE_ORIGIN_X = 4096
  4066. const _XCB_GC_TILE_STIPPLE_ORIGIN_Y = 8192
  4067. const _XCB_GC_FONT = 16384
  4068. const _XCB_GC_SUBWINDOW_MODE = 32768
  4069. const _XCB_GC_GRAPHICS_EXPOSURES = 65536
  4070. const _XCB_GC_CLIP_ORIGIN_X = 131072
  4071. const _XCB_GC_CLIP_ORIGIN_Y = 262144
  4072. const _XCB_GC_CLIP_MASK = 524288
  4073. const _XCB_GC_DASH_OFFSET = 1048576
  4074. const _XCB_GC_DASH_LIST = 2097152
  4075. const _XCB_GC_ARC_MODE = 4194304
  4076. type Txcb_gx_t = int32
  4077. type _xcb_gx_t = int32
  4078. const _XCB_GX_CLEAR = 0
  4079. const _XCB_GX_AND = 1
  4080. const _XCB_GX_AND_REVERSE = 2
  4081. const _XCB_GX_COPY = 3
  4082. const _XCB_GX_AND_INVERTED = 4
  4083. const _XCB_GX_NOOP = 5
  4084. const _XCB_GX_XOR = 6
  4085. const _XCB_GX_OR = 7
  4086. const _XCB_GX_NOR = 8
  4087. const _XCB_GX_EQUIV = 9
  4088. const _XCB_GX_INVERT = 10
  4089. const _XCB_GX_OR_REVERSE = 11
  4090. const _XCB_GX_COPY_INVERTED = 12
  4091. const _XCB_GX_OR_INVERTED = 13
  4092. const _XCB_GX_NAND = 14
  4093. const _XCB_GX_SET = 15
  4094. type Txcb_line_style_t = int32
  4095. type _xcb_line_style_t = int32
  4096. const _XCB_LINE_STYLE_SOLID = 0
  4097. const _XCB_LINE_STYLE_ON_OFF_DASH = 1
  4098. const _XCB_LINE_STYLE_DOUBLE_DASH = 2
  4099. type Txcb_cap_style_t = int32
  4100. type _xcb_cap_style_t = int32
  4101. const _XCB_CAP_STYLE_NOT_LAST = 0
  4102. const _XCB_CAP_STYLE_BUTT = 1
  4103. const _XCB_CAP_STYLE_ROUND = 2
  4104. const _XCB_CAP_STYLE_PROJECTING = 3
  4105. type Txcb_join_style_t = int32
  4106. type _xcb_join_style_t = int32
  4107. const _XCB_JOIN_STYLE_MITER = 0
  4108. const _XCB_JOIN_STYLE_ROUND = 1
  4109. const _XCB_JOIN_STYLE_BEVEL = 2
  4110. type Txcb_fill_style_t = int32
  4111. type _xcb_fill_style_t = int32
  4112. const _XCB_FILL_STYLE_SOLID = 0
  4113. const _XCB_FILL_STYLE_TILED = 1
  4114. const _XCB_FILL_STYLE_STIPPLED = 2
  4115. const _XCB_FILL_STYLE_OPAQUE_STIPPLED = 3
  4116. type Txcb_fill_rule_t = int32
  4117. type _xcb_fill_rule_t = int32
  4118. const _XCB_FILL_RULE_EVEN_ODD = 0
  4119. const _XCB_FILL_RULE_WINDING = 1
  4120. type Txcb_subwindow_mode_t = int32
  4121. type _xcb_subwindow_mode_t = int32
  4122. const _XCB_SUBWINDOW_MODE_CLIP_BY_CHILDREN = 0
  4123. const _XCB_SUBWINDOW_MODE_INCLUDE_INFERIORS = 1
  4124. type Txcb_arc_mode_t = int32
  4125. type _xcb_arc_mode_t = int32
  4126. const _XCB_ARC_MODE_CHORD = 0
  4127. const _XCB_ARC_MODE_PIE_SLICE = 1
  4128. type Txcb_create_gc_value_list_t = struct {
  4129. Ffunction Tuint32_t
  4130. Fplane_mask Tuint32_t
  4131. Fforeground Tuint32_t
  4132. Fbackground Tuint32_t
  4133. Fline_width Tuint32_t
  4134. Fline_style Tuint32_t
  4135. Fcap_style Tuint32_t
  4136. Fjoin_style Tuint32_t
  4137. Ffill_style Tuint32_t
  4138. Ffill_rule Tuint32_t
  4139. Ftile Txcb_pixmap_t
  4140. Fstipple Txcb_pixmap_t
  4141. Ftile_stipple_x_origin Tint32_t
  4142. Ftile_stipple_y_origin Tint32_t
  4143. Ffont Txcb_font_t
  4144. Fsubwindow_mode Tuint32_t
  4145. Fgraphics_exposures Txcb_bool32_t
  4146. Fclip_x_origin Tint32_t
  4147. Fclip_y_origin Tint32_t
  4148. Fclip_mask Txcb_pixmap_t
  4149. Fdash_offset Tuint32_t
  4150. Fdashes Tuint32_t
  4151. Farc_mode Tuint32_t
  4152. }
  4153. type Txcb_create_gc_request_t = struct {
  4154. Fmajor_opcode Tuint8_t
  4155. Fpad0 Tuint8_t
  4156. Flength Tuint16_t
  4157. Fcid Txcb_gcontext_t
  4158. Fdrawable Txcb_drawable_t
  4159. Fvalue_mask Tuint32_t
  4160. }
  4161. type Txcb_change_gc_value_list_t = struct {
  4162. Ffunction Tuint32_t
  4163. Fplane_mask Tuint32_t
  4164. Fforeground Tuint32_t
  4165. Fbackground Tuint32_t
  4166. Fline_width Tuint32_t
  4167. Fline_style Tuint32_t
  4168. Fcap_style Tuint32_t
  4169. Fjoin_style Tuint32_t
  4170. Ffill_style Tuint32_t
  4171. Ffill_rule Tuint32_t
  4172. Ftile Txcb_pixmap_t
  4173. Fstipple Txcb_pixmap_t
  4174. Ftile_stipple_x_origin Tint32_t
  4175. Ftile_stipple_y_origin Tint32_t
  4176. Ffont Txcb_font_t
  4177. Fsubwindow_mode Tuint32_t
  4178. Fgraphics_exposures Txcb_bool32_t
  4179. Fclip_x_origin Tint32_t
  4180. Fclip_y_origin Tint32_t
  4181. Fclip_mask Txcb_pixmap_t
  4182. Fdash_offset Tuint32_t
  4183. Fdashes Tuint32_t
  4184. Farc_mode Tuint32_t
  4185. }
  4186. type Txcb_change_gc_request_t = struct {
  4187. Fmajor_opcode Tuint8_t
  4188. Fpad0 Tuint8_t
  4189. Flength Tuint16_t
  4190. Fgc Txcb_gcontext_t
  4191. Fvalue_mask Tuint32_t
  4192. }
  4193. type Txcb_copy_gc_request_t = struct {
  4194. Fmajor_opcode Tuint8_t
  4195. Fpad0 Tuint8_t
  4196. Flength Tuint16_t
  4197. Fsrc_gc Txcb_gcontext_t
  4198. Fdst_gc Txcb_gcontext_t
  4199. Fvalue_mask Tuint32_t
  4200. }
  4201. type Txcb_set_dashes_request_t = struct {
  4202. Fmajor_opcode Tuint8_t
  4203. Fpad0 Tuint8_t
  4204. Flength Tuint16_t
  4205. Fgc Txcb_gcontext_t
  4206. Fdash_offset Tuint16_t
  4207. Fdashes_len Tuint16_t
  4208. }
  4209. type Txcb_clip_ordering_t = int32
  4210. type _xcb_clip_ordering_t = int32
  4211. const _XCB_CLIP_ORDERING_UNSORTED = 0
  4212. const _XCB_CLIP_ORDERING_Y_SORTED = 1
  4213. const _XCB_CLIP_ORDERING_YX_SORTED = 2
  4214. const _XCB_CLIP_ORDERING_YX_BANDED = 3
  4215. type Txcb_set_clip_rectangles_request_t = struct {
  4216. Fmajor_opcode Tuint8_t
  4217. Fordering Tuint8_t
  4218. Flength Tuint16_t
  4219. Fgc Txcb_gcontext_t
  4220. Fclip_x_origin Tint16_t
  4221. Fclip_y_origin Tint16_t
  4222. }
  4223. type Txcb_free_gc_request_t = struct {
  4224. Fmajor_opcode Tuint8_t
  4225. Fpad0 Tuint8_t
  4226. Flength Tuint16_t
  4227. Fgc Txcb_gcontext_t
  4228. }
  4229. type Txcb_clear_area_request_t = struct {
  4230. Fmajor_opcode Tuint8_t
  4231. Fexposures Tuint8_t
  4232. Flength Tuint16_t
  4233. Fwindow Txcb_window_t
  4234. Fx Tint16_t
  4235. Fy Tint16_t
  4236. Fwidth Tuint16_t
  4237. Fheight Tuint16_t
  4238. }
  4239. type Txcb_copy_area_request_t = struct {
  4240. Fmajor_opcode Tuint8_t
  4241. Fpad0 Tuint8_t
  4242. Flength Tuint16_t
  4243. Fsrc_drawable Txcb_drawable_t
  4244. Fdst_drawable Txcb_drawable_t
  4245. Fgc Txcb_gcontext_t
  4246. Fsrc_x Tint16_t
  4247. Fsrc_y Tint16_t
  4248. Fdst_x Tint16_t
  4249. Fdst_y Tint16_t
  4250. Fwidth Tuint16_t
  4251. Fheight Tuint16_t
  4252. }
  4253. type Txcb_copy_plane_request_t = struct {
  4254. Fmajor_opcode Tuint8_t
  4255. Fpad0 Tuint8_t
  4256. Flength Tuint16_t
  4257. Fsrc_drawable Txcb_drawable_t
  4258. Fdst_drawable Txcb_drawable_t
  4259. Fgc Txcb_gcontext_t
  4260. Fsrc_x Tint16_t
  4261. Fsrc_y Tint16_t
  4262. Fdst_x Tint16_t
  4263. Fdst_y Tint16_t
  4264. Fwidth Tuint16_t
  4265. Fheight Tuint16_t
  4266. Fbit_plane Tuint32_t
  4267. }
  4268. type Txcb_coord_mode_t = int32
  4269. type _xcb_coord_mode_t = int32
  4270. const _XCB_COORD_MODE_ORIGIN = 0
  4271. const _XCB_COORD_MODE_PREVIOUS = 1
  4272. type Txcb_poly_point_request_t = struct {
  4273. Fmajor_opcode Tuint8_t
  4274. Fcoordinate_mode Tuint8_t
  4275. Flength Tuint16_t
  4276. Fdrawable Txcb_drawable_t
  4277. Fgc Txcb_gcontext_t
  4278. }
  4279. type Txcb_poly_line_request_t = struct {
  4280. Fmajor_opcode Tuint8_t
  4281. Fcoordinate_mode Tuint8_t
  4282. Flength Tuint16_t
  4283. Fdrawable Txcb_drawable_t
  4284. Fgc Txcb_gcontext_t
  4285. }
  4286. type Txcb_segment_t = struct {
  4287. Fx1 Tint16_t
  4288. Fy1 Tint16_t
  4289. Fx2 Tint16_t
  4290. Fy2 Tint16_t
  4291. }
  4292. type Txcb_segment_iterator_t = struct {
  4293. Fdata uintptr
  4294. Frem int32
  4295. Findex int32
  4296. }
  4297. type Txcb_poly_segment_request_t = struct {
  4298. Fmajor_opcode Tuint8_t
  4299. Fpad0 Tuint8_t
  4300. Flength Tuint16_t
  4301. Fdrawable Txcb_drawable_t
  4302. Fgc Txcb_gcontext_t
  4303. }
  4304. type Txcb_poly_rectangle_request_t = struct {
  4305. Fmajor_opcode Tuint8_t
  4306. Fpad0 Tuint8_t
  4307. Flength Tuint16_t
  4308. Fdrawable Txcb_drawable_t
  4309. Fgc Txcb_gcontext_t
  4310. }
  4311. type Txcb_poly_arc_request_t = struct {
  4312. Fmajor_opcode Tuint8_t
  4313. Fpad0 Tuint8_t
  4314. Flength Tuint16_t
  4315. Fdrawable Txcb_drawable_t
  4316. Fgc Txcb_gcontext_t
  4317. }
  4318. type Txcb_poly_shape_t = int32
  4319. type _xcb_poly_shape_t = int32
  4320. const _XCB_POLY_SHAPE_COMPLEX = 0
  4321. const _XCB_POLY_SHAPE_NONCONVEX = 1
  4322. const _XCB_POLY_SHAPE_CONVEX = 2
  4323. type Txcb_fill_poly_request_t = struct {
  4324. Fmajor_opcode Tuint8_t
  4325. Fpad0 Tuint8_t
  4326. Flength Tuint16_t
  4327. Fdrawable Txcb_drawable_t
  4328. Fgc Txcb_gcontext_t
  4329. Fshape Tuint8_t
  4330. Fcoordinate_mode Tuint8_t
  4331. Fpad1 [2]Tuint8_t
  4332. }
  4333. type Txcb_poly_fill_rectangle_request_t = struct {
  4334. Fmajor_opcode Tuint8_t
  4335. Fpad0 Tuint8_t
  4336. Flength Tuint16_t
  4337. Fdrawable Txcb_drawable_t
  4338. Fgc Txcb_gcontext_t
  4339. }
  4340. type Txcb_poly_fill_arc_request_t = struct {
  4341. Fmajor_opcode Tuint8_t
  4342. Fpad0 Tuint8_t
  4343. Flength Tuint16_t
  4344. Fdrawable Txcb_drawable_t
  4345. Fgc Txcb_gcontext_t
  4346. }
  4347. type Txcb_image_format_t = int32
  4348. type _xcb_image_format_t = int32
  4349. const _XCB_IMAGE_FORMAT_XY_BITMAP = 0
  4350. const _XCB_IMAGE_FORMAT_XY_PIXMAP = 1
  4351. const _XCB_IMAGE_FORMAT_Z_PIXMAP = 2
  4352. type Txcb_put_image_request_t = struct {
  4353. Fmajor_opcode Tuint8_t
  4354. Fformat Tuint8_t
  4355. Flength Tuint16_t
  4356. Fdrawable Txcb_drawable_t
  4357. Fgc Txcb_gcontext_t
  4358. Fwidth Tuint16_t
  4359. Fheight Tuint16_t
  4360. Fdst_x Tint16_t
  4361. Fdst_y Tint16_t
  4362. Fleft_pad Tuint8_t
  4363. Fdepth Tuint8_t
  4364. Fpad0 [2]Tuint8_t
  4365. }
  4366. type Txcb_get_image_cookie_t = struct {
  4367. Fsequence uint32
  4368. }
  4369. type Txcb_get_image_request_t = struct {
  4370. Fmajor_opcode Tuint8_t
  4371. Fformat Tuint8_t
  4372. Flength Tuint16_t
  4373. Fdrawable Txcb_drawable_t
  4374. Fx Tint16_t
  4375. Fy Tint16_t
  4376. Fwidth Tuint16_t
  4377. Fheight Tuint16_t
  4378. Fplane_mask Tuint32_t
  4379. }
  4380. type Txcb_get_image_reply_t = struct {
  4381. Fresponse_type Tuint8_t
  4382. Fdepth Tuint8_t
  4383. Fsequence Tuint16_t
  4384. Flength Tuint32_t
  4385. Fvisual Txcb_visualid_t
  4386. Fpad0 [20]Tuint8_t
  4387. }
  4388. type Txcb_poly_text_8_request_t = struct {
  4389. Fmajor_opcode Tuint8_t
  4390. Fpad0 Tuint8_t
  4391. Flength Tuint16_t
  4392. Fdrawable Txcb_drawable_t
  4393. Fgc Txcb_gcontext_t
  4394. Fx Tint16_t
  4395. Fy Tint16_t
  4396. }
  4397. type Txcb_poly_text_16_request_t = struct {
  4398. Fmajor_opcode Tuint8_t
  4399. Fpad0 Tuint8_t
  4400. Flength Tuint16_t
  4401. Fdrawable Txcb_drawable_t
  4402. Fgc Txcb_gcontext_t
  4403. Fx Tint16_t
  4404. Fy Tint16_t
  4405. }
  4406. type Txcb_image_text_8_request_t = struct {
  4407. Fmajor_opcode Tuint8_t
  4408. Fstring_len Tuint8_t
  4409. Flength Tuint16_t
  4410. Fdrawable Txcb_drawable_t
  4411. Fgc Txcb_gcontext_t
  4412. Fx Tint16_t
  4413. Fy Tint16_t
  4414. }
  4415. type Txcb_image_text_16_request_t = struct {
  4416. Fmajor_opcode Tuint8_t
  4417. Fstring_len Tuint8_t
  4418. Flength Tuint16_t
  4419. Fdrawable Txcb_drawable_t
  4420. Fgc Txcb_gcontext_t
  4421. Fx Tint16_t
  4422. Fy Tint16_t
  4423. }
  4424. type Txcb_colormap_alloc_t = int32
  4425. type _xcb_colormap_alloc_t = int32
  4426. const _XCB_COLORMAP_ALLOC_NONE = 0
  4427. const _XCB_COLORMAP_ALLOC_ALL = 1
  4428. type Txcb_create_colormap_request_t = struct {
  4429. Fmajor_opcode Tuint8_t
  4430. Falloc Tuint8_t
  4431. Flength Tuint16_t
  4432. Fmid Txcb_colormap_t
  4433. Fwindow Txcb_window_t
  4434. Fvisual Txcb_visualid_t
  4435. }
  4436. type Txcb_free_colormap_request_t = struct {
  4437. Fmajor_opcode Tuint8_t
  4438. Fpad0 Tuint8_t
  4439. Flength Tuint16_t
  4440. Fcmap Txcb_colormap_t
  4441. }
  4442. type Txcb_copy_colormap_and_free_request_t = struct {
  4443. Fmajor_opcode Tuint8_t
  4444. Fpad0 Tuint8_t
  4445. Flength Tuint16_t
  4446. Fmid Txcb_colormap_t
  4447. Fsrc_cmap Txcb_colormap_t
  4448. }
  4449. type Txcb_install_colormap_request_t = struct {
  4450. Fmajor_opcode Tuint8_t
  4451. Fpad0 Tuint8_t
  4452. Flength Tuint16_t
  4453. Fcmap Txcb_colormap_t
  4454. }
  4455. type Txcb_uninstall_colormap_request_t = struct {
  4456. Fmajor_opcode Tuint8_t
  4457. Fpad0 Tuint8_t
  4458. Flength Tuint16_t
  4459. Fcmap Txcb_colormap_t
  4460. }
  4461. type Txcb_list_installed_colormaps_cookie_t = struct {
  4462. Fsequence uint32
  4463. }
  4464. type Txcb_list_installed_colormaps_request_t = struct {
  4465. Fmajor_opcode Tuint8_t
  4466. Fpad0 Tuint8_t
  4467. Flength Tuint16_t
  4468. Fwindow Txcb_window_t
  4469. }
  4470. type Txcb_list_installed_colormaps_reply_t = struct {
  4471. Fresponse_type Tuint8_t
  4472. Fpad0 Tuint8_t
  4473. Fsequence Tuint16_t
  4474. Flength Tuint32_t
  4475. Fcmaps_len Tuint16_t
  4476. Fpad1 [22]Tuint8_t
  4477. }
  4478. type Txcb_alloc_color_cookie_t = struct {
  4479. Fsequence uint32
  4480. }
  4481. type Txcb_alloc_color_request_t = struct {
  4482. Fmajor_opcode Tuint8_t
  4483. Fpad0 Tuint8_t
  4484. Flength Tuint16_t
  4485. Fcmap Txcb_colormap_t
  4486. Fred Tuint16_t
  4487. Fgreen Tuint16_t
  4488. Fblue Tuint16_t
  4489. Fpad1 [2]Tuint8_t
  4490. }
  4491. type Txcb_alloc_color_reply_t = struct {
  4492. Fresponse_type Tuint8_t
  4493. Fpad0 Tuint8_t
  4494. Fsequence Tuint16_t
  4495. Flength Tuint32_t
  4496. Fred Tuint16_t
  4497. Fgreen Tuint16_t
  4498. Fblue Tuint16_t
  4499. Fpad1 [2]Tuint8_t
  4500. Fpixel Tuint32_t
  4501. }
  4502. type Txcb_alloc_named_color_cookie_t = struct {
  4503. Fsequence uint32
  4504. }
  4505. type Txcb_alloc_named_color_request_t = struct {
  4506. Fmajor_opcode Tuint8_t
  4507. Fpad0 Tuint8_t
  4508. Flength Tuint16_t
  4509. Fcmap Txcb_colormap_t
  4510. Fname_len Tuint16_t
  4511. Fpad1 [2]Tuint8_t
  4512. }
  4513. type Txcb_alloc_named_color_reply_t = struct {
  4514. Fresponse_type Tuint8_t
  4515. Fpad0 Tuint8_t
  4516. Fsequence Tuint16_t
  4517. Flength Tuint32_t
  4518. Fpixel Tuint32_t
  4519. Fexact_red Tuint16_t
  4520. Fexact_green Tuint16_t
  4521. Fexact_blue Tuint16_t
  4522. Fvisual_red Tuint16_t
  4523. Fvisual_green Tuint16_t
  4524. Fvisual_blue Tuint16_t
  4525. }
  4526. type Txcb_alloc_color_cells_cookie_t = struct {
  4527. Fsequence uint32
  4528. }
  4529. type Txcb_alloc_color_cells_request_t = struct {
  4530. Fmajor_opcode Tuint8_t
  4531. Fcontiguous Tuint8_t
  4532. Flength Tuint16_t
  4533. Fcmap Txcb_colormap_t
  4534. Fcolors Tuint16_t
  4535. Fplanes Tuint16_t
  4536. }
  4537. type Txcb_alloc_color_cells_reply_t = struct {
  4538. Fresponse_type Tuint8_t
  4539. Fpad0 Tuint8_t
  4540. Fsequence Tuint16_t
  4541. Flength Tuint32_t
  4542. Fpixels_len Tuint16_t
  4543. Fmasks_len Tuint16_t
  4544. Fpad1 [20]Tuint8_t
  4545. }
  4546. type Txcb_alloc_color_planes_cookie_t = struct {
  4547. Fsequence uint32
  4548. }
  4549. type Txcb_alloc_color_planes_request_t = struct {
  4550. Fmajor_opcode Tuint8_t
  4551. Fcontiguous Tuint8_t
  4552. Flength Tuint16_t
  4553. Fcmap Txcb_colormap_t
  4554. Fcolors Tuint16_t
  4555. Freds Tuint16_t
  4556. Fgreens Tuint16_t
  4557. Fblues Tuint16_t
  4558. }
  4559. type Txcb_alloc_color_planes_reply_t = struct {
  4560. Fresponse_type Tuint8_t
  4561. Fpad0 Tuint8_t
  4562. Fsequence Tuint16_t
  4563. Flength Tuint32_t
  4564. Fpixels_len Tuint16_t
  4565. Fpad1 [2]Tuint8_t
  4566. Fred_mask Tuint32_t
  4567. Fgreen_mask Tuint32_t
  4568. Fblue_mask Tuint32_t
  4569. Fpad2 [8]Tuint8_t
  4570. }
  4571. type Txcb_free_colors_request_t = struct {
  4572. Fmajor_opcode Tuint8_t
  4573. Fpad0 Tuint8_t
  4574. Flength Tuint16_t
  4575. Fcmap Txcb_colormap_t
  4576. Fplane_mask Tuint32_t
  4577. }
  4578. type Txcb_color_flag_t = int32
  4579. type _xcb_color_flag_t = int32
  4580. const _XCB_COLOR_FLAG_RED = 1
  4581. const _XCB_COLOR_FLAG_GREEN = 2
  4582. const _XCB_COLOR_FLAG_BLUE = 4
  4583. type Txcb_coloritem_t = struct {
  4584. Fpixel Tuint32_t
  4585. Fred Tuint16_t
  4586. Fgreen Tuint16_t
  4587. Fblue Tuint16_t
  4588. Fflags Tuint8_t
  4589. Fpad0 Tuint8_t
  4590. }
  4591. type Txcb_coloritem_iterator_t = struct {
  4592. Fdata uintptr
  4593. Frem int32
  4594. Findex int32
  4595. }
  4596. type Txcb_store_colors_request_t = struct {
  4597. Fmajor_opcode Tuint8_t
  4598. Fpad0 Tuint8_t
  4599. Flength Tuint16_t
  4600. Fcmap Txcb_colormap_t
  4601. }
  4602. type Txcb_store_named_color_request_t = struct {
  4603. Fmajor_opcode Tuint8_t
  4604. Fflags Tuint8_t
  4605. Flength Tuint16_t
  4606. Fcmap Txcb_colormap_t
  4607. Fpixel Tuint32_t
  4608. Fname_len Tuint16_t
  4609. Fpad0 [2]Tuint8_t
  4610. }
  4611. type Txcb_rgb_t = struct {
  4612. Fred Tuint16_t
  4613. Fgreen Tuint16_t
  4614. Fblue Tuint16_t
  4615. Fpad0 [2]Tuint8_t
  4616. }
  4617. type Txcb_rgb_iterator_t = struct {
  4618. Fdata uintptr
  4619. Frem int32
  4620. Findex int32
  4621. }
  4622. type Txcb_query_colors_cookie_t = struct {
  4623. Fsequence uint32
  4624. }
  4625. type Txcb_query_colors_request_t = struct {
  4626. Fmajor_opcode Tuint8_t
  4627. Fpad0 Tuint8_t
  4628. Flength Tuint16_t
  4629. Fcmap Txcb_colormap_t
  4630. }
  4631. type Txcb_query_colors_reply_t = struct {
  4632. Fresponse_type Tuint8_t
  4633. Fpad0 Tuint8_t
  4634. Fsequence Tuint16_t
  4635. Flength Tuint32_t
  4636. Fcolors_len Tuint16_t
  4637. Fpad1 [22]Tuint8_t
  4638. }
  4639. type Txcb_lookup_color_cookie_t = struct {
  4640. Fsequence uint32
  4641. }
  4642. type Txcb_lookup_color_request_t = struct {
  4643. Fmajor_opcode Tuint8_t
  4644. Fpad0 Tuint8_t
  4645. Flength Tuint16_t
  4646. Fcmap Txcb_colormap_t
  4647. Fname_len Tuint16_t
  4648. Fpad1 [2]Tuint8_t
  4649. }
  4650. type Txcb_lookup_color_reply_t = struct {
  4651. Fresponse_type Tuint8_t
  4652. Fpad0 Tuint8_t
  4653. Fsequence Tuint16_t
  4654. Flength Tuint32_t
  4655. Fexact_red Tuint16_t
  4656. Fexact_green Tuint16_t
  4657. Fexact_blue Tuint16_t
  4658. Fvisual_red Tuint16_t
  4659. Fvisual_green Tuint16_t
  4660. Fvisual_blue Tuint16_t
  4661. }
  4662. type Txcb_pixmap_enum_t = int32
  4663. type _xcb_pixmap_enum_t = int32
  4664. const _XCB_PIXMAP_NONE = 0
  4665. type Txcb_create_cursor_request_t = struct {
  4666. Fmajor_opcode Tuint8_t
  4667. Fpad0 Tuint8_t
  4668. Flength Tuint16_t
  4669. Fcid Txcb_cursor_t
  4670. Fsource Txcb_pixmap_t
  4671. Fmask Txcb_pixmap_t
  4672. Ffore_red Tuint16_t
  4673. Ffore_green Tuint16_t
  4674. Ffore_blue Tuint16_t
  4675. Fback_red Tuint16_t
  4676. Fback_green Tuint16_t
  4677. Fback_blue Tuint16_t
  4678. Fx Tuint16_t
  4679. Fy Tuint16_t
  4680. }
  4681. type Txcb_font_enum_t = int32
  4682. type _xcb_font_enum_t = int32
  4683. const _XCB_FONT_NONE = 0
  4684. type Txcb_create_glyph_cursor_request_t = struct {
  4685. Fmajor_opcode Tuint8_t
  4686. Fpad0 Tuint8_t
  4687. Flength Tuint16_t
  4688. Fcid Txcb_cursor_t
  4689. Fsource_font Txcb_font_t
  4690. Fmask_font Txcb_font_t
  4691. Fsource_char Tuint16_t
  4692. Fmask_char Tuint16_t
  4693. Ffore_red Tuint16_t
  4694. Ffore_green Tuint16_t
  4695. Ffore_blue Tuint16_t
  4696. Fback_red Tuint16_t
  4697. Fback_green Tuint16_t
  4698. Fback_blue Tuint16_t
  4699. }
  4700. type Txcb_free_cursor_request_t = struct {
  4701. Fmajor_opcode Tuint8_t
  4702. Fpad0 Tuint8_t
  4703. Flength Tuint16_t
  4704. Fcursor Txcb_cursor_t
  4705. }
  4706. type Txcb_recolor_cursor_request_t = struct {
  4707. Fmajor_opcode Tuint8_t
  4708. Fpad0 Tuint8_t
  4709. Flength Tuint16_t
  4710. Fcursor Txcb_cursor_t
  4711. Ffore_red Tuint16_t
  4712. Ffore_green Tuint16_t
  4713. Ffore_blue Tuint16_t
  4714. Fback_red Tuint16_t
  4715. Fback_green Tuint16_t
  4716. Fback_blue Tuint16_t
  4717. }
  4718. type Txcb_query_shape_of_t = int32
  4719. type _xcb_query_shape_of_t = int32
  4720. const _XCB_QUERY_SHAPE_OF_LARGEST_CURSOR = 0
  4721. const _XCB_QUERY_SHAPE_OF_FASTEST_TILE = 1
  4722. const _XCB_QUERY_SHAPE_OF_FASTEST_STIPPLE = 2
  4723. type Txcb_query_best_size_cookie_t = struct {
  4724. Fsequence uint32
  4725. }
  4726. type Txcb_query_best_size_request_t = struct {
  4727. Fmajor_opcode Tuint8_t
  4728. F_class Tuint8_t
  4729. Flength Tuint16_t
  4730. Fdrawable Txcb_drawable_t
  4731. Fwidth Tuint16_t
  4732. Fheight Tuint16_t
  4733. }
  4734. type Txcb_query_best_size_reply_t = struct {
  4735. Fresponse_type Tuint8_t
  4736. Fpad0 Tuint8_t
  4737. Fsequence Tuint16_t
  4738. Flength Tuint32_t
  4739. Fwidth Tuint16_t
  4740. Fheight Tuint16_t
  4741. }
  4742. type Txcb_query_extension_cookie_t = struct {
  4743. Fsequence uint32
  4744. }
  4745. type Txcb_query_extension_request_t = struct {
  4746. Fmajor_opcode Tuint8_t
  4747. Fpad0 Tuint8_t
  4748. Flength Tuint16_t
  4749. Fname_len Tuint16_t
  4750. Fpad1 [2]Tuint8_t
  4751. }
  4752. type Txcb_query_extension_reply_t = struct {
  4753. Fresponse_type Tuint8_t
  4754. Fpad0 Tuint8_t
  4755. Fsequence Tuint16_t
  4756. Flength Tuint32_t
  4757. Fpresent Tuint8_t
  4758. Fmajor_opcode Tuint8_t
  4759. Ffirst_event Tuint8_t
  4760. Ffirst_error Tuint8_t
  4761. }
  4762. type Txcb_list_extensions_cookie_t = struct {
  4763. Fsequence uint32
  4764. }
  4765. type Txcb_list_extensions_request_t = struct {
  4766. Fmajor_opcode Tuint8_t
  4767. Fpad0 Tuint8_t
  4768. Flength Tuint16_t
  4769. }
  4770. type Txcb_list_extensions_reply_t = struct {
  4771. Fresponse_type Tuint8_t
  4772. Fnames_len Tuint8_t
  4773. Fsequence Tuint16_t
  4774. Flength Tuint32_t
  4775. Fpad0 [24]Tuint8_t
  4776. }
  4777. type Txcb_change_keyboard_mapping_request_t = struct {
  4778. Fmajor_opcode Tuint8_t
  4779. Fkeycode_count Tuint8_t
  4780. Flength Tuint16_t
  4781. Ffirst_keycode Txcb_keycode_t
  4782. Fkeysyms_per_keycode Tuint8_t
  4783. Fpad0 [2]Tuint8_t
  4784. }
  4785. type Txcb_get_keyboard_mapping_cookie_t = struct {
  4786. Fsequence uint32
  4787. }
  4788. type Txcb_get_keyboard_mapping_request_t = struct {
  4789. Fmajor_opcode Tuint8_t
  4790. Fpad0 Tuint8_t
  4791. Flength Tuint16_t
  4792. Ffirst_keycode Txcb_keycode_t
  4793. Fcount Tuint8_t
  4794. }
  4795. type Txcb_get_keyboard_mapping_reply_t = struct {
  4796. Fresponse_type Tuint8_t
  4797. Fkeysyms_per_keycode Tuint8_t
  4798. Fsequence Tuint16_t
  4799. Flength Tuint32_t
  4800. Fpad0 [24]Tuint8_t
  4801. }
  4802. type Txcb_kb_t = int32
  4803. type _xcb_kb_t = int32
  4804. const _XCB_KB_KEY_CLICK_PERCENT = 1
  4805. const _XCB_KB_BELL_PERCENT = 2
  4806. const _XCB_KB_BELL_PITCH = 4
  4807. const _XCB_KB_BELL_DURATION = 8
  4808. const _XCB_KB_LED = 16
  4809. const _XCB_KB_LED_MODE = 32
  4810. const _XCB_KB_KEY = 64
  4811. const _XCB_KB_AUTO_REPEAT_MODE = 128
  4812. type Txcb_led_mode_t = int32
  4813. type _xcb_led_mode_t = int32
  4814. const _XCB_LED_MODE_OFF = 0
  4815. const _XCB_LED_MODE_ON = 1
  4816. type Txcb_auto_repeat_mode_t = int32
  4817. type _xcb_auto_repeat_mode_t = int32
  4818. const _XCB_AUTO_REPEAT_MODE_OFF = 0
  4819. const _XCB_AUTO_REPEAT_MODE_ON = 1
  4820. const _XCB_AUTO_REPEAT_MODE_DEFAULT = 2
  4821. type Txcb_change_keyboard_control_value_list_t = struct {
  4822. Fkey_click_percent Tint32_t
  4823. Fbell_percent Tint32_t
  4824. Fbell_pitch Tint32_t
  4825. Fbell_duration Tint32_t
  4826. Fled Tuint32_t
  4827. Fled_mode Tuint32_t
  4828. Fkey Txcb_keycode32_t
  4829. Fauto_repeat_mode Tuint32_t
  4830. }
  4831. type Txcb_change_keyboard_control_request_t = struct {
  4832. Fmajor_opcode Tuint8_t
  4833. Fpad0 Tuint8_t
  4834. Flength Tuint16_t
  4835. Fvalue_mask Tuint32_t
  4836. }
  4837. type Txcb_get_keyboard_control_cookie_t = struct {
  4838. Fsequence uint32
  4839. }
  4840. type Txcb_get_keyboard_control_request_t = struct {
  4841. Fmajor_opcode Tuint8_t
  4842. Fpad0 Tuint8_t
  4843. Flength Tuint16_t
  4844. }
  4845. type Txcb_get_keyboard_control_reply_t = struct {
  4846. Fresponse_type Tuint8_t
  4847. Fglobal_auto_repeat Tuint8_t
  4848. Fsequence Tuint16_t
  4849. Flength Tuint32_t
  4850. Fled_mask Tuint32_t
  4851. Fkey_click_percent Tuint8_t
  4852. Fbell_percent Tuint8_t
  4853. Fbell_pitch Tuint16_t
  4854. Fbell_duration Tuint16_t
  4855. Fpad0 [2]Tuint8_t
  4856. Fauto_repeats [32]Tuint8_t
  4857. }
  4858. type Txcb_bell_request_t = struct {
  4859. Fmajor_opcode Tuint8_t
  4860. Fpercent Tint8_t
  4861. Flength Tuint16_t
  4862. }
  4863. type Txcb_change_pointer_control_request_t = struct {
  4864. Fmajor_opcode Tuint8_t
  4865. Fpad0 Tuint8_t
  4866. Flength Tuint16_t
  4867. Facceleration_numerator Tint16_t
  4868. Facceleration_denominator Tint16_t
  4869. Fthreshold Tint16_t
  4870. Fdo_acceleration Tuint8_t
  4871. Fdo_threshold Tuint8_t
  4872. }
  4873. type Txcb_get_pointer_control_cookie_t = struct {
  4874. Fsequence uint32
  4875. }
  4876. type Txcb_get_pointer_control_request_t = struct {
  4877. Fmajor_opcode Tuint8_t
  4878. Fpad0 Tuint8_t
  4879. Flength Tuint16_t
  4880. }
  4881. type Txcb_get_pointer_control_reply_t = struct {
  4882. Fresponse_type Tuint8_t
  4883. Fpad0 Tuint8_t
  4884. Fsequence Tuint16_t
  4885. Flength Tuint32_t
  4886. Facceleration_numerator Tuint16_t
  4887. Facceleration_denominator Tuint16_t
  4888. Fthreshold Tuint16_t
  4889. Fpad1 [18]Tuint8_t
  4890. }
  4891. type Txcb_blanking_t = int32
  4892. type _xcb_blanking_t = int32
  4893. const _XCB_BLANKING_NOT_PREFERRED = 0
  4894. const _XCB_BLANKING_PREFERRED = 1
  4895. const _XCB_BLANKING_DEFAULT = 2
  4896. type Txcb_exposures_t = int32
  4897. type _xcb_exposures_t = int32
  4898. const _XCB_EXPOSURES_NOT_ALLOWED = 0
  4899. const _XCB_EXPOSURES_ALLOWED = 1
  4900. const _XCB_EXPOSURES_DEFAULT = 2
  4901. type Txcb_set_screen_saver_request_t = struct {
  4902. Fmajor_opcode Tuint8_t
  4903. Fpad0 Tuint8_t
  4904. Flength Tuint16_t
  4905. Ftimeout Tint16_t
  4906. Finterval Tint16_t
  4907. Fprefer_blanking Tuint8_t
  4908. Fallow_exposures Tuint8_t
  4909. }
  4910. type Txcb_get_screen_saver_cookie_t = struct {
  4911. Fsequence uint32
  4912. }
  4913. type Txcb_get_screen_saver_request_t = struct {
  4914. Fmajor_opcode Tuint8_t
  4915. Fpad0 Tuint8_t
  4916. Flength Tuint16_t
  4917. }
  4918. type Txcb_get_screen_saver_reply_t = struct {
  4919. Fresponse_type Tuint8_t
  4920. Fpad0 Tuint8_t
  4921. Fsequence Tuint16_t
  4922. Flength Tuint32_t
  4923. Ftimeout Tuint16_t
  4924. Finterval Tuint16_t
  4925. Fprefer_blanking Tuint8_t
  4926. Fallow_exposures Tuint8_t
  4927. Fpad1 [18]Tuint8_t
  4928. }
  4929. type Txcb_host_mode_t = int32
  4930. type _xcb_host_mode_t = int32
  4931. const _XCB_HOST_MODE_INSERT = 0
  4932. const _XCB_HOST_MODE_DELETE = 1
  4933. type Txcb_family_t = int32
  4934. type _xcb_family_t = int32
  4935. const _XCB_FAMILY_INTERNET = 0
  4936. const _XCB_FAMILY_DECNET = 1
  4937. const _XCB_FAMILY_CHAOS = 2
  4938. const _XCB_FAMILY_SERVER_INTERPRETED = 5
  4939. const _XCB_FAMILY_INTERNET_6 = 6
  4940. type Txcb_change_hosts_request_t = struct {
  4941. Fmajor_opcode Tuint8_t
  4942. Fmode Tuint8_t
  4943. Flength Tuint16_t
  4944. Ffamily Tuint8_t
  4945. Fpad0 Tuint8_t
  4946. Faddress_len Tuint16_t
  4947. }
  4948. type Txcb_host_t = struct {
  4949. Ffamily Tuint8_t
  4950. Fpad0 Tuint8_t
  4951. Faddress_len Tuint16_t
  4952. }
  4953. type Txcb_host_iterator_t = struct {
  4954. Fdata uintptr
  4955. Frem int32
  4956. Findex int32
  4957. }
  4958. type Txcb_list_hosts_cookie_t = struct {
  4959. Fsequence uint32
  4960. }
  4961. type Txcb_list_hosts_request_t = struct {
  4962. Fmajor_opcode Tuint8_t
  4963. Fpad0 Tuint8_t
  4964. Flength Tuint16_t
  4965. }
  4966. type Txcb_list_hosts_reply_t = struct {
  4967. Fresponse_type Tuint8_t
  4968. Fmode Tuint8_t
  4969. Fsequence Tuint16_t
  4970. Flength Tuint32_t
  4971. Fhosts_len Tuint16_t
  4972. Fpad0 [22]Tuint8_t
  4973. }
  4974. type Txcb_access_control_t = int32
  4975. type _xcb_access_control_t = int32
  4976. const _XCB_ACCESS_CONTROL_DISABLE = 0
  4977. const _XCB_ACCESS_CONTROL_ENABLE = 1
  4978. type Txcb_set_access_control_request_t = struct {
  4979. Fmajor_opcode Tuint8_t
  4980. Fmode Tuint8_t
  4981. Flength Tuint16_t
  4982. }
  4983. type Txcb_close_down_t = int32
  4984. type _xcb_close_down_t = int32
  4985. const _XCB_CLOSE_DOWN_DESTROY_ALL = 0
  4986. const _XCB_CLOSE_DOWN_RETAIN_PERMANENT = 1
  4987. const _XCB_CLOSE_DOWN_RETAIN_TEMPORARY = 2
  4988. type Txcb_set_close_down_mode_request_t = struct {
  4989. Fmajor_opcode Tuint8_t
  4990. Fmode Tuint8_t
  4991. Flength Tuint16_t
  4992. }
  4993. type Txcb_kill_t = int32
  4994. type _xcb_kill_t = int32
  4995. const _XCB_KILL_ALL_TEMPORARY = 0
  4996. type Txcb_kill_client_request_t = struct {
  4997. Fmajor_opcode Tuint8_t
  4998. Fpad0 Tuint8_t
  4999. Flength Tuint16_t
  5000. Fresource Tuint32_t
  5001. }
  5002. type Txcb_rotate_properties_request_t = struct {
  5003. Fmajor_opcode Tuint8_t
  5004. Fpad0 Tuint8_t
  5005. Flength Tuint16_t
  5006. Fwindow Txcb_window_t
  5007. Fatoms_len Tuint16_t
  5008. Fdelta Tint16_t
  5009. }
  5010. type Txcb_screen_saver_t = int32
  5011. type _xcb_screen_saver_t = int32
  5012. const _XCB_SCREEN_SAVER_RESET = 0
  5013. const _XCB_SCREEN_SAVER_ACTIVE = 1
  5014. type Txcb_force_screen_saver_request_t = struct {
  5015. Fmajor_opcode Tuint8_t
  5016. Fmode Tuint8_t
  5017. Flength Tuint16_t
  5018. }
  5019. type Txcb_mapping_status_t = int32
  5020. type _xcb_mapping_status_t = int32
  5021. const _XCB_MAPPING_STATUS_SUCCESS = 0
  5022. const _XCB_MAPPING_STATUS_BUSY = 1
  5023. const _XCB_MAPPING_STATUS_FAILURE = 2
  5024. type Txcb_set_pointer_mapping_cookie_t = struct {
  5025. Fsequence uint32
  5026. }
  5027. type Txcb_set_pointer_mapping_request_t = struct {
  5028. Fmajor_opcode Tuint8_t
  5029. Fmap_len Tuint8_t
  5030. Flength Tuint16_t
  5031. }
  5032. type Txcb_set_pointer_mapping_reply_t = struct {
  5033. Fresponse_type Tuint8_t
  5034. Fstatus Tuint8_t
  5035. Fsequence Tuint16_t
  5036. Flength Tuint32_t
  5037. }
  5038. type Txcb_get_pointer_mapping_cookie_t = struct {
  5039. Fsequence uint32
  5040. }
  5041. type Txcb_get_pointer_mapping_request_t = struct {
  5042. Fmajor_opcode Tuint8_t
  5043. Fpad0 Tuint8_t
  5044. Flength Tuint16_t
  5045. }
  5046. type Txcb_get_pointer_mapping_reply_t = struct {
  5047. Fresponse_type Tuint8_t
  5048. Fmap_len Tuint8_t
  5049. Fsequence Tuint16_t
  5050. Flength Tuint32_t
  5051. Fpad0 [24]Tuint8_t
  5052. }
  5053. type Txcb_map_index_t = int32
  5054. type _xcb_map_index_t = int32
  5055. const _XCB_MAP_INDEX_SHIFT = 0
  5056. const _XCB_MAP_INDEX_LOCK = 1
  5057. const _XCB_MAP_INDEX_CONTROL = 2
  5058. const _XCB_MAP_INDEX_1 = 3
  5059. const _XCB_MAP_INDEX_2 = 4
  5060. const _XCB_MAP_INDEX_3 = 5
  5061. const _XCB_MAP_INDEX_4 = 6
  5062. const _XCB_MAP_INDEX_5 = 7
  5063. type Txcb_set_modifier_mapping_cookie_t = struct {
  5064. Fsequence uint32
  5065. }
  5066. type Txcb_set_modifier_mapping_request_t = struct {
  5067. Fmajor_opcode Tuint8_t
  5068. Fkeycodes_per_modifier Tuint8_t
  5069. Flength Tuint16_t
  5070. }
  5071. type Txcb_set_modifier_mapping_reply_t = struct {
  5072. Fresponse_type Tuint8_t
  5073. Fstatus Tuint8_t
  5074. Fsequence Tuint16_t
  5075. Flength Tuint32_t
  5076. }
  5077. type Txcb_get_modifier_mapping_cookie_t = struct {
  5078. Fsequence uint32
  5079. }
  5080. type Txcb_get_modifier_mapping_request_t = struct {
  5081. Fmajor_opcode Tuint8_t
  5082. Fpad0 Tuint8_t
  5083. Flength Tuint16_t
  5084. }
  5085. type Txcb_get_modifier_mapping_reply_t = struct {
  5086. Fresponse_type Tuint8_t
  5087. Fkeycodes_per_modifier Tuint8_t
  5088. Fsequence Tuint16_t
  5089. Flength Tuint32_t
  5090. Fpad0 [24]Tuint8_t
  5091. }
  5092. type Txcb_no_operation_request_t = struct {
  5093. Fmajor_opcode Tuint8_t
  5094. Fpad0 Tuint8_t
  5095. Flength Tuint16_t
  5096. }
  5097. type Txcb_auth_info_t = struct {
  5098. Fnamelen int32
  5099. Fname uintptr
  5100. Fdatalen int32
  5101. Fdata uintptr
  5102. }
  5103. type Txcb_big_requests_enable_cookie_t = struct {
  5104. Fsequence uint32
  5105. }
  5106. type Txcb_big_requests_enable_request_t = struct {
  5107. Fmajor_opcode Tuint8_t
  5108. Fminor_opcode Tuint8_t
  5109. Flength Tuint16_t
  5110. }
  5111. type Txcb_big_requests_enable_reply_t = struct {
  5112. Fresponse_type Tuint8_t
  5113. Fpad0 Tuint8_t
  5114. Fsequence Tuint16_t
  5115. Flength Tuint32_t
  5116. Fmaximum_request_length Tuint32_t
  5117. }
  5118. type _workarounds = int32
  5119. const _WORKAROUND_NONE = 0
  5120. const _WORKAROUND_GLX_GET_FB_CONFIGS_BUG = 1
  5121. const _WORKAROUND_EXTERNAL_SOCKET_OWNER = 2
  5122. type _lazy_reply_tag = int32
  5123. const _LAZY_NONE = 0
  5124. const _LAZY_COOKIE = 1
  5125. const _LAZY_FORCED = 2
  5126. type Txcb_list_free_func_t = uintptr
  5127. type T_xcb_fd = struct {
  5128. Ffd [16]int32
  5129. Fnfd int32
  5130. Fifd int32
  5131. }
  5132. type T_xcb_out = struct {
  5133. Fcond Tpthread_cond_t
  5134. Fwriting int32
  5135. Fsocket_cond Tpthread_cond_t
  5136. Freturn_socket uintptr
  5137. Fsocket_closure uintptr
  5138. Fsocket_moving int32
  5139. Fqueue [16384]int8
  5140. Fqueue_len int32
  5141. Frequest Tuint64_t
  5142. Frequest_written Tuint64_t
  5143. Frequest_expected_written Tuint64_t
  5144. Ftotal_written Tuint64_t
  5145. Freqlenlock Tpthread_mutex_t
  5146. Fmaximum_request_length_tag _lazy_reply_tag
  5147. Fmaximum_request_length struct {
  5148. Fvalue [0]Tuint32_t
  5149. Fcookie Txcb_big_requests_enable_cookie_t
  5150. }
  5151. Fout_fd T_xcb_fd
  5152. }
  5153. type T_xcb_in = struct {
  5154. Fevent_cond Tpthread_cond_t
  5155. Freading int32
  5156. Fqueue [4096]int8
  5157. Fqueue_len int32
  5158. Frequest_expected Tuint64_t
  5159. Frequest_read Tuint64_t
  5160. Frequest_completed Tuint64_t
  5161. Ftotal_read Tuint64_t
  5162. Fcurrent_reply uintptr
  5163. Fcurrent_reply_tail uintptr
  5164. Freplies uintptr
  5165. Fevents uintptr
  5166. Fevents_tail uintptr
  5167. Freaders uintptr
  5168. Fspecial_waiters uintptr
  5169. Fpending_replies uintptr
  5170. Fpending_replies_tail uintptr
  5171. Fin_fd T_xcb_fd
  5172. Fspecial_events uintptr
  5173. }
  5174. type T_xcb_xid = struct {
  5175. Flock Tpthread_mutex_t
  5176. Flast Tuint32_t
  5177. Fbase Tuint32_t
  5178. Fmax Tuint32_t
  5179. Finc Tuint32_t
  5180. }
  5181. type T_xcb_ext = struct {
  5182. Flock Tpthread_mutex_t
  5183. Fextensions uintptr
  5184. Fextensions_size int32
  5185. }
  5186. type Txcb_connection_t1 = struct {
  5187. Fhas_error int32
  5188. Fsetup uintptr
  5189. Ffd int32
  5190. Fiolock Tpthread_mutex_t
  5191. Fin T_xcb_in
  5192. Fout T_xcb_out
  5193. Fext T_xcb_ext
  5194. Fxid T_xcb_xid
  5195. }
  5196. type Tnfds_t = uint32
  5197. type Tpollfd = struct {
  5198. Ffd int32
  5199. Fevents int16
  5200. Frevents int16
  5201. }
  5202. type Tsocklen_t = uint32
  5203. type Tsa_family_t = uint16
  5204. type Tmsghdr = struct {
  5205. Fmsg_name uintptr
  5206. Fmsg_namelen Tsocklen_t
  5207. Fmsg_iov uintptr
  5208. Fmsg_iovlen int32
  5209. Fmsg_control uintptr
  5210. Fmsg_controllen Tsocklen_t
  5211. Fmsg_flags int32
  5212. }
  5213. type Tcmsghdr = struct {
  5214. Fcmsg_len Tsocklen_t
  5215. Fcmsg_level int32
  5216. Fcmsg_type int32
  5217. }
  5218. type Tucred = struct {
  5219. Fpid Tpid_t
  5220. Fuid Tuid_t
  5221. Fgid Tgid_t
  5222. }
  5223. type Tmmsghdr = struct {
  5224. Fmsg_hdr Tmsghdr
  5225. Fmsg_len uint32
  5226. }
  5227. type Tlinger = struct {
  5228. Fl_onoff int32
  5229. Fl_linger int32
  5230. }
  5231. type Tsockaddr = struct {
  5232. Fsa_family Tsa_family_t
  5233. Fsa_data [14]int8
  5234. }
  5235. type Tsockaddr_storage = struct {
  5236. Fss_family Tsa_family_t
  5237. F__ss_padding [122]int8
  5238. F__ss_align uint32
  5239. }
  5240. type Timaxdiv_t = struct {
  5241. Fquot Tintmax_t
  5242. Frem Tintmax_t
  5243. }
  5244. type Tin_port_t = uint16
  5245. type Tin_addr_t = uint32
  5246. type Tin_addr = struct {
  5247. Fs_addr Tin_addr_t
  5248. }
  5249. type Tsockaddr_in = struct {
  5250. Fsin_family Tsa_family_t
  5251. Fsin_port Tin_port_t
  5252. Fsin_addr Tin_addr
  5253. Fsin_zero [8]Tuint8_t
  5254. }
  5255. type Tin6_addr = struct {
  5256. F__in6_union struct {
  5257. F__s6_addr16 [0][8]Tuint16_t
  5258. F__s6_addr32 [0][4]Tuint32_t
  5259. F__s6_addr [16]Tuint8_t
  5260. }
  5261. }
  5262. type Tsockaddr_in6 = struct {
  5263. Fsin6_family Tsa_family_t
  5264. Fsin6_port Tin_port_t
  5265. Fsin6_flowinfo Tuint32_t
  5266. Fsin6_addr Tin6_addr
  5267. Fsin6_scope_id Tuint32_t
  5268. }
  5269. type Tipv6_mreq = struct {
  5270. Fipv6mr_multiaddr Tin6_addr
  5271. Fipv6mr_interface uint32
  5272. }
  5273. type Tip_opts = struct {
  5274. Fip_dst Tin_addr
  5275. Fip_opts [40]int8
  5276. }
  5277. type Tip_mreq = struct {
  5278. Fimr_multiaddr Tin_addr
  5279. Fimr_interface Tin_addr
  5280. }
  5281. type Tip_mreqn = struct {
  5282. Fimr_multiaddr Tin_addr
  5283. Fimr_address Tin_addr
  5284. Fimr_ifindex int32
  5285. }
  5286. type Tip_mreq_source = struct {
  5287. Fimr_multiaddr Tin_addr
  5288. Fimr_interface Tin_addr
  5289. Fimr_sourceaddr Tin_addr
  5290. }
  5291. type Tip_msfilter = struct {
  5292. Fimsf_multiaddr Tin_addr
  5293. Fimsf_interface Tin_addr
  5294. Fimsf_fmode Tuint32_t
  5295. Fimsf_numsrc Tuint32_t
  5296. Fimsf_slist [1]Tin_addr
  5297. }
  5298. type Tgroup_req = struct {
  5299. Fgr_interface Tuint32_t
  5300. Fgr_group Tsockaddr_storage
  5301. }
  5302. type Tgroup_source_req = struct {
  5303. Fgsr_interface Tuint32_t
  5304. Fgsr_group Tsockaddr_storage
  5305. Fgsr_source Tsockaddr_storage
  5306. }
  5307. type Tgroup_filter = struct {
  5308. Fgf_interface Tuint32_t
  5309. Fgf_group Tsockaddr_storage
  5310. Fgf_fmode Tuint32_t
  5311. Fgf_numsrc Tuint32_t
  5312. Fgf_slist [1]Tsockaddr_storage
  5313. }
  5314. type Tin_pktinfo = struct {
  5315. Fipi_ifindex int32
  5316. Fipi_spec_dst Tin_addr
  5317. Fipi_addr Tin_addr
  5318. }
  5319. type Tin6_pktinfo = struct {
  5320. Fipi6_addr Tin6_addr
  5321. Fipi6_ifindex uint32
  5322. }
  5323. type Tip6_mtuinfo = struct {
  5324. Fip6m_addr Tsockaddr_in6
  5325. Fip6m_mtu Tuint32_t
  5326. }
  5327. /* SHUT_RDWR is fairly recent and is not available on all platforms */
  5328. type Txcb_setup_generic_t = struct {
  5329. Fstatus Tuint8_t
  5330. Fpad0 [5]Tuint8_t
  5331. Flength Tuint16_t
  5332. }
  5333. var _xcb_error_setup = Txcb_setup_t{}
  5334. // C documentation
  5335. //
  5336. // /* Keep this list in sync with is_static_error_conn()! */
  5337. var _xcb_con_error = int32(m_XCB_CONN_ERROR)
  5338. var _xcb_con_closed_mem_er = int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT)
  5339. var _xcb_con_closed_parse_er = int32(m_XCB_CONN_CLOSED_PARSE_ERR)
  5340. var _xcb_con_closed_screen_er = int32(m_XCB_CONN_CLOSED_INVALID_SCREEN)
  5341. func _is_static_error_conn(tls *libc.TLS, c uintptr) (r int32) {
  5342. 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)))
  5343. }
  5344. func _set_fd_flags(tls *libc.TLS, fd int32) (r int32) {
  5345. bp := tls.Alloc(16)
  5346. defer tls.Free(16)
  5347. var flags int32
  5348. _ = flags
  5349. /* Win32 doesn't have file descriptors and the fcntl function. This block sets the socket in non-blocking mode */
  5350. flags = libc.Xfcntl(tls, fd, int32(m_F_GETFL), libc.VaList(bp+8, 0))
  5351. if flags == -int32(1) {
  5352. return 0
  5353. }
  5354. flags |= int32(m_O_NONBLOCK)
  5355. if libc.Xfcntl(tls, fd, int32(m_F_SETFL), libc.VaList(bp+8, flags)) == -int32(1) {
  5356. return 0
  5357. }
  5358. if libc.Xfcntl(tls, fd, int32(m_F_SETFD), libc.VaList(bp+8, int32(m_FD_CLOEXEC))) == -int32(1) {
  5359. return 0
  5360. }
  5361. return int32(1)
  5362. }
  5363. func _write_setup(tls *libc.TLS, c uintptr, auth_info uintptr) (r int32) {
  5364. bp := tls.Alloc(64)
  5365. defer tls.Free(64)
  5366. var count, ret, v1, v2, v4, v5, v7, v8 int32
  5367. var v3, v6 Tuint16_t
  5368. var _ /* out at bp+0 */ Txcb_setup_request_t
  5369. var _ /* parts at bp+12 */ [6]Tiovec
  5370. _, _, _, _, _, _, _, _, _, _ = count, ret, v1, v2, v3, v4, v5, v6, v7, v8
  5371. count = 0
  5372. libc.Xmemset(tls, bp, 0, uint32(12))
  5373. /* B = 0x42 = MSB first, l = 0x6c = LSB first */
  5374. if libc.Xhtonl(tls, _endian) == _endian {
  5375. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fbyte_order = uint8(0x42)
  5376. } else {
  5377. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fbyte_order = uint8(0x6c)
  5378. }
  5379. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fprotocol_major_version = uint16(m_X_PROTOCOL)
  5380. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fprotocol_minor_version = uint16(m_X_PROTOCOL_REVISION)
  5381. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_name_len = uint16(0)
  5382. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_data_len = uint16(0)
  5383. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[count].Fiov_len = uint32(12)
  5384. v1 = count
  5385. count++
  5386. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[v1].Fiov_base = bp
  5387. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[count].Fiov_len = -libc.Uint32FromInt64(12) & libc.Uint32FromInt32(3)
  5388. v2 = count
  5389. count++
  5390. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[v2].Fiov_base = uintptr(unsafe.Pointer(&_pad))
  5391. if auth_info != 0 {
  5392. v3 = libc.Uint16FromInt32((*Txcb_auth_info_t)(unsafe.Pointer(auth_info)).Fnamelen)
  5393. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_name_len = v3
  5394. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[count].Fiov_len = uint32(v3)
  5395. v4 = count
  5396. count++
  5397. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[v4].Fiov_base = (*Txcb_auth_info_t)(unsafe.Pointer(auth_info)).Fname
  5398. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[count].Fiov_len = libc.Uint32FromInt32(-libc.Int32FromUint16((*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_name_len) & libc.Int32FromInt32(3))
  5399. v5 = count
  5400. count++
  5401. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[v5].Fiov_base = uintptr(unsafe.Pointer(&_pad))
  5402. v6 = libc.Uint16FromInt32((*Txcb_auth_info_t)(unsafe.Pointer(auth_info)).Fdatalen)
  5403. (*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_data_len = v6
  5404. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[count].Fiov_len = uint32(v6)
  5405. v7 = count
  5406. count++
  5407. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[v7].Fiov_base = (*Txcb_auth_info_t)(unsafe.Pointer(auth_info)).Fdata
  5408. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[count].Fiov_len = libc.Uint32FromInt32(-libc.Int32FromUint16((*(*Txcb_setup_request_t)(unsafe.Pointer(bp))).Fauthorization_protocol_data_len) & libc.Int32FromInt32(3))
  5409. v8 = count
  5410. count++
  5411. (*(*[6]Tiovec)(unsafe.Pointer(bp + 12)))[v8].Fiov_base = uintptr(unsafe.Pointer(&_pad))
  5412. }
  5413. libc.Xpthread_mutex_lock(tls, c+12)
  5414. ret = X_xcb_out_send(tls, c, bp+12, count)
  5415. libc.Xpthread_mutex_unlock(tls, c+12)
  5416. return ret
  5417. }
  5418. var _pad [3]int8
  5419. var _endian = uint32(0x01020304)
  5420. func _read_setup(tls *libc.TLS, c uintptr) (r int32) {
  5421. bp := tls.Alloc(16)
  5422. defer tls.Free(16)
  5423. var setup, setup1, tmp uintptr
  5424. var _ /* newline at bp+0 */ int8
  5425. _, _, _ = setup, setup1, tmp
  5426. *(*int8)(unsafe.Pointer(bp)) = int8('\n')
  5427. /* Read the server response */
  5428. (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup = libc.Xmalloc(tls, uint32(8))
  5429. if !((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup != 0) {
  5430. return 0
  5431. }
  5432. if libc.Uint32FromInt32(X_xcb_in_read_block(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup, int32(8))) != uint32(8) {
  5433. return 0
  5434. }
  5435. tmp = libc.Xrealloc(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup, libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Flength)*int32(4))+uint32(8))
  5436. if !(tmp != 0) {
  5437. return 0
  5438. }
  5439. (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup = tmp
  5440. 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 {
  5441. return 0
  5442. }
  5443. /* 0 = failed, 2 = authenticate, 1 = success */
  5444. switch libc.Int32FromUint8((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fstatus) {
  5445. case 0: /* failed */
  5446. setup = (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup
  5447. libc.Xwrite(tls, int32(m_STDERR_FILENO), Xxcb_setup_failed_reason(tls, setup), libc.Uint32FromInt32(Xxcb_setup_failed_reason_length(tls, setup)))
  5448. libc.Xwrite(tls, int32(m_STDERR_FILENO), bp, uint32(1))
  5449. return 0
  5450. case int32(2): /* authenticate */
  5451. setup1 = (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup
  5452. libc.Xwrite(tls, int32(m_STDERR_FILENO), Xxcb_setup_authenticate_reason(tls, setup1), libc.Uint32FromInt32(Xxcb_setup_authenticate_reason_length(tls, setup1)))
  5453. libc.Xwrite(tls, int32(m_STDERR_FILENO), bp, uint32(1))
  5454. return 0
  5455. }
  5456. return int32(1)
  5457. }
  5458. // C documentation
  5459. //
  5460. // /* precondition: there must be something for us to write. */
  5461. func _write_vec(tls *libc.TLS, c uintptr, vector uintptr, count uintptr) (r int32) {
  5462. bp := tls.Alloc(112)
  5463. defer tls.Free(112)
  5464. var cur, i, n int32
  5465. var hdr, v1 uintptr
  5466. var _ /* cmsgbuf at bp+0 */ struct {
  5467. Fbuf [0][76]int8
  5468. Fcmsghdr Tcmsghdr
  5469. F__ccgo_pad2 [64]byte
  5470. }
  5471. var _ /* msg at bp+76 */ Tmsghdr
  5472. _, _, _, _, _ = cur, hdr, i, n, v1
  5473. n = *(*int32)(unsafe.Pointer(count))
  5474. if n > int32(m_IOV_MAX) {
  5475. n = int32(m_IOV_MAX)
  5476. }
  5477. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd != 0 {
  5478. *(*Tmsghdr)(unsafe.Pointer(bp + 76)) = Tmsghdr{
  5479. Fmsg_iov: *(*uintptr)(unsafe.Pointer(vector)),
  5480. Fmsg_iovlen: n,
  5481. Fmsg_control: bp,
  5482. Fmsg_controllen: (libc.Uint32FromInt64(12)+libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1)) & ^(libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1)) + libc.Uint32FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd)*libc.Uint32FromInt64(4),
  5483. }
  5484. if (*Tmsghdr)(unsafe.Pointer(bp+76)).Fmsg_controllen >= uint32(12) {
  5485. v1 = (*Tmsghdr)(unsafe.Pointer(bp + 76)).Fmsg_control
  5486. } else {
  5487. v1 = libc.UintptrFromInt32(0)
  5488. }
  5489. hdr = v1
  5490. (*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_len = (*(*Tmsghdr)(unsafe.Pointer(bp + 76))).Fmsg_controllen
  5491. (*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_level = int32(m_SOL_SOCKET)
  5492. (*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_type = int32(m_SCM_RIGHTS)
  5493. libc.Xmemcpy(tls, hdr+libc.UintptrFromInt32(1)*12, c+4336+16568, libc.Uint32FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd)*uint32(4))
  5494. n = libc.Xsendmsg(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd, bp+76, 0)
  5495. if n < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == int32(m_EAGAIN) {
  5496. return int32(1)
  5497. }
  5498. i = 0
  5499. for {
  5500. if !(i < (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd) {
  5501. break
  5502. }
  5503. libc.Xclose(tls, *(*int32)(unsafe.Pointer(c + 4336 + 16568 + uintptr(i)*4)))
  5504. goto _2
  5505. _2:
  5506. ;
  5507. i++
  5508. }
  5509. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd = 0
  5510. } else {
  5511. n = libc.Xwritev(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd, *(*uintptr)(unsafe.Pointer(vector)), n)
  5512. if n < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == int32(m_EAGAIN) {
  5513. return int32(1)
  5514. }
  5515. }
  5516. if n <= 0 {
  5517. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_ERROR))
  5518. return 0
  5519. }
  5520. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Ftotal_written += libc.Uint64FromInt32(n)
  5521. for {
  5522. if !(*(*int32)(unsafe.Pointer(count)) != 0) {
  5523. break
  5524. }
  5525. cur = libc.Int32FromUint32((*Tiovec)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(vector)))).Fiov_len)
  5526. if cur > n {
  5527. cur = n
  5528. }
  5529. *(*Tsize_t)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(vector)) + 4)) -= libc.Uint32FromInt32(cur)
  5530. (*Tiovec)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(vector)))).Fiov_base = (*Tiovec)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(vector)))).Fiov_base + uintptr(cur)
  5531. n -= cur
  5532. if (*Tiovec)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(vector)))).Fiov_len != 0 {
  5533. break
  5534. }
  5535. goto _3
  5536. _3:
  5537. ;
  5538. *(*int32)(unsafe.Pointer(count))--
  5539. *(*uintptr)(unsafe.Pointer(vector)) += 8
  5540. }
  5541. if !(*(*int32)(unsafe.Pointer(count)) != 0) {
  5542. *(*uintptr)(unsafe.Pointer(vector)) = uintptr(0)
  5543. }
  5544. return int32(1)
  5545. }
  5546. /* Public interface */
  5547. func Xxcb_get_setup(tls *libc.TLS, c uintptr) (r uintptr) {
  5548. if _is_static_error_conn(tls, c) != 0 {
  5549. return uintptr(unsafe.Pointer(&_xcb_error_setup))
  5550. }
  5551. /* doesn't need locking because it's never written to. */
  5552. return (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup
  5553. }
  5554. func Xxcb_get_file_descriptor(tls *libc.TLS, c uintptr) (r int32) {
  5555. if _is_static_error_conn(tls, c) != 0 {
  5556. return -int32(1)
  5557. }
  5558. /* doesn't need locking because it's never written to. */
  5559. return (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd
  5560. }
  5561. func Xxcb_connection_has_error(tls *libc.TLS, c uintptr) (r int32) {
  5562. /* doesn't need locking because it's read and written atomically. */
  5563. return (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error
  5564. }
  5565. func Xxcb_connect_to_fd(tls *libc.TLS, fd int32, auth_info uintptr) (r uintptr) {
  5566. var c uintptr
  5567. _ = c
  5568. c = libc.Xcalloc(tls, uint32(1), uint32(21056))
  5569. if !(c != 0) {
  5570. libc.Xclose(tls, fd)
  5571. return X_xcb_conn_ret_error(tls, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  5572. }
  5573. (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd = fd
  5574. if !(_set_fd_flags(tls, fd) != 0 && libc.Xpthread_mutex_init(tls, c+12, uintptr(0)) == 0 && X_xcb_in_init(tls, c+40) != 0 && X_xcb_out_init(tls, c+4336) != 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) {
  5575. Xxcb_disconnect(tls, c)
  5576. return X_xcb_conn_ret_error(tls, int32(m_XCB_CONN_ERROR))
  5577. }
  5578. return c
  5579. }
  5580. func Xxcb_disconnect(tls *libc.TLS, c uintptr) {
  5581. if c == libc.UintptrFromInt32(0) || _is_static_error_conn(tls, c) != 0 {
  5582. return
  5583. }
  5584. libc.Xfree(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)
  5585. /* disallow further sends and receives */
  5586. libc.Xshutdown(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd, int32(m_SHUT_RDWR))
  5587. libc.Xclose(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd)
  5588. libc.Xpthread_mutex_destroy(tls, c+12)
  5589. X_xcb_in_destroy(tls, c+40)
  5590. X_xcb_out_destroy(tls, c+4336)
  5591. X_xcb_ext_destroy(tls, c)
  5592. X_xcb_xid_destroy(tls, c)
  5593. libc.Xfree(tls, c)
  5594. }
  5595. /* Private interface */
  5596. func X_xcb_conn_shutdown(tls *libc.TLS, c uintptr, err int32) {
  5597. (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error = err
  5598. }
  5599. // C documentation
  5600. //
  5601. // /* Return connection error state.
  5602. // * To make thread-safe, I need a seperate static
  5603. // * variable for every possible error.
  5604. // * has_error is the first field in xcb_connection_t, so just
  5605. // * return a casted int here; checking has_error (and only
  5606. // * has_error) will be safe.
  5607. // */
  5608. func X_xcb_conn_ret_error(tls *libc.TLS, err int32) (r uintptr) {
  5609. switch err {
  5610. case int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT):
  5611. return uintptr(unsafe.Pointer(&_xcb_con_closed_mem_er))
  5612. case int32(m_XCB_CONN_CLOSED_PARSE_ERR):
  5613. return uintptr(unsafe.Pointer(&_xcb_con_closed_parse_er))
  5614. case int32(m_XCB_CONN_CLOSED_INVALID_SCREEN):
  5615. return uintptr(unsafe.Pointer(&_xcb_con_closed_screen_er))
  5616. case int32(m_XCB_CONN_ERROR):
  5617. fallthrough
  5618. default:
  5619. return uintptr(unsafe.Pointer(&_xcb_con_error))
  5620. }
  5621. return r
  5622. }
  5623. func X_xcb_conn_wait(tls *libc.TLS, c uintptr, cond uintptr, vector uintptr, count uintptr) (r int32) {
  5624. bp := tls.Alloc(16)
  5625. defer tls.Free(16)
  5626. var may_read, ret, v1 int32
  5627. var p2 uintptr
  5628. var _ /* fd at bp+0 */ Tpollfd
  5629. _, _, _, _ = may_read, ret, v1, p2
  5630. /* If the thing I should be doing is already being done, wait for it. */
  5631. if count != 0 {
  5632. v1 = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fwriting
  5633. } else {
  5634. v1 = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading
  5635. }
  5636. if v1 != 0 {
  5637. libc.Xpthread_cond_wait(tls, cond, c+12)
  5638. return int32(1)
  5639. }
  5640. libc.Xmemset(tls, bp, 0, uint32(8))
  5641. (*(*Tpollfd)(unsafe.Pointer(bp))).Ffd = (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd
  5642. (*(*Tpollfd)(unsafe.Pointer(bp))).Fevents = int16(m_POLLIN)
  5643. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading++
  5644. if count != 0 {
  5645. p2 = bp + 4
  5646. *(*int16)(unsafe.Pointer(p2)) = int16(int32(*(*int16)(unsafe.Pointer(p2))) | libc.Int32FromInt32(m_POLLOUT))
  5647. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fwriting++
  5648. }
  5649. libc.Xpthread_mutex_unlock(tls, c+12)
  5650. for cond1 := true; cond1; cond1 = ret == -int32(1) && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == int32(m_EINTR) {
  5651. ret = libc.Xpoll(tls, bp, uint32(1), -int32(1))
  5652. /* If poll() returns an event we didn't expect, such as POLLNVAL, treat
  5653. * it as if it failed. */
  5654. if ret >= 0 && int32((*(*Tpollfd)(unsafe.Pointer(bp))).Frevents) & ^int32((*(*Tpollfd)(unsafe.Pointer(bp))).Fevents) != 0 {
  5655. ret = -int32(1)
  5656. break
  5657. }
  5658. }
  5659. if ret < 0 {
  5660. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_ERROR))
  5661. ret = 0
  5662. }
  5663. libc.Xpthread_mutex_lock(tls, c+12)
  5664. if ret != 0 {
  5665. /* The code allows two threads to call select()/poll() at the same time.
  5666. * First thread just wants to read, a second thread wants to write, too.
  5667. * We have to make sure that we don't steal the reading thread's reply
  5668. * and let it get stuck in select()/poll().
  5669. * So a thread may read if either:
  5670. * - There is no other thread that wants to read (the above situation
  5671. * did not occur).
  5672. * - It is the reading thread (above situation occurred).
  5673. */
  5674. may_read = libc.BoolInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading == int32(1) || !(count != 0))
  5675. if may_read != 0 && int32((*(*Tpollfd)(unsafe.Pointer(bp))).Frevents)&int32(m_POLLIN) != 0 {
  5676. ret = libc.BoolInt32(ret != 0 && X_xcb_in_read(tls, c) != 0)
  5677. }
  5678. if int32((*(*Tpollfd)(unsafe.Pointer(bp))).Frevents)&int32(m_POLLOUT) != 0 {
  5679. ret = libc.BoolInt32(ret != 0 && _write_vec(tls, c, vector, count) != 0)
  5680. }
  5681. }
  5682. if count != 0 {
  5683. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fwriting--
  5684. }
  5685. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freading--
  5686. return ret
  5687. }
  5688. func Xxcb_total_read(tls *libc.TLS, c uintptr) (r Tuint64_t) {
  5689. var n Tuint64_t
  5690. _ = n
  5691. if Xxcb_connection_has_error(tls, c) != 0 {
  5692. return uint64(0)
  5693. }
  5694. libc.Xpthread_mutex_lock(tls, c+12)
  5695. n = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Ftotal_read
  5696. libc.Xpthread_mutex_unlock(tls, c+12)
  5697. return n
  5698. }
  5699. func Xxcb_total_written(tls *libc.TLS, c uintptr) (r Tuint64_t) {
  5700. var n Tuint64_t
  5701. _ = n
  5702. if Xxcb_connection_has_error(tls, c) != 0 {
  5703. return uint64(0)
  5704. }
  5705. libc.Xpthread_mutex_lock(tls, c+12)
  5706. n = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Ftotal_written
  5707. libc.Xpthread_mutex_unlock(tls, c+12)
  5708. return n
  5709. }
  5710. const m_SEEK_CUR = 1
  5711. const m_SEEK_END = 2
  5712. const m_SEEK_SET = 0
  5713. type Txcb_extension_t = struct {
  5714. Fname uintptr
  5715. Fglobal_id int32
  5716. }
  5717. type Txcb_extension_t1 = struct {
  5718. Fname uintptr
  5719. Fglobal_id int32
  5720. }
  5721. type Txcb_protocol_request_t = struct {
  5722. Fcount Tsize_t
  5723. Fext uintptr
  5724. Fopcode Tuint8_t
  5725. Fisvoid Tuint8_t
  5726. }
  5727. type _xcb_send_request_flags_t = int32
  5728. const _XCB_REQUEST_CHECKED = 1
  5729. const _XCB_REQUEST_RAW = 2
  5730. const _XCB_REQUEST_DISCARD_REPLY = 4
  5731. const _XCB_REQUEST_REPLY_FDS = 8
  5732. /*
  5733. * This file generated automatically from bigreq.xml by c_client.py.
  5734. * Edit at your peril.
  5735. */
  5736. /**
  5737. * @defgroup XCB_BigRequests_API XCB BigRequests API
  5738. * @brief BigRequests XCB Protocol Implementation.
  5739. * @{
  5740. **/
  5741. /**
  5742. * @}
  5743. */
  5744. func _send_request(tls *libc.TLS, c uintptr, isvoid int32, workaround _workarounds, flags int32, vector uintptr, count int32) {
  5745. var p1 uintptr
  5746. _ = p1
  5747. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  5748. return
  5749. }
  5750. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest++
  5751. if !(isvoid != 0) {
  5752. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_expected = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest
  5753. }
  5754. if workaround != int32(_WORKAROUND_NONE) || flags != 0 {
  5755. X_xcb_in_expect_reply(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest, workaround, flags)
  5756. }
  5757. for count != 0 && libc.Uint32FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len)+(*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len <= uint32(16384) {
  5758. libc.Xmemcpy(tls, c+4336+112+uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len), (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base, (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len)
  5759. p1 = c + 4336 + 16496
  5760. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len)
  5761. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base + uintptr((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len)
  5762. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len = uint32(0)
  5763. vector += 8
  5764. count--
  5765. }
  5766. if !(count != 0) {
  5767. return
  5768. }
  5769. vector -= 8
  5770. count++
  5771. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base = c + 4336 + 112
  5772. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len = libc.Uint32FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len)
  5773. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len = 0
  5774. X_xcb_out_send(tls, c, vector, count)
  5775. }
  5776. func _send_sync(tls *libc.TLS, c uintptr) {
  5777. bp := tls.Alloc(16)
  5778. defer tls.Free(16)
  5779. var _ /* vector at bp+0 */ [2]Tiovec
  5780. (*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_base = uintptr(unsafe.Pointer(&_sync_req))
  5781. (*(*[2]Tiovec)(unsafe.Pointer(bp)))[int32(1)].Fiov_len = uint32(4)
  5782. _send_request(tls, c, 0, int32(_WORKAROUND_NONE), int32(_XCB_REQUEST_DISCARD_REPLY), bp+uintptr(1)*8, int32(1))
  5783. }
  5784. var _sync_req = *(*struct {
  5785. Fpacket [0]Tuint32_t
  5786. Ffields struct {
  5787. Fmajor Tuint8_t
  5788. Fpad Tuint8_t
  5789. Flen1 Tuint16_t
  5790. }
  5791. })(unsafe.Pointer(&struct {
  5792. Fmajor uint8
  5793. Fpad uint8
  5794. Flen1 uint16
  5795. }{
  5796. Fmajor: uint8(43),
  5797. Flen1: uint16(1),
  5798. }))
  5799. func _get_socket_back(tls *libc.TLS, c uintptr) {
  5800. for (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Freturn_socket != 0 && (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fsocket_moving != 0 {
  5801. libc.Xpthread_cond_wait(tls, c+4336+52, c+12)
  5802. }
  5803. if !((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Freturn_socket != 0) {
  5804. return
  5805. }
  5806. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fsocket_moving = int32(1)
  5807. libc.Xpthread_mutex_unlock(tls, c+12)
  5808. (*(*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)
  5809. libc.Xpthread_mutex_lock(tls, c+12)
  5810. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fsocket_moving = 0
  5811. libc.Xpthread_cond_broadcast(tls, c+4336+52)
  5812. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Freturn_socket = uintptr(0)
  5813. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fsocket_closure = uintptr(0)
  5814. X_xcb_in_replies_done(tls, c)
  5815. }
  5816. func _prepare_socket_request(tls *libc.TLS, c uintptr) {
  5817. /* We're about to append data to out.queue, so we need to
  5818. * atomically test for an external socket owner *and* some other
  5819. * thread currently writing.
  5820. *
  5821. * If we have an external socket owner, we have to get the socket back
  5822. * before we can use it again.
  5823. *
  5824. * If some other thread is writing to the socket, we assume it's
  5825. * writing from out.queue, and so we can't stick data there.
  5826. *
  5827. * We satisfy this condition by first calling get_socket_back
  5828. * (which may drop the lock, but will return when XCB owns the
  5829. * socket again) and then checking for another writing thread and
  5830. * escaping the loop if we're ready to go.
  5831. */
  5832. for {
  5833. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  5834. return
  5835. }
  5836. _get_socket_back(tls, c)
  5837. if !((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fwriting != 0) {
  5838. break
  5839. }
  5840. libc.Xpthread_cond_wait(tls, c+4336, c+12)
  5841. goto _1
  5842. _1:
  5843. }
  5844. }
  5845. /* Public interface */
  5846. func Xxcb_prefetch_maximum_request_length(tls *libc.TLS, c uintptr) {
  5847. var ext uintptr
  5848. _ = ext
  5849. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  5850. return
  5851. }
  5852. libc.Xpthread_mutex_lock(tls, c+4336+16532)
  5853. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fmaximum_request_length_tag == int32(_LAZY_NONE) {
  5854. ext = Xxcb_get_extension_data(tls, c, uintptr(unsafe.Pointer(&Xxcb_big_requests_id)))
  5855. if ext != 0 && (*Txcb_query_extension_reply_t)(unsafe.Pointer(ext)).Fpresent != 0 {
  5856. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fmaximum_request_length_tag = int32(_LAZY_COOKIE)
  5857. *(*Txcb_big_requests_enable_cookie_t)(unsafe.Pointer(c + 4336 + 16564)) = Xxcb_big_requests_enable(tls, c)
  5858. } else {
  5859. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fmaximum_request_length_tag = int32(_LAZY_FORCED)
  5860. *(*Tuint32_t)(unsafe.Pointer(c + 4336 + 16564)) = uint32((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fmaximum_request_length)
  5861. }
  5862. }
  5863. libc.Xpthread_mutex_unlock(tls, c+4336+16532)
  5864. }
  5865. func Xxcb_get_maximum_request_length(tls *libc.TLS, c uintptr) (r1 Tuint32_t) {
  5866. var r uintptr
  5867. _ = r
  5868. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  5869. return uint32(0)
  5870. }
  5871. Xxcb_prefetch_maximum_request_length(tls, c)
  5872. libc.Xpthread_mutex_lock(tls, c+4336+16532)
  5873. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fmaximum_request_length_tag == int32(_LAZY_COOKIE) {
  5874. r = Xxcb_big_requests_enable_reply(tls, c, *(*Txcb_big_requests_enable_cookie_t)(unsafe.Pointer(c + 4336 + 16564)), uintptr(0))
  5875. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fmaximum_request_length_tag = int32(_LAZY_FORCED)
  5876. if r != 0 {
  5877. *(*Tuint32_t)(unsafe.Pointer(c + 4336 + 16564)) = (*Txcb_big_requests_enable_reply_t)(unsafe.Pointer(r)).Fmaximum_request_length
  5878. libc.Xfree(tls, r)
  5879. } else {
  5880. *(*Tuint32_t)(unsafe.Pointer(c + 4336 + 16564)) = uint32((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fmaximum_request_length)
  5881. }
  5882. }
  5883. libc.Xpthread_mutex_unlock(tls, c+4336+16532)
  5884. return *(*Tuint32_t)(unsafe.Pointer(c + 4336 + 16564))
  5885. }
  5886. func _close_fds(tls *libc.TLS, fds uintptr, num_fds uint32) {
  5887. var index uint32
  5888. _ = index
  5889. index = uint32(0)
  5890. for {
  5891. if !(index < num_fds) {
  5892. break
  5893. }
  5894. libc.Xclose(tls, *(*int32)(unsafe.Pointer(fds + uintptr(index)*4)))
  5895. goto _1
  5896. _1:
  5897. ;
  5898. index++
  5899. }
  5900. }
  5901. func _send_fds(tls *libc.TLS, c uintptr, fds uintptr, num_fds uint32) {
  5902. var v1 int32
  5903. var v2 uintptr
  5904. _, _ = v1, v2
  5905. /* Calling _xcb_out_flush_to() can drop the iolock and wait on a condition
  5906. * variable if another thread is currently writing (c->out.writing > 0).
  5907. * This call waits for writers to be done and thus _xcb_out_flush_to() will
  5908. * do the work itself (in which case we are a writer and
  5909. * prepare_socket_request() will wait for us to be done if another threads
  5910. * tries to send fds, too). Thanks to this, we can atomically write out FDs.
  5911. */
  5912. _prepare_socket_request(tls, c)
  5913. for num_fds > uint32(0) {
  5914. 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) {
  5915. /* XXX: if c->out.writing > 0, this releases the iolock and
  5916. * potentially allows other threads to interfere with their own fds.
  5917. */
  5918. X_xcb_out_flush_to(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest)
  5919. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fout_fd.Fnfd == int32(m_XCB_MAX_PASS_FD) {
  5920. /* We need some request to send FDs with */
  5921. X_xcb_out_send_sync(tls, c)
  5922. }
  5923. }
  5924. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  5925. break
  5926. }
  5927. v2 = c + 4336 + 16568 + 64
  5928. v1 = *(*int32)(unsafe.Pointer(v2))
  5929. *(*int32)(unsafe.Pointer(v2))++
  5930. *(*int32)(unsafe.Pointer(c + 4336 + 16568 + uintptr(v1)*4)) = *(*int32)(unsafe.Pointer(fds))
  5931. fds += 4
  5932. num_fds--
  5933. }
  5934. _close_fds(tls, fds, num_fds)
  5935. }
  5936. 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) {
  5937. bp := tls.Alloc(16)
  5938. defer tls.Free(16)
  5939. var extension uintptr
  5940. var i uint32
  5941. var longlen, v2 Tsize_t
  5942. var request Tuint64_t
  5943. var shortlen Tuint16_t
  5944. var veclen int32
  5945. var workaround _workarounds
  5946. var v3 uint64
  5947. var _ /* prefix at bp+0 */ [2]Tuint32_t
  5948. _, _, _, _, _, _, _, _, _ = extension, i, longlen, request, shortlen, veclen, workaround, v2, v3
  5949. veclen = libc.Int32FromUint32((*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fcount)
  5950. workaround = int32(_WORKAROUND_NONE)
  5951. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  5952. _close_fds(tls, fds, num_fds)
  5953. return uint64(0)
  5954. }
  5955. if !(flags&int32(_XCB_REQUEST_RAW) != 0) {
  5956. shortlen = uint16(0)
  5957. longlen = uint32(0)
  5958. /* set the major opcode, and the minor opcode for extensions */
  5959. if (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fext != 0 {
  5960. extension = Xxcb_get_extension_data(tls, c, (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fext)
  5961. if !(extension != 0 && (*Txcb_query_extension_reply_t)(unsafe.Pointer(extension)).Fpresent != 0) {
  5962. _close_fds(tls, fds, num_fds)
  5963. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_EXT_NOTSUPPORTED))
  5964. return uint64(0)
  5965. }
  5966. *(*Tuint8_t)(unsafe.Pointer((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base)) = (*Txcb_query_extension_reply_t)(unsafe.Pointer(extension)).Fmajor_opcode
  5967. *(*Tuint8_t)(unsafe.Pointer((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base + 1)) = (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fopcode
  5968. } else {
  5969. *(*Tuint8_t)(unsafe.Pointer((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base)) = (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fopcode
  5970. }
  5971. /* put together the length field, possibly using BIGREQUESTS */
  5972. i = uint32(0)
  5973. for {
  5974. if !(i < (*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fcount) {
  5975. break
  5976. }
  5977. longlen += (*(*Tiovec)(unsafe.Pointer(vector + uintptr(i)*8))).Fiov_len
  5978. if !((*(*Tiovec)(unsafe.Pointer(vector + uintptr(i)*8))).Fiov_base != 0) {
  5979. (*(*Tiovec)(unsafe.Pointer(vector + uintptr(i)*8))).Fiov_base = uintptr(unsafe.Pointer(&_pad1))
  5980. }
  5981. goto _1
  5982. _1:
  5983. ;
  5984. i++
  5985. }
  5986. longlen >>= uint32(2)
  5987. if longlen <= uint32((*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fmaximum_request_length) {
  5988. /* we don't need BIGREQUESTS. */
  5989. shortlen = uint16(longlen)
  5990. longlen = uint32(0)
  5991. } else {
  5992. if longlen > Xxcb_get_maximum_request_length(tls, c) {
  5993. _close_fds(tls, fds, num_fds)
  5994. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_REQ_LEN_EXCEED))
  5995. return uint64(0) /* server can't take this; maybe need BIGREQUESTS? */
  5996. }
  5997. }
  5998. /* set the length field. */
  5999. *(*Tuint16_t)(unsafe.Pointer((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base + 1*2)) = shortlen
  6000. if !(shortlen != 0) {
  6001. (*(*[2]Tuint32_t)(unsafe.Pointer(bp)))[0] = *(*Tuint32_t)(unsafe.Pointer((*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base))
  6002. longlen++
  6003. v2 = longlen
  6004. (*(*[2]Tuint32_t)(unsafe.Pointer(bp)))[int32(1)] = v2
  6005. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base = (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base + uintptr(1)*4
  6006. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len -= uint32(4)
  6007. vector -= 8
  6008. veclen++
  6009. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_base = bp
  6010. (*(*Tiovec)(unsafe.Pointer(vector))).Fiov_len = uint32(8)
  6011. }
  6012. }
  6013. flags &= ^int32(_XCB_REQUEST_RAW)
  6014. /* do we need to work around the X server bug described in glx.xml? */
  6015. /* XXX: GetFBConfigs won't use BIG-REQUESTS in any sane
  6016. * configuration, but that should be handled here anyway. */
  6017. 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)) {
  6018. workaround = int32(_WORKAROUND_GLX_GET_FB_CONFIGS_BUG)
  6019. }
  6020. /* get a sequence number and arrange for delivery. */
  6021. libc.Xpthread_mutex_lock(tls, c+12)
  6022. /* send FDs before establishing a good request number, because this might
  6023. * call send_sync(), too
  6024. */
  6025. _send_fds(tls, c, fds, num_fds)
  6026. _prepare_socket_request(tls, c)
  6027. /* send GetInputFocus (sync_req) when 64k-2 requests have been sent without
  6028. * a reply.
  6029. * Also send sync_req (could use NoOp) at 32-bit wrap to avoid having
  6030. * applications see sequence 0 as that is used to indicate
  6031. * an error in sending the request
  6032. */
  6033. 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) {
  6034. _send_sync(tls, c)
  6035. _prepare_socket_request(tls, c)
  6036. }
  6037. _send_request(tls, c, libc.Int32FromUint8((*Txcb_protocol_request_t)(unsafe.Pointer(req)).Fisvoid), workaround, flags, vector, veclen)
  6038. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6039. v3 = uint64(0)
  6040. } else {
  6041. v3 = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest
  6042. }
  6043. request = v3
  6044. libc.Xpthread_mutex_unlock(tls, c+12)
  6045. return request
  6046. }
  6047. var _pad1 [3]int8
  6048. // C documentation
  6049. //
  6050. // /* request number are actually uint64_t internally but keep API compat with unsigned int */
  6051. func Xxcb_send_request_with_fds(tls *libc.TLS, c uintptr, flags int32, vector uintptr, req uintptr, num_fds uint32, fds uintptr) (r uint32) {
  6052. return uint32(Xxcb_send_request_with_fds64(tls, c, flags, vector, req, num_fds, fds))
  6053. }
  6054. func Xxcb_send_request64(tls *libc.TLS, c uintptr, flags int32, vector uintptr, req uintptr) (r Tuint64_t) {
  6055. return Xxcb_send_request_with_fds64(tls, c, flags, vector, req, uint32(0), libc.UintptrFromInt32(0))
  6056. }
  6057. // C documentation
  6058. //
  6059. // /* request number are actually uint64_t internally but keep API compat with unsigned int */
  6060. func Xxcb_send_request(tls *libc.TLS, c uintptr, flags int32, vector uintptr, req uintptr) (r uint32) {
  6061. return uint32(Xxcb_send_request64(tls, c, flags, vector, req))
  6062. }
  6063. func Xxcb_send_fd(tls *libc.TLS, c uintptr, fd int32) {
  6064. bp := tls.Alloc(16)
  6065. defer tls.Free(16)
  6066. var _ /* fds at bp+0 */ [1]int32
  6067. *(*[1]int32)(unsafe.Pointer(bp)) = [1]int32{
  6068. 0: fd,
  6069. }
  6070. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6071. libc.Xclose(tls, fd)
  6072. return
  6073. }
  6074. libc.Xpthread_mutex_lock(tls, c+12)
  6075. _send_fds(tls, c, bp, uint32(1))
  6076. libc.Xpthread_mutex_unlock(tls, c+12)
  6077. }
  6078. func Xxcb_take_socket(tls *libc.TLS, c uintptr, return_socket uintptr, closure uintptr, flags int32, sent uintptr) (r int32) {
  6079. var ret int32
  6080. _ = ret
  6081. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6082. return 0
  6083. }
  6084. libc.Xpthread_mutex_lock(tls, c+12)
  6085. _get_socket_back(tls, c)
  6086. /* _xcb_out_flush may drop the iolock allowing other threads to
  6087. * write requests, so keep flushing until we're done
  6088. */
  6089. for cond := true; cond; cond = ret != 0 && (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest != (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest_written {
  6090. ret = X_xcb_out_flush_to(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest)
  6091. }
  6092. if ret != 0 {
  6093. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Freturn_socket = return_socket
  6094. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fsocket_closure = closure
  6095. if flags != 0 {
  6096. /* c->out.request + 1 will be the first request sent by the external
  6097. * socket owner. If the socket is returned before this request is sent
  6098. * it will be detected in _xcb_in_replies_done and this pending_reply
  6099. * will be discarded.
  6100. */
  6101. X_xcb_in_expect_reply(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest+uint64(1), int32(_WORKAROUND_EXTERNAL_SOCKET_OWNER), flags)
  6102. }
  6103. *(*Tuint64_t)(unsafe.Pointer(sent)) = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest
  6104. }
  6105. libc.Xpthread_mutex_unlock(tls, c+12)
  6106. return ret
  6107. }
  6108. func Xxcb_writev(tls *libc.TLS, c uintptr, vector uintptr, count int32, requests Tuint64_t) (r int32) {
  6109. var ret int32
  6110. _ = ret
  6111. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6112. return 0
  6113. }
  6114. libc.Xpthread_mutex_lock(tls, c+12)
  6115. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest += requests
  6116. ret = X_xcb_out_send(tls, c, vector, count)
  6117. libc.Xpthread_mutex_unlock(tls, c+12)
  6118. return ret
  6119. }
  6120. func Xxcb_flush(tls *libc.TLS, c uintptr) (r int32) {
  6121. var ret int32
  6122. _ = ret
  6123. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6124. return 0
  6125. }
  6126. libc.Xpthread_mutex_lock(tls, c+12)
  6127. ret = X_xcb_out_flush_to(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest)
  6128. libc.Xpthread_mutex_unlock(tls, c+12)
  6129. return ret
  6130. }
  6131. /* Private interface */
  6132. func X_xcb_out_init(tls *libc.TLS, out uintptr) (r int32) {
  6133. if libc.Xpthread_cond_init(tls, out+52, uintptr(0)) != 0 {
  6134. return 0
  6135. }
  6136. (*T_xcb_out)(unsafe.Pointer(out)).Freturn_socket = uintptr(0)
  6137. (*T_xcb_out)(unsafe.Pointer(out)).Fsocket_closure = uintptr(0)
  6138. (*T_xcb_out)(unsafe.Pointer(out)).Fsocket_moving = 0
  6139. if libc.Xpthread_cond_init(tls, out, uintptr(0)) != 0 {
  6140. return 0
  6141. }
  6142. (*T_xcb_out)(unsafe.Pointer(out)).Fwriting = 0
  6143. (*T_xcb_out)(unsafe.Pointer(out)).Fqueue_len = 0
  6144. (*T_xcb_out)(unsafe.Pointer(out)).Frequest = uint64(0)
  6145. (*T_xcb_out)(unsafe.Pointer(out)).Frequest_written = uint64(0)
  6146. (*T_xcb_out)(unsafe.Pointer(out)).Frequest_expected_written = uint64(0)
  6147. if libc.Xpthread_mutex_init(tls, out+16532, uintptr(0)) != 0 {
  6148. return 0
  6149. }
  6150. (*T_xcb_out)(unsafe.Pointer(out)).Fmaximum_request_length_tag = int32(_LAZY_NONE)
  6151. return int32(1)
  6152. }
  6153. func X_xcb_out_destroy(tls *libc.TLS, out uintptr) {
  6154. libc.Xpthread_mutex_destroy(tls, out+16532)
  6155. libc.Xpthread_cond_destroy(tls, out)
  6156. libc.Xpthread_cond_destroy(tls, out+52)
  6157. }
  6158. func X_xcb_out_send(tls *libc.TLS, c uintptr, _vector uintptr, _count int32) (r int32) {
  6159. bp := tls.Alloc(16)
  6160. defer tls.Free(16)
  6161. *(*uintptr)(unsafe.Pointer(bp)) = _vector
  6162. *(*int32)(unsafe.Pointer(bp + 4)) = _count
  6163. var ret int32
  6164. _ = ret
  6165. ret = int32(1)
  6166. for ret != 0 && *(*int32)(unsafe.Pointer(bp + 4)) != 0 {
  6167. ret = X_xcb_conn_wait(tls, c, c+4336, bp, bp+4)
  6168. }
  6169. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest_written = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest
  6170. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest_expected_written = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_expected
  6171. libc.Xpthread_cond_broadcast(tls, c+4336)
  6172. X_xcb_in_wake_up_next_reader(tls, c)
  6173. return ret
  6174. }
  6175. func X_xcb_out_send_sync(tls *libc.TLS, c uintptr) {
  6176. _prepare_socket_request(tls, c)
  6177. _send_sync(tls, c)
  6178. }
  6179. func X_xcb_out_flush_to(tls *libc.TLS, c uintptr, request Tuint64_t) (r int32) {
  6180. bp := tls.Alloc(16)
  6181. defer tls.Free(16)
  6182. var _ /* vec at bp+0 */ Tiovec
  6183. if libc.Int64FromUint64((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest_written-request) >= 0 {
  6184. return int32(1)
  6185. }
  6186. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len != 0 {
  6187. (*(*Tiovec)(unsafe.Pointer(bp))).Fiov_base = c + 4336 + 112
  6188. (*(*Tiovec)(unsafe.Pointer(bp))).Fiov_len = libc.Uint32FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len)
  6189. (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fqueue_len = 0
  6190. return X_xcb_out_send(tls, c, bp, int32(1))
  6191. }
  6192. for (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Fwriting != 0 {
  6193. libc.Xpthread_cond_wait(tls, c+4336, c+12)
  6194. }
  6195. return int32(1)
  6196. }
  6197. const m_INT32_MAX1 = 2147483647
  6198. const m_MSG_CTRUNC1 = 8
  6199. const m_MSG_TRUNC1 = 32
  6200. const m_POLLOUT1 = 0x004
  6201. const m_UINT32_MAX1 = 4294967295
  6202. const m_XCB_ERROR = 0
  6203. const m_XCB_REPLY = 1
  6204. const m_XCB_XGE_EVENT = 35
  6205. type Txcb_special_event_t = struct {
  6206. Fnext uintptr
  6207. Fextension Tuint8_t
  6208. Feid Tuint32_t
  6209. Fstamp uintptr
  6210. Fevents uintptr
  6211. Fevents_tail uintptr
  6212. Fspecial_event_cond Tpthread_cond_t
  6213. }
  6214. type Txcb_special_event = Txcb_special_event_t
  6215. type Tevent_list = struct {
  6216. Fevent uintptr
  6217. Fnext uintptr
  6218. }
  6219. type Treply_list = struct {
  6220. Freply uintptr
  6221. Fnext uintptr
  6222. }
  6223. type Tpending_reply = struct {
  6224. Ffirst_request Tuint64_t
  6225. Flast_request Tuint64_t
  6226. Fworkaround _workarounds
  6227. Fflags int32
  6228. Fnext uintptr
  6229. }
  6230. type Treader_list = struct {
  6231. Frequest Tuint64_t
  6232. Fdata uintptr
  6233. Fnext uintptr
  6234. }
  6235. type Tspecial_list = struct {
  6236. Fse uintptr
  6237. Fnext uintptr
  6238. }
  6239. func _remove_finished_readers(tls *libc.TLS, prev_reader uintptr, completed Tuint64_t) {
  6240. for *(*uintptr)(unsafe.Pointer(prev_reader)) != 0 && libc.Int64FromUint64((*Treader_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_reader)))).Frequest-completed) <= 0 {
  6241. /* If you don't have what you're looking for now, you never
  6242. * will. Wake up and leave me alone. */
  6243. libc.Xpthread_cond_signal(tls, (*Treader_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_reader)))).Fdata)
  6244. *(*uintptr)(unsafe.Pointer(prev_reader)) = (*Treader_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_reader)))).Fnext
  6245. }
  6246. }
  6247. func _read_fds(tls *libc.TLS, c uintptr, fds uintptr, nfd int32) (r int32) {
  6248. var ifds uintptr
  6249. var infd int32
  6250. _, _ = ifds, infd
  6251. ifds = c + 40 + 4220 + uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd)*4
  6252. infd = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd - (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd
  6253. if nfd > infd {
  6254. return 0
  6255. }
  6256. libc.Xmemcpy(tls, fds, ifds, libc.Uint32FromInt32(nfd)*uint32(4))
  6257. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd += nfd
  6258. return int32(1)
  6259. }
  6260. type Txcb_ge_special_event_t = struct {
  6261. Fresponse_type Tuint8_t
  6262. Fextension Tuint8_t
  6263. Fsequence Tuint16_t
  6264. Flength Tuint32_t
  6265. Fevtype Tuint16_t
  6266. Fpad0 [2]Tuint8_t
  6267. Feid Tuint32_t
  6268. Fpad1 [16]Tuint8_t
  6269. }
  6270. func _event_special(tls *libc.TLS, c uintptr, event uintptr) (r int32) {
  6271. var ges, special_event uintptr
  6272. _, _ = ges, special_event
  6273. ges = (*Tevent_list)(unsafe.Pointer(event)).Fevent
  6274. /* Special events are always XGE events */
  6275. if libc.Int32FromUint8((*Txcb_ge_special_event_t1)(unsafe.Pointer(ges)).Fresponse_type)&int32(0x7f) != int32(m_XCB_XGE_EVENT) {
  6276. return 0
  6277. }
  6278. special_event = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_events
  6279. for {
  6280. if !(special_event != 0) {
  6281. break
  6282. }
  6283. 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 {
  6284. *(*uintptr)(unsafe.Pointer((*Txcb_special_event)(unsafe.Pointer(special_event)).Fevents_tail)) = event
  6285. (*Txcb_special_event)(unsafe.Pointer(special_event)).Fevents_tail = event + 4
  6286. if (*Txcb_special_event)(unsafe.Pointer(special_event)).Fstamp != 0 {
  6287. *(*Tuint32_t)(unsafe.Pointer((*Txcb_special_event)(unsafe.Pointer(special_event)).Fstamp))++
  6288. }
  6289. libc.Xpthread_cond_signal(tls, special_event+24)
  6290. return int32(1)
  6291. }
  6292. goto _1
  6293. _1:
  6294. ;
  6295. special_event = (*Txcb_special_event)(unsafe.Pointer(special_event)).Fnext
  6296. }
  6297. return 0
  6298. }
  6299. func _read_packet(tls *libc.TLS, c uintptr) (r int32) {
  6300. bp := tls.Alloc(16)
  6301. defer tls.Free(16)
  6302. var buf, cur, event, oldpend, p, pend uintptr
  6303. var bufsize, eventlength, lastread, length, new_length Tuint64_t
  6304. var nfd int32
  6305. var v1 uint32
  6306. var _ /* genrep at bp+0 */ Txcb_generic_reply_t
  6307. _, _, _, _, _, _, _, _, _, _, _, _, _ = buf, bufsize, cur, event, eventlength, lastread, length, new_length, nfd, oldpend, p, pend, v1
  6308. length = uint64(32)
  6309. eventlength = uint64(0) /* length after first 32 bytes for GenericEvents */
  6310. nfd = 0
  6311. pend = uintptr(0)
  6312. /* Wait for there to be enough data for us to read a whole packet */
  6313. if libc.Uint64FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len) < length {
  6314. return 0
  6315. }
  6316. /* Get the response type, length, and sequence number. */
  6317. libc.Xmemcpy(tls, bp, c+40+52, uint32(8))
  6318. /* Compute 32-bit sequence number of this packet. */
  6319. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type)&int32(0x7f) != int32(m_XCB_KEYMAP_NOTIFY) {
  6320. lastread = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read
  6321. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read = lastread&uint64(0xffffffffffff0000) | uint64((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fsequence)
  6322. if libc.Int64FromUint64((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read-lastread) < 0 {
  6323. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read += uint64(0x10000)
  6324. }
  6325. if libc.Int64FromUint64((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_expected) > 0 {
  6326. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_expected = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read
  6327. }
  6328. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read != lastread {
  6329. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply != 0 {
  6330. X_xcb_map_put(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freplies, lastread, (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply)
  6331. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply = uintptr(0)
  6332. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply_tail = c + 40 + 4184
  6333. }
  6334. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read - uint64(1)
  6335. }
  6336. 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 {
  6337. oldpend = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies
  6338. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies = (*Tpending_reply)(unsafe.Pointer(oldpend)).Fnext
  6339. if !((*Tpending_reply)(unsafe.Pointer(oldpend)).Fnext != 0) {
  6340. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail = c + 40 + 4212
  6341. }
  6342. libc.Xfree(tls, oldpend)
  6343. }
  6344. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) == m_XCB_ERROR {
  6345. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read
  6346. }
  6347. _remove_finished_readers(tls, c+40+4204, (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed)
  6348. }
  6349. 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) {
  6350. pend = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies
  6351. 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)) {
  6352. pend = uintptr(0)
  6353. }
  6354. }
  6355. /* For reply packets, check that the entire packet is available. */
  6356. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) == int32(m_XCB_REPLY) {
  6357. if pend != 0 && (*Tpending_reply)(unsafe.Pointer(pend)).Fworkaround == int32(_WORKAROUND_GLX_GET_FB_CONFIGS_BUG) {
  6358. p = c + 40 + 52
  6359. new_length = uint64(*(*Tuint32_t)(unsafe.Pointer(p + 2*4))) * uint64(*(*Tuint32_t)(unsafe.Pointer(p + 3*4)))
  6360. if new_length >= uint64(libc.Uint32FromUint32(0xffffffff)/libc.Uint32FromUint32(16)) {
  6361. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  6362. return 0
  6363. }
  6364. (*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Flength = uint32(new_length * libc.Uint64FromUint64(2))
  6365. }
  6366. length += uint64((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Flength) * uint64(4)
  6367. /* XXX a bit of a hack -- we "know" that all FD replys place
  6368. * the number of fds in the pad0 byte */
  6369. if pend != 0 && (*Tpending_reply)(unsafe.Pointer(pend)).Fflags&int32(_XCB_REQUEST_REPLY_FDS) != 0 {
  6370. nfd = libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fpad0)
  6371. }
  6372. }
  6373. /* XGE events may have sizes > 32 */
  6374. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type)&int32(0x7f) == int32(m_XCB_XGE_EVENT) {
  6375. eventlength = uint64((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Flength) * uint64(4)
  6376. }
  6377. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) == int32(m_XCB_REPLY) {
  6378. v1 = uint32(0)
  6379. } else {
  6380. v1 = uint32(4)
  6381. }
  6382. bufsize = length + eventlength + uint64(libc.Uint32FromInt32(nfd)*uint32(4)) + uint64(v1)
  6383. if bufsize < libc.Uint64FromInt32(libc.Int32FromInt32(m_INT32_MAX1)) {
  6384. buf = libc.Xmalloc(tls, uint32(bufsize))
  6385. } else {
  6386. buf = libc.UintptrFromInt32(0)
  6387. }
  6388. if !(buf != 0) {
  6389. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  6390. return 0
  6391. }
  6392. if X_xcb_in_read_block(tls, c, buf, libc.Int32FromUint64(length)) <= 0 {
  6393. libc.Xfree(tls, buf)
  6394. return 0
  6395. }
  6396. /* pull in XGE event data if available, append after event struct */
  6397. if eventlength != 0 {
  6398. if X_xcb_in_read_block(tls, c, buf+1*36, libc.Int32FromUint64(eventlength)) <= 0 {
  6399. libc.Xfree(tls, buf)
  6400. return 0
  6401. }
  6402. }
  6403. if nfd != 0 {
  6404. if !(_read_fds(tls, c, buf+uintptr(length), nfd) != 0) {
  6405. libc.Xfree(tls, buf)
  6406. return 0
  6407. }
  6408. }
  6409. if pend != 0 && (*Tpending_reply)(unsafe.Pointer(pend)).Fflags&int32(_XCB_REQUEST_DISCARD_REPLY) != 0 {
  6410. libc.Xfree(tls, buf)
  6411. return int32(1)
  6412. }
  6413. if libc.Int32FromUint8((*(*Txcb_generic_reply_t)(unsafe.Pointer(bp))).Fresponse_type) != int32(m_XCB_REPLY) {
  6414. (*Txcb_generic_event_t)(unsafe.Pointer(buf)).Ffull_sequence = uint32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read)
  6415. }
  6416. /* reply, or checked error */
  6417. 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 {
  6418. cur = libc.Xmalloc(tls, uint32(8))
  6419. if !(cur != 0) {
  6420. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  6421. libc.Xfree(tls, buf)
  6422. return 0
  6423. }
  6424. (*Treply_list)(unsafe.Pointer(cur)).Freply = buf
  6425. (*Treply_list)(unsafe.Pointer(cur)).Fnext = uintptr(0)
  6426. *(*uintptr)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply_tail)) = cur
  6427. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply_tail = cur + 4
  6428. 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 {
  6429. libc.Xpthread_cond_signal(tls, (*Treader_list1)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freaders)).Fdata)
  6430. }
  6431. return int32(1)
  6432. }
  6433. /* event, or unchecked error */
  6434. event = libc.Xmalloc(tls, uint32(8))
  6435. if !(event != 0) {
  6436. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  6437. libc.Xfree(tls, buf)
  6438. return 0
  6439. }
  6440. (*Tevent_list)(unsafe.Pointer(event)).Fevent = buf
  6441. (*Tevent_list)(unsafe.Pointer(event)).Fnext = uintptr(0)
  6442. if !(_event_special(tls, c, event) != 0) {
  6443. *(*uintptr)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents_tail)) = event
  6444. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents_tail = event + 4
  6445. libc.Xpthread_cond_signal(tls, c+40)
  6446. }
  6447. return int32(1) /* I have something for you... */
  6448. }
  6449. func _get_event(tls *libc.TLS, c uintptr) (r uintptr) {
  6450. var cur, ret uintptr
  6451. _, _ = cur, ret
  6452. cur = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents
  6453. if !((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents != 0) {
  6454. return uintptr(0)
  6455. }
  6456. ret = (*Tevent_list)(unsafe.Pointer(cur)).Fevent
  6457. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents = (*Tevent_list)(unsafe.Pointer(cur)).Fnext
  6458. if !((*Tevent_list)(unsafe.Pointer(cur)).Fnext != 0) {
  6459. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fevents_tail = c + 40 + 4196
  6460. }
  6461. libc.Xfree(tls, cur)
  6462. return ret
  6463. }
  6464. func _free_reply_list(tls *libc.TLS, head uintptr) {
  6465. var cur uintptr
  6466. _ = cur
  6467. for head != 0 {
  6468. cur = head
  6469. head = (*Treply_list)(unsafe.Pointer(cur)).Fnext
  6470. libc.Xfree(tls, (*Treply_list)(unsafe.Pointer(cur)).Freply)
  6471. libc.Xfree(tls, cur)
  6472. }
  6473. }
  6474. func _read_block(tls *libc.TLS, fd int32, buf uintptr, len1 Tintptr_t) (r int32) {
  6475. bp := tls.Alloc(16)
  6476. defer tls.Free(16)
  6477. var done, ret int32
  6478. var _ /* pfd at bp+0 */ Tpollfd
  6479. _, _ = done, ret
  6480. done = 0
  6481. for done < len1 {
  6482. ret = libc.Xrecv(tls, fd, buf+uintptr(done), libc.Uint32FromInt32(len1-done), 0)
  6483. if ret > 0 {
  6484. done += ret
  6485. }
  6486. if ret < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == int32(m_EAGAIN) {
  6487. (*(*Tpollfd)(unsafe.Pointer(bp))).Ffd = fd
  6488. (*(*Tpollfd)(unsafe.Pointer(bp))).Fevents = int16(m_POLLIN)
  6489. (*(*Tpollfd)(unsafe.Pointer(bp))).Frevents = 0
  6490. for cond := true; cond; cond = ret == -int32(1) && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == int32(m_EINTR) {
  6491. ret = libc.Xpoll(tls, bp, uint32(1), -int32(1))
  6492. }
  6493. }
  6494. if ret <= 0 {
  6495. return ret
  6496. }
  6497. }
  6498. return len1
  6499. }
  6500. func _poll_for_reply(tls *libc.TLS, c uintptr, request Tuint64_t, reply uintptr, error1 uintptr) (r int32) {
  6501. var head uintptr
  6502. _ = head
  6503. /* If an error occurred when issuing the request, fail immediately. */
  6504. if !(request != 0) {
  6505. head = uintptr(0)
  6506. } else {
  6507. if libc.Int64FromUint64(request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read) < 0 {
  6508. head = X_xcb_map_remove(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freplies, request)
  6509. if head != 0 && (*Treply_list)(unsafe.Pointer(head)).Fnext != 0 {
  6510. X_xcb_map_put(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freplies, request, (*Treply_list)(unsafe.Pointer(head)).Fnext)
  6511. }
  6512. } else {
  6513. if request == (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_read && (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply != 0 {
  6514. head = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply
  6515. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply = (*Treply_list)(unsafe.Pointer(head)).Fnext
  6516. if !((*Treply_list)(unsafe.Pointer(head)).Fnext != 0) {
  6517. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fcurrent_reply_tail = c + 40 + 4184
  6518. }
  6519. } else {
  6520. if request == (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed {
  6521. head = uintptr(0)
  6522. } else {
  6523. return 0
  6524. }
  6525. }
  6526. }
  6527. }
  6528. if error1 != 0 {
  6529. *(*uintptr)(unsafe.Pointer(error1)) = uintptr(0)
  6530. }
  6531. *(*uintptr)(unsafe.Pointer(reply)) = uintptr(0)
  6532. if head != 0 {
  6533. if libc.Int32FromUint8((*Txcb_generic_reply_t)(unsafe.Pointer((*Treply_list)(unsafe.Pointer(head)).Freply)).Fresponse_type) == m_XCB_ERROR {
  6534. if error1 != 0 {
  6535. *(*uintptr)(unsafe.Pointer(error1)) = (*Treply_list)(unsafe.Pointer(head)).Freply
  6536. } else {
  6537. libc.Xfree(tls, (*Treply_list)(unsafe.Pointer(head)).Freply)
  6538. }
  6539. } else {
  6540. *(*uintptr)(unsafe.Pointer(reply)) = (*Treply_list)(unsafe.Pointer(head)).Freply
  6541. }
  6542. libc.Xfree(tls, head)
  6543. }
  6544. return int32(1)
  6545. }
  6546. func _insert_reader(tls *libc.TLS, prev_reader uintptr, reader uintptr, request Tuint64_t, cond uintptr) {
  6547. for *(*uintptr)(unsafe.Pointer(prev_reader)) != 0 && libc.Int64FromUint64((*Treader_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_reader)))).Frequest-request) <= 0 {
  6548. prev_reader = *(*uintptr)(unsafe.Pointer(prev_reader)) + 12
  6549. }
  6550. (*Treader_list)(unsafe.Pointer(reader)).Frequest = request
  6551. (*Treader_list)(unsafe.Pointer(reader)).Fdata = cond
  6552. (*Treader_list)(unsafe.Pointer(reader)).Fnext = *(*uintptr)(unsafe.Pointer(prev_reader))
  6553. *(*uintptr)(unsafe.Pointer(prev_reader)) = reader
  6554. }
  6555. func _remove_reader(tls *libc.TLS, prev_reader uintptr, reader uintptr) {
  6556. 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 {
  6557. if *(*uintptr)(unsafe.Pointer(prev_reader)) == reader {
  6558. *(*uintptr)(unsafe.Pointer(prev_reader)) = (*Treader_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_reader)))).Fnext
  6559. break
  6560. }
  6561. }
  6562. }
  6563. func _insert_special(tls *libc.TLS, prev_special uintptr, special uintptr, se uintptr) {
  6564. (*Tspecial_list)(unsafe.Pointer(special)).Fse = se
  6565. (*Tspecial_list)(unsafe.Pointer(special)).Fnext = *(*uintptr)(unsafe.Pointer(prev_special))
  6566. *(*uintptr)(unsafe.Pointer(prev_special)) = special
  6567. }
  6568. func _remove_special(tls *libc.TLS, prev_special uintptr, special uintptr) {
  6569. for *(*uintptr)(unsafe.Pointer(prev_special)) != 0 {
  6570. if *(*uintptr)(unsafe.Pointer(prev_special)) == special {
  6571. *(*uintptr)(unsafe.Pointer(prev_special)) = (*Tspecial_list)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_special)))).Fnext
  6572. break
  6573. }
  6574. prev_special = *(*uintptr)(unsafe.Pointer(prev_special)) + 4
  6575. }
  6576. }
  6577. func _wait_for_reply(tls *libc.TLS, c uintptr, request Tuint64_t, e uintptr) (r uintptr) {
  6578. bp := tls.Alloc(80)
  6579. defer tls.Free(80)
  6580. var _ /* cond at bp+4 */ Tpthread_cond_t
  6581. var _ /* reader at bp+52 */ Treader_list
  6582. var _ /* ret at bp+0 */ uintptr
  6583. *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
  6584. /* If this request has not been written yet, write it. */
  6585. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Freturn_socket != 0 || X_xcb_out_flush_to(tls, c, request) != 0 {
  6586. *(*Tpthread_cond_t)(unsafe.Pointer(bp + 4)) = Tpthread_cond_t{}
  6587. *(*int32)(unsafe.Pointer(bp + 4)) = 0
  6588. _insert_reader(tls, c+40+4204, bp+52, request, bp+4)
  6589. for !(_poll_for_reply(tls, c, request, bp, e) != 0) {
  6590. if !(X_xcb_conn_wait(tls, c, bp+4, uintptr(0), uintptr(0)) != 0) {
  6591. break
  6592. }
  6593. }
  6594. _remove_reader(tls, c+40+4204, bp+52)
  6595. libc.Xpthread_cond_destroy(tls, bp+4)
  6596. }
  6597. X_xcb_in_wake_up_next_reader(tls, c)
  6598. return *(*uintptr)(unsafe.Pointer(bp))
  6599. }
  6600. func _widen(tls *libc.TLS, c uintptr, request uint32) (r Tuint64_t) {
  6601. var widened_request Tuint64_t
  6602. _ = widened_request
  6603. widened_request = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest&uint64(0xffffffff00000000) | uint64(request)
  6604. if widened_request > (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest {
  6605. widened_request -= libc.Uint64FromUint64(1) << libc.Int32FromInt32(32)
  6606. }
  6607. return widened_request
  6608. }
  6609. /* Public interface */
  6610. func Xxcb_wait_for_reply(tls *libc.TLS, c uintptr, request uint32, e uintptr) (r uintptr) {
  6611. var ret uintptr
  6612. _ = ret
  6613. if e != 0 {
  6614. *(*uintptr)(unsafe.Pointer(e)) = uintptr(0)
  6615. }
  6616. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6617. return uintptr(0)
  6618. }
  6619. libc.Xpthread_mutex_lock(tls, c+12)
  6620. ret = _wait_for_reply(tls, c, _widen(tls, c, request), e)
  6621. libc.Xpthread_mutex_unlock(tls, c+12)
  6622. return ret
  6623. }
  6624. func Xxcb_wait_for_reply64(tls *libc.TLS, c uintptr, request Tuint64_t, e uintptr) (r uintptr) {
  6625. var ret uintptr
  6626. _ = ret
  6627. if e != 0 {
  6628. *(*uintptr)(unsafe.Pointer(e)) = uintptr(0)
  6629. }
  6630. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6631. return uintptr(0)
  6632. }
  6633. libc.Xpthread_mutex_lock(tls, c+12)
  6634. ret = _wait_for_reply(tls, c, request, e)
  6635. libc.Xpthread_mutex_unlock(tls, c+12)
  6636. return ret
  6637. }
  6638. func Xxcb_get_reply_fds(tls *libc.TLS, c uintptr, reply uintptr, reply_size Tsize_t) (r uintptr) {
  6639. return reply + uintptr(reply_size)
  6640. }
  6641. func _insert_pending_discard(tls *libc.TLS, c uintptr, prev_next uintptr, seq Tuint64_t) {
  6642. var pend uintptr
  6643. _ = pend
  6644. pend = libc.Xmalloc(tls, uint32(28))
  6645. if !(pend != 0) {
  6646. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  6647. return
  6648. }
  6649. (*Tpending_reply)(unsafe.Pointer(pend)).Ffirst_request = seq
  6650. (*Tpending_reply)(unsafe.Pointer(pend)).Flast_request = seq
  6651. (*Tpending_reply)(unsafe.Pointer(pend)).Fworkaround = 0
  6652. (*Tpending_reply)(unsafe.Pointer(pend)).Fflags = int32(_XCB_REQUEST_DISCARD_REPLY)
  6653. (*Tpending_reply)(unsafe.Pointer(pend)).Fnext = *(*uintptr)(unsafe.Pointer(prev_next))
  6654. *(*uintptr)(unsafe.Pointer(prev_next)) = pend
  6655. if !((*Tpending_reply)(unsafe.Pointer(pend)).Fnext != 0) {
  6656. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail = pend + 24
  6657. }
  6658. }
  6659. func _discard_reply(tls *libc.TLS, c uintptr, request Tuint64_t) {
  6660. bp := tls.Alloc(16)
  6661. defer tls.Free(16)
  6662. var prev_pend uintptr
  6663. var _ /* reply at bp+0 */ uintptr
  6664. _ = prev_pend
  6665. /* Free any replies or errors that we've already read. Stop if
  6666. * xcb_wait_for_reply would block or we've run out of replies. */
  6667. for _poll_for_reply(tls, c, request, bp, uintptr(0)) != 0 && *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  6668. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp)))
  6669. }
  6670. /* If we've proven there are no more responses coming, we're done. */
  6671. if libc.Int64FromUint64(request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed) <= 0 {
  6672. return
  6673. }
  6674. /* Walk the list of pending requests. Mark the first match for deletion. */
  6675. prev_pend = c + 40 + 4212
  6676. for {
  6677. if !(*(*uintptr)(unsafe.Pointer(prev_pend)) != 0) {
  6678. break
  6679. }
  6680. if libc.Int64FromUint64((*Tpending_reply)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_pend)))).Ffirst_request-request) > 0 {
  6681. break
  6682. }
  6683. if (*Tpending_reply)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_pend)))).Ffirst_request == request {
  6684. /* Pending reply found. Mark for discard: */
  6685. *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prev_pend)) + 20)) |= int32(_XCB_REQUEST_DISCARD_REPLY)
  6686. return
  6687. }
  6688. goto _1
  6689. _1:
  6690. ;
  6691. prev_pend = *(*uintptr)(unsafe.Pointer(prev_pend)) + 24
  6692. }
  6693. /* Pending reply not found (likely due to _unchecked request). Create one: */
  6694. _insert_pending_discard(tls, c, prev_pend, request)
  6695. }
  6696. func Xxcb_discard_reply(tls *libc.TLS, c uintptr, sequence uint32) {
  6697. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6698. return
  6699. }
  6700. /* If an error occurred when issuing the request, fail immediately. */
  6701. if !(sequence != 0) {
  6702. return
  6703. }
  6704. libc.Xpthread_mutex_lock(tls, c+12)
  6705. _discard_reply(tls, c, _widen(tls, c, sequence))
  6706. libc.Xpthread_mutex_unlock(tls, c+12)
  6707. }
  6708. func Xxcb_discard_reply64(tls *libc.TLS, c uintptr, sequence Tuint64_t) {
  6709. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6710. return
  6711. }
  6712. /* If an error occurred when issuing the request, fail immediately. */
  6713. if !(sequence != 0) {
  6714. return
  6715. }
  6716. libc.Xpthread_mutex_lock(tls, c+12)
  6717. _discard_reply(tls, c, sequence)
  6718. libc.Xpthread_mutex_unlock(tls, c+12)
  6719. }
  6720. func Xxcb_poll_for_reply(tls *libc.TLS, c uintptr, request uint32, reply uintptr, error1 uintptr) (r int32) {
  6721. var ret int32
  6722. _ = ret
  6723. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6724. *(*uintptr)(unsafe.Pointer(reply)) = uintptr(0)
  6725. if error1 != 0 {
  6726. *(*uintptr)(unsafe.Pointer(error1)) = uintptr(0)
  6727. }
  6728. return int32(1) /* would not block */
  6729. }
  6730. libc.Xpthread_mutex_lock(tls, c+12)
  6731. ret = _poll_for_reply(tls, c, _widen(tls, c, request), reply, error1)
  6732. 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 */
  6733. ret = _poll_for_reply(tls, c, _widen(tls, c, request), reply, error1)
  6734. }
  6735. libc.Xpthread_mutex_unlock(tls, c+12)
  6736. return ret
  6737. }
  6738. func Xxcb_poll_for_reply64(tls *libc.TLS, c uintptr, request Tuint64_t, reply uintptr, error1 uintptr) (r int32) {
  6739. var ret int32
  6740. _ = ret
  6741. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6742. *(*uintptr)(unsafe.Pointer(reply)) = uintptr(0)
  6743. if error1 != 0 {
  6744. *(*uintptr)(unsafe.Pointer(error1)) = uintptr(0)
  6745. }
  6746. return int32(1) /* would not block */
  6747. }
  6748. libc.Xpthread_mutex_lock(tls, c+12)
  6749. ret = _poll_for_reply(tls, c, request, reply, error1)
  6750. 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 */
  6751. ret = _poll_for_reply(tls, c, request, reply, error1)
  6752. }
  6753. libc.Xpthread_mutex_unlock(tls, c+12)
  6754. return ret
  6755. }
  6756. func Xxcb_wait_for_event(tls *libc.TLS, c uintptr) (r uintptr) {
  6757. var ret, v1 uintptr
  6758. _, _ = ret, v1
  6759. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6760. return uintptr(0)
  6761. }
  6762. libc.Xpthread_mutex_lock(tls, c+12)
  6763. /* get_event returns 0 on empty list. */
  6764. for {
  6765. v1 = _get_event(tls, c)
  6766. ret = v1
  6767. if !!(v1 != 0) {
  6768. break
  6769. }
  6770. if !(X_xcb_conn_wait(tls, c, c+40, uintptr(0), uintptr(0)) != 0) {
  6771. break
  6772. }
  6773. }
  6774. X_xcb_in_wake_up_next_reader(tls, c)
  6775. libc.Xpthread_mutex_unlock(tls, c+12)
  6776. return ret
  6777. }
  6778. func _poll_for_next_event(tls *libc.TLS, c uintptr, queued int32) (r uintptr) {
  6779. var ret uintptr
  6780. _ = ret
  6781. ret = uintptr(0)
  6782. if !((*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0) {
  6783. libc.Xpthread_mutex_lock(tls, c+12)
  6784. /* FIXME: follow X meets Z architecture changes. */
  6785. ret = _get_event(tls, c)
  6786. 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 */
  6787. ret = _get_event(tls, c)
  6788. }
  6789. libc.Xpthread_mutex_unlock(tls, c+12)
  6790. }
  6791. return ret
  6792. }
  6793. func Xxcb_poll_for_event(tls *libc.TLS, c uintptr) (r uintptr) {
  6794. return _poll_for_next_event(tls, c, 0)
  6795. }
  6796. func Xxcb_poll_for_queued_event(tls *libc.TLS, c uintptr) (r uintptr) {
  6797. return _poll_for_next_event(tls, c, int32(1))
  6798. }
  6799. func Xxcb_request_check(tls *libc.TLS, c uintptr, cookie Txcb_void_cookie_t) (r uintptr) {
  6800. bp := tls.Alloc(16)
  6801. defer tls.Free(16)
  6802. var reply uintptr
  6803. var request Tuint64_t
  6804. var _ /* ret at bp+0 */ uintptr
  6805. _, _ = reply, request
  6806. *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
  6807. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6808. return uintptr(0)
  6809. }
  6810. libc.Xpthread_mutex_lock(tls, c+12)
  6811. request = _widen(tls, c, cookie.Fsequence)
  6812. if libc.Int64FromUint64(request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_completed) > 0 {
  6813. if libc.Int64FromUint64(request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Frequest_expected) >= 0 {
  6814. X_xcb_out_send_sync(tls, c)
  6815. }
  6816. if libc.Int64FromUint64(request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest_expected_written) >= 0 {
  6817. X_xcb_out_flush_to(tls, c, (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest)
  6818. }
  6819. }
  6820. reply = _wait_for_reply(tls, c, request, bp)
  6821. libc.Xpthread_mutex_unlock(tls, c+12)
  6822. return *(*uintptr)(unsafe.Pointer(bp))
  6823. }
  6824. func _get_special_event(tls *libc.TLS, c uintptr, se uintptr) (r uintptr) {
  6825. var event, events, v1, v2 uintptr
  6826. _, _, _, _ = event, events, v1, v2
  6827. event = libc.UintptrFromInt32(0)
  6828. v1 = (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents
  6829. events = v1
  6830. if v1 != libc.UintptrFromInt32(0) {
  6831. event = (*Tevent_list)(unsafe.Pointer(events)).Fevent
  6832. v2 = (*Tevent_list)(unsafe.Pointer(events)).Fnext
  6833. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents = v2
  6834. if !(v2 != 0) {
  6835. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents_tail = se + 16
  6836. }
  6837. libc.Xfree(tls, events)
  6838. }
  6839. return event
  6840. }
  6841. func Xxcb_poll_for_special_event(tls *libc.TLS, c uintptr, se uintptr) (r uintptr) {
  6842. var event uintptr
  6843. _ = event
  6844. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6845. return uintptr(0)
  6846. }
  6847. libc.Xpthread_mutex_lock(tls, c+12)
  6848. event = _get_special_event(tls, c, se)
  6849. 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 */
  6850. event = _get_special_event(tls, c, se)
  6851. }
  6852. libc.Xpthread_mutex_unlock(tls, c+12)
  6853. return event
  6854. }
  6855. func Xxcb_wait_for_special_event(tls *libc.TLS, c uintptr, se uintptr) (r uintptr) {
  6856. bp := tls.Alloc(16)
  6857. defer tls.Free(16)
  6858. var event, v1 uintptr
  6859. var _ /* special at bp+0 */ Tspecial_list
  6860. _, _ = event, v1
  6861. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6862. return uintptr(0)
  6863. }
  6864. libc.Xpthread_mutex_lock(tls, c+12)
  6865. _insert_special(tls, c+40+4208, bp, se)
  6866. /* get_special_event returns 0 on empty list. */
  6867. for {
  6868. v1 = _get_special_event(tls, c, se)
  6869. event = v1
  6870. if !!(v1 != 0) {
  6871. break
  6872. }
  6873. if !(X_xcb_conn_wait(tls, c, se+24, uintptr(0), uintptr(0)) != 0) {
  6874. break
  6875. }
  6876. }
  6877. _remove_special(tls, c+40+4208, bp)
  6878. X_xcb_in_wake_up_next_reader(tls, c)
  6879. libc.Xpthread_mutex_unlock(tls, c+12)
  6880. return event
  6881. }
  6882. func Xxcb_register_for_special_xge(tls *libc.TLS, c uintptr, ext uintptr, eid Tuint32_t, stamp uintptr) (r uintptr) {
  6883. var ext_reply, se uintptr
  6884. _, _ = ext_reply, se
  6885. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6886. return libc.UintptrFromInt32(0)
  6887. }
  6888. ext_reply = Xxcb_get_extension_data(tls, c, ext)
  6889. if !(ext_reply != 0) {
  6890. return libc.UintptrFromInt32(0)
  6891. }
  6892. libc.Xpthread_mutex_lock(tls, c+12)
  6893. se = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_events
  6894. for {
  6895. if !(se != 0) {
  6896. break
  6897. }
  6898. 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 {
  6899. libc.Xpthread_mutex_unlock(tls, c+12)
  6900. return libc.UintptrFromInt32(0)
  6901. }
  6902. goto _1
  6903. _1:
  6904. ;
  6905. se = (*Txcb_special_event_t)(unsafe.Pointer(se)).Fnext
  6906. }
  6907. se = libc.Xcalloc(tls, uint32(1), uint32(72))
  6908. if !(se != 0) {
  6909. libc.Xpthread_mutex_unlock(tls, c+12)
  6910. return libc.UintptrFromInt32(0)
  6911. }
  6912. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fextension = (*Txcb_query_extension_reply_t)(unsafe.Pointer(ext_reply)).Fmajor_opcode
  6913. (*Txcb_special_event_t)(unsafe.Pointer(se)).Feid = eid
  6914. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents = libc.UintptrFromInt32(0)
  6915. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents_tail = se + 16
  6916. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fstamp = stamp
  6917. libc.Xpthread_cond_init(tls, se+24, uintptr(0))
  6918. (*Txcb_special_event_t)(unsafe.Pointer(se)).Fnext = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_events
  6919. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_events = se
  6920. libc.Xpthread_mutex_unlock(tls, c+12)
  6921. return se
  6922. }
  6923. func Xxcb_unregister_for_special_event(tls *libc.TLS, c uintptr, se uintptr) {
  6924. var events, next, prev, s, v2 uintptr
  6925. _, _, _, _, _ = events, next, prev, s, v2
  6926. if !(se != 0) {
  6927. return
  6928. }
  6929. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  6930. return
  6931. }
  6932. libc.Xpthread_mutex_lock(tls, c+12)
  6933. prev = c + 40 + 4292
  6934. for {
  6935. v2 = *(*uintptr)(unsafe.Pointer(prev))
  6936. s = v2
  6937. if !(v2 != libc.UintptrFromInt32(0)) {
  6938. break
  6939. }
  6940. if s == se {
  6941. *(*uintptr)(unsafe.Pointer(prev)) = (*Txcb_special_event_t)(unsafe.Pointer(se)).Fnext
  6942. events = (*Txcb_special_event_t)(unsafe.Pointer(se)).Fevents
  6943. for {
  6944. if !(events != 0) {
  6945. break
  6946. }
  6947. next = (*Tevent_list)(unsafe.Pointer(events)).Fnext
  6948. libc.Xfree(tls, (*Tevent_list)(unsafe.Pointer(events)).Fevent)
  6949. libc.Xfree(tls, events)
  6950. goto _3
  6951. _3:
  6952. ;
  6953. events = next
  6954. }
  6955. libc.Xpthread_cond_destroy(tls, se+24)
  6956. libc.Xfree(tls, se)
  6957. break
  6958. }
  6959. goto _1
  6960. _1:
  6961. ;
  6962. prev = s
  6963. }
  6964. libc.Xpthread_mutex_unlock(tls, c+12)
  6965. }
  6966. /* Private interface */
  6967. func X_xcb_in_init(tls *libc.TLS, in uintptr) (r int32) {
  6968. if libc.Xpthread_cond_init(tls, in, uintptr(0)) != 0 {
  6969. return 0
  6970. }
  6971. (*T_xcb_in)(unsafe.Pointer(in)).Freading = 0
  6972. (*T_xcb_in)(unsafe.Pointer(in)).Fqueue_len = 0
  6973. (*T_xcb_in)(unsafe.Pointer(in)).Frequest_read = uint64(0)
  6974. (*T_xcb_in)(unsafe.Pointer(in)).Frequest_completed = uint64(0)
  6975. (*T_xcb_in)(unsafe.Pointer(in)).Freplies = X_xcb_map_new(tls)
  6976. if !((*T_xcb_in)(unsafe.Pointer(in)).Freplies != 0) {
  6977. return 0
  6978. }
  6979. (*T_xcb_in)(unsafe.Pointer(in)).Fcurrent_reply_tail = in + 4184
  6980. (*T_xcb_in)(unsafe.Pointer(in)).Fevents_tail = in + 4196
  6981. (*T_xcb_in)(unsafe.Pointer(in)).Fpending_replies_tail = in + 4212
  6982. return int32(1)
  6983. }
  6984. func X_xcb_in_destroy(tls *libc.TLS, in uintptr) {
  6985. var e, pend uintptr
  6986. _, _ = e, pend
  6987. libc.Xpthread_cond_destroy(tls, in)
  6988. _free_reply_list(tls, (*T_xcb_in)(unsafe.Pointer(in)).Fcurrent_reply)
  6989. X_xcb_map_delete(tls, (*T_xcb_in)(unsafe.Pointer(in)).Freplies, __ccgo_fp(_free_reply_list))
  6990. for (*T_xcb_in)(unsafe.Pointer(in)).Fevents != 0 {
  6991. e = (*T_xcb_in)(unsafe.Pointer(in)).Fevents
  6992. (*T_xcb_in)(unsafe.Pointer(in)).Fevents = (*Tevent_list)(unsafe.Pointer(e)).Fnext
  6993. libc.Xfree(tls, (*Tevent_list)(unsafe.Pointer(e)).Fevent)
  6994. libc.Xfree(tls, e)
  6995. }
  6996. for (*T_xcb_in)(unsafe.Pointer(in)).Fpending_replies != 0 {
  6997. pend = (*T_xcb_in)(unsafe.Pointer(in)).Fpending_replies
  6998. (*T_xcb_in)(unsafe.Pointer(in)).Fpending_replies = (*Tpending_reply)(unsafe.Pointer(pend)).Fnext
  6999. libc.Xfree(tls, pend)
  7000. }
  7001. }
  7002. func X_xcb_in_wake_up_next_reader(tls *libc.TLS, c uintptr) {
  7003. var pthreadret int32
  7004. _ = pthreadret
  7005. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freaders != 0 {
  7006. pthreadret = libc.Xpthread_cond_signal(tls, (*Treader_list1)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Freaders)).Fdata)
  7007. } else {
  7008. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_waiters != 0 {
  7009. pthreadret = libc.Xpthread_cond_signal(tls, (*Tspecial_list1)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fspecial_waiters)).Fse+24)
  7010. } else {
  7011. pthreadret = libc.Xpthread_cond_signal(tls, c+40)
  7012. }
  7013. }
  7014. }
  7015. func X_xcb_in_expect_reply(tls *libc.TLS, c uintptr, request Tuint64_t, workaround _workarounds, flags int32) (r int32) {
  7016. var pend uintptr
  7017. var v1 Tuint64_t
  7018. _, _ = pend, v1
  7019. pend = libc.Xmalloc(tls, uint32(28))
  7020. if !(pend != 0) {
  7021. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_MEM_INSUFFICIENT))
  7022. return 0
  7023. }
  7024. v1 = request
  7025. (*Tpending_reply)(unsafe.Pointer(pend)).Flast_request = v1
  7026. (*Tpending_reply)(unsafe.Pointer(pend)).Ffirst_request = v1
  7027. (*Tpending_reply)(unsafe.Pointer(pend)).Fworkaround = workaround
  7028. (*Tpending_reply)(unsafe.Pointer(pend)).Fflags = flags
  7029. (*Tpending_reply)(unsafe.Pointer(pend)).Fnext = uintptr(0)
  7030. *(*uintptr)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail)) = pend
  7031. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail = pend + 24
  7032. return int32(1)
  7033. }
  7034. func X_xcb_in_replies_done(tls *libc.TLS, c uintptr) {
  7035. var pend, prev_next uintptr
  7036. _, _ = pend, prev_next
  7037. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail != c+40+4212 {
  7038. pend = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail - uintptr(Tsize_t(libc.UintptrFromInt32(0)+24))
  7039. if (*Tpending_reply1)(unsafe.Pointer(pend)).Fworkaround == int32(_WORKAROUND_EXTERNAL_SOCKET_OWNER) {
  7040. if libc.Int64FromUint64((*Tpending_reply1)(unsafe.Pointer(pend)).Ffirst_request-(*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest) <= 0 {
  7041. (*Tpending_reply1)(unsafe.Pointer(pend)).Flast_request = (*Txcb_connection_t)(unsafe.Pointer(c)).Fout.Frequest
  7042. (*Tpending_reply1)(unsafe.Pointer(pend)).Fworkaround = int32(_WORKAROUND_NONE)
  7043. } else {
  7044. /* The socket was taken, but no requests were actually sent
  7045. * so just discard the pending_reply that was created.
  7046. */
  7047. prev_next = c + 40 + 4212
  7048. for *(*uintptr)(unsafe.Pointer(prev_next)) != pend {
  7049. prev_next = *(*uintptr)(unsafe.Pointer(prev_next)) + 24
  7050. }
  7051. *(*uintptr)(unsafe.Pointer(prev_next)) = libc.UintptrFromInt32(0)
  7052. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fpending_replies_tail = prev_next
  7053. libc.Xfree(tls, pend)
  7054. }
  7055. }
  7056. }
  7057. }
  7058. func X_xcb_in_read(tls *libc.TLS, c uintptr) (r int32) {
  7059. bp := tls.Alloc(112)
  7060. defer tls.Free(112)
  7061. var hdr, v2, v3 uintptr
  7062. var i, n, nfd int32
  7063. var _ /* cmsgbuf at bp+8 */ struct {
  7064. Fbuf [0][76]int8
  7065. Fcmsghdr Tcmsghdr
  7066. F__ccgo_pad2 [64]byte
  7067. }
  7068. var _ /* iov at bp+0 */ Tiovec
  7069. var _ /* msg at bp+84 */ Tmsghdr
  7070. _, _, _, _, _, _ = hdr, i, n, nfd, v2, v3
  7071. *(*Tiovec)(unsafe.Pointer(bp)) = Tiovec{
  7072. Fiov_base: c + 40 + 52 + uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len),
  7073. Fiov_len: uint32(4096) - libc.Uint32FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len),
  7074. }
  7075. *(*Tmsghdr)(unsafe.Pointer(bp + 84)) = Tmsghdr{
  7076. Fmsg_iov: bp,
  7077. Fmsg_iovlen: int32(1),
  7078. Fmsg_control: bp + 8,
  7079. Fmsg_controllen: (libc.Uint32FromInt64(4)*libc.Uint32FromInt32(libc.Int32FromInt32(m_XCB_MAX_PASS_FD)-(*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd)+libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1)) & ^(libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1)) + (libc.Uint32FromInt64(12)+libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1)) & ^(libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1)),
  7080. }
  7081. n = libc.Xrecvmsg(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd, bp+84, 0)
  7082. /* Check for truncation errors. Only MSG_CTRUNC is
  7083. * probably possible here, which would indicate that
  7084. * the sender tried to transmit more than XCB_MAX_PASS_FD
  7085. * file descriptors.
  7086. */
  7087. if (*(*Tmsghdr)(unsafe.Pointer(bp + 84))).Fmsg_flags&(libc.Int32FromInt32(m_MSG_TRUNC1)|libc.Int32FromInt32(m_MSG_CTRUNC1)) != 0 {
  7088. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_FDPASSING_FAILED))
  7089. return 0
  7090. }
  7091. if n > 0 {
  7092. if (*(*Tmsghdr)(unsafe.Pointer(bp + 84))).Fmsg_controllen >= uint32(12) {
  7093. if (*Tmsghdr)(unsafe.Pointer(bp+84)).Fmsg_controllen >= uint32(12) {
  7094. v2 = (*Tmsghdr)(unsafe.Pointer(bp + 84)).Fmsg_control
  7095. } else {
  7096. v2 = libc.UintptrFromInt32(0)
  7097. }
  7098. hdr = v2
  7099. for {
  7100. if !(hdr != 0) {
  7101. break
  7102. }
  7103. if (*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_level == int32(m_SOL_SOCKET) && (*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_type == int32(m_SCM_RIGHTS) {
  7104. nfd = libc.Int32FromUint32(((*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_len - ((libc.Uint32FromInt64(12)+libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1)) & ^(libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1)) + libc.Uint32FromInt32(libc.Int32FromInt32(0)))) / uint32(4))
  7105. libc.Xmemcpy(tls, c+40+4220+uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd)*4, hdr+libc.UintptrFromInt32(1)*12, libc.Uint32FromInt32(nfd)*uint32(4))
  7106. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd += nfd
  7107. }
  7108. goto _1
  7109. _1:
  7110. ;
  7111. if (*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_len < uint32(12) || uint32((*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_len+libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1))&libc.Uint32FromInt32(^libc.Int32FromUint32(libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1)))+uint32(12) >= libc.Uint32FromInt32(int32((*Tmsghdr)(unsafe.Pointer(bp+84)).Fmsg_control+uintptr((*Tmsghdr)(unsafe.Pointer(bp+84)).Fmsg_controllen))-int32(hdr)) {
  7112. v3 = uintptr(0)
  7113. } else {
  7114. v3 = hdr + uintptr(uint32((*Tcmsghdr)(unsafe.Pointer(hdr)).Fcmsg_len+libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1))&libc.Uint32FromInt32(^libc.Int32FromUint32(libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1))))
  7115. }
  7116. hdr = v3
  7117. }
  7118. }
  7119. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Ftotal_read += libc.Uint64FromInt32(n)
  7120. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len += n
  7121. }
  7122. for _read_packet(tls, c) != 0 {
  7123. /* empty */
  7124. }
  7125. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd != 0 {
  7126. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd -= (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd
  7127. libc.Xmemmove(tls, c+40+4220, c+40+4220+uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd)*4, libc.Uint32FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd)*uint32(4))
  7128. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fifd = 0
  7129. /* If we have any left-over file descriptors after emptying
  7130. * the input buffer, then the server sent some that we weren't
  7131. * expecting. Close them and mark the connection as broken;
  7132. */
  7133. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len == 0 && (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd != 0 {
  7134. i = 0
  7135. for {
  7136. if !(i < (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fin_fd.Fnfd) {
  7137. break
  7138. }
  7139. libc.Xclose(tls, *(*int32)(unsafe.Pointer(c + 40 + 4220 + uintptr(i)*4)))
  7140. goto _4
  7141. _4:
  7142. ;
  7143. i++
  7144. }
  7145. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_CLOSED_FDPASSING_FAILED))
  7146. return 0
  7147. }
  7148. }
  7149. if n > 0 || n < 0 && (*(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == int32(m_EAGAIN) || *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == int32(m_EINTR)) {
  7150. return int32(1)
  7151. }
  7152. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_ERROR))
  7153. return 0
  7154. }
  7155. func X_xcb_in_read_block(tls *libc.TLS, c uintptr, buf uintptr, len1 int32) (r int32) {
  7156. var done, ret int32
  7157. _, _ = done, ret
  7158. done = (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len
  7159. if len1 < done {
  7160. done = len1
  7161. }
  7162. libc.Xmemcpy(tls, buf, c+40+52, libc.Uint32FromInt32(done))
  7163. (*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len -= done
  7164. libc.Xmemmove(tls, c+40+52, c+40+52+uintptr(done), libc.Uint32FromInt32((*Txcb_connection_t)(unsafe.Pointer(c)).Fin.Fqueue_len))
  7165. if len1 > done {
  7166. ret = _read_block(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Ffd, buf+uintptr(done), len1-done)
  7167. if ret <= 0 {
  7168. X_xcb_conn_shutdown(tls, c, int32(m_XCB_CONN_ERROR))
  7169. return ret
  7170. }
  7171. }
  7172. return len1
  7173. }
  7174. type Tpending_reply1 = struct {
  7175. Ffirst_request Tuint64_t
  7176. Flast_request Tuint64_t
  7177. Fworkaround _workarounds
  7178. Fflags int32
  7179. Fnext uintptr
  7180. }
  7181. type Treader_list1 = struct {
  7182. Frequest Tuint64_t
  7183. Fdata uintptr
  7184. Fnext uintptr
  7185. }
  7186. type Tspecial_list1 = struct {
  7187. Fse uintptr
  7188. Fnext uintptr
  7189. }
  7190. type Txcb_ge_special_event_t1 = struct {
  7191. Fresponse_type Tuint8_t
  7192. Fextension Tuint8_t
  7193. Fsequence Tuint16_t
  7194. Flength Tuint32_t
  7195. Fevtype Tuint16_t
  7196. Fpad0 [2]Tuint8_t
  7197. Feid Tuint32_t
  7198. Fpad1 [16]Tuint8_t
  7199. }
  7200. const m_INT32_MAX2 = 0x7fffffff
  7201. const m_UINT32_MAX2 = "0xffffffffu"
  7202. type Tlazyreply = struct {
  7203. Ftag _lazy_reply_tag
  7204. Fvalue struct {
  7205. Freply [0]uintptr
  7206. Fcookie Txcb_query_extension_cookie_t
  7207. }
  7208. }
  7209. func _get_index(tls *libc.TLS, c uintptr, idx int32) (r uintptr) {
  7210. var new_extensions uintptr
  7211. var new_size int32
  7212. _, _ = new_extensions, new_size
  7213. if idx > (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size {
  7214. new_size = idx << int32(1)
  7215. new_extensions = libc.Xrealloc(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions, uint32(8)*libc.Uint32FromInt32(new_size))
  7216. if !(new_extensions != 0) {
  7217. return uintptr(0)
  7218. }
  7219. libc.Xmemset(tls, new_extensions+uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size)*8, 0, uint32(8)*libc.Uint32FromInt32(new_size-(*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size))
  7220. (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions = new_extensions
  7221. (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size = new_size
  7222. }
  7223. return (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions + uintptr(idx)*8 - uintptr(1)*8
  7224. }
  7225. func _get_lazyreply(tls *libc.TLS, c uintptr, ext uintptr) (r uintptr) {
  7226. var data uintptr
  7227. var v1 int32
  7228. _, _ = data, v1
  7229. libc.Xpthread_mutex_lock(tls, uintptr(unsafe.Pointer(&_global_lock)))
  7230. if !((*Txcb_extension_t)(unsafe.Pointer(ext)).Fglobal_id != 0) {
  7231. _next_global_id++
  7232. v1 = _next_global_id
  7233. (*Txcb_extension_t)(unsafe.Pointer(ext)).Fglobal_id = v1
  7234. }
  7235. libc.Xpthread_mutex_unlock(tls, uintptr(unsafe.Pointer(&_global_lock)))
  7236. data = _get_index(tls, c, (*Txcb_extension_t)(unsafe.Pointer(ext)).Fglobal_id)
  7237. if data != 0 && (*Tlazyreply)(unsafe.Pointer(data)).Ftag == int32(_LAZY_NONE) {
  7238. /* cache miss: query the server */
  7239. (*Tlazyreply)(unsafe.Pointer(data)).Ftag = int32(_LAZY_COOKIE)
  7240. *(*Txcb_query_extension_cookie_t)(unsafe.Pointer(data + 4)) = Xxcb_query_extension(tls, c, uint16(libc.Xstrlen(tls, (*Txcb_extension_t)(unsafe.Pointer(ext)).Fname)), (*Txcb_extension_t)(unsafe.Pointer(ext)).Fname)
  7241. }
  7242. return data
  7243. }
  7244. var _global_lock = Tpthread_mutex_t{}
  7245. var _next_global_id int32
  7246. /* Public interface */
  7247. // C documentation
  7248. //
  7249. // /* Do not free the returned xcb_query_extension_reply_t - on return, it's aliased
  7250. // * from the cache. */
  7251. func Xxcb_get_extension_data(tls *libc.TLS, c uintptr, ext uintptr) (r uintptr) {
  7252. var data, v1 uintptr
  7253. _, _ = data, v1
  7254. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7255. return uintptr(0)
  7256. }
  7257. libc.Xpthread_mutex_lock(tls, c+20976)
  7258. data = _get_lazyreply(tls, c, ext)
  7259. if data != 0 && (*Tlazyreply)(unsafe.Pointer(data)).Ftag == int32(_LAZY_COOKIE) {
  7260. (*Tlazyreply)(unsafe.Pointer(data)).Ftag = int32(_LAZY_FORCED)
  7261. *(*uintptr)(unsafe.Pointer(data + 4)) = Xxcb_query_extension_reply(tls, c, *(*Txcb_query_extension_cookie_t)(unsafe.Pointer(data + 4)), uintptr(0))
  7262. }
  7263. libc.Xpthread_mutex_unlock(tls, c+20976)
  7264. if data != 0 {
  7265. v1 = *(*uintptr)(unsafe.Pointer(data + 4))
  7266. } else {
  7267. v1 = uintptr(0)
  7268. }
  7269. return v1
  7270. }
  7271. func Xxcb_prefetch_extension_data(tls *libc.TLS, c uintptr, ext uintptr) {
  7272. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7273. return
  7274. }
  7275. libc.Xpthread_mutex_lock(tls, c+20976)
  7276. _get_lazyreply(tls, c, ext)
  7277. libc.Xpthread_mutex_unlock(tls, c+20976)
  7278. }
  7279. /* Private interface */
  7280. func X_xcb_ext_init(tls *libc.TLS, c uintptr) (r int32) {
  7281. if libc.Xpthread_mutex_init(tls, c+20976, uintptr(0)) != 0 {
  7282. return 0
  7283. }
  7284. return int32(1)
  7285. }
  7286. func X_xcb_ext_destroy(tls *libc.TLS, c uintptr) {
  7287. var v1 int32
  7288. var v2 uintptr
  7289. _, _ = v1, v2
  7290. libc.Xpthread_mutex_destroy(tls, c+20976)
  7291. for {
  7292. v2 = c + 20976 + 32
  7293. v1 = *(*int32)(unsafe.Pointer(v2))
  7294. *(*int32)(unsafe.Pointer(v2))--
  7295. if !(v1 > 0) {
  7296. break
  7297. }
  7298. if (*(*Tlazyreply1)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions + uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size)*8))).Ftag == int32(_LAZY_FORCED) {
  7299. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions + uintptr((*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions_size)*8 + 4)))
  7300. }
  7301. }
  7302. libc.Xfree(tls, (*Txcb_connection_t)(unsafe.Pointer(c)).Fext.Fextensions)
  7303. }
  7304. type Tlazyreply1 = struct {
  7305. Ftag _lazy_reply_tag
  7306. Fvalue struct {
  7307. Freply [0]uintptr
  7308. Fcookie Txcb_query_extension_cookie_t
  7309. }
  7310. }
  7311. const m_XCB_XCMISC_MAJOR_VERSION = 1
  7312. const m_XCB_XCMISC_MINOR_VERSION = 1
  7313. const m_XCB_XC_MISC_GET_VERSION = 0
  7314. const m_XCB_XC_MISC_GET_XID_LIST = 2
  7315. const m_XCB_XC_MISC_GET_XID_RANGE = 1
  7316. type Txcb_xc_misc_get_version_cookie_t = struct {
  7317. Fsequence uint32
  7318. }
  7319. type Txcb_xc_misc_get_version_request_t = struct {
  7320. Fmajor_opcode Tuint8_t
  7321. Fminor_opcode Tuint8_t
  7322. Flength Tuint16_t
  7323. Fclient_major_version Tuint16_t
  7324. Fclient_minor_version Tuint16_t
  7325. }
  7326. type Txcb_xc_misc_get_version_reply_t = struct {
  7327. Fresponse_type Tuint8_t
  7328. Fpad0 Tuint8_t
  7329. Fsequence Tuint16_t
  7330. Flength Tuint32_t
  7331. Fserver_major_version Tuint16_t
  7332. Fserver_minor_version Tuint16_t
  7333. }
  7334. type Txcb_xc_misc_get_xid_range_cookie_t = struct {
  7335. Fsequence uint32
  7336. }
  7337. type Txcb_xc_misc_get_xid_range_request_t = struct {
  7338. Fmajor_opcode Tuint8_t
  7339. Fminor_opcode Tuint8_t
  7340. Flength Tuint16_t
  7341. }
  7342. type Txcb_xc_misc_get_xid_range_reply_t = struct {
  7343. Fresponse_type Tuint8_t
  7344. Fpad0 Tuint8_t
  7345. Fsequence Tuint16_t
  7346. Flength Tuint32_t
  7347. Fstart_id Tuint32_t
  7348. Fcount Tuint32_t
  7349. }
  7350. type Txcb_xc_misc_get_xid_list_cookie_t = struct {
  7351. Fsequence uint32
  7352. }
  7353. type Txcb_xc_misc_get_xid_list_request_t = struct {
  7354. Fmajor_opcode Tuint8_t
  7355. Fminor_opcode Tuint8_t
  7356. Flength Tuint16_t
  7357. Fcount Tuint32_t
  7358. }
  7359. type Txcb_xc_misc_get_xid_list_reply_t = struct {
  7360. Fresponse_type Tuint8_t
  7361. Fpad0 Tuint8_t
  7362. Fsequence Tuint16_t
  7363. Flength Tuint32_t
  7364. Fids_len Tuint32_t
  7365. Fpad1 [20]Tuint8_t
  7366. }
  7367. /**
  7368. * @}
  7369. */
  7370. /* Public interface */
  7371. func Xxcb_generate_id(tls *libc.TLS, c uintptr) (r Tuint32_t) {
  7372. var range1, xc_misc_reply uintptr
  7373. var ret Tuint32_t
  7374. _, _, _ = range1, ret, xc_misc_reply
  7375. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  7376. return libc.Uint32FromInt32(-libc.Int32FromInt32(1))
  7377. }
  7378. libc.Xpthread_mutex_lock(tls, c+21012)
  7379. 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) {
  7380. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Flast == uint32(0) {
  7381. /* finish setting up initial range */
  7382. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Fmax = (*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fresource_id_mask
  7383. } else {
  7384. /* check for extension */
  7385. xc_misc_reply = Xxcb_get_extension_data(tls, c, uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)))
  7386. if !(xc_misc_reply != 0) || !((*Txcb_query_extension_reply_t)(unsafe.Pointer(xc_misc_reply)).Fpresent != 0) {
  7387. libc.Xpthread_mutex_unlock(tls, c+21012)
  7388. return libc.Uint32FromInt32(-libc.Int32FromInt32(1))
  7389. }
  7390. /* get new range */
  7391. range1 = Xxcb_xc_misc_get_xid_range_reply(tls, c, Xxcb_xc_misc_get_xid_range(tls, c), uintptr(0))
  7392. /* XXX The latter disjunct is what the server returns
  7393. when it is out of XIDs. Sweet. */
  7394. 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) {
  7395. libc.Xpthread_mutex_unlock(tls, c+21012)
  7396. return libc.Uint32FromInt32(-libc.Int32FromInt32(1))
  7397. }
  7398. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Flast = (*Txcb_xc_misc_get_xid_range_reply_t)(unsafe.Pointer(range1)).Fstart_id
  7399. (*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
  7400. libc.Xfree(tls, range1)
  7401. }
  7402. } else {
  7403. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Flast += (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Finc
  7404. }
  7405. ret = (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Flast | (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Fbase
  7406. libc.Xpthread_mutex_unlock(tls, c+21012)
  7407. return ret
  7408. }
  7409. /* Private interface */
  7410. func X_xcb_xid_init(tls *libc.TLS, c uintptr) (r int32) {
  7411. if libc.Xpthread_mutex_init(tls, c+21012, uintptr(0)) != 0 {
  7412. return 0
  7413. }
  7414. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Flast = uint32(0)
  7415. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Fmax = uint32(0)
  7416. (*Txcb_connection_t)(unsafe.Pointer(c)).Fxid.Fbase = (*Txcb_setup_t)(unsafe.Pointer((*Txcb_connection_t)(unsafe.Pointer(c)).Fsetup)).Fresource_id_base
  7417. (*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
  7418. return int32(1)
  7419. }
  7420. func X_xcb_xid_destroy(tls *libc.TLS, c uintptr) {
  7421. libc.Xpthread_mutex_destroy(tls, c+21012)
  7422. }
  7423. type T_xcb_map = struct {
  7424. Fhead uintptr
  7425. Ftail uintptr
  7426. }
  7427. type Tnode = struct {
  7428. Fnext uintptr
  7429. Fkey Tuint64_t
  7430. Fdata uintptr
  7431. }
  7432. type T_xcb_map1 = struct {
  7433. Fhead uintptr
  7434. Ftail uintptr
  7435. }
  7436. /* Private interface */
  7437. func X_xcb_map_new(tls *libc.TLS) (r uintptr) {
  7438. var list uintptr
  7439. _ = list
  7440. list = libc.Xmalloc(tls, uint32(8))
  7441. if !(list != 0) {
  7442. return uintptr(0)
  7443. }
  7444. (*T_xcb_map)(unsafe.Pointer(list)).Fhead = uintptr(0)
  7445. (*T_xcb_map)(unsafe.Pointer(list)).Ftail = list
  7446. return list
  7447. }
  7448. func X_xcb_map_delete(tls *libc.TLS, list uintptr, do_free Txcb_list_free_func_t) {
  7449. var cur uintptr
  7450. _ = cur
  7451. if !(list != 0) {
  7452. return
  7453. }
  7454. for (*T_xcb_map)(unsafe.Pointer(list)).Fhead != 0 {
  7455. cur = (*T_xcb_map)(unsafe.Pointer(list)).Fhead
  7456. if do_free != 0 {
  7457. (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&struct{ uintptr }{do_free})))(tls, (*Tnode)(unsafe.Pointer(cur)).Fdata)
  7458. }
  7459. (*T_xcb_map)(unsafe.Pointer(list)).Fhead = (*Tnode)(unsafe.Pointer(cur)).Fnext
  7460. libc.Xfree(tls, cur)
  7461. }
  7462. libc.Xfree(tls, list)
  7463. }
  7464. func X_xcb_map_put(tls *libc.TLS, list uintptr, key Tuint64_t, data uintptr) (r int32) {
  7465. var cur uintptr
  7466. _ = cur
  7467. cur = libc.Xmalloc(tls, uint32(16))
  7468. if !(cur != 0) {
  7469. return 0
  7470. }
  7471. (*Tnode)(unsafe.Pointer(cur)).Fkey = key
  7472. (*Tnode)(unsafe.Pointer(cur)).Fdata = data
  7473. (*Tnode)(unsafe.Pointer(cur)).Fnext = uintptr(0)
  7474. *(*uintptr)(unsafe.Pointer((*T_xcb_map)(unsafe.Pointer(list)).Ftail)) = cur
  7475. (*T_xcb_map)(unsafe.Pointer(list)).Ftail = cur
  7476. return int32(1)
  7477. }
  7478. func X_xcb_map_remove(tls *libc.TLS, list uintptr, key Tuint64_t) (r uintptr) {
  7479. var cur, ret, tmp uintptr
  7480. _, _, _ = cur, ret, tmp
  7481. cur = list
  7482. for {
  7483. if !(*(*uintptr)(unsafe.Pointer(cur)) != 0) {
  7484. break
  7485. }
  7486. if (*Tnode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cur)))).Fkey == key {
  7487. tmp = *(*uintptr)(unsafe.Pointer(cur))
  7488. ret = (*Tnode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cur)))).Fdata
  7489. *(*uintptr)(unsafe.Pointer(cur)) = (*Tnode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cur)))).Fnext
  7490. if !(*(*uintptr)(unsafe.Pointer(cur)) != 0) {
  7491. (*T_xcb_map)(unsafe.Pointer(list)).Ftail = cur
  7492. }
  7493. libc.Xfree(tls, tmp)
  7494. return ret
  7495. }
  7496. goto _1
  7497. _1:
  7498. ;
  7499. cur = *(*uintptr)(unsafe.Pointer(cur))
  7500. }
  7501. return uintptr(0)
  7502. }
  7503. const m_AI_ADDRCONFIG = 0x20
  7504. const m_AI_ALL = 0x10
  7505. const m_AI_CANONNAME = 0x02
  7506. const m_AI_NUMERICHOST = 4
  7507. const m_AI_NUMERICSERV = 1024
  7508. const m_AI_PASSIVE = 0x01
  7509. const m_AI_V4MAPPED = 0x08
  7510. const m_HOST_NOT_FOUND = 1
  7511. const m_MSG_CTRUNC2 = 0x0008
  7512. const m_MSG_TRUNC2 = 0x0020
  7513. const m_NI_DGRAM = 0x10
  7514. const m_NI_MAXHOST = 255
  7515. const m_NI_MAXSERV = 32
  7516. const m_NI_NAMEREQD = 0x08
  7517. const m_NI_NOFQDN = 0x04
  7518. const m_NI_NUMERICHOST = 0x01
  7519. const m_NI_NUMERICSCOPE = 0x100
  7520. const m_NI_NUMERICSERV = 0x02
  7521. const m_NO_ADDRESS = "NO_DATA"
  7522. const m_NO_DATA = 4
  7523. const m_NO_RECOVERY = 3
  7524. const m_O_NONBLOCK1 = 04000
  7525. const m_SCM_RIGHTS1 = 0x01
  7526. const m_SOCK_CLOEXEC1 = 524288
  7527. const m_SOL_TCP = 6
  7528. const m_TCPI_OPT_ECN = 8
  7529. const m_TCPI_OPT_SACK = 2
  7530. const m_TCPI_OPT_TIMESTAMPS = 1
  7531. const m_TCPI_OPT_WSCALE = 4
  7532. const m_TCPOLEN_MAXSEG = 4
  7533. const m_TCPOLEN_SACK_PERMITTED = 2
  7534. const m_TCPOLEN_TIMESTAMP = 10
  7535. const m_TCPOLEN_WINDOW = 3
  7536. const m_TCPOPT_EOL = 0
  7537. const m_TCPOPT_MAXSEG = 2
  7538. const m_TCPOPT_NOP = 1
  7539. const m_TCPOPT_SACK = 5
  7540. const m_TCPOPT_SACK_PERMITTED = 4
  7541. const m_TCPOPT_TIMESTAMP = 8
  7542. const m_TCPOPT_WINDOW = 3
  7543. const m_TCP_CA_CWR = 2
  7544. const m_TCP_CA_Disorder = 1
  7545. const m_TCP_CA_Loss = 4
  7546. const m_TCP_CA_Open = 0
  7547. const m_TCP_CA_Recovery = 3
  7548. const m_TCP_CC_INFO = 26
  7549. const m_TCP_CLOSE = 7
  7550. const m_TCP_CLOSE_WAIT = 8
  7551. const m_TCP_CLOSING = 11
  7552. const m_TCP_CM_INQ = "TCP_INQ"
  7553. const m_TCP_CONGESTION = 13
  7554. const m_TCP_CORK = 3
  7555. const m_TCP_DEFER_ACCEPT = 9
  7556. const m_TCP_ESTABLISHED = 1
  7557. const m_TCP_FASTOPEN = 23
  7558. const m_TCP_FASTOPEN_CONNECT = 30
  7559. const m_TCP_FASTOPEN_KEY = 33
  7560. const m_TCP_FASTOPEN_NO_COOKIE = 34
  7561. const m_TCP_FIN_WAIT1 = 4
  7562. const m_TCP_FIN_WAIT2 = 5
  7563. const m_TCP_INFO = 11
  7564. const m_TCP_INQ = 36
  7565. const m_TCP_KEEPCNT = 6
  7566. const m_TCP_KEEPIDLE = 4
  7567. const m_TCP_KEEPINTVL = 5
  7568. const m_TCP_LAST_ACK = 9
  7569. const m_TCP_LINGER2 = 8
  7570. const m_TCP_LISTEN = 10
  7571. const m_TCP_MAXSEG = 2
  7572. const m_TCP_MD5SIG = 14
  7573. const m_TCP_MD5SIG_EXT = 32
  7574. const m_TCP_MD5SIG_FLAG_IFINDEX = 0x2
  7575. const m_TCP_MD5SIG_FLAG_PREFIX = 0x1
  7576. const m_TCP_MD5SIG_MAXKEYLEN = 80
  7577. const m_TCP_NODELAY = 1
  7578. const m_TCP_NOTSENT_LOWAT = 25
  7579. const m_TCP_QUEUE_SEQ = 21
  7580. const m_TCP_QUICKACK = 12
  7581. const m_TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT = 0x1
  7582. const m_TCP_REPAIR = 19
  7583. const m_TCP_REPAIR_OFF = 0
  7584. const m_TCP_REPAIR_ON = 1
  7585. const m_TCP_REPAIR_OPTIONS = 22
  7586. const m_TCP_REPAIR_QUEUE = 20
  7587. const m_TCP_REPAIR_WINDOW = 29
  7588. const m_TCP_SAVED_SYN = 28
  7589. const m_TCP_SAVE_SYN = 27
  7590. const m_TCP_SYNCNT = 7
  7591. const m_TCP_SYN_RECV = 3
  7592. const m_TCP_SYN_SENT = 2
  7593. const m_TCP_THIN_DUPACK = 17
  7594. const m_TCP_THIN_LINEAR_TIMEOUTS = 16
  7595. const m_TCP_TIMESTAMP = 24
  7596. const m_TCP_TIME_WAIT = 6
  7597. const m_TCP_TX_DELAY = 37
  7598. const m_TCP_ULP = 31
  7599. const m_TCP_USER_TIMEOUT = 18
  7600. const m_TCP_WINDOW_CLAMP = 10
  7601. const m_TCP_ZEROCOPY_RECEIVE = 35
  7602. const m_TH_ACK = 0x10
  7603. const m_TH_FIN = 0x01
  7604. const m_TH_PUSH = 0x08
  7605. const m_TH_RST = 0x04
  7606. const m_TH_SYN = 0x02
  7607. const m_TH_URG = 0x20
  7608. const m_TRY_AGAIN = 2
  7609. type Tmax_align_t = struct {
  7610. F__ll int64
  7611. F__ld float64
  7612. }
  7613. type Tptrdiff_t = int32
  7614. type Tsockaddr_un = struct {
  7615. Fsun_family Tsa_family_t
  7616. Fsun_path [108]int8
  7617. }
  7618. const _TCP_NLA_PAD = 0
  7619. const _TCP_NLA_BUSY = 1
  7620. const _TCP_NLA_RWND_LIMITED = 2
  7621. const _TCP_NLA_SNDBUF_LIMITED = 3
  7622. const _TCP_NLA_DATA_SEGS_OUT = 4
  7623. const _TCP_NLA_TOTAL_RETRANS = 5
  7624. const _TCP_NLA_PACING_RATE = 6
  7625. const _TCP_NLA_DELIVERY_RATE = 7
  7626. const _TCP_NLA_SND_CWND = 8
  7627. const _TCP_NLA_REORDERING = 9
  7628. const _TCP_NLA_MIN_RTT = 10
  7629. const _TCP_NLA_RECUR_RETRANS = 11
  7630. const _TCP_NLA_DELIVERY_RATE_APP_LMT = 12
  7631. const _TCP_NLA_SNDQ_SIZE = 13
  7632. const _TCP_NLA_CA_STATE = 14
  7633. const _TCP_NLA_SND_SSTHRESH = 15
  7634. const _TCP_NLA_DELIVERED = 16
  7635. const _TCP_NLA_DELIVERED_CE = 17
  7636. const _TCP_NLA_BYTES_SENT = 18
  7637. const _TCP_NLA_BYTES_RETRANS = 19
  7638. const _TCP_NLA_DSACK_DUPS = 20
  7639. const _TCP_NLA_REORD_SEEN = 21
  7640. const _TCP_NLA_SRTT = 22
  7641. const _TCP_NLA_TIMEOUT_REHASH = 23
  7642. const _TCP_NLA_BYTES_NOTSENT = 24
  7643. const _TCP_NLA_EDT = 25
  7644. const _TCP_NLA_TTL = 26
  7645. type Ttcp_seq = uint32
  7646. type Ttcphdr = struct {
  7647. F__ccgo0_0 struct {
  7648. F__ccgo1_0 [0]struct {
  7649. Fth_sport Tuint16_t
  7650. Fth_dport Tuint16_t
  7651. Fth_seq Tuint32_t
  7652. Fth_ack Tuint32_t
  7653. F__ccgo12 uint8
  7654. Fth_flags Tuint8_t
  7655. Fth_win Tuint16_t
  7656. Fth_sum Tuint16_t
  7657. Fth_urp Tuint16_t
  7658. }
  7659. F__ccgo0_0 struct {
  7660. Fsource Tuint16_t
  7661. Fdest Tuint16_t
  7662. Fseq Tuint32_t
  7663. Fack_seq Tuint32_t
  7664. F__ccgo12 uint16
  7665. Fwindow Tuint16_t
  7666. Fcheck Tuint16_t
  7667. Furg_ptr Tuint16_t
  7668. }
  7669. }
  7670. }
  7671. type _tcp_fastopen_client_fail = int32
  7672. const _TFO_STATUS_UNSPEC = 0
  7673. const _TFO_COOKIE_UNAVAILABLE = 1
  7674. const _TFO_DATA_NOT_ACKED = 2
  7675. const _TFO_SYN_RETRANSMITTED = 3
  7676. type Ttcp_info = struct {
  7677. Ftcpi_state Tuint8_t
  7678. Ftcpi_ca_state Tuint8_t
  7679. Ftcpi_retransmits Tuint8_t
  7680. Ftcpi_probes Tuint8_t
  7681. Ftcpi_backoff Tuint8_t
  7682. Ftcpi_options Tuint8_t
  7683. F__ccgo6 uint8
  7684. F__ccgo7 uint8
  7685. Ftcpi_rto Tuint32_t
  7686. Ftcpi_ato Tuint32_t
  7687. Ftcpi_snd_mss Tuint32_t
  7688. Ftcpi_rcv_mss Tuint32_t
  7689. Ftcpi_unacked Tuint32_t
  7690. Ftcpi_sacked Tuint32_t
  7691. Ftcpi_lost Tuint32_t
  7692. Ftcpi_retrans Tuint32_t
  7693. Ftcpi_fackets Tuint32_t
  7694. Ftcpi_last_data_sent Tuint32_t
  7695. Ftcpi_last_ack_sent Tuint32_t
  7696. Ftcpi_last_data_recv Tuint32_t
  7697. Ftcpi_last_ack_recv Tuint32_t
  7698. Ftcpi_pmtu Tuint32_t
  7699. Ftcpi_rcv_ssthresh Tuint32_t
  7700. Ftcpi_rtt Tuint32_t
  7701. Ftcpi_rttvar Tuint32_t
  7702. Ftcpi_snd_ssthresh Tuint32_t
  7703. Ftcpi_snd_cwnd Tuint32_t
  7704. Ftcpi_advmss Tuint32_t
  7705. Ftcpi_reordering Tuint32_t
  7706. Ftcpi_rcv_rtt Tuint32_t
  7707. Ftcpi_rcv_space Tuint32_t
  7708. Ftcpi_total_retrans Tuint32_t
  7709. Ftcpi_pacing_rate Tuint64_t
  7710. Ftcpi_max_pacing_rate Tuint64_t
  7711. Ftcpi_bytes_acked Tuint64_t
  7712. Ftcpi_bytes_received Tuint64_t
  7713. Ftcpi_segs_out Tuint32_t
  7714. Ftcpi_segs_in Tuint32_t
  7715. Ftcpi_notsent_bytes Tuint32_t
  7716. Ftcpi_min_rtt Tuint32_t
  7717. Ftcpi_data_segs_in Tuint32_t
  7718. Ftcpi_data_segs_out Tuint32_t
  7719. Ftcpi_delivery_rate Tuint64_t
  7720. Ftcpi_busy_time Tuint64_t
  7721. Ftcpi_rwnd_limited Tuint64_t
  7722. Ftcpi_sndbuf_limited Tuint64_t
  7723. Ftcpi_delivered Tuint32_t
  7724. Ftcpi_delivered_ce Tuint32_t
  7725. Ftcpi_bytes_sent Tuint64_t
  7726. Ftcpi_bytes_retrans Tuint64_t
  7727. Ftcpi_dsack_dups Tuint32_t
  7728. Ftcpi_reord_seen Tuint32_t
  7729. Ftcpi_rcv_ooopack Tuint32_t
  7730. Ftcpi_snd_wnd Tuint32_t
  7731. }
  7732. type Ttcp_md5sig = struct {
  7733. Ftcpm_addr Tsockaddr_storage
  7734. Ftcpm_flags Tuint8_t
  7735. Ftcpm_prefixlen Tuint8_t
  7736. Ftcpm_keylen Tuint16_t
  7737. Ftcpm_ifindex int32
  7738. Ftcpm_key [80]Tuint8_t
  7739. }
  7740. type Ttcp_diag_md5sig = struct {
  7741. Ftcpm_family Tuint8_t
  7742. Ftcpm_prefixlen Tuint8_t
  7743. Ftcpm_keylen Tuint16_t
  7744. Ftcpm_addr [4]Tuint32_t
  7745. Ftcpm_key [80]Tuint8_t
  7746. }
  7747. type Ttcp_repair_window = struct {
  7748. Fsnd_wl1 Tuint32_t
  7749. Fsnd_wnd Tuint32_t
  7750. Fmax_window Tuint32_t
  7751. Frcv_wnd Tuint32_t
  7752. Frcv_wup Tuint32_t
  7753. }
  7754. type Ttcp_zerocopy_receive = struct {
  7755. Faddress Tuint64_t
  7756. Flength Tuint32_t
  7757. Frecv_skip_hint Tuint32_t
  7758. Finq Tuint32_t
  7759. Ferr Tint32_t
  7760. Fcopybuf_address Tuint64_t
  7761. Fcopybuf_len Tint32_t
  7762. Fflags Tuint32_t
  7763. Fmsg_control Tuint64_t
  7764. Fmsg_controllen Tuint64_t
  7765. Fmsg_flags Tuint32_t
  7766. Freserved Tuint32_t
  7767. }
  7768. type Taddrinfo = struct {
  7769. Fai_flags int32
  7770. Fai_family int32
  7771. Fai_socktype int32
  7772. Fai_protocol int32
  7773. Fai_addrlen Tsocklen_t
  7774. Fai_addr uintptr
  7775. Fai_canonname uintptr
  7776. Fai_next uintptr
  7777. }
  7778. type Tnetent = struct {
  7779. Fn_name uintptr
  7780. Fn_aliases uintptr
  7781. Fn_addrtype int32
  7782. Fn_net Tuint32_t
  7783. }
  7784. type Thostent = struct {
  7785. Fh_name uintptr
  7786. Fh_aliases uintptr
  7787. Fh_addrtype int32
  7788. Fh_length int32
  7789. Fh_addr_list uintptr
  7790. }
  7791. type Tservent = struct {
  7792. Fs_name uintptr
  7793. Fs_aliases uintptr
  7794. Fs_port int32
  7795. Fs_proto uintptr
  7796. }
  7797. type Tprotoent = struct {
  7798. Fp_name uintptr
  7799. Fp_aliases uintptr
  7800. Fp_proto int32
  7801. }
  7802. func Xxcb_popcount(tls *libc.TLS, mask Tuint32_t) (r int32) {
  7803. var y Tuint32_t
  7804. _ = y
  7805. y = mask >> libc.Int32FromInt32(1) & uint32(033333333333)
  7806. y = mask - y - y>>libc.Int32FromInt32(1)&uint32(033333333333)
  7807. return libc.Int32FromUint32((y + y>>libc.Int32FromInt32(3)) & uint32(030707070707) % uint32(077))
  7808. }
  7809. func Xxcb_sumof(tls *libc.TLS, list uintptr, len1 int32) (r int32) {
  7810. var i, s int32
  7811. _, _ = i, s
  7812. s = 0
  7813. i = 0
  7814. for {
  7815. if !(i < len1) {
  7816. break
  7817. }
  7818. s += libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(list)))
  7819. list++
  7820. goto _1
  7821. _1:
  7822. ;
  7823. i++
  7824. }
  7825. return s
  7826. }
  7827. func __xcb_parse_display(tls *libc.TLS, name uintptr, host uintptr, protocol uintptr, displayp uintptr, screenp uintptr) (r int32) {
  7828. bp := tls.Alloc(16)
  7829. defer tls.Free(16)
  7830. var colon, slash uintptr
  7831. var display, len1, screen int32
  7832. var _ /* dot at bp+0 */ uintptr
  7833. var _ /* end at bp+4 */ uintptr
  7834. _, _, _, _, _ = colon, display, len1, screen, slash
  7835. if !(name != 0) || !(*(*int8)(unsafe.Pointer(name)) != 0) {
  7836. name = libc.Xgetenv(tls, __ccgo_ts+4)
  7837. }
  7838. if !(name != 0) {
  7839. return 0
  7840. }
  7841. slash = libc.Xstrrchr(tls, name, int32('/'))
  7842. if slash != 0 {
  7843. len1 = int32(slash) - int32(name)
  7844. if protocol != 0 {
  7845. *(*uintptr)(unsafe.Pointer(protocol)) = libc.Xmalloc(tls, libc.Uint32FromInt32(len1+int32(1)))
  7846. if !(*(*uintptr)(unsafe.Pointer(protocol)) != 0) {
  7847. return 0
  7848. }
  7849. libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(protocol)), name, libc.Uint32FromInt32(len1))
  7850. *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(protocol)) + uintptr(len1))) = int8('\000')
  7851. }
  7852. name = slash + uintptr(1)
  7853. } else {
  7854. if protocol != 0 {
  7855. *(*uintptr)(unsafe.Pointer(protocol)) = libc.UintptrFromInt32(0)
  7856. }
  7857. }
  7858. colon = libc.Xstrrchr(tls, name, int32(':'))
  7859. if !(colon != 0) {
  7860. goto error_out
  7861. }
  7862. len1 = int32(colon) - int32(name)
  7863. colon++
  7864. display = libc.Int32FromUint32(libc.Xstrtoul(tls, colon, bp, int32(10)))
  7865. if *(*uintptr)(unsafe.Pointer(bp)) == colon {
  7866. goto error_out
  7867. }
  7868. if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == int32('\000') {
  7869. screen = 0
  7870. } else {
  7871. if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != int32('.') {
  7872. goto error_out
  7873. }
  7874. *(*uintptr)(unsafe.Pointer(bp))++
  7875. screen = libc.Int32FromUint32(libc.Xstrtoul(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+4, int32(10)))
  7876. if *(*uintptr)(unsafe.Pointer(bp + 4)) == *(*uintptr)(unsafe.Pointer(bp)) || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4))))) != int32('\000') {
  7877. goto error_out
  7878. }
  7879. }
  7880. /* At this point, the display string is fully parsed and valid, but
  7881. * the caller's memory is untouched. */
  7882. *(*uintptr)(unsafe.Pointer(host)) = libc.Xmalloc(tls, libc.Uint32FromInt32(len1+int32(1)))
  7883. if !(*(*uintptr)(unsafe.Pointer(host)) != 0) {
  7884. goto error_out
  7885. }
  7886. libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(host)), name, libc.Uint32FromInt32(len1))
  7887. *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(host)) + uintptr(len1))) = int8('\000')
  7888. *(*int32)(unsafe.Pointer(displayp)) = display
  7889. if screenp != 0 {
  7890. *(*int32)(unsafe.Pointer(screenp)) = screen
  7891. }
  7892. return int32(1)
  7893. goto error_out
  7894. error_out:
  7895. ;
  7896. if protocol != 0 {
  7897. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(protocol)))
  7898. *(*uintptr)(unsafe.Pointer(protocol)) = libc.UintptrFromInt32(0)
  7899. }
  7900. return 0
  7901. }
  7902. func Xxcb_parse_display(tls *libc.TLS, name uintptr, host uintptr, displayp uintptr, screenp uintptr) (r int32) {
  7903. return __xcb_parse_display(tls, name, host, libc.UintptrFromInt32(0), displayp, screenp)
  7904. }
  7905. func __xcb_open(tls *libc.TLS, host uintptr, protocol uintptr, display int32) (r int32) {
  7906. bp := tls.Alloc(32)
  7907. defer tls.Free(32)
  7908. var actual_filelen, fd int32
  7909. var base, file uintptr
  7910. var filelen Tsize_t
  7911. var port, port1 uint16
  7912. var v1 uint32
  7913. _, _, _, _, _, _, _, _ = actual_filelen, base, fd, file, filelen, port, port1, v1
  7914. base = uintptr(unsafe.Pointer(&_unix_base))
  7915. file = libc.UintptrFromInt32(0)
  7916. /* If protocol or host is "unix", fall through to Unix socket code below */
  7917. if (!(protocol != 0) || libc.Xstrcmp(tls, __ccgo_ts+12, protocol) != 0) && int32(*(*int8)(unsafe.Pointer(host))) != int32('\000') && libc.Xstrcmp(tls, __ccgo_ts+12, host) != 0 {
  7918. /* display specifies TCP */
  7919. port = libc.Uint16FromInt32(int32(m_X_TCP_PORT) + display)
  7920. return __xcb_open_tcp(tls, host, protocol, port)
  7921. }
  7922. filelen = libc.Xstrlen(tls, base) + uint32(1) + libc.Uint32FromInt64(4)*libc.Uint32FromInt32(3) + uint32(1)
  7923. file = libc.Xmalloc(tls, filelen)
  7924. if file == libc.UintptrFromInt32(0) {
  7925. return -int32(1)
  7926. }
  7927. /* display specifies Unix socket */
  7928. actual_filelen = libc.X__builtin_snprintf(tls, file, filelen, __ccgo_ts+17, libc.VaList(bp+8, base, display))
  7929. if actual_filelen < 0 {
  7930. libc.Xfree(tls, file)
  7931. return -int32(1)
  7932. }
  7933. /* snprintf may truncate the file */
  7934. if libc.Uint32FromInt32(actual_filelen) < filelen-uint32(1) {
  7935. v1 = libc.Uint32FromInt32(actual_filelen)
  7936. } else {
  7937. v1 = filelen - uint32(1)
  7938. }
  7939. filelen = v1
  7940. fd = __xcb_open_abstract(tls, protocol, file, filelen)
  7941. if fd >= 0 || *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) != int32(m_ENOENT) && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) != int32(m_ECONNREFUSED) {
  7942. libc.Xfree(tls, file)
  7943. return fd
  7944. }
  7945. fd = __xcb_open_unix(tls, protocol, file)
  7946. libc.Xfree(tls, file)
  7947. if fd < 0 && !(protocol != 0) && int32(*(*int8)(unsafe.Pointer(host))) == int32('\000') {
  7948. port1 = libc.Uint16FromInt32(int32(m_X_TCP_PORT) + display)
  7949. fd = __xcb_open_tcp(tls, host, protocol, port1)
  7950. }
  7951. return fd
  7952. return -int32(1) /* if control reaches here then something has gone wrong */
  7953. }
  7954. var _unix_base = [17]int8{'/', 't', 'm', 'p', '/', '.', 'X', '1', '1', '-', 'u', 'n', 'i', 'x', '/', 'X'}
  7955. func __xcb_socket(tls *libc.TLS, family int32, type1 int32, proto int32) (r int32) {
  7956. bp := tls.Alloc(16)
  7957. defer tls.Free(16)
  7958. var fd int32
  7959. _ = fd
  7960. fd = libc.Xsocket(tls, family, type1|int32(m_SOCK_CLOEXEC1), proto)
  7961. if fd == -int32(1) && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == int32(m_EINVAL) {
  7962. fd = libc.Xsocket(tls, family, type1, proto)
  7963. if fd >= 0 {
  7964. libc.Xfcntl(tls, fd, int32(m_F_SETFD), libc.VaList(bp+8, int32(m_FD_CLOEXEC)))
  7965. }
  7966. }
  7967. return fd
  7968. }
  7969. func __xcb_do_connect(tls *libc.TLS, fd int32, addr uintptr, addrlen int32) (r int32) {
  7970. bp := tls.Alloc(16)
  7971. defer tls.Free(16)
  7972. var _ /* on at bp+0 */ int32
  7973. *(*int32)(unsafe.Pointer(bp)) = int32(1)
  7974. if fd < 0 {
  7975. return -int32(1)
  7976. }
  7977. libc.Xsetsockopt(tls, fd, int32(m_IPPROTO_TCP), int32(m_TCP_NODELAY), bp, uint32(4))
  7978. libc.Xsetsockopt(tls, fd, int32(m_SOL_SOCKET), int32(m_SO_KEEPALIVE), bp, uint32(4))
  7979. return libc.Xconnect(tls, fd, addr, libc.Uint32FromInt32(addrlen))
  7980. }
  7981. func __xcb_open_tcp(tls *libc.TLS, host uintptr, protocol uintptr, port uint16) (r int32) {
  7982. bp := tls.Alloc(64)
  7983. defer tls.Free(64)
  7984. var addr, bracket, v1 uintptr
  7985. var fd int32
  7986. var v2 bool
  7987. var _ /* hints at bp+0 */ Taddrinfo
  7988. var _ /* results at bp+44 */ uintptr
  7989. var _ /* service at bp+36 */ [6]int8
  7990. _, _, _, _, _ = addr, bracket, fd, v1, v2
  7991. fd = -int32(1)
  7992. if protocol != 0 && libc.Xstrcmp(tls, __ccgo_ts+22, protocol) != 0 && libc.Xstrcmp(tls, __ccgo_ts+26, protocol) != 0 && libc.Xstrcmp(tls, __ccgo_ts+31, protocol) != 0 {
  7993. return -int32(1)
  7994. }
  7995. if int32(*(*int8)(unsafe.Pointer(host))) == int32('\000') {
  7996. host = __ccgo_ts + 37
  7997. }
  7998. libc.Xmemset(tls, bp, 0, uint32(32))
  7999. (*(*Taddrinfo)(unsafe.Pointer(bp))).Fai_flags |= int32(m_AI_NUMERICSERV)
  8000. (*(*Taddrinfo)(unsafe.Pointer(bp))).Fai_family = m_PF_UNSPEC
  8001. (*(*Taddrinfo)(unsafe.Pointer(bp))).Fai_socktype = int32(m_SOCK_STREAM)
  8002. /* Allow IPv6 addresses enclosed in brackets. */
  8003. if v2 = int32(*(*int8)(unsafe.Pointer(host))) == int32('['); v2 {
  8004. v1 = libc.Xstrrchr(tls, host, int32(']'))
  8005. bracket = v1
  8006. }
  8007. if v2 && v1 != 0 && int32(*(*int8)(unsafe.Pointer(bracket + 1))) == int32('\000') {
  8008. *(*int8)(unsafe.Pointer(bracket)) = int8('\000')
  8009. host++
  8010. (*(*Taddrinfo)(unsafe.Pointer(bp))).Fai_flags |= int32(m_AI_NUMERICHOST)
  8011. (*(*Taddrinfo)(unsafe.Pointer(bp))).Fai_family = int32(m_PF_INET6)
  8012. }
  8013. libc.X__builtin_snprintf(tls, bp+36, uint32(6), __ccgo_ts+47, libc.VaList(bp+56, libc.Int32FromUint16(port)))
  8014. if libc.Xgetaddrinfo(tls, host, bp+36, bp, bp+44) != 0 {
  8015. /* FIXME: use gai_strerror, and fill in error connection */
  8016. return -int32(1)
  8017. }
  8018. addr = *(*uintptr)(unsafe.Pointer(bp + 44))
  8019. for {
  8020. if !(addr != 0) {
  8021. break
  8022. }
  8023. fd = __xcb_socket(tls, (*Taddrinfo)(unsafe.Pointer(addr)).Fai_family, (*Taddrinfo)(unsafe.Pointer(addr)).Fai_socktype, (*Taddrinfo)(unsafe.Pointer(addr)).Fai_protocol)
  8024. if __xcb_do_connect(tls, fd, (*Taddrinfo)(unsafe.Pointer(addr)).Fai_addr, libc.Int32FromUint32((*Taddrinfo)(unsafe.Pointer(addr)).Fai_addrlen)) >= 0 {
  8025. break
  8026. }
  8027. libc.Xclose(tls, fd)
  8028. fd = -int32(1)
  8029. goto _3
  8030. _3:
  8031. ;
  8032. addr = (*Taddrinfo)(unsafe.Pointer(addr)).Fai_next
  8033. }
  8034. libc.Xfreeaddrinfo(tls, *(*uintptr)(unsafe.Pointer(bp + 44)))
  8035. return fd
  8036. }
  8037. func __xcb_open_unix(tls *libc.TLS, protocol uintptr, file uintptr) (r int32) {
  8038. bp := tls.Alloc(128)
  8039. defer tls.Free(128)
  8040. var fd int32
  8041. var _ /* addr at bp+0 */ Tsockaddr_un
  8042. var _ /* len at bp+112 */ Tsocklen_t
  8043. var _ /* val at bp+116 */ int32
  8044. _ = fd
  8045. *(*Tsocklen_t)(unsafe.Pointer(bp + 112)) = uint32(4)
  8046. if protocol != 0 && libc.Xstrcmp(tls, __ccgo_ts+12, protocol) != 0 {
  8047. return -int32(1)
  8048. }
  8049. libc.Xstrcpy(tls, bp+2, file)
  8050. (*(*Tsockaddr_un)(unsafe.Pointer(bp))).Fsun_family = uint16(m_PF_LOCAL)
  8051. fd = __xcb_socket(tls, int32(m_PF_LOCAL), int32(m_SOCK_STREAM), 0)
  8052. if fd == -int32(1) {
  8053. return -int32(1)
  8054. }
  8055. if libc.Xgetsockopt(tls, fd, int32(m_SOL_SOCKET), int32(m_SO_SNDBUF), bp+116, bp+112) == 0 && *(*int32)(unsafe.Pointer(bp + 116)) < libc.Int32FromInt32(64)*libc.Int32FromInt32(1024) {
  8056. *(*int32)(unsafe.Pointer(bp + 116)) = libc.Int32FromInt32(64) * libc.Int32FromInt32(1024)
  8057. libc.Xsetsockopt(tls, fd, int32(m_SOL_SOCKET), int32(m_SO_SNDBUF), bp+116, uint32(4))
  8058. }
  8059. if libc.Xconnect(tls, fd, bp, uint32(110)) == -int32(1) {
  8060. libc.Xclose(tls, fd)
  8061. return -int32(1)
  8062. }
  8063. return fd
  8064. }
  8065. func __xcb_open_abstract(tls *libc.TLS, protocol uintptr, file uintptr, filelen Tsize_t) (r int32) {
  8066. bp := tls.Alloc(112)
  8067. defer tls.Free(112)
  8068. var fd int32
  8069. var namelen Tsocklen_t
  8070. var _ /* addr at bp+0 */ Tsockaddr_un
  8071. _, _ = fd, namelen
  8072. *(*Tsockaddr_un)(unsafe.Pointer(bp)) = Tsockaddr_un{}
  8073. if protocol != 0 && libc.Xstrcmp(tls, __ccgo_ts+12, protocol) != 0 {
  8074. return -int32(1)
  8075. }
  8076. libc.Xstrcpy(tls, bp+2+uintptr(1), file)
  8077. (*(*Tsockaddr_un)(unsafe.Pointer(bp))).Fsun_family = uint16(m_PF_LOCAL)
  8078. namelen = uint32(libc.UintptrFromInt32(0)+2) + libc.Uint32FromInt32(1) + filelen
  8079. fd = __xcb_socket(tls, int32(m_PF_LOCAL), int32(m_SOCK_STREAM), 0)
  8080. if fd == -int32(1) {
  8081. return -int32(1)
  8082. }
  8083. if libc.Xconnect(tls, fd, bp, namelen) == -int32(1) {
  8084. libc.Xclose(tls, fd)
  8085. return -int32(1)
  8086. }
  8087. return fd
  8088. }
  8089. func Xxcb_connect(tls *libc.TLS, displayname uintptr, screenp uintptr) (r uintptr) {
  8090. return Xxcb_connect_to_display_with_auth_info(tls, displayname, libc.UintptrFromInt32(0), screenp)
  8091. }
  8092. func Xxcb_connect_to_display_with_auth_info(tls *libc.TLS, displayname uintptr, auth uintptr, screenp uintptr) (r uintptr) {
  8093. bp := tls.Alloc(32)
  8094. defer tls.Free(32)
  8095. var c uintptr
  8096. var fd, parsed int32
  8097. var _ /* display at bp+0 */ int32
  8098. var _ /* host at bp+4 */ uintptr
  8099. var _ /* ourauth at bp+12 */ Txcb_auth_info_t
  8100. var _ /* protocol at bp+8 */ uintptr
  8101. _, _, _ = c, fd, parsed
  8102. *(*int32)(unsafe.Pointer(bp)) = 0
  8103. *(*uintptr)(unsafe.Pointer(bp + 4)) = libc.UintptrFromInt32(0)
  8104. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.UintptrFromInt32(0)
  8105. parsed = __xcb_parse_display(tls, displayname, bp+4, bp+8, bp, screenp)
  8106. if !(parsed != 0) {
  8107. c = X_xcb_conn_ret_error(tls, int32(m_XCB_CONN_CLOSED_PARSE_ERR))
  8108. goto out
  8109. }
  8110. fd = __xcb_open(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), *(*uintptr)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp)))
  8111. if fd == -int32(1) {
  8112. c = X_xcb_conn_ret_error(tls, int32(m_XCB_CONN_ERROR))
  8113. goto out
  8114. }
  8115. if auth != 0 {
  8116. c = Xxcb_connect_to_fd(tls, fd, auth)
  8117. goto out
  8118. }
  8119. if X_xcb_get_auth_info(tls, fd, bp+12, *(*int32)(unsafe.Pointer(bp))) != 0 {
  8120. c = Xxcb_connect_to_fd(tls, fd, bp+12)
  8121. libc.Xfree(tls, (*(*Txcb_auth_info_t)(unsafe.Pointer(bp + 12))).Fname)
  8122. libc.Xfree(tls, (*(*Txcb_auth_info_t)(unsafe.Pointer(bp + 12))).Fdata)
  8123. } else {
  8124. c = Xxcb_connect_to_fd(tls, fd, uintptr(0))
  8125. }
  8126. if (*Txcb_connection_t)(unsafe.Pointer(c)).Fhas_error != 0 {
  8127. goto out
  8128. }
  8129. /* Make sure requested screen number is in bounds for this server */
  8130. 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) {
  8131. Xxcb_disconnect(tls, c)
  8132. c = X_xcb_conn_ret_error(tls, int32(m_XCB_CONN_CLOSED_INVALID_SCREEN))
  8133. goto out
  8134. }
  8135. goto out
  8136. out:
  8137. ;
  8138. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 4)))
  8139. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 8)))
  8140. return c
  8141. }
  8142. const m_AUTH_PROTO_MIT_MAGIC_COOKIE = "MIT-MAGIC-COOKIE-1"
  8143. const m_AUTH_PROTO_XDM_AUTHORIZATION = "XDM-AUTHORIZATION-1"
  8144. const m_CANBSIZ = 255
  8145. const m_DEV_BSIZE = 512
  8146. const m_FALSE = 0
  8147. const m_FUNCPROTO = 15
  8148. const m_FamilyKrb5Principal = 253
  8149. const m_FamilyLocal = 256
  8150. const m_FamilyLocalHost = 252
  8151. const m_FamilyNetname = 254
  8152. const m_FamilyWild = 65535
  8153. const m_INITIAL_SOCKNAME_SLACK = 108
  8154. const m_ITIMER_PROF = 2
  8155. const m_ITIMER_REAL = 0
  8156. const m_ITIMER_VIRTUAL = 1
  8157. const m_LOCK_ERROR = 1
  8158. const m_LOCK_SUCCESS = 0
  8159. const m_LOCK_TIMEOUT = 2
  8160. const m_MAXHOSTNAMELEN = 64
  8161. const m_MAXNAMLEN = 255
  8162. const m_MAXPATHLEN = 4096
  8163. const m_MAXSYMLINKS = 20
  8164. const m_NBBY = 8
  8165. const m_NCARGS = 131072
  8166. const m_NGROUPS = 32
  8167. const m_NOFILE = 256
  8168. const m_NeedFunctionPrototypes = 1
  8169. const m_NeedNestedPrototypes = 1
  8170. const m_NeedVarargsPrototypes = 1
  8171. const m_NeedWidePrototypes = 0
  8172. const m_PRIO_MAX = 20
  8173. const m_PRIO_PGRP = 1
  8174. const m_PRIO_PROCESS = 0
  8175. const m_PRIO_USER = 2
  8176. const m_RLIMIT_AS = 9
  8177. const m_RLIMIT_CORE = 4
  8178. const m_RLIMIT_CPU = 0
  8179. const m_RLIMIT_DATA = 2
  8180. const m_RLIMIT_FSIZE = 1
  8181. const m_RLIMIT_LOCKS = 10
  8182. const m_RLIMIT_MEMLOCK = 8
  8183. const m_RLIMIT_MSGQUEUE = 12
  8184. const m_RLIMIT_NICE = 13
  8185. const m_RLIMIT_NLIMITS = 16
  8186. const m_RLIMIT_NOFILE = 7
  8187. const m_RLIMIT_NPROC = 6
  8188. const m_RLIMIT_RSS = 5
  8189. const m_RLIMIT_RTPRIO = 14
  8190. const m_RLIMIT_RTTIME = 15
  8191. const m_RLIMIT_SIGPENDING = 11
  8192. const m_RLIMIT_STACK = 3
  8193. const m_RLIM_NLIMITS = "RLIMIT_NLIMITS"
  8194. const m_RLIM_SAVED_CUR = "RLIM_INFINITY"
  8195. const m_RLIM_SAVED_MAX = "RLIM_INFINITY"
  8196. const m_RUSAGE_SELF = 0
  8197. const m_RUSAGE_THREAD = 1
  8198. const m_SOCK_CLOEXEC2 = 02000000
  8199. const m_TRUE = 1
  8200. const m_XDM_DEFAULT_MCAST_ADDR6 = "ff02:0:0:0:0:0:0:12b"
  8201. const m_XDM_KA_RTX_LIMIT = 4
  8202. const m_XDM_MAX_MSGLEN = 8192
  8203. const m_XDM_MAX_RTX = 32
  8204. const m_XDM_MIN_RTX = 2
  8205. const m_XDM_PROTOCOL_VERSION = 1
  8206. const m_XDM_RTX_LIMIT = 7
  8207. const m_XDM_UDP_PORT = 177
  8208. const m_XMD_H = 1
  8209. const m__X_INLINE = "inline"
  8210. const m__X_RESTRICT_KYWD = "restrict"
  8211. const m__Xconst = "const"
  8212. const m_prlimit64 = "prlimit"
  8213. type TXauth = struct {
  8214. Ffamily uint16
  8215. Faddress_length uint16
  8216. Faddress uintptr
  8217. Fnumber_length uint16
  8218. Fnumber uintptr
  8219. Fname_length uint16
  8220. Fname uintptr
  8221. Fdata_length uint16
  8222. Fdata uintptr
  8223. }
  8224. type Txauth = TXauth
  8225. type Titimerval = struct {
  8226. Fit_interval Ttimeval
  8227. Fit_value Ttimeval
  8228. }
  8229. type Ttimezone = struct {
  8230. Ftz_minuteswest int32
  8231. Ftz_dsttime int32
  8232. }
  8233. type Trlim_t = uint64
  8234. type Trlimit = struct {
  8235. Frlim_cur Trlim_t
  8236. Frlim_max Trlim_t
  8237. }
  8238. type Trusage = struct {
  8239. Fru_utime Ttimeval
  8240. Fru_stime Ttimeval
  8241. Fru_maxrss int32
  8242. Fru_ixrss int32
  8243. Fru_idrss int32
  8244. Fru_isrss int32
  8245. Fru_minflt int32
  8246. Fru_majflt int32
  8247. Fru_nswap int32
  8248. Fru_inblock int32
  8249. Fru_oublock int32
  8250. Fru_msgsnd int32
  8251. Fru_msgrcv int32
  8252. Fru_nsignals int32
  8253. Fru_nvcsw int32
  8254. Fru_nivcsw int32
  8255. F__reserved [16]int32
  8256. }
  8257. type TINT32 = int32
  8258. type TINT16 = int16
  8259. type TINT8 = int8
  8260. type TCARD64 = uint64
  8261. type TCARD32 = uint32
  8262. type TCARD16 = uint16
  8263. type TCARD8 = uint8
  8264. type TBITS32 = uint32
  8265. type TBITS16 = uint16
  8266. type TBYTE = uint8
  8267. type TBOOL = uint8
  8268. type TxdmOpCode = int32
  8269. const _BROADCAST_QUERY = 1
  8270. const _QUERY = 2
  8271. const _INDIRECT_QUERY = 3
  8272. const _FORWARD_QUERY = 4
  8273. const _WILLING = 5
  8274. const _UNWILLING = 6
  8275. const _REQUEST = 7
  8276. const _ACCEPT = 8
  8277. const _DECLINE = 9
  8278. const _MANAGE = 10
  8279. const _REFUSE = 11
  8280. const _FAILED = 12
  8281. const _KEEPALIVE = 13
  8282. const _ALIVE = 14
  8283. type Txdmcp_states = int32
  8284. const _XDM_QUERY = 0
  8285. const _XDM_BROADCAST = 1
  8286. const _XDM_INDIRECT = 2
  8287. const _XDM_COLLECT_QUERY = 3
  8288. const _XDM_COLLECT_BROADCAST_QUERY = 4
  8289. const _XDM_COLLECT_INDIRECT_QUERY = 5
  8290. const _XDM_START_CONNECTION = 6
  8291. const _XDM_AWAIT_REQUEST_RESPONSE = 7
  8292. const _XDM_AWAIT_MANAGE_RESPONSE = 8
  8293. const _XDM_MANAGE = 9
  8294. const _XDM_RUN_SESSION = 10
  8295. const _XDM_OFF = 11
  8296. const _XDM_AWAIT_USER_INPUT = 12
  8297. const _XDM_KEEPALIVE = 13
  8298. const _XDM_AWAIT_ALIVE_RESPONSE = 14
  8299. const _XDM_KEEP_ME_LAST = 15
  8300. type TCARD8Ptr = uintptr
  8301. type TCARD16Ptr = uintptr
  8302. type TCARD32Ptr = uintptr
  8303. type TARRAY8 = struct {
  8304. Flength TCARD16
  8305. Fdata TCARD8Ptr
  8306. }
  8307. type T_ARRAY8 = TARRAY8
  8308. type TARRAY8Ptr = uintptr
  8309. type TARRAY16 = struct {
  8310. Flength TCARD8
  8311. Fdata TCARD16Ptr
  8312. }
  8313. type T_ARRAY16 = TARRAY16
  8314. type TARRAY16Ptr = uintptr
  8315. type TARRAY32 = struct {
  8316. Flength TCARD8
  8317. Fdata TCARD32Ptr
  8318. }
  8319. type T_ARRAY32 = TARRAY32
  8320. type TARRAY32Ptr = uintptr
  8321. type TARRAYofARRAY8 = struct {
  8322. Flength TCARD8
  8323. Fdata TARRAY8Ptr
  8324. }
  8325. type T_ARRAYofARRAY8 = TARRAYofARRAY8
  8326. type TARRAYofARRAY8Ptr = uintptr
  8327. type TXdmcpHeader = struct {
  8328. Fversion TCARD16
  8329. Fopcode TCARD16
  8330. Flength TCARD16
  8331. }
  8332. type T_XdmcpHeader = TXdmcpHeader
  8333. type TXdmcpHeaderPtr = uintptr
  8334. type TXdmcpBuffer = struct {
  8335. Fdata uintptr
  8336. Fsize int32
  8337. Fpointer int32
  8338. Fcount int32
  8339. }
  8340. type T_XdmcpBuffer = TXdmcpBuffer
  8341. type TXdmcpBufferPtr = uintptr
  8342. type TXdmAuthKeyRec = struct {
  8343. Fdata [8]TBYTE
  8344. }
  8345. type T_XdmAuthKey = TXdmAuthKeyRec
  8346. type TXdmAuthKeyPtr = uintptr
  8347. type TXdmcpNetaddr = uintptr
  8348. type _auth_protos = int32
  8349. const _AUTH_XA1 = 0
  8350. const _AUTH_MC1 = 1
  8351. const _N_AUTH_PROTOS = 2
  8352. var _authnames = [2]uintptr{
  8353. 0: __ccgo_ts + 51,
  8354. 1: __ccgo_ts + 71,
  8355. }
  8356. var _authnameslen = [2]int32{
  8357. 0: libc.Int32FromUint32(libc.Uint32FromInt64(20) - libc.Uint32FromInt32(1)),
  8358. 1: libc.Int32FromUint32(libc.Uint32FromInt64(19) - libc.Uint32FromInt32(1)),
  8359. }
  8360. func _memdup(tls *libc.TLS, dst uintptr, src uintptr, len1 Tsize_t) (r Tsize_t) {
  8361. if len1 != 0 {
  8362. *(*uintptr)(unsafe.Pointer(dst)) = libc.Xmalloc(tls, len1)
  8363. } else {
  8364. *(*uintptr)(unsafe.Pointer(dst)) = uintptr(0)
  8365. }
  8366. if !(*(*uintptr)(unsafe.Pointer(dst)) != 0) {
  8367. return uint32(0)
  8368. }
  8369. libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(dst)), src, len1)
  8370. return len1
  8371. }
  8372. func _authname_match(tls *libc.TLS, kind _auth_protos, name uintptr, namelen Tsize_t) (r int32) {
  8373. if libc.Uint32FromInt32(_authnameslen[kind]) != namelen {
  8374. return 0
  8375. }
  8376. if libc.Xmemcmp(tls, _authnames[kind], name, namelen) != 0 {
  8377. return 0
  8378. }
  8379. return int32(1)
  8380. }
  8381. func _get_authptr(tls *libc.TLS, sockname uintptr, display int32) (r uintptr) {
  8382. bp := tls.Alloc(320)
  8383. defer tls.Free(320)
  8384. var addr uintptr
  8385. var addrlen, dispbuflen int32
  8386. var family uint16
  8387. var v1 uint32
  8388. var _ /* dispbuf at bp+256 */ [40]int8
  8389. var _ /* hostnamebuf at bp+0 */ [256]int8
  8390. _, _, _, _, _ = addr, addrlen, dispbuflen, family, v1
  8391. addr = uintptr(0)
  8392. addrlen = 0
  8393. family = libc.Uint16FromInt32(libc.Int32FromInt32(m_FamilyLocal)) /* 256 */
  8394. switch libc.Int32FromUint16((*Tsockaddr)(unsafe.Pointer(sockname)).Fsa_family) {
  8395. case int32(m_PF_INET6):
  8396. addr = sockname + 8
  8397. addrlen = int32(16)
  8398. if !(*(*Tuint32_t)(unsafe.Pointer(sockname + 8)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(sockname + 8 + 1*4)) == uint32(0) && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 8))) == 0 && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 9))) == 0 && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 10))) == int32(0xff) && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 11))) == int32(0xff)) {
  8399. 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) && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 12))) == 0 && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 13))) == 0 && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 14))) == 0 && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 15))) == int32(1)) {
  8400. family = uint16(_XCB_FAMILY_INTERNET_6)
  8401. }
  8402. break
  8403. }
  8404. addr += uintptr(12)
  8405. /* if v4-mapped, fall through. */
  8406. fallthrough
  8407. case int32(m_PF_INET):
  8408. if !(addr != 0) {
  8409. addr = sockname + 4
  8410. }
  8411. addrlen = int32(4)
  8412. if *(*Tin_addr_t)(unsafe.Pointer(addr)) != libc.Xhtonl(tls, libc.Uint32FromInt32(0x7f000001)) {
  8413. family = uint16(_XCB_FAMILY_INTERNET)
  8414. }
  8415. case int32(m_PF_LOCAL):
  8416. default:
  8417. return uintptr(0) /* cannot authenticate this family */
  8418. }
  8419. dispbuflen = libc.X__builtin_snprintf(tls, bp+256, uint32(40), __ccgo_ts+90, libc.VaList(bp+304, display))
  8420. if dispbuflen < 0 {
  8421. return uintptr(0)
  8422. }
  8423. /* snprintf may have truncate our text */
  8424. if libc.Uint32FromInt32(dispbuflen) < libc.Uint32FromInt64(40)-libc.Uint32FromInt32(1) {
  8425. v1 = libc.Uint32FromInt32(dispbuflen)
  8426. } else {
  8427. v1 = libc.Uint32FromInt64(40) - libc.Uint32FromInt32(1)
  8428. }
  8429. dispbuflen = libc.Int32FromUint32(v1)
  8430. if libc.Int32FromUint16(family) == int32(m_FamilyLocal) {
  8431. if libc.Xgethostname(tls, bp, uint32(256)) == -int32(1) {
  8432. return uintptr(0)
  8433. } /* do not know own hostname */
  8434. addr = bp
  8435. addrlen = libc.Int32FromUint32(libc.Xstrlen(tls, addr))
  8436. }
  8437. 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)))
  8438. }
  8439. func _next_nonce(tls *libc.TLS) (r int32) {
  8440. var ret, v1 int32
  8441. _, _ = ret, v1
  8442. libc.Xpthread_mutex_lock(tls, uintptr(unsafe.Pointer(&_nonce_mutex)))
  8443. v1 = _nonce
  8444. _nonce++
  8445. ret = v1
  8446. libc.Xpthread_mutex_unlock(tls, uintptr(unsafe.Pointer(&_nonce_mutex)))
  8447. return ret
  8448. }
  8449. var _nonce int32
  8450. var _nonce_mutex = Tpthread_mutex_t{}
  8451. func _do_append(tls *libc.TLS, buf uintptr, idxp uintptr, val uintptr, valsize Tsize_t) {
  8452. var p1 uintptr
  8453. _ = p1
  8454. libc.Xmemcpy(tls, buf+uintptr(*(*int32)(unsafe.Pointer(idxp))), val, valsize)
  8455. p1 = idxp
  8456. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + valsize)
  8457. }
  8458. func _compute_auth(tls *libc.TLS, info uintptr, authptr uintptr, sockname uintptr) (r int32) {
  8459. bp := tls.Alloc(32)
  8460. defer tls.Free(32)
  8461. var si, si6 uintptr
  8462. var v2 int32
  8463. var _ /* fakeaddr at bp+12 */ Tuint32_t
  8464. var _ /* fakeaddr at bp+4 */ Tuint32_t
  8465. var _ /* fakeport at bp+16 */ Tuint16_t
  8466. var _ /* fakeport at bp+8 */ Tuint16_t
  8467. var _ /* j at bp+0 */ int32
  8468. var _ /* now at bp+20 */ Tuint32_t
  8469. _, _, _ = si, si6, v2
  8470. if _authname_match(tls, int32(_AUTH_MC1), (*TXauth)(unsafe.Pointer(authptr)).Fname, uint32((*TXauth)(unsafe.Pointer(authptr)).Fname_length)) != 0 {
  8471. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdatalen = libc.Int32FromUint32(_memdup(tls, info+12, (*TXauth)(unsafe.Pointer(authptr)).Fdata, uint32((*TXauth)(unsafe.Pointer(authptr)).Fdata_length)))
  8472. if !((*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdatalen != 0) {
  8473. return 0
  8474. }
  8475. return int32(1)
  8476. }
  8477. if _authname_match(tls, int32(_AUTH_XA1), (*TXauth)(unsafe.Pointer(authptr)).Fname, uint32((*TXauth)(unsafe.Pointer(authptr)).Fname_length)) != 0 {
  8478. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata = libc.Xmalloc(tls, libc.Uint32FromInt32(libc.Int32FromInt32(192)/libc.Int32FromInt32(8)))
  8479. if !((*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata != 0) {
  8480. return 0
  8481. }
  8482. *(*int32)(unsafe.Pointer(bp)) = 0
  8483. for {
  8484. if !(*(*int32)(unsafe.Pointer(bp)) < int32(8)) {
  8485. break
  8486. }
  8487. *(*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)))))
  8488. goto _1
  8489. _1:
  8490. ;
  8491. *(*int32)(unsafe.Pointer(bp))++
  8492. }
  8493. switch libc.Int32FromUint16((*Tsockaddr)(unsafe.Pointer(sockname)).Fsa_family) {
  8494. case int32(m_PF_INET):
  8495. /*block*/
  8496. si = sockname
  8497. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, si+4, uint32(4))
  8498. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, si+2, uint32(2))
  8499. case int32(m_PF_INET6):
  8500. /*block*/
  8501. si6 = sockname
  8502. if *(*Tuint32_t)(unsafe.Pointer(sockname + 8)) == uint32(0) && *(*Tuint32_t)(unsafe.Pointer(sockname + 8 + 1*4)) == uint32(0) && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 8))) == 0 && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 9))) == 0 && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 10))) == int32(0xff) && libc.Int32FromUint8(*(*Tuint8_t)(unsafe.Pointer(sockname + 8 + 11))) == int32(0xff) {
  8503. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, si6+8+12, uint32(4))
  8504. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, si6+2, uint32(2))
  8505. } else {
  8506. /* XDM-AUTHORIZATION-1 does not handle IPv6 correctly. Do the
  8507. same thing Xlib does: use all zeroes for the 4-byte address
  8508. and 2-byte port number. */
  8509. *(*Tuint32_t)(unsafe.Pointer(bp + 4)) = uint32(0)
  8510. *(*Tuint16_t)(unsafe.Pointer(bp + 8)) = uint16(0)
  8511. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, bp+4, uint32(4))
  8512. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, bp+8, uint32(2))
  8513. }
  8514. case int32(m_PF_LOCAL):
  8515. /*block*/
  8516. *(*Tuint32_t)(unsafe.Pointer(bp + 12)) = libc.Xhtonl(tls, uint32(0xffffffff)-libc.Uint32FromInt32(_next_nonce(tls)))
  8517. *(*Tuint16_t)(unsafe.Pointer(bp + 16)) = libc.Xhtons(tls, libc.Uint16FromInt32(libc.Xgetpid(tls)))
  8518. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, bp+12, uint32(4))
  8519. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, bp+16, uint32(2))
  8520. default:
  8521. libc.Xfree(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata)
  8522. return 0 /* do not know how to build this */
  8523. }
  8524. *(*Tuint32_t)(unsafe.Pointer(bp + 20)) = libc.Xhtonl(tls, libc.Uint32FromInt64(libc.Xtime(tls, uintptr(0))))
  8525. _do_append(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata, bp, bp+20, uint32(4))
  8526. for *(*int32)(unsafe.Pointer(bp)) < libc.Int32FromInt32(192)/libc.Int32FromInt32(8) {
  8527. v2 = *(*int32)(unsafe.Pointer(bp))
  8528. *(*int32)(unsafe.Pointer(bp))++
  8529. *(*int8)(unsafe.Pointer((*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdata + uintptr(v2))) = 0
  8530. }
  8531. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fdatalen = *(*int32)(unsafe.Pointer(bp))
  8532. 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)
  8533. return int32(1)
  8534. }
  8535. return 0 /* Unknown authorization type */
  8536. }
  8537. /* `sockaddr_un.sun_path' typical size usually ranges between 92 and 108 */
  8538. // C documentation
  8539. //
  8540. // /* Return a dynamically allocated socket address structure according
  8541. // to the value returned by either getpeername() or getsockname()
  8542. // (according to POSIX, applications should not assume a particular
  8543. // length for `sockaddr_un.sun_path') */
  8544. func _get_peer_sock_name(tls *libc.TLS, socket_func uintptr, fd int32) (r uintptr) {
  8545. bp := tls.Alloc(16)
  8546. defer tls.Free(16)
  8547. var new_sockname, sockname, v1 uintptr
  8548. var socknamelen Tsocklen_t
  8549. var _ /* actual_socknamelen at bp+0 */ Tsocklen_t
  8550. _, _, _, _ = new_sockname, sockname, socknamelen, v1
  8551. socknamelen = libc.Uint32FromInt64(16) + libc.Uint32FromInt32(m_INITIAL_SOCKNAME_SLACK)
  8552. *(*Tsocklen_t)(unsafe.Pointer(bp)) = socknamelen
  8553. sockname = libc.Xmalloc(tls, socknamelen)
  8554. if sockname == libc.UintptrFromInt32(0) {
  8555. return libc.UintptrFromInt32(0)
  8556. }
  8557. /* Both getpeername() and getsockname() truncates sockname if
  8558. there is not enough space and set the required length in
  8559. actual_socknamelen */
  8560. if (*(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{socket_func})))(tls, fd, sockname, bp) == -int32(1) {
  8561. goto sock_or_realloc_error
  8562. }
  8563. if *(*Tsocklen_t)(unsafe.Pointer(bp)) > socknamelen {
  8564. new_sockname = libc.UintptrFromInt32(0)
  8565. socknamelen = *(*Tsocklen_t)(unsafe.Pointer(bp))
  8566. v1 = libc.Xrealloc(tls, sockname, *(*Tsocklen_t)(unsafe.Pointer(bp)))
  8567. new_sockname = v1
  8568. if v1 == libc.UintptrFromInt32(0) {
  8569. goto sock_or_realloc_error
  8570. }
  8571. sockname = new_sockname
  8572. 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 {
  8573. goto sock_or_realloc_error
  8574. }
  8575. }
  8576. return sockname
  8577. goto sock_or_realloc_error
  8578. sock_or_realloc_error:
  8579. ;
  8580. libc.Xfree(tls, sockname)
  8581. return libc.UintptrFromInt32(0)
  8582. }
  8583. func X_xcb_get_auth_info(tls *libc.TLS, fd int32, info uintptr, display int32) (r int32) {
  8584. var authptr, sockname, v1, v2, v3 uintptr
  8585. var gotsockname, ret int32
  8586. _, _, _, _, _, _, _ = authptr, gotsockname, ret, sockname, v1, v2, v3
  8587. /* code adapted from Xlib/ConnDis.c, xtrans/Xtranssocket.c,
  8588. xtrans/Xtransutils.c */
  8589. sockname = libc.UintptrFromInt32(0)
  8590. gotsockname = 0
  8591. authptr = uintptr(0)
  8592. ret = int32(1)
  8593. /* Some systems like hpux or Hurd do not expose peer names
  8594. * for UNIX Domain Sockets, but this is irrelevant,
  8595. * since compute_auth() ignores the peer name in this
  8596. * case anyway.*/
  8597. v1 = _get_peer_sock_name(tls, __ccgo_fp(libc.Xgetpeername), fd)
  8598. sockname = v1
  8599. if v1 == libc.UintptrFromInt32(0) {
  8600. v2 = _get_peer_sock_name(tls, __ccgo_fp(libc.Xgetsockname), fd)
  8601. sockname = v2
  8602. if v2 == libc.UintptrFromInt32(0) {
  8603. return 0
  8604. } /* can only authenticate sockets */
  8605. if libc.Int32FromUint16((*Tsockaddr)(unsafe.Pointer(sockname)).Fsa_family) != int32(m_PF_LOCAL) {
  8606. libc.Xfree(tls, sockname)
  8607. return 0 /* except for AF_UNIX, sockets should have peernames */
  8608. }
  8609. gotsockname = int32(1)
  8610. }
  8611. authptr = _get_authptr(tls, sockname, display)
  8612. if authptr == uintptr(0) {
  8613. libc.Xfree(tls, sockname)
  8614. return 0 /* cannot find good auth data */
  8615. }
  8616. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fnamelen = libc.Int32FromUint32(_memdup(tls, info+4, (*TXauth)(unsafe.Pointer(authptr)).Fname, uint32((*TXauth)(unsafe.Pointer(authptr)).Fname_length)))
  8617. if !((*Txcb_auth_info_t)(unsafe.Pointer(info)).Fnamelen != 0) {
  8618. goto no_auth
  8619. } /* out of memory */
  8620. if !(gotsockname != 0) {
  8621. libc.Xfree(tls, sockname)
  8622. v3 = _get_peer_sock_name(tls, __ccgo_fp(libc.Xgetsockname), fd)
  8623. sockname = v3
  8624. if v3 == libc.UintptrFromInt32(0) {
  8625. libc.Xfree(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fname)
  8626. goto no_auth /* can only authenticate sockets */
  8627. }
  8628. }
  8629. ret = _compute_auth(tls, info, authptr, sockname)
  8630. if !(ret != 0) {
  8631. libc.Xfree(tls, (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fname)
  8632. goto no_auth /* cannot build auth record */
  8633. }
  8634. libc.Xfree(tls, sockname)
  8635. sockname = libc.UintptrFromInt32(0)
  8636. libxau.XXauDisposeAuth(tls, authptr)
  8637. return ret
  8638. goto no_auth
  8639. no_auth:
  8640. ;
  8641. libc.Xfree(tls, sockname)
  8642. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fname = uintptr(0)
  8643. (*Txcb_auth_info_t)(unsafe.Pointer(info)).Fnamelen = 0
  8644. libxau.XXauDisposeAuth(tls, authptr)
  8645. return 0
  8646. }
  8647. /*
  8648. * This file generated automatically from xproto.xml by c_client.py.
  8649. * Edit at your peril.
  8650. */
  8651. /**
  8652. * @defgroup XCB__API XCB API
  8653. * @brief XCB Protocol Implementation.
  8654. * @{
  8655. **/
  8656. /**
  8657. * @}
  8658. */
  8659. func Xxcb_char2b_next(tls *libc.TLS, i uintptr) {
  8660. var p1 uintptr
  8661. _ = p1
  8662. (*Txcb_char2b_iterator_t)(unsafe.Pointer(i)).Frem--
  8663. (*Txcb_char2b_iterator_t)(unsafe.Pointer(i)).Fdata += 2
  8664. p1 = i + 8
  8665. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(2))
  8666. }
  8667. func Xxcb_char2b_end(tls *libc.TLS, i Txcb_char2b_iterator_t) (r Txcb_generic_iterator_t) {
  8668. var ret Txcb_generic_iterator_t
  8669. _ = ret
  8670. ret.Fdata = i.Fdata + uintptr(i.Frem)*2
  8671. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8672. ret.Frem = 0
  8673. return ret
  8674. }
  8675. func Xxcb_window_next(tls *libc.TLS, i uintptr) {
  8676. var p1 uintptr
  8677. _ = p1
  8678. (*Txcb_window_iterator_t)(unsafe.Pointer(i)).Frem--
  8679. (*Txcb_window_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8680. p1 = i + 8
  8681. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8682. }
  8683. func Xxcb_window_end(tls *libc.TLS, i Txcb_window_iterator_t) (r Txcb_generic_iterator_t) {
  8684. var ret Txcb_generic_iterator_t
  8685. _ = ret
  8686. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8687. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8688. ret.Frem = 0
  8689. return ret
  8690. }
  8691. func Xxcb_pixmap_next(tls *libc.TLS, i uintptr) {
  8692. var p1 uintptr
  8693. _ = p1
  8694. (*Txcb_pixmap_iterator_t)(unsafe.Pointer(i)).Frem--
  8695. (*Txcb_pixmap_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8696. p1 = i + 8
  8697. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8698. }
  8699. func Xxcb_pixmap_end(tls *libc.TLS, i Txcb_pixmap_iterator_t) (r Txcb_generic_iterator_t) {
  8700. var ret Txcb_generic_iterator_t
  8701. _ = ret
  8702. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8703. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8704. ret.Frem = 0
  8705. return ret
  8706. }
  8707. func Xxcb_cursor_next(tls *libc.TLS, i uintptr) {
  8708. var p1 uintptr
  8709. _ = p1
  8710. (*Txcb_cursor_iterator_t)(unsafe.Pointer(i)).Frem--
  8711. (*Txcb_cursor_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8712. p1 = i + 8
  8713. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8714. }
  8715. func Xxcb_cursor_end(tls *libc.TLS, i Txcb_cursor_iterator_t) (r Txcb_generic_iterator_t) {
  8716. var ret Txcb_generic_iterator_t
  8717. _ = ret
  8718. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8719. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8720. ret.Frem = 0
  8721. return ret
  8722. }
  8723. func Xxcb_font_next(tls *libc.TLS, i uintptr) {
  8724. var p1 uintptr
  8725. _ = p1
  8726. (*Txcb_font_iterator_t)(unsafe.Pointer(i)).Frem--
  8727. (*Txcb_font_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8728. p1 = i + 8
  8729. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8730. }
  8731. func Xxcb_font_end(tls *libc.TLS, i Txcb_font_iterator_t) (r Txcb_generic_iterator_t) {
  8732. var ret Txcb_generic_iterator_t
  8733. _ = ret
  8734. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8735. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8736. ret.Frem = 0
  8737. return ret
  8738. }
  8739. func Xxcb_gcontext_next(tls *libc.TLS, i uintptr) {
  8740. var p1 uintptr
  8741. _ = p1
  8742. (*Txcb_gcontext_iterator_t)(unsafe.Pointer(i)).Frem--
  8743. (*Txcb_gcontext_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8744. p1 = i + 8
  8745. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8746. }
  8747. func Xxcb_gcontext_end(tls *libc.TLS, i Txcb_gcontext_iterator_t) (r Txcb_generic_iterator_t) {
  8748. var ret Txcb_generic_iterator_t
  8749. _ = ret
  8750. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8751. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8752. ret.Frem = 0
  8753. return ret
  8754. }
  8755. func Xxcb_colormap_next(tls *libc.TLS, i uintptr) {
  8756. var p1 uintptr
  8757. _ = p1
  8758. (*Txcb_colormap_iterator_t)(unsafe.Pointer(i)).Frem--
  8759. (*Txcb_colormap_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8760. p1 = i + 8
  8761. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8762. }
  8763. func Xxcb_colormap_end(tls *libc.TLS, i Txcb_colormap_iterator_t) (r Txcb_generic_iterator_t) {
  8764. var ret Txcb_generic_iterator_t
  8765. _ = ret
  8766. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8767. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8768. ret.Frem = 0
  8769. return ret
  8770. }
  8771. func Xxcb_atom_next(tls *libc.TLS, i uintptr) {
  8772. var p1 uintptr
  8773. _ = p1
  8774. (*Txcb_atom_iterator_t)(unsafe.Pointer(i)).Frem--
  8775. (*Txcb_atom_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8776. p1 = i + 8
  8777. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8778. }
  8779. func Xxcb_atom_end(tls *libc.TLS, i Txcb_atom_iterator_t) (r Txcb_generic_iterator_t) {
  8780. var ret Txcb_generic_iterator_t
  8781. _ = ret
  8782. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8783. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8784. ret.Frem = 0
  8785. return ret
  8786. }
  8787. func Xxcb_drawable_next(tls *libc.TLS, i uintptr) {
  8788. var p1 uintptr
  8789. _ = p1
  8790. (*Txcb_drawable_iterator_t)(unsafe.Pointer(i)).Frem--
  8791. (*Txcb_drawable_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8792. p1 = i + 8
  8793. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8794. }
  8795. func Xxcb_drawable_end(tls *libc.TLS, i Txcb_drawable_iterator_t) (r Txcb_generic_iterator_t) {
  8796. var ret Txcb_generic_iterator_t
  8797. _ = ret
  8798. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8799. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8800. ret.Frem = 0
  8801. return ret
  8802. }
  8803. func Xxcb_fontable_next(tls *libc.TLS, i uintptr) {
  8804. var p1 uintptr
  8805. _ = p1
  8806. (*Txcb_fontable_iterator_t)(unsafe.Pointer(i)).Frem--
  8807. (*Txcb_fontable_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8808. p1 = i + 8
  8809. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8810. }
  8811. func Xxcb_fontable_end(tls *libc.TLS, i Txcb_fontable_iterator_t) (r Txcb_generic_iterator_t) {
  8812. var ret Txcb_generic_iterator_t
  8813. _ = ret
  8814. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8815. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8816. ret.Frem = 0
  8817. return ret
  8818. }
  8819. func Xxcb_bool32_next(tls *libc.TLS, i uintptr) {
  8820. var p1 uintptr
  8821. _ = p1
  8822. (*Txcb_bool32_iterator_t)(unsafe.Pointer(i)).Frem--
  8823. (*Txcb_bool32_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8824. p1 = i + 8
  8825. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8826. }
  8827. func Xxcb_bool32_end(tls *libc.TLS, i Txcb_bool32_iterator_t) (r Txcb_generic_iterator_t) {
  8828. var ret Txcb_generic_iterator_t
  8829. _ = ret
  8830. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8831. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8832. ret.Frem = 0
  8833. return ret
  8834. }
  8835. func Xxcb_visualid_next(tls *libc.TLS, i uintptr) {
  8836. var p1 uintptr
  8837. _ = p1
  8838. (*Txcb_visualid_iterator_t)(unsafe.Pointer(i)).Frem--
  8839. (*Txcb_visualid_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8840. p1 = i + 8
  8841. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8842. }
  8843. func Xxcb_visualid_end(tls *libc.TLS, i Txcb_visualid_iterator_t) (r Txcb_generic_iterator_t) {
  8844. var ret Txcb_generic_iterator_t
  8845. _ = ret
  8846. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8847. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8848. ret.Frem = 0
  8849. return ret
  8850. }
  8851. func Xxcb_timestamp_next(tls *libc.TLS, i uintptr) {
  8852. var p1 uintptr
  8853. _ = p1
  8854. (*Txcb_timestamp_iterator_t)(unsafe.Pointer(i)).Frem--
  8855. (*Txcb_timestamp_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8856. p1 = i + 8
  8857. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8858. }
  8859. func Xxcb_timestamp_end(tls *libc.TLS, i Txcb_timestamp_iterator_t) (r Txcb_generic_iterator_t) {
  8860. var ret Txcb_generic_iterator_t
  8861. _ = ret
  8862. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8863. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8864. ret.Frem = 0
  8865. return ret
  8866. }
  8867. func Xxcb_keysym_next(tls *libc.TLS, i uintptr) {
  8868. var p1 uintptr
  8869. _ = p1
  8870. (*Txcb_keysym_iterator_t)(unsafe.Pointer(i)).Frem--
  8871. (*Txcb_keysym_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8872. p1 = i + 8
  8873. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8874. }
  8875. func Xxcb_keysym_end(tls *libc.TLS, i Txcb_keysym_iterator_t) (r Txcb_generic_iterator_t) {
  8876. var ret Txcb_generic_iterator_t
  8877. _ = ret
  8878. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8879. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8880. ret.Frem = 0
  8881. return ret
  8882. }
  8883. func Xxcb_keycode_next(tls *libc.TLS, i uintptr) {
  8884. var p1 uintptr
  8885. _ = p1
  8886. (*Txcb_keycode_iterator_t)(unsafe.Pointer(i)).Frem--
  8887. (*Txcb_keycode_iterator_t)(unsafe.Pointer(i)).Fdata++
  8888. p1 = i + 8
  8889. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(1))
  8890. }
  8891. func Xxcb_keycode_end(tls *libc.TLS, i Txcb_keycode_iterator_t) (r Txcb_generic_iterator_t) {
  8892. var ret Txcb_generic_iterator_t
  8893. _ = ret
  8894. ret.Fdata = i.Fdata + uintptr(i.Frem)
  8895. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8896. ret.Frem = 0
  8897. return ret
  8898. }
  8899. func Xxcb_keycode32_next(tls *libc.TLS, i uintptr) {
  8900. var p1 uintptr
  8901. _ = p1
  8902. (*Txcb_keycode32_iterator_t)(unsafe.Pointer(i)).Frem--
  8903. (*Txcb_keycode32_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8904. p1 = i + 8
  8905. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8906. }
  8907. func Xxcb_keycode32_end(tls *libc.TLS, i Txcb_keycode32_iterator_t) (r Txcb_generic_iterator_t) {
  8908. var ret Txcb_generic_iterator_t
  8909. _ = ret
  8910. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8911. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8912. ret.Frem = 0
  8913. return ret
  8914. }
  8915. func Xxcb_button_next(tls *libc.TLS, i uintptr) {
  8916. var p1 uintptr
  8917. _ = p1
  8918. (*Txcb_button_iterator_t)(unsafe.Pointer(i)).Frem--
  8919. (*Txcb_button_iterator_t)(unsafe.Pointer(i)).Fdata++
  8920. p1 = i + 8
  8921. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(1))
  8922. }
  8923. func Xxcb_button_end(tls *libc.TLS, i Txcb_button_iterator_t) (r Txcb_generic_iterator_t) {
  8924. var ret Txcb_generic_iterator_t
  8925. _ = ret
  8926. ret.Fdata = i.Fdata + uintptr(i.Frem)
  8927. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8928. ret.Frem = 0
  8929. return ret
  8930. }
  8931. func Xxcb_point_next(tls *libc.TLS, i uintptr) {
  8932. var p1 uintptr
  8933. _ = p1
  8934. (*Txcb_point_iterator_t)(unsafe.Pointer(i)).Frem--
  8935. (*Txcb_point_iterator_t)(unsafe.Pointer(i)).Fdata += 4
  8936. p1 = i + 8
  8937. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(4))
  8938. }
  8939. func Xxcb_point_end(tls *libc.TLS, i Txcb_point_iterator_t) (r Txcb_generic_iterator_t) {
  8940. var ret Txcb_generic_iterator_t
  8941. _ = ret
  8942. ret.Fdata = i.Fdata + uintptr(i.Frem)*4
  8943. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8944. ret.Frem = 0
  8945. return ret
  8946. }
  8947. func Xxcb_rectangle_next(tls *libc.TLS, i uintptr) {
  8948. var p1 uintptr
  8949. _ = p1
  8950. (*Txcb_rectangle_iterator_t)(unsafe.Pointer(i)).Frem--
  8951. (*Txcb_rectangle_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  8952. p1 = i + 8
  8953. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(8))
  8954. }
  8955. func Xxcb_rectangle_end(tls *libc.TLS, i Txcb_rectangle_iterator_t) (r Txcb_generic_iterator_t) {
  8956. var ret Txcb_generic_iterator_t
  8957. _ = ret
  8958. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  8959. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8960. ret.Frem = 0
  8961. return ret
  8962. }
  8963. func Xxcb_arc_next(tls *libc.TLS, i uintptr) {
  8964. var p1 uintptr
  8965. _ = p1
  8966. (*Txcb_arc_iterator_t)(unsafe.Pointer(i)).Frem--
  8967. (*Txcb_arc_iterator_t)(unsafe.Pointer(i)).Fdata += 12
  8968. p1 = i + 8
  8969. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(12))
  8970. }
  8971. func Xxcb_arc_end(tls *libc.TLS, i Txcb_arc_iterator_t) (r Txcb_generic_iterator_t) {
  8972. var ret Txcb_generic_iterator_t
  8973. _ = ret
  8974. ret.Fdata = i.Fdata + uintptr(i.Frem)*12
  8975. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8976. ret.Frem = 0
  8977. return ret
  8978. }
  8979. func Xxcb_format_next(tls *libc.TLS, i uintptr) {
  8980. var p1 uintptr
  8981. _ = p1
  8982. (*Txcb_format_iterator_t)(unsafe.Pointer(i)).Frem--
  8983. (*Txcb_format_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  8984. p1 = i + 8
  8985. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(8))
  8986. }
  8987. func Xxcb_format_end(tls *libc.TLS, i Txcb_format_iterator_t) (r Txcb_generic_iterator_t) {
  8988. var ret Txcb_generic_iterator_t
  8989. _ = ret
  8990. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  8991. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  8992. ret.Frem = 0
  8993. return ret
  8994. }
  8995. func Xxcb_visualtype_next(tls *libc.TLS, i uintptr) {
  8996. var p1 uintptr
  8997. _ = p1
  8998. (*Txcb_visualtype_iterator_t)(unsafe.Pointer(i)).Frem--
  8999. (*Txcb_visualtype_iterator_t)(unsafe.Pointer(i)).Fdata += 24
  9000. p1 = i + 8
  9001. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(24))
  9002. }
  9003. func Xxcb_visualtype_end(tls *libc.TLS, i Txcb_visualtype_iterator_t) (r Txcb_generic_iterator_t) {
  9004. var ret Txcb_generic_iterator_t
  9005. _ = ret
  9006. ret.Fdata = i.Fdata + uintptr(i.Frem)*24
  9007. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  9008. ret.Frem = 0
  9009. return ret
  9010. }
  9011. func Xxcb_depth_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  9012. var _aux, xcb_tmp uintptr
  9013. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  9014. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  9015. xcb_tmp = _buffer
  9016. _aux = _buffer
  9017. xcb_buffer_len = uint32(0)
  9018. xcb_block_len = uint32(0)
  9019. xcb_pad = uint32(0)
  9020. xcb_align_to = uint32(0)
  9021. xcb_block_len += uint32(8)
  9022. xcb_tmp += uintptr(xcb_block_len)
  9023. xcb_buffer_len += xcb_block_len
  9024. xcb_block_len = uint32(0)
  9025. /* visuals */
  9026. xcb_block_len += uint32((*Txcb_depth_t)(unsafe.Pointer(_aux)).Fvisuals_len) * uint32(24)
  9027. xcb_tmp += uintptr(xcb_block_len)
  9028. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9029. /* insert padding */
  9030. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9031. xcb_buffer_len += xcb_block_len + xcb_pad
  9032. if uint32(0) != xcb_pad {
  9033. xcb_tmp += uintptr(xcb_pad)
  9034. xcb_pad = uint32(0)
  9035. }
  9036. xcb_block_len = uint32(0)
  9037. return libc.Int32FromUint32(xcb_buffer_len)
  9038. }
  9039. func Xxcb_depth_visuals(tls *libc.TLS, R uintptr) (r uintptr) {
  9040. return R + libc.UintptrFromInt32(1)*8
  9041. }
  9042. func Xxcb_depth_visuals_length(tls *libc.TLS, R uintptr) (r int32) {
  9043. return libc.Int32FromUint16((*Txcb_depth_t)(unsafe.Pointer(R)).Fvisuals_len)
  9044. }
  9045. func Xxcb_depth_visuals_iterator(tls *libc.TLS, R uintptr) (r Txcb_visualtype_iterator_t) {
  9046. var i Txcb_visualtype_iterator_t
  9047. _ = i
  9048. i.Fdata = R + libc.UintptrFromInt32(1)*8
  9049. i.Frem = libc.Int32FromUint16((*Txcb_depth_t)(unsafe.Pointer(R)).Fvisuals_len)
  9050. i.Findex = int32(i.Fdata) - int32(R)
  9051. return i
  9052. }
  9053. func Xxcb_depth_next(tls *libc.TLS, i uintptr) {
  9054. var R uintptr
  9055. var child Txcb_generic_iterator_t
  9056. _, _ = R, child
  9057. R = (*Txcb_depth_iterator_t)(unsafe.Pointer(i)).Fdata
  9058. child.Fdata = R + uintptr(Xxcb_depth_sizeof(tls, R))
  9059. (*Txcb_depth_iterator_t)(unsafe.Pointer(i)).Findex = int32(child.Fdata) - int32((*Txcb_depth_iterator_t)(unsafe.Pointer(i)).Fdata)
  9060. (*Txcb_depth_iterator_t)(unsafe.Pointer(i)).Frem--
  9061. (*Txcb_depth_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  9062. }
  9063. func Xxcb_depth_end(tls *libc.TLS, _i Txcb_depth_iterator_t) (r Txcb_generic_iterator_t) {
  9064. bp := tls.Alloc(16)
  9065. defer tls.Free(16)
  9066. *(*Txcb_depth_iterator_t)(unsafe.Pointer(bp)) = _i
  9067. var ret Txcb_generic_iterator_t
  9068. _ = ret
  9069. for (*(*Txcb_depth_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  9070. Xxcb_depth_next(tls, bp)
  9071. }
  9072. ret.Fdata = (*(*Txcb_depth_iterator_t)(unsafe.Pointer(bp))).Fdata
  9073. ret.Frem = (*(*Txcb_depth_iterator_t)(unsafe.Pointer(bp))).Frem
  9074. ret.Findex = (*(*Txcb_depth_iterator_t)(unsafe.Pointer(bp))).Findex
  9075. return ret
  9076. }
  9077. func Xxcb_screen_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  9078. var _aux, xcb_tmp uintptr
  9079. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  9080. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  9081. xcb_tmp = _buffer
  9082. _aux = _buffer
  9083. xcb_buffer_len = uint32(0)
  9084. xcb_block_len = uint32(0)
  9085. xcb_pad = uint32(0)
  9086. xcb_align_to = uint32(0)
  9087. xcb_block_len += uint32(40)
  9088. xcb_tmp += uintptr(xcb_block_len)
  9089. xcb_buffer_len += xcb_block_len
  9090. xcb_block_len = uint32(0)
  9091. /* allowed_depths */
  9092. i = uint32(0)
  9093. for {
  9094. if !(i < uint32((*Txcb_screen_t)(unsafe.Pointer(_aux)).Fallowed_depths_len)) {
  9095. break
  9096. }
  9097. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_depth_sizeof(tls, xcb_tmp))
  9098. xcb_block_len += xcb_tmp_len
  9099. xcb_tmp += uintptr(xcb_tmp_len)
  9100. goto _1
  9101. _1:
  9102. ;
  9103. i++
  9104. }
  9105. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  9106. /* insert padding */
  9107. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9108. xcb_buffer_len += xcb_block_len + xcb_pad
  9109. if uint32(0) != xcb_pad {
  9110. xcb_tmp += uintptr(xcb_pad)
  9111. xcb_pad = uint32(0)
  9112. }
  9113. xcb_block_len = uint32(0)
  9114. return libc.Int32FromUint32(xcb_buffer_len)
  9115. }
  9116. func Xxcb_screen_allowed_depths_length(tls *libc.TLS, R uintptr) (r int32) {
  9117. return libc.Int32FromUint8((*Txcb_screen_t)(unsafe.Pointer(R)).Fallowed_depths_len)
  9118. }
  9119. func Xxcb_screen_allowed_depths_iterator(tls *libc.TLS, R uintptr) (r Txcb_depth_iterator_t) {
  9120. var i Txcb_depth_iterator_t
  9121. _ = i
  9122. i.Fdata = R + libc.UintptrFromInt32(1)*40
  9123. i.Frem = libc.Int32FromUint8((*Txcb_screen_t)(unsafe.Pointer(R)).Fallowed_depths_len)
  9124. i.Findex = int32(i.Fdata) - int32(R)
  9125. return i
  9126. }
  9127. func Xxcb_screen_next(tls *libc.TLS, i uintptr) {
  9128. var R uintptr
  9129. var child Txcb_generic_iterator_t
  9130. _, _ = R, child
  9131. R = (*Txcb_screen_iterator_t)(unsafe.Pointer(i)).Fdata
  9132. child.Fdata = R + uintptr(Xxcb_screen_sizeof(tls, R))
  9133. (*Txcb_screen_iterator_t)(unsafe.Pointer(i)).Findex = int32(child.Fdata) - int32((*Txcb_screen_iterator_t)(unsafe.Pointer(i)).Fdata)
  9134. (*Txcb_screen_iterator_t)(unsafe.Pointer(i)).Frem--
  9135. (*Txcb_screen_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  9136. }
  9137. func Xxcb_screen_end(tls *libc.TLS, _i Txcb_screen_iterator_t) (r Txcb_generic_iterator_t) {
  9138. bp := tls.Alloc(16)
  9139. defer tls.Free(16)
  9140. *(*Txcb_screen_iterator_t)(unsafe.Pointer(bp)) = _i
  9141. var ret Txcb_generic_iterator_t
  9142. _ = ret
  9143. for (*(*Txcb_screen_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  9144. Xxcb_screen_next(tls, bp)
  9145. }
  9146. ret.Fdata = (*(*Txcb_screen_iterator_t)(unsafe.Pointer(bp))).Fdata
  9147. ret.Frem = (*(*Txcb_screen_iterator_t)(unsafe.Pointer(bp))).Frem
  9148. ret.Findex = (*(*Txcb_screen_iterator_t)(unsafe.Pointer(bp))).Findex
  9149. return ret
  9150. }
  9151. func Xxcb_setup_request_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  9152. var _aux, xcb_tmp uintptr
  9153. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  9154. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  9155. xcb_tmp = _buffer
  9156. _aux = _buffer
  9157. xcb_buffer_len = uint32(0)
  9158. xcb_block_len = uint32(0)
  9159. xcb_pad = uint32(0)
  9160. xcb_align_to = uint32(0)
  9161. xcb_block_len += uint32(12)
  9162. xcb_tmp += uintptr(xcb_block_len)
  9163. xcb_buffer_len += xcb_block_len
  9164. xcb_block_len = uint32(0)
  9165. /* authorization_protocol_name */
  9166. xcb_block_len += uint32((*Txcb_setup_request_t)(unsafe.Pointer(_aux)).Fauthorization_protocol_name_len) * uint32(1)
  9167. xcb_tmp += uintptr(xcb_block_len)
  9168. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  9169. xcb_align_to = uint32(4)
  9170. /* insert padding */
  9171. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9172. xcb_buffer_len += xcb_block_len + xcb_pad
  9173. if uint32(0) != xcb_pad {
  9174. xcb_tmp += uintptr(xcb_pad)
  9175. xcb_pad = uint32(0)
  9176. }
  9177. xcb_block_len = uint32(0)
  9178. /* insert padding */
  9179. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9180. xcb_buffer_len += xcb_block_len + xcb_pad
  9181. if uint32(0) != xcb_pad {
  9182. xcb_tmp += uintptr(xcb_pad)
  9183. xcb_pad = uint32(0)
  9184. }
  9185. xcb_block_len = uint32(0)
  9186. /* authorization_protocol_data */
  9187. xcb_block_len += uint32((*Txcb_setup_request_t)(unsafe.Pointer(_aux)).Fauthorization_protocol_data_len) * uint32(1)
  9188. xcb_tmp += uintptr(xcb_block_len)
  9189. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  9190. xcb_align_to = uint32(4)
  9191. /* insert padding */
  9192. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9193. xcb_buffer_len += xcb_block_len + xcb_pad
  9194. if uint32(0) != xcb_pad {
  9195. xcb_tmp += uintptr(xcb_pad)
  9196. xcb_pad = uint32(0)
  9197. }
  9198. xcb_block_len = uint32(0)
  9199. /* insert padding */
  9200. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9201. xcb_buffer_len += xcb_block_len + xcb_pad
  9202. if uint32(0) != xcb_pad {
  9203. xcb_tmp += uintptr(xcb_pad)
  9204. xcb_pad = uint32(0)
  9205. }
  9206. xcb_block_len = uint32(0)
  9207. return libc.Int32FromUint32(xcb_buffer_len)
  9208. }
  9209. func Xxcb_setup_request_authorization_protocol_name(tls *libc.TLS, R uintptr) (r uintptr) {
  9210. return R + libc.UintptrFromInt32(1)*12
  9211. }
  9212. func Xxcb_setup_request_authorization_protocol_name_length(tls *libc.TLS, R uintptr) (r int32) {
  9213. return libc.Int32FromUint16((*Txcb_setup_request_t)(unsafe.Pointer(R)).Fauthorization_protocol_name_len)
  9214. }
  9215. func Xxcb_setup_request_authorization_protocol_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  9216. var i Txcb_generic_iterator_t
  9217. _ = i
  9218. i.Fdata = R + libc.UintptrFromInt32(1)*12 + uintptr((*Txcb_setup_request_t)(unsafe.Pointer(R)).Fauthorization_protocol_name_len)
  9219. i.Frem = 0
  9220. i.Findex = int32(i.Fdata) - int32(R)
  9221. return i
  9222. }
  9223. func Xxcb_setup_request_authorization_protocol_data(tls *libc.TLS, R uintptr) (r uintptr) {
  9224. var prev Txcb_generic_iterator_t
  9225. _ = prev
  9226. prev = Xxcb_setup_request_authorization_protocol_name_end(tls, R)
  9227. return prev.Fdata + uintptr(-prev.Findex&(libc.Int32FromInt32(4)-libc.Int32FromInt32(1))) + libc.UintptrFromInt32(0)
  9228. }
  9229. func Xxcb_setup_request_authorization_protocol_data_length(tls *libc.TLS, R uintptr) (r int32) {
  9230. return libc.Int32FromUint16((*Txcb_setup_request_t)(unsafe.Pointer(R)).Fauthorization_protocol_data_len)
  9231. }
  9232. func Xxcb_setup_request_authorization_protocol_data_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  9233. var i, prev Txcb_generic_iterator_t
  9234. _, _ = i, prev
  9235. prev = Xxcb_setup_request_authorization_protocol_name_end(tls, R)
  9236. 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)
  9237. i.Frem = 0
  9238. i.Findex = int32(i.Fdata) - int32(R)
  9239. return i
  9240. }
  9241. func Xxcb_setup_request_next(tls *libc.TLS, i uintptr) {
  9242. var R uintptr
  9243. var child Txcb_generic_iterator_t
  9244. _, _ = R, child
  9245. R = (*Txcb_setup_request_iterator_t)(unsafe.Pointer(i)).Fdata
  9246. child.Fdata = R + uintptr(Xxcb_setup_request_sizeof(tls, R))
  9247. (*Txcb_setup_request_iterator_t)(unsafe.Pointer(i)).Findex = int32(child.Fdata) - int32((*Txcb_setup_request_iterator_t)(unsafe.Pointer(i)).Fdata)
  9248. (*Txcb_setup_request_iterator_t)(unsafe.Pointer(i)).Frem--
  9249. (*Txcb_setup_request_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  9250. }
  9251. func Xxcb_setup_request_end(tls *libc.TLS, _i Txcb_setup_request_iterator_t) (r Txcb_generic_iterator_t) {
  9252. bp := tls.Alloc(16)
  9253. defer tls.Free(16)
  9254. *(*Txcb_setup_request_iterator_t)(unsafe.Pointer(bp)) = _i
  9255. var ret Txcb_generic_iterator_t
  9256. _ = ret
  9257. for (*(*Txcb_setup_request_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  9258. Xxcb_setup_request_next(tls, bp)
  9259. }
  9260. ret.Fdata = (*(*Txcb_setup_request_iterator_t)(unsafe.Pointer(bp))).Fdata
  9261. ret.Frem = (*(*Txcb_setup_request_iterator_t)(unsafe.Pointer(bp))).Frem
  9262. ret.Findex = (*(*Txcb_setup_request_iterator_t)(unsafe.Pointer(bp))).Findex
  9263. return ret
  9264. }
  9265. func Xxcb_setup_failed_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  9266. var _aux, xcb_tmp uintptr
  9267. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  9268. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  9269. xcb_tmp = _buffer
  9270. _aux = _buffer
  9271. xcb_buffer_len = uint32(0)
  9272. xcb_block_len = uint32(0)
  9273. xcb_pad = uint32(0)
  9274. xcb_align_to = uint32(0)
  9275. xcb_block_len += uint32(8)
  9276. xcb_tmp += uintptr(xcb_block_len)
  9277. xcb_buffer_len += xcb_block_len
  9278. xcb_block_len = uint32(0)
  9279. /* reason */
  9280. xcb_block_len += uint32((*Txcb_setup_failed_t)(unsafe.Pointer(_aux)).Freason_len) * uint32(1)
  9281. xcb_tmp += uintptr(xcb_block_len)
  9282. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  9283. /* insert padding */
  9284. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9285. xcb_buffer_len += xcb_block_len + xcb_pad
  9286. if uint32(0) != xcb_pad {
  9287. xcb_tmp += uintptr(xcb_pad)
  9288. xcb_pad = uint32(0)
  9289. }
  9290. xcb_block_len = uint32(0)
  9291. return libc.Int32FromUint32(xcb_buffer_len)
  9292. }
  9293. func Xxcb_setup_failed_reason(tls *libc.TLS, R uintptr) (r uintptr) {
  9294. return R + libc.UintptrFromInt32(1)*8
  9295. }
  9296. func Xxcb_setup_failed_reason_length(tls *libc.TLS, R uintptr) (r int32) {
  9297. return libc.Int32FromUint8((*Txcb_setup_failed_t)(unsafe.Pointer(R)).Freason_len)
  9298. }
  9299. func Xxcb_setup_failed_reason_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  9300. var i Txcb_generic_iterator_t
  9301. _ = i
  9302. i.Fdata = R + libc.UintptrFromInt32(1)*8 + uintptr((*Txcb_setup_failed_t)(unsafe.Pointer(R)).Freason_len)
  9303. i.Frem = 0
  9304. i.Findex = int32(i.Fdata) - int32(R)
  9305. return i
  9306. }
  9307. func Xxcb_setup_failed_next(tls *libc.TLS, i uintptr) {
  9308. var R uintptr
  9309. var child Txcb_generic_iterator_t
  9310. _, _ = R, child
  9311. R = (*Txcb_setup_failed_iterator_t)(unsafe.Pointer(i)).Fdata
  9312. child.Fdata = R + uintptr(Xxcb_setup_failed_sizeof(tls, R))
  9313. (*Txcb_setup_failed_iterator_t)(unsafe.Pointer(i)).Findex = int32(child.Fdata) - int32((*Txcb_setup_failed_iterator_t)(unsafe.Pointer(i)).Fdata)
  9314. (*Txcb_setup_failed_iterator_t)(unsafe.Pointer(i)).Frem--
  9315. (*Txcb_setup_failed_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  9316. }
  9317. func Xxcb_setup_failed_end(tls *libc.TLS, _i Txcb_setup_failed_iterator_t) (r Txcb_generic_iterator_t) {
  9318. bp := tls.Alloc(16)
  9319. defer tls.Free(16)
  9320. *(*Txcb_setup_failed_iterator_t)(unsafe.Pointer(bp)) = _i
  9321. var ret Txcb_generic_iterator_t
  9322. _ = ret
  9323. for (*(*Txcb_setup_failed_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  9324. Xxcb_setup_failed_next(tls, bp)
  9325. }
  9326. ret.Fdata = (*(*Txcb_setup_failed_iterator_t)(unsafe.Pointer(bp))).Fdata
  9327. ret.Frem = (*(*Txcb_setup_failed_iterator_t)(unsafe.Pointer(bp))).Frem
  9328. ret.Findex = (*(*Txcb_setup_failed_iterator_t)(unsafe.Pointer(bp))).Findex
  9329. return ret
  9330. }
  9331. func Xxcb_setup_authenticate_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  9332. var _aux, xcb_tmp uintptr
  9333. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  9334. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  9335. xcb_tmp = _buffer
  9336. _aux = _buffer
  9337. xcb_buffer_len = uint32(0)
  9338. xcb_block_len = uint32(0)
  9339. xcb_pad = uint32(0)
  9340. xcb_align_to = uint32(0)
  9341. xcb_block_len += uint32(8)
  9342. xcb_tmp += uintptr(xcb_block_len)
  9343. xcb_buffer_len += xcb_block_len
  9344. xcb_block_len = uint32(0)
  9345. /* reason */
  9346. xcb_block_len += libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_setup_authenticate_t)(unsafe.Pointer(_aux)).Flength)*libc.Int32FromInt32(4)) * uint32(1)
  9347. xcb_tmp += uintptr(xcb_block_len)
  9348. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  9349. /* insert padding */
  9350. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9351. xcb_buffer_len += xcb_block_len + xcb_pad
  9352. if uint32(0) != xcb_pad {
  9353. xcb_tmp += uintptr(xcb_pad)
  9354. xcb_pad = uint32(0)
  9355. }
  9356. xcb_block_len = uint32(0)
  9357. return libc.Int32FromUint32(xcb_buffer_len)
  9358. }
  9359. func Xxcb_setup_authenticate_reason(tls *libc.TLS, R uintptr) (r uintptr) {
  9360. return R + libc.UintptrFromInt32(1)*8
  9361. }
  9362. func Xxcb_setup_authenticate_reason_length(tls *libc.TLS, R uintptr) (r int32) {
  9363. return libc.Int32FromUint16((*Txcb_setup_authenticate_t)(unsafe.Pointer(R)).Flength) * int32(4)
  9364. }
  9365. func Xxcb_setup_authenticate_reason_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  9366. var i Txcb_generic_iterator_t
  9367. _ = i
  9368. i.Fdata = R + libc.UintptrFromInt32(1)*8 + uintptr(libc.Int32FromUint16((*Txcb_setup_authenticate_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4))
  9369. i.Frem = 0
  9370. i.Findex = int32(i.Fdata) - int32(R)
  9371. return i
  9372. }
  9373. func Xxcb_setup_authenticate_next(tls *libc.TLS, i uintptr) {
  9374. var R uintptr
  9375. var child Txcb_generic_iterator_t
  9376. _, _ = R, child
  9377. R = (*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(i)).Fdata
  9378. child.Fdata = R + uintptr(Xxcb_setup_authenticate_sizeof(tls, R))
  9379. (*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(i)).Findex = int32(child.Fdata) - int32((*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(i)).Fdata)
  9380. (*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(i)).Frem--
  9381. (*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  9382. }
  9383. func Xxcb_setup_authenticate_end(tls *libc.TLS, _i Txcb_setup_authenticate_iterator_t) (r Txcb_generic_iterator_t) {
  9384. bp := tls.Alloc(16)
  9385. defer tls.Free(16)
  9386. *(*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(bp)) = _i
  9387. var ret Txcb_generic_iterator_t
  9388. _ = ret
  9389. for (*(*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  9390. Xxcb_setup_authenticate_next(tls, bp)
  9391. }
  9392. ret.Fdata = (*(*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(bp))).Fdata
  9393. ret.Frem = (*(*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(bp))).Frem
  9394. ret.Findex = (*(*Txcb_setup_authenticate_iterator_t)(unsafe.Pointer(bp))).Findex
  9395. return ret
  9396. }
  9397. func Xxcb_setup_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  9398. var _aux, xcb_tmp uintptr
  9399. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  9400. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  9401. xcb_tmp = _buffer
  9402. _aux = _buffer
  9403. xcb_buffer_len = uint32(0)
  9404. xcb_block_len = uint32(0)
  9405. xcb_pad = uint32(0)
  9406. xcb_align_to = uint32(0)
  9407. xcb_block_len += uint32(40)
  9408. xcb_tmp += uintptr(xcb_block_len)
  9409. xcb_buffer_len += xcb_block_len
  9410. xcb_block_len = uint32(0)
  9411. /* vendor */
  9412. xcb_block_len += uint32((*Txcb_setup_t)(unsafe.Pointer(_aux)).Fvendor_len) * uint32(1)
  9413. xcb_tmp += uintptr(xcb_block_len)
  9414. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  9415. xcb_align_to = uint32(4)
  9416. /* insert padding */
  9417. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9418. xcb_buffer_len += xcb_block_len + xcb_pad
  9419. if uint32(0) != xcb_pad {
  9420. xcb_tmp += uintptr(xcb_pad)
  9421. xcb_pad = uint32(0)
  9422. }
  9423. xcb_block_len = uint32(0)
  9424. /* insert padding */
  9425. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9426. xcb_buffer_len += xcb_block_len + xcb_pad
  9427. if uint32(0) != xcb_pad {
  9428. xcb_tmp += uintptr(xcb_pad)
  9429. xcb_pad = uint32(0)
  9430. }
  9431. xcb_block_len = uint32(0)
  9432. /* pixmap_formats */
  9433. xcb_block_len += uint32((*Txcb_setup_t)(unsafe.Pointer(_aux)).Fpixmap_formats_len) * uint32(8)
  9434. xcb_tmp += uintptr(xcb_block_len)
  9435. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  9436. /* insert padding */
  9437. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9438. xcb_buffer_len += xcb_block_len + xcb_pad
  9439. if uint32(0) != xcb_pad {
  9440. xcb_tmp += uintptr(xcb_pad)
  9441. xcb_pad = uint32(0)
  9442. }
  9443. xcb_block_len = uint32(0)
  9444. /* roots */
  9445. i = uint32(0)
  9446. for {
  9447. if !(i < uint32((*Txcb_setup_t)(unsafe.Pointer(_aux)).Froots_len)) {
  9448. break
  9449. }
  9450. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_screen_sizeof(tls, xcb_tmp))
  9451. xcb_block_len += xcb_tmp_len
  9452. xcb_tmp += uintptr(xcb_tmp_len)
  9453. goto _1
  9454. _1:
  9455. ;
  9456. i++
  9457. }
  9458. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9459. /* insert padding */
  9460. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9461. xcb_buffer_len += xcb_block_len + xcb_pad
  9462. if uint32(0) != xcb_pad {
  9463. xcb_tmp += uintptr(xcb_pad)
  9464. xcb_pad = uint32(0)
  9465. }
  9466. xcb_block_len = uint32(0)
  9467. return libc.Int32FromUint32(xcb_buffer_len)
  9468. }
  9469. func Xxcb_setup_vendor(tls *libc.TLS, R uintptr) (r uintptr) {
  9470. return R + libc.UintptrFromInt32(1)*40
  9471. }
  9472. func Xxcb_setup_vendor_length(tls *libc.TLS, R uintptr) (r int32) {
  9473. return libc.Int32FromUint16((*Txcb_setup_t)(unsafe.Pointer(R)).Fvendor_len)
  9474. }
  9475. func Xxcb_setup_vendor_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  9476. var i Txcb_generic_iterator_t
  9477. _ = i
  9478. i.Fdata = R + libc.UintptrFromInt32(1)*40 + uintptr((*Txcb_setup_t)(unsafe.Pointer(R)).Fvendor_len)
  9479. i.Frem = 0
  9480. i.Findex = int32(i.Fdata) - int32(R)
  9481. return i
  9482. }
  9483. func Xxcb_setup_pixmap_formats(tls *libc.TLS, R uintptr) (r uintptr) {
  9484. var prev Txcb_generic_iterator_t
  9485. _ = prev
  9486. prev = Xxcb_setup_vendor_end(tls, R)
  9487. return prev.Fdata + uintptr(-prev.Findex&(libc.Int32FromInt32(4)-libc.Int32FromInt32(1))) + libc.UintptrFromInt32(0)
  9488. }
  9489. func Xxcb_setup_pixmap_formats_length(tls *libc.TLS, R uintptr) (r int32) {
  9490. return libc.Int32FromUint8((*Txcb_setup_t)(unsafe.Pointer(R)).Fpixmap_formats_len)
  9491. }
  9492. func Xxcb_setup_pixmap_formats_iterator(tls *libc.TLS, R uintptr) (r Txcb_format_iterator_t) {
  9493. var i Txcb_format_iterator_t
  9494. var prev Txcb_generic_iterator_t
  9495. _, _ = i, prev
  9496. prev = Xxcb_setup_vendor_end(tls, R)
  9497. i.Fdata = prev.Fdata + uintptr(-prev.Findex&(libc.Int32FromInt32(4)-libc.Int32FromInt32(1)))
  9498. i.Frem = libc.Int32FromUint8((*Txcb_setup_t)(unsafe.Pointer(R)).Fpixmap_formats_len)
  9499. i.Findex = int32(i.Fdata) - int32(R)
  9500. return i
  9501. }
  9502. func Xxcb_setup_roots_length(tls *libc.TLS, R uintptr) (r int32) {
  9503. return libc.Int32FromUint8((*Txcb_setup_t)(unsafe.Pointer(R)).Froots_len)
  9504. }
  9505. func Xxcb_setup_roots_iterator(tls *libc.TLS, R uintptr) (r Txcb_screen_iterator_t) {
  9506. var i Txcb_screen_iterator_t
  9507. var prev Txcb_generic_iterator_t
  9508. _, _ = i, prev
  9509. prev = Xxcb_format_end(tls, Xxcb_setup_pixmap_formats_iterator(tls, R))
  9510. i.Fdata = prev.Fdata + uintptr(libc.Uint32FromInt32(-prev.Findex)&libc.Uint32FromInt32(3))
  9511. i.Frem = libc.Int32FromUint8((*Txcb_setup_t)(unsafe.Pointer(R)).Froots_len)
  9512. i.Findex = int32(i.Fdata) - int32(R)
  9513. return i
  9514. }
  9515. func Xxcb_setup_next(tls *libc.TLS, i uintptr) {
  9516. var R uintptr
  9517. var child Txcb_generic_iterator_t
  9518. _, _ = R, child
  9519. R = (*Txcb_setup_iterator_t)(unsafe.Pointer(i)).Fdata
  9520. child.Fdata = R + uintptr(Xxcb_setup_sizeof(tls, R))
  9521. (*Txcb_setup_iterator_t)(unsafe.Pointer(i)).Findex = int32(child.Fdata) - int32((*Txcb_setup_iterator_t)(unsafe.Pointer(i)).Fdata)
  9522. (*Txcb_setup_iterator_t)(unsafe.Pointer(i)).Frem--
  9523. (*Txcb_setup_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  9524. }
  9525. func Xxcb_setup_end(tls *libc.TLS, _i Txcb_setup_iterator_t) (r Txcb_generic_iterator_t) {
  9526. bp := tls.Alloc(16)
  9527. defer tls.Free(16)
  9528. *(*Txcb_setup_iterator_t)(unsafe.Pointer(bp)) = _i
  9529. var ret Txcb_generic_iterator_t
  9530. _ = ret
  9531. for (*(*Txcb_setup_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  9532. Xxcb_setup_next(tls, bp)
  9533. }
  9534. ret.Fdata = (*(*Txcb_setup_iterator_t)(unsafe.Pointer(bp))).Fdata
  9535. ret.Frem = (*(*Txcb_setup_iterator_t)(unsafe.Pointer(bp))).Frem
  9536. ret.Findex = (*(*Txcb_setup_iterator_t)(unsafe.Pointer(bp))).Findex
  9537. return ret
  9538. }
  9539. func Xxcb_client_message_data_next(tls *libc.TLS, i uintptr) {
  9540. var p1 uintptr
  9541. _ = p1
  9542. (*Txcb_client_message_data_iterator_t)(unsafe.Pointer(i)).Frem--
  9543. (*Txcb_client_message_data_iterator_t)(unsafe.Pointer(i)).Fdata += 20
  9544. p1 = i + 8
  9545. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(20))
  9546. }
  9547. func Xxcb_client_message_data_end(tls *libc.TLS, i Txcb_client_message_data_iterator_t) (r Txcb_generic_iterator_t) {
  9548. var ret Txcb_generic_iterator_t
  9549. _ = ret
  9550. ret.Fdata = i.Fdata + uintptr(i.Frem)*20
  9551. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  9552. ret.Frem = 0
  9553. return ret
  9554. }
  9555. func Xxcb_create_window_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  9556. bp := tls.Alloc(16)
  9557. defer tls.Free(16)
  9558. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  9559. var xcb_out, xcb_tmp uintptr
  9560. var xcb_parts [16]Tiovec
  9561. var _ /* xcb_pad0 at bp+0 */ [3]int8
  9562. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  9563. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  9564. xcb_buffer_len = uint32(0)
  9565. xcb_align_to = uint32(0)
  9566. xcb_padding_offset = uint32(0)
  9567. xcb_pad = uint32(0)
  9568. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  9569. xcb_parts_idx = uint32(0)
  9570. xcb_block_len = uint32(0)
  9571. if value_mask&uint32(_XCB_CW_BACK_PIXMAP) != 0 {
  9572. /* xcb_create_window_value_list_t.background_pixmap */
  9573. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  9574. xcb_block_len += uint32(4)
  9575. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9576. xcb_parts_idx++
  9577. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9578. }
  9579. if value_mask&uint32(_XCB_CW_BACK_PIXEL) != 0 {
  9580. /* xcb_create_window_value_list_t.background_pixel */
  9581. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  9582. xcb_block_len += uint32(4)
  9583. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9584. xcb_parts_idx++
  9585. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9586. }
  9587. if value_mask&uint32(_XCB_CW_BORDER_PIXMAP) != 0 {
  9588. /* xcb_create_window_value_list_t.border_pixmap */
  9589. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  9590. xcb_block_len += uint32(4)
  9591. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9592. xcb_parts_idx++
  9593. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9594. }
  9595. if value_mask&uint32(_XCB_CW_BORDER_PIXEL) != 0 {
  9596. /* xcb_create_window_value_list_t.border_pixel */
  9597. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  9598. xcb_block_len += uint32(4)
  9599. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9600. xcb_parts_idx++
  9601. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9602. }
  9603. if value_mask&uint32(_XCB_CW_BIT_GRAVITY) != 0 {
  9604. /* xcb_create_window_value_list_t.bit_gravity */
  9605. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  9606. xcb_block_len += uint32(4)
  9607. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9608. xcb_parts_idx++
  9609. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9610. }
  9611. if value_mask&uint32(_XCB_CW_WIN_GRAVITY) != 0 {
  9612. /* xcb_create_window_value_list_t.win_gravity */
  9613. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  9614. xcb_block_len += uint32(4)
  9615. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9616. xcb_parts_idx++
  9617. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9618. }
  9619. if value_mask&uint32(_XCB_CW_BACKING_STORE) != 0 {
  9620. /* xcb_create_window_value_list_t.backing_store */
  9621. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  9622. xcb_block_len += uint32(4)
  9623. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9624. xcb_parts_idx++
  9625. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9626. }
  9627. if value_mask&uint32(_XCB_CW_BACKING_PLANES) != 0 {
  9628. /* xcb_create_window_value_list_t.backing_planes */
  9629. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 28
  9630. xcb_block_len += uint32(4)
  9631. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9632. xcb_parts_idx++
  9633. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9634. }
  9635. if value_mask&uint32(_XCB_CW_BACKING_PIXEL) != 0 {
  9636. /* xcb_create_window_value_list_t.backing_pixel */
  9637. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 32
  9638. xcb_block_len += uint32(4)
  9639. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9640. xcb_parts_idx++
  9641. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9642. }
  9643. if value_mask&uint32(_XCB_CW_OVERRIDE_REDIRECT) != 0 {
  9644. /* xcb_create_window_value_list_t.override_redirect */
  9645. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 36
  9646. xcb_block_len += uint32(4)
  9647. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9648. xcb_parts_idx++
  9649. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9650. }
  9651. if value_mask&uint32(_XCB_CW_SAVE_UNDER) != 0 {
  9652. /* xcb_create_window_value_list_t.save_under */
  9653. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 40
  9654. xcb_block_len += uint32(4)
  9655. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9656. xcb_parts_idx++
  9657. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9658. }
  9659. if value_mask&uint32(_XCB_CW_EVENT_MASK) != 0 {
  9660. /* xcb_create_window_value_list_t.event_mask */
  9661. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 44
  9662. xcb_block_len += uint32(4)
  9663. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9664. xcb_parts_idx++
  9665. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9666. }
  9667. if value_mask&uint32(_XCB_CW_DONT_PROPAGATE) != 0 {
  9668. /* xcb_create_window_value_list_t.do_not_propogate_mask */
  9669. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 48
  9670. xcb_block_len += uint32(4)
  9671. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9672. xcb_parts_idx++
  9673. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9674. }
  9675. if value_mask&uint32(_XCB_CW_COLORMAP) != 0 {
  9676. /* xcb_create_window_value_list_t.colormap */
  9677. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 52
  9678. xcb_block_len += uint32(4)
  9679. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9680. xcb_parts_idx++
  9681. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9682. }
  9683. if value_mask&uint32(_XCB_CW_CURSOR) != 0 {
  9684. /* xcb_create_window_value_list_t.cursor */
  9685. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 56
  9686. xcb_block_len += uint32(4)
  9687. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  9688. xcb_parts_idx++
  9689. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9690. }
  9691. /* insert padding */
  9692. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  9693. xcb_buffer_len += xcb_block_len + xcb_pad
  9694. if uint32(0) != xcb_pad {
  9695. xcb_parts[xcb_parts_idx].Fiov_base = bp
  9696. xcb_parts[xcb_parts_idx].Fiov_len = xcb_pad
  9697. xcb_parts_idx++
  9698. xcb_pad = uint32(0)
  9699. }
  9700. xcb_block_len = uint32(0)
  9701. xcb_padding_offset = uint32(0)
  9702. if libc.UintptrFromInt32(0) == xcb_out {
  9703. /* allocate memory */
  9704. xcb_out = libc.Xmalloc(tls, xcb_buffer_len)
  9705. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  9706. }
  9707. xcb_tmp = xcb_out
  9708. i = uint32(0)
  9709. for {
  9710. if !(i < xcb_parts_idx) {
  9711. break
  9712. }
  9713. if uintptr(0) != xcb_parts[i].Fiov_base && uint32(0) != xcb_parts[i].Fiov_len {
  9714. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  9715. }
  9716. if uint32(0) != xcb_parts[i].Fiov_len {
  9717. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  9718. }
  9719. goto _1
  9720. _1:
  9721. ;
  9722. i++
  9723. }
  9724. return libc.Int32FromUint32(xcb_buffer_len)
  9725. }
  9726. func Xxcb_create_window_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  9727. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  9728. var xcb_tmp uintptr
  9729. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  9730. xcb_tmp = _buffer
  9731. xcb_buffer_len = uint32(0)
  9732. xcb_block_len = uint32(0)
  9733. xcb_pad = uint32(0)
  9734. xcb_align_to = uint32(0)
  9735. xcb_padding_offset = uint32(0)
  9736. if value_mask&uint32(_XCB_CW_BACK_PIXMAP) != 0 {
  9737. /* xcb_create_window_value_list_t.background_pixmap */
  9738. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbackground_pixmap = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  9739. xcb_block_len += uint32(4)
  9740. xcb_tmp += uintptr(4)
  9741. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9742. }
  9743. if value_mask&uint32(_XCB_CW_BACK_PIXEL) != 0 {
  9744. /* xcb_create_window_value_list_t.background_pixel */
  9745. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbackground_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  9746. xcb_block_len += uint32(4)
  9747. xcb_tmp += uintptr(4)
  9748. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9749. }
  9750. if value_mask&uint32(_XCB_CW_BORDER_PIXMAP) != 0 {
  9751. /* xcb_create_window_value_list_t.border_pixmap */
  9752. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fborder_pixmap = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  9753. xcb_block_len += uint32(4)
  9754. xcb_tmp += uintptr(4)
  9755. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9756. }
  9757. if value_mask&uint32(_XCB_CW_BORDER_PIXEL) != 0 {
  9758. /* xcb_create_window_value_list_t.border_pixel */
  9759. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fborder_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  9760. xcb_block_len += uint32(4)
  9761. xcb_tmp += uintptr(4)
  9762. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9763. }
  9764. if value_mask&uint32(_XCB_CW_BIT_GRAVITY) != 0 {
  9765. /* xcb_create_window_value_list_t.bit_gravity */
  9766. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbit_gravity = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  9767. xcb_block_len += uint32(4)
  9768. xcb_tmp += uintptr(4)
  9769. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9770. }
  9771. if value_mask&uint32(_XCB_CW_WIN_GRAVITY) != 0 {
  9772. /* xcb_create_window_value_list_t.win_gravity */
  9773. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fwin_gravity = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  9774. xcb_block_len += uint32(4)
  9775. xcb_tmp += uintptr(4)
  9776. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9777. }
  9778. if value_mask&uint32(_XCB_CW_BACKING_STORE) != 0 {
  9779. /* xcb_create_window_value_list_t.backing_store */
  9780. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbacking_store = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  9781. xcb_block_len += uint32(4)
  9782. xcb_tmp += uintptr(4)
  9783. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9784. }
  9785. if value_mask&uint32(_XCB_CW_BACKING_PLANES) != 0 {
  9786. /* xcb_create_window_value_list_t.backing_planes */
  9787. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbacking_planes = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  9788. xcb_block_len += uint32(4)
  9789. xcb_tmp += uintptr(4)
  9790. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9791. }
  9792. if value_mask&uint32(_XCB_CW_BACKING_PIXEL) != 0 {
  9793. /* xcb_create_window_value_list_t.backing_pixel */
  9794. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fbacking_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  9795. xcb_block_len += uint32(4)
  9796. xcb_tmp += uintptr(4)
  9797. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9798. }
  9799. if value_mask&uint32(_XCB_CW_OVERRIDE_REDIRECT) != 0 {
  9800. /* xcb_create_window_value_list_t.override_redirect */
  9801. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Foverride_redirect = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  9802. xcb_block_len += uint32(4)
  9803. xcb_tmp += uintptr(4)
  9804. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9805. }
  9806. if value_mask&uint32(_XCB_CW_SAVE_UNDER) != 0 {
  9807. /* xcb_create_window_value_list_t.save_under */
  9808. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fsave_under = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  9809. xcb_block_len += uint32(4)
  9810. xcb_tmp += uintptr(4)
  9811. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9812. }
  9813. if value_mask&uint32(_XCB_CW_EVENT_MASK) != 0 {
  9814. /* xcb_create_window_value_list_t.event_mask */
  9815. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fevent_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  9816. xcb_block_len += uint32(4)
  9817. xcb_tmp += uintptr(4)
  9818. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9819. }
  9820. if value_mask&uint32(_XCB_CW_DONT_PROPAGATE) != 0 {
  9821. /* xcb_create_window_value_list_t.do_not_propogate_mask */
  9822. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fdo_not_propogate_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  9823. xcb_block_len += uint32(4)
  9824. xcb_tmp += uintptr(4)
  9825. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9826. }
  9827. if value_mask&uint32(_XCB_CW_COLORMAP) != 0 {
  9828. /* xcb_create_window_value_list_t.colormap */
  9829. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fcolormap = *(*Txcb_colormap_t)(unsafe.Pointer(xcb_tmp))
  9830. xcb_block_len += uint32(4)
  9831. xcb_tmp += uintptr(4)
  9832. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9833. }
  9834. if value_mask&uint32(_XCB_CW_CURSOR) != 0 {
  9835. /* xcb_create_window_value_list_t.cursor */
  9836. (*Txcb_create_window_value_list_t)(unsafe.Pointer(_aux)).Fcursor = *(*Txcb_cursor_t)(unsafe.Pointer(xcb_tmp))
  9837. xcb_block_len += uint32(4)
  9838. xcb_tmp += uintptr(4)
  9839. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  9840. }
  9841. /* insert padding */
  9842. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  9843. xcb_buffer_len += xcb_block_len + xcb_pad
  9844. if uint32(0) != xcb_pad {
  9845. xcb_tmp += uintptr(xcb_pad)
  9846. xcb_pad = uint32(0)
  9847. }
  9848. xcb_block_len = uint32(0)
  9849. xcb_padding_offset = uint32(0)
  9850. return libc.Int32FromUint32(xcb_buffer_len)
  9851. }
  9852. func Xxcb_create_window_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t) (r int32) {
  9853. bp := tls.Alloc(64)
  9854. defer tls.Free(64)
  9855. var _ /* _aux at bp+0 */ Txcb_create_window_value_list_t
  9856. return Xxcb_create_window_value_list_unpack(tls, _buffer, value_mask, bp)
  9857. }
  9858. func Xxcb_create_window_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  9859. var _aux, xcb_tmp uintptr
  9860. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  9861. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  9862. xcb_tmp = _buffer
  9863. _aux = _buffer
  9864. xcb_buffer_len = uint32(0)
  9865. xcb_block_len = uint32(0)
  9866. xcb_pad = uint32(0)
  9867. xcb_align_to = uint32(0)
  9868. xcb_block_len += uint32(32)
  9869. xcb_tmp += uintptr(xcb_block_len)
  9870. xcb_buffer_len += xcb_block_len
  9871. xcb_block_len = uint32(0)
  9872. /* value_list */
  9873. xcb_block_len += libc.Uint32FromInt32(Xxcb_create_window_value_list_sizeof(tls, xcb_tmp, (*Txcb_create_window_request_t)(unsafe.Pointer(_aux)).Fvalue_mask))
  9874. xcb_tmp += uintptr(xcb_block_len)
  9875. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  9876. /* insert padding */
  9877. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  9878. xcb_buffer_len += xcb_block_len + xcb_pad
  9879. if uint32(0) != xcb_pad {
  9880. xcb_tmp += uintptr(xcb_pad)
  9881. xcb_pad = uint32(0)
  9882. }
  9883. xcb_block_len = uint32(0)
  9884. return libc.Int32FromUint32(xcb_buffer_len)
  9885. }
  9886. 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) {
  9887. bp := tls.Alloc(80)
  9888. defer tls.Free(80)
  9889. var xcb_ret Txcb_void_cookie_t
  9890. var _ /* xcb_out at bp+40 */ Txcb_create_window_request_t
  9891. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  9892. _ = xcb_ret
  9893. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fdepth = depth
  9894. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fwid = wid
  9895. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fparent = parent
  9896. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fx = x
  9897. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fy = y
  9898. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fwidth = width
  9899. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fheight = height
  9900. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fborder_width = border_width
  9901. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).F_class = _class
  9902. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fvisual = visual
  9903. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  9904. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  9905. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(32)
  9906. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  9907. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  9908. /* xcb_create_window_value_list_t value_list */
  9909. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  9910. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_create_window_value_list_sizeof(tls, value_list, value_mask))
  9911. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req)))
  9912. return xcb_ret
  9913. }
  9914. var _xcb_req = Txcb_protocol_request_t{
  9915. Fcount: uint32(3),
  9916. Fopcode: uint8(m_XCB_CREATE_WINDOW),
  9917. Fisvoid: uint8(1),
  9918. }
  9919. 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) {
  9920. bp := tls.Alloc(80)
  9921. defer tls.Free(80)
  9922. var xcb_ret Txcb_void_cookie_t
  9923. var _ /* xcb_out at bp+40 */ Txcb_create_window_request_t
  9924. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  9925. _ = xcb_ret
  9926. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fdepth = depth
  9927. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fwid = wid
  9928. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fparent = parent
  9929. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fx = x
  9930. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fy = y
  9931. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fwidth = width
  9932. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fheight = height
  9933. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fborder_width = border_width
  9934. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).F_class = _class
  9935. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fvisual = visual
  9936. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  9937. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  9938. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(32)
  9939. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  9940. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  9941. /* xcb_create_window_value_list_t value_list */
  9942. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  9943. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_create_window_value_list_sizeof(tls, value_list, value_mask))
  9944. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req1)))
  9945. return xcb_ret
  9946. }
  9947. var _xcb_req1 = Txcb_protocol_request_t{
  9948. Fcount: uint32(3),
  9949. Fopcode: uint8(m_XCB_CREATE_WINDOW),
  9950. Fisvoid: uint8(1),
  9951. }
  9952. 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) {
  9953. bp := tls.Alloc(80)
  9954. defer tls.Free(80)
  9955. var xcb_ret Txcb_void_cookie_t
  9956. var _ /* xcb_aux0 at bp+72 */ uintptr
  9957. var _ /* xcb_out at bp+40 */ Txcb_create_window_request_t
  9958. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  9959. _ = xcb_ret
  9960. *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0)
  9961. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fdepth = depth
  9962. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fwid = wid
  9963. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fparent = parent
  9964. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fx = x
  9965. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fy = y
  9966. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fwidth = width
  9967. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fheight = height
  9968. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fborder_width = border_width
  9969. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).F_class = _class
  9970. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fvisual = visual
  9971. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  9972. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  9973. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(32)
  9974. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  9975. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  9976. /* xcb_create_window_value_list_t value_list */
  9977. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_create_window_value_list_serialize(tls, bp+72, value_mask, value_list))
  9978. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 72))
  9979. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req2)))
  9980. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 72)))
  9981. return xcb_ret
  9982. }
  9983. var _xcb_req2 = Txcb_protocol_request_t{
  9984. Fcount: uint32(3),
  9985. Fopcode: uint8(m_XCB_CREATE_WINDOW),
  9986. Fisvoid: uint8(1),
  9987. }
  9988. 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) {
  9989. bp := tls.Alloc(80)
  9990. defer tls.Free(80)
  9991. var xcb_ret Txcb_void_cookie_t
  9992. var _ /* xcb_aux0 at bp+72 */ uintptr
  9993. var _ /* xcb_out at bp+40 */ Txcb_create_window_request_t
  9994. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  9995. _ = xcb_ret
  9996. *(*uintptr)(unsafe.Pointer(bp + 72)) = uintptr(0)
  9997. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fdepth = depth
  9998. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fwid = wid
  9999. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fparent = parent
  10000. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fx = x
  10001. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fy = y
  10002. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fwidth = width
  10003. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fheight = height
  10004. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fborder_width = border_width
  10005. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).F_class = _class
  10006. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fvisual = visual
  10007. (*(*Txcb_create_window_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  10008. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  10009. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(32)
  10010. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10011. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10012. /* xcb_create_window_value_list_t value_list */
  10013. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_create_window_value_list_serialize(tls, bp+72, value_mask, value_list))
  10014. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 72))
  10015. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req3)))
  10016. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 72)))
  10017. return xcb_ret
  10018. }
  10019. var _xcb_req3 = Txcb_protocol_request_t{
  10020. Fcount: uint32(3),
  10021. Fopcode: uint8(m_XCB_CREATE_WINDOW),
  10022. Fisvoid: uint8(1),
  10023. }
  10024. func Xxcb_create_window_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  10025. return R + libc.UintptrFromInt32(1)*32
  10026. }
  10027. func Xxcb_change_window_attributes_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  10028. bp := tls.Alloc(16)
  10029. defer tls.Free(16)
  10030. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  10031. var xcb_out, xcb_tmp uintptr
  10032. var xcb_parts [16]Tiovec
  10033. var _ /* xcb_pad0 at bp+0 */ [3]int8
  10034. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  10035. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  10036. xcb_buffer_len = uint32(0)
  10037. xcb_align_to = uint32(0)
  10038. xcb_padding_offset = uint32(0)
  10039. xcb_pad = uint32(0)
  10040. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  10041. xcb_parts_idx = uint32(0)
  10042. xcb_block_len = uint32(0)
  10043. if value_mask&uint32(_XCB_CW_BACK_PIXMAP) != 0 {
  10044. /* xcb_change_window_attributes_value_list_t.background_pixmap */
  10045. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  10046. xcb_block_len += uint32(4)
  10047. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10048. xcb_parts_idx++
  10049. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10050. }
  10051. if value_mask&uint32(_XCB_CW_BACK_PIXEL) != 0 {
  10052. /* xcb_change_window_attributes_value_list_t.background_pixel */
  10053. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  10054. xcb_block_len += uint32(4)
  10055. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10056. xcb_parts_idx++
  10057. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10058. }
  10059. if value_mask&uint32(_XCB_CW_BORDER_PIXMAP) != 0 {
  10060. /* xcb_change_window_attributes_value_list_t.border_pixmap */
  10061. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  10062. xcb_block_len += uint32(4)
  10063. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10064. xcb_parts_idx++
  10065. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10066. }
  10067. if value_mask&uint32(_XCB_CW_BORDER_PIXEL) != 0 {
  10068. /* xcb_change_window_attributes_value_list_t.border_pixel */
  10069. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  10070. xcb_block_len += uint32(4)
  10071. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10072. xcb_parts_idx++
  10073. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10074. }
  10075. if value_mask&uint32(_XCB_CW_BIT_GRAVITY) != 0 {
  10076. /* xcb_change_window_attributes_value_list_t.bit_gravity */
  10077. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  10078. xcb_block_len += uint32(4)
  10079. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10080. xcb_parts_idx++
  10081. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10082. }
  10083. if value_mask&uint32(_XCB_CW_WIN_GRAVITY) != 0 {
  10084. /* xcb_change_window_attributes_value_list_t.win_gravity */
  10085. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  10086. xcb_block_len += uint32(4)
  10087. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10088. xcb_parts_idx++
  10089. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10090. }
  10091. if value_mask&uint32(_XCB_CW_BACKING_STORE) != 0 {
  10092. /* xcb_change_window_attributes_value_list_t.backing_store */
  10093. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  10094. xcb_block_len += uint32(4)
  10095. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10096. xcb_parts_idx++
  10097. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10098. }
  10099. if value_mask&uint32(_XCB_CW_BACKING_PLANES) != 0 {
  10100. /* xcb_change_window_attributes_value_list_t.backing_planes */
  10101. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 28
  10102. xcb_block_len += uint32(4)
  10103. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10104. xcb_parts_idx++
  10105. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10106. }
  10107. if value_mask&uint32(_XCB_CW_BACKING_PIXEL) != 0 {
  10108. /* xcb_change_window_attributes_value_list_t.backing_pixel */
  10109. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 32
  10110. xcb_block_len += uint32(4)
  10111. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10112. xcb_parts_idx++
  10113. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10114. }
  10115. if value_mask&uint32(_XCB_CW_OVERRIDE_REDIRECT) != 0 {
  10116. /* xcb_change_window_attributes_value_list_t.override_redirect */
  10117. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 36
  10118. xcb_block_len += uint32(4)
  10119. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10120. xcb_parts_idx++
  10121. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10122. }
  10123. if value_mask&uint32(_XCB_CW_SAVE_UNDER) != 0 {
  10124. /* xcb_change_window_attributes_value_list_t.save_under */
  10125. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 40
  10126. xcb_block_len += uint32(4)
  10127. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10128. xcb_parts_idx++
  10129. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10130. }
  10131. if value_mask&uint32(_XCB_CW_EVENT_MASK) != 0 {
  10132. /* xcb_change_window_attributes_value_list_t.event_mask */
  10133. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 44
  10134. xcb_block_len += uint32(4)
  10135. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10136. xcb_parts_idx++
  10137. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10138. }
  10139. if value_mask&uint32(_XCB_CW_DONT_PROPAGATE) != 0 {
  10140. /* xcb_change_window_attributes_value_list_t.do_not_propogate_mask */
  10141. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 48
  10142. xcb_block_len += uint32(4)
  10143. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10144. xcb_parts_idx++
  10145. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10146. }
  10147. if value_mask&uint32(_XCB_CW_COLORMAP) != 0 {
  10148. /* xcb_change_window_attributes_value_list_t.colormap */
  10149. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 52
  10150. xcb_block_len += uint32(4)
  10151. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10152. xcb_parts_idx++
  10153. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10154. }
  10155. if value_mask&uint32(_XCB_CW_CURSOR) != 0 {
  10156. /* xcb_change_window_attributes_value_list_t.cursor */
  10157. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 56
  10158. xcb_block_len += uint32(4)
  10159. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10160. xcb_parts_idx++
  10161. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10162. }
  10163. /* insert padding */
  10164. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  10165. xcb_buffer_len += xcb_block_len + xcb_pad
  10166. if uint32(0) != xcb_pad {
  10167. xcb_parts[xcb_parts_idx].Fiov_base = bp
  10168. xcb_parts[xcb_parts_idx].Fiov_len = xcb_pad
  10169. xcb_parts_idx++
  10170. xcb_pad = uint32(0)
  10171. }
  10172. xcb_block_len = uint32(0)
  10173. xcb_padding_offset = uint32(0)
  10174. if libc.UintptrFromInt32(0) == xcb_out {
  10175. /* allocate memory */
  10176. xcb_out = libc.Xmalloc(tls, xcb_buffer_len)
  10177. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  10178. }
  10179. xcb_tmp = xcb_out
  10180. i = uint32(0)
  10181. for {
  10182. if !(i < xcb_parts_idx) {
  10183. break
  10184. }
  10185. if uintptr(0) != xcb_parts[i].Fiov_base && uint32(0) != xcb_parts[i].Fiov_len {
  10186. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  10187. }
  10188. if uint32(0) != xcb_parts[i].Fiov_len {
  10189. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  10190. }
  10191. goto _1
  10192. _1:
  10193. ;
  10194. i++
  10195. }
  10196. return libc.Int32FromUint32(xcb_buffer_len)
  10197. }
  10198. func Xxcb_change_window_attributes_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  10199. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  10200. var xcb_tmp uintptr
  10201. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  10202. xcb_tmp = _buffer
  10203. xcb_buffer_len = uint32(0)
  10204. xcb_block_len = uint32(0)
  10205. xcb_pad = uint32(0)
  10206. xcb_align_to = uint32(0)
  10207. xcb_padding_offset = uint32(0)
  10208. if value_mask&uint32(_XCB_CW_BACK_PIXMAP) != 0 {
  10209. /* xcb_change_window_attributes_value_list_t.background_pixmap */
  10210. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbackground_pixmap = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  10211. xcb_block_len += uint32(4)
  10212. xcb_tmp += uintptr(4)
  10213. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10214. }
  10215. if value_mask&uint32(_XCB_CW_BACK_PIXEL) != 0 {
  10216. /* xcb_change_window_attributes_value_list_t.background_pixel */
  10217. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbackground_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10218. xcb_block_len += uint32(4)
  10219. xcb_tmp += uintptr(4)
  10220. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10221. }
  10222. if value_mask&uint32(_XCB_CW_BORDER_PIXMAP) != 0 {
  10223. /* xcb_change_window_attributes_value_list_t.border_pixmap */
  10224. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fborder_pixmap = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  10225. xcb_block_len += uint32(4)
  10226. xcb_tmp += uintptr(4)
  10227. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10228. }
  10229. if value_mask&uint32(_XCB_CW_BORDER_PIXEL) != 0 {
  10230. /* xcb_change_window_attributes_value_list_t.border_pixel */
  10231. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fborder_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10232. xcb_block_len += uint32(4)
  10233. xcb_tmp += uintptr(4)
  10234. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10235. }
  10236. if value_mask&uint32(_XCB_CW_BIT_GRAVITY) != 0 {
  10237. /* xcb_change_window_attributes_value_list_t.bit_gravity */
  10238. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbit_gravity = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10239. xcb_block_len += uint32(4)
  10240. xcb_tmp += uintptr(4)
  10241. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10242. }
  10243. if value_mask&uint32(_XCB_CW_WIN_GRAVITY) != 0 {
  10244. /* xcb_change_window_attributes_value_list_t.win_gravity */
  10245. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fwin_gravity = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10246. xcb_block_len += uint32(4)
  10247. xcb_tmp += uintptr(4)
  10248. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10249. }
  10250. if value_mask&uint32(_XCB_CW_BACKING_STORE) != 0 {
  10251. /* xcb_change_window_attributes_value_list_t.backing_store */
  10252. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbacking_store = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10253. xcb_block_len += uint32(4)
  10254. xcb_tmp += uintptr(4)
  10255. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10256. }
  10257. if value_mask&uint32(_XCB_CW_BACKING_PLANES) != 0 {
  10258. /* xcb_change_window_attributes_value_list_t.backing_planes */
  10259. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbacking_planes = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10260. xcb_block_len += uint32(4)
  10261. xcb_tmp += uintptr(4)
  10262. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10263. }
  10264. if value_mask&uint32(_XCB_CW_BACKING_PIXEL) != 0 {
  10265. /* xcb_change_window_attributes_value_list_t.backing_pixel */
  10266. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fbacking_pixel = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10267. xcb_block_len += uint32(4)
  10268. xcb_tmp += uintptr(4)
  10269. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10270. }
  10271. if value_mask&uint32(_XCB_CW_OVERRIDE_REDIRECT) != 0 {
  10272. /* xcb_change_window_attributes_value_list_t.override_redirect */
  10273. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Foverride_redirect = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  10274. xcb_block_len += uint32(4)
  10275. xcb_tmp += uintptr(4)
  10276. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10277. }
  10278. if value_mask&uint32(_XCB_CW_SAVE_UNDER) != 0 {
  10279. /* xcb_change_window_attributes_value_list_t.save_under */
  10280. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fsave_under = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  10281. xcb_block_len += uint32(4)
  10282. xcb_tmp += uintptr(4)
  10283. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10284. }
  10285. if value_mask&uint32(_XCB_CW_EVENT_MASK) != 0 {
  10286. /* xcb_change_window_attributes_value_list_t.event_mask */
  10287. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fevent_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10288. xcb_block_len += uint32(4)
  10289. xcb_tmp += uintptr(4)
  10290. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10291. }
  10292. if value_mask&uint32(_XCB_CW_DONT_PROPAGATE) != 0 {
  10293. /* xcb_change_window_attributes_value_list_t.do_not_propogate_mask */
  10294. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fdo_not_propogate_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10295. xcb_block_len += uint32(4)
  10296. xcb_tmp += uintptr(4)
  10297. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10298. }
  10299. if value_mask&uint32(_XCB_CW_COLORMAP) != 0 {
  10300. /* xcb_change_window_attributes_value_list_t.colormap */
  10301. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fcolormap = *(*Txcb_colormap_t)(unsafe.Pointer(xcb_tmp))
  10302. xcb_block_len += uint32(4)
  10303. xcb_tmp += uintptr(4)
  10304. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10305. }
  10306. if value_mask&uint32(_XCB_CW_CURSOR) != 0 {
  10307. /* xcb_change_window_attributes_value_list_t.cursor */
  10308. (*Txcb_change_window_attributes_value_list_t)(unsafe.Pointer(_aux)).Fcursor = *(*Txcb_cursor_t)(unsafe.Pointer(xcb_tmp))
  10309. xcb_block_len += uint32(4)
  10310. xcb_tmp += uintptr(4)
  10311. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10312. }
  10313. /* insert padding */
  10314. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  10315. xcb_buffer_len += xcb_block_len + xcb_pad
  10316. if uint32(0) != xcb_pad {
  10317. xcb_tmp += uintptr(xcb_pad)
  10318. xcb_pad = uint32(0)
  10319. }
  10320. xcb_block_len = uint32(0)
  10321. xcb_padding_offset = uint32(0)
  10322. return libc.Int32FromUint32(xcb_buffer_len)
  10323. }
  10324. func Xxcb_change_window_attributes_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t) (r int32) {
  10325. bp := tls.Alloc(64)
  10326. defer tls.Free(64)
  10327. var _ /* _aux at bp+0 */ Txcb_change_window_attributes_value_list_t
  10328. return Xxcb_change_window_attributes_value_list_unpack(tls, _buffer, value_mask, bp)
  10329. }
  10330. func Xxcb_change_window_attributes_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  10331. var _aux, xcb_tmp uintptr
  10332. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  10333. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  10334. xcb_tmp = _buffer
  10335. _aux = _buffer
  10336. xcb_buffer_len = uint32(0)
  10337. xcb_block_len = uint32(0)
  10338. xcb_pad = uint32(0)
  10339. xcb_align_to = uint32(0)
  10340. xcb_block_len += uint32(12)
  10341. xcb_tmp += uintptr(xcb_block_len)
  10342. xcb_buffer_len += xcb_block_len
  10343. xcb_block_len = uint32(0)
  10344. /* value_list */
  10345. 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))
  10346. xcb_tmp += uintptr(xcb_block_len)
  10347. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  10348. /* insert padding */
  10349. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  10350. xcb_buffer_len += xcb_block_len + xcb_pad
  10351. if uint32(0) != xcb_pad {
  10352. xcb_tmp += uintptr(xcb_pad)
  10353. xcb_pad = uint32(0)
  10354. }
  10355. xcb_block_len = uint32(0)
  10356. return libc.Int32FromUint32(xcb_buffer_len)
  10357. }
  10358. 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) {
  10359. bp := tls.Alloc(64)
  10360. defer tls.Free(64)
  10361. var xcb_ret Txcb_void_cookie_t
  10362. var _ /* xcb_out at bp+40 */ Txcb_change_window_attributes_request_t
  10363. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  10364. _ = xcb_ret
  10365. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  10366. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fwindow = window
  10367. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  10368. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  10369. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  10370. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10371. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10372. /* xcb_change_window_attributes_value_list_t value_list */
  10373. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  10374. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_window_attributes_value_list_sizeof(tls, value_list, value_mask))
  10375. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req4)))
  10376. return xcb_ret
  10377. }
  10378. var _xcb_req4 = Txcb_protocol_request_t{
  10379. Fcount: uint32(3),
  10380. Fopcode: uint8(m_XCB_CHANGE_WINDOW_ATTRIBUTES),
  10381. Fisvoid: uint8(1),
  10382. }
  10383. 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) {
  10384. bp := tls.Alloc(64)
  10385. defer tls.Free(64)
  10386. var xcb_ret Txcb_void_cookie_t
  10387. var _ /* xcb_out at bp+40 */ Txcb_change_window_attributes_request_t
  10388. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  10389. _ = xcb_ret
  10390. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  10391. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fwindow = window
  10392. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  10393. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  10394. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  10395. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10396. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10397. /* xcb_change_window_attributes_value_list_t value_list */
  10398. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  10399. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_window_attributes_value_list_sizeof(tls, value_list, value_mask))
  10400. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req5)))
  10401. return xcb_ret
  10402. }
  10403. var _xcb_req5 = Txcb_protocol_request_t{
  10404. Fcount: uint32(3),
  10405. Fopcode: uint8(m_XCB_CHANGE_WINDOW_ATTRIBUTES),
  10406. Fisvoid: uint8(1),
  10407. }
  10408. 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) {
  10409. bp := tls.Alloc(64)
  10410. defer tls.Free(64)
  10411. var xcb_ret Txcb_void_cookie_t
  10412. var _ /* xcb_aux0 at bp+52 */ uintptr
  10413. var _ /* xcb_out at bp+40 */ Txcb_change_window_attributes_request_t
  10414. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  10415. _ = xcb_ret
  10416. *(*uintptr)(unsafe.Pointer(bp + 52)) = uintptr(0)
  10417. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  10418. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fwindow = window
  10419. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  10420. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  10421. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  10422. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10423. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10424. /* xcb_change_window_attributes_value_list_t value_list */
  10425. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_window_attributes_value_list_serialize(tls, bp+52, value_mask, value_list))
  10426. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 52))
  10427. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req6)))
  10428. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 52)))
  10429. return xcb_ret
  10430. }
  10431. var _xcb_req6 = Txcb_protocol_request_t{
  10432. Fcount: uint32(3),
  10433. Fopcode: uint8(m_XCB_CHANGE_WINDOW_ATTRIBUTES),
  10434. Fisvoid: uint8(1),
  10435. }
  10436. 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) {
  10437. bp := tls.Alloc(64)
  10438. defer tls.Free(64)
  10439. var xcb_ret Txcb_void_cookie_t
  10440. var _ /* xcb_aux0 at bp+52 */ uintptr
  10441. var _ /* xcb_out at bp+40 */ Txcb_change_window_attributes_request_t
  10442. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  10443. _ = xcb_ret
  10444. *(*uintptr)(unsafe.Pointer(bp + 52)) = uintptr(0)
  10445. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  10446. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fwindow = window
  10447. (*(*Txcb_change_window_attributes_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  10448. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  10449. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  10450. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10451. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10452. /* xcb_change_window_attributes_value_list_t value_list */
  10453. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_window_attributes_value_list_serialize(tls, bp+52, value_mask, value_list))
  10454. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 52))
  10455. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req7)))
  10456. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 52)))
  10457. return xcb_ret
  10458. }
  10459. var _xcb_req7 = Txcb_protocol_request_t{
  10460. Fcount: uint32(3),
  10461. Fopcode: uint8(m_XCB_CHANGE_WINDOW_ATTRIBUTES),
  10462. Fisvoid: uint8(1),
  10463. }
  10464. func Xxcb_change_window_attributes_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  10465. return R + libc.UintptrFromInt32(1)*12
  10466. }
  10467. func Xxcb_get_window_attributes(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_get_window_attributes_cookie_t) {
  10468. bp := tls.Alloc(48)
  10469. defer tls.Free(48)
  10470. var xcb_ret Txcb_get_window_attributes_cookie_t
  10471. var _ /* xcb_out at bp+32 */ Txcb_get_window_attributes_request_t
  10472. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10473. _ = xcb_ret
  10474. (*(*Txcb_get_window_attributes_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10475. (*(*Txcb_get_window_attributes_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10476. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10477. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10478. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10479. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10480. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req8)))
  10481. return xcb_ret
  10482. }
  10483. var _xcb_req8 = Txcb_protocol_request_t{
  10484. Fcount: uint32(2),
  10485. Fopcode: uint8(m_XCB_GET_WINDOW_ATTRIBUTES),
  10486. }
  10487. func Xxcb_get_window_attributes_unchecked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_get_window_attributes_cookie_t) {
  10488. bp := tls.Alloc(48)
  10489. defer tls.Free(48)
  10490. var xcb_ret Txcb_get_window_attributes_cookie_t
  10491. var _ /* xcb_out at bp+32 */ Txcb_get_window_attributes_request_t
  10492. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10493. _ = xcb_ret
  10494. (*(*Txcb_get_window_attributes_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10495. (*(*Txcb_get_window_attributes_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10496. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10497. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10498. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10499. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10500. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req9)))
  10501. return xcb_ret
  10502. }
  10503. var _xcb_req9 = Txcb_protocol_request_t{
  10504. Fcount: uint32(2),
  10505. Fopcode: uint8(m_XCB_GET_WINDOW_ATTRIBUTES),
  10506. }
  10507. func Xxcb_get_window_attributes_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_window_attributes_cookie_t, e uintptr) (r uintptr) {
  10508. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  10509. }
  10510. func Xxcb_destroy_window_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10511. bp := tls.Alloc(48)
  10512. defer tls.Free(48)
  10513. var xcb_ret Txcb_void_cookie_t
  10514. var _ /* xcb_out at bp+32 */ Txcb_destroy_window_request_t
  10515. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10516. _ = xcb_ret
  10517. (*(*Txcb_destroy_window_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10518. (*(*Txcb_destroy_window_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10519. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10520. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10521. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10522. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10523. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req10)))
  10524. return xcb_ret
  10525. }
  10526. var _xcb_req10 = Txcb_protocol_request_t{
  10527. Fcount: uint32(2),
  10528. Fopcode: uint8(m_XCB_DESTROY_WINDOW),
  10529. Fisvoid: uint8(1),
  10530. }
  10531. func Xxcb_destroy_window(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10532. bp := tls.Alloc(48)
  10533. defer tls.Free(48)
  10534. var xcb_ret Txcb_void_cookie_t
  10535. var _ /* xcb_out at bp+32 */ Txcb_destroy_window_request_t
  10536. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10537. _ = xcb_ret
  10538. (*(*Txcb_destroy_window_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10539. (*(*Txcb_destroy_window_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10540. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10541. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10542. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10543. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10544. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req11)))
  10545. return xcb_ret
  10546. }
  10547. var _xcb_req11 = Txcb_protocol_request_t{
  10548. Fcount: uint32(2),
  10549. Fopcode: uint8(m_XCB_DESTROY_WINDOW),
  10550. Fisvoid: uint8(1),
  10551. }
  10552. func Xxcb_destroy_subwindows_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10553. bp := tls.Alloc(48)
  10554. defer tls.Free(48)
  10555. var xcb_ret Txcb_void_cookie_t
  10556. var _ /* xcb_out at bp+32 */ Txcb_destroy_subwindows_request_t
  10557. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10558. _ = xcb_ret
  10559. (*(*Txcb_destroy_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10560. (*(*Txcb_destroy_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10561. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10562. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10563. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10564. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10565. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req12)))
  10566. return xcb_ret
  10567. }
  10568. var _xcb_req12 = Txcb_protocol_request_t{
  10569. Fcount: uint32(2),
  10570. Fopcode: uint8(m_XCB_DESTROY_SUBWINDOWS),
  10571. Fisvoid: uint8(1),
  10572. }
  10573. func Xxcb_destroy_subwindows(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10574. bp := tls.Alloc(48)
  10575. defer tls.Free(48)
  10576. var xcb_ret Txcb_void_cookie_t
  10577. var _ /* xcb_out at bp+32 */ Txcb_destroy_subwindows_request_t
  10578. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10579. _ = xcb_ret
  10580. (*(*Txcb_destroy_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10581. (*(*Txcb_destroy_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10582. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10583. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10584. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10585. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10586. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req13)))
  10587. return xcb_ret
  10588. }
  10589. var _xcb_req13 = Txcb_protocol_request_t{
  10590. Fcount: uint32(2),
  10591. Fopcode: uint8(m_XCB_DESTROY_SUBWINDOWS),
  10592. Fisvoid: uint8(1),
  10593. }
  10594. func Xxcb_change_save_set_checked(tls *libc.TLS, c uintptr, mode Tuint8_t, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10595. bp := tls.Alloc(48)
  10596. defer tls.Free(48)
  10597. var xcb_ret Txcb_void_cookie_t
  10598. var _ /* xcb_out at bp+32 */ Txcb_change_save_set_request_t
  10599. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10600. _ = xcb_ret
  10601. (*(*Txcb_change_save_set_request_t)(unsafe.Pointer(bp + 32))).Fmode = mode
  10602. (*(*Txcb_change_save_set_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10603. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10604. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10605. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10606. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10607. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req14)))
  10608. return xcb_ret
  10609. }
  10610. var _xcb_req14 = Txcb_protocol_request_t{
  10611. Fcount: uint32(2),
  10612. Fopcode: uint8(m_XCB_CHANGE_SAVE_SET),
  10613. Fisvoid: uint8(1),
  10614. }
  10615. func Xxcb_change_save_set(tls *libc.TLS, c uintptr, mode Tuint8_t, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10616. bp := tls.Alloc(48)
  10617. defer tls.Free(48)
  10618. var xcb_ret Txcb_void_cookie_t
  10619. var _ /* xcb_out at bp+32 */ Txcb_change_save_set_request_t
  10620. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10621. _ = xcb_ret
  10622. (*(*Txcb_change_save_set_request_t)(unsafe.Pointer(bp + 32))).Fmode = mode
  10623. (*(*Txcb_change_save_set_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10624. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10625. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10626. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10627. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10628. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req15)))
  10629. return xcb_ret
  10630. }
  10631. var _xcb_req15 = Txcb_protocol_request_t{
  10632. Fcount: uint32(2),
  10633. Fopcode: uint8(m_XCB_CHANGE_SAVE_SET),
  10634. Fisvoid: uint8(1),
  10635. }
  10636. 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) {
  10637. bp := tls.Alloc(48)
  10638. defer tls.Free(48)
  10639. var xcb_ret Txcb_void_cookie_t
  10640. var _ /* xcb_out at bp+32 */ Txcb_reparent_window_request_t
  10641. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10642. _ = xcb_ret
  10643. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10644. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10645. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 32))).Fparent = parent
  10646. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 32))).Fx = x
  10647. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 32))).Fy = y
  10648. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10649. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  10650. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10651. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10652. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req16)))
  10653. return xcb_ret
  10654. }
  10655. var _xcb_req16 = Txcb_protocol_request_t{
  10656. Fcount: uint32(2),
  10657. Fopcode: uint8(m_XCB_REPARENT_WINDOW),
  10658. Fisvoid: uint8(1),
  10659. }
  10660. 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) {
  10661. bp := tls.Alloc(48)
  10662. defer tls.Free(48)
  10663. var xcb_ret Txcb_void_cookie_t
  10664. var _ /* xcb_out at bp+32 */ Txcb_reparent_window_request_t
  10665. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10666. _ = xcb_ret
  10667. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10668. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10669. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 32))).Fparent = parent
  10670. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 32))).Fx = x
  10671. (*(*Txcb_reparent_window_request_t)(unsafe.Pointer(bp + 32))).Fy = y
  10672. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10673. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  10674. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10675. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10676. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req17)))
  10677. return xcb_ret
  10678. }
  10679. var _xcb_req17 = Txcb_protocol_request_t{
  10680. Fcount: uint32(2),
  10681. Fopcode: uint8(m_XCB_REPARENT_WINDOW),
  10682. Fisvoid: uint8(1),
  10683. }
  10684. func Xxcb_map_window_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10685. bp := tls.Alloc(48)
  10686. defer tls.Free(48)
  10687. var xcb_ret Txcb_void_cookie_t
  10688. var _ /* xcb_out at bp+32 */ Txcb_map_window_request_t
  10689. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10690. _ = xcb_ret
  10691. (*(*Txcb_map_window_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10692. (*(*Txcb_map_window_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10693. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10694. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10695. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10696. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10697. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req18)))
  10698. return xcb_ret
  10699. }
  10700. var _xcb_req18 = Txcb_protocol_request_t{
  10701. Fcount: uint32(2),
  10702. Fopcode: uint8(m_XCB_MAP_WINDOW),
  10703. Fisvoid: uint8(1),
  10704. }
  10705. func Xxcb_map_window(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10706. bp := tls.Alloc(48)
  10707. defer tls.Free(48)
  10708. var xcb_ret Txcb_void_cookie_t
  10709. var _ /* xcb_out at bp+32 */ Txcb_map_window_request_t
  10710. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10711. _ = xcb_ret
  10712. (*(*Txcb_map_window_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10713. (*(*Txcb_map_window_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10714. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10715. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10716. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10717. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10718. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req19)))
  10719. return xcb_ret
  10720. }
  10721. var _xcb_req19 = Txcb_protocol_request_t{
  10722. Fcount: uint32(2),
  10723. Fopcode: uint8(m_XCB_MAP_WINDOW),
  10724. Fisvoid: uint8(1),
  10725. }
  10726. func Xxcb_map_subwindows_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10727. bp := tls.Alloc(48)
  10728. defer tls.Free(48)
  10729. var xcb_ret Txcb_void_cookie_t
  10730. var _ /* xcb_out at bp+32 */ Txcb_map_subwindows_request_t
  10731. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10732. _ = xcb_ret
  10733. (*(*Txcb_map_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10734. (*(*Txcb_map_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10735. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10736. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10737. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10738. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10739. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req20)))
  10740. return xcb_ret
  10741. }
  10742. var _xcb_req20 = Txcb_protocol_request_t{
  10743. Fcount: uint32(2),
  10744. Fopcode: uint8(m_XCB_MAP_SUBWINDOWS),
  10745. Fisvoid: uint8(1),
  10746. }
  10747. func Xxcb_map_subwindows(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10748. bp := tls.Alloc(48)
  10749. defer tls.Free(48)
  10750. var xcb_ret Txcb_void_cookie_t
  10751. var _ /* xcb_out at bp+32 */ Txcb_map_subwindows_request_t
  10752. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10753. _ = xcb_ret
  10754. (*(*Txcb_map_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10755. (*(*Txcb_map_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10756. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10757. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10758. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10759. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10760. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req21)))
  10761. return xcb_ret
  10762. }
  10763. var _xcb_req21 = Txcb_protocol_request_t{
  10764. Fcount: uint32(2),
  10765. Fopcode: uint8(m_XCB_MAP_SUBWINDOWS),
  10766. Fisvoid: uint8(1),
  10767. }
  10768. func Xxcb_unmap_window_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10769. bp := tls.Alloc(48)
  10770. defer tls.Free(48)
  10771. var xcb_ret Txcb_void_cookie_t
  10772. var _ /* xcb_out at bp+32 */ Txcb_unmap_window_request_t
  10773. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10774. _ = xcb_ret
  10775. (*(*Txcb_unmap_window_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10776. (*(*Txcb_unmap_window_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10777. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10778. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10779. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10780. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10781. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req22)))
  10782. return xcb_ret
  10783. }
  10784. var _xcb_req22 = Txcb_protocol_request_t{
  10785. Fcount: uint32(2),
  10786. Fopcode: uint8(m_XCB_UNMAP_WINDOW),
  10787. Fisvoid: uint8(1),
  10788. }
  10789. func Xxcb_unmap_window(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10790. bp := tls.Alloc(48)
  10791. defer tls.Free(48)
  10792. var xcb_ret Txcb_void_cookie_t
  10793. var _ /* xcb_out at bp+32 */ Txcb_unmap_window_request_t
  10794. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10795. _ = xcb_ret
  10796. (*(*Txcb_unmap_window_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10797. (*(*Txcb_unmap_window_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10798. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10799. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10800. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10801. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10802. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req23)))
  10803. return xcb_ret
  10804. }
  10805. var _xcb_req23 = Txcb_protocol_request_t{
  10806. Fcount: uint32(2),
  10807. Fopcode: uint8(m_XCB_UNMAP_WINDOW),
  10808. Fisvoid: uint8(1),
  10809. }
  10810. func Xxcb_unmap_subwindows_checked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10811. bp := tls.Alloc(48)
  10812. defer tls.Free(48)
  10813. var xcb_ret Txcb_void_cookie_t
  10814. var _ /* xcb_out at bp+32 */ Txcb_unmap_subwindows_request_t
  10815. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10816. _ = xcb_ret
  10817. (*(*Txcb_unmap_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10818. (*(*Txcb_unmap_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10819. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10820. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10821. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10822. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10823. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req24)))
  10824. return xcb_ret
  10825. }
  10826. var _xcb_req24 = Txcb_protocol_request_t{
  10827. Fcount: uint32(2),
  10828. Fopcode: uint8(m_XCB_UNMAP_SUBWINDOWS),
  10829. Fisvoid: uint8(1),
  10830. }
  10831. func Xxcb_unmap_subwindows(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_void_cookie_t) {
  10832. bp := tls.Alloc(48)
  10833. defer tls.Free(48)
  10834. var xcb_ret Txcb_void_cookie_t
  10835. var _ /* xcb_out at bp+32 */ Txcb_unmap_subwindows_request_t
  10836. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  10837. _ = xcb_ret
  10838. (*(*Txcb_unmap_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  10839. (*(*Txcb_unmap_subwindows_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  10840. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  10841. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  10842. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  10843. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  10844. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req25)))
  10845. return xcb_ret
  10846. }
  10847. var _xcb_req25 = Txcb_protocol_request_t{
  10848. Fcount: uint32(2),
  10849. Fopcode: uint8(m_XCB_UNMAP_SUBWINDOWS),
  10850. Fisvoid: uint8(1),
  10851. }
  10852. func Xxcb_configure_window_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint16_t, _aux uintptr) (r int32) {
  10853. bp := tls.Alloc(16)
  10854. defer tls.Free(16)
  10855. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  10856. var xcb_out, xcb_tmp uintptr
  10857. var xcb_parts [8]Tiovec
  10858. var _ /* xcb_pad0 at bp+0 */ [3]int8
  10859. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  10860. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  10861. xcb_buffer_len = uint32(0)
  10862. xcb_align_to = uint32(0)
  10863. xcb_padding_offset = uint32(0)
  10864. xcb_pad = uint32(0)
  10865. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  10866. xcb_parts_idx = uint32(0)
  10867. xcb_block_len = uint32(0)
  10868. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_X) != 0 {
  10869. /* xcb_configure_window_value_list_t.x */
  10870. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  10871. xcb_block_len += uint32(4)
  10872. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10873. xcb_parts_idx++
  10874. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10875. }
  10876. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_Y) != 0 {
  10877. /* xcb_configure_window_value_list_t.y */
  10878. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  10879. xcb_block_len += uint32(4)
  10880. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10881. xcb_parts_idx++
  10882. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10883. }
  10884. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_WIDTH) != 0 {
  10885. /* xcb_configure_window_value_list_t.width */
  10886. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  10887. xcb_block_len += uint32(4)
  10888. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10889. xcb_parts_idx++
  10890. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10891. }
  10892. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_HEIGHT) != 0 {
  10893. /* xcb_configure_window_value_list_t.height */
  10894. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  10895. xcb_block_len += uint32(4)
  10896. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10897. xcb_parts_idx++
  10898. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10899. }
  10900. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_BORDER_WIDTH) != 0 {
  10901. /* xcb_configure_window_value_list_t.border_width */
  10902. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  10903. xcb_block_len += uint32(4)
  10904. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10905. xcb_parts_idx++
  10906. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10907. }
  10908. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_SIBLING) != 0 {
  10909. /* xcb_configure_window_value_list_t.sibling */
  10910. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  10911. xcb_block_len += uint32(4)
  10912. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10913. xcb_parts_idx++
  10914. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10915. }
  10916. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_STACK_MODE) != 0 {
  10917. /* xcb_configure_window_value_list_t.stack_mode */
  10918. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  10919. xcb_block_len += uint32(4)
  10920. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  10921. xcb_parts_idx++
  10922. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10923. }
  10924. /* insert padding */
  10925. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  10926. xcb_buffer_len += xcb_block_len + xcb_pad
  10927. if uint32(0) != xcb_pad {
  10928. xcb_parts[xcb_parts_idx].Fiov_base = bp
  10929. xcb_parts[xcb_parts_idx].Fiov_len = xcb_pad
  10930. xcb_parts_idx++
  10931. xcb_pad = uint32(0)
  10932. }
  10933. xcb_block_len = uint32(0)
  10934. xcb_padding_offset = uint32(0)
  10935. if libc.UintptrFromInt32(0) == xcb_out {
  10936. /* allocate memory */
  10937. xcb_out = libc.Xmalloc(tls, xcb_buffer_len)
  10938. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  10939. }
  10940. xcb_tmp = xcb_out
  10941. i = uint32(0)
  10942. for {
  10943. if !(i < xcb_parts_idx) {
  10944. break
  10945. }
  10946. if uintptr(0) != xcb_parts[i].Fiov_base && uint32(0) != xcb_parts[i].Fiov_len {
  10947. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  10948. }
  10949. if uint32(0) != xcb_parts[i].Fiov_len {
  10950. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  10951. }
  10952. goto _1
  10953. _1:
  10954. ;
  10955. i++
  10956. }
  10957. return libc.Int32FromUint32(xcb_buffer_len)
  10958. }
  10959. func Xxcb_configure_window_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint16_t, _aux uintptr) (r int32) {
  10960. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  10961. var xcb_tmp uintptr
  10962. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  10963. xcb_tmp = _buffer
  10964. xcb_buffer_len = uint32(0)
  10965. xcb_block_len = uint32(0)
  10966. xcb_pad = uint32(0)
  10967. xcb_align_to = uint32(0)
  10968. xcb_padding_offset = uint32(0)
  10969. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_X) != 0 {
  10970. /* xcb_configure_window_value_list_t.x */
  10971. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fx = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  10972. xcb_block_len += uint32(4)
  10973. xcb_tmp += uintptr(4)
  10974. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10975. }
  10976. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_Y) != 0 {
  10977. /* xcb_configure_window_value_list_t.y */
  10978. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fy = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  10979. xcb_block_len += uint32(4)
  10980. xcb_tmp += uintptr(4)
  10981. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10982. }
  10983. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_WIDTH) != 0 {
  10984. /* xcb_configure_window_value_list_t.width */
  10985. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fwidth = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10986. xcb_block_len += uint32(4)
  10987. xcb_tmp += uintptr(4)
  10988. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10989. }
  10990. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_HEIGHT) != 0 {
  10991. /* xcb_configure_window_value_list_t.height */
  10992. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fheight = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  10993. xcb_block_len += uint32(4)
  10994. xcb_tmp += uintptr(4)
  10995. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  10996. }
  10997. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_BORDER_WIDTH) != 0 {
  10998. /* xcb_configure_window_value_list_t.border_width */
  10999. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fborder_width = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11000. xcb_block_len += uint32(4)
  11001. xcb_tmp += uintptr(4)
  11002. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  11003. }
  11004. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_SIBLING) != 0 {
  11005. /* xcb_configure_window_value_list_t.sibling */
  11006. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fsibling = *(*Txcb_window_t)(unsafe.Pointer(xcb_tmp))
  11007. xcb_block_len += uint32(4)
  11008. xcb_tmp += uintptr(4)
  11009. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  11010. }
  11011. if libc.Int32FromUint16(value_mask)&int32(_XCB_CONFIG_WINDOW_STACK_MODE) != 0 {
  11012. /* xcb_configure_window_value_list_t.stack_mode */
  11013. (*Txcb_configure_window_value_list_t)(unsafe.Pointer(_aux)).Fstack_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  11014. xcb_block_len += uint32(4)
  11015. xcb_tmp += uintptr(4)
  11016. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  11017. }
  11018. /* insert padding */
  11019. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  11020. xcb_buffer_len += xcb_block_len + xcb_pad
  11021. if uint32(0) != xcb_pad {
  11022. xcb_tmp += uintptr(xcb_pad)
  11023. xcb_pad = uint32(0)
  11024. }
  11025. xcb_block_len = uint32(0)
  11026. xcb_padding_offset = uint32(0)
  11027. return libc.Int32FromUint32(xcb_buffer_len)
  11028. }
  11029. func Xxcb_configure_window_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint16_t) (r int32) {
  11030. bp := tls.Alloc(32)
  11031. defer tls.Free(32)
  11032. var _ /* _aux at bp+0 */ Txcb_configure_window_value_list_t
  11033. return Xxcb_configure_window_value_list_unpack(tls, _buffer, value_mask, bp)
  11034. }
  11035. func Xxcb_configure_window_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  11036. var _aux, xcb_tmp uintptr
  11037. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  11038. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  11039. xcb_tmp = _buffer
  11040. _aux = _buffer
  11041. xcb_buffer_len = uint32(0)
  11042. xcb_block_len = uint32(0)
  11043. xcb_pad = uint32(0)
  11044. xcb_align_to = uint32(0)
  11045. xcb_block_len += uint32(12)
  11046. xcb_tmp += uintptr(xcb_block_len)
  11047. xcb_buffer_len += xcb_block_len
  11048. xcb_block_len = uint32(0)
  11049. /* value_list */
  11050. xcb_block_len += libc.Uint32FromInt32(Xxcb_configure_window_value_list_sizeof(tls, xcb_tmp, (*Txcb_configure_window_request_t)(unsafe.Pointer(_aux)).Fvalue_mask))
  11051. xcb_tmp += uintptr(xcb_block_len)
  11052. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  11053. /* insert padding */
  11054. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  11055. xcb_buffer_len += xcb_block_len + xcb_pad
  11056. if uint32(0) != xcb_pad {
  11057. xcb_tmp += uintptr(xcb_pad)
  11058. xcb_pad = uint32(0)
  11059. }
  11060. xcb_block_len = uint32(0)
  11061. return libc.Int32FromUint32(xcb_buffer_len)
  11062. }
  11063. 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) {
  11064. bp := tls.Alloc(64)
  11065. defer tls.Free(64)
  11066. var xcb_ret Txcb_void_cookie_t
  11067. var _ /* xcb_out at bp+40 */ Txcb_configure_window_request_t
  11068. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  11069. _ = xcb_ret
  11070. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  11071. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fwindow = window
  11072. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  11073. libc.Xmemset(tls, bp+40+10, 0, uint32(2))
  11074. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  11075. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  11076. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11077. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11078. /* xcb_configure_window_value_list_t value_list */
  11079. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  11080. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_configure_window_value_list_sizeof(tls, value_list, value_mask))
  11081. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req26)))
  11082. return xcb_ret
  11083. }
  11084. var _xcb_req26 = Txcb_protocol_request_t{
  11085. Fcount: uint32(3),
  11086. Fopcode: uint8(m_XCB_CONFIGURE_WINDOW),
  11087. Fisvoid: uint8(1),
  11088. }
  11089. 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) {
  11090. bp := tls.Alloc(64)
  11091. defer tls.Free(64)
  11092. var xcb_ret Txcb_void_cookie_t
  11093. var _ /* xcb_out at bp+40 */ Txcb_configure_window_request_t
  11094. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  11095. _ = xcb_ret
  11096. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  11097. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fwindow = window
  11098. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  11099. libc.Xmemset(tls, bp+40+10, 0, uint32(2))
  11100. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  11101. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  11102. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11103. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11104. /* xcb_configure_window_value_list_t value_list */
  11105. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  11106. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_configure_window_value_list_sizeof(tls, value_list, value_mask))
  11107. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req27)))
  11108. return xcb_ret
  11109. }
  11110. var _xcb_req27 = Txcb_protocol_request_t{
  11111. Fcount: uint32(3),
  11112. Fopcode: uint8(m_XCB_CONFIGURE_WINDOW),
  11113. Fisvoid: uint8(1),
  11114. }
  11115. 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) {
  11116. bp := tls.Alloc(64)
  11117. defer tls.Free(64)
  11118. var xcb_ret Txcb_void_cookie_t
  11119. var _ /* xcb_aux0 at bp+52 */ uintptr
  11120. var _ /* xcb_out at bp+40 */ Txcb_configure_window_request_t
  11121. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  11122. _ = xcb_ret
  11123. *(*uintptr)(unsafe.Pointer(bp + 52)) = uintptr(0)
  11124. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  11125. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fwindow = window
  11126. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  11127. libc.Xmemset(tls, bp+40+10, 0, uint32(2))
  11128. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  11129. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  11130. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11131. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11132. /* xcb_configure_window_value_list_t value_list */
  11133. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_configure_window_value_list_serialize(tls, bp+52, value_mask, value_list))
  11134. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 52))
  11135. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req28)))
  11136. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 52)))
  11137. return xcb_ret
  11138. }
  11139. var _xcb_req28 = Txcb_protocol_request_t{
  11140. Fcount: uint32(3),
  11141. Fopcode: uint8(m_XCB_CONFIGURE_WINDOW),
  11142. Fisvoid: uint8(1),
  11143. }
  11144. 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) {
  11145. bp := tls.Alloc(64)
  11146. defer tls.Free(64)
  11147. var xcb_ret Txcb_void_cookie_t
  11148. var _ /* xcb_aux0 at bp+52 */ uintptr
  11149. var _ /* xcb_out at bp+40 */ Txcb_configure_window_request_t
  11150. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  11151. _ = xcb_ret
  11152. *(*uintptr)(unsafe.Pointer(bp + 52)) = uintptr(0)
  11153. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  11154. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fwindow = window
  11155. (*(*Txcb_configure_window_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  11156. libc.Xmemset(tls, bp+40+10, 0, uint32(2))
  11157. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  11158. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  11159. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11160. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11161. /* xcb_configure_window_value_list_t value_list */
  11162. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_configure_window_value_list_serialize(tls, bp+52, value_mask, value_list))
  11163. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 52))
  11164. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req29)))
  11165. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 52)))
  11166. return xcb_ret
  11167. }
  11168. var _xcb_req29 = Txcb_protocol_request_t{
  11169. Fcount: uint32(3),
  11170. Fopcode: uint8(m_XCB_CONFIGURE_WINDOW),
  11171. Fisvoid: uint8(1),
  11172. }
  11173. func Xxcb_configure_window_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  11174. return R + libc.UintptrFromInt32(1)*12
  11175. }
  11176. func Xxcb_circulate_window_checked(tls *libc.TLS, c uintptr, direction Tuint8_t, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11177. bp := tls.Alloc(48)
  11178. defer tls.Free(48)
  11179. var xcb_ret Txcb_void_cookie_t
  11180. var _ /* xcb_out at bp+32 */ Txcb_circulate_window_request_t
  11181. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11182. _ = xcb_ret
  11183. (*(*Txcb_circulate_window_request_t)(unsafe.Pointer(bp + 32))).Fdirection = direction
  11184. (*(*Txcb_circulate_window_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  11185. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11186. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11187. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11188. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11189. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req30)))
  11190. return xcb_ret
  11191. }
  11192. var _xcb_req30 = Txcb_protocol_request_t{
  11193. Fcount: uint32(2),
  11194. Fopcode: uint8(m_XCB_CIRCULATE_WINDOW),
  11195. Fisvoid: uint8(1),
  11196. }
  11197. func Xxcb_circulate_window(tls *libc.TLS, c uintptr, direction Tuint8_t, window Txcb_window_t) (r Txcb_void_cookie_t) {
  11198. bp := tls.Alloc(48)
  11199. defer tls.Free(48)
  11200. var xcb_ret Txcb_void_cookie_t
  11201. var _ /* xcb_out at bp+32 */ Txcb_circulate_window_request_t
  11202. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11203. _ = xcb_ret
  11204. (*(*Txcb_circulate_window_request_t)(unsafe.Pointer(bp + 32))).Fdirection = direction
  11205. (*(*Txcb_circulate_window_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  11206. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11207. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11208. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11209. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11210. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req31)))
  11211. return xcb_ret
  11212. }
  11213. var _xcb_req31 = Txcb_protocol_request_t{
  11214. Fcount: uint32(2),
  11215. Fopcode: uint8(m_XCB_CIRCULATE_WINDOW),
  11216. Fisvoid: uint8(1),
  11217. }
  11218. func Xxcb_get_geometry(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t) (r Txcb_get_geometry_cookie_t) {
  11219. bp := tls.Alloc(48)
  11220. defer tls.Free(48)
  11221. var xcb_ret Txcb_get_geometry_cookie_t
  11222. var _ /* xcb_out at bp+32 */ Txcb_get_geometry_request_t
  11223. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11224. _ = xcb_ret
  11225. (*(*Txcb_get_geometry_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11226. (*(*Txcb_get_geometry_request_t)(unsafe.Pointer(bp + 32))).Fdrawable = drawable
  11227. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11228. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11229. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11230. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11231. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req32)))
  11232. return xcb_ret
  11233. }
  11234. var _xcb_req32 = Txcb_protocol_request_t{
  11235. Fcount: uint32(2),
  11236. Fopcode: uint8(m_XCB_GET_GEOMETRY),
  11237. }
  11238. func Xxcb_get_geometry_unchecked(tls *libc.TLS, c uintptr, drawable Txcb_drawable_t) (r Txcb_get_geometry_cookie_t) {
  11239. bp := tls.Alloc(48)
  11240. defer tls.Free(48)
  11241. var xcb_ret Txcb_get_geometry_cookie_t
  11242. var _ /* xcb_out at bp+32 */ Txcb_get_geometry_request_t
  11243. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11244. _ = xcb_ret
  11245. (*(*Txcb_get_geometry_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11246. (*(*Txcb_get_geometry_request_t)(unsafe.Pointer(bp + 32))).Fdrawable = drawable
  11247. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11248. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11249. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11250. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11251. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req33)))
  11252. return xcb_ret
  11253. }
  11254. var _xcb_req33 = Txcb_protocol_request_t{
  11255. Fcount: uint32(2),
  11256. Fopcode: uint8(m_XCB_GET_GEOMETRY),
  11257. }
  11258. func Xxcb_get_geometry_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_geometry_cookie_t, e uintptr) (r uintptr) {
  11259. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  11260. }
  11261. func Xxcb_query_tree_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  11262. var _aux, xcb_tmp uintptr
  11263. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  11264. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  11265. xcb_tmp = _buffer
  11266. _aux = _buffer
  11267. xcb_buffer_len = uint32(0)
  11268. xcb_block_len = uint32(0)
  11269. xcb_pad = uint32(0)
  11270. xcb_align_to = uint32(0)
  11271. xcb_block_len += uint32(32)
  11272. xcb_tmp += uintptr(xcb_block_len)
  11273. xcb_buffer_len += xcb_block_len
  11274. xcb_block_len = uint32(0)
  11275. /* children */
  11276. xcb_block_len += uint32((*Txcb_query_tree_reply_t)(unsafe.Pointer(_aux)).Fchildren_len) * uint32(4)
  11277. xcb_tmp += uintptr(xcb_block_len)
  11278. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  11279. /* insert padding */
  11280. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  11281. xcb_buffer_len += xcb_block_len + xcb_pad
  11282. if uint32(0) != xcb_pad {
  11283. xcb_tmp += uintptr(xcb_pad)
  11284. xcb_pad = uint32(0)
  11285. }
  11286. xcb_block_len = uint32(0)
  11287. return libc.Int32FromUint32(xcb_buffer_len)
  11288. }
  11289. func Xxcb_query_tree(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_query_tree_cookie_t) {
  11290. bp := tls.Alloc(48)
  11291. defer tls.Free(48)
  11292. var xcb_ret Txcb_query_tree_cookie_t
  11293. var _ /* xcb_out at bp+32 */ Txcb_query_tree_request_t
  11294. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11295. _ = xcb_ret
  11296. (*(*Txcb_query_tree_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11297. (*(*Txcb_query_tree_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  11298. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11299. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11300. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11301. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11302. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req34)))
  11303. return xcb_ret
  11304. }
  11305. var _xcb_req34 = Txcb_protocol_request_t{
  11306. Fcount: uint32(2),
  11307. Fopcode: uint8(m_XCB_QUERY_TREE),
  11308. }
  11309. func Xxcb_query_tree_unchecked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_query_tree_cookie_t) {
  11310. bp := tls.Alloc(48)
  11311. defer tls.Free(48)
  11312. var xcb_ret Txcb_query_tree_cookie_t
  11313. var _ /* xcb_out at bp+32 */ Txcb_query_tree_request_t
  11314. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11315. _ = xcb_ret
  11316. (*(*Txcb_query_tree_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11317. (*(*Txcb_query_tree_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  11318. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11319. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11320. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11321. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11322. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req35)))
  11323. return xcb_ret
  11324. }
  11325. var _xcb_req35 = Txcb_protocol_request_t{
  11326. Fcount: uint32(2),
  11327. Fopcode: uint8(m_XCB_QUERY_TREE),
  11328. }
  11329. func Xxcb_query_tree_children(tls *libc.TLS, R uintptr) (r uintptr) {
  11330. return R + libc.UintptrFromInt32(1)*32
  11331. }
  11332. func Xxcb_query_tree_children_length(tls *libc.TLS, R uintptr) (r int32) {
  11333. return libc.Int32FromUint16((*Txcb_query_tree_reply_t)(unsafe.Pointer(R)).Fchildren_len)
  11334. }
  11335. func Xxcb_query_tree_children_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  11336. var i Txcb_generic_iterator_t
  11337. _ = i
  11338. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_query_tree_reply_t)(unsafe.Pointer(R)).Fchildren_len)*4
  11339. i.Frem = 0
  11340. i.Findex = int32(i.Fdata) - int32(R)
  11341. return i
  11342. }
  11343. func Xxcb_query_tree_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_tree_cookie_t, e uintptr) (r uintptr) {
  11344. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  11345. }
  11346. func Xxcb_intern_atom_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  11347. var _aux, xcb_tmp uintptr
  11348. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  11349. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  11350. xcb_tmp = _buffer
  11351. _aux = _buffer
  11352. xcb_buffer_len = uint32(0)
  11353. xcb_block_len = uint32(0)
  11354. xcb_pad = uint32(0)
  11355. xcb_align_to = uint32(0)
  11356. xcb_block_len += uint32(8)
  11357. xcb_tmp += uintptr(xcb_block_len)
  11358. xcb_buffer_len += xcb_block_len
  11359. xcb_block_len = uint32(0)
  11360. /* name */
  11361. xcb_block_len += uint32((*Txcb_intern_atom_request_t)(unsafe.Pointer(_aux)).Fname_len) * uint32(1)
  11362. xcb_tmp += uintptr(xcb_block_len)
  11363. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  11364. /* insert padding */
  11365. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  11366. xcb_buffer_len += xcb_block_len + xcb_pad
  11367. if uint32(0) != xcb_pad {
  11368. xcb_tmp += uintptr(xcb_pad)
  11369. xcb_pad = uint32(0)
  11370. }
  11371. xcb_block_len = uint32(0)
  11372. return libc.Int32FromUint32(xcb_buffer_len)
  11373. }
  11374. 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) {
  11375. bp := tls.Alloc(64)
  11376. defer tls.Free(64)
  11377. var xcb_ret Txcb_intern_atom_cookie_t
  11378. var _ /* xcb_out at bp+48 */ Txcb_intern_atom_request_t
  11379. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  11380. _ = xcb_ret
  11381. (*(*Txcb_intern_atom_request_t)(unsafe.Pointer(bp + 48))).Fonly_if_exists = only_if_exists
  11382. (*(*Txcb_intern_atom_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  11383. libc.Xmemset(tls, bp+48+6, 0, uint32(2))
  11384. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  11385. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11386. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11387. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11388. /* char name */
  11389. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  11390. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  11391. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  11392. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  11393. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req36)))
  11394. return xcb_ret
  11395. }
  11396. var _xcb_req36 = Txcb_protocol_request_t{
  11397. Fcount: uint32(4),
  11398. Fopcode: uint8(m_XCB_INTERN_ATOM),
  11399. }
  11400. 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) {
  11401. bp := tls.Alloc(64)
  11402. defer tls.Free(64)
  11403. var xcb_ret Txcb_intern_atom_cookie_t
  11404. var _ /* xcb_out at bp+48 */ Txcb_intern_atom_request_t
  11405. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  11406. _ = xcb_ret
  11407. (*(*Txcb_intern_atom_request_t)(unsafe.Pointer(bp + 48))).Fonly_if_exists = only_if_exists
  11408. (*(*Txcb_intern_atom_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  11409. libc.Xmemset(tls, bp+48+6, 0, uint32(2))
  11410. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  11411. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11412. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11413. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11414. /* char name */
  11415. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  11416. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  11417. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  11418. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  11419. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req37)))
  11420. return xcb_ret
  11421. }
  11422. var _xcb_req37 = Txcb_protocol_request_t{
  11423. Fcount: uint32(4),
  11424. Fopcode: uint8(m_XCB_INTERN_ATOM),
  11425. }
  11426. func Xxcb_intern_atom_reply(tls *libc.TLS, c uintptr, cookie Txcb_intern_atom_cookie_t, e uintptr) (r uintptr) {
  11427. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  11428. }
  11429. func Xxcb_get_atom_name_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  11430. var _aux, xcb_tmp uintptr
  11431. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  11432. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  11433. xcb_tmp = _buffer
  11434. _aux = _buffer
  11435. xcb_buffer_len = uint32(0)
  11436. xcb_block_len = uint32(0)
  11437. xcb_pad = uint32(0)
  11438. xcb_align_to = uint32(0)
  11439. xcb_block_len += uint32(32)
  11440. xcb_tmp += uintptr(xcb_block_len)
  11441. xcb_buffer_len += xcb_block_len
  11442. xcb_block_len = uint32(0)
  11443. /* name */
  11444. xcb_block_len += uint32((*Txcb_get_atom_name_reply_t)(unsafe.Pointer(_aux)).Fname_len) * uint32(1)
  11445. xcb_tmp += uintptr(xcb_block_len)
  11446. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  11447. /* insert padding */
  11448. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  11449. xcb_buffer_len += xcb_block_len + xcb_pad
  11450. if uint32(0) != xcb_pad {
  11451. xcb_tmp += uintptr(xcb_pad)
  11452. xcb_pad = uint32(0)
  11453. }
  11454. xcb_block_len = uint32(0)
  11455. return libc.Int32FromUint32(xcb_buffer_len)
  11456. }
  11457. func Xxcb_get_atom_name(tls *libc.TLS, c uintptr, atom Txcb_atom_t) (r Txcb_get_atom_name_cookie_t) {
  11458. bp := tls.Alloc(48)
  11459. defer tls.Free(48)
  11460. var xcb_ret Txcb_get_atom_name_cookie_t
  11461. var _ /* xcb_out at bp+32 */ Txcb_get_atom_name_request_t
  11462. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11463. _ = xcb_ret
  11464. (*(*Txcb_get_atom_name_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11465. (*(*Txcb_get_atom_name_request_t)(unsafe.Pointer(bp + 32))).Fatom = atom
  11466. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11467. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11468. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11469. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11470. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req38)))
  11471. return xcb_ret
  11472. }
  11473. var _xcb_req38 = Txcb_protocol_request_t{
  11474. Fcount: uint32(2),
  11475. Fopcode: uint8(m_XCB_GET_ATOM_NAME),
  11476. }
  11477. func Xxcb_get_atom_name_unchecked(tls *libc.TLS, c uintptr, atom Txcb_atom_t) (r Txcb_get_atom_name_cookie_t) {
  11478. bp := tls.Alloc(48)
  11479. defer tls.Free(48)
  11480. var xcb_ret Txcb_get_atom_name_cookie_t
  11481. var _ /* xcb_out at bp+32 */ Txcb_get_atom_name_request_t
  11482. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11483. _ = xcb_ret
  11484. (*(*Txcb_get_atom_name_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11485. (*(*Txcb_get_atom_name_request_t)(unsafe.Pointer(bp + 32))).Fatom = atom
  11486. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11487. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11488. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11489. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11490. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req39)))
  11491. return xcb_ret
  11492. }
  11493. var _xcb_req39 = Txcb_protocol_request_t{
  11494. Fcount: uint32(2),
  11495. Fopcode: uint8(m_XCB_GET_ATOM_NAME),
  11496. }
  11497. func Xxcb_get_atom_name_name(tls *libc.TLS, R uintptr) (r uintptr) {
  11498. return R + libc.UintptrFromInt32(1)*32
  11499. }
  11500. func Xxcb_get_atom_name_name_length(tls *libc.TLS, R uintptr) (r int32) {
  11501. return libc.Int32FromUint16((*Txcb_get_atom_name_reply_t)(unsafe.Pointer(R)).Fname_len)
  11502. }
  11503. func Xxcb_get_atom_name_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  11504. var i Txcb_generic_iterator_t
  11505. _ = i
  11506. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_get_atom_name_reply_t)(unsafe.Pointer(R)).Fname_len)
  11507. i.Frem = 0
  11508. i.Findex = int32(i.Fdata) - int32(R)
  11509. return i
  11510. }
  11511. func Xxcb_get_atom_name_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_atom_name_cookie_t, e uintptr) (r uintptr) {
  11512. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  11513. }
  11514. func Xxcb_change_property_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  11515. var _aux, xcb_tmp uintptr
  11516. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  11517. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  11518. xcb_tmp = _buffer
  11519. _aux = _buffer
  11520. xcb_buffer_len = uint32(0)
  11521. xcb_block_len = uint32(0)
  11522. xcb_pad = uint32(0)
  11523. xcb_align_to = uint32(0)
  11524. xcb_block_len += uint32(24)
  11525. xcb_tmp += uintptr(xcb_block_len)
  11526. xcb_buffer_len += xcb_block_len
  11527. xcb_block_len = uint32(0)
  11528. /* data */
  11529. xcb_block_len += (*Txcb_change_property_request_t)(unsafe.Pointer(_aux)).Fdata_len * uint32((*Txcb_change_property_request_t)(unsafe.Pointer(_aux)).Fformat) / uint32(8) * uint32(1)
  11530. xcb_tmp += uintptr(xcb_block_len)
  11531. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  11532. /* insert padding */
  11533. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  11534. xcb_buffer_len += xcb_block_len + xcb_pad
  11535. if uint32(0) != xcb_pad {
  11536. xcb_tmp += uintptr(xcb_pad)
  11537. xcb_pad = uint32(0)
  11538. }
  11539. xcb_block_len = uint32(0)
  11540. return libc.Int32FromUint32(xcb_buffer_len)
  11541. }
  11542. 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) {
  11543. bp := tls.Alloc(80)
  11544. defer tls.Free(80)
  11545. var xcb_ret Txcb_void_cookie_t
  11546. var _ /* xcb_out at bp+48 */ Txcb_change_property_request_t
  11547. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  11548. _ = xcb_ret
  11549. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Fmode = mode
  11550. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Fwindow = window
  11551. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Fproperty = property
  11552. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Ftype1 = type1
  11553. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Fformat = format
  11554. libc.Xmemset(tls, bp+48+17, 0, uint32(3))
  11555. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Fdata_len = data_len
  11556. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  11557. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  11558. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11559. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11560. /* void data */
  11561. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = data
  11562. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = data_len * uint32(format) / uint32(8) * uint32(1)
  11563. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  11564. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  11565. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req40)))
  11566. return xcb_ret
  11567. }
  11568. var _xcb_req40 = Txcb_protocol_request_t{
  11569. Fcount: uint32(4),
  11570. Fopcode: uint8(m_XCB_CHANGE_PROPERTY),
  11571. Fisvoid: uint8(1),
  11572. }
  11573. 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) {
  11574. bp := tls.Alloc(80)
  11575. defer tls.Free(80)
  11576. var xcb_ret Txcb_void_cookie_t
  11577. var _ /* xcb_out at bp+48 */ Txcb_change_property_request_t
  11578. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  11579. _ = xcb_ret
  11580. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Fmode = mode
  11581. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Fwindow = window
  11582. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Fproperty = property
  11583. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Ftype1 = type1
  11584. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Fformat = format
  11585. libc.Xmemset(tls, bp+48+17, 0, uint32(3))
  11586. (*(*Txcb_change_property_request_t)(unsafe.Pointer(bp + 48))).Fdata_len = data_len
  11587. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  11588. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  11589. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11590. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11591. /* void data */
  11592. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = data
  11593. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = data_len * uint32(format) / uint32(8) * uint32(1)
  11594. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  11595. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  11596. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req41)))
  11597. return xcb_ret
  11598. }
  11599. var _xcb_req41 = Txcb_protocol_request_t{
  11600. Fcount: uint32(4),
  11601. Fopcode: uint8(m_XCB_CHANGE_PROPERTY),
  11602. Fisvoid: uint8(1),
  11603. }
  11604. func Xxcb_change_property_data(tls *libc.TLS, R uintptr) (r uintptr) {
  11605. return R + libc.UintptrFromInt32(1)*24
  11606. }
  11607. func Xxcb_change_property_data_length(tls *libc.TLS, R uintptr) (r int32) {
  11608. 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))
  11609. }
  11610. func Xxcb_change_property_data_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  11611. var i Txcb_generic_iterator_t
  11612. _ = i
  11613. 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))
  11614. i.Frem = 0
  11615. i.Findex = int32(i.Fdata) - int32(R)
  11616. return i
  11617. }
  11618. func Xxcb_delete_property_checked(tls *libc.TLS, c uintptr, window Txcb_window_t, property Txcb_atom_t) (r Txcb_void_cookie_t) {
  11619. bp := tls.Alloc(48)
  11620. defer tls.Free(48)
  11621. var xcb_ret Txcb_void_cookie_t
  11622. var _ /* xcb_out at bp+32 */ Txcb_delete_property_request_t
  11623. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11624. _ = xcb_ret
  11625. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11626. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  11627. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 32))).Fproperty = property
  11628. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11629. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  11630. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11631. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11632. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req42)))
  11633. return xcb_ret
  11634. }
  11635. var _xcb_req42 = Txcb_protocol_request_t{
  11636. Fcount: uint32(2),
  11637. Fopcode: uint8(m_XCB_DELETE_PROPERTY),
  11638. Fisvoid: uint8(1),
  11639. }
  11640. func Xxcb_delete_property(tls *libc.TLS, c uintptr, window Txcb_window_t, property Txcb_atom_t) (r Txcb_void_cookie_t) {
  11641. bp := tls.Alloc(48)
  11642. defer tls.Free(48)
  11643. var xcb_ret Txcb_void_cookie_t
  11644. var _ /* xcb_out at bp+32 */ Txcb_delete_property_request_t
  11645. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11646. _ = xcb_ret
  11647. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11648. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  11649. (*(*Txcb_delete_property_request_t)(unsafe.Pointer(bp + 32))).Fproperty = property
  11650. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11651. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  11652. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11653. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11654. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req43)))
  11655. return xcb_ret
  11656. }
  11657. var _xcb_req43 = Txcb_protocol_request_t{
  11658. Fcount: uint32(2),
  11659. Fopcode: uint8(m_XCB_DELETE_PROPERTY),
  11660. Fisvoid: uint8(1),
  11661. }
  11662. func Xxcb_get_property_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  11663. var _aux, xcb_tmp uintptr
  11664. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  11665. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  11666. xcb_tmp = _buffer
  11667. _aux = _buffer
  11668. xcb_buffer_len = uint32(0)
  11669. xcb_block_len = uint32(0)
  11670. xcb_pad = uint32(0)
  11671. xcb_align_to = uint32(0)
  11672. xcb_block_len += uint32(32)
  11673. xcb_tmp += uintptr(xcb_block_len)
  11674. xcb_buffer_len += xcb_block_len
  11675. xcb_block_len = uint32(0)
  11676. /* value */
  11677. xcb_block_len += (*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)) * uint32(1)
  11678. xcb_tmp += uintptr(xcb_block_len)
  11679. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  11680. /* insert padding */
  11681. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  11682. xcb_buffer_len += xcb_block_len + xcb_pad
  11683. if uint32(0) != xcb_pad {
  11684. xcb_tmp += uintptr(xcb_pad)
  11685. xcb_pad = uint32(0)
  11686. }
  11687. xcb_block_len = uint32(0)
  11688. return libc.Int32FromUint32(xcb_buffer_len)
  11689. }
  11690. 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) {
  11691. bp := tls.Alloc(64)
  11692. defer tls.Free(64)
  11693. var xcb_ret Txcb_get_property_cookie_t
  11694. var _ /* xcb_out at bp+32 */ Txcb_get_property_request_t
  11695. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11696. _ = xcb_ret
  11697. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).F_delete = _delete
  11698. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  11699. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).Fproperty = property
  11700. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).Ftype1 = type1
  11701. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).Flong_offset = long_offset
  11702. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).Flong_length = long_length
  11703. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11704. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  11705. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11706. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11707. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req44)))
  11708. return xcb_ret
  11709. }
  11710. var _xcb_req44 = Txcb_protocol_request_t{
  11711. Fcount: uint32(2),
  11712. Fopcode: uint8(m_XCB_GET_PROPERTY),
  11713. }
  11714. 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) {
  11715. bp := tls.Alloc(64)
  11716. defer tls.Free(64)
  11717. var xcb_ret Txcb_get_property_cookie_t
  11718. var _ /* xcb_out at bp+32 */ Txcb_get_property_request_t
  11719. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11720. _ = xcb_ret
  11721. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).F_delete = _delete
  11722. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  11723. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).Fproperty = property
  11724. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).Ftype1 = type1
  11725. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).Flong_offset = long_offset
  11726. (*(*Txcb_get_property_request_t)(unsafe.Pointer(bp + 32))).Flong_length = long_length
  11727. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11728. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  11729. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11730. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11731. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req45)))
  11732. return xcb_ret
  11733. }
  11734. var _xcb_req45 = Txcb_protocol_request_t{
  11735. Fcount: uint32(2),
  11736. Fopcode: uint8(m_XCB_GET_PROPERTY),
  11737. }
  11738. func Xxcb_get_property_value(tls *libc.TLS, R uintptr) (r uintptr) {
  11739. return R + libc.UintptrFromInt32(1)*32
  11740. }
  11741. func Xxcb_get_property_value_length(tls *libc.TLS, R uintptr) (r int32) {
  11742. 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)))
  11743. }
  11744. func Xxcb_get_property_value_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  11745. var i Txcb_generic_iterator_t
  11746. _ = i
  11747. 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)))
  11748. i.Frem = 0
  11749. i.Findex = int32(i.Fdata) - int32(R)
  11750. return i
  11751. }
  11752. func Xxcb_get_property_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_property_cookie_t, e uintptr) (r uintptr) {
  11753. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  11754. }
  11755. func Xxcb_list_properties_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  11756. var _aux, xcb_tmp uintptr
  11757. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  11758. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  11759. xcb_tmp = _buffer
  11760. _aux = _buffer
  11761. xcb_buffer_len = uint32(0)
  11762. xcb_block_len = uint32(0)
  11763. xcb_pad = uint32(0)
  11764. xcb_align_to = uint32(0)
  11765. xcb_block_len += uint32(32)
  11766. xcb_tmp += uintptr(xcb_block_len)
  11767. xcb_buffer_len += xcb_block_len
  11768. xcb_block_len = uint32(0)
  11769. /* atoms */
  11770. xcb_block_len += uint32((*Txcb_list_properties_reply_t)(unsafe.Pointer(_aux)).Fatoms_len) * uint32(4)
  11771. xcb_tmp += uintptr(xcb_block_len)
  11772. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  11773. /* insert padding */
  11774. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  11775. xcb_buffer_len += xcb_block_len + xcb_pad
  11776. if uint32(0) != xcb_pad {
  11777. xcb_tmp += uintptr(xcb_pad)
  11778. xcb_pad = uint32(0)
  11779. }
  11780. xcb_block_len = uint32(0)
  11781. return libc.Int32FromUint32(xcb_buffer_len)
  11782. }
  11783. func Xxcb_list_properties(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_list_properties_cookie_t) {
  11784. bp := tls.Alloc(48)
  11785. defer tls.Free(48)
  11786. var xcb_ret Txcb_list_properties_cookie_t
  11787. var _ /* xcb_out at bp+32 */ Txcb_list_properties_request_t
  11788. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11789. _ = xcb_ret
  11790. (*(*Txcb_list_properties_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11791. (*(*Txcb_list_properties_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  11792. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11793. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11794. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11795. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11796. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req46)))
  11797. return xcb_ret
  11798. }
  11799. var _xcb_req46 = Txcb_protocol_request_t{
  11800. Fcount: uint32(2),
  11801. Fopcode: uint8(m_XCB_LIST_PROPERTIES),
  11802. }
  11803. func Xxcb_list_properties_unchecked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_list_properties_cookie_t) {
  11804. bp := tls.Alloc(48)
  11805. defer tls.Free(48)
  11806. var xcb_ret Txcb_list_properties_cookie_t
  11807. var _ /* xcb_out at bp+32 */ Txcb_list_properties_request_t
  11808. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11809. _ = xcb_ret
  11810. (*(*Txcb_list_properties_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11811. (*(*Txcb_list_properties_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  11812. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11813. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11814. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11815. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11816. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req47)))
  11817. return xcb_ret
  11818. }
  11819. var _xcb_req47 = Txcb_protocol_request_t{
  11820. Fcount: uint32(2),
  11821. Fopcode: uint8(m_XCB_LIST_PROPERTIES),
  11822. }
  11823. func Xxcb_list_properties_atoms(tls *libc.TLS, R uintptr) (r uintptr) {
  11824. return R + libc.UintptrFromInt32(1)*32
  11825. }
  11826. func Xxcb_list_properties_atoms_length(tls *libc.TLS, R uintptr) (r int32) {
  11827. return libc.Int32FromUint16((*Txcb_list_properties_reply_t)(unsafe.Pointer(R)).Fatoms_len)
  11828. }
  11829. func Xxcb_list_properties_atoms_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  11830. var i Txcb_generic_iterator_t
  11831. _ = i
  11832. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_list_properties_reply_t)(unsafe.Pointer(R)).Fatoms_len)*4
  11833. i.Frem = 0
  11834. i.Findex = int32(i.Fdata) - int32(R)
  11835. return i
  11836. }
  11837. func Xxcb_list_properties_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_properties_cookie_t, e uintptr) (r uintptr) {
  11838. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  11839. }
  11840. 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) {
  11841. bp := tls.Alloc(48)
  11842. defer tls.Free(48)
  11843. var xcb_ret Txcb_void_cookie_t
  11844. var _ /* xcb_out at bp+32 */ Txcb_set_selection_owner_request_t
  11845. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11846. _ = xcb_ret
  11847. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11848. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Fowner = owner
  11849. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Fselection = selection
  11850. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  11851. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11852. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  11853. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11854. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11855. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req48)))
  11856. return xcb_ret
  11857. }
  11858. var _xcb_req48 = Txcb_protocol_request_t{
  11859. Fcount: uint32(2),
  11860. Fopcode: uint8(m_XCB_SET_SELECTION_OWNER),
  11861. Fisvoid: uint8(1),
  11862. }
  11863. 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) {
  11864. bp := tls.Alloc(48)
  11865. defer tls.Free(48)
  11866. var xcb_ret Txcb_void_cookie_t
  11867. var _ /* xcb_out at bp+32 */ Txcb_set_selection_owner_request_t
  11868. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11869. _ = xcb_ret
  11870. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11871. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Fowner = owner
  11872. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Fselection = selection
  11873. (*(*Txcb_set_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  11874. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11875. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  11876. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11877. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11878. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req49)))
  11879. return xcb_ret
  11880. }
  11881. var _xcb_req49 = Txcb_protocol_request_t{
  11882. Fcount: uint32(2),
  11883. Fopcode: uint8(m_XCB_SET_SELECTION_OWNER),
  11884. Fisvoid: uint8(1),
  11885. }
  11886. func Xxcb_get_selection_owner(tls *libc.TLS, c uintptr, selection Txcb_atom_t) (r Txcb_get_selection_owner_cookie_t) {
  11887. bp := tls.Alloc(48)
  11888. defer tls.Free(48)
  11889. var xcb_ret Txcb_get_selection_owner_cookie_t
  11890. var _ /* xcb_out at bp+32 */ Txcb_get_selection_owner_request_t
  11891. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11892. _ = xcb_ret
  11893. (*(*Txcb_get_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11894. (*(*Txcb_get_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Fselection = selection
  11895. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11896. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11897. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11898. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11899. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req50)))
  11900. return xcb_ret
  11901. }
  11902. var _xcb_req50 = Txcb_protocol_request_t{
  11903. Fcount: uint32(2),
  11904. Fopcode: uint8(m_XCB_GET_SELECTION_OWNER),
  11905. }
  11906. func Xxcb_get_selection_owner_unchecked(tls *libc.TLS, c uintptr, selection Txcb_atom_t) (r Txcb_get_selection_owner_cookie_t) {
  11907. bp := tls.Alloc(48)
  11908. defer tls.Free(48)
  11909. var xcb_ret Txcb_get_selection_owner_cookie_t
  11910. var _ /* xcb_out at bp+32 */ Txcb_get_selection_owner_request_t
  11911. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11912. _ = xcb_ret
  11913. (*(*Txcb_get_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11914. (*(*Txcb_get_selection_owner_request_t)(unsafe.Pointer(bp + 32))).Fselection = selection
  11915. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11916. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  11917. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11918. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11919. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req51)))
  11920. return xcb_ret
  11921. }
  11922. var _xcb_req51 = Txcb_protocol_request_t{
  11923. Fcount: uint32(2),
  11924. Fopcode: uint8(m_XCB_GET_SELECTION_OWNER),
  11925. }
  11926. func Xxcb_get_selection_owner_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_selection_owner_cookie_t, e uintptr) (r uintptr) {
  11927. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  11928. }
  11929. 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) {
  11930. bp := tls.Alloc(64)
  11931. defer tls.Free(64)
  11932. var xcb_ret Txcb_void_cookie_t
  11933. var _ /* xcb_out at bp+32 */ Txcb_convert_selection_request_t
  11934. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11935. _ = xcb_ret
  11936. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11937. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Frequestor = requestor
  11938. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Fselection = selection
  11939. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Ftarget = target
  11940. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Fproperty = property
  11941. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  11942. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11943. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  11944. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11945. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11946. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req52)))
  11947. return xcb_ret
  11948. }
  11949. var _xcb_req52 = Txcb_protocol_request_t{
  11950. Fcount: uint32(2),
  11951. Fopcode: uint8(m_XCB_CONVERT_SELECTION),
  11952. Fisvoid: uint8(1),
  11953. }
  11954. 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) {
  11955. bp := tls.Alloc(64)
  11956. defer tls.Free(64)
  11957. var xcb_ret Txcb_void_cookie_t
  11958. var _ /* xcb_out at bp+32 */ Txcb_convert_selection_request_t
  11959. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11960. _ = xcb_ret
  11961. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  11962. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Frequestor = requestor
  11963. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Fselection = selection
  11964. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Ftarget = target
  11965. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Fproperty = property
  11966. (*(*Txcb_convert_selection_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  11967. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11968. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  11969. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11970. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11971. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req53)))
  11972. return xcb_ret
  11973. }
  11974. var _xcb_req53 = Txcb_protocol_request_t{
  11975. Fcount: uint32(2),
  11976. Fopcode: uint8(m_XCB_CONVERT_SELECTION),
  11977. Fisvoid: uint8(1),
  11978. }
  11979. 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) {
  11980. bp := tls.Alloc(80)
  11981. defer tls.Free(80)
  11982. var xcb_ret Txcb_void_cookie_t
  11983. var _ /* xcb_out at bp+32 */ Txcb_send_event_request_t
  11984. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  11985. _ = xcb_ret
  11986. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 32))).Fpropagate = propagate
  11987. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 32))).Fdestination = destination
  11988. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 32))).Fevent_mask = event_mask
  11989. libc.Xmemcpy(tls, bp+32+12, event, uint32(32))
  11990. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  11991. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(44)
  11992. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  11993. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  11994. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req54)))
  11995. return xcb_ret
  11996. }
  11997. var _xcb_req54 = Txcb_protocol_request_t{
  11998. Fcount: uint32(2),
  11999. Fopcode: uint8(m_XCB_SEND_EVENT),
  12000. Fisvoid: uint8(1),
  12001. }
  12002. 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) {
  12003. bp := tls.Alloc(80)
  12004. defer tls.Free(80)
  12005. var xcb_ret Txcb_void_cookie_t
  12006. var _ /* xcb_out at bp+32 */ Txcb_send_event_request_t
  12007. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12008. _ = xcb_ret
  12009. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 32))).Fpropagate = propagate
  12010. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 32))).Fdestination = destination
  12011. (*(*Txcb_send_event_request_t)(unsafe.Pointer(bp + 32))).Fevent_mask = event_mask
  12012. libc.Xmemcpy(tls, bp+32+12, event, uint32(32))
  12013. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12014. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(44)
  12015. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12016. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12017. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req55)))
  12018. return xcb_ret
  12019. }
  12020. var _xcb_req55 = Txcb_protocol_request_t{
  12021. Fcount: uint32(2),
  12022. Fopcode: uint8(m_XCB_SEND_EVENT),
  12023. Fisvoid: uint8(1),
  12024. }
  12025. 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) {
  12026. bp := tls.Alloc(64)
  12027. defer tls.Free(64)
  12028. var xcb_ret Txcb_grab_pointer_cookie_t
  12029. var _ /* xcb_out at bp+32 */ Txcb_grab_pointer_request_t
  12030. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12031. _ = xcb_ret
  12032. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fowner_events = owner_events
  12033. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12034. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fevent_mask = event_mask
  12035. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fpointer_mode = pointer_mode
  12036. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fkeyboard_mode = keyboard_mode
  12037. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fconfine_to = confine_to
  12038. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fcursor = cursor
  12039. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12040. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12041. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  12042. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12043. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12044. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req56)))
  12045. return xcb_ret
  12046. }
  12047. var _xcb_req56 = Txcb_protocol_request_t{
  12048. Fcount: uint32(2),
  12049. Fopcode: uint8(m_XCB_GRAB_POINTER),
  12050. }
  12051. 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) {
  12052. bp := tls.Alloc(64)
  12053. defer tls.Free(64)
  12054. var xcb_ret Txcb_grab_pointer_cookie_t
  12055. var _ /* xcb_out at bp+32 */ Txcb_grab_pointer_request_t
  12056. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12057. _ = xcb_ret
  12058. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fowner_events = owner_events
  12059. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12060. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fevent_mask = event_mask
  12061. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fpointer_mode = pointer_mode
  12062. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fkeyboard_mode = keyboard_mode
  12063. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fconfine_to = confine_to
  12064. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fcursor = cursor
  12065. (*(*Txcb_grab_pointer_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12066. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12067. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  12068. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12069. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12070. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req57)))
  12071. return xcb_ret
  12072. }
  12073. var _xcb_req57 = Txcb_protocol_request_t{
  12074. Fcount: uint32(2),
  12075. Fopcode: uint8(m_XCB_GRAB_POINTER),
  12076. }
  12077. func Xxcb_grab_pointer_reply(tls *libc.TLS, c uintptr, cookie Txcb_grab_pointer_cookie_t, e uintptr) (r uintptr) {
  12078. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12079. }
  12080. func Xxcb_ungrab_pointer_checked(tls *libc.TLS, c uintptr, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12081. bp := tls.Alloc(48)
  12082. defer tls.Free(48)
  12083. var xcb_ret Txcb_void_cookie_t
  12084. var _ /* xcb_out at bp+32 */ Txcb_ungrab_pointer_request_t
  12085. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12086. _ = xcb_ret
  12087. (*(*Txcb_ungrab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12088. (*(*Txcb_ungrab_pointer_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12089. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12090. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  12091. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12092. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12093. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req58)))
  12094. return xcb_ret
  12095. }
  12096. var _xcb_req58 = Txcb_protocol_request_t{
  12097. Fcount: uint32(2),
  12098. Fopcode: uint8(m_XCB_UNGRAB_POINTER),
  12099. Fisvoid: uint8(1),
  12100. }
  12101. func Xxcb_ungrab_pointer(tls *libc.TLS, c uintptr, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12102. bp := tls.Alloc(48)
  12103. defer tls.Free(48)
  12104. var xcb_ret Txcb_void_cookie_t
  12105. var _ /* xcb_out at bp+32 */ Txcb_ungrab_pointer_request_t
  12106. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12107. _ = xcb_ret
  12108. (*(*Txcb_ungrab_pointer_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12109. (*(*Txcb_ungrab_pointer_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12110. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12111. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  12112. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12113. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12114. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req59)))
  12115. return xcb_ret
  12116. }
  12117. var _xcb_req59 = Txcb_protocol_request_t{
  12118. Fcount: uint32(2),
  12119. Fopcode: uint8(m_XCB_UNGRAB_POINTER),
  12120. Fisvoid: uint8(1),
  12121. }
  12122. 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) {
  12123. bp := tls.Alloc(64)
  12124. defer tls.Free(64)
  12125. var xcb_ret Txcb_void_cookie_t
  12126. var _ /* xcb_out at bp+32 */ Txcb_grab_button_request_t
  12127. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12128. _ = xcb_ret
  12129. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fowner_events = owner_events
  12130. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12131. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fevent_mask = event_mask
  12132. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fpointer_mode = pointer_mode
  12133. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fkeyboard_mode = keyboard_mode
  12134. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fconfine_to = confine_to
  12135. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fcursor = cursor
  12136. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fbutton = button
  12137. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12138. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fmodifiers = modifiers
  12139. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12140. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  12141. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12142. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12143. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req60)))
  12144. return xcb_ret
  12145. }
  12146. var _xcb_req60 = Txcb_protocol_request_t{
  12147. Fcount: uint32(2),
  12148. Fopcode: uint8(m_XCB_GRAB_BUTTON),
  12149. Fisvoid: uint8(1),
  12150. }
  12151. 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) {
  12152. bp := tls.Alloc(64)
  12153. defer tls.Free(64)
  12154. var xcb_ret Txcb_void_cookie_t
  12155. var _ /* xcb_out at bp+32 */ Txcb_grab_button_request_t
  12156. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12157. _ = xcb_ret
  12158. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fowner_events = owner_events
  12159. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12160. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fevent_mask = event_mask
  12161. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fpointer_mode = pointer_mode
  12162. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fkeyboard_mode = keyboard_mode
  12163. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fconfine_to = confine_to
  12164. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fcursor = cursor
  12165. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fbutton = button
  12166. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12167. (*(*Txcb_grab_button_request_t)(unsafe.Pointer(bp + 32))).Fmodifiers = modifiers
  12168. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12169. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  12170. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12171. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12172. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req61)))
  12173. return xcb_ret
  12174. }
  12175. var _xcb_req61 = Txcb_protocol_request_t{
  12176. Fcount: uint32(2),
  12177. Fopcode: uint8(m_XCB_GRAB_BUTTON),
  12178. Fisvoid: uint8(1),
  12179. }
  12180. 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) {
  12181. bp := tls.Alloc(48)
  12182. defer tls.Free(48)
  12183. var xcb_ret Txcb_void_cookie_t
  12184. var _ /* xcb_out at bp+32 */ Txcb_ungrab_button_request_t
  12185. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12186. _ = xcb_ret
  12187. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 32))).Fbutton = button
  12188. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12189. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 32))).Fmodifiers = modifiers
  12190. libc.Xmemset(tls, bp+32+10, 0, uint32(2))
  12191. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12192. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  12193. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12194. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12195. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req62)))
  12196. return xcb_ret
  12197. }
  12198. var _xcb_req62 = Txcb_protocol_request_t{
  12199. Fcount: uint32(2),
  12200. Fopcode: uint8(m_XCB_UNGRAB_BUTTON),
  12201. Fisvoid: uint8(1),
  12202. }
  12203. 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) {
  12204. bp := tls.Alloc(48)
  12205. defer tls.Free(48)
  12206. var xcb_ret Txcb_void_cookie_t
  12207. var _ /* xcb_out at bp+32 */ Txcb_ungrab_button_request_t
  12208. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12209. _ = xcb_ret
  12210. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 32))).Fbutton = button
  12211. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12212. (*(*Txcb_ungrab_button_request_t)(unsafe.Pointer(bp + 32))).Fmodifiers = modifiers
  12213. libc.Xmemset(tls, bp+32+10, 0, uint32(2))
  12214. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12215. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  12216. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12217. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12218. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req63)))
  12219. return xcb_ret
  12220. }
  12221. var _xcb_req63 = Txcb_protocol_request_t{
  12222. Fcount: uint32(2),
  12223. Fopcode: uint8(m_XCB_UNGRAB_BUTTON),
  12224. Fisvoid: uint8(1),
  12225. }
  12226. 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) {
  12227. bp := tls.Alloc(48)
  12228. defer tls.Free(48)
  12229. var xcb_ret Txcb_void_cookie_t
  12230. var _ /* xcb_out at bp+32 */ Txcb_change_active_pointer_grab_request_t
  12231. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12232. _ = xcb_ret
  12233. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12234. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 32))).Fcursor = cursor
  12235. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12236. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 32))).Fevent_mask = event_mask
  12237. libc.Xmemset(tls, bp+32+14, 0, uint32(2))
  12238. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12239. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  12240. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12241. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12242. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req64)))
  12243. return xcb_ret
  12244. }
  12245. var _xcb_req64 = Txcb_protocol_request_t{
  12246. Fcount: uint32(2),
  12247. Fopcode: uint8(m_XCB_CHANGE_ACTIVE_POINTER_GRAB),
  12248. Fisvoid: uint8(1),
  12249. }
  12250. 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) {
  12251. bp := tls.Alloc(48)
  12252. defer tls.Free(48)
  12253. var xcb_ret Txcb_void_cookie_t
  12254. var _ /* xcb_out at bp+32 */ Txcb_change_active_pointer_grab_request_t
  12255. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12256. _ = xcb_ret
  12257. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12258. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 32))).Fcursor = cursor
  12259. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12260. (*(*Txcb_change_active_pointer_grab_request_t)(unsafe.Pointer(bp + 32))).Fevent_mask = event_mask
  12261. libc.Xmemset(tls, bp+32+14, 0, uint32(2))
  12262. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12263. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  12264. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12265. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12266. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req65)))
  12267. return xcb_ret
  12268. }
  12269. var _xcb_req65 = Txcb_protocol_request_t{
  12270. Fcount: uint32(2),
  12271. Fopcode: uint8(m_XCB_CHANGE_ACTIVE_POINTER_GRAB),
  12272. Fisvoid: uint8(1),
  12273. }
  12274. 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) {
  12275. bp := tls.Alloc(48)
  12276. defer tls.Free(48)
  12277. var xcb_ret Txcb_grab_keyboard_cookie_t
  12278. var _ /* xcb_out at bp+32 */ Txcb_grab_keyboard_request_t
  12279. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12280. _ = xcb_ret
  12281. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Fowner_events = owner_events
  12282. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12283. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12284. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Fpointer_mode = pointer_mode
  12285. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Fkeyboard_mode = keyboard_mode
  12286. libc.Xmemset(tls, bp+32+14, 0, uint32(2))
  12287. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12288. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  12289. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12290. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12291. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req66)))
  12292. return xcb_ret
  12293. }
  12294. var _xcb_req66 = Txcb_protocol_request_t{
  12295. Fcount: uint32(2),
  12296. Fopcode: uint8(m_XCB_GRAB_KEYBOARD),
  12297. }
  12298. 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) {
  12299. bp := tls.Alloc(48)
  12300. defer tls.Free(48)
  12301. var xcb_ret Txcb_grab_keyboard_cookie_t
  12302. var _ /* xcb_out at bp+32 */ Txcb_grab_keyboard_request_t
  12303. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12304. _ = xcb_ret
  12305. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Fowner_events = owner_events
  12306. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12307. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12308. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Fpointer_mode = pointer_mode
  12309. (*(*Txcb_grab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Fkeyboard_mode = keyboard_mode
  12310. libc.Xmemset(tls, bp+32+14, 0, uint32(2))
  12311. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12312. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  12313. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12314. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12315. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req67)))
  12316. return xcb_ret
  12317. }
  12318. var _xcb_req67 = Txcb_protocol_request_t{
  12319. Fcount: uint32(2),
  12320. Fopcode: uint8(m_XCB_GRAB_KEYBOARD),
  12321. }
  12322. func Xxcb_grab_keyboard_reply(tls *libc.TLS, c uintptr, cookie Txcb_grab_keyboard_cookie_t, e uintptr) (r uintptr) {
  12323. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12324. }
  12325. func Xxcb_ungrab_keyboard_checked(tls *libc.TLS, c uintptr, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12326. bp := tls.Alloc(48)
  12327. defer tls.Free(48)
  12328. var xcb_ret Txcb_void_cookie_t
  12329. var _ /* xcb_out at bp+32 */ Txcb_ungrab_keyboard_request_t
  12330. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12331. _ = xcb_ret
  12332. (*(*Txcb_ungrab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12333. (*(*Txcb_ungrab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12334. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12335. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(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 & uint32(3)
  12338. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req68)))
  12339. return xcb_ret
  12340. }
  12341. var _xcb_req68 = Txcb_protocol_request_t{
  12342. Fcount: uint32(2),
  12343. Fopcode: uint8(m_XCB_UNGRAB_KEYBOARD),
  12344. Fisvoid: uint8(1),
  12345. }
  12346. func Xxcb_ungrab_keyboard(tls *libc.TLS, c uintptr, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12347. bp := tls.Alloc(48)
  12348. defer tls.Free(48)
  12349. var xcb_ret Txcb_void_cookie_t
  12350. var _ /* xcb_out at bp+32 */ Txcb_ungrab_keyboard_request_t
  12351. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12352. _ = xcb_ret
  12353. (*(*Txcb_ungrab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12354. (*(*Txcb_ungrab_keyboard_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12355. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12356. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  12357. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12358. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12359. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req69)))
  12360. return xcb_ret
  12361. }
  12362. var _xcb_req69 = Txcb_protocol_request_t{
  12363. Fcount: uint32(2),
  12364. Fopcode: uint8(m_XCB_UNGRAB_KEYBOARD),
  12365. Fisvoid: uint8(1),
  12366. }
  12367. 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) {
  12368. bp := tls.Alloc(48)
  12369. defer tls.Free(48)
  12370. var xcb_ret Txcb_void_cookie_t
  12371. var _ /* xcb_out at bp+32 */ Txcb_grab_key_request_t
  12372. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12373. _ = xcb_ret
  12374. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fowner_events = owner_events
  12375. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12376. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fmodifiers = modifiers
  12377. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fkey = key
  12378. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fpointer_mode = pointer_mode
  12379. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fkeyboard_mode = keyboard_mode
  12380. libc.Xmemset(tls, bp+32+13, 0, uint32(3))
  12381. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12382. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  12383. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12384. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12385. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req70)))
  12386. return xcb_ret
  12387. }
  12388. var _xcb_req70 = Txcb_protocol_request_t{
  12389. Fcount: uint32(2),
  12390. Fopcode: uint8(m_XCB_GRAB_KEY),
  12391. Fisvoid: uint8(1),
  12392. }
  12393. 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) {
  12394. bp := tls.Alloc(48)
  12395. defer tls.Free(48)
  12396. var xcb_ret Txcb_void_cookie_t
  12397. var _ /* xcb_out at bp+32 */ Txcb_grab_key_request_t
  12398. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12399. _ = xcb_ret
  12400. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fowner_events = owner_events
  12401. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12402. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fmodifiers = modifiers
  12403. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fkey = key
  12404. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fpointer_mode = pointer_mode
  12405. (*(*Txcb_grab_key_request_t)(unsafe.Pointer(bp + 32))).Fkeyboard_mode = keyboard_mode
  12406. libc.Xmemset(tls, bp+32+13, 0, uint32(3))
  12407. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12408. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  12409. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12410. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12411. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req71)))
  12412. return xcb_ret
  12413. }
  12414. var _xcb_req71 = Txcb_protocol_request_t{
  12415. Fcount: uint32(2),
  12416. Fopcode: uint8(m_XCB_GRAB_KEY),
  12417. Fisvoid: uint8(1),
  12418. }
  12419. 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) {
  12420. bp := tls.Alloc(48)
  12421. defer tls.Free(48)
  12422. var xcb_ret Txcb_void_cookie_t
  12423. var _ /* xcb_out at bp+32 */ Txcb_ungrab_key_request_t
  12424. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12425. _ = xcb_ret
  12426. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 32))).Fkey = key
  12427. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12428. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 32))).Fmodifiers = modifiers
  12429. libc.Xmemset(tls, bp+32+10, 0, uint32(2))
  12430. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12431. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  12432. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12433. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12434. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req72)))
  12435. return xcb_ret
  12436. }
  12437. var _xcb_req72 = Txcb_protocol_request_t{
  12438. Fcount: uint32(2),
  12439. Fopcode: uint8(m_XCB_UNGRAB_KEY),
  12440. Fisvoid: uint8(1),
  12441. }
  12442. 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) {
  12443. bp := tls.Alloc(48)
  12444. defer tls.Free(48)
  12445. var xcb_ret Txcb_void_cookie_t
  12446. var _ /* xcb_out at bp+32 */ Txcb_ungrab_key_request_t
  12447. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12448. _ = xcb_ret
  12449. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 32))).Fkey = key
  12450. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 32))).Fgrab_window = grab_window
  12451. (*(*Txcb_ungrab_key_request_t)(unsafe.Pointer(bp + 32))).Fmodifiers = modifiers
  12452. libc.Xmemset(tls, bp+32+10, 0, uint32(2))
  12453. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12454. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  12455. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12456. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12457. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req73)))
  12458. return xcb_ret
  12459. }
  12460. var _xcb_req73 = Txcb_protocol_request_t{
  12461. Fcount: uint32(2),
  12462. Fopcode: uint8(m_XCB_UNGRAB_KEY),
  12463. Fisvoid: uint8(1),
  12464. }
  12465. func Xxcb_allow_events_checked(tls *libc.TLS, c uintptr, mode Tuint8_t, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12466. bp := tls.Alloc(48)
  12467. defer tls.Free(48)
  12468. var xcb_ret Txcb_void_cookie_t
  12469. var _ /* xcb_out at bp+32 */ Txcb_allow_events_request_t
  12470. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12471. _ = xcb_ret
  12472. (*(*Txcb_allow_events_request_t)(unsafe.Pointer(bp + 32))).Fmode = mode
  12473. (*(*Txcb_allow_events_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12474. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12475. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  12476. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12477. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12478. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req74)))
  12479. return xcb_ret
  12480. }
  12481. var _xcb_req74 = Txcb_protocol_request_t{
  12482. Fcount: uint32(2),
  12483. Fopcode: uint8(m_XCB_ALLOW_EVENTS),
  12484. Fisvoid: uint8(1),
  12485. }
  12486. func Xxcb_allow_events(tls *libc.TLS, c uintptr, mode Tuint8_t, time Txcb_timestamp_t) (r Txcb_void_cookie_t) {
  12487. bp := tls.Alloc(48)
  12488. defer tls.Free(48)
  12489. var xcb_ret Txcb_void_cookie_t
  12490. var _ /* xcb_out at bp+32 */ Txcb_allow_events_request_t
  12491. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12492. _ = xcb_ret
  12493. (*(*Txcb_allow_events_request_t)(unsafe.Pointer(bp + 32))).Fmode = mode
  12494. (*(*Txcb_allow_events_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12495. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12496. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  12497. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12498. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12499. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req75)))
  12500. return xcb_ret
  12501. }
  12502. var _xcb_req75 = Txcb_protocol_request_t{
  12503. Fcount: uint32(2),
  12504. Fopcode: uint8(m_XCB_ALLOW_EVENTS),
  12505. Fisvoid: uint8(1),
  12506. }
  12507. func Xxcb_grab_server_checked(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  12508. bp := tls.Alloc(48)
  12509. defer tls.Free(48)
  12510. var xcb_ret Txcb_void_cookie_t
  12511. var _ /* xcb_out at bp+32 */ Txcb_grab_server_request_t
  12512. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12513. _ = xcb_ret
  12514. (*(*Txcb_grab_server_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12515. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12516. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  12517. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12518. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12519. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req76)))
  12520. return xcb_ret
  12521. }
  12522. var _xcb_req76 = Txcb_protocol_request_t{
  12523. Fcount: uint32(2),
  12524. Fopcode: uint8(m_XCB_GRAB_SERVER),
  12525. Fisvoid: uint8(1),
  12526. }
  12527. func Xxcb_grab_server(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  12528. bp := tls.Alloc(48)
  12529. defer tls.Free(48)
  12530. var xcb_ret Txcb_void_cookie_t
  12531. var _ /* xcb_out at bp+32 */ Txcb_grab_server_request_t
  12532. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12533. _ = xcb_ret
  12534. (*(*Txcb_grab_server_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12535. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12536. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  12537. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12538. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12539. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req77)))
  12540. return xcb_ret
  12541. }
  12542. var _xcb_req77 = Txcb_protocol_request_t{
  12543. Fcount: uint32(2),
  12544. Fopcode: uint8(m_XCB_GRAB_SERVER),
  12545. Fisvoid: uint8(1),
  12546. }
  12547. func Xxcb_ungrab_server_checked(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  12548. bp := tls.Alloc(48)
  12549. defer tls.Free(48)
  12550. var xcb_ret Txcb_void_cookie_t
  12551. var _ /* xcb_out at bp+32 */ Txcb_ungrab_server_request_t
  12552. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12553. _ = xcb_ret
  12554. (*(*Txcb_ungrab_server_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12555. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12556. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  12557. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12558. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12559. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req78)))
  12560. return xcb_ret
  12561. }
  12562. var _xcb_req78 = Txcb_protocol_request_t{
  12563. Fcount: uint32(2),
  12564. Fopcode: uint8(m_XCB_UNGRAB_SERVER),
  12565. Fisvoid: uint8(1),
  12566. }
  12567. func Xxcb_ungrab_server(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  12568. bp := tls.Alloc(48)
  12569. defer tls.Free(48)
  12570. var xcb_ret Txcb_void_cookie_t
  12571. var _ /* xcb_out at bp+32 */ Txcb_ungrab_server_request_t
  12572. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12573. _ = xcb_ret
  12574. (*(*Txcb_ungrab_server_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12575. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12576. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  12577. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12578. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12579. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req79)))
  12580. return xcb_ret
  12581. }
  12582. var _xcb_req79 = Txcb_protocol_request_t{
  12583. Fcount: uint32(2),
  12584. Fopcode: uint8(m_XCB_UNGRAB_SERVER),
  12585. Fisvoid: uint8(1),
  12586. }
  12587. func Xxcb_query_pointer(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_query_pointer_cookie_t) {
  12588. bp := tls.Alloc(48)
  12589. defer tls.Free(48)
  12590. var xcb_ret Txcb_query_pointer_cookie_t
  12591. var _ /* xcb_out at bp+32 */ Txcb_query_pointer_request_t
  12592. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12593. _ = xcb_ret
  12594. (*(*Txcb_query_pointer_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12595. (*(*Txcb_query_pointer_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  12596. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12597. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  12598. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12599. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12600. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req80)))
  12601. return xcb_ret
  12602. }
  12603. var _xcb_req80 = Txcb_protocol_request_t{
  12604. Fcount: uint32(2),
  12605. Fopcode: uint8(m_XCB_QUERY_POINTER),
  12606. }
  12607. func Xxcb_query_pointer_unchecked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_query_pointer_cookie_t) {
  12608. bp := tls.Alloc(48)
  12609. defer tls.Free(48)
  12610. var xcb_ret Txcb_query_pointer_cookie_t
  12611. var _ /* xcb_out at bp+32 */ Txcb_query_pointer_request_t
  12612. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12613. _ = xcb_ret
  12614. (*(*Txcb_query_pointer_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12615. (*(*Txcb_query_pointer_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  12616. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12617. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  12618. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12619. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12620. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req81)))
  12621. return xcb_ret
  12622. }
  12623. var _xcb_req81 = Txcb_protocol_request_t{
  12624. Fcount: uint32(2),
  12625. Fopcode: uint8(m_XCB_QUERY_POINTER),
  12626. }
  12627. func Xxcb_query_pointer_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_pointer_cookie_t, e uintptr) (r uintptr) {
  12628. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12629. }
  12630. func Xxcb_timecoord_next(tls *libc.TLS, i uintptr) {
  12631. var p1 uintptr
  12632. _ = p1
  12633. (*Txcb_timecoord_iterator_t)(unsafe.Pointer(i)).Frem--
  12634. (*Txcb_timecoord_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  12635. p1 = i + 8
  12636. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(8))
  12637. }
  12638. func Xxcb_timecoord_end(tls *libc.TLS, i Txcb_timecoord_iterator_t) (r Txcb_generic_iterator_t) {
  12639. var ret Txcb_generic_iterator_t
  12640. _ = ret
  12641. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  12642. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  12643. ret.Frem = 0
  12644. return ret
  12645. }
  12646. func Xxcb_get_motion_events_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  12647. var _aux, xcb_tmp uintptr
  12648. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  12649. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  12650. xcb_tmp = _buffer
  12651. _aux = _buffer
  12652. xcb_buffer_len = uint32(0)
  12653. xcb_block_len = uint32(0)
  12654. xcb_pad = uint32(0)
  12655. xcb_align_to = uint32(0)
  12656. xcb_block_len += uint32(32)
  12657. xcb_tmp += uintptr(xcb_block_len)
  12658. xcb_buffer_len += xcb_block_len
  12659. xcb_block_len = uint32(0)
  12660. /* events */
  12661. xcb_block_len += (*Txcb_get_motion_events_reply_t)(unsafe.Pointer(_aux)).Fevents_len * uint32(8)
  12662. xcb_tmp += uintptr(xcb_block_len)
  12663. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  12664. /* insert padding */
  12665. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  12666. xcb_buffer_len += xcb_block_len + xcb_pad
  12667. if uint32(0) != xcb_pad {
  12668. xcb_tmp += uintptr(xcb_pad)
  12669. xcb_pad = uint32(0)
  12670. }
  12671. xcb_block_len = uint32(0)
  12672. return libc.Int32FromUint32(xcb_buffer_len)
  12673. }
  12674. 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) {
  12675. bp := tls.Alloc(48)
  12676. defer tls.Free(48)
  12677. var xcb_ret Txcb_get_motion_events_cookie_t
  12678. var _ /* xcb_out at bp+32 */ Txcb_get_motion_events_request_t
  12679. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12680. _ = xcb_ret
  12681. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12682. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  12683. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 32))).Fstart = start
  12684. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 32))).Fstop = stop
  12685. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12686. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  12687. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12688. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12689. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req82)))
  12690. return xcb_ret
  12691. }
  12692. var _xcb_req82 = Txcb_protocol_request_t{
  12693. Fcount: uint32(2),
  12694. Fopcode: uint8(m_XCB_GET_MOTION_EVENTS),
  12695. }
  12696. 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) {
  12697. bp := tls.Alloc(48)
  12698. defer tls.Free(48)
  12699. var xcb_ret Txcb_get_motion_events_cookie_t
  12700. var _ /* xcb_out at bp+32 */ Txcb_get_motion_events_request_t
  12701. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12702. _ = xcb_ret
  12703. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12704. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  12705. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 32))).Fstart = start
  12706. (*(*Txcb_get_motion_events_request_t)(unsafe.Pointer(bp + 32))).Fstop = stop
  12707. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12708. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  12709. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12710. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12711. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req83)))
  12712. return xcb_ret
  12713. }
  12714. var _xcb_req83 = Txcb_protocol_request_t{
  12715. Fcount: uint32(2),
  12716. Fopcode: uint8(m_XCB_GET_MOTION_EVENTS),
  12717. }
  12718. func Xxcb_get_motion_events_events(tls *libc.TLS, R uintptr) (r uintptr) {
  12719. return R + libc.UintptrFromInt32(1)*32
  12720. }
  12721. func Xxcb_get_motion_events_events_length(tls *libc.TLS, R uintptr) (r int32) {
  12722. return libc.Int32FromUint32((*Txcb_get_motion_events_reply_t)(unsafe.Pointer(R)).Fevents_len)
  12723. }
  12724. func Xxcb_get_motion_events_events_iterator(tls *libc.TLS, R uintptr) (r Txcb_timecoord_iterator_t) {
  12725. var i Txcb_timecoord_iterator_t
  12726. _ = i
  12727. i.Fdata = R + libc.UintptrFromInt32(1)*32
  12728. i.Frem = libc.Int32FromUint32((*Txcb_get_motion_events_reply_t)(unsafe.Pointer(R)).Fevents_len)
  12729. i.Findex = int32(i.Fdata) - int32(R)
  12730. return i
  12731. }
  12732. func Xxcb_get_motion_events_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_motion_events_cookie_t, e uintptr) (r uintptr) {
  12733. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12734. }
  12735. 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) {
  12736. bp := tls.Alloc(48)
  12737. defer tls.Free(48)
  12738. var xcb_ret Txcb_translate_coordinates_cookie_t
  12739. var _ /* xcb_out at bp+32 */ Txcb_translate_coordinates_request_t
  12740. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12741. _ = xcb_ret
  12742. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12743. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 32))).Fsrc_window = src_window
  12744. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 32))).Fdst_window = dst_window
  12745. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 32))).Fsrc_x = src_x
  12746. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 32))).Fsrc_y = src_y
  12747. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12748. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  12749. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12750. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12751. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req84)))
  12752. return xcb_ret
  12753. }
  12754. var _xcb_req84 = Txcb_protocol_request_t{
  12755. Fcount: uint32(2),
  12756. Fopcode: uint8(m_XCB_TRANSLATE_COORDINATES),
  12757. }
  12758. 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) {
  12759. bp := tls.Alloc(48)
  12760. defer tls.Free(48)
  12761. var xcb_ret Txcb_translate_coordinates_cookie_t
  12762. var _ /* xcb_out at bp+32 */ Txcb_translate_coordinates_request_t
  12763. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12764. _ = xcb_ret
  12765. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12766. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 32))).Fsrc_window = src_window
  12767. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 32))).Fdst_window = dst_window
  12768. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 32))).Fsrc_x = src_x
  12769. (*(*Txcb_translate_coordinates_request_t)(unsafe.Pointer(bp + 32))).Fsrc_y = src_y
  12770. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12771. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  12772. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12773. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12774. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req85)))
  12775. return xcb_ret
  12776. }
  12777. var _xcb_req85 = Txcb_protocol_request_t{
  12778. Fcount: uint32(2),
  12779. Fopcode: uint8(m_XCB_TRANSLATE_COORDINATES),
  12780. }
  12781. func Xxcb_translate_coordinates_reply(tls *libc.TLS, c uintptr, cookie Txcb_translate_coordinates_cookie_t, e uintptr) (r uintptr) {
  12782. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12783. }
  12784. 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) {
  12785. bp := tls.Alloc(64)
  12786. defer tls.Free(64)
  12787. var xcb_ret Txcb_void_cookie_t
  12788. var _ /* xcb_out at bp+32 */ Txcb_warp_pointer_request_t
  12789. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12790. _ = xcb_ret
  12791. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12792. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fsrc_window = src_window
  12793. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fdst_window = dst_window
  12794. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fsrc_x = src_x
  12795. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fsrc_y = src_y
  12796. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fsrc_width = src_width
  12797. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fsrc_height = src_height
  12798. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fdst_x = dst_x
  12799. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fdst_y = dst_y
  12800. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12801. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  12802. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12803. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12804. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req86)))
  12805. return xcb_ret
  12806. }
  12807. var _xcb_req86 = Txcb_protocol_request_t{
  12808. Fcount: uint32(2),
  12809. Fopcode: uint8(m_XCB_WARP_POINTER),
  12810. Fisvoid: uint8(1),
  12811. }
  12812. 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) {
  12813. bp := tls.Alloc(64)
  12814. defer tls.Free(64)
  12815. var xcb_ret Txcb_void_cookie_t
  12816. var _ /* xcb_out at bp+32 */ Txcb_warp_pointer_request_t
  12817. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12818. _ = xcb_ret
  12819. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12820. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fsrc_window = src_window
  12821. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fdst_window = dst_window
  12822. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fsrc_x = src_x
  12823. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fsrc_y = src_y
  12824. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fsrc_width = src_width
  12825. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fsrc_height = src_height
  12826. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fdst_x = dst_x
  12827. (*(*Txcb_warp_pointer_request_t)(unsafe.Pointer(bp + 32))).Fdst_y = dst_y
  12828. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12829. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  12830. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12831. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12832. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req87)))
  12833. return xcb_ret
  12834. }
  12835. var _xcb_req87 = Txcb_protocol_request_t{
  12836. Fcount: uint32(2),
  12837. Fopcode: uint8(m_XCB_WARP_POINTER),
  12838. Fisvoid: uint8(1),
  12839. }
  12840. 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) {
  12841. bp := tls.Alloc(48)
  12842. defer tls.Free(48)
  12843. var xcb_ret Txcb_void_cookie_t
  12844. var _ /* xcb_out at bp+32 */ Txcb_set_input_focus_request_t
  12845. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12846. _ = xcb_ret
  12847. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 32))).Frevert_to = revert_to
  12848. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 32))).Ffocus = focus
  12849. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12850. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12851. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  12852. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12853. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12854. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req88)))
  12855. return xcb_ret
  12856. }
  12857. var _xcb_req88 = Txcb_protocol_request_t{
  12858. Fcount: uint32(2),
  12859. Fopcode: uint8(m_XCB_SET_INPUT_FOCUS),
  12860. Fisvoid: uint8(1),
  12861. }
  12862. 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) {
  12863. bp := tls.Alloc(48)
  12864. defer tls.Free(48)
  12865. var xcb_ret Txcb_void_cookie_t
  12866. var _ /* xcb_out at bp+32 */ Txcb_set_input_focus_request_t
  12867. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12868. _ = xcb_ret
  12869. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 32))).Frevert_to = revert_to
  12870. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 32))).Ffocus = focus
  12871. (*(*Txcb_set_input_focus_request_t)(unsafe.Pointer(bp + 32))).Ftime = time
  12872. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12873. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  12874. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12875. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12876. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req89)))
  12877. return xcb_ret
  12878. }
  12879. var _xcb_req89 = Txcb_protocol_request_t{
  12880. Fcount: uint32(2),
  12881. Fopcode: uint8(m_XCB_SET_INPUT_FOCUS),
  12882. Fisvoid: uint8(1),
  12883. }
  12884. func Xxcb_get_input_focus(tls *libc.TLS, c uintptr) (r Txcb_get_input_focus_cookie_t) {
  12885. bp := tls.Alloc(48)
  12886. defer tls.Free(48)
  12887. var xcb_ret Txcb_get_input_focus_cookie_t
  12888. var _ /* xcb_out at bp+32 */ Txcb_get_input_focus_request_t
  12889. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12890. _ = xcb_ret
  12891. (*(*Txcb_get_input_focus_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12892. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12893. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  12894. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12895. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12896. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req90)))
  12897. return xcb_ret
  12898. }
  12899. var _xcb_req90 = Txcb_protocol_request_t{
  12900. Fcount: uint32(2),
  12901. Fopcode: uint8(m_XCB_GET_INPUT_FOCUS),
  12902. }
  12903. func Xxcb_get_input_focus_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_input_focus_cookie_t) {
  12904. bp := tls.Alloc(48)
  12905. defer tls.Free(48)
  12906. var xcb_ret Txcb_get_input_focus_cookie_t
  12907. var _ /* xcb_out at bp+32 */ Txcb_get_input_focus_request_t
  12908. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12909. _ = xcb_ret
  12910. (*(*Txcb_get_input_focus_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12911. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12912. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  12913. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12914. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12915. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req91)))
  12916. return xcb_ret
  12917. }
  12918. var _xcb_req91 = Txcb_protocol_request_t{
  12919. Fcount: uint32(2),
  12920. Fopcode: uint8(m_XCB_GET_INPUT_FOCUS),
  12921. }
  12922. func Xxcb_get_input_focus_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_input_focus_cookie_t, e uintptr) (r uintptr) {
  12923. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12924. }
  12925. func Xxcb_query_keymap(tls *libc.TLS, c uintptr) (r Txcb_query_keymap_cookie_t) {
  12926. bp := tls.Alloc(48)
  12927. defer tls.Free(48)
  12928. var xcb_ret Txcb_query_keymap_cookie_t
  12929. var _ /* xcb_out at bp+32 */ Txcb_query_keymap_request_t
  12930. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12931. _ = xcb_ret
  12932. (*(*Txcb_query_keymap_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12933. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12934. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  12935. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12936. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12937. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req92)))
  12938. return xcb_ret
  12939. }
  12940. var _xcb_req92 = Txcb_protocol_request_t{
  12941. Fcount: uint32(2),
  12942. Fopcode: uint8(m_XCB_QUERY_KEYMAP),
  12943. }
  12944. func Xxcb_query_keymap_unchecked(tls *libc.TLS, c uintptr) (r Txcb_query_keymap_cookie_t) {
  12945. bp := tls.Alloc(48)
  12946. defer tls.Free(48)
  12947. var xcb_ret Txcb_query_keymap_cookie_t
  12948. var _ /* xcb_out at bp+32 */ Txcb_query_keymap_request_t
  12949. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  12950. _ = xcb_ret
  12951. (*(*Txcb_query_keymap_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  12952. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  12953. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  12954. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  12955. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  12956. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req93)))
  12957. return xcb_ret
  12958. }
  12959. var _xcb_req93 = Txcb_protocol_request_t{
  12960. Fcount: uint32(2),
  12961. Fopcode: uint8(m_XCB_QUERY_KEYMAP),
  12962. }
  12963. func Xxcb_query_keymap_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_keymap_cookie_t, e uintptr) (r uintptr) {
  12964. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  12965. }
  12966. func Xxcb_open_font_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  12967. var _aux, xcb_tmp uintptr
  12968. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  12969. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  12970. xcb_tmp = _buffer
  12971. _aux = _buffer
  12972. xcb_buffer_len = uint32(0)
  12973. xcb_block_len = uint32(0)
  12974. xcb_pad = uint32(0)
  12975. xcb_align_to = uint32(0)
  12976. xcb_block_len += uint32(12)
  12977. xcb_tmp += uintptr(xcb_block_len)
  12978. xcb_buffer_len += xcb_block_len
  12979. xcb_block_len = uint32(0)
  12980. /* name */
  12981. xcb_block_len += uint32((*Txcb_open_font_request_t)(unsafe.Pointer(_aux)).Fname_len) * uint32(1)
  12982. xcb_tmp += uintptr(xcb_block_len)
  12983. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  12984. /* insert padding */
  12985. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  12986. xcb_buffer_len += xcb_block_len + xcb_pad
  12987. if uint32(0) != xcb_pad {
  12988. xcb_tmp += uintptr(xcb_pad)
  12989. xcb_pad = uint32(0)
  12990. }
  12991. xcb_block_len = uint32(0)
  12992. return libc.Int32FromUint32(xcb_buffer_len)
  12993. }
  12994. 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) {
  12995. bp := tls.Alloc(64)
  12996. defer tls.Free(64)
  12997. var xcb_ret Txcb_void_cookie_t
  12998. var _ /* xcb_out at bp+48 */ Txcb_open_font_request_t
  12999. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13000. _ = xcb_ret
  13001. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  13002. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 48))).Ffid = fid
  13003. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  13004. libc.Xmemset(tls, bp+48+10, 0, uint32(2))
  13005. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  13006. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  13007. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13008. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13009. /* char name */
  13010. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  13011. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  13012. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13013. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  13014. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req94)))
  13015. return xcb_ret
  13016. }
  13017. var _xcb_req94 = Txcb_protocol_request_t{
  13018. Fcount: uint32(4),
  13019. Fopcode: uint8(m_XCB_OPEN_FONT),
  13020. Fisvoid: uint8(1),
  13021. }
  13022. func Xxcb_open_font(tls *libc.TLS, c uintptr, fid Txcb_font_t, name_len Tuint16_t, name uintptr) (r Txcb_void_cookie_t) {
  13023. bp := tls.Alloc(64)
  13024. defer tls.Free(64)
  13025. var xcb_ret Txcb_void_cookie_t
  13026. var _ /* xcb_out at bp+48 */ Txcb_open_font_request_t
  13027. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13028. _ = xcb_ret
  13029. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  13030. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 48))).Ffid = fid
  13031. (*(*Txcb_open_font_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  13032. libc.Xmemset(tls, bp+48+10, 0, uint32(2))
  13033. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  13034. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  13035. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13036. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13037. /* char name */
  13038. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  13039. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  13040. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13041. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  13042. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req95)))
  13043. return xcb_ret
  13044. }
  13045. var _xcb_req95 = Txcb_protocol_request_t{
  13046. Fcount: uint32(4),
  13047. Fopcode: uint8(m_XCB_OPEN_FONT),
  13048. Fisvoid: uint8(1),
  13049. }
  13050. func Xxcb_open_font_name(tls *libc.TLS, R uintptr) (r uintptr) {
  13051. return R + libc.UintptrFromInt32(1)*12
  13052. }
  13053. func Xxcb_open_font_name_length(tls *libc.TLS, R uintptr) (r int32) {
  13054. return libc.Int32FromUint16((*Txcb_open_font_request_t)(unsafe.Pointer(R)).Fname_len)
  13055. }
  13056. func Xxcb_open_font_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  13057. var i Txcb_generic_iterator_t
  13058. _ = i
  13059. i.Fdata = R + libc.UintptrFromInt32(1)*12 + uintptr((*Txcb_open_font_request_t)(unsafe.Pointer(R)).Fname_len)
  13060. i.Frem = 0
  13061. i.Findex = int32(i.Fdata) - int32(R)
  13062. return i
  13063. }
  13064. func Xxcb_close_font_checked(tls *libc.TLS, c uintptr, font Txcb_font_t) (r Txcb_void_cookie_t) {
  13065. bp := tls.Alloc(48)
  13066. defer tls.Free(48)
  13067. var xcb_ret Txcb_void_cookie_t
  13068. var _ /* xcb_out at bp+32 */ Txcb_close_font_request_t
  13069. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13070. _ = xcb_ret
  13071. (*(*Txcb_close_font_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  13072. (*(*Txcb_close_font_request_t)(unsafe.Pointer(bp + 32))).Ffont = font
  13073. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  13074. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13075. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13076. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13077. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req96)))
  13078. return xcb_ret
  13079. }
  13080. var _xcb_req96 = Txcb_protocol_request_t{
  13081. Fcount: uint32(2),
  13082. Fopcode: uint8(m_XCB_CLOSE_FONT),
  13083. Fisvoid: uint8(1),
  13084. }
  13085. func Xxcb_close_font(tls *libc.TLS, c uintptr, font Txcb_font_t) (r Txcb_void_cookie_t) {
  13086. bp := tls.Alloc(48)
  13087. defer tls.Free(48)
  13088. var xcb_ret Txcb_void_cookie_t
  13089. var _ /* xcb_out at bp+32 */ Txcb_close_font_request_t
  13090. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13091. _ = xcb_ret
  13092. (*(*Txcb_close_font_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  13093. (*(*Txcb_close_font_request_t)(unsafe.Pointer(bp + 32))).Ffont = font
  13094. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  13095. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13096. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13097. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13098. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req97)))
  13099. return xcb_ret
  13100. }
  13101. var _xcb_req97 = Txcb_protocol_request_t{
  13102. Fcount: uint32(2),
  13103. Fopcode: uint8(m_XCB_CLOSE_FONT),
  13104. Fisvoid: uint8(1),
  13105. }
  13106. func Xxcb_fontprop_next(tls *libc.TLS, i uintptr) {
  13107. var p1 uintptr
  13108. _ = p1
  13109. (*Txcb_fontprop_iterator_t)(unsafe.Pointer(i)).Frem--
  13110. (*Txcb_fontprop_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  13111. p1 = i + 8
  13112. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(8))
  13113. }
  13114. func Xxcb_fontprop_end(tls *libc.TLS, i Txcb_fontprop_iterator_t) (r Txcb_generic_iterator_t) {
  13115. var ret Txcb_generic_iterator_t
  13116. _ = ret
  13117. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  13118. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  13119. ret.Frem = 0
  13120. return ret
  13121. }
  13122. func Xxcb_charinfo_next(tls *libc.TLS, i uintptr) {
  13123. var p1 uintptr
  13124. _ = p1
  13125. (*Txcb_charinfo_iterator_t)(unsafe.Pointer(i)).Frem--
  13126. (*Txcb_charinfo_iterator_t)(unsafe.Pointer(i)).Fdata += 12
  13127. p1 = i + 8
  13128. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(12))
  13129. }
  13130. func Xxcb_charinfo_end(tls *libc.TLS, i Txcb_charinfo_iterator_t) (r Txcb_generic_iterator_t) {
  13131. var ret Txcb_generic_iterator_t
  13132. _ = ret
  13133. ret.Fdata = i.Fdata + uintptr(i.Frem)*12
  13134. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  13135. ret.Frem = 0
  13136. return ret
  13137. }
  13138. func Xxcb_query_font_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  13139. var _aux, xcb_tmp uintptr
  13140. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  13141. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  13142. xcb_tmp = _buffer
  13143. _aux = _buffer
  13144. xcb_buffer_len = uint32(0)
  13145. xcb_block_len = uint32(0)
  13146. xcb_pad = uint32(0)
  13147. xcb_align_to = uint32(0)
  13148. xcb_block_len += uint32(60)
  13149. xcb_tmp += uintptr(xcb_block_len)
  13150. xcb_buffer_len += xcb_block_len
  13151. xcb_block_len = uint32(0)
  13152. /* properties */
  13153. xcb_block_len += uint32((*Txcb_query_font_reply_t)(unsafe.Pointer(_aux)).Fproperties_len) * uint32(8)
  13154. xcb_tmp += uintptr(xcb_block_len)
  13155. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  13156. /* insert padding */
  13157. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  13158. xcb_buffer_len += xcb_block_len + xcb_pad
  13159. if uint32(0) != xcb_pad {
  13160. xcb_tmp += uintptr(xcb_pad)
  13161. xcb_pad = uint32(0)
  13162. }
  13163. xcb_block_len = uint32(0)
  13164. /* char_infos */
  13165. xcb_block_len += (*Txcb_query_font_reply_t)(unsafe.Pointer(_aux)).Fchar_infos_len * uint32(12)
  13166. xcb_tmp += uintptr(xcb_block_len)
  13167. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  13168. /* insert padding */
  13169. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  13170. xcb_buffer_len += xcb_block_len + xcb_pad
  13171. if uint32(0) != xcb_pad {
  13172. xcb_tmp += uintptr(xcb_pad)
  13173. xcb_pad = uint32(0)
  13174. }
  13175. xcb_block_len = uint32(0)
  13176. return libc.Int32FromUint32(xcb_buffer_len)
  13177. }
  13178. func Xxcb_query_font(tls *libc.TLS, c uintptr, font Txcb_fontable_t) (r Txcb_query_font_cookie_t) {
  13179. bp := tls.Alloc(48)
  13180. defer tls.Free(48)
  13181. var xcb_ret Txcb_query_font_cookie_t
  13182. var _ /* xcb_out at bp+32 */ Txcb_query_font_request_t
  13183. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13184. _ = xcb_ret
  13185. (*(*Txcb_query_font_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  13186. (*(*Txcb_query_font_request_t)(unsafe.Pointer(bp + 32))).Ffont = font
  13187. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  13188. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13189. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13190. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13191. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req98)))
  13192. return xcb_ret
  13193. }
  13194. var _xcb_req98 = Txcb_protocol_request_t{
  13195. Fcount: uint32(2),
  13196. Fopcode: uint8(m_XCB_QUERY_FONT),
  13197. }
  13198. func Xxcb_query_font_unchecked(tls *libc.TLS, c uintptr, font Txcb_fontable_t) (r Txcb_query_font_cookie_t) {
  13199. bp := tls.Alloc(48)
  13200. defer tls.Free(48)
  13201. var xcb_ret Txcb_query_font_cookie_t
  13202. var _ /* xcb_out at bp+32 */ Txcb_query_font_request_t
  13203. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13204. _ = xcb_ret
  13205. (*(*Txcb_query_font_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  13206. (*(*Txcb_query_font_request_t)(unsafe.Pointer(bp + 32))).Ffont = font
  13207. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  13208. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13209. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13210. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13211. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req99)))
  13212. return xcb_ret
  13213. }
  13214. var _xcb_req99 = Txcb_protocol_request_t{
  13215. Fcount: uint32(2),
  13216. Fopcode: uint8(m_XCB_QUERY_FONT),
  13217. }
  13218. func Xxcb_query_font_properties(tls *libc.TLS, R uintptr) (r uintptr) {
  13219. return R + libc.UintptrFromInt32(1)*60
  13220. }
  13221. func Xxcb_query_font_properties_length(tls *libc.TLS, R uintptr) (r int32) {
  13222. return libc.Int32FromUint16((*Txcb_query_font_reply_t)(unsafe.Pointer(R)).Fproperties_len)
  13223. }
  13224. func Xxcb_query_font_properties_iterator(tls *libc.TLS, R uintptr) (r Txcb_fontprop_iterator_t) {
  13225. var i Txcb_fontprop_iterator_t
  13226. _ = i
  13227. i.Fdata = R + libc.UintptrFromInt32(1)*60
  13228. i.Frem = libc.Int32FromUint16((*Txcb_query_font_reply_t)(unsafe.Pointer(R)).Fproperties_len)
  13229. i.Findex = int32(i.Fdata) - int32(R)
  13230. return i
  13231. }
  13232. func Xxcb_query_font_char_infos(tls *libc.TLS, R uintptr) (r uintptr) {
  13233. var prev Txcb_generic_iterator_t
  13234. _ = prev
  13235. prev = Xxcb_fontprop_end(tls, Xxcb_query_font_properties_iterator(tls, R))
  13236. return prev.Fdata + uintptr(libc.Uint32FromInt32(-prev.Findex)&libc.Uint32FromInt32(3)) + libc.UintptrFromInt32(0)
  13237. }
  13238. func Xxcb_query_font_char_infos_length(tls *libc.TLS, R uintptr) (r int32) {
  13239. return libc.Int32FromUint32((*Txcb_query_font_reply_t)(unsafe.Pointer(R)).Fchar_infos_len)
  13240. }
  13241. func Xxcb_query_font_char_infos_iterator(tls *libc.TLS, R uintptr) (r Txcb_charinfo_iterator_t) {
  13242. var i Txcb_charinfo_iterator_t
  13243. var prev Txcb_generic_iterator_t
  13244. _, _ = i, prev
  13245. prev = Xxcb_fontprop_end(tls, Xxcb_query_font_properties_iterator(tls, R))
  13246. i.Fdata = prev.Fdata + uintptr(libc.Uint32FromInt32(-prev.Findex)&libc.Uint32FromInt32(3))
  13247. i.Frem = libc.Int32FromUint32((*Txcb_query_font_reply_t)(unsafe.Pointer(R)).Fchar_infos_len)
  13248. i.Findex = int32(i.Fdata) - int32(R)
  13249. return i
  13250. }
  13251. func Xxcb_query_font_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_font_cookie_t, e uintptr) (r uintptr) {
  13252. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  13253. }
  13254. func Xxcb_query_text_extents_sizeof(tls *libc.TLS, _buffer uintptr, string_len Tuint32_t) (r int32) {
  13255. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  13256. var xcb_tmp uintptr
  13257. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  13258. xcb_tmp = _buffer
  13259. xcb_buffer_len = uint32(0)
  13260. xcb_block_len = uint32(0)
  13261. xcb_pad = uint32(0)
  13262. xcb_align_to = uint32(0)
  13263. xcb_block_len += uint32(8)
  13264. xcb_tmp += uintptr(xcb_block_len)
  13265. xcb_buffer_len += xcb_block_len
  13266. xcb_block_len = uint32(0)
  13267. /* string */
  13268. xcb_block_len += string_len * uint32(2)
  13269. xcb_tmp += uintptr(xcb_block_len)
  13270. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  13271. /* insert padding */
  13272. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  13273. xcb_buffer_len += xcb_block_len + xcb_pad
  13274. if uint32(0) != xcb_pad {
  13275. xcb_tmp += uintptr(xcb_pad)
  13276. xcb_pad = uint32(0)
  13277. }
  13278. xcb_block_len = uint32(0)
  13279. return libc.Int32FromUint32(xcb_buffer_len)
  13280. }
  13281. 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) {
  13282. bp := tls.Alloc(64)
  13283. defer tls.Free(64)
  13284. var xcb_ret Txcb_query_text_extents_cookie_t
  13285. var _ /* xcb_out at bp+48 */ Txcb_query_text_extents_request_t
  13286. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13287. _ = xcb_ret
  13288. (*(*Txcb_query_text_extents_request_t)(unsafe.Pointer(bp + 48))).Fodd_length = uint8(string_len & libc.Uint32FromInt32(1))
  13289. (*(*Txcb_query_text_extents_request_t)(unsafe.Pointer(bp + 48))).Ffont = font
  13290. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  13291. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13292. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13293. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13294. /* xcb_char2b_t string */
  13295. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  13296. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = string_len * uint32(2)
  13297. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13298. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  13299. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req100)))
  13300. return xcb_ret
  13301. }
  13302. var _xcb_req100 = Txcb_protocol_request_t{
  13303. Fcount: uint32(4),
  13304. Fopcode: uint8(m_XCB_QUERY_TEXT_EXTENTS),
  13305. }
  13306. 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) {
  13307. bp := tls.Alloc(64)
  13308. defer tls.Free(64)
  13309. var xcb_ret Txcb_query_text_extents_cookie_t
  13310. var _ /* xcb_out at bp+48 */ Txcb_query_text_extents_request_t
  13311. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13312. _ = xcb_ret
  13313. (*(*Txcb_query_text_extents_request_t)(unsafe.Pointer(bp + 48))).Fodd_length = uint8(string_len & libc.Uint32FromInt32(1))
  13314. (*(*Txcb_query_text_extents_request_t)(unsafe.Pointer(bp + 48))).Ffont = font
  13315. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  13316. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13317. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13318. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13319. /* xcb_char2b_t string */
  13320. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  13321. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = string_len * uint32(2)
  13322. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13323. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  13324. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req101)))
  13325. return xcb_ret
  13326. }
  13327. var _xcb_req101 = Txcb_protocol_request_t{
  13328. Fcount: uint32(4),
  13329. Fopcode: uint8(m_XCB_QUERY_TEXT_EXTENTS),
  13330. }
  13331. func Xxcb_query_text_extents_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_text_extents_cookie_t, e uintptr) (r uintptr) {
  13332. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  13333. }
  13334. func Xxcb_str_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  13335. var _aux, xcb_tmp uintptr
  13336. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  13337. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  13338. xcb_tmp = _buffer
  13339. _aux = _buffer
  13340. xcb_buffer_len = uint32(0)
  13341. xcb_block_len = uint32(0)
  13342. xcb_pad = uint32(0)
  13343. xcb_align_to = uint32(0)
  13344. xcb_block_len += uint32(1)
  13345. xcb_tmp += uintptr(xcb_block_len)
  13346. xcb_buffer_len += xcb_block_len
  13347. xcb_block_len = uint32(0)
  13348. /* name */
  13349. xcb_block_len += uint32((*Txcb_str_t)(unsafe.Pointer(_aux)).Fname_len) * uint32(1)
  13350. xcb_tmp += uintptr(xcb_block_len)
  13351. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  13352. /* insert padding */
  13353. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  13354. xcb_buffer_len += xcb_block_len + xcb_pad
  13355. if uint32(0) != xcb_pad {
  13356. xcb_tmp += uintptr(xcb_pad)
  13357. xcb_pad = uint32(0)
  13358. }
  13359. xcb_block_len = uint32(0)
  13360. return libc.Int32FromUint32(xcb_buffer_len)
  13361. }
  13362. func Xxcb_str_name(tls *libc.TLS, R uintptr) (r uintptr) {
  13363. return R + libc.UintptrFromInt32(1)
  13364. }
  13365. func Xxcb_str_name_length(tls *libc.TLS, R uintptr) (r int32) {
  13366. return libc.Int32FromUint8((*Txcb_str_t)(unsafe.Pointer(R)).Fname_len)
  13367. }
  13368. func Xxcb_str_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  13369. var i Txcb_generic_iterator_t
  13370. _ = i
  13371. i.Fdata = R + libc.UintptrFromInt32(1) + uintptr((*Txcb_str_t)(unsafe.Pointer(R)).Fname_len)
  13372. i.Frem = 0
  13373. i.Findex = int32(i.Fdata) - int32(R)
  13374. return i
  13375. }
  13376. func Xxcb_str_next(tls *libc.TLS, i uintptr) {
  13377. var R uintptr
  13378. var child Txcb_generic_iterator_t
  13379. _, _ = R, child
  13380. R = (*Txcb_str_iterator_t)(unsafe.Pointer(i)).Fdata
  13381. child.Fdata = R + uintptr(Xxcb_str_sizeof(tls, R))
  13382. (*Txcb_str_iterator_t)(unsafe.Pointer(i)).Findex = int32(child.Fdata) - int32((*Txcb_str_iterator_t)(unsafe.Pointer(i)).Fdata)
  13383. (*Txcb_str_iterator_t)(unsafe.Pointer(i)).Frem--
  13384. (*Txcb_str_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  13385. }
  13386. func Xxcb_str_end(tls *libc.TLS, _i Txcb_str_iterator_t) (r Txcb_generic_iterator_t) {
  13387. bp := tls.Alloc(16)
  13388. defer tls.Free(16)
  13389. *(*Txcb_str_iterator_t)(unsafe.Pointer(bp)) = _i
  13390. var ret Txcb_generic_iterator_t
  13391. _ = ret
  13392. for (*(*Txcb_str_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  13393. Xxcb_str_next(tls, bp)
  13394. }
  13395. ret.Fdata = (*(*Txcb_str_iterator_t)(unsafe.Pointer(bp))).Fdata
  13396. ret.Frem = (*(*Txcb_str_iterator_t)(unsafe.Pointer(bp))).Frem
  13397. ret.Findex = (*(*Txcb_str_iterator_t)(unsafe.Pointer(bp))).Findex
  13398. return ret
  13399. }
  13400. func Xxcb_list_fonts_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  13401. var _aux, xcb_tmp uintptr
  13402. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  13403. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  13404. xcb_tmp = _buffer
  13405. _aux = _buffer
  13406. xcb_buffer_len = uint32(0)
  13407. xcb_block_len = uint32(0)
  13408. xcb_pad = uint32(0)
  13409. xcb_align_to = uint32(0)
  13410. xcb_block_len += uint32(8)
  13411. xcb_tmp += uintptr(xcb_block_len)
  13412. xcb_buffer_len += xcb_block_len
  13413. xcb_block_len = uint32(0)
  13414. /* pattern */
  13415. xcb_block_len += uint32((*Txcb_list_fonts_request_t)(unsafe.Pointer(_aux)).Fpattern_len) * uint32(1)
  13416. xcb_tmp += uintptr(xcb_block_len)
  13417. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  13418. /* insert padding */
  13419. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  13420. xcb_buffer_len += xcb_block_len + xcb_pad
  13421. if uint32(0) != xcb_pad {
  13422. xcb_tmp += uintptr(xcb_pad)
  13423. xcb_pad = uint32(0)
  13424. }
  13425. xcb_block_len = uint32(0)
  13426. return libc.Int32FromUint32(xcb_buffer_len)
  13427. }
  13428. 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) {
  13429. bp := tls.Alloc(64)
  13430. defer tls.Free(64)
  13431. var xcb_ret Txcb_list_fonts_cookie_t
  13432. var _ /* xcb_out at bp+48 */ Txcb_list_fonts_request_t
  13433. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13434. _ = xcb_ret
  13435. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  13436. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 48))).Fmax_names = max_names
  13437. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 48))).Fpattern_len = pattern_len
  13438. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  13439. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13440. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13441. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13442. /* char pattern */
  13443. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pattern
  13444. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(pattern_len) * uint32(1)
  13445. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13446. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  13447. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req102)))
  13448. return xcb_ret
  13449. }
  13450. var _xcb_req102 = Txcb_protocol_request_t{
  13451. Fcount: uint32(4),
  13452. Fopcode: uint8(m_XCB_LIST_FONTS),
  13453. }
  13454. 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) {
  13455. bp := tls.Alloc(64)
  13456. defer tls.Free(64)
  13457. var xcb_ret Txcb_list_fonts_cookie_t
  13458. var _ /* xcb_out at bp+48 */ Txcb_list_fonts_request_t
  13459. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13460. _ = xcb_ret
  13461. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  13462. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 48))).Fmax_names = max_names
  13463. (*(*Txcb_list_fonts_request_t)(unsafe.Pointer(bp + 48))).Fpattern_len = pattern_len
  13464. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  13465. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13466. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13467. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13468. /* char pattern */
  13469. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pattern
  13470. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(pattern_len) * uint32(1)
  13471. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13472. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  13473. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req103)))
  13474. return xcb_ret
  13475. }
  13476. var _xcb_req103 = Txcb_protocol_request_t{
  13477. Fcount: uint32(4),
  13478. Fopcode: uint8(m_XCB_LIST_FONTS),
  13479. }
  13480. func Xxcb_list_fonts_names_length(tls *libc.TLS, R uintptr) (r int32) {
  13481. return libc.Int32FromUint16((*Txcb_list_fonts_reply_t)(unsafe.Pointer(R)).Fnames_len)
  13482. }
  13483. func Xxcb_list_fonts_names_iterator(tls *libc.TLS, R uintptr) (r Txcb_str_iterator_t) {
  13484. var i Txcb_str_iterator_t
  13485. _ = i
  13486. i.Fdata = R + libc.UintptrFromInt32(1)*32
  13487. i.Frem = libc.Int32FromUint16((*Txcb_list_fonts_reply_t)(unsafe.Pointer(R)).Fnames_len)
  13488. i.Findex = int32(i.Fdata) - int32(R)
  13489. return i
  13490. }
  13491. func Xxcb_list_fonts_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_fonts_cookie_t, e uintptr) (r uintptr) {
  13492. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  13493. }
  13494. func Xxcb_list_fonts_with_info_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  13495. var _aux, xcb_tmp uintptr
  13496. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  13497. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  13498. xcb_tmp = _buffer
  13499. _aux = _buffer
  13500. xcb_buffer_len = uint32(0)
  13501. xcb_block_len = uint32(0)
  13502. xcb_pad = uint32(0)
  13503. xcb_align_to = uint32(0)
  13504. xcb_block_len += uint32(8)
  13505. xcb_tmp += uintptr(xcb_block_len)
  13506. xcb_buffer_len += xcb_block_len
  13507. xcb_block_len = uint32(0)
  13508. /* pattern */
  13509. xcb_block_len += uint32((*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(_aux)).Fpattern_len) * uint32(1)
  13510. xcb_tmp += uintptr(xcb_block_len)
  13511. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  13512. /* insert padding */
  13513. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  13514. xcb_buffer_len += xcb_block_len + xcb_pad
  13515. if uint32(0) != xcb_pad {
  13516. xcb_tmp += uintptr(xcb_pad)
  13517. xcb_pad = uint32(0)
  13518. }
  13519. xcb_block_len = uint32(0)
  13520. return libc.Int32FromUint32(xcb_buffer_len)
  13521. }
  13522. 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) {
  13523. bp := tls.Alloc(64)
  13524. defer tls.Free(64)
  13525. var xcb_ret Txcb_list_fonts_with_info_cookie_t
  13526. var _ /* xcb_out at bp+48 */ Txcb_list_fonts_with_info_request_t
  13527. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13528. _ = xcb_ret
  13529. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  13530. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 48))).Fmax_names = max_names
  13531. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 48))).Fpattern_len = pattern_len
  13532. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  13533. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13534. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13535. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13536. /* char pattern */
  13537. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pattern
  13538. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(pattern_len) * uint32(1)
  13539. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13540. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  13541. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req104)))
  13542. return xcb_ret
  13543. }
  13544. var _xcb_req104 = Txcb_protocol_request_t{
  13545. Fcount: uint32(4),
  13546. Fopcode: uint8(m_XCB_LIST_FONTS_WITH_INFO),
  13547. }
  13548. 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) {
  13549. bp := tls.Alloc(64)
  13550. defer tls.Free(64)
  13551. var xcb_ret Txcb_list_fonts_with_info_cookie_t
  13552. var _ /* xcb_out at bp+48 */ Txcb_list_fonts_with_info_request_t
  13553. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13554. _ = xcb_ret
  13555. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  13556. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 48))).Fmax_names = max_names
  13557. (*(*Txcb_list_fonts_with_info_request_t)(unsafe.Pointer(bp + 48))).Fpattern_len = pattern_len
  13558. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  13559. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13560. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13561. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13562. /* char pattern */
  13563. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pattern
  13564. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(pattern_len) * uint32(1)
  13565. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13566. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  13567. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req105)))
  13568. return xcb_ret
  13569. }
  13570. var _xcb_req105 = Txcb_protocol_request_t{
  13571. Fcount: uint32(4),
  13572. Fopcode: uint8(m_XCB_LIST_FONTS_WITH_INFO),
  13573. }
  13574. func Xxcb_list_fonts_with_info_properties(tls *libc.TLS, R uintptr) (r uintptr) {
  13575. return R + libc.UintptrFromInt32(1)*60
  13576. }
  13577. func Xxcb_list_fonts_with_info_properties_length(tls *libc.TLS, R uintptr) (r int32) {
  13578. return libc.Int32FromUint16((*Txcb_list_fonts_with_info_reply_t)(unsafe.Pointer(R)).Fproperties_len)
  13579. }
  13580. func Xxcb_list_fonts_with_info_properties_iterator(tls *libc.TLS, R uintptr) (r Txcb_fontprop_iterator_t) {
  13581. var i Txcb_fontprop_iterator_t
  13582. _ = i
  13583. i.Fdata = R + libc.UintptrFromInt32(1)*60
  13584. i.Frem = libc.Int32FromUint16((*Txcb_list_fonts_with_info_reply_t)(unsafe.Pointer(R)).Fproperties_len)
  13585. i.Findex = int32(i.Fdata) - int32(R)
  13586. return i
  13587. }
  13588. func Xxcb_list_fonts_with_info_name(tls *libc.TLS, R uintptr) (r uintptr) {
  13589. var prev Txcb_generic_iterator_t
  13590. _ = prev
  13591. prev = Xxcb_fontprop_end(tls, Xxcb_list_fonts_with_info_properties_iterator(tls, R))
  13592. return prev.Fdata + uintptr(libc.Uint32FromInt32(-prev.Findex)&(libc.Uint32FromInt64(1)-libc.Uint32FromInt32(1))) + libc.UintptrFromInt32(0)
  13593. }
  13594. func Xxcb_list_fonts_with_info_name_length(tls *libc.TLS, R uintptr) (r int32) {
  13595. return libc.Int32FromUint8((*Txcb_list_fonts_with_info_reply_t)(unsafe.Pointer(R)).Fname_len)
  13596. }
  13597. func Xxcb_list_fonts_with_info_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  13598. var i, prev Txcb_generic_iterator_t
  13599. _, _ = i, prev
  13600. prev = Xxcb_fontprop_end(tls, Xxcb_list_fonts_with_info_properties_iterator(tls, R))
  13601. i.Fdata = prev.Fdata + uintptr(libc.Uint32FromInt32(-prev.Findex)&(libc.Uint32FromInt64(1)-libc.Uint32FromInt32(1))) + uintptr((*Txcb_list_fonts_with_info_reply_t)(unsafe.Pointer(R)).Fname_len)
  13602. i.Frem = 0
  13603. i.Findex = int32(i.Fdata) - int32(R)
  13604. return i
  13605. }
  13606. func Xxcb_list_fonts_with_info_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_fonts_with_info_cookie_t, e uintptr) (r uintptr) {
  13607. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  13608. }
  13609. func Xxcb_set_font_path_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  13610. var _aux, xcb_tmp uintptr
  13611. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  13612. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  13613. xcb_tmp = _buffer
  13614. _aux = _buffer
  13615. xcb_buffer_len = uint32(0)
  13616. xcb_block_len = uint32(0)
  13617. xcb_pad = uint32(0)
  13618. xcb_align_to = uint32(0)
  13619. xcb_block_len += uint32(8)
  13620. xcb_tmp += uintptr(xcb_block_len)
  13621. xcb_buffer_len += xcb_block_len
  13622. xcb_block_len = uint32(0)
  13623. /* font */
  13624. i = uint32(0)
  13625. for {
  13626. if !(i < uint32((*Txcb_set_font_path_request_t)(unsafe.Pointer(_aux)).Ffont_qty)) {
  13627. break
  13628. }
  13629. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_str_sizeof(tls, xcb_tmp))
  13630. xcb_block_len += xcb_tmp_len
  13631. xcb_tmp += uintptr(xcb_tmp_len)
  13632. goto _1
  13633. _1:
  13634. ;
  13635. i++
  13636. }
  13637. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  13638. /* insert padding */
  13639. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  13640. xcb_buffer_len += xcb_block_len + xcb_pad
  13641. if uint32(0) != xcb_pad {
  13642. xcb_tmp += uintptr(xcb_pad)
  13643. xcb_pad = uint32(0)
  13644. }
  13645. xcb_block_len = uint32(0)
  13646. return libc.Int32FromUint32(xcb_buffer_len)
  13647. }
  13648. func Xxcb_set_font_path_checked(tls *libc.TLS, c uintptr, font_qty Tuint16_t, font uintptr) (r Txcb_void_cookie_t) {
  13649. bp := tls.Alloc(64)
  13650. defer tls.Free(64)
  13651. var i, xcb_tmp_len uint32
  13652. var xcb_ret Txcb_void_cookie_t
  13653. var xcb_tmp uintptr
  13654. var _ /* xcb_out at bp+48 */ Txcb_set_font_path_request_t
  13655. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13656. _, _, _, _ = i, xcb_ret, xcb_tmp, xcb_tmp_len
  13657. (*(*Txcb_set_font_path_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  13658. (*(*Txcb_set_font_path_request_t)(unsafe.Pointer(bp + 48))).Ffont_qty = font_qty
  13659. libc.Xmemset(tls, bp+48+6, 0, uint32(2))
  13660. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  13661. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13662. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13663. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13664. /* xcb_str_t font */
  13665. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = font
  13666. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(0)
  13667. xcb_tmp = font
  13668. i = uint32(0)
  13669. for {
  13670. if !(i < uint32(font_qty)) {
  13671. break
  13672. }
  13673. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_str_sizeof(tls, xcb_tmp))
  13674. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len += xcb_tmp_len
  13675. xcb_tmp += uintptr(xcb_tmp_len)
  13676. goto _1
  13677. _1:
  13678. ;
  13679. i++
  13680. }
  13681. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13682. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  13683. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req106)))
  13684. return xcb_ret
  13685. }
  13686. var _xcb_req106 = Txcb_protocol_request_t{
  13687. Fcount: uint32(4),
  13688. Fopcode: uint8(m_XCB_SET_FONT_PATH),
  13689. Fisvoid: uint8(1),
  13690. }
  13691. func Xxcb_set_font_path(tls *libc.TLS, c uintptr, font_qty Tuint16_t, font uintptr) (r Txcb_void_cookie_t) {
  13692. bp := tls.Alloc(64)
  13693. defer tls.Free(64)
  13694. var i, xcb_tmp_len uint32
  13695. var xcb_ret Txcb_void_cookie_t
  13696. var xcb_tmp uintptr
  13697. var _ /* xcb_out at bp+48 */ Txcb_set_font_path_request_t
  13698. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  13699. _, _, _, _ = i, xcb_ret, xcb_tmp, xcb_tmp_len
  13700. (*(*Txcb_set_font_path_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  13701. (*(*Txcb_set_font_path_request_t)(unsafe.Pointer(bp + 48))).Ffont_qty = font_qty
  13702. libc.Xmemset(tls, bp+48+6, 0, uint32(2))
  13703. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  13704. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13705. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13706. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13707. /* xcb_str_t font */
  13708. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = font
  13709. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(0)
  13710. xcb_tmp = font
  13711. i = uint32(0)
  13712. for {
  13713. if !(i < uint32(font_qty)) {
  13714. break
  13715. }
  13716. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_str_sizeof(tls, xcb_tmp))
  13717. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len += xcb_tmp_len
  13718. xcb_tmp += uintptr(xcb_tmp_len)
  13719. goto _1
  13720. _1:
  13721. ;
  13722. i++
  13723. }
  13724. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  13725. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  13726. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req107)))
  13727. return xcb_ret
  13728. }
  13729. var _xcb_req107 = Txcb_protocol_request_t{
  13730. Fcount: uint32(4),
  13731. Fopcode: uint8(m_XCB_SET_FONT_PATH),
  13732. Fisvoid: uint8(1),
  13733. }
  13734. func Xxcb_set_font_path_font_length(tls *libc.TLS, R uintptr) (r int32) {
  13735. return libc.Int32FromUint16((*Txcb_set_font_path_request_t)(unsafe.Pointer(R)).Ffont_qty)
  13736. }
  13737. func Xxcb_set_font_path_font_iterator(tls *libc.TLS, R uintptr) (r Txcb_str_iterator_t) {
  13738. var i Txcb_str_iterator_t
  13739. _ = i
  13740. i.Fdata = R + libc.UintptrFromInt32(1)*8
  13741. i.Frem = libc.Int32FromUint16((*Txcb_set_font_path_request_t)(unsafe.Pointer(R)).Ffont_qty)
  13742. i.Findex = int32(i.Fdata) - int32(R)
  13743. return i
  13744. }
  13745. func Xxcb_get_font_path_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  13746. var _aux, xcb_tmp uintptr
  13747. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  13748. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  13749. xcb_tmp = _buffer
  13750. _aux = _buffer
  13751. xcb_buffer_len = uint32(0)
  13752. xcb_block_len = uint32(0)
  13753. xcb_pad = uint32(0)
  13754. xcb_align_to = uint32(0)
  13755. xcb_block_len += uint32(32)
  13756. xcb_tmp += uintptr(xcb_block_len)
  13757. xcb_buffer_len += xcb_block_len
  13758. xcb_block_len = uint32(0)
  13759. /* path */
  13760. i = uint32(0)
  13761. for {
  13762. if !(i < uint32((*Txcb_get_font_path_reply_t)(unsafe.Pointer(_aux)).Fpath_len)) {
  13763. break
  13764. }
  13765. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_str_sizeof(tls, xcb_tmp))
  13766. xcb_block_len += xcb_tmp_len
  13767. xcb_tmp += uintptr(xcb_tmp_len)
  13768. goto _1
  13769. _1:
  13770. ;
  13771. i++
  13772. }
  13773. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  13774. /* insert padding */
  13775. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  13776. xcb_buffer_len += xcb_block_len + xcb_pad
  13777. if uint32(0) != xcb_pad {
  13778. xcb_tmp += uintptr(xcb_pad)
  13779. xcb_pad = uint32(0)
  13780. }
  13781. xcb_block_len = uint32(0)
  13782. return libc.Int32FromUint32(xcb_buffer_len)
  13783. }
  13784. func Xxcb_get_font_path(tls *libc.TLS, c uintptr) (r Txcb_get_font_path_cookie_t) {
  13785. bp := tls.Alloc(48)
  13786. defer tls.Free(48)
  13787. var xcb_ret Txcb_get_font_path_cookie_t
  13788. var _ /* xcb_out at bp+32 */ Txcb_get_font_path_request_t
  13789. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13790. _ = xcb_ret
  13791. (*(*Txcb_get_font_path_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  13792. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  13793. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  13794. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13795. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13796. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req108)))
  13797. return xcb_ret
  13798. }
  13799. var _xcb_req108 = Txcb_protocol_request_t{
  13800. Fcount: uint32(2),
  13801. Fopcode: uint8(m_XCB_GET_FONT_PATH),
  13802. }
  13803. func Xxcb_get_font_path_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_font_path_cookie_t) {
  13804. bp := tls.Alloc(48)
  13805. defer tls.Free(48)
  13806. var xcb_ret Txcb_get_font_path_cookie_t
  13807. var _ /* xcb_out at bp+32 */ Txcb_get_font_path_request_t
  13808. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13809. _ = xcb_ret
  13810. (*(*Txcb_get_font_path_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  13811. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  13812. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  13813. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13814. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13815. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req109)))
  13816. return xcb_ret
  13817. }
  13818. var _xcb_req109 = Txcb_protocol_request_t{
  13819. Fcount: uint32(2),
  13820. Fopcode: uint8(m_XCB_GET_FONT_PATH),
  13821. }
  13822. func Xxcb_get_font_path_path_length(tls *libc.TLS, R uintptr) (r int32) {
  13823. return libc.Int32FromUint16((*Txcb_get_font_path_reply_t)(unsafe.Pointer(R)).Fpath_len)
  13824. }
  13825. func Xxcb_get_font_path_path_iterator(tls *libc.TLS, R uintptr) (r Txcb_str_iterator_t) {
  13826. var i Txcb_str_iterator_t
  13827. _ = i
  13828. i.Fdata = R + libc.UintptrFromInt32(1)*32
  13829. i.Frem = libc.Int32FromUint16((*Txcb_get_font_path_reply_t)(unsafe.Pointer(R)).Fpath_len)
  13830. i.Findex = int32(i.Fdata) - int32(R)
  13831. return i
  13832. }
  13833. func Xxcb_get_font_path_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_font_path_cookie_t, e uintptr) (r uintptr) {
  13834. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  13835. }
  13836. 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) {
  13837. bp := tls.Alloc(48)
  13838. defer tls.Free(48)
  13839. var xcb_ret Txcb_void_cookie_t
  13840. var _ /* xcb_out at bp+32 */ Txcb_create_pixmap_request_t
  13841. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13842. _ = xcb_ret
  13843. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fdepth = depth
  13844. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fpid = pid
  13845. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fdrawable = drawable
  13846. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  13847. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  13848. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  13849. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  13850. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13851. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13852. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req110)))
  13853. return xcb_ret
  13854. }
  13855. var _xcb_req110 = Txcb_protocol_request_t{
  13856. Fcount: uint32(2),
  13857. Fopcode: uint8(m_XCB_CREATE_PIXMAP),
  13858. Fisvoid: uint8(1),
  13859. }
  13860. 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) {
  13861. bp := tls.Alloc(48)
  13862. defer tls.Free(48)
  13863. var xcb_ret Txcb_void_cookie_t
  13864. var _ /* xcb_out at bp+32 */ Txcb_create_pixmap_request_t
  13865. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13866. _ = xcb_ret
  13867. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fdepth = depth
  13868. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fpid = pid
  13869. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fdrawable = drawable
  13870. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  13871. (*(*Txcb_create_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  13872. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  13873. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  13874. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13875. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13876. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req111)))
  13877. return xcb_ret
  13878. }
  13879. var _xcb_req111 = Txcb_protocol_request_t{
  13880. Fcount: uint32(2),
  13881. Fopcode: uint8(m_XCB_CREATE_PIXMAP),
  13882. Fisvoid: uint8(1),
  13883. }
  13884. func Xxcb_free_pixmap_checked(tls *libc.TLS, c uintptr, pixmap Txcb_pixmap_t) (r Txcb_void_cookie_t) {
  13885. bp := tls.Alloc(48)
  13886. defer tls.Free(48)
  13887. var xcb_ret Txcb_void_cookie_t
  13888. var _ /* xcb_out at bp+32 */ Txcb_free_pixmap_request_t
  13889. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13890. _ = xcb_ret
  13891. (*(*Txcb_free_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  13892. (*(*Txcb_free_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fpixmap = pixmap
  13893. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  13894. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13895. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13896. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13897. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req112)))
  13898. return xcb_ret
  13899. }
  13900. var _xcb_req112 = Txcb_protocol_request_t{
  13901. Fcount: uint32(2),
  13902. Fopcode: uint8(m_XCB_FREE_PIXMAP),
  13903. Fisvoid: uint8(1),
  13904. }
  13905. func Xxcb_free_pixmap(tls *libc.TLS, c uintptr, pixmap Txcb_pixmap_t) (r Txcb_void_cookie_t) {
  13906. bp := tls.Alloc(48)
  13907. defer tls.Free(48)
  13908. var xcb_ret Txcb_void_cookie_t
  13909. var _ /* xcb_out at bp+32 */ Txcb_free_pixmap_request_t
  13910. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  13911. _ = xcb_ret
  13912. (*(*Txcb_free_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  13913. (*(*Txcb_free_pixmap_request_t)(unsafe.Pointer(bp + 32))).Fpixmap = pixmap
  13914. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  13915. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  13916. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  13917. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  13918. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req113)))
  13919. return xcb_ret
  13920. }
  13921. var _xcb_req113 = Txcb_protocol_request_t{
  13922. Fcount: uint32(2),
  13923. Fopcode: uint8(m_XCB_FREE_PIXMAP),
  13924. Fisvoid: uint8(1),
  13925. }
  13926. func Xxcb_create_gc_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  13927. bp := tls.Alloc(16)
  13928. defer tls.Free(16)
  13929. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  13930. var xcb_out, xcb_tmp uintptr
  13931. var xcb_parts [24]Tiovec
  13932. var _ /* xcb_pad0 at bp+0 */ [3]int8
  13933. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  13934. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  13935. xcb_buffer_len = uint32(0)
  13936. xcb_align_to = uint32(0)
  13937. xcb_padding_offset = uint32(0)
  13938. xcb_pad = uint32(0)
  13939. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  13940. xcb_parts_idx = uint32(0)
  13941. xcb_block_len = uint32(0)
  13942. if value_mask&uint32(_XCB_GC_FUNCTION) != 0 {
  13943. /* xcb_create_gc_value_list_t.function */
  13944. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  13945. xcb_block_len += uint32(4)
  13946. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  13947. xcb_parts_idx++
  13948. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  13949. }
  13950. if value_mask&uint32(_XCB_GC_PLANE_MASK) != 0 {
  13951. /* xcb_create_gc_value_list_t.plane_mask */
  13952. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  13953. xcb_block_len += uint32(4)
  13954. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  13955. xcb_parts_idx++
  13956. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  13957. }
  13958. if value_mask&uint32(_XCB_GC_FOREGROUND) != 0 {
  13959. /* xcb_create_gc_value_list_t.foreground */
  13960. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  13961. xcb_block_len += uint32(4)
  13962. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  13963. xcb_parts_idx++
  13964. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  13965. }
  13966. if value_mask&uint32(_XCB_GC_BACKGROUND) != 0 {
  13967. /* xcb_create_gc_value_list_t.background */
  13968. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  13969. xcb_block_len += uint32(4)
  13970. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  13971. xcb_parts_idx++
  13972. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  13973. }
  13974. if value_mask&uint32(_XCB_GC_LINE_WIDTH) != 0 {
  13975. /* xcb_create_gc_value_list_t.line_width */
  13976. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  13977. xcb_block_len += uint32(4)
  13978. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  13979. xcb_parts_idx++
  13980. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  13981. }
  13982. if value_mask&uint32(_XCB_GC_LINE_STYLE) != 0 {
  13983. /* xcb_create_gc_value_list_t.line_style */
  13984. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  13985. xcb_block_len += uint32(4)
  13986. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  13987. xcb_parts_idx++
  13988. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  13989. }
  13990. if value_mask&uint32(_XCB_GC_CAP_STYLE) != 0 {
  13991. /* xcb_create_gc_value_list_t.cap_style */
  13992. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  13993. xcb_block_len += uint32(4)
  13994. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  13995. xcb_parts_idx++
  13996. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  13997. }
  13998. if value_mask&uint32(_XCB_GC_JOIN_STYLE) != 0 {
  13999. /* xcb_create_gc_value_list_t.join_style */
  14000. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 28
  14001. xcb_block_len += uint32(4)
  14002. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14003. xcb_parts_idx++
  14004. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14005. }
  14006. if value_mask&uint32(_XCB_GC_FILL_STYLE) != 0 {
  14007. /* xcb_create_gc_value_list_t.fill_style */
  14008. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 32
  14009. xcb_block_len += uint32(4)
  14010. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14011. xcb_parts_idx++
  14012. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14013. }
  14014. if value_mask&uint32(_XCB_GC_FILL_RULE) != 0 {
  14015. /* xcb_create_gc_value_list_t.fill_rule */
  14016. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 36
  14017. xcb_block_len += uint32(4)
  14018. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14019. xcb_parts_idx++
  14020. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14021. }
  14022. if value_mask&uint32(_XCB_GC_TILE) != 0 {
  14023. /* xcb_create_gc_value_list_t.tile */
  14024. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 40
  14025. xcb_block_len += uint32(4)
  14026. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14027. xcb_parts_idx++
  14028. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14029. }
  14030. if value_mask&uint32(_XCB_GC_STIPPLE) != 0 {
  14031. /* xcb_create_gc_value_list_t.stipple */
  14032. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 44
  14033. xcb_block_len += uint32(4)
  14034. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14035. xcb_parts_idx++
  14036. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14037. }
  14038. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_X) != 0 {
  14039. /* xcb_create_gc_value_list_t.tile_stipple_x_origin */
  14040. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 48
  14041. xcb_block_len += uint32(4)
  14042. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14043. xcb_parts_idx++
  14044. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14045. }
  14046. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_Y) != 0 {
  14047. /* xcb_create_gc_value_list_t.tile_stipple_y_origin */
  14048. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 52
  14049. xcb_block_len += uint32(4)
  14050. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14051. xcb_parts_idx++
  14052. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14053. }
  14054. if value_mask&uint32(_XCB_GC_FONT) != 0 {
  14055. /* xcb_create_gc_value_list_t.font */
  14056. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 56
  14057. xcb_block_len += uint32(4)
  14058. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14059. xcb_parts_idx++
  14060. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14061. }
  14062. if value_mask&uint32(_XCB_GC_SUBWINDOW_MODE) != 0 {
  14063. /* xcb_create_gc_value_list_t.subwindow_mode */
  14064. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 60
  14065. xcb_block_len += uint32(4)
  14066. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14067. xcb_parts_idx++
  14068. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14069. }
  14070. if value_mask&uint32(_XCB_GC_GRAPHICS_EXPOSURES) != 0 {
  14071. /* xcb_create_gc_value_list_t.graphics_exposures */
  14072. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 64
  14073. xcb_block_len += uint32(4)
  14074. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14075. xcb_parts_idx++
  14076. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14077. }
  14078. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_X) != 0 {
  14079. /* xcb_create_gc_value_list_t.clip_x_origin */
  14080. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 68
  14081. xcb_block_len += uint32(4)
  14082. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14083. xcb_parts_idx++
  14084. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14085. }
  14086. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_Y) != 0 {
  14087. /* xcb_create_gc_value_list_t.clip_y_origin */
  14088. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 72
  14089. xcb_block_len += uint32(4)
  14090. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14091. xcb_parts_idx++
  14092. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14093. }
  14094. if value_mask&uint32(_XCB_GC_CLIP_MASK) != 0 {
  14095. /* xcb_create_gc_value_list_t.clip_mask */
  14096. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 76
  14097. xcb_block_len += uint32(4)
  14098. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14099. xcb_parts_idx++
  14100. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14101. }
  14102. if value_mask&uint32(_XCB_GC_DASH_OFFSET) != 0 {
  14103. /* xcb_create_gc_value_list_t.dash_offset */
  14104. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 80
  14105. xcb_block_len += uint32(4)
  14106. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14107. xcb_parts_idx++
  14108. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14109. }
  14110. if value_mask&uint32(_XCB_GC_DASH_LIST) != 0 {
  14111. /* xcb_create_gc_value_list_t.dashes */
  14112. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 84
  14113. xcb_block_len += uint32(4)
  14114. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14115. xcb_parts_idx++
  14116. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14117. }
  14118. if value_mask&uint32(_XCB_GC_ARC_MODE) != 0 {
  14119. /* xcb_create_gc_value_list_t.arc_mode */
  14120. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 88
  14121. xcb_block_len += uint32(4)
  14122. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14123. xcb_parts_idx++
  14124. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14125. }
  14126. /* insert padding */
  14127. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  14128. xcb_buffer_len += xcb_block_len + xcb_pad
  14129. if uint32(0) != xcb_pad {
  14130. xcb_parts[xcb_parts_idx].Fiov_base = bp
  14131. xcb_parts[xcb_parts_idx].Fiov_len = xcb_pad
  14132. xcb_parts_idx++
  14133. xcb_pad = uint32(0)
  14134. }
  14135. xcb_block_len = uint32(0)
  14136. xcb_padding_offset = uint32(0)
  14137. if libc.UintptrFromInt32(0) == xcb_out {
  14138. /* allocate memory */
  14139. xcb_out = libc.Xmalloc(tls, xcb_buffer_len)
  14140. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  14141. }
  14142. xcb_tmp = xcb_out
  14143. i = uint32(0)
  14144. for {
  14145. if !(i < xcb_parts_idx) {
  14146. break
  14147. }
  14148. if uintptr(0) != xcb_parts[i].Fiov_base && uint32(0) != xcb_parts[i].Fiov_len {
  14149. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  14150. }
  14151. if uint32(0) != xcb_parts[i].Fiov_len {
  14152. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  14153. }
  14154. goto _1
  14155. _1:
  14156. ;
  14157. i++
  14158. }
  14159. return libc.Int32FromUint32(xcb_buffer_len)
  14160. }
  14161. func Xxcb_create_gc_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  14162. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  14163. var xcb_tmp uintptr
  14164. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  14165. xcb_tmp = _buffer
  14166. xcb_buffer_len = uint32(0)
  14167. xcb_block_len = uint32(0)
  14168. xcb_pad = uint32(0)
  14169. xcb_align_to = uint32(0)
  14170. xcb_padding_offset = uint32(0)
  14171. if value_mask&uint32(_XCB_GC_FUNCTION) != 0 {
  14172. /* xcb_create_gc_value_list_t.function */
  14173. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ffunction = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14174. xcb_block_len += uint32(4)
  14175. xcb_tmp += uintptr(4)
  14176. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14177. }
  14178. if value_mask&uint32(_XCB_GC_PLANE_MASK) != 0 {
  14179. /* xcb_create_gc_value_list_t.plane_mask */
  14180. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fplane_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14181. xcb_block_len += uint32(4)
  14182. xcb_tmp += uintptr(4)
  14183. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14184. }
  14185. if value_mask&uint32(_XCB_GC_FOREGROUND) != 0 {
  14186. /* xcb_create_gc_value_list_t.foreground */
  14187. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fforeground = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14188. xcb_block_len += uint32(4)
  14189. xcb_tmp += uintptr(4)
  14190. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14191. }
  14192. if value_mask&uint32(_XCB_GC_BACKGROUND) != 0 {
  14193. /* xcb_create_gc_value_list_t.background */
  14194. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fbackground = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14195. xcb_block_len += uint32(4)
  14196. xcb_tmp += uintptr(4)
  14197. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14198. }
  14199. if value_mask&uint32(_XCB_GC_LINE_WIDTH) != 0 {
  14200. /* xcb_create_gc_value_list_t.line_width */
  14201. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fline_width = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14202. xcb_block_len += uint32(4)
  14203. xcb_tmp += uintptr(4)
  14204. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14205. }
  14206. if value_mask&uint32(_XCB_GC_LINE_STYLE) != 0 {
  14207. /* xcb_create_gc_value_list_t.line_style */
  14208. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fline_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14209. xcb_block_len += uint32(4)
  14210. xcb_tmp += uintptr(4)
  14211. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14212. }
  14213. if value_mask&uint32(_XCB_GC_CAP_STYLE) != 0 {
  14214. /* xcb_create_gc_value_list_t.cap_style */
  14215. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fcap_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14216. xcb_block_len += uint32(4)
  14217. xcb_tmp += uintptr(4)
  14218. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14219. }
  14220. if value_mask&uint32(_XCB_GC_JOIN_STYLE) != 0 {
  14221. /* xcb_create_gc_value_list_t.join_style */
  14222. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fjoin_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14223. xcb_block_len += uint32(4)
  14224. xcb_tmp += uintptr(4)
  14225. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14226. }
  14227. if value_mask&uint32(_XCB_GC_FILL_STYLE) != 0 {
  14228. /* xcb_create_gc_value_list_t.fill_style */
  14229. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ffill_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14230. xcb_block_len += uint32(4)
  14231. xcb_tmp += uintptr(4)
  14232. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14233. }
  14234. if value_mask&uint32(_XCB_GC_FILL_RULE) != 0 {
  14235. /* xcb_create_gc_value_list_t.fill_rule */
  14236. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ffill_rule = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14237. xcb_block_len += uint32(4)
  14238. xcb_tmp += uintptr(4)
  14239. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14240. }
  14241. if value_mask&uint32(_XCB_GC_TILE) != 0 {
  14242. /* xcb_create_gc_value_list_t.tile */
  14243. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  14244. xcb_block_len += uint32(4)
  14245. xcb_tmp += uintptr(4)
  14246. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14247. }
  14248. if value_mask&uint32(_XCB_GC_STIPPLE) != 0 {
  14249. /* xcb_create_gc_value_list_t.stipple */
  14250. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fstipple = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  14251. xcb_block_len += uint32(4)
  14252. xcb_tmp += uintptr(4)
  14253. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14254. }
  14255. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_X) != 0 {
  14256. /* xcb_create_gc_value_list_t.tile_stipple_x_origin */
  14257. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile_stipple_x_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  14258. xcb_block_len += uint32(4)
  14259. xcb_tmp += uintptr(4)
  14260. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14261. }
  14262. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_Y) != 0 {
  14263. /* xcb_create_gc_value_list_t.tile_stipple_y_origin */
  14264. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile_stipple_y_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  14265. xcb_block_len += uint32(4)
  14266. xcb_tmp += uintptr(4)
  14267. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14268. }
  14269. if value_mask&uint32(_XCB_GC_FONT) != 0 {
  14270. /* xcb_create_gc_value_list_t.font */
  14271. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Ffont = *(*Txcb_font_t)(unsafe.Pointer(xcb_tmp))
  14272. xcb_block_len += uint32(4)
  14273. xcb_tmp += uintptr(4)
  14274. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14275. }
  14276. if value_mask&uint32(_XCB_GC_SUBWINDOW_MODE) != 0 {
  14277. /* xcb_create_gc_value_list_t.subwindow_mode */
  14278. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fsubwindow_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14279. xcb_block_len += uint32(4)
  14280. xcb_tmp += uintptr(4)
  14281. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14282. }
  14283. if value_mask&uint32(_XCB_GC_GRAPHICS_EXPOSURES) != 0 {
  14284. /* xcb_create_gc_value_list_t.graphics_exposures */
  14285. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fgraphics_exposures = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  14286. xcb_block_len += uint32(4)
  14287. xcb_tmp += uintptr(4)
  14288. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14289. }
  14290. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_X) != 0 {
  14291. /* xcb_create_gc_value_list_t.clip_x_origin */
  14292. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_x_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  14293. xcb_block_len += uint32(4)
  14294. xcb_tmp += uintptr(4)
  14295. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14296. }
  14297. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_Y) != 0 {
  14298. /* xcb_create_gc_value_list_t.clip_y_origin */
  14299. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_y_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  14300. xcb_block_len += uint32(4)
  14301. xcb_tmp += uintptr(4)
  14302. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14303. }
  14304. if value_mask&uint32(_XCB_GC_CLIP_MASK) != 0 {
  14305. /* xcb_create_gc_value_list_t.clip_mask */
  14306. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_mask = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  14307. xcb_block_len += uint32(4)
  14308. xcb_tmp += uintptr(4)
  14309. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14310. }
  14311. if value_mask&uint32(_XCB_GC_DASH_OFFSET) != 0 {
  14312. /* xcb_create_gc_value_list_t.dash_offset */
  14313. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fdash_offset = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14314. xcb_block_len += uint32(4)
  14315. xcb_tmp += uintptr(4)
  14316. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14317. }
  14318. if value_mask&uint32(_XCB_GC_DASH_LIST) != 0 {
  14319. /* xcb_create_gc_value_list_t.dashes */
  14320. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Fdashes = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14321. xcb_block_len += uint32(4)
  14322. xcb_tmp += uintptr(4)
  14323. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14324. }
  14325. if value_mask&uint32(_XCB_GC_ARC_MODE) != 0 {
  14326. /* xcb_create_gc_value_list_t.arc_mode */
  14327. (*Txcb_create_gc_value_list_t)(unsafe.Pointer(_aux)).Farc_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14328. xcb_block_len += uint32(4)
  14329. xcb_tmp += uintptr(4)
  14330. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14331. }
  14332. /* insert padding */
  14333. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  14334. xcb_buffer_len += xcb_block_len + xcb_pad
  14335. if uint32(0) != xcb_pad {
  14336. xcb_tmp += uintptr(xcb_pad)
  14337. xcb_pad = uint32(0)
  14338. }
  14339. xcb_block_len = uint32(0)
  14340. xcb_padding_offset = uint32(0)
  14341. return libc.Int32FromUint32(xcb_buffer_len)
  14342. }
  14343. func Xxcb_create_gc_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t) (r int32) {
  14344. bp := tls.Alloc(96)
  14345. defer tls.Free(96)
  14346. var _ /* _aux at bp+0 */ Txcb_create_gc_value_list_t
  14347. return Xxcb_create_gc_value_list_unpack(tls, _buffer, value_mask, bp)
  14348. }
  14349. func Xxcb_create_gc_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  14350. var _aux, xcb_tmp uintptr
  14351. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  14352. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  14353. xcb_tmp = _buffer
  14354. _aux = _buffer
  14355. xcb_buffer_len = uint32(0)
  14356. xcb_block_len = uint32(0)
  14357. xcb_pad = uint32(0)
  14358. xcb_align_to = uint32(0)
  14359. xcb_block_len += uint32(16)
  14360. xcb_tmp += uintptr(xcb_block_len)
  14361. xcb_buffer_len += xcb_block_len
  14362. xcb_block_len = uint32(0)
  14363. /* value_list */
  14364. xcb_block_len += libc.Uint32FromInt32(Xxcb_create_gc_value_list_sizeof(tls, xcb_tmp, (*Txcb_create_gc_request_t)(unsafe.Pointer(_aux)).Fvalue_mask))
  14365. xcb_tmp += uintptr(xcb_block_len)
  14366. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  14367. /* insert padding */
  14368. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  14369. xcb_buffer_len += xcb_block_len + xcb_pad
  14370. if uint32(0) != xcb_pad {
  14371. xcb_tmp += uintptr(xcb_pad)
  14372. xcb_pad = uint32(0)
  14373. }
  14374. xcb_block_len = uint32(0)
  14375. return libc.Int32FromUint32(xcb_buffer_len)
  14376. }
  14377. 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) {
  14378. bp := tls.Alloc(64)
  14379. defer tls.Free(64)
  14380. var xcb_ret Txcb_void_cookie_t
  14381. var _ /* xcb_out at bp+40 */ Txcb_create_gc_request_t
  14382. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  14383. _ = xcb_ret
  14384. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  14385. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fcid = cid
  14386. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fdrawable = drawable
  14387. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  14388. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  14389. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  14390. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14391. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  14392. /* xcb_create_gc_value_list_t value_list */
  14393. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  14394. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_create_gc_value_list_sizeof(tls, value_list, value_mask))
  14395. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req114)))
  14396. return xcb_ret
  14397. }
  14398. var _xcb_req114 = Txcb_protocol_request_t{
  14399. Fcount: uint32(3),
  14400. Fopcode: uint8(m_XCB_CREATE_GC),
  14401. Fisvoid: uint8(1),
  14402. }
  14403. 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) {
  14404. bp := tls.Alloc(64)
  14405. defer tls.Free(64)
  14406. var xcb_ret Txcb_void_cookie_t
  14407. var _ /* xcb_out at bp+40 */ Txcb_create_gc_request_t
  14408. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  14409. _ = xcb_ret
  14410. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  14411. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fcid = cid
  14412. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fdrawable = drawable
  14413. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  14414. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  14415. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  14416. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14417. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  14418. /* xcb_create_gc_value_list_t value_list */
  14419. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  14420. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_create_gc_value_list_sizeof(tls, value_list, value_mask))
  14421. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req115)))
  14422. return xcb_ret
  14423. }
  14424. var _xcb_req115 = Txcb_protocol_request_t{
  14425. Fcount: uint32(3),
  14426. Fopcode: uint8(m_XCB_CREATE_GC),
  14427. Fisvoid: uint8(1),
  14428. }
  14429. 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) {
  14430. bp := tls.Alloc(64)
  14431. defer tls.Free(64)
  14432. var xcb_ret Txcb_void_cookie_t
  14433. var _ /* xcb_aux0 at bp+56 */ uintptr
  14434. var _ /* xcb_out at bp+40 */ Txcb_create_gc_request_t
  14435. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  14436. _ = xcb_ret
  14437. *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0)
  14438. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  14439. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fcid = cid
  14440. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fdrawable = drawable
  14441. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  14442. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  14443. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  14444. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14445. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  14446. /* xcb_create_gc_value_list_t value_list */
  14447. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_create_gc_value_list_serialize(tls, bp+56, value_mask, value_list))
  14448. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 56))
  14449. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req116)))
  14450. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 56)))
  14451. return xcb_ret
  14452. }
  14453. var _xcb_req116 = Txcb_protocol_request_t{
  14454. Fcount: uint32(3),
  14455. Fopcode: uint8(m_XCB_CREATE_GC),
  14456. Fisvoid: uint8(1),
  14457. }
  14458. 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) {
  14459. bp := tls.Alloc(64)
  14460. defer tls.Free(64)
  14461. var xcb_ret Txcb_void_cookie_t
  14462. var _ /* xcb_aux0 at bp+56 */ uintptr
  14463. var _ /* xcb_out at bp+40 */ Txcb_create_gc_request_t
  14464. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  14465. _ = xcb_ret
  14466. *(*uintptr)(unsafe.Pointer(bp + 56)) = uintptr(0)
  14467. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  14468. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fcid = cid
  14469. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fdrawable = drawable
  14470. (*(*Txcb_create_gc_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  14471. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  14472. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  14473. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14474. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  14475. /* xcb_create_gc_value_list_t value_list */
  14476. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_create_gc_value_list_serialize(tls, bp+56, value_mask, value_list))
  14477. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 56))
  14478. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req117)))
  14479. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 56)))
  14480. return xcb_ret
  14481. }
  14482. var _xcb_req117 = Txcb_protocol_request_t{
  14483. Fcount: uint32(3),
  14484. Fopcode: uint8(m_XCB_CREATE_GC),
  14485. Fisvoid: uint8(1),
  14486. }
  14487. func Xxcb_create_gc_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  14488. return R + libc.UintptrFromInt32(1)*16
  14489. }
  14490. func Xxcb_change_gc_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  14491. bp := tls.Alloc(16)
  14492. defer tls.Free(16)
  14493. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  14494. var xcb_out, xcb_tmp uintptr
  14495. var xcb_parts [24]Tiovec
  14496. var _ /* xcb_pad0 at bp+0 */ [3]int8
  14497. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  14498. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  14499. xcb_buffer_len = uint32(0)
  14500. xcb_align_to = uint32(0)
  14501. xcb_padding_offset = uint32(0)
  14502. xcb_pad = uint32(0)
  14503. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  14504. xcb_parts_idx = uint32(0)
  14505. xcb_block_len = uint32(0)
  14506. if value_mask&uint32(_XCB_GC_FUNCTION) != 0 {
  14507. /* xcb_change_gc_value_list_t.function */
  14508. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  14509. xcb_block_len += uint32(4)
  14510. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14511. xcb_parts_idx++
  14512. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14513. }
  14514. if value_mask&uint32(_XCB_GC_PLANE_MASK) != 0 {
  14515. /* xcb_change_gc_value_list_t.plane_mask */
  14516. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  14517. xcb_block_len += uint32(4)
  14518. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14519. xcb_parts_idx++
  14520. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14521. }
  14522. if value_mask&uint32(_XCB_GC_FOREGROUND) != 0 {
  14523. /* xcb_change_gc_value_list_t.foreground */
  14524. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  14525. xcb_block_len += uint32(4)
  14526. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14527. xcb_parts_idx++
  14528. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14529. }
  14530. if value_mask&uint32(_XCB_GC_BACKGROUND) != 0 {
  14531. /* xcb_change_gc_value_list_t.background */
  14532. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  14533. xcb_block_len += uint32(4)
  14534. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14535. xcb_parts_idx++
  14536. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14537. }
  14538. if value_mask&uint32(_XCB_GC_LINE_WIDTH) != 0 {
  14539. /* xcb_change_gc_value_list_t.line_width */
  14540. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  14541. xcb_block_len += uint32(4)
  14542. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14543. xcb_parts_idx++
  14544. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14545. }
  14546. if value_mask&uint32(_XCB_GC_LINE_STYLE) != 0 {
  14547. /* xcb_change_gc_value_list_t.line_style */
  14548. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  14549. xcb_block_len += uint32(4)
  14550. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14551. xcb_parts_idx++
  14552. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14553. }
  14554. if value_mask&uint32(_XCB_GC_CAP_STYLE) != 0 {
  14555. /* xcb_change_gc_value_list_t.cap_style */
  14556. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  14557. xcb_block_len += uint32(4)
  14558. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14559. xcb_parts_idx++
  14560. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14561. }
  14562. if value_mask&uint32(_XCB_GC_JOIN_STYLE) != 0 {
  14563. /* xcb_change_gc_value_list_t.join_style */
  14564. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 28
  14565. xcb_block_len += uint32(4)
  14566. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14567. xcb_parts_idx++
  14568. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14569. }
  14570. if value_mask&uint32(_XCB_GC_FILL_STYLE) != 0 {
  14571. /* xcb_change_gc_value_list_t.fill_style */
  14572. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 32
  14573. xcb_block_len += uint32(4)
  14574. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14575. xcb_parts_idx++
  14576. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14577. }
  14578. if value_mask&uint32(_XCB_GC_FILL_RULE) != 0 {
  14579. /* xcb_change_gc_value_list_t.fill_rule */
  14580. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 36
  14581. xcb_block_len += uint32(4)
  14582. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14583. xcb_parts_idx++
  14584. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14585. }
  14586. if value_mask&uint32(_XCB_GC_TILE) != 0 {
  14587. /* xcb_change_gc_value_list_t.tile */
  14588. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 40
  14589. xcb_block_len += uint32(4)
  14590. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14591. xcb_parts_idx++
  14592. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14593. }
  14594. if value_mask&uint32(_XCB_GC_STIPPLE) != 0 {
  14595. /* xcb_change_gc_value_list_t.stipple */
  14596. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 44
  14597. xcb_block_len += uint32(4)
  14598. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14599. xcb_parts_idx++
  14600. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14601. }
  14602. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_X) != 0 {
  14603. /* xcb_change_gc_value_list_t.tile_stipple_x_origin */
  14604. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 48
  14605. xcb_block_len += uint32(4)
  14606. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14607. xcb_parts_idx++
  14608. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14609. }
  14610. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_Y) != 0 {
  14611. /* xcb_change_gc_value_list_t.tile_stipple_y_origin */
  14612. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 52
  14613. xcb_block_len += uint32(4)
  14614. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14615. xcb_parts_idx++
  14616. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14617. }
  14618. if value_mask&uint32(_XCB_GC_FONT) != 0 {
  14619. /* xcb_change_gc_value_list_t.font */
  14620. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 56
  14621. xcb_block_len += uint32(4)
  14622. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14623. xcb_parts_idx++
  14624. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14625. }
  14626. if value_mask&uint32(_XCB_GC_SUBWINDOW_MODE) != 0 {
  14627. /* xcb_change_gc_value_list_t.subwindow_mode */
  14628. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 60
  14629. xcb_block_len += uint32(4)
  14630. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14631. xcb_parts_idx++
  14632. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14633. }
  14634. if value_mask&uint32(_XCB_GC_GRAPHICS_EXPOSURES) != 0 {
  14635. /* xcb_change_gc_value_list_t.graphics_exposures */
  14636. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 64
  14637. xcb_block_len += uint32(4)
  14638. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14639. xcb_parts_idx++
  14640. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14641. }
  14642. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_X) != 0 {
  14643. /* xcb_change_gc_value_list_t.clip_x_origin */
  14644. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 68
  14645. xcb_block_len += uint32(4)
  14646. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14647. xcb_parts_idx++
  14648. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14649. }
  14650. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_Y) != 0 {
  14651. /* xcb_change_gc_value_list_t.clip_y_origin */
  14652. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 72
  14653. xcb_block_len += uint32(4)
  14654. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14655. xcb_parts_idx++
  14656. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14657. }
  14658. if value_mask&uint32(_XCB_GC_CLIP_MASK) != 0 {
  14659. /* xcb_change_gc_value_list_t.clip_mask */
  14660. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 76
  14661. xcb_block_len += uint32(4)
  14662. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14663. xcb_parts_idx++
  14664. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14665. }
  14666. if value_mask&uint32(_XCB_GC_DASH_OFFSET) != 0 {
  14667. /* xcb_change_gc_value_list_t.dash_offset */
  14668. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 80
  14669. xcb_block_len += uint32(4)
  14670. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14671. xcb_parts_idx++
  14672. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14673. }
  14674. if value_mask&uint32(_XCB_GC_DASH_LIST) != 0 {
  14675. /* xcb_change_gc_value_list_t.dashes */
  14676. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 84
  14677. xcb_block_len += uint32(4)
  14678. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14679. xcb_parts_idx++
  14680. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14681. }
  14682. if value_mask&uint32(_XCB_GC_ARC_MODE) != 0 {
  14683. /* xcb_change_gc_value_list_t.arc_mode */
  14684. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 88
  14685. xcb_block_len += uint32(4)
  14686. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  14687. xcb_parts_idx++
  14688. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14689. }
  14690. /* insert padding */
  14691. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  14692. xcb_buffer_len += xcb_block_len + xcb_pad
  14693. if uint32(0) != xcb_pad {
  14694. xcb_parts[xcb_parts_idx].Fiov_base = bp
  14695. xcb_parts[xcb_parts_idx].Fiov_len = xcb_pad
  14696. xcb_parts_idx++
  14697. xcb_pad = uint32(0)
  14698. }
  14699. xcb_block_len = uint32(0)
  14700. xcb_padding_offset = uint32(0)
  14701. if libc.UintptrFromInt32(0) == xcb_out {
  14702. /* allocate memory */
  14703. xcb_out = libc.Xmalloc(tls, xcb_buffer_len)
  14704. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  14705. }
  14706. xcb_tmp = xcb_out
  14707. i = uint32(0)
  14708. for {
  14709. if !(i < xcb_parts_idx) {
  14710. break
  14711. }
  14712. if uintptr(0) != xcb_parts[i].Fiov_base && uint32(0) != xcb_parts[i].Fiov_len {
  14713. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  14714. }
  14715. if uint32(0) != xcb_parts[i].Fiov_len {
  14716. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  14717. }
  14718. goto _1
  14719. _1:
  14720. ;
  14721. i++
  14722. }
  14723. return libc.Int32FromUint32(xcb_buffer_len)
  14724. }
  14725. func Xxcb_change_gc_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  14726. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  14727. var xcb_tmp uintptr
  14728. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  14729. xcb_tmp = _buffer
  14730. xcb_buffer_len = uint32(0)
  14731. xcb_block_len = uint32(0)
  14732. xcb_pad = uint32(0)
  14733. xcb_align_to = uint32(0)
  14734. xcb_padding_offset = uint32(0)
  14735. if value_mask&uint32(_XCB_GC_FUNCTION) != 0 {
  14736. /* xcb_change_gc_value_list_t.function */
  14737. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ffunction = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14738. xcb_block_len += uint32(4)
  14739. xcb_tmp += uintptr(4)
  14740. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14741. }
  14742. if value_mask&uint32(_XCB_GC_PLANE_MASK) != 0 {
  14743. /* xcb_change_gc_value_list_t.plane_mask */
  14744. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fplane_mask = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14745. xcb_block_len += uint32(4)
  14746. xcb_tmp += uintptr(4)
  14747. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14748. }
  14749. if value_mask&uint32(_XCB_GC_FOREGROUND) != 0 {
  14750. /* xcb_change_gc_value_list_t.foreground */
  14751. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fforeground = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14752. xcb_block_len += uint32(4)
  14753. xcb_tmp += uintptr(4)
  14754. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14755. }
  14756. if value_mask&uint32(_XCB_GC_BACKGROUND) != 0 {
  14757. /* xcb_change_gc_value_list_t.background */
  14758. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fbackground = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14759. xcb_block_len += uint32(4)
  14760. xcb_tmp += uintptr(4)
  14761. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14762. }
  14763. if value_mask&uint32(_XCB_GC_LINE_WIDTH) != 0 {
  14764. /* xcb_change_gc_value_list_t.line_width */
  14765. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fline_width = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14766. xcb_block_len += uint32(4)
  14767. xcb_tmp += uintptr(4)
  14768. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14769. }
  14770. if value_mask&uint32(_XCB_GC_LINE_STYLE) != 0 {
  14771. /* xcb_change_gc_value_list_t.line_style */
  14772. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fline_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14773. xcb_block_len += uint32(4)
  14774. xcb_tmp += uintptr(4)
  14775. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14776. }
  14777. if value_mask&uint32(_XCB_GC_CAP_STYLE) != 0 {
  14778. /* xcb_change_gc_value_list_t.cap_style */
  14779. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fcap_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14780. xcb_block_len += uint32(4)
  14781. xcb_tmp += uintptr(4)
  14782. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14783. }
  14784. if value_mask&uint32(_XCB_GC_JOIN_STYLE) != 0 {
  14785. /* xcb_change_gc_value_list_t.join_style */
  14786. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fjoin_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14787. xcb_block_len += uint32(4)
  14788. xcb_tmp += uintptr(4)
  14789. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14790. }
  14791. if value_mask&uint32(_XCB_GC_FILL_STYLE) != 0 {
  14792. /* xcb_change_gc_value_list_t.fill_style */
  14793. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ffill_style = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14794. xcb_block_len += uint32(4)
  14795. xcb_tmp += uintptr(4)
  14796. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14797. }
  14798. if value_mask&uint32(_XCB_GC_FILL_RULE) != 0 {
  14799. /* xcb_change_gc_value_list_t.fill_rule */
  14800. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ffill_rule = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14801. xcb_block_len += uint32(4)
  14802. xcb_tmp += uintptr(4)
  14803. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14804. }
  14805. if value_mask&uint32(_XCB_GC_TILE) != 0 {
  14806. /* xcb_change_gc_value_list_t.tile */
  14807. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  14808. xcb_block_len += uint32(4)
  14809. xcb_tmp += uintptr(4)
  14810. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14811. }
  14812. if value_mask&uint32(_XCB_GC_STIPPLE) != 0 {
  14813. /* xcb_change_gc_value_list_t.stipple */
  14814. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fstipple = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  14815. xcb_block_len += uint32(4)
  14816. xcb_tmp += uintptr(4)
  14817. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14818. }
  14819. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_X) != 0 {
  14820. /* xcb_change_gc_value_list_t.tile_stipple_x_origin */
  14821. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile_stipple_x_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  14822. xcb_block_len += uint32(4)
  14823. xcb_tmp += uintptr(4)
  14824. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14825. }
  14826. if value_mask&uint32(_XCB_GC_TILE_STIPPLE_ORIGIN_Y) != 0 {
  14827. /* xcb_change_gc_value_list_t.tile_stipple_y_origin */
  14828. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ftile_stipple_y_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  14829. xcb_block_len += uint32(4)
  14830. xcb_tmp += uintptr(4)
  14831. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14832. }
  14833. if value_mask&uint32(_XCB_GC_FONT) != 0 {
  14834. /* xcb_change_gc_value_list_t.font */
  14835. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Ffont = *(*Txcb_font_t)(unsafe.Pointer(xcb_tmp))
  14836. xcb_block_len += uint32(4)
  14837. xcb_tmp += uintptr(4)
  14838. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14839. }
  14840. if value_mask&uint32(_XCB_GC_SUBWINDOW_MODE) != 0 {
  14841. /* xcb_change_gc_value_list_t.subwindow_mode */
  14842. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fsubwindow_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14843. xcb_block_len += uint32(4)
  14844. xcb_tmp += uintptr(4)
  14845. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14846. }
  14847. if value_mask&uint32(_XCB_GC_GRAPHICS_EXPOSURES) != 0 {
  14848. /* xcb_change_gc_value_list_t.graphics_exposures */
  14849. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fgraphics_exposures = *(*Txcb_bool32_t)(unsafe.Pointer(xcb_tmp))
  14850. xcb_block_len += uint32(4)
  14851. xcb_tmp += uintptr(4)
  14852. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14853. }
  14854. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_X) != 0 {
  14855. /* xcb_change_gc_value_list_t.clip_x_origin */
  14856. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_x_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  14857. xcb_block_len += uint32(4)
  14858. xcb_tmp += uintptr(4)
  14859. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14860. }
  14861. if value_mask&uint32(_XCB_GC_CLIP_ORIGIN_Y) != 0 {
  14862. /* xcb_change_gc_value_list_t.clip_y_origin */
  14863. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_y_origin = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  14864. xcb_block_len += uint32(4)
  14865. xcb_tmp += uintptr(4)
  14866. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14867. }
  14868. if value_mask&uint32(_XCB_GC_CLIP_MASK) != 0 {
  14869. /* xcb_change_gc_value_list_t.clip_mask */
  14870. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fclip_mask = *(*Txcb_pixmap_t)(unsafe.Pointer(xcb_tmp))
  14871. xcb_block_len += uint32(4)
  14872. xcb_tmp += uintptr(4)
  14873. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14874. }
  14875. if value_mask&uint32(_XCB_GC_DASH_OFFSET) != 0 {
  14876. /* xcb_change_gc_value_list_t.dash_offset */
  14877. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fdash_offset = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14878. xcb_block_len += uint32(4)
  14879. xcb_tmp += uintptr(4)
  14880. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14881. }
  14882. if value_mask&uint32(_XCB_GC_DASH_LIST) != 0 {
  14883. /* xcb_change_gc_value_list_t.dashes */
  14884. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Fdashes = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14885. xcb_block_len += uint32(4)
  14886. xcb_tmp += uintptr(4)
  14887. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14888. }
  14889. if value_mask&uint32(_XCB_GC_ARC_MODE) != 0 {
  14890. /* xcb_change_gc_value_list_t.arc_mode */
  14891. (*Txcb_change_gc_value_list_t)(unsafe.Pointer(_aux)).Farc_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  14892. xcb_block_len += uint32(4)
  14893. xcb_tmp += uintptr(4)
  14894. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  14895. }
  14896. /* insert padding */
  14897. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  14898. xcb_buffer_len += xcb_block_len + xcb_pad
  14899. if uint32(0) != xcb_pad {
  14900. xcb_tmp += uintptr(xcb_pad)
  14901. xcb_pad = uint32(0)
  14902. }
  14903. xcb_block_len = uint32(0)
  14904. xcb_padding_offset = uint32(0)
  14905. return libc.Int32FromUint32(xcb_buffer_len)
  14906. }
  14907. func Xxcb_change_gc_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t) (r int32) {
  14908. bp := tls.Alloc(96)
  14909. defer tls.Free(96)
  14910. var _ /* _aux at bp+0 */ Txcb_change_gc_value_list_t
  14911. return Xxcb_change_gc_value_list_unpack(tls, _buffer, value_mask, bp)
  14912. }
  14913. func Xxcb_change_gc_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  14914. var _aux, xcb_tmp uintptr
  14915. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  14916. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  14917. xcb_tmp = _buffer
  14918. _aux = _buffer
  14919. xcb_buffer_len = uint32(0)
  14920. xcb_block_len = uint32(0)
  14921. xcb_pad = uint32(0)
  14922. xcb_align_to = uint32(0)
  14923. xcb_block_len += uint32(12)
  14924. xcb_tmp += uintptr(xcb_block_len)
  14925. xcb_buffer_len += xcb_block_len
  14926. xcb_block_len = uint32(0)
  14927. /* value_list */
  14928. xcb_block_len += libc.Uint32FromInt32(Xxcb_change_gc_value_list_sizeof(tls, xcb_tmp, (*Txcb_change_gc_request_t)(unsafe.Pointer(_aux)).Fvalue_mask))
  14929. xcb_tmp += uintptr(xcb_block_len)
  14930. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  14931. /* insert padding */
  14932. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  14933. xcb_buffer_len += xcb_block_len + xcb_pad
  14934. if uint32(0) != xcb_pad {
  14935. xcb_tmp += uintptr(xcb_pad)
  14936. xcb_pad = uint32(0)
  14937. }
  14938. xcb_block_len = uint32(0)
  14939. return libc.Int32FromUint32(xcb_buffer_len)
  14940. }
  14941. 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) {
  14942. bp := tls.Alloc(64)
  14943. defer tls.Free(64)
  14944. var xcb_ret Txcb_void_cookie_t
  14945. var _ /* xcb_out at bp+40 */ Txcb_change_gc_request_t
  14946. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  14947. _ = xcb_ret
  14948. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  14949. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fgc = gc
  14950. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  14951. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  14952. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  14953. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14954. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  14955. /* xcb_change_gc_value_list_t value_list */
  14956. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  14957. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_gc_value_list_sizeof(tls, value_list, value_mask))
  14958. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req118)))
  14959. return xcb_ret
  14960. }
  14961. var _xcb_req118 = Txcb_protocol_request_t{
  14962. Fcount: uint32(3),
  14963. Fopcode: uint8(m_XCB_CHANGE_GC),
  14964. Fisvoid: uint8(1),
  14965. }
  14966. 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) {
  14967. bp := tls.Alloc(64)
  14968. defer tls.Free(64)
  14969. var xcb_ret Txcb_void_cookie_t
  14970. var _ /* xcb_out at bp+40 */ Txcb_change_gc_request_t
  14971. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  14972. _ = xcb_ret
  14973. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  14974. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fgc = gc
  14975. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  14976. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  14977. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  14978. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  14979. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  14980. /* xcb_change_gc_value_list_t value_list */
  14981. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  14982. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_gc_value_list_sizeof(tls, value_list, value_mask))
  14983. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req119)))
  14984. return xcb_ret
  14985. }
  14986. var _xcb_req119 = Txcb_protocol_request_t{
  14987. Fcount: uint32(3),
  14988. Fopcode: uint8(m_XCB_CHANGE_GC),
  14989. Fisvoid: uint8(1),
  14990. }
  14991. 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) {
  14992. bp := tls.Alloc(64)
  14993. defer tls.Free(64)
  14994. var xcb_ret Txcb_void_cookie_t
  14995. var _ /* xcb_aux0 at bp+52 */ uintptr
  14996. var _ /* xcb_out at bp+40 */ Txcb_change_gc_request_t
  14997. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  14998. _ = xcb_ret
  14999. *(*uintptr)(unsafe.Pointer(bp + 52)) = uintptr(0)
  15000. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  15001. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fgc = gc
  15002. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  15003. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  15004. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15005. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15006. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15007. /* xcb_change_gc_value_list_t value_list */
  15008. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_gc_value_list_serialize(tls, bp+52, value_mask, value_list))
  15009. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 52))
  15010. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req120)))
  15011. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 52)))
  15012. return xcb_ret
  15013. }
  15014. var _xcb_req120 = Txcb_protocol_request_t{
  15015. Fcount: uint32(3),
  15016. Fopcode: uint8(m_XCB_CHANGE_GC),
  15017. Fisvoid: uint8(1),
  15018. }
  15019. 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) {
  15020. bp := tls.Alloc(64)
  15021. defer tls.Free(64)
  15022. var xcb_ret Txcb_void_cookie_t
  15023. var _ /* xcb_aux0 at bp+52 */ uintptr
  15024. var _ /* xcb_out at bp+40 */ Txcb_change_gc_request_t
  15025. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  15026. _ = xcb_ret
  15027. *(*uintptr)(unsafe.Pointer(bp + 52)) = uintptr(0)
  15028. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  15029. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fgc = gc
  15030. (*(*Txcb_change_gc_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  15031. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  15032. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15033. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15034. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15035. /* xcb_change_gc_value_list_t value_list */
  15036. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_gc_value_list_serialize(tls, bp+52, value_mask, value_list))
  15037. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 52))
  15038. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req121)))
  15039. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 52)))
  15040. return xcb_ret
  15041. }
  15042. var _xcb_req121 = Txcb_protocol_request_t{
  15043. Fcount: uint32(3),
  15044. Fopcode: uint8(m_XCB_CHANGE_GC),
  15045. Fisvoid: uint8(1),
  15046. }
  15047. func Xxcb_change_gc_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  15048. return R + libc.UintptrFromInt32(1)*12
  15049. }
  15050. 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) {
  15051. bp := tls.Alloc(48)
  15052. defer tls.Free(48)
  15053. var xcb_ret Txcb_void_cookie_t
  15054. var _ /* xcb_out at bp+32 */ Txcb_copy_gc_request_t
  15055. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15056. _ = xcb_ret
  15057. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  15058. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 32))).Fsrc_gc = src_gc
  15059. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 32))).Fdst_gc = dst_gc
  15060. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 32))).Fvalue_mask = value_mask
  15061. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  15062. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  15063. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15064. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15065. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req122)))
  15066. return xcb_ret
  15067. }
  15068. var _xcb_req122 = Txcb_protocol_request_t{
  15069. Fcount: uint32(2),
  15070. Fopcode: uint8(m_XCB_COPY_GC),
  15071. Fisvoid: uint8(1),
  15072. }
  15073. 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) {
  15074. bp := tls.Alloc(48)
  15075. defer tls.Free(48)
  15076. var xcb_ret Txcb_void_cookie_t
  15077. var _ /* xcb_out at bp+32 */ Txcb_copy_gc_request_t
  15078. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15079. _ = xcb_ret
  15080. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  15081. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 32))).Fsrc_gc = src_gc
  15082. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 32))).Fdst_gc = dst_gc
  15083. (*(*Txcb_copy_gc_request_t)(unsafe.Pointer(bp + 32))).Fvalue_mask = value_mask
  15084. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  15085. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  15086. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15087. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15088. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req123)))
  15089. return xcb_ret
  15090. }
  15091. var _xcb_req123 = Txcb_protocol_request_t{
  15092. Fcount: uint32(2),
  15093. Fopcode: uint8(m_XCB_COPY_GC),
  15094. Fisvoid: uint8(1),
  15095. }
  15096. func Xxcb_set_dashes_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  15097. var _aux, xcb_tmp uintptr
  15098. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  15099. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  15100. xcb_tmp = _buffer
  15101. _aux = _buffer
  15102. xcb_buffer_len = uint32(0)
  15103. xcb_block_len = uint32(0)
  15104. xcb_pad = uint32(0)
  15105. xcb_align_to = uint32(0)
  15106. xcb_block_len += uint32(12)
  15107. xcb_tmp += uintptr(xcb_block_len)
  15108. xcb_buffer_len += xcb_block_len
  15109. xcb_block_len = uint32(0)
  15110. /* dashes */
  15111. xcb_block_len += uint32((*Txcb_set_dashes_request_t)(unsafe.Pointer(_aux)).Fdashes_len) * uint32(1)
  15112. xcb_tmp += uintptr(xcb_block_len)
  15113. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  15114. /* insert padding */
  15115. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  15116. xcb_buffer_len += xcb_block_len + xcb_pad
  15117. if uint32(0) != xcb_pad {
  15118. xcb_tmp += uintptr(xcb_pad)
  15119. xcb_pad = uint32(0)
  15120. }
  15121. xcb_block_len = uint32(0)
  15122. return libc.Int32FromUint32(xcb_buffer_len)
  15123. }
  15124. 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) {
  15125. bp := tls.Alloc(64)
  15126. defer tls.Free(64)
  15127. var xcb_ret Txcb_void_cookie_t
  15128. var _ /* xcb_out at bp+48 */ Txcb_set_dashes_request_t
  15129. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15130. _ = xcb_ret
  15131. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  15132. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15133. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 48))).Fdash_offset = dash_offset
  15134. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 48))).Fdashes_len = dashes_len
  15135. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15136. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15137. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15138. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15139. /* uint8_t dashes */
  15140. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = dashes
  15141. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(dashes_len) * uint32(1)
  15142. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15143. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15144. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req124)))
  15145. return xcb_ret
  15146. }
  15147. var _xcb_req124 = Txcb_protocol_request_t{
  15148. Fcount: uint32(4),
  15149. Fopcode: uint8(m_XCB_SET_DASHES),
  15150. Fisvoid: uint8(1),
  15151. }
  15152. 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) {
  15153. bp := tls.Alloc(64)
  15154. defer tls.Free(64)
  15155. var xcb_ret Txcb_void_cookie_t
  15156. var _ /* xcb_out at bp+48 */ Txcb_set_dashes_request_t
  15157. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15158. _ = xcb_ret
  15159. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  15160. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15161. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 48))).Fdash_offset = dash_offset
  15162. (*(*Txcb_set_dashes_request_t)(unsafe.Pointer(bp + 48))).Fdashes_len = dashes_len
  15163. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15164. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15165. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15166. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15167. /* uint8_t dashes */
  15168. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = dashes
  15169. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(dashes_len) * uint32(1)
  15170. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15171. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15172. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req125)))
  15173. return xcb_ret
  15174. }
  15175. var _xcb_req125 = Txcb_protocol_request_t{
  15176. Fcount: uint32(4),
  15177. Fopcode: uint8(m_XCB_SET_DASHES),
  15178. Fisvoid: uint8(1),
  15179. }
  15180. func Xxcb_set_dashes_dashes(tls *libc.TLS, R uintptr) (r uintptr) {
  15181. return R + libc.UintptrFromInt32(1)*12
  15182. }
  15183. func Xxcb_set_dashes_dashes_length(tls *libc.TLS, R uintptr) (r int32) {
  15184. return libc.Int32FromUint16((*Txcb_set_dashes_request_t)(unsafe.Pointer(R)).Fdashes_len)
  15185. }
  15186. func Xxcb_set_dashes_dashes_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  15187. var i Txcb_generic_iterator_t
  15188. _ = i
  15189. i.Fdata = R + libc.UintptrFromInt32(1)*12 + uintptr((*Txcb_set_dashes_request_t)(unsafe.Pointer(R)).Fdashes_len)
  15190. i.Frem = 0
  15191. i.Findex = int32(i.Fdata) - int32(R)
  15192. return i
  15193. }
  15194. func Xxcb_set_clip_rectangles_sizeof(tls *libc.TLS, _buffer uintptr, rectangles_len Tuint32_t) (r int32) {
  15195. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  15196. var xcb_tmp uintptr
  15197. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  15198. xcb_tmp = _buffer
  15199. xcb_buffer_len = uint32(0)
  15200. xcb_block_len = uint32(0)
  15201. xcb_pad = uint32(0)
  15202. xcb_align_to = uint32(0)
  15203. xcb_block_len += uint32(12)
  15204. xcb_tmp += uintptr(xcb_block_len)
  15205. xcb_buffer_len += xcb_block_len
  15206. xcb_block_len = uint32(0)
  15207. /* rectangles */
  15208. xcb_block_len += rectangles_len * uint32(8)
  15209. xcb_tmp += uintptr(xcb_block_len)
  15210. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  15211. /* insert padding */
  15212. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  15213. xcb_buffer_len += xcb_block_len + xcb_pad
  15214. if uint32(0) != xcb_pad {
  15215. xcb_tmp += uintptr(xcb_pad)
  15216. xcb_pad = uint32(0)
  15217. }
  15218. xcb_block_len = uint32(0)
  15219. return libc.Int32FromUint32(xcb_buffer_len)
  15220. }
  15221. 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) {
  15222. bp := tls.Alloc(64)
  15223. defer tls.Free(64)
  15224. var xcb_ret Txcb_void_cookie_t
  15225. var _ /* xcb_out at bp+48 */ Txcb_set_clip_rectangles_request_t
  15226. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15227. _ = xcb_ret
  15228. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 48))).Fordering = ordering
  15229. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15230. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 48))).Fclip_x_origin = clip_x_origin
  15231. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 48))).Fclip_y_origin = clip_y_origin
  15232. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15233. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15234. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15235. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15236. /* xcb_rectangle_t rectangles */
  15237. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  15238. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = rectangles_len * uint32(8)
  15239. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15240. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15241. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req126)))
  15242. return xcb_ret
  15243. }
  15244. var _xcb_req126 = Txcb_protocol_request_t{
  15245. Fcount: uint32(4),
  15246. Fopcode: uint8(m_XCB_SET_CLIP_RECTANGLES),
  15247. Fisvoid: uint8(1),
  15248. }
  15249. 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) {
  15250. bp := tls.Alloc(64)
  15251. defer tls.Free(64)
  15252. var xcb_ret Txcb_void_cookie_t
  15253. var _ /* xcb_out at bp+48 */ Txcb_set_clip_rectangles_request_t
  15254. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15255. _ = xcb_ret
  15256. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 48))).Fordering = ordering
  15257. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15258. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 48))).Fclip_x_origin = clip_x_origin
  15259. (*(*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(bp + 48))).Fclip_y_origin = clip_y_origin
  15260. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15261. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15262. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15263. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15264. /* xcb_rectangle_t rectangles */
  15265. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  15266. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = rectangles_len * uint32(8)
  15267. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15268. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15269. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req127)))
  15270. return xcb_ret
  15271. }
  15272. var _xcb_req127 = Txcb_protocol_request_t{
  15273. Fcount: uint32(4),
  15274. Fopcode: uint8(m_XCB_SET_CLIP_RECTANGLES),
  15275. Fisvoid: uint8(1),
  15276. }
  15277. func Xxcb_set_clip_rectangles_rectangles(tls *libc.TLS, R uintptr) (r uintptr) {
  15278. return R + libc.UintptrFromInt32(1)*12
  15279. }
  15280. func Xxcb_set_clip_rectangles_rectangles_length(tls *libc.TLS, R uintptr) (r int32) {
  15281. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(8))
  15282. }
  15283. func Xxcb_set_clip_rectangles_rectangles_iterator(tls *libc.TLS, R uintptr) (r Txcb_rectangle_iterator_t) {
  15284. var i Txcb_rectangle_iterator_t
  15285. _ = i
  15286. i.Fdata = R + libc.UintptrFromInt32(1)*12
  15287. i.Frem = libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_set_clip_rectangles_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(8))
  15288. i.Findex = int32(i.Fdata) - int32(R)
  15289. return i
  15290. }
  15291. func Xxcb_free_gc_checked(tls *libc.TLS, c uintptr, gc Txcb_gcontext_t) (r Txcb_void_cookie_t) {
  15292. bp := tls.Alloc(48)
  15293. defer tls.Free(48)
  15294. var xcb_ret Txcb_void_cookie_t
  15295. var _ /* xcb_out at bp+32 */ Txcb_free_gc_request_t
  15296. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15297. _ = xcb_ret
  15298. (*(*Txcb_free_gc_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  15299. (*(*Txcb_free_gc_request_t)(unsafe.Pointer(bp + 32))).Fgc = gc
  15300. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  15301. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  15302. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15303. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15304. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req128)))
  15305. return xcb_ret
  15306. }
  15307. var _xcb_req128 = Txcb_protocol_request_t{
  15308. Fcount: uint32(2),
  15309. Fopcode: uint8(m_XCB_FREE_GC),
  15310. Fisvoid: uint8(1),
  15311. }
  15312. func Xxcb_free_gc(tls *libc.TLS, c uintptr, gc Txcb_gcontext_t) (r Txcb_void_cookie_t) {
  15313. bp := tls.Alloc(48)
  15314. defer tls.Free(48)
  15315. var xcb_ret Txcb_void_cookie_t
  15316. var _ /* xcb_out at bp+32 */ Txcb_free_gc_request_t
  15317. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15318. _ = xcb_ret
  15319. (*(*Txcb_free_gc_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  15320. (*(*Txcb_free_gc_request_t)(unsafe.Pointer(bp + 32))).Fgc = gc
  15321. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  15322. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  15323. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15324. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15325. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req129)))
  15326. return xcb_ret
  15327. }
  15328. var _xcb_req129 = Txcb_protocol_request_t{
  15329. Fcount: uint32(2),
  15330. Fopcode: uint8(m_XCB_FREE_GC),
  15331. Fisvoid: uint8(1),
  15332. }
  15333. 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) {
  15334. bp := tls.Alloc(48)
  15335. defer tls.Free(48)
  15336. var xcb_ret Txcb_void_cookie_t
  15337. var _ /* xcb_out at bp+32 */ Txcb_clear_area_request_t
  15338. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15339. _ = xcb_ret
  15340. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fexposures = exposures
  15341. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  15342. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fx = x
  15343. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fy = y
  15344. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  15345. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  15346. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  15347. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  15348. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15349. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15350. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req130)))
  15351. return xcb_ret
  15352. }
  15353. var _xcb_req130 = Txcb_protocol_request_t{
  15354. Fcount: uint32(2),
  15355. Fopcode: uint8(m_XCB_CLEAR_AREA),
  15356. Fisvoid: uint8(1),
  15357. }
  15358. 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) {
  15359. bp := tls.Alloc(48)
  15360. defer tls.Free(48)
  15361. var xcb_ret Txcb_void_cookie_t
  15362. var _ /* xcb_out at bp+32 */ Txcb_clear_area_request_t
  15363. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15364. _ = xcb_ret
  15365. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fexposures = exposures
  15366. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  15367. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fx = x
  15368. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fy = y
  15369. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  15370. (*(*Txcb_clear_area_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  15371. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  15372. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  15373. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15374. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15375. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req131)))
  15376. return xcb_ret
  15377. }
  15378. var _xcb_req131 = Txcb_protocol_request_t{
  15379. Fcount: uint32(2),
  15380. Fopcode: uint8(m_XCB_CLEAR_AREA),
  15381. Fisvoid: uint8(1),
  15382. }
  15383. 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) {
  15384. bp := tls.Alloc(64)
  15385. defer tls.Free(64)
  15386. var xcb_ret Txcb_void_cookie_t
  15387. var _ /* xcb_out at bp+32 */ Txcb_copy_area_request_t
  15388. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15389. _ = xcb_ret
  15390. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  15391. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fsrc_drawable = src_drawable
  15392. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fdst_drawable = dst_drawable
  15393. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fgc = gc
  15394. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fsrc_x = src_x
  15395. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fsrc_y = src_y
  15396. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fdst_x = dst_x
  15397. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fdst_y = dst_y
  15398. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  15399. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  15400. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  15401. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(28)
  15402. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15403. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15404. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req132)))
  15405. return xcb_ret
  15406. }
  15407. var _xcb_req132 = Txcb_protocol_request_t{
  15408. Fcount: uint32(2),
  15409. Fopcode: uint8(m_XCB_COPY_AREA),
  15410. Fisvoid: uint8(1),
  15411. }
  15412. 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) {
  15413. bp := tls.Alloc(64)
  15414. defer tls.Free(64)
  15415. var xcb_ret Txcb_void_cookie_t
  15416. var _ /* xcb_out at bp+32 */ Txcb_copy_area_request_t
  15417. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15418. _ = xcb_ret
  15419. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  15420. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fsrc_drawable = src_drawable
  15421. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fdst_drawable = dst_drawable
  15422. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fgc = gc
  15423. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fsrc_x = src_x
  15424. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fsrc_y = src_y
  15425. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fdst_x = dst_x
  15426. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fdst_y = dst_y
  15427. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  15428. (*(*Txcb_copy_area_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  15429. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  15430. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(28)
  15431. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15432. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15433. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req133)))
  15434. return xcb_ret
  15435. }
  15436. var _xcb_req133 = Txcb_protocol_request_t{
  15437. Fcount: uint32(2),
  15438. Fopcode: uint8(m_XCB_COPY_AREA),
  15439. Fisvoid: uint8(1),
  15440. }
  15441. 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) {
  15442. bp := tls.Alloc(64)
  15443. defer tls.Free(64)
  15444. var xcb_ret Txcb_void_cookie_t
  15445. var _ /* xcb_out at bp+32 */ Txcb_copy_plane_request_t
  15446. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15447. _ = xcb_ret
  15448. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  15449. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fsrc_drawable = src_drawable
  15450. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fdst_drawable = dst_drawable
  15451. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fgc = gc
  15452. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fsrc_x = src_x
  15453. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fsrc_y = src_y
  15454. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fdst_x = dst_x
  15455. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fdst_y = dst_y
  15456. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  15457. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  15458. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fbit_plane = bit_plane
  15459. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  15460. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(32)
  15461. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15462. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15463. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req134)))
  15464. return xcb_ret
  15465. }
  15466. var _xcb_req134 = Txcb_protocol_request_t{
  15467. Fcount: uint32(2),
  15468. Fopcode: uint8(m_XCB_COPY_PLANE),
  15469. Fisvoid: uint8(1),
  15470. }
  15471. 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) {
  15472. bp := tls.Alloc(64)
  15473. defer tls.Free(64)
  15474. var xcb_ret Txcb_void_cookie_t
  15475. var _ /* xcb_out at bp+32 */ Txcb_copy_plane_request_t
  15476. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  15477. _ = xcb_ret
  15478. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  15479. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fsrc_drawable = src_drawable
  15480. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fdst_drawable = dst_drawable
  15481. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fgc = gc
  15482. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fsrc_x = src_x
  15483. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fsrc_y = src_y
  15484. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fdst_x = dst_x
  15485. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fdst_y = dst_y
  15486. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  15487. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  15488. (*(*Txcb_copy_plane_request_t)(unsafe.Pointer(bp + 32))).Fbit_plane = bit_plane
  15489. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  15490. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(32)
  15491. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15492. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15493. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req135)))
  15494. return xcb_ret
  15495. }
  15496. var _xcb_req135 = Txcb_protocol_request_t{
  15497. Fcount: uint32(2),
  15498. Fopcode: uint8(m_XCB_COPY_PLANE),
  15499. Fisvoid: uint8(1),
  15500. }
  15501. func Xxcb_poly_point_sizeof(tls *libc.TLS, _buffer uintptr, points_len Tuint32_t) (r int32) {
  15502. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  15503. var xcb_tmp uintptr
  15504. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  15505. xcb_tmp = _buffer
  15506. xcb_buffer_len = uint32(0)
  15507. xcb_block_len = uint32(0)
  15508. xcb_pad = uint32(0)
  15509. xcb_align_to = uint32(0)
  15510. xcb_block_len += uint32(12)
  15511. xcb_tmp += uintptr(xcb_block_len)
  15512. xcb_buffer_len += xcb_block_len
  15513. xcb_block_len = uint32(0)
  15514. /* points */
  15515. xcb_block_len += points_len * uint32(4)
  15516. xcb_tmp += uintptr(xcb_block_len)
  15517. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  15518. /* insert padding */
  15519. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  15520. xcb_buffer_len += xcb_block_len + xcb_pad
  15521. if uint32(0) != xcb_pad {
  15522. xcb_tmp += uintptr(xcb_pad)
  15523. xcb_pad = uint32(0)
  15524. }
  15525. xcb_block_len = uint32(0)
  15526. return libc.Int32FromUint32(xcb_buffer_len)
  15527. }
  15528. 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) {
  15529. bp := tls.Alloc(64)
  15530. defer tls.Free(64)
  15531. var xcb_ret Txcb_void_cookie_t
  15532. var _ /* xcb_out at bp+48 */ Txcb_poly_point_request_t
  15533. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15534. _ = xcb_ret
  15535. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 48))).Fcoordinate_mode = coordinate_mode
  15536. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  15537. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15538. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15539. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15540. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15541. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15542. /* xcb_point_t points */
  15543. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  15544. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = points_len * uint32(4)
  15545. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15546. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15547. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req136)))
  15548. return xcb_ret
  15549. }
  15550. var _xcb_req136 = Txcb_protocol_request_t{
  15551. Fcount: uint32(4),
  15552. Fopcode: uint8(m_XCB_POLY_POINT),
  15553. Fisvoid: uint8(1),
  15554. }
  15555. 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) {
  15556. bp := tls.Alloc(64)
  15557. defer tls.Free(64)
  15558. var xcb_ret Txcb_void_cookie_t
  15559. var _ /* xcb_out at bp+48 */ Txcb_poly_point_request_t
  15560. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15561. _ = xcb_ret
  15562. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 48))).Fcoordinate_mode = coordinate_mode
  15563. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  15564. (*(*Txcb_poly_point_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15565. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15566. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15567. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15568. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15569. /* xcb_point_t points */
  15570. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  15571. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = points_len * uint32(4)
  15572. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15573. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15574. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req137)))
  15575. return xcb_ret
  15576. }
  15577. var _xcb_req137 = Txcb_protocol_request_t{
  15578. Fcount: uint32(4),
  15579. Fopcode: uint8(m_XCB_POLY_POINT),
  15580. Fisvoid: uint8(1),
  15581. }
  15582. func Xxcb_poly_point_points(tls *libc.TLS, R uintptr) (r uintptr) {
  15583. return R + libc.UintptrFromInt32(1)*12
  15584. }
  15585. func Xxcb_poly_point_points_length(tls *libc.TLS, R uintptr) (r int32) {
  15586. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_point_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(4))
  15587. }
  15588. func Xxcb_poly_point_points_iterator(tls *libc.TLS, R uintptr) (r Txcb_point_iterator_t) {
  15589. var i Txcb_point_iterator_t
  15590. _ = i
  15591. i.Fdata = R + libc.UintptrFromInt32(1)*12
  15592. i.Frem = libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_point_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(4))
  15593. i.Findex = int32(i.Fdata) - int32(R)
  15594. return i
  15595. }
  15596. func Xxcb_poly_line_sizeof(tls *libc.TLS, _buffer uintptr, points_len Tuint32_t) (r int32) {
  15597. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  15598. var xcb_tmp uintptr
  15599. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  15600. xcb_tmp = _buffer
  15601. xcb_buffer_len = uint32(0)
  15602. xcb_block_len = uint32(0)
  15603. xcb_pad = uint32(0)
  15604. xcb_align_to = uint32(0)
  15605. xcb_block_len += uint32(12)
  15606. xcb_tmp += uintptr(xcb_block_len)
  15607. xcb_buffer_len += xcb_block_len
  15608. xcb_block_len = uint32(0)
  15609. /* points */
  15610. xcb_block_len += points_len * uint32(4)
  15611. xcb_tmp += uintptr(xcb_block_len)
  15612. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  15613. /* insert padding */
  15614. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  15615. xcb_buffer_len += xcb_block_len + xcb_pad
  15616. if uint32(0) != xcb_pad {
  15617. xcb_tmp += uintptr(xcb_pad)
  15618. xcb_pad = uint32(0)
  15619. }
  15620. xcb_block_len = uint32(0)
  15621. return libc.Int32FromUint32(xcb_buffer_len)
  15622. }
  15623. 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) {
  15624. bp := tls.Alloc(64)
  15625. defer tls.Free(64)
  15626. var xcb_ret Txcb_void_cookie_t
  15627. var _ /* xcb_out at bp+48 */ Txcb_poly_line_request_t
  15628. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15629. _ = xcb_ret
  15630. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 48))).Fcoordinate_mode = coordinate_mode
  15631. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  15632. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15633. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15634. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15635. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15636. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15637. /* xcb_point_t points */
  15638. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  15639. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = points_len * uint32(4)
  15640. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15641. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15642. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req138)))
  15643. return xcb_ret
  15644. }
  15645. var _xcb_req138 = Txcb_protocol_request_t{
  15646. Fcount: uint32(4),
  15647. Fopcode: uint8(m_XCB_POLY_LINE),
  15648. Fisvoid: uint8(1),
  15649. }
  15650. 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) {
  15651. bp := tls.Alloc(64)
  15652. defer tls.Free(64)
  15653. var xcb_ret Txcb_void_cookie_t
  15654. var _ /* xcb_out at bp+48 */ Txcb_poly_line_request_t
  15655. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15656. _ = xcb_ret
  15657. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 48))).Fcoordinate_mode = coordinate_mode
  15658. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  15659. (*(*Txcb_poly_line_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15660. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15661. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15662. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15663. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15664. /* xcb_point_t points */
  15665. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  15666. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = points_len * uint32(4)
  15667. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15668. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15669. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req139)))
  15670. return xcb_ret
  15671. }
  15672. var _xcb_req139 = Txcb_protocol_request_t{
  15673. Fcount: uint32(4),
  15674. Fopcode: uint8(m_XCB_POLY_LINE),
  15675. Fisvoid: uint8(1),
  15676. }
  15677. func Xxcb_poly_line_points(tls *libc.TLS, R uintptr) (r uintptr) {
  15678. return R + libc.UintptrFromInt32(1)*12
  15679. }
  15680. func Xxcb_poly_line_points_length(tls *libc.TLS, R uintptr) (r int32) {
  15681. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_line_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(4))
  15682. }
  15683. func Xxcb_poly_line_points_iterator(tls *libc.TLS, R uintptr) (r Txcb_point_iterator_t) {
  15684. var i Txcb_point_iterator_t
  15685. _ = i
  15686. i.Fdata = R + libc.UintptrFromInt32(1)*12
  15687. i.Frem = libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_line_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(4))
  15688. i.Findex = int32(i.Fdata) - int32(R)
  15689. return i
  15690. }
  15691. func Xxcb_segment_next(tls *libc.TLS, i uintptr) {
  15692. var p1 uintptr
  15693. _ = p1
  15694. (*Txcb_segment_iterator_t)(unsafe.Pointer(i)).Frem--
  15695. (*Txcb_segment_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  15696. p1 = i + 8
  15697. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(8))
  15698. }
  15699. func Xxcb_segment_end(tls *libc.TLS, i Txcb_segment_iterator_t) (r Txcb_generic_iterator_t) {
  15700. var ret Txcb_generic_iterator_t
  15701. _ = ret
  15702. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  15703. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  15704. ret.Frem = 0
  15705. return ret
  15706. }
  15707. func Xxcb_poly_segment_sizeof(tls *libc.TLS, _buffer uintptr, segments_len Tuint32_t) (r int32) {
  15708. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  15709. var xcb_tmp uintptr
  15710. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  15711. xcb_tmp = _buffer
  15712. xcb_buffer_len = uint32(0)
  15713. xcb_block_len = uint32(0)
  15714. xcb_pad = uint32(0)
  15715. xcb_align_to = uint32(0)
  15716. xcb_block_len += uint32(12)
  15717. xcb_tmp += uintptr(xcb_block_len)
  15718. xcb_buffer_len += xcb_block_len
  15719. xcb_block_len = uint32(0)
  15720. /* segments */
  15721. xcb_block_len += segments_len * uint32(8)
  15722. xcb_tmp += uintptr(xcb_block_len)
  15723. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  15724. /* insert padding */
  15725. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  15726. xcb_buffer_len += xcb_block_len + xcb_pad
  15727. if uint32(0) != xcb_pad {
  15728. xcb_tmp += uintptr(xcb_pad)
  15729. xcb_pad = uint32(0)
  15730. }
  15731. xcb_block_len = uint32(0)
  15732. return libc.Int32FromUint32(xcb_buffer_len)
  15733. }
  15734. 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) {
  15735. bp := tls.Alloc(64)
  15736. defer tls.Free(64)
  15737. var xcb_ret Txcb_void_cookie_t
  15738. var _ /* xcb_out at bp+48 */ Txcb_poly_segment_request_t
  15739. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15740. _ = xcb_ret
  15741. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  15742. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  15743. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15744. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15745. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15746. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15747. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15748. /* xcb_segment_t segments */
  15749. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = segments
  15750. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = segments_len * uint32(8)
  15751. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15752. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15753. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req140)))
  15754. return xcb_ret
  15755. }
  15756. var _xcb_req140 = Txcb_protocol_request_t{
  15757. Fcount: uint32(4),
  15758. Fopcode: uint8(m_XCB_POLY_SEGMENT),
  15759. Fisvoid: uint8(1),
  15760. }
  15761. 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) {
  15762. bp := tls.Alloc(64)
  15763. defer tls.Free(64)
  15764. var xcb_ret Txcb_void_cookie_t
  15765. var _ /* xcb_out at bp+48 */ Txcb_poly_segment_request_t
  15766. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15767. _ = xcb_ret
  15768. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  15769. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  15770. (*(*Txcb_poly_segment_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15771. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15772. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15773. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15774. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15775. /* xcb_segment_t segments */
  15776. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = segments
  15777. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = segments_len * uint32(8)
  15778. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15779. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15780. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req141)))
  15781. return xcb_ret
  15782. }
  15783. var _xcb_req141 = Txcb_protocol_request_t{
  15784. Fcount: uint32(4),
  15785. Fopcode: uint8(m_XCB_POLY_SEGMENT),
  15786. Fisvoid: uint8(1),
  15787. }
  15788. func Xxcb_poly_segment_segments(tls *libc.TLS, R uintptr) (r uintptr) {
  15789. return R + libc.UintptrFromInt32(1)*12
  15790. }
  15791. func Xxcb_poly_segment_segments_length(tls *libc.TLS, R uintptr) (r int32) {
  15792. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_segment_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(8))
  15793. }
  15794. func Xxcb_poly_segment_segments_iterator(tls *libc.TLS, R uintptr) (r Txcb_segment_iterator_t) {
  15795. var i Txcb_segment_iterator_t
  15796. _ = i
  15797. i.Fdata = R + libc.UintptrFromInt32(1)*12
  15798. i.Frem = libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_segment_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(8))
  15799. i.Findex = int32(i.Fdata) - int32(R)
  15800. return i
  15801. }
  15802. func Xxcb_poly_rectangle_sizeof(tls *libc.TLS, _buffer uintptr, rectangles_len Tuint32_t) (r int32) {
  15803. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  15804. var xcb_tmp uintptr
  15805. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  15806. xcb_tmp = _buffer
  15807. xcb_buffer_len = uint32(0)
  15808. xcb_block_len = uint32(0)
  15809. xcb_pad = uint32(0)
  15810. xcb_align_to = uint32(0)
  15811. xcb_block_len += uint32(12)
  15812. xcb_tmp += uintptr(xcb_block_len)
  15813. xcb_buffer_len += xcb_block_len
  15814. xcb_block_len = uint32(0)
  15815. /* rectangles */
  15816. xcb_block_len += rectangles_len * uint32(8)
  15817. xcb_tmp += uintptr(xcb_block_len)
  15818. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  15819. /* insert padding */
  15820. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  15821. xcb_buffer_len += xcb_block_len + xcb_pad
  15822. if uint32(0) != xcb_pad {
  15823. xcb_tmp += uintptr(xcb_pad)
  15824. xcb_pad = uint32(0)
  15825. }
  15826. xcb_block_len = uint32(0)
  15827. return libc.Int32FromUint32(xcb_buffer_len)
  15828. }
  15829. 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) {
  15830. bp := tls.Alloc(64)
  15831. defer tls.Free(64)
  15832. var xcb_ret Txcb_void_cookie_t
  15833. var _ /* xcb_out at bp+48 */ Txcb_poly_rectangle_request_t
  15834. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15835. _ = xcb_ret
  15836. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  15837. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  15838. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15839. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15840. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15841. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15842. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15843. /* xcb_rectangle_t rectangles */
  15844. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  15845. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = rectangles_len * uint32(8)
  15846. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15847. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15848. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req142)))
  15849. return xcb_ret
  15850. }
  15851. var _xcb_req142 = Txcb_protocol_request_t{
  15852. Fcount: uint32(4),
  15853. Fopcode: uint8(m_XCB_POLY_RECTANGLE),
  15854. Fisvoid: uint8(1),
  15855. }
  15856. 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) {
  15857. bp := tls.Alloc(64)
  15858. defer tls.Free(64)
  15859. var xcb_ret Txcb_void_cookie_t
  15860. var _ /* xcb_out at bp+48 */ Txcb_poly_rectangle_request_t
  15861. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15862. _ = xcb_ret
  15863. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  15864. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  15865. (*(*Txcb_poly_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15866. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15867. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15868. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15869. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15870. /* xcb_rectangle_t rectangles */
  15871. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  15872. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = rectangles_len * uint32(8)
  15873. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15874. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15875. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req143)))
  15876. return xcb_ret
  15877. }
  15878. var _xcb_req143 = Txcb_protocol_request_t{
  15879. Fcount: uint32(4),
  15880. Fopcode: uint8(m_XCB_POLY_RECTANGLE),
  15881. Fisvoid: uint8(1),
  15882. }
  15883. func Xxcb_poly_rectangle_rectangles(tls *libc.TLS, R uintptr) (r uintptr) {
  15884. return R + libc.UintptrFromInt32(1)*12
  15885. }
  15886. func Xxcb_poly_rectangle_rectangles_length(tls *libc.TLS, R uintptr) (r int32) {
  15887. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_rectangle_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(8))
  15888. }
  15889. func Xxcb_poly_rectangle_rectangles_iterator(tls *libc.TLS, R uintptr) (r Txcb_rectangle_iterator_t) {
  15890. var i Txcb_rectangle_iterator_t
  15891. _ = i
  15892. i.Fdata = R + libc.UintptrFromInt32(1)*12
  15893. i.Frem = libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_rectangle_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(8))
  15894. i.Findex = int32(i.Fdata) - int32(R)
  15895. return i
  15896. }
  15897. func Xxcb_poly_arc_sizeof(tls *libc.TLS, _buffer uintptr, arcs_len Tuint32_t) (r int32) {
  15898. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  15899. var xcb_tmp uintptr
  15900. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  15901. xcb_tmp = _buffer
  15902. xcb_buffer_len = uint32(0)
  15903. xcb_block_len = uint32(0)
  15904. xcb_pad = uint32(0)
  15905. xcb_align_to = uint32(0)
  15906. xcb_block_len += uint32(12)
  15907. xcb_tmp += uintptr(xcb_block_len)
  15908. xcb_buffer_len += xcb_block_len
  15909. xcb_block_len = uint32(0)
  15910. /* arcs */
  15911. xcb_block_len += arcs_len * uint32(12)
  15912. xcb_tmp += uintptr(xcb_block_len)
  15913. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  15914. /* insert padding */
  15915. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  15916. xcb_buffer_len += xcb_block_len + xcb_pad
  15917. if uint32(0) != xcb_pad {
  15918. xcb_tmp += uintptr(xcb_pad)
  15919. xcb_pad = uint32(0)
  15920. }
  15921. xcb_block_len = uint32(0)
  15922. return libc.Int32FromUint32(xcb_buffer_len)
  15923. }
  15924. 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) {
  15925. bp := tls.Alloc(64)
  15926. defer tls.Free(64)
  15927. var xcb_ret Txcb_void_cookie_t
  15928. var _ /* xcb_out at bp+48 */ Txcb_poly_arc_request_t
  15929. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15930. _ = xcb_ret
  15931. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  15932. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  15933. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15934. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15935. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15936. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15937. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15938. /* xcb_arc_t arcs */
  15939. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = arcs
  15940. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = arcs_len * uint32(12)
  15941. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15942. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15943. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req144)))
  15944. return xcb_ret
  15945. }
  15946. var _xcb_req144 = Txcb_protocol_request_t{
  15947. Fcount: uint32(4),
  15948. Fopcode: uint8(m_XCB_POLY_ARC),
  15949. Fisvoid: uint8(1),
  15950. }
  15951. 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) {
  15952. bp := tls.Alloc(64)
  15953. defer tls.Free(64)
  15954. var xcb_ret Txcb_void_cookie_t
  15955. var _ /* xcb_out at bp+48 */ Txcb_poly_arc_request_t
  15956. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  15957. _ = xcb_ret
  15958. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  15959. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  15960. (*(*Txcb_poly_arc_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  15961. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  15962. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  15963. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  15964. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  15965. /* xcb_arc_t arcs */
  15966. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = arcs
  15967. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = arcs_len * uint32(12)
  15968. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  15969. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  15970. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req145)))
  15971. return xcb_ret
  15972. }
  15973. var _xcb_req145 = Txcb_protocol_request_t{
  15974. Fcount: uint32(4),
  15975. Fopcode: uint8(m_XCB_POLY_ARC),
  15976. Fisvoid: uint8(1),
  15977. }
  15978. func Xxcb_poly_arc_arcs(tls *libc.TLS, R uintptr) (r uintptr) {
  15979. return R + libc.UintptrFromInt32(1)*12
  15980. }
  15981. func Xxcb_poly_arc_arcs_length(tls *libc.TLS, R uintptr) (r int32) {
  15982. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_arc_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(12))
  15983. }
  15984. func Xxcb_poly_arc_arcs_iterator(tls *libc.TLS, R uintptr) (r Txcb_arc_iterator_t) {
  15985. var i Txcb_arc_iterator_t
  15986. _ = i
  15987. i.Fdata = R + libc.UintptrFromInt32(1)*12
  15988. i.Frem = libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_arc_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(12))
  15989. i.Findex = int32(i.Fdata) - int32(R)
  15990. return i
  15991. }
  15992. func Xxcb_fill_poly_sizeof(tls *libc.TLS, _buffer uintptr, points_len Tuint32_t) (r int32) {
  15993. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  15994. var xcb_tmp uintptr
  15995. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  15996. xcb_tmp = _buffer
  15997. xcb_buffer_len = uint32(0)
  15998. xcb_block_len = uint32(0)
  15999. xcb_pad = uint32(0)
  16000. xcb_align_to = uint32(0)
  16001. xcb_block_len += uint32(16)
  16002. xcb_tmp += uintptr(xcb_block_len)
  16003. xcb_buffer_len += xcb_block_len
  16004. xcb_block_len = uint32(0)
  16005. /* points */
  16006. xcb_block_len += points_len * uint32(4)
  16007. xcb_tmp += uintptr(xcb_block_len)
  16008. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  16009. /* insert padding */
  16010. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16011. xcb_buffer_len += xcb_block_len + xcb_pad
  16012. if uint32(0) != xcb_pad {
  16013. xcb_tmp += uintptr(xcb_pad)
  16014. xcb_pad = uint32(0)
  16015. }
  16016. xcb_block_len = uint32(0)
  16017. return libc.Int32FromUint32(xcb_buffer_len)
  16018. }
  16019. 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) {
  16020. bp := tls.Alloc(64)
  16021. defer tls.Free(64)
  16022. var xcb_ret Txcb_void_cookie_t
  16023. var _ /* xcb_out at bp+48 */ Txcb_fill_poly_request_t
  16024. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16025. _ = xcb_ret
  16026. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  16027. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16028. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16029. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 48))).Fshape = shape
  16030. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 48))).Fcoordinate_mode = coordinate_mode
  16031. libc.Xmemset(tls, bp+48+14, 0, uint32(2))
  16032. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16033. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16034. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16035. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16036. /* xcb_point_t points */
  16037. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  16038. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = points_len * uint32(4)
  16039. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16040. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16041. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req146)))
  16042. return xcb_ret
  16043. }
  16044. var _xcb_req146 = Txcb_protocol_request_t{
  16045. Fcount: uint32(4),
  16046. Fopcode: uint8(m_XCB_FILL_POLY),
  16047. Fisvoid: uint8(1),
  16048. }
  16049. 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) {
  16050. bp := tls.Alloc(64)
  16051. defer tls.Free(64)
  16052. var xcb_ret Txcb_void_cookie_t
  16053. var _ /* xcb_out at bp+48 */ Txcb_fill_poly_request_t
  16054. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16055. _ = xcb_ret
  16056. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  16057. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16058. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16059. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 48))).Fshape = shape
  16060. (*(*Txcb_fill_poly_request_t)(unsafe.Pointer(bp + 48))).Fcoordinate_mode = coordinate_mode
  16061. libc.Xmemset(tls, bp+48+14, 0, uint32(2))
  16062. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16063. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16064. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16065. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16066. /* xcb_point_t points */
  16067. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = points
  16068. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = points_len * uint32(4)
  16069. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16070. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16071. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req147)))
  16072. return xcb_ret
  16073. }
  16074. var _xcb_req147 = Txcb_protocol_request_t{
  16075. Fcount: uint32(4),
  16076. Fopcode: uint8(m_XCB_FILL_POLY),
  16077. Fisvoid: uint8(1),
  16078. }
  16079. func Xxcb_fill_poly_points(tls *libc.TLS, R uintptr) (r uintptr) {
  16080. return R + libc.UintptrFromInt32(1)*16
  16081. }
  16082. func Xxcb_fill_poly_points_length(tls *libc.TLS, R uintptr) (r int32) {
  16083. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_fill_poly_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(16)) / libc.Uint32FromInt64(4))
  16084. }
  16085. func Xxcb_fill_poly_points_iterator(tls *libc.TLS, R uintptr) (r Txcb_point_iterator_t) {
  16086. var i Txcb_point_iterator_t
  16087. _ = i
  16088. i.Fdata = R + libc.UintptrFromInt32(1)*16
  16089. i.Frem = libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_fill_poly_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(16)) / libc.Uint32FromInt64(4))
  16090. i.Findex = int32(i.Fdata) - int32(R)
  16091. return i
  16092. }
  16093. func Xxcb_poly_fill_rectangle_sizeof(tls *libc.TLS, _buffer uintptr, rectangles_len Tuint32_t) (r int32) {
  16094. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16095. var xcb_tmp uintptr
  16096. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16097. xcb_tmp = _buffer
  16098. xcb_buffer_len = uint32(0)
  16099. xcb_block_len = uint32(0)
  16100. xcb_pad = uint32(0)
  16101. xcb_align_to = uint32(0)
  16102. xcb_block_len += uint32(12)
  16103. xcb_tmp += uintptr(xcb_block_len)
  16104. xcb_buffer_len += xcb_block_len
  16105. xcb_block_len = uint32(0)
  16106. /* rectangles */
  16107. xcb_block_len += rectangles_len * uint32(8)
  16108. xcb_tmp += uintptr(xcb_block_len)
  16109. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  16110. /* insert padding */
  16111. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16112. xcb_buffer_len += xcb_block_len + xcb_pad
  16113. if uint32(0) != xcb_pad {
  16114. xcb_tmp += uintptr(xcb_pad)
  16115. xcb_pad = uint32(0)
  16116. }
  16117. xcb_block_len = uint32(0)
  16118. return libc.Int32FromUint32(xcb_buffer_len)
  16119. }
  16120. 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) {
  16121. bp := tls.Alloc(64)
  16122. defer tls.Free(64)
  16123. var xcb_ret Txcb_void_cookie_t
  16124. var _ /* xcb_out at bp+48 */ Txcb_poly_fill_rectangle_request_t
  16125. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16126. _ = xcb_ret
  16127. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  16128. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16129. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16130. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16131. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  16132. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16133. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16134. /* xcb_rectangle_t rectangles */
  16135. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  16136. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = rectangles_len * uint32(8)
  16137. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16138. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16139. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req148)))
  16140. return xcb_ret
  16141. }
  16142. var _xcb_req148 = Txcb_protocol_request_t{
  16143. Fcount: uint32(4),
  16144. Fopcode: uint8(m_XCB_POLY_FILL_RECTANGLE),
  16145. Fisvoid: uint8(1),
  16146. }
  16147. 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) {
  16148. bp := tls.Alloc(64)
  16149. defer tls.Free(64)
  16150. var xcb_ret Txcb_void_cookie_t
  16151. var _ /* xcb_out at bp+48 */ Txcb_poly_fill_rectangle_request_t
  16152. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16153. _ = xcb_ret
  16154. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  16155. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16156. (*(*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16157. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16158. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  16159. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16160. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16161. /* xcb_rectangle_t rectangles */
  16162. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = rectangles
  16163. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = rectangles_len * uint32(8)
  16164. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16165. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16166. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req149)))
  16167. return xcb_ret
  16168. }
  16169. var _xcb_req149 = Txcb_protocol_request_t{
  16170. Fcount: uint32(4),
  16171. Fopcode: uint8(m_XCB_POLY_FILL_RECTANGLE),
  16172. Fisvoid: uint8(1),
  16173. }
  16174. func Xxcb_poly_fill_rectangle_rectangles(tls *libc.TLS, R uintptr) (r uintptr) {
  16175. return R + libc.UintptrFromInt32(1)*12
  16176. }
  16177. func Xxcb_poly_fill_rectangle_rectangles_length(tls *libc.TLS, R uintptr) (r int32) {
  16178. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(8))
  16179. }
  16180. func Xxcb_poly_fill_rectangle_rectangles_iterator(tls *libc.TLS, R uintptr) (r Txcb_rectangle_iterator_t) {
  16181. var i Txcb_rectangle_iterator_t
  16182. _ = i
  16183. i.Fdata = R + libc.UintptrFromInt32(1)*12
  16184. i.Frem = libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_fill_rectangle_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(8))
  16185. i.Findex = int32(i.Fdata) - int32(R)
  16186. return i
  16187. }
  16188. func Xxcb_poly_fill_arc_sizeof(tls *libc.TLS, _buffer uintptr, arcs_len Tuint32_t) (r int32) {
  16189. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16190. var xcb_tmp uintptr
  16191. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16192. xcb_tmp = _buffer
  16193. xcb_buffer_len = uint32(0)
  16194. xcb_block_len = uint32(0)
  16195. xcb_pad = uint32(0)
  16196. xcb_align_to = uint32(0)
  16197. xcb_block_len += uint32(12)
  16198. xcb_tmp += uintptr(xcb_block_len)
  16199. xcb_buffer_len += xcb_block_len
  16200. xcb_block_len = uint32(0)
  16201. /* arcs */
  16202. xcb_block_len += arcs_len * uint32(12)
  16203. xcb_tmp += uintptr(xcb_block_len)
  16204. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  16205. /* insert padding */
  16206. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16207. xcb_buffer_len += xcb_block_len + xcb_pad
  16208. if uint32(0) != xcb_pad {
  16209. xcb_tmp += uintptr(xcb_pad)
  16210. xcb_pad = uint32(0)
  16211. }
  16212. xcb_block_len = uint32(0)
  16213. return libc.Int32FromUint32(xcb_buffer_len)
  16214. }
  16215. 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) {
  16216. bp := tls.Alloc(64)
  16217. defer tls.Free(64)
  16218. var xcb_ret Txcb_void_cookie_t
  16219. var _ /* xcb_out at bp+48 */ Txcb_poly_fill_arc_request_t
  16220. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16221. _ = xcb_ret
  16222. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  16223. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16224. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16225. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16226. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  16227. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16228. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16229. /* xcb_arc_t arcs */
  16230. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = arcs
  16231. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = arcs_len * uint32(12)
  16232. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16233. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16234. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req150)))
  16235. return xcb_ret
  16236. }
  16237. var _xcb_req150 = Txcb_protocol_request_t{
  16238. Fcount: uint32(4),
  16239. Fopcode: uint8(m_XCB_POLY_FILL_ARC),
  16240. Fisvoid: uint8(1),
  16241. }
  16242. 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) {
  16243. bp := tls.Alloc(64)
  16244. defer tls.Free(64)
  16245. var xcb_ret Txcb_void_cookie_t
  16246. var _ /* xcb_out at bp+48 */ Txcb_poly_fill_arc_request_t
  16247. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16248. _ = xcb_ret
  16249. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  16250. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16251. (*(*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16252. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16253. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  16254. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16255. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16256. /* xcb_arc_t arcs */
  16257. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = arcs
  16258. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = arcs_len * uint32(12)
  16259. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16260. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16261. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req151)))
  16262. return xcb_ret
  16263. }
  16264. var _xcb_req151 = Txcb_protocol_request_t{
  16265. Fcount: uint32(4),
  16266. Fopcode: uint8(m_XCB_POLY_FILL_ARC),
  16267. Fisvoid: uint8(1),
  16268. }
  16269. func Xxcb_poly_fill_arc_arcs(tls *libc.TLS, R uintptr) (r uintptr) {
  16270. return R + libc.UintptrFromInt32(1)*12
  16271. }
  16272. func Xxcb_poly_fill_arc_arcs_length(tls *libc.TLS, R uintptr) (r int32) {
  16273. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(12))
  16274. }
  16275. func Xxcb_poly_fill_arc_arcs_iterator(tls *libc.TLS, R uintptr) (r Txcb_arc_iterator_t) {
  16276. var i Txcb_arc_iterator_t
  16277. _ = i
  16278. i.Fdata = R + libc.UintptrFromInt32(1)*12
  16279. i.Frem = libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_fill_arc_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(12))
  16280. i.Findex = int32(i.Fdata) - int32(R)
  16281. return i
  16282. }
  16283. func Xxcb_put_image_sizeof(tls *libc.TLS, _buffer uintptr, data_len Tuint32_t) (r int32) {
  16284. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16285. var xcb_tmp uintptr
  16286. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16287. xcb_tmp = _buffer
  16288. xcb_buffer_len = uint32(0)
  16289. xcb_block_len = uint32(0)
  16290. xcb_pad = uint32(0)
  16291. xcb_align_to = uint32(0)
  16292. xcb_block_len += uint32(24)
  16293. xcb_tmp += uintptr(xcb_block_len)
  16294. xcb_buffer_len += xcb_block_len
  16295. xcb_block_len = uint32(0)
  16296. /* data */
  16297. xcb_block_len += data_len * uint32(1)
  16298. xcb_tmp += uintptr(xcb_block_len)
  16299. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  16300. /* insert padding */
  16301. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16302. xcb_buffer_len += xcb_block_len + xcb_pad
  16303. if uint32(0) != xcb_pad {
  16304. xcb_tmp += uintptr(xcb_pad)
  16305. xcb_pad = uint32(0)
  16306. }
  16307. xcb_block_len = uint32(0)
  16308. return libc.Int32FromUint32(xcb_buffer_len)
  16309. }
  16310. 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) {
  16311. bp := tls.Alloc(80)
  16312. defer tls.Free(80)
  16313. var xcb_ret Txcb_void_cookie_t
  16314. var _ /* xcb_out at bp+48 */ Txcb_put_image_request_t
  16315. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16316. _ = xcb_ret
  16317. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fformat = format
  16318. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16319. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16320. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fwidth = width
  16321. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fheight = height
  16322. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fdst_x = dst_x
  16323. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fdst_y = dst_y
  16324. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fleft_pad = left_pad
  16325. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fdepth = depth
  16326. libc.Xmemset(tls, bp+48+22, 0, uint32(2))
  16327. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16328. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  16329. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16330. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16331. /* uint8_t data */
  16332. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = data
  16333. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = data_len * uint32(1)
  16334. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16335. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16336. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req152)))
  16337. return xcb_ret
  16338. }
  16339. var _xcb_req152 = Txcb_protocol_request_t{
  16340. Fcount: uint32(4),
  16341. Fopcode: uint8(m_XCB_PUT_IMAGE),
  16342. Fisvoid: uint8(1),
  16343. }
  16344. 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) {
  16345. bp := tls.Alloc(80)
  16346. defer tls.Free(80)
  16347. var xcb_ret Txcb_void_cookie_t
  16348. var _ /* xcb_out at bp+48 */ Txcb_put_image_request_t
  16349. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16350. _ = xcb_ret
  16351. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fformat = format
  16352. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16353. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16354. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fwidth = width
  16355. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fheight = height
  16356. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fdst_x = dst_x
  16357. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fdst_y = dst_y
  16358. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fleft_pad = left_pad
  16359. (*(*Txcb_put_image_request_t)(unsafe.Pointer(bp + 48))).Fdepth = depth
  16360. libc.Xmemset(tls, bp+48+22, 0, uint32(2))
  16361. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16362. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(24)
  16363. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16364. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16365. /* uint8_t data */
  16366. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = data
  16367. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = data_len * uint32(1)
  16368. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16369. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16370. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req153)))
  16371. return xcb_ret
  16372. }
  16373. var _xcb_req153 = Txcb_protocol_request_t{
  16374. Fcount: uint32(4),
  16375. Fopcode: uint8(m_XCB_PUT_IMAGE),
  16376. Fisvoid: uint8(1),
  16377. }
  16378. func Xxcb_put_image_data(tls *libc.TLS, R uintptr) (r uintptr) {
  16379. return R + libc.UintptrFromInt32(1)*24
  16380. }
  16381. func Xxcb_put_image_data_length(tls *libc.TLS, R uintptr) (r int32) {
  16382. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_put_image_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(24)) / libc.Uint32FromInt64(1))
  16383. }
  16384. func Xxcb_put_image_data_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  16385. var i Txcb_generic_iterator_t
  16386. _ = i
  16387. i.Fdata = R + libc.UintptrFromInt32(1)*24 + uintptr((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_put_image_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4))-libc.Uint32FromInt64(24))/libc.Uint32FromInt64(1))
  16388. i.Frem = 0
  16389. i.Findex = int32(i.Fdata) - int32(R)
  16390. return i
  16391. }
  16392. func Xxcb_get_image_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  16393. var _aux, xcb_tmp uintptr
  16394. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16395. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16396. xcb_tmp = _buffer
  16397. _aux = _buffer
  16398. xcb_buffer_len = uint32(0)
  16399. xcb_block_len = uint32(0)
  16400. xcb_pad = uint32(0)
  16401. xcb_align_to = uint32(0)
  16402. xcb_block_len += uint32(32)
  16403. xcb_tmp += uintptr(xcb_block_len)
  16404. xcb_buffer_len += xcb_block_len
  16405. xcb_block_len = uint32(0)
  16406. /* data */
  16407. xcb_block_len += (*Txcb_get_image_reply_t)(unsafe.Pointer(_aux)).Flength * uint32(4) * uint32(1)
  16408. xcb_tmp += uintptr(xcb_block_len)
  16409. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  16410. /* insert padding */
  16411. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16412. xcb_buffer_len += xcb_block_len + xcb_pad
  16413. if uint32(0) != xcb_pad {
  16414. xcb_tmp += uintptr(xcb_pad)
  16415. xcb_pad = uint32(0)
  16416. }
  16417. xcb_block_len = uint32(0)
  16418. return libc.Int32FromUint32(xcb_buffer_len)
  16419. }
  16420. 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) {
  16421. bp := tls.Alloc(64)
  16422. defer tls.Free(64)
  16423. var xcb_ret Txcb_get_image_cookie_t
  16424. var _ /* xcb_out at bp+32 */ Txcb_get_image_request_t
  16425. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16426. _ = xcb_ret
  16427. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fformat = format
  16428. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fdrawable = drawable
  16429. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fx = x
  16430. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fy = y
  16431. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  16432. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  16433. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fplane_mask = plane_mask
  16434. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  16435. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(20)
  16436. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16437. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16438. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req154)))
  16439. return xcb_ret
  16440. }
  16441. var _xcb_req154 = Txcb_protocol_request_t{
  16442. Fcount: uint32(2),
  16443. Fopcode: uint8(m_XCB_GET_IMAGE),
  16444. }
  16445. 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) {
  16446. bp := tls.Alloc(64)
  16447. defer tls.Free(64)
  16448. var xcb_ret Txcb_get_image_cookie_t
  16449. var _ /* xcb_out at bp+32 */ Txcb_get_image_request_t
  16450. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16451. _ = xcb_ret
  16452. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fformat = format
  16453. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fdrawable = drawable
  16454. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fx = x
  16455. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fy = y
  16456. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  16457. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  16458. (*(*Txcb_get_image_request_t)(unsafe.Pointer(bp + 32))).Fplane_mask = plane_mask
  16459. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  16460. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(20)
  16461. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16462. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16463. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req155)))
  16464. return xcb_ret
  16465. }
  16466. var _xcb_req155 = Txcb_protocol_request_t{
  16467. Fcount: uint32(2),
  16468. Fopcode: uint8(m_XCB_GET_IMAGE),
  16469. }
  16470. func Xxcb_get_image_data(tls *libc.TLS, R uintptr) (r uintptr) {
  16471. return R + libc.UintptrFromInt32(1)*32
  16472. }
  16473. func Xxcb_get_image_data_length(tls *libc.TLS, R uintptr) (r int32) {
  16474. return libc.Int32FromUint32((*Txcb_get_image_reply_t)(unsafe.Pointer(R)).Flength * libc.Uint32FromInt32(4))
  16475. }
  16476. func Xxcb_get_image_data_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  16477. var i Txcb_generic_iterator_t
  16478. _ = i
  16479. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_get_image_reply_t)(unsafe.Pointer(R)).Flength*libc.Uint32FromInt32(4))
  16480. i.Frem = 0
  16481. i.Findex = int32(i.Fdata) - int32(R)
  16482. return i
  16483. }
  16484. func Xxcb_get_image_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_image_cookie_t, e uintptr) (r uintptr) {
  16485. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  16486. }
  16487. func Xxcb_poly_text_8_sizeof(tls *libc.TLS, _buffer uintptr, items_len Tuint32_t) (r int32) {
  16488. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16489. var xcb_tmp uintptr
  16490. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16491. xcb_tmp = _buffer
  16492. xcb_buffer_len = uint32(0)
  16493. xcb_block_len = uint32(0)
  16494. xcb_pad = uint32(0)
  16495. xcb_align_to = uint32(0)
  16496. xcb_block_len += uint32(16)
  16497. xcb_tmp += uintptr(xcb_block_len)
  16498. xcb_buffer_len += xcb_block_len
  16499. xcb_block_len = uint32(0)
  16500. /* items */
  16501. xcb_block_len += items_len * uint32(1)
  16502. xcb_tmp += uintptr(xcb_block_len)
  16503. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  16504. /* insert padding */
  16505. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16506. xcb_buffer_len += xcb_block_len + xcb_pad
  16507. if uint32(0) != xcb_pad {
  16508. xcb_tmp += uintptr(xcb_pad)
  16509. xcb_pad = uint32(0)
  16510. }
  16511. xcb_block_len = uint32(0)
  16512. return libc.Int32FromUint32(xcb_buffer_len)
  16513. }
  16514. 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) {
  16515. bp := tls.Alloc(64)
  16516. defer tls.Free(64)
  16517. var xcb_ret Txcb_void_cookie_t
  16518. var _ /* xcb_out at bp+48 */ Txcb_poly_text_8_request_t
  16519. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16520. _ = xcb_ret
  16521. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  16522. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16523. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16524. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 48))).Fx = x
  16525. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 48))).Fy = y
  16526. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16527. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16528. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16529. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16530. /* uint8_t items */
  16531. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  16532. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = items_len * uint32(1)
  16533. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16534. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16535. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req156)))
  16536. return xcb_ret
  16537. }
  16538. var _xcb_req156 = Txcb_protocol_request_t{
  16539. Fcount: uint32(4),
  16540. Fopcode: uint8(m_XCB_POLY_TEXT_8),
  16541. Fisvoid: uint8(1),
  16542. }
  16543. 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) {
  16544. bp := tls.Alloc(64)
  16545. defer tls.Free(64)
  16546. var xcb_ret Txcb_void_cookie_t
  16547. var _ /* xcb_out at bp+48 */ Txcb_poly_text_8_request_t
  16548. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16549. _ = xcb_ret
  16550. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  16551. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16552. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16553. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 48))).Fx = x
  16554. (*(*Txcb_poly_text_8_request_t)(unsafe.Pointer(bp + 48))).Fy = y
  16555. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16556. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16557. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16558. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16559. /* uint8_t items */
  16560. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  16561. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = items_len * uint32(1)
  16562. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16563. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16564. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req157)))
  16565. return xcb_ret
  16566. }
  16567. var _xcb_req157 = Txcb_protocol_request_t{
  16568. Fcount: uint32(4),
  16569. Fopcode: uint8(m_XCB_POLY_TEXT_8),
  16570. Fisvoid: uint8(1),
  16571. }
  16572. func Xxcb_poly_text_8_items(tls *libc.TLS, R uintptr) (r uintptr) {
  16573. return R + libc.UintptrFromInt32(1)*16
  16574. }
  16575. func Xxcb_poly_text_8_items_length(tls *libc.TLS, R uintptr) (r int32) {
  16576. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_text_8_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(16)) / libc.Uint32FromInt64(1))
  16577. }
  16578. func Xxcb_poly_text_8_items_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  16579. var i Txcb_generic_iterator_t
  16580. _ = i
  16581. i.Fdata = R + libc.UintptrFromInt32(1)*16 + uintptr((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_text_8_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4))-libc.Uint32FromInt64(16))/libc.Uint32FromInt64(1))
  16582. i.Frem = 0
  16583. i.Findex = int32(i.Fdata) - int32(R)
  16584. return i
  16585. }
  16586. func Xxcb_poly_text_16_sizeof(tls *libc.TLS, _buffer uintptr, items_len Tuint32_t) (r int32) {
  16587. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16588. var xcb_tmp uintptr
  16589. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16590. xcb_tmp = _buffer
  16591. xcb_buffer_len = uint32(0)
  16592. xcb_block_len = uint32(0)
  16593. xcb_pad = uint32(0)
  16594. xcb_align_to = uint32(0)
  16595. xcb_block_len += uint32(16)
  16596. xcb_tmp += uintptr(xcb_block_len)
  16597. xcb_buffer_len += xcb_block_len
  16598. xcb_block_len = uint32(0)
  16599. /* items */
  16600. xcb_block_len += items_len * uint32(1)
  16601. xcb_tmp += uintptr(xcb_block_len)
  16602. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  16603. /* insert padding */
  16604. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16605. xcb_buffer_len += xcb_block_len + xcb_pad
  16606. if uint32(0) != xcb_pad {
  16607. xcb_tmp += uintptr(xcb_pad)
  16608. xcb_pad = uint32(0)
  16609. }
  16610. xcb_block_len = uint32(0)
  16611. return libc.Int32FromUint32(xcb_buffer_len)
  16612. }
  16613. 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) {
  16614. bp := tls.Alloc(64)
  16615. defer tls.Free(64)
  16616. var xcb_ret Txcb_void_cookie_t
  16617. var _ /* xcb_out at bp+48 */ Txcb_poly_text_16_request_t
  16618. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16619. _ = xcb_ret
  16620. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  16621. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16622. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16623. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 48))).Fx = x
  16624. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 48))).Fy = y
  16625. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16626. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16627. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16628. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16629. /* uint8_t items */
  16630. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  16631. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = items_len * uint32(1)
  16632. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16633. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16634. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req158)))
  16635. return xcb_ret
  16636. }
  16637. var _xcb_req158 = Txcb_protocol_request_t{
  16638. Fcount: uint32(4),
  16639. Fopcode: uint8(m_XCB_POLY_TEXT_16),
  16640. Fisvoid: uint8(1),
  16641. }
  16642. 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) {
  16643. bp := tls.Alloc(64)
  16644. defer tls.Free(64)
  16645. var xcb_ret Txcb_void_cookie_t
  16646. var _ /* xcb_out at bp+48 */ Txcb_poly_text_16_request_t
  16647. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16648. _ = xcb_ret
  16649. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  16650. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16651. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16652. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 48))).Fx = x
  16653. (*(*Txcb_poly_text_16_request_t)(unsafe.Pointer(bp + 48))).Fy = y
  16654. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16655. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16656. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16657. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16658. /* uint8_t items */
  16659. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  16660. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = items_len * uint32(1)
  16661. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16662. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16663. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req159)))
  16664. return xcb_ret
  16665. }
  16666. var _xcb_req159 = Txcb_protocol_request_t{
  16667. Fcount: uint32(4),
  16668. Fopcode: uint8(m_XCB_POLY_TEXT_16),
  16669. Fisvoid: uint8(1),
  16670. }
  16671. func Xxcb_poly_text_16_items(tls *libc.TLS, R uintptr) (r uintptr) {
  16672. return R + libc.UintptrFromInt32(1)*16
  16673. }
  16674. func Xxcb_poly_text_16_items_length(tls *libc.TLS, R uintptr) (r int32) {
  16675. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_text_16_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(16)) / libc.Uint32FromInt64(1))
  16676. }
  16677. func Xxcb_poly_text_16_items_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  16678. var i Txcb_generic_iterator_t
  16679. _ = i
  16680. i.Fdata = R + libc.UintptrFromInt32(1)*16 + uintptr((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_poly_text_16_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4))-libc.Uint32FromInt64(16))/libc.Uint32FromInt64(1))
  16681. i.Frem = 0
  16682. i.Findex = int32(i.Fdata) - int32(R)
  16683. return i
  16684. }
  16685. func Xxcb_image_text_8_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  16686. var _aux, xcb_tmp uintptr
  16687. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16688. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16689. xcb_tmp = _buffer
  16690. _aux = _buffer
  16691. xcb_buffer_len = uint32(0)
  16692. xcb_block_len = uint32(0)
  16693. xcb_pad = uint32(0)
  16694. xcb_align_to = uint32(0)
  16695. xcb_block_len += uint32(16)
  16696. xcb_tmp += uintptr(xcb_block_len)
  16697. xcb_buffer_len += xcb_block_len
  16698. xcb_block_len = uint32(0)
  16699. /* string */
  16700. xcb_block_len += uint32((*Txcb_image_text_8_request_t)(unsafe.Pointer(_aux)).Fstring_len) * uint32(1)
  16701. xcb_tmp += uintptr(xcb_block_len)
  16702. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  16703. /* insert padding */
  16704. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16705. xcb_buffer_len += xcb_block_len + xcb_pad
  16706. if uint32(0) != xcb_pad {
  16707. xcb_tmp += uintptr(xcb_pad)
  16708. xcb_pad = uint32(0)
  16709. }
  16710. xcb_block_len = uint32(0)
  16711. return libc.Int32FromUint32(xcb_buffer_len)
  16712. }
  16713. 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) {
  16714. bp := tls.Alloc(64)
  16715. defer tls.Free(64)
  16716. var xcb_ret Txcb_void_cookie_t
  16717. var _ /* xcb_out at bp+48 */ Txcb_image_text_8_request_t
  16718. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16719. _ = xcb_ret
  16720. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 48))).Fstring_len = string_len
  16721. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16722. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16723. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 48))).Fx = x
  16724. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 48))).Fy = y
  16725. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16726. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16727. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16728. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16729. /* char string */
  16730. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  16731. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(string_len) * uint32(1)
  16732. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16733. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16734. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req160)))
  16735. return xcb_ret
  16736. }
  16737. var _xcb_req160 = Txcb_protocol_request_t{
  16738. Fcount: uint32(4),
  16739. Fopcode: uint8(m_XCB_IMAGE_TEXT_8),
  16740. Fisvoid: uint8(1),
  16741. }
  16742. 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) {
  16743. bp := tls.Alloc(64)
  16744. defer tls.Free(64)
  16745. var xcb_ret Txcb_void_cookie_t
  16746. var _ /* xcb_out at bp+48 */ Txcb_image_text_8_request_t
  16747. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16748. _ = xcb_ret
  16749. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 48))).Fstring_len = string_len
  16750. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16751. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16752. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 48))).Fx = x
  16753. (*(*Txcb_image_text_8_request_t)(unsafe.Pointer(bp + 48))).Fy = y
  16754. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16755. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16756. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16757. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16758. /* char string */
  16759. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  16760. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(string_len) * uint32(1)
  16761. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16762. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16763. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req161)))
  16764. return xcb_ret
  16765. }
  16766. var _xcb_req161 = Txcb_protocol_request_t{
  16767. Fcount: uint32(4),
  16768. Fopcode: uint8(m_XCB_IMAGE_TEXT_8),
  16769. Fisvoid: uint8(1),
  16770. }
  16771. func Xxcb_image_text_8_string(tls *libc.TLS, R uintptr) (r uintptr) {
  16772. return R + libc.UintptrFromInt32(1)*16
  16773. }
  16774. func Xxcb_image_text_8_string_length(tls *libc.TLS, R uintptr) (r int32) {
  16775. return libc.Int32FromUint8((*Txcb_image_text_8_request_t)(unsafe.Pointer(R)).Fstring_len)
  16776. }
  16777. func Xxcb_image_text_8_string_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  16778. var i Txcb_generic_iterator_t
  16779. _ = i
  16780. i.Fdata = R + libc.UintptrFromInt32(1)*16 + uintptr((*Txcb_image_text_8_request_t)(unsafe.Pointer(R)).Fstring_len)
  16781. i.Frem = 0
  16782. i.Findex = int32(i.Fdata) - int32(R)
  16783. return i
  16784. }
  16785. func Xxcb_image_text_16_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  16786. var _aux, xcb_tmp uintptr
  16787. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  16788. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  16789. xcb_tmp = _buffer
  16790. _aux = _buffer
  16791. xcb_buffer_len = uint32(0)
  16792. xcb_block_len = uint32(0)
  16793. xcb_pad = uint32(0)
  16794. xcb_align_to = uint32(0)
  16795. xcb_block_len += uint32(16)
  16796. xcb_tmp += uintptr(xcb_block_len)
  16797. xcb_buffer_len += xcb_block_len
  16798. xcb_block_len = uint32(0)
  16799. /* string */
  16800. xcb_block_len += uint32((*Txcb_image_text_16_request_t)(unsafe.Pointer(_aux)).Fstring_len) * uint32(2)
  16801. xcb_tmp += uintptr(xcb_block_len)
  16802. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  16803. /* insert padding */
  16804. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  16805. xcb_buffer_len += xcb_block_len + xcb_pad
  16806. if uint32(0) != xcb_pad {
  16807. xcb_tmp += uintptr(xcb_pad)
  16808. xcb_pad = uint32(0)
  16809. }
  16810. xcb_block_len = uint32(0)
  16811. return libc.Int32FromUint32(xcb_buffer_len)
  16812. }
  16813. 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) {
  16814. bp := tls.Alloc(64)
  16815. defer tls.Free(64)
  16816. var xcb_ret Txcb_void_cookie_t
  16817. var _ /* xcb_out at bp+48 */ Txcb_image_text_16_request_t
  16818. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16819. _ = xcb_ret
  16820. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 48))).Fstring_len = string_len
  16821. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16822. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16823. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 48))).Fx = x
  16824. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 48))).Fy = y
  16825. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16826. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16827. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16828. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16829. /* xcb_char2b_t string */
  16830. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  16831. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(string_len) * uint32(2)
  16832. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16833. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16834. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req162)))
  16835. return xcb_ret
  16836. }
  16837. var _xcb_req162 = Txcb_protocol_request_t{
  16838. Fcount: uint32(4),
  16839. Fopcode: uint8(m_XCB_IMAGE_TEXT_16),
  16840. Fisvoid: uint8(1),
  16841. }
  16842. 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) {
  16843. bp := tls.Alloc(64)
  16844. defer tls.Free(64)
  16845. var xcb_ret Txcb_void_cookie_t
  16846. var _ /* xcb_out at bp+48 */ Txcb_image_text_16_request_t
  16847. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  16848. _ = xcb_ret
  16849. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 48))).Fstring_len = string_len
  16850. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 48))).Fdrawable = drawable
  16851. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 48))).Fgc = gc
  16852. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 48))).Fx = x
  16853. (*(*Txcb_image_text_16_request_t)(unsafe.Pointer(bp + 48))).Fy = y
  16854. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  16855. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16856. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16857. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16858. /* xcb_char2b_t string */
  16859. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = string1
  16860. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(string_len) * uint32(2)
  16861. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  16862. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  16863. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req163)))
  16864. return xcb_ret
  16865. }
  16866. var _xcb_req163 = Txcb_protocol_request_t{
  16867. Fcount: uint32(4),
  16868. Fopcode: uint8(m_XCB_IMAGE_TEXT_16),
  16869. Fisvoid: uint8(1),
  16870. }
  16871. func Xxcb_image_text_16_string(tls *libc.TLS, R uintptr) (r uintptr) {
  16872. return R + libc.UintptrFromInt32(1)*16
  16873. }
  16874. func Xxcb_image_text_16_string_length(tls *libc.TLS, R uintptr) (r int32) {
  16875. return libc.Int32FromUint8((*Txcb_image_text_16_request_t)(unsafe.Pointer(R)).Fstring_len)
  16876. }
  16877. func Xxcb_image_text_16_string_iterator(tls *libc.TLS, R uintptr) (r Txcb_char2b_iterator_t) {
  16878. var i Txcb_char2b_iterator_t
  16879. _ = i
  16880. i.Fdata = R + libc.UintptrFromInt32(1)*16
  16881. i.Frem = libc.Int32FromUint8((*Txcb_image_text_16_request_t)(unsafe.Pointer(R)).Fstring_len)
  16882. i.Findex = int32(i.Fdata) - int32(R)
  16883. return i
  16884. }
  16885. 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) {
  16886. bp := tls.Alloc(48)
  16887. defer tls.Free(48)
  16888. var xcb_ret Txcb_void_cookie_t
  16889. var _ /* xcb_out at bp+32 */ Txcb_create_colormap_request_t
  16890. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16891. _ = xcb_ret
  16892. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 32))).Falloc = alloc
  16893. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 32))).Fmid = mid
  16894. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  16895. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 32))).Fvisual = visual
  16896. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  16897. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16898. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16899. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16900. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req164)))
  16901. return xcb_ret
  16902. }
  16903. var _xcb_req164 = Txcb_protocol_request_t{
  16904. Fcount: uint32(2),
  16905. Fopcode: uint8(m_XCB_CREATE_COLORMAP),
  16906. Fisvoid: uint8(1),
  16907. }
  16908. 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) {
  16909. bp := tls.Alloc(48)
  16910. defer tls.Free(48)
  16911. var xcb_ret Txcb_void_cookie_t
  16912. var _ /* xcb_out at bp+32 */ Txcb_create_colormap_request_t
  16913. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16914. _ = xcb_ret
  16915. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 32))).Falloc = alloc
  16916. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 32))).Fmid = mid
  16917. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  16918. (*(*Txcb_create_colormap_request_t)(unsafe.Pointer(bp + 32))).Fvisual = visual
  16919. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  16920. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  16921. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16922. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16923. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req165)))
  16924. return xcb_ret
  16925. }
  16926. var _xcb_req165 = Txcb_protocol_request_t{
  16927. Fcount: uint32(2),
  16928. Fopcode: uint8(m_XCB_CREATE_COLORMAP),
  16929. Fisvoid: uint8(1),
  16930. }
  16931. func Xxcb_free_colormap_checked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  16932. bp := tls.Alloc(48)
  16933. defer tls.Free(48)
  16934. var xcb_ret Txcb_void_cookie_t
  16935. var _ /* xcb_out at bp+32 */ Txcb_free_colormap_request_t
  16936. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16937. _ = xcb_ret
  16938. (*(*Txcb_free_colormap_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  16939. (*(*Txcb_free_colormap_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  16940. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  16941. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  16942. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16943. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16944. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req166)))
  16945. return xcb_ret
  16946. }
  16947. var _xcb_req166 = Txcb_protocol_request_t{
  16948. Fcount: uint32(2),
  16949. Fopcode: uint8(m_XCB_FREE_COLORMAP),
  16950. Fisvoid: uint8(1),
  16951. }
  16952. func Xxcb_free_colormap(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  16953. bp := tls.Alloc(48)
  16954. defer tls.Free(48)
  16955. var xcb_ret Txcb_void_cookie_t
  16956. var _ /* xcb_out at bp+32 */ Txcb_free_colormap_request_t
  16957. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16958. _ = xcb_ret
  16959. (*(*Txcb_free_colormap_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  16960. (*(*Txcb_free_colormap_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  16961. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  16962. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  16963. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16964. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16965. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req167)))
  16966. return xcb_ret
  16967. }
  16968. var _xcb_req167 = Txcb_protocol_request_t{
  16969. Fcount: uint32(2),
  16970. Fopcode: uint8(m_XCB_FREE_COLORMAP),
  16971. Fisvoid: uint8(1),
  16972. }
  16973. 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) {
  16974. bp := tls.Alloc(48)
  16975. defer tls.Free(48)
  16976. var xcb_ret Txcb_void_cookie_t
  16977. var _ /* xcb_out at bp+32 */ Txcb_copy_colormap_and_free_request_t
  16978. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  16979. _ = xcb_ret
  16980. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  16981. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 32))).Fmid = mid
  16982. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 32))).Fsrc_cmap = src_cmap
  16983. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  16984. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  16985. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  16986. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  16987. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req168)))
  16988. return xcb_ret
  16989. }
  16990. var _xcb_req168 = Txcb_protocol_request_t{
  16991. Fcount: uint32(2),
  16992. Fopcode: uint8(m_XCB_COPY_COLORMAP_AND_FREE),
  16993. Fisvoid: uint8(1),
  16994. }
  16995. 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) {
  16996. bp := tls.Alloc(48)
  16997. defer tls.Free(48)
  16998. var xcb_ret Txcb_void_cookie_t
  16999. var _ /* xcb_out at bp+32 */ Txcb_copy_colormap_and_free_request_t
  17000. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17001. _ = xcb_ret
  17002. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  17003. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 32))).Fmid = mid
  17004. (*(*Txcb_copy_colormap_and_free_request_t)(unsafe.Pointer(bp + 32))).Fsrc_cmap = src_cmap
  17005. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17006. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  17007. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17008. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17009. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req169)))
  17010. return xcb_ret
  17011. }
  17012. var _xcb_req169 = Txcb_protocol_request_t{
  17013. Fcount: uint32(2),
  17014. Fopcode: uint8(m_XCB_COPY_COLORMAP_AND_FREE),
  17015. Fisvoid: uint8(1),
  17016. }
  17017. func Xxcb_install_colormap_checked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17018. bp := tls.Alloc(48)
  17019. defer tls.Free(48)
  17020. var xcb_ret Txcb_void_cookie_t
  17021. var _ /* xcb_out at bp+32 */ Txcb_install_colormap_request_t
  17022. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17023. _ = xcb_ret
  17024. (*(*Txcb_install_colormap_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  17025. (*(*Txcb_install_colormap_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  17026. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17027. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  17028. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17029. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17030. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req170)))
  17031. return xcb_ret
  17032. }
  17033. var _xcb_req170 = Txcb_protocol_request_t{
  17034. Fcount: uint32(2),
  17035. Fopcode: uint8(m_XCB_INSTALL_COLORMAP),
  17036. Fisvoid: uint8(1),
  17037. }
  17038. func Xxcb_install_colormap(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17039. bp := tls.Alloc(48)
  17040. defer tls.Free(48)
  17041. var xcb_ret Txcb_void_cookie_t
  17042. var _ /* xcb_out at bp+32 */ Txcb_install_colormap_request_t
  17043. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17044. _ = xcb_ret
  17045. (*(*Txcb_install_colormap_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  17046. (*(*Txcb_install_colormap_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  17047. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17048. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  17049. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17050. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17051. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req171)))
  17052. return xcb_ret
  17053. }
  17054. var _xcb_req171 = Txcb_protocol_request_t{
  17055. Fcount: uint32(2),
  17056. Fopcode: uint8(m_XCB_INSTALL_COLORMAP),
  17057. Fisvoid: uint8(1),
  17058. }
  17059. func Xxcb_uninstall_colormap_checked(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17060. bp := tls.Alloc(48)
  17061. defer tls.Free(48)
  17062. var xcb_ret Txcb_void_cookie_t
  17063. var _ /* xcb_out at bp+32 */ Txcb_uninstall_colormap_request_t
  17064. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17065. _ = xcb_ret
  17066. (*(*Txcb_uninstall_colormap_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  17067. (*(*Txcb_uninstall_colormap_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  17068. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17069. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  17070. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17071. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17072. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req172)))
  17073. return xcb_ret
  17074. }
  17075. var _xcb_req172 = Txcb_protocol_request_t{
  17076. Fcount: uint32(2),
  17077. Fopcode: uint8(m_XCB_UNINSTALL_COLORMAP),
  17078. Fisvoid: uint8(1),
  17079. }
  17080. func Xxcb_uninstall_colormap(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t) (r Txcb_void_cookie_t) {
  17081. bp := tls.Alloc(48)
  17082. defer tls.Free(48)
  17083. var xcb_ret Txcb_void_cookie_t
  17084. var _ /* xcb_out at bp+32 */ Txcb_uninstall_colormap_request_t
  17085. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17086. _ = xcb_ret
  17087. (*(*Txcb_uninstall_colormap_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  17088. (*(*Txcb_uninstall_colormap_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  17089. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17090. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  17091. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17092. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17093. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req173)))
  17094. return xcb_ret
  17095. }
  17096. var _xcb_req173 = Txcb_protocol_request_t{
  17097. Fcount: uint32(2),
  17098. Fopcode: uint8(m_XCB_UNINSTALL_COLORMAP),
  17099. Fisvoid: uint8(1),
  17100. }
  17101. func Xxcb_list_installed_colormaps_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  17102. var _aux, xcb_tmp uintptr
  17103. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17104. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17105. xcb_tmp = _buffer
  17106. _aux = _buffer
  17107. xcb_buffer_len = uint32(0)
  17108. xcb_block_len = uint32(0)
  17109. xcb_pad = uint32(0)
  17110. xcb_align_to = uint32(0)
  17111. xcb_block_len += uint32(32)
  17112. xcb_tmp += uintptr(xcb_block_len)
  17113. xcb_buffer_len += xcb_block_len
  17114. xcb_block_len = uint32(0)
  17115. /* cmaps */
  17116. xcb_block_len += uint32((*Txcb_list_installed_colormaps_reply_t)(unsafe.Pointer(_aux)).Fcmaps_len) * uint32(4)
  17117. xcb_tmp += uintptr(xcb_block_len)
  17118. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  17119. /* insert padding */
  17120. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17121. xcb_buffer_len += xcb_block_len + xcb_pad
  17122. if uint32(0) != xcb_pad {
  17123. xcb_tmp += uintptr(xcb_pad)
  17124. xcb_pad = uint32(0)
  17125. }
  17126. xcb_block_len = uint32(0)
  17127. return libc.Int32FromUint32(xcb_buffer_len)
  17128. }
  17129. func Xxcb_list_installed_colormaps(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_list_installed_colormaps_cookie_t) {
  17130. bp := tls.Alloc(48)
  17131. defer tls.Free(48)
  17132. var xcb_ret Txcb_list_installed_colormaps_cookie_t
  17133. var _ /* xcb_out at bp+32 */ Txcb_list_installed_colormaps_request_t
  17134. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17135. _ = xcb_ret
  17136. (*(*Txcb_list_installed_colormaps_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  17137. (*(*Txcb_list_installed_colormaps_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  17138. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17139. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  17140. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17141. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17142. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req174)))
  17143. return xcb_ret
  17144. }
  17145. var _xcb_req174 = Txcb_protocol_request_t{
  17146. Fcount: uint32(2),
  17147. Fopcode: uint8(m_XCB_LIST_INSTALLED_COLORMAPS),
  17148. }
  17149. func Xxcb_list_installed_colormaps_unchecked(tls *libc.TLS, c uintptr, window Txcb_window_t) (r Txcb_list_installed_colormaps_cookie_t) {
  17150. bp := tls.Alloc(48)
  17151. defer tls.Free(48)
  17152. var xcb_ret Txcb_list_installed_colormaps_cookie_t
  17153. var _ /* xcb_out at bp+32 */ Txcb_list_installed_colormaps_request_t
  17154. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17155. _ = xcb_ret
  17156. (*(*Txcb_list_installed_colormaps_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  17157. (*(*Txcb_list_installed_colormaps_request_t)(unsafe.Pointer(bp + 32))).Fwindow = window
  17158. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17159. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  17160. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17161. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17162. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req175)))
  17163. return xcb_ret
  17164. }
  17165. var _xcb_req175 = Txcb_protocol_request_t{
  17166. Fcount: uint32(2),
  17167. Fopcode: uint8(m_XCB_LIST_INSTALLED_COLORMAPS),
  17168. }
  17169. func Xxcb_list_installed_colormaps_cmaps(tls *libc.TLS, R uintptr) (r uintptr) {
  17170. return R + libc.UintptrFromInt32(1)*32
  17171. }
  17172. func Xxcb_list_installed_colormaps_cmaps_length(tls *libc.TLS, R uintptr) (r int32) {
  17173. return libc.Int32FromUint16((*Txcb_list_installed_colormaps_reply_t)(unsafe.Pointer(R)).Fcmaps_len)
  17174. }
  17175. func Xxcb_list_installed_colormaps_cmaps_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  17176. var i Txcb_generic_iterator_t
  17177. _ = i
  17178. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_list_installed_colormaps_reply_t)(unsafe.Pointer(R)).Fcmaps_len)*4
  17179. i.Frem = 0
  17180. i.Findex = int32(i.Fdata) - int32(R)
  17181. return i
  17182. }
  17183. func Xxcb_list_installed_colormaps_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_installed_colormaps_cookie_t, e uintptr) (r uintptr) {
  17184. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  17185. }
  17186. 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) {
  17187. bp := tls.Alloc(48)
  17188. defer tls.Free(48)
  17189. var xcb_ret Txcb_alloc_color_cookie_t
  17190. var _ /* xcb_out at bp+32 */ Txcb_alloc_color_request_t
  17191. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17192. _ = xcb_ret
  17193. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  17194. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  17195. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 32))).Fred = red
  17196. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 32))).Fgreen = green
  17197. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 32))).Fblue = blue
  17198. libc.Xmemset(tls, bp+32+14, 0, uint32(2))
  17199. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17200. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  17201. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17202. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17203. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req176)))
  17204. return xcb_ret
  17205. }
  17206. var _xcb_req176 = Txcb_protocol_request_t{
  17207. Fcount: uint32(2),
  17208. Fopcode: uint8(m_XCB_ALLOC_COLOR),
  17209. }
  17210. 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) {
  17211. bp := tls.Alloc(48)
  17212. defer tls.Free(48)
  17213. var xcb_ret Txcb_alloc_color_cookie_t
  17214. var _ /* xcb_out at bp+32 */ Txcb_alloc_color_request_t
  17215. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17216. _ = xcb_ret
  17217. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  17218. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  17219. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 32))).Fred = red
  17220. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 32))).Fgreen = green
  17221. (*(*Txcb_alloc_color_request_t)(unsafe.Pointer(bp + 32))).Fblue = blue
  17222. libc.Xmemset(tls, bp+32+14, 0, uint32(2))
  17223. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17224. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  17225. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17226. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17227. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req177)))
  17228. return xcb_ret
  17229. }
  17230. var _xcb_req177 = Txcb_protocol_request_t{
  17231. Fcount: uint32(2),
  17232. Fopcode: uint8(m_XCB_ALLOC_COLOR),
  17233. }
  17234. func Xxcb_alloc_color_reply(tls *libc.TLS, c uintptr, cookie Txcb_alloc_color_cookie_t, e uintptr) (r uintptr) {
  17235. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  17236. }
  17237. func Xxcb_alloc_named_color_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  17238. var _aux, xcb_tmp uintptr
  17239. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17240. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17241. xcb_tmp = _buffer
  17242. _aux = _buffer
  17243. xcb_buffer_len = uint32(0)
  17244. xcb_block_len = uint32(0)
  17245. xcb_pad = uint32(0)
  17246. xcb_align_to = uint32(0)
  17247. xcb_block_len += uint32(12)
  17248. xcb_tmp += uintptr(xcb_block_len)
  17249. xcb_buffer_len += xcb_block_len
  17250. xcb_block_len = uint32(0)
  17251. /* name */
  17252. xcb_block_len += uint32((*Txcb_alloc_named_color_request_t)(unsafe.Pointer(_aux)).Fname_len) * uint32(1)
  17253. xcb_tmp += uintptr(xcb_block_len)
  17254. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  17255. /* insert padding */
  17256. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17257. xcb_buffer_len += xcb_block_len + xcb_pad
  17258. if uint32(0) != xcb_pad {
  17259. xcb_tmp += uintptr(xcb_pad)
  17260. xcb_pad = uint32(0)
  17261. }
  17262. xcb_block_len = uint32(0)
  17263. return libc.Int32FromUint32(xcb_buffer_len)
  17264. }
  17265. 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) {
  17266. bp := tls.Alloc(64)
  17267. defer tls.Free(64)
  17268. var xcb_ret Txcb_alloc_named_color_cookie_t
  17269. var _ /* xcb_out at bp+48 */ Txcb_alloc_named_color_request_t
  17270. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17271. _ = xcb_ret
  17272. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  17273. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  17274. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  17275. libc.Xmemset(tls, bp+48+10, 0, uint32(2))
  17276. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  17277. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  17278. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17279. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17280. /* char name */
  17281. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  17282. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  17283. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17284. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  17285. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req178)))
  17286. return xcb_ret
  17287. }
  17288. var _xcb_req178 = Txcb_protocol_request_t{
  17289. Fcount: uint32(4),
  17290. Fopcode: uint8(m_XCB_ALLOC_NAMED_COLOR),
  17291. }
  17292. 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) {
  17293. bp := tls.Alloc(64)
  17294. defer tls.Free(64)
  17295. var xcb_ret Txcb_alloc_named_color_cookie_t
  17296. var _ /* xcb_out at bp+48 */ Txcb_alloc_named_color_request_t
  17297. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17298. _ = xcb_ret
  17299. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  17300. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  17301. (*(*Txcb_alloc_named_color_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  17302. libc.Xmemset(tls, bp+48+10, 0, uint32(2))
  17303. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  17304. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  17305. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17306. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17307. /* char name */
  17308. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  17309. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  17310. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17311. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  17312. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req179)))
  17313. return xcb_ret
  17314. }
  17315. var _xcb_req179 = Txcb_protocol_request_t{
  17316. Fcount: uint32(4),
  17317. Fopcode: uint8(m_XCB_ALLOC_NAMED_COLOR),
  17318. }
  17319. func Xxcb_alloc_named_color_reply(tls *libc.TLS, c uintptr, cookie Txcb_alloc_named_color_cookie_t, e uintptr) (r uintptr) {
  17320. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  17321. }
  17322. func Xxcb_alloc_color_cells_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  17323. var _aux, xcb_tmp uintptr
  17324. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17325. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17326. xcb_tmp = _buffer
  17327. _aux = _buffer
  17328. xcb_buffer_len = uint32(0)
  17329. xcb_block_len = uint32(0)
  17330. xcb_pad = uint32(0)
  17331. xcb_align_to = uint32(0)
  17332. xcb_block_len += uint32(32)
  17333. xcb_tmp += uintptr(xcb_block_len)
  17334. xcb_buffer_len += xcb_block_len
  17335. xcb_block_len = uint32(0)
  17336. /* pixels */
  17337. xcb_block_len += uint32((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(_aux)).Fpixels_len) * uint32(4)
  17338. xcb_tmp += uintptr(xcb_block_len)
  17339. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  17340. /* insert padding */
  17341. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17342. xcb_buffer_len += xcb_block_len + xcb_pad
  17343. if uint32(0) != xcb_pad {
  17344. xcb_tmp += uintptr(xcb_pad)
  17345. xcb_pad = uint32(0)
  17346. }
  17347. xcb_block_len = uint32(0)
  17348. /* masks */
  17349. xcb_block_len += uint32((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(_aux)).Fmasks_len) * uint32(4)
  17350. xcb_tmp += uintptr(xcb_block_len)
  17351. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  17352. /* insert padding */
  17353. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17354. xcb_buffer_len += xcb_block_len + xcb_pad
  17355. if uint32(0) != xcb_pad {
  17356. xcb_tmp += uintptr(xcb_pad)
  17357. xcb_pad = uint32(0)
  17358. }
  17359. xcb_block_len = uint32(0)
  17360. return libc.Int32FromUint32(xcb_buffer_len)
  17361. }
  17362. 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) {
  17363. bp := tls.Alloc(48)
  17364. defer tls.Free(48)
  17365. var xcb_ret Txcb_alloc_color_cells_cookie_t
  17366. var _ /* xcb_out at bp+32 */ Txcb_alloc_color_cells_request_t
  17367. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17368. _ = xcb_ret
  17369. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 32))).Fcontiguous = contiguous
  17370. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  17371. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 32))).Fcolors = colors
  17372. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 32))).Fplanes = planes
  17373. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17374. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  17375. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17376. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17377. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req180)))
  17378. return xcb_ret
  17379. }
  17380. var _xcb_req180 = Txcb_protocol_request_t{
  17381. Fcount: uint32(2),
  17382. Fopcode: uint8(m_XCB_ALLOC_COLOR_CELLS),
  17383. }
  17384. 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) {
  17385. bp := tls.Alloc(48)
  17386. defer tls.Free(48)
  17387. var xcb_ret Txcb_alloc_color_cells_cookie_t
  17388. var _ /* xcb_out at bp+32 */ Txcb_alloc_color_cells_request_t
  17389. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17390. _ = xcb_ret
  17391. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 32))).Fcontiguous = contiguous
  17392. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  17393. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 32))).Fcolors = colors
  17394. (*(*Txcb_alloc_color_cells_request_t)(unsafe.Pointer(bp + 32))).Fplanes = planes
  17395. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17396. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  17397. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17398. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17399. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req181)))
  17400. return xcb_ret
  17401. }
  17402. var _xcb_req181 = Txcb_protocol_request_t{
  17403. Fcount: uint32(2),
  17404. Fopcode: uint8(m_XCB_ALLOC_COLOR_CELLS),
  17405. }
  17406. func Xxcb_alloc_color_cells_pixels(tls *libc.TLS, R uintptr) (r uintptr) {
  17407. return R + libc.UintptrFromInt32(1)*32
  17408. }
  17409. func Xxcb_alloc_color_cells_pixels_length(tls *libc.TLS, R uintptr) (r int32) {
  17410. return libc.Int32FromUint16((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(R)).Fpixels_len)
  17411. }
  17412. func Xxcb_alloc_color_cells_pixels_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  17413. var i Txcb_generic_iterator_t
  17414. _ = i
  17415. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(R)).Fpixels_len)*4
  17416. i.Frem = 0
  17417. i.Findex = int32(i.Fdata) - int32(R)
  17418. return i
  17419. }
  17420. func Xxcb_alloc_color_cells_masks(tls *libc.TLS, R uintptr) (r uintptr) {
  17421. var prev Txcb_generic_iterator_t
  17422. _ = prev
  17423. prev = Xxcb_alloc_color_cells_pixels_end(tls, R)
  17424. return prev.Fdata + uintptr(libc.Uint32FromInt32(-prev.Findex)&(libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1))) + libc.UintptrFromInt32(0)
  17425. }
  17426. func Xxcb_alloc_color_cells_masks_length(tls *libc.TLS, R uintptr) (r int32) {
  17427. return libc.Int32FromUint16((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(R)).Fmasks_len)
  17428. }
  17429. func Xxcb_alloc_color_cells_masks_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  17430. var i, prev Txcb_generic_iterator_t
  17431. _, _ = i, prev
  17432. prev = Xxcb_alloc_color_cells_pixels_end(tls, R)
  17433. i.Fdata = prev.Fdata + uintptr(libc.Uint32FromInt32(-prev.Findex)&(libc.Uint32FromInt64(4)-libc.Uint32FromInt32(1))) + uintptr((*Txcb_alloc_color_cells_reply_t)(unsafe.Pointer(R)).Fmasks_len)*4
  17434. i.Frem = 0
  17435. i.Findex = int32(i.Fdata) - int32(R)
  17436. return i
  17437. }
  17438. func Xxcb_alloc_color_cells_reply(tls *libc.TLS, c uintptr, cookie Txcb_alloc_color_cells_cookie_t, e uintptr) (r uintptr) {
  17439. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  17440. }
  17441. func Xxcb_alloc_color_planes_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  17442. var _aux, xcb_tmp uintptr
  17443. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17444. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17445. xcb_tmp = _buffer
  17446. _aux = _buffer
  17447. xcb_buffer_len = uint32(0)
  17448. xcb_block_len = uint32(0)
  17449. xcb_pad = uint32(0)
  17450. xcb_align_to = uint32(0)
  17451. xcb_block_len += uint32(32)
  17452. xcb_tmp += uintptr(xcb_block_len)
  17453. xcb_buffer_len += xcb_block_len
  17454. xcb_block_len = uint32(0)
  17455. /* pixels */
  17456. xcb_block_len += uint32((*Txcb_alloc_color_planes_reply_t)(unsafe.Pointer(_aux)).Fpixels_len) * uint32(4)
  17457. xcb_tmp += uintptr(xcb_block_len)
  17458. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  17459. /* insert padding */
  17460. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17461. xcb_buffer_len += xcb_block_len + xcb_pad
  17462. if uint32(0) != xcb_pad {
  17463. xcb_tmp += uintptr(xcb_pad)
  17464. xcb_pad = uint32(0)
  17465. }
  17466. xcb_block_len = uint32(0)
  17467. return libc.Int32FromUint32(xcb_buffer_len)
  17468. }
  17469. 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) {
  17470. bp := tls.Alloc(48)
  17471. defer tls.Free(48)
  17472. var xcb_ret Txcb_alloc_color_planes_cookie_t
  17473. var _ /* xcb_out at bp+32 */ Txcb_alloc_color_planes_request_t
  17474. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17475. _ = xcb_ret
  17476. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Fcontiguous = contiguous
  17477. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  17478. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Fcolors = colors
  17479. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Freds = reds
  17480. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Fgreens = greens
  17481. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Fblues = blues
  17482. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17483. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  17484. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17485. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17486. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req182)))
  17487. return xcb_ret
  17488. }
  17489. var _xcb_req182 = Txcb_protocol_request_t{
  17490. Fcount: uint32(2),
  17491. Fopcode: uint8(m_XCB_ALLOC_COLOR_PLANES),
  17492. }
  17493. 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) {
  17494. bp := tls.Alloc(48)
  17495. defer tls.Free(48)
  17496. var xcb_ret Txcb_alloc_color_planes_cookie_t
  17497. var _ /* xcb_out at bp+32 */ Txcb_alloc_color_planes_request_t
  17498. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  17499. _ = xcb_ret
  17500. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Fcontiguous = contiguous
  17501. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Fcmap = cmap
  17502. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Fcolors = colors
  17503. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Freds = reds
  17504. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Fgreens = greens
  17505. (*(*Txcb_alloc_color_planes_request_t)(unsafe.Pointer(bp + 32))).Fblues = blues
  17506. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  17507. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  17508. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17509. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17510. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req183)))
  17511. return xcb_ret
  17512. }
  17513. var _xcb_req183 = Txcb_protocol_request_t{
  17514. Fcount: uint32(2),
  17515. Fopcode: uint8(m_XCB_ALLOC_COLOR_PLANES),
  17516. }
  17517. func Xxcb_alloc_color_planes_pixels(tls *libc.TLS, R uintptr) (r uintptr) {
  17518. return R + libc.UintptrFromInt32(1)*32
  17519. }
  17520. func Xxcb_alloc_color_planes_pixels_length(tls *libc.TLS, R uintptr) (r int32) {
  17521. return libc.Int32FromUint16((*Txcb_alloc_color_planes_reply_t)(unsafe.Pointer(R)).Fpixels_len)
  17522. }
  17523. func Xxcb_alloc_color_planes_pixels_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  17524. var i Txcb_generic_iterator_t
  17525. _ = i
  17526. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_alloc_color_planes_reply_t)(unsafe.Pointer(R)).Fpixels_len)*4
  17527. i.Frem = 0
  17528. i.Findex = int32(i.Fdata) - int32(R)
  17529. return i
  17530. }
  17531. func Xxcb_alloc_color_planes_reply(tls *libc.TLS, c uintptr, cookie Txcb_alloc_color_planes_cookie_t, e uintptr) (r uintptr) {
  17532. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  17533. }
  17534. func Xxcb_free_colors_sizeof(tls *libc.TLS, _buffer uintptr, pixels_len Tuint32_t) (r int32) {
  17535. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17536. var xcb_tmp uintptr
  17537. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17538. xcb_tmp = _buffer
  17539. xcb_buffer_len = uint32(0)
  17540. xcb_block_len = uint32(0)
  17541. xcb_pad = uint32(0)
  17542. xcb_align_to = uint32(0)
  17543. xcb_block_len += uint32(12)
  17544. xcb_tmp += uintptr(xcb_block_len)
  17545. xcb_buffer_len += xcb_block_len
  17546. xcb_block_len = uint32(0)
  17547. /* pixels */
  17548. xcb_block_len += pixels_len * uint32(4)
  17549. xcb_tmp += uintptr(xcb_block_len)
  17550. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  17551. /* insert padding */
  17552. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17553. xcb_buffer_len += xcb_block_len + xcb_pad
  17554. if uint32(0) != xcb_pad {
  17555. xcb_tmp += uintptr(xcb_pad)
  17556. xcb_pad = uint32(0)
  17557. }
  17558. xcb_block_len = uint32(0)
  17559. return libc.Int32FromUint32(xcb_buffer_len)
  17560. }
  17561. 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) {
  17562. bp := tls.Alloc(64)
  17563. defer tls.Free(64)
  17564. var xcb_ret Txcb_void_cookie_t
  17565. var _ /* xcb_out at bp+48 */ Txcb_free_colors_request_t
  17566. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17567. _ = xcb_ret
  17568. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  17569. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  17570. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 48))).Fplane_mask = plane_mask
  17571. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  17572. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  17573. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17574. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17575. /* uint32_t pixels */
  17576. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pixels
  17577. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = pixels_len * uint32(4)
  17578. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17579. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  17580. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req184)))
  17581. return xcb_ret
  17582. }
  17583. var _xcb_req184 = Txcb_protocol_request_t{
  17584. Fcount: uint32(4),
  17585. Fopcode: uint8(m_XCB_FREE_COLORS),
  17586. Fisvoid: uint8(1),
  17587. }
  17588. 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) {
  17589. bp := tls.Alloc(64)
  17590. defer tls.Free(64)
  17591. var xcb_ret Txcb_void_cookie_t
  17592. var _ /* xcb_out at bp+48 */ Txcb_free_colors_request_t
  17593. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17594. _ = xcb_ret
  17595. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  17596. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  17597. (*(*Txcb_free_colors_request_t)(unsafe.Pointer(bp + 48))).Fplane_mask = plane_mask
  17598. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  17599. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  17600. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17601. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17602. /* uint32_t pixels */
  17603. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pixels
  17604. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = pixels_len * uint32(4)
  17605. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17606. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  17607. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req185)))
  17608. return xcb_ret
  17609. }
  17610. var _xcb_req185 = Txcb_protocol_request_t{
  17611. Fcount: uint32(4),
  17612. Fopcode: uint8(m_XCB_FREE_COLORS),
  17613. Fisvoid: uint8(1),
  17614. }
  17615. func Xxcb_free_colors_pixels(tls *libc.TLS, R uintptr) (r uintptr) {
  17616. return R + libc.UintptrFromInt32(1)*12
  17617. }
  17618. func Xxcb_free_colors_pixels_length(tls *libc.TLS, R uintptr) (r int32) {
  17619. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_free_colors_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(12)) / libc.Uint32FromInt64(4))
  17620. }
  17621. func Xxcb_free_colors_pixels_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  17622. var i Txcb_generic_iterator_t
  17623. _ = i
  17624. i.Fdata = R + libc.UintptrFromInt32(1)*12 + uintptr((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_free_colors_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4))-libc.Uint32FromInt64(12))/libc.Uint32FromInt64(4))*4
  17625. i.Frem = 0
  17626. i.Findex = int32(i.Fdata) - int32(R)
  17627. return i
  17628. }
  17629. func Xxcb_coloritem_next(tls *libc.TLS, i uintptr) {
  17630. var p1 uintptr
  17631. _ = p1
  17632. (*Txcb_coloritem_iterator_t)(unsafe.Pointer(i)).Frem--
  17633. (*Txcb_coloritem_iterator_t)(unsafe.Pointer(i)).Fdata += 12
  17634. p1 = i + 8
  17635. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(12))
  17636. }
  17637. func Xxcb_coloritem_end(tls *libc.TLS, i Txcb_coloritem_iterator_t) (r Txcb_generic_iterator_t) {
  17638. var ret Txcb_generic_iterator_t
  17639. _ = ret
  17640. ret.Fdata = i.Fdata + uintptr(i.Frem)*12
  17641. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  17642. ret.Frem = 0
  17643. return ret
  17644. }
  17645. func Xxcb_store_colors_sizeof(tls *libc.TLS, _buffer uintptr, items_len Tuint32_t) (r int32) {
  17646. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17647. var xcb_tmp uintptr
  17648. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17649. xcb_tmp = _buffer
  17650. xcb_buffer_len = uint32(0)
  17651. xcb_block_len = uint32(0)
  17652. xcb_pad = uint32(0)
  17653. xcb_align_to = uint32(0)
  17654. xcb_block_len += uint32(8)
  17655. xcb_tmp += uintptr(xcb_block_len)
  17656. xcb_buffer_len += xcb_block_len
  17657. xcb_block_len = uint32(0)
  17658. /* items */
  17659. xcb_block_len += items_len * uint32(12)
  17660. xcb_tmp += uintptr(xcb_block_len)
  17661. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  17662. /* insert padding */
  17663. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17664. xcb_buffer_len += xcb_block_len + xcb_pad
  17665. if uint32(0) != xcb_pad {
  17666. xcb_tmp += uintptr(xcb_pad)
  17667. xcb_pad = uint32(0)
  17668. }
  17669. xcb_block_len = uint32(0)
  17670. return libc.Int32FromUint32(xcb_buffer_len)
  17671. }
  17672. 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) {
  17673. bp := tls.Alloc(64)
  17674. defer tls.Free(64)
  17675. var xcb_ret Txcb_void_cookie_t
  17676. var _ /* xcb_out at bp+48 */ Txcb_store_colors_request_t
  17677. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17678. _ = xcb_ret
  17679. (*(*Txcb_store_colors_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  17680. (*(*Txcb_store_colors_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  17681. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  17682. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  17683. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17684. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17685. /* xcb_coloritem_t items */
  17686. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  17687. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = items_len * uint32(12)
  17688. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17689. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  17690. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req186)))
  17691. return xcb_ret
  17692. }
  17693. var _xcb_req186 = Txcb_protocol_request_t{
  17694. Fcount: uint32(4),
  17695. Fopcode: uint8(m_XCB_STORE_COLORS),
  17696. Fisvoid: uint8(1),
  17697. }
  17698. func Xxcb_store_colors(tls *libc.TLS, c uintptr, cmap Txcb_colormap_t, items_len Tuint32_t, items uintptr) (r Txcb_void_cookie_t) {
  17699. bp := tls.Alloc(64)
  17700. defer tls.Free(64)
  17701. var xcb_ret Txcb_void_cookie_t
  17702. var _ /* xcb_out at bp+48 */ Txcb_store_colors_request_t
  17703. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17704. _ = xcb_ret
  17705. (*(*Txcb_store_colors_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  17706. (*(*Txcb_store_colors_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  17707. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  17708. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  17709. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17710. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17711. /* xcb_coloritem_t items */
  17712. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = items
  17713. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = items_len * uint32(12)
  17714. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17715. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  17716. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req187)))
  17717. return xcb_ret
  17718. }
  17719. var _xcb_req187 = Txcb_protocol_request_t{
  17720. Fcount: uint32(4),
  17721. Fopcode: uint8(m_XCB_STORE_COLORS),
  17722. Fisvoid: uint8(1),
  17723. }
  17724. func Xxcb_store_colors_items(tls *libc.TLS, R uintptr) (r uintptr) {
  17725. return R + libc.UintptrFromInt32(1)*8
  17726. }
  17727. func Xxcb_store_colors_items_length(tls *libc.TLS, R uintptr) (r int32) {
  17728. return libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_store_colors_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(8)) / libc.Uint32FromInt64(12))
  17729. }
  17730. func Xxcb_store_colors_items_iterator(tls *libc.TLS, R uintptr) (r Txcb_coloritem_iterator_t) {
  17731. var i Txcb_coloritem_iterator_t
  17732. _ = i
  17733. i.Fdata = R + libc.UintptrFromInt32(1)*8
  17734. i.Frem = libc.Int32FromUint32((libc.Uint32FromInt32(libc.Int32FromUint16((*Txcb_store_colors_request_t)(unsafe.Pointer(R)).Flength)*libc.Int32FromInt32(4)) - libc.Uint32FromInt64(8)) / libc.Uint32FromInt64(12))
  17735. i.Findex = int32(i.Fdata) - int32(R)
  17736. return i
  17737. }
  17738. func Xxcb_store_named_color_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  17739. var _aux, xcb_tmp uintptr
  17740. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17741. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17742. xcb_tmp = _buffer
  17743. _aux = _buffer
  17744. xcb_buffer_len = uint32(0)
  17745. xcb_block_len = uint32(0)
  17746. xcb_pad = uint32(0)
  17747. xcb_align_to = uint32(0)
  17748. xcb_block_len += uint32(16)
  17749. xcb_tmp += uintptr(xcb_block_len)
  17750. xcb_buffer_len += xcb_block_len
  17751. xcb_block_len = uint32(0)
  17752. /* name */
  17753. xcb_block_len += uint32((*Txcb_store_named_color_request_t)(unsafe.Pointer(_aux)).Fname_len) * uint32(1)
  17754. xcb_tmp += uintptr(xcb_block_len)
  17755. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  17756. /* insert padding */
  17757. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17758. xcb_buffer_len += xcb_block_len + xcb_pad
  17759. if uint32(0) != xcb_pad {
  17760. xcb_tmp += uintptr(xcb_pad)
  17761. xcb_pad = uint32(0)
  17762. }
  17763. xcb_block_len = uint32(0)
  17764. return libc.Int32FromUint32(xcb_buffer_len)
  17765. }
  17766. 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) {
  17767. bp := tls.Alloc(64)
  17768. defer tls.Free(64)
  17769. var xcb_ret Txcb_void_cookie_t
  17770. var _ /* xcb_out at bp+48 */ Txcb_store_named_color_request_t
  17771. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17772. _ = xcb_ret
  17773. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 48))).Fflags = flags
  17774. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  17775. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 48))).Fpixel = pixel
  17776. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  17777. libc.Xmemset(tls, bp+48+14, 0, uint32(2))
  17778. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  17779. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  17780. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17781. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17782. /* char name */
  17783. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  17784. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  17785. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17786. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  17787. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req188)))
  17788. return xcb_ret
  17789. }
  17790. var _xcb_req188 = Txcb_protocol_request_t{
  17791. Fcount: uint32(4),
  17792. Fopcode: uint8(m_XCB_STORE_NAMED_COLOR),
  17793. Fisvoid: uint8(1),
  17794. }
  17795. 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) {
  17796. bp := tls.Alloc(64)
  17797. defer tls.Free(64)
  17798. var xcb_ret Txcb_void_cookie_t
  17799. var _ /* xcb_out at bp+48 */ Txcb_store_named_color_request_t
  17800. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17801. _ = xcb_ret
  17802. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 48))).Fflags = flags
  17803. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  17804. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 48))).Fpixel = pixel
  17805. (*(*Txcb_store_named_color_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  17806. libc.Xmemset(tls, bp+48+14, 0, uint32(2))
  17807. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  17808. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(16)
  17809. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17810. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17811. /* char name */
  17812. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  17813. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  17814. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17815. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  17816. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req189)))
  17817. return xcb_ret
  17818. }
  17819. var _xcb_req189 = Txcb_protocol_request_t{
  17820. Fcount: uint32(4),
  17821. Fopcode: uint8(m_XCB_STORE_NAMED_COLOR),
  17822. Fisvoid: uint8(1),
  17823. }
  17824. func Xxcb_store_named_color_name(tls *libc.TLS, R uintptr) (r uintptr) {
  17825. return R + libc.UintptrFromInt32(1)*16
  17826. }
  17827. func Xxcb_store_named_color_name_length(tls *libc.TLS, R uintptr) (r int32) {
  17828. return libc.Int32FromUint16((*Txcb_store_named_color_request_t)(unsafe.Pointer(R)).Fname_len)
  17829. }
  17830. func Xxcb_store_named_color_name_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  17831. var i Txcb_generic_iterator_t
  17832. _ = i
  17833. i.Fdata = R + libc.UintptrFromInt32(1)*16 + uintptr((*Txcb_store_named_color_request_t)(unsafe.Pointer(R)).Fname_len)
  17834. i.Frem = 0
  17835. i.Findex = int32(i.Fdata) - int32(R)
  17836. return i
  17837. }
  17838. func Xxcb_rgb_next(tls *libc.TLS, i uintptr) {
  17839. var p1 uintptr
  17840. _ = p1
  17841. (*Txcb_rgb_iterator_t)(unsafe.Pointer(i)).Frem--
  17842. (*Txcb_rgb_iterator_t)(unsafe.Pointer(i)).Fdata += 8
  17843. p1 = i + 8
  17844. *(*int32)(unsafe.Pointer(p1)) = int32(uint32(*(*int32)(unsafe.Pointer(p1))) + libc.Uint32FromInt64(8))
  17845. }
  17846. func Xxcb_rgb_end(tls *libc.TLS, i Txcb_rgb_iterator_t) (r Txcb_generic_iterator_t) {
  17847. var ret Txcb_generic_iterator_t
  17848. _ = ret
  17849. ret.Fdata = i.Fdata + uintptr(i.Frem)*8
  17850. ret.Findex = i.Findex + (int32(ret.Fdata) - int32(i.Fdata))
  17851. ret.Frem = 0
  17852. return ret
  17853. }
  17854. func Xxcb_query_colors_sizeof(tls *libc.TLS, _buffer uintptr, pixels_len Tuint32_t) (r int32) {
  17855. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17856. var xcb_tmp uintptr
  17857. _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17858. xcb_tmp = _buffer
  17859. xcb_buffer_len = uint32(0)
  17860. xcb_block_len = uint32(0)
  17861. xcb_pad = uint32(0)
  17862. xcb_align_to = uint32(0)
  17863. xcb_block_len += uint32(8)
  17864. xcb_tmp += uintptr(xcb_block_len)
  17865. xcb_buffer_len += xcb_block_len
  17866. xcb_block_len = uint32(0)
  17867. /* pixels */
  17868. xcb_block_len += pixels_len * uint32(4)
  17869. xcb_tmp += uintptr(xcb_block_len)
  17870. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  17871. /* insert padding */
  17872. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17873. xcb_buffer_len += xcb_block_len + xcb_pad
  17874. if uint32(0) != xcb_pad {
  17875. xcb_tmp += uintptr(xcb_pad)
  17876. xcb_pad = uint32(0)
  17877. }
  17878. xcb_block_len = uint32(0)
  17879. return libc.Int32FromUint32(xcb_buffer_len)
  17880. }
  17881. 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) {
  17882. bp := tls.Alloc(64)
  17883. defer tls.Free(64)
  17884. var xcb_ret Txcb_query_colors_cookie_t
  17885. var _ /* xcb_out at bp+48 */ Txcb_query_colors_request_t
  17886. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17887. _ = xcb_ret
  17888. (*(*Txcb_query_colors_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  17889. (*(*Txcb_query_colors_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  17890. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  17891. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  17892. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17893. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17894. /* uint32_t pixels */
  17895. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pixels
  17896. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = pixels_len * uint32(4)
  17897. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17898. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  17899. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req190)))
  17900. return xcb_ret
  17901. }
  17902. var _xcb_req190 = Txcb_protocol_request_t{
  17903. Fcount: uint32(4),
  17904. Fopcode: uint8(m_XCB_QUERY_COLORS),
  17905. }
  17906. 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) {
  17907. bp := tls.Alloc(64)
  17908. defer tls.Free(64)
  17909. var xcb_ret Txcb_query_colors_cookie_t
  17910. var _ /* xcb_out at bp+48 */ Txcb_query_colors_request_t
  17911. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17912. _ = xcb_ret
  17913. (*(*Txcb_query_colors_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  17914. (*(*Txcb_query_colors_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  17915. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  17916. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  17917. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17918. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17919. /* uint32_t pixels */
  17920. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = pixels
  17921. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = pixels_len * uint32(4)
  17922. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17923. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  17924. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req191)))
  17925. return xcb_ret
  17926. }
  17927. var _xcb_req191 = Txcb_protocol_request_t{
  17928. Fcount: uint32(4),
  17929. Fopcode: uint8(m_XCB_QUERY_COLORS),
  17930. }
  17931. func Xxcb_query_colors_colors(tls *libc.TLS, R uintptr) (r uintptr) {
  17932. return R + libc.UintptrFromInt32(1)*32
  17933. }
  17934. func Xxcb_query_colors_colors_length(tls *libc.TLS, R uintptr) (r int32) {
  17935. return libc.Int32FromUint16((*Txcb_query_colors_reply_t)(unsafe.Pointer(R)).Fcolors_len)
  17936. }
  17937. func Xxcb_query_colors_colors_iterator(tls *libc.TLS, R uintptr) (r Txcb_rgb_iterator_t) {
  17938. var i Txcb_rgb_iterator_t
  17939. _ = i
  17940. i.Fdata = R + libc.UintptrFromInt32(1)*32
  17941. i.Frem = libc.Int32FromUint16((*Txcb_query_colors_reply_t)(unsafe.Pointer(R)).Fcolors_len)
  17942. i.Findex = int32(i.Fdata) - int32(R)
  17943. return i
  17944. }
  17945. func Xxcb_query_colors_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_colors_cookie_t, e uintptr) (r uintptr) {
  17946. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  17947. }
  17948. func Xxcb_lookup_color_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  17949. var _aux, xcb_tmp uintptr
  17950. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  17951. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  17952. xcb_tmp = _buffer
  17953. _aux = _buffer
  17954. xcb_buffer_len = uint32(0)
  17955. xcb_block_len = uint32(0)
  17956. xcb_pad = uint32(0)
  17957. xcb_align_to = uint32(0)
  17958. xcb_block_len += uint32(12)
  17959. xcb_tmp += uintptr(xcb_block_len)
  17960. xcb_buffer_len += xcb_block_len
  17961. xcb_block_len = uint32(0)
  17962. /* name */
  17963. xcb_block_len += uint32((*Txcb_lookup_color_request_t)(unsafe.Pointer(_aux)).Fname_len) * uint32(1)
  17964. xcb_tmp += uintptr(xcb_block_len)
  17965. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  17966. /* insert padding */
  17967. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  17968. xcb_buffer_len += xcb_block_len + xcb_pad
  17969. if uint32(0) != xcb_pad {
  17970. xcb_tmp += uintptr(xcb_pad)
  17971. xcb_pad = uint32(0)
  17972. }
  17973. xcb_block_len = uint32(0)
  17974. return libc.Int32FromUint32(xcb_buffer_len)
  17975. }
  17976. 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) {
  17977. bp := tls.Alloc(64)
  17978. defer tls.Free(64)
  17979. var xcb_ret Txcb_lookup_color_cookie_t
  17980. var _ /* xcb_out at bp+48 */ Txcb_lookup_color_request_t
  17981. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  17982. _ = xcb_ret
  17983. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  17984. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  17985. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  17986. libc.Xmemset(tls, bp+48+10, 0, uint32(2))
  17987. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  17988. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  17989. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  17990. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  17991. /* char name */
  17992. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  17993. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  17994. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  17995. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  17996. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req192)))
  17997. return xcb_ret
  17998. }
  17999. var _xcb_req192 = Txcb_protocol_request_t{
  18000. Fcount: uint32(4),
  18001. Fopcode: uint8(m_XCB_LOOKUP_COLOR),
  18002. }
  18003. 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) {
  18004. bp := tls.Alloc(64)
  18005. defer tls.Free(64)
  18006. var xcb_ret Txcb_lookup_color_cookie_t
  18007. var _ /* xcb_out at bp+48 */ Txcb_lookup_color_request_t
  18008. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18009. _ = xcb_ret
  18010. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  18011. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 48))).Fcmap = cmap
  18012. (*(*Txcb_lookup_color_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  18013. libc.Xmemset(tls, bp+48+10, 0, uint32(2))
  18014. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  18015. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  18016. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18017. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18018. /* char name */
  18019. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  18020. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  18021. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18022. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  18023. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req193)))
  18024. return xcb_ret
  18025. }
  18026. var _xcb_req193 = Txcb_protocol_request_t{
  18027. Fcount: uint32(4),
  18028. Fopcode: uint8(m_XCB_LOOKUP_COLOR),
  18029. }
  18030. func Xxcb_lookup_color_reply(tls *libc.TLS, c uintptr, cookie Txcb_lookup_color_cookie_t, e uintptr) (r uintptr) {
  18031. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18032. }
  18033. 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) {
  18034. bp := tls.Alloc(64)
  18035. defer tls.Free(64)
  18036. var xcb_ret Txcb_void_cookie_t
  18037. var _ /* xcb_out at bp+32 */ Txcb_create_cursor_request_t
  18038. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18039. _ = xcb_ret
  18040. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  18041. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fcid = cid
  18042. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fsource = source
  18043. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fmask = mask
  18044. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_red = fore_red
  18045. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_green = fore_green
  18046. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_blue = fore_blue
  18047. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_red = back_red
  18048. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_green = back_green
  18049. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_blue = back_blue
  18050. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fx = x
  18051. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fy = y
  18052. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18053. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(32)
  18054. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18055. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18056. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req194)))
  18057. return xcb_ret
  18058. }
  18059. var _xcb_req194 = Txcb_protocol_request_t{
  18060. Fcount: uint32(2),
  18061. Fopcode: uint8(m_XCB_CREATE_CURSOR),
  18062. Fisvoid: uint8(1),
  18063. }
  18064. 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) {
  18065. bp := tls.Alloc(64)
  18066. defer tls.Free(64)
  18067. var xcb_ret Txcb_void_cookie_t
  18068. var _ /* xcb_out at bp+32 */ Txcb_create_cursor_request_t
  18069. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18070. _ = xcb_ret
  18071. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  18072. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fcid = cid
  18073. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fsource = source
  18074. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fmask = mask
  18075. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_red = fore_red
  18076. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_green = fore_green
  18077. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_blue = fore_blue
  18078. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_red = back_red
  18079. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_green = back_green
  18080. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_blue = back_blue
  18081. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fx = x
  18082. (*(*Txcb_create_cursor_request_t)(unsafe.Pointer(bp + 32))).Fy = y
  18083. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18084. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(32)
  18085. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18086. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18087. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req195)))
  18088. return xcb_ret
  18089. }
  18090. var _xcb_req195 = Txcb_protocol_request_t{
  18091. Fcount: uint32(2),
  18092. Fopcode: uint8(m_XCB_CREATE_CURSOR),
  18093. Fisvoid: uint8(1),
  18094. }
  18095. 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) {
  18096. bp := tls.Alloc(64)
  18097. defer tls.Free(64)
  18098. var xcb_ret Txcb_void_cookie_t
  18099. var _ /* xcb_out at bp+32 */ Txcb_create_glyph_cursor_request_t
  18100. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18101. _ = xcb_ret
  18102. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  18103. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fcid = cid
  18104. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fsource_font = source_font
  18105. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fmask_font = mask_font
  18106. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fsource_char = source_char
  18107. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fmask_char = mask_char
  18108. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_red = fore_red
  18109. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_green = fore_green
  18110. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_blue = fore_blue
  18111. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_red = back_red
  18112. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_green = back_green
  18113. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_blue = back_blue
  18114. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18115. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(32)
  18116. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18117. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18118. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req196)))
  18119. return xcb_ret
  18120. }
  18121. var _xcb_req196 = Txcb_protocol_request_t{
  18122. Fcount: uint32(2),
  18123. Fopcode: uint8(m_XCB_CREATE_GLYPH_CURSOR),
  18124. Fisvoid: uint8(1),
  18125. }
  18126. 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) {
  18127. bp := tls.Alloc(64)
  18128. defer tls.Free(64)
  18129. var xcb_ret Txcb_void_cookie_t
  18130. var _ /* xcb_out at bp+32 */ Txcb_create_glyph_cursor_request_t
  18131. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18132. _ = xcb_ret
  18133. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  18134. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fcid = cid
  18135. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fsource_font = source_font
  18136. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fmask_font = mask_font
  18137. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fsource_char = source_char
  18138. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fmask_char = mask_char
  18139. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_red = fore_red
  18140. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_green = fore_green
  18141. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_blue = fore_blue
  18142. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_red = back_red
  18143. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_green = back_green
  18144. (*(*Txcb_create_glyph_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_blue = back_blue
  18145. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18146. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(32)
  18147. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18148. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18149. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req197)))
  18150. return xcb_ret
  18151. }
  18152. var _xcb_req197 = Txcb_protocol_request_t{
  18153. Fcount: uint32(2),
  18154. Fopcode: uint8(m_XCB_CREATE_GLYPH_CURSOR),
  18155. Fisvoid: uint8(1),
  18156. }
  18157. func Xxcb_free_cursor_checked(tls *libc.TLS, c uintptr, cursor Txcb_cursor_t) (r Txcb_void_cookie_t) {
  18158. bp := tls.Alloc(48)
  18159. defer tls.Free(48)
  18160. var xcb_ret Txcb_void_cookie_t
  18161. var _ /* xcb_out at bp+32 */ Txcb_free_cursor_request_t
  18162. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18163. _ = xcb_ret
  18164. (*(*Txcb_free_cursor_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  18165. (*(*Txcb_free_cursor_request_t)(unsafe.Pointer(bp + 32))).Fcursor = cursor
  18166. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18167. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  18168. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18169. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18170. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req198)))
  18171. return xcb_ret
  18172. }
  18173. var _xcb_req198 = Txcb_protocol_request_t{
  18174. Fcount: uint32(2),
  18175. Fopcode: uint8(m_XCB_FREE_CURSOR),
  18176. Fisvoid: uint8(1),
  18177. }
  18178. func Xxcb_free_cursor(tls *libc.TLS, c uintptr, cursor Txcb_cursor_t) (r Txcb_void_cookie_t) {
  18179. bp := tls.Alloc(48)
  18180. defer tls.Free(48)
  18181. var xcb_ret Txcb_void_cookie_t
  18182. var _ /* xcb_out at bp+32 */ Txcb_free_cursor_request_t
  18183. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18184. _ = xcb_ret
  18185. (*(*Txcb_free_cursor_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  18186. (*(*Txcb_free_cursor_request_t)(unsafe.Pointer(bp + 32))).Fcursor = cursor
  18187. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18188. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  18189. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18190. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18191. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req199)))
  18192. return xcb_ret
  18193. }
  18194. var _xcb_req199 = Txcb_protocol_request_t{
  18195. Fcount: uint32(2),
  18196. Fopcode: uint8(m_XCB_FREE_CURSOR),
  18197. Fisvoid: uint8(1),
  18198. }
  18199. 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) {
  18200. bp := tls.Alloc(64)
  18201. defer tls.Free(64)
  18202. var xcb_ret Txcb_void_cookie_t
  18203. var _ /* xcb_out at bp+32 */ Txcb_recolor_cursor_request_t
  18204. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18205. _ = xcb_ret
  18206. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  18207. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Fcursor = cursor
  18208. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_red = fore_red
  18209. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_green = fore_green
  18210. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_blue = fore_blue
  18211. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_red = back_red
  18212. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_green = back_green
  18213. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_blue = back_blue
  18214. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18215. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(20)
  18216. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18217. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18218. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req200)))
  18219. return xcb_ret
  18220. }
  18221. var _xcb_req200 = Txcb_protocol_request_t{
  18222. Fcount: uint32(2),
  18223. Fopcode: uint8(m_XCB_RECOLOR_CURSOR),
  18224. Fisvoid: uint8(1),
  18225. }
  18226. 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) {
  18227. bp := tls.Alloc(64)
  18228. defer tls.Free(64)
  18229. var xcb_ret Txcb_void_cookie_t
  18230. var _ /* xcb_out at bp+32 */ Txcb_recolor_cursor_request_t
  18231. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18232. _ = xcb_ret
  18233. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  18234. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Fcursor = cursor
  18235. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_red = fore_red
  18236. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_green = fore_green
  18237. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Ffore_blue = fore_blue
  18238. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_red = back_red
  18239. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_green = back_green
  18240. (*(*Txcb_recolor_cursor_request_t)(unsafe.Pointer(bp + 32))).Fback_blue = back_blue
  18241. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18242. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(20)
  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 & uint32(3)
  18245. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req201)))
  18246. return xcb_ret
  18247. }
  18248. var _xcb_req201 = Txcb_protocol_request_t{
  18249. Fcount: uint32(2),
  18250. Fopcode: uint8(m_XCB_RECOLOR_CURSOR),
  18251. Fisvoid: uint8(1),
  18252. }
  18253. 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) {
  18254. bp := tls.Alloc(48)
  18255. defer tls.Free(48)
  18256. var xcb_ret Txcb_query_best_size_cookie_t
  18257. var _ /* xcb_out at bp+32 */ Txcb_query_best_size_request_t
  18258. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18259. _ = xcb_ret
  18260. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 32))).F_class = _class
  18261. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 32))).Fdrawable = drawable
  18262. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  18263. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  18264. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18265. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  18266. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18267. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18268. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req202)))
  18269. return xcb_ret
  18270. }
  18271. var _xcb_req202 = Txcb_protocol_request_t{
  18272. Fcount: uint32(2),
  18273. Fopcode: uint8(m_XCB_QUERY_BEST_SIZE),
  18274. }
  18275. 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) {
  18276. bp := tls.Alloc(48)
  18277. defer tls.Free(48)
  18278. var xcb_ret Txcb_query_best_size_cookie_t
  18279. var _ /* xcb_out at bp+32 */ Txcb_query_best_size_request_t
  18280. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18281. _ = xcb_ret
  18282. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 32))).F_class = _class
  18283. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 32))).Fdrawable = drawable
  18284. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 32))).Fwidth = width
  18285. (*(*Txcb_query_best_size_request_t)(unsafe.Pointer(bp + 32))).Fheight = height
  18286. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18287. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  18288. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18289. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18290. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req203)))
  18291. return xcb_ret
  18292. }
  18293. var _xcb_req203 = Txcb_protocol_request_t{
  18294. Fcount: uint32(2),
  18295. Fopcode: uint8(m_XCB_QUERY_BEST_SIZE),
  18296. }
  18297. func Xxcb_query_best_size_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_best_size_cookie_t, e uintptr) (r uintptr) {
  18298. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18299. }
  18300. func Xxcb_query_extension_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  18301. var _aux, xcb_tmp uintptr
  18302. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18303. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18304. xcb_tmp = _buffer
  18305. _aux = _buffer
  18306. xcb_buffer_len = uint32(0)
  18307. xcb_block_len = uint32(0)
  18308. xcb_pad = uint32(0)
  18309. xcb_align_to = uint32(0)
  18310. xcb_block_len += uint32(8)
  18311. xcb_tmp += uintptr(xcb_block_len)
  18312. xcb_buffer_len += xcb_block_len
  18313. xcb_block_len = uint32(0)
  18314. /* name */
  18315. xcb_block_len += uint32((*Txcb_query_extension_request_t)(unsafe.Pointer(_aux)).Fname_len) * uint32(1)
  18316. xcb_tmp += uintptr(xcb_block_len)
  18317. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  18318. /* insert padding */
  18319. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18320. xcb_buffer_len += xcb_block_len + xcb_pad
  18321. if uint32(0) != xcb_pad {
  18322. xcb_tmp += uintptr(xcb_pad)
  18323. xcb_pad = uint32(0)
  18324. }
  18325. xcb_block_len = uint32(0)
  18326. return libc.Int32FromUint32(xcb_buffer_len)
  18327. }
  18328. func Xxcb_query_extension(tls *libc.TLS, c uintptr, name_len Tuint16_t, name uintptr) (r Txcb_query_extension_cookie_t) {
  18329. bp := tls.Alloc(64)
  18330. defer tls.Free(64)
  18331. var xcb_ret Txcb_query_extension_cookie_t
  18332. var _ /* xcb_out at bp+48 */ Txcb_query_extension_request_t
  18333. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18334. _ = xcb_ret
  18335. (*(*Txcb_query_extension_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  18336. (*(*Txcb_query_extension_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  18337. libc.Xmemset(tls, bp+48+6, 0, uint32(2))
  18338. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  18339. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  18340. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18341. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18342. /* char name */
  18343. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  18344. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  18345. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18346. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  18347. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req204)))
  18348. return xcb_ret
  18349. }
  18350. var _xcb_req204 = Txcb_protocol_request_t{
  18351. Fcount: uint32(4),
  18352. Fopcode: uint8(m_XCB_QUERY_EXTENSION),
  18353. }
  18354. func Xxcb_query_extension_unchecked(tls *libc.TLS, c uintptr, name_len Tuint16_t, name uintptr) (r Txcb_query_extension_cookie_t) {
  18355. bp := tls.Alloc(64)
  18356. defer tls.Free(64)
  18357. var xcb_ret Txcb_query_extension_cookie_t
  18358. var _ /* xcb_out at bp+48 */ Txcb_query_extension_request_t
  18359. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18360. _ = xcb_ret
  18361. (*(*Txcb_query_extension_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  18362. (*(*Txcb_query_extension_request_t)(unsafe.Pointer(bp + 48))).Fname_len = name_len
  18363. libc.Xmemset(tls, bp+48+6, 0, uint32(2))
  18364. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  18365. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  18366. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18367. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18368. /* char name */
  18369. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = name
  18370. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(name_len) * uint32(1)
  18371. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18372. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  18373. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req205)))
  18374. return xcb_ret
  18375. }
  18376. var _xcb_req205 = Txcb_protocol_request_t{
  18377. Fcount: uint32(4),
  18378. Fopcode: uint8(m_XCB_QUERY_EXTENSION),
  18379. }
  18380. func Xxcb_query_extension_reply(tls *libc.TLS, c uintptr, cookie Txcb_query_extension_cookie_t, e uintptr) (r uintptr) {
  18381. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18382. }
  18383. func Xxcb_list_extensions_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  18384. var _aux, xcb_tmp uintptr
  18385. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  18386. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  18387. xcb_tmp = _buffer
  18388. _aux = _buffer
  18389. xcb_buffer_len = uint32(0)
  18390. xcb_block_len = uint32(0)
  18391. xcb_pad = uint32(0)
  18392. xcb_align_to = uint32(0)
  18393. xcb_block_len += uint32(32)
  18394. xcb_tmp += uintptr(xcb_block_len)
  18395. xcb_buffer_len += xcb_block_len
  18396. xcb_block_len = uint32(0)
  18397. /* names */
  18398. i = uint32(0)
  18399. for {
  18400. if !(i < uint32((*Txcb_list_extensions_reply_t)(unsafe.Pointer(_aux)).Fnames_len)) {
  18401. break
  18402. }
  18403. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_str_sizeof(tls, xcb_tmp))
  18404. xcb_block_len += xcb_tmp_len
  18405. xcb_tmp += uintptr(xcb_tmp_len)
  18406. goto _1
  18407. _1:
  18408. ;
  18409. i++
  18410. }
  18411. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  18412. /* insert padding */
  18413. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18414. xcb_buffer_len += xcb_block_len + xcb_pad
  18415. if uint32(0) != xcb_pad {
  18416. xcb_tmp += uintptr(xcb_pad)
  18417. xcb_pad = uint32(0)
  18418. }
  18419. xcb_block_len = uint32(0)
  18420. return libc.Int32FromUint32(xcb_buffer_len)
  18421. }
  18422. func Xxcb_list_extensions(tls *libc.TLS, c uintptr) (r Txcb_list_extensions_cookie_t) {
  18423. bp := tls.Alloc(48)
  18424. defer tls.Free(48)
  18425. var xcb_ret Txcb_list_extensions_cookie_t
  18426. var _ /* xcb_out at bp+32 */ Txcb_list_extensions_request_t
  18427. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18428. _ = xcb_ret
  18429. (*(*Txcb_list_extensions_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  18430. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18431. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  18432. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18433. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18434. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req206)))
  18435. return xcb_ret
  18436. }
  18437. var _xcb_req206 = Txcb_protocol_request_t{
  18438. Fcount: uint32(2),
  18439. Fopcode: uint8(m_XCB_LIST_EXTENSIONS),
  18440. }
  18441. func Xxcb_list_extensions_unchecked(tls *libc.TLS, c uintptr) (r Txcb_list_extensions_cookie_t) {
  18442. bp := tls.Alloc(48)
  18443. defer tls.Free(48)
  18444. var xcb_ret Txcb_list_extensions_cookie_t
  18445. var _ /* xcb_out at bp+32 */ Txcb_list_extensions_request_t
  18446. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18447. _ = xcb_ret
  18448. (*(*Txcb_list_extensions_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  18449. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18450. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  18451. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18452. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18453. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req207)))
  18454. return xcb_ret
  18455. }
  18456. var _xcb_req207 = Txcb_protocol_request_t{
  18457. Fcount: uint32(2),
  18458. Fopcode: uint8(m_XCB_LIST_EXTENSIONS),
  18459. }
  18460. func Xxcb_list_extensions_names_length(tls *libc.TLS, R uintptr) (r int32) {
  18461. return libc.Int32FromUint8((*Txcb_list_extensions_reply_t)(unsafe.Pointer(R)).Fnames_len)
  18462. }
  18463. func Xxcb_list_extensions_names_iterator(tls *libc.TLS, R uintptr) (r Txcb_str_iterator_t) {
  18464. var i Txcb_str_iterator_t
  18465. _ = i
  18466. i.Fdata = R + libc.UintptrFromInt32(1)*32
  18467. i.Frem = libc.Int32FromUint8((*Txcb_list_extensions_reply_t)(unsafe.Pointer(R)).Fnames_len)
  18468. i.Findex = int32(i.Fdata) - int32(R)
  18469. return i
  18470. }
  18471. func Xxcb_list_extensions_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_extensions_cookie_t, e uintptr) (r uintptr) {
  18472. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18473. }
  18474. func Xxcb_change_keyboard_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  18475. var _aux, xcb_tmp uintptr
  18476. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18477. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18478. xcb_tmp = _buffer
  18479. _aux = _buffer
  18480. xcb_buffer_len = uint32(0)
  18481. xcb_block_len = uint32(0)
  18482. xcb_pad = uint32(0)
  18483. xcb_align_to = uint32(0)
  18484. xcb_block_len += uint32(8)
  18485. xcb_tmp += uintptr(xcb_block_len)
  18486. xcb_buffer_len += xcb_block_len
  18487. xcb_block_len = uint32(0)
  18488. /* keysyms */
  18489. xcb_block_len += libc.Uint32FromInt32(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)) * uint32(4)
  18490. xcb_tmp += uintptr(xcb_block_len)
  18491. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18492. /* insert padding */
  18493. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18494. xcb_buffer_len += xcb_block_len + xcb_pad
  18495. if uint32(0) != xcb_pad {
  18496. xcb_tmp += uintptr(xcb_pad)
  18497. xcb_pad = uint32(0)
  18498. }
  18499. xcb_block_len = uint32(0)
  18500. return libc.Int32FromUint32(xcb_buffer_len)
  18501. }
  18502. 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) {
  18503. bp := tls.Alloc(64)
  18504. defer tls.Free(64)
  18505. var xcb_ret Txcb_void_cookie_t
  18506. var _ /* xcb_out at bp+48 */ Txcb_change_keyboard_mapping_request_t
  18507. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18508. _ = xcb_ret
  18509. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 48))).Fkeycode_count = keycode_count
  18510. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 48))).Ffirst_keycode = first_keycode
  18511. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 48))).Fkeysyms_per_keycode = keysyms_per_keycode
  18512. libc.Xmemset(tls, bp+48+6, 0, uint32(2))
  18513. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  18514. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  18515. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18516. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18517. /* xcb_keysym_t keysyms */
  18518. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = keysyms
  18519. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(libc.Int32FromUint8(keycode_count)*libc.Int32FromUint8(keysyms_per_keycode)) * uint32(4)
  18520. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18521. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  18522. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req208)))
  18523. return xcb_ret
  18524. }
  18525. var _xcb_req208 = Txcb_protocol_request_t{
  18526. Fcount: uint32(4),
  18527. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_MAPPING),
  18528. Fisvoid: uint8(1),
  18529. }
  18530. 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) {
  18531. bp := tls.Alloc(64)
  18532. defer tls.Free(64)
  18533. var xcb_ret Txcb_void_cookie_t
  18534. var _ /* xcb_out at bp+48 */ Txcb_change_keyboard_mapping_request_t
  18535. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  18536. _ = xcb_ret
  18537. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 48))).Fkeycode_count = keycode_count
  18538. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 48))).Ffirst_keycode = first_keycode
  18539. (*(*Txcb_change_keyboard_mapping_request_t)(unsafe.Pointer(bp + 48))).Fkeysyms_per_keycode = keysyms_per_keycode
  18540. libc.Xmemset(tls, bp+48+6, 0, uint32(2))
  18541. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  18542. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  18543. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18544. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18545. /* xcb_keysym_t keysyms */
  18546. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = keysyms
  18547. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(libc.Int32FromUint8(keycode_count)*libc.Int32FromUint8(keysyms_per_keycode)) * uint32(4)
  18548. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  18549. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  18550. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req209)))
  18551. return xcb_ret
  18552. }
  18553. var _xcb_req209 = Txcb_protocol_request_t{
  18554. Fcount: uint32(4),
  18555. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_MAPPING),
  18556. Fisvoid: uint8(1),
  18557. }
  18558. func Xxcb_change_keyboard_mapping_keysyms(tls *libc.TLS, R uintptr) (r uintptr) {
  18559. return R + libc.UintptrFromInt32(1)*8
  18560. }
  18561. func Xxcb_change_keyboard_mapping_keysyms_length(tls *libc.TLS, R uintptr) (r int32) {
  18562. 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)
  18563. }
  18564. func Xxcb_change_keyboard_mapping_keysyms_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  18565. var i Txcb_generic_iterator_t
  18566. _ = i
  18567. 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
  18568. i.Frem = 0
  18569. i.Findex = int32(i.Fdata) - int32(R)
  18570. return i
  18571. }
  18572. func Xxcb_get_keyboard_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  18573. var _aux, xcb_tmp uintptr
  18574. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18575. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18576. xcb_tmp = _buffer
  18577. _aux = _buffer
  18578. xcb_buffer_len = uint32(0)
  18579. xcb_block_len = uint32(0)
  18580. xcb_pad = uint32(0)
  18581. xcb_align_to = uint32(0)
  18582. xcb_block_len += uint32(32)
  18583. xcb_tmp += uintptr(xcb_block_len)
  18584. xcb_buffer_len += xcb_block_len
  18585. xcb_block_len = uint32(0)
  18586. /* keysyms */
  18587. xcb_block_len += (*Txcb_get_keyboard_mapping_reply_t)(unsafe.Pointer(_aux)).Flength * uint32(4)
  18588. xcb_tmp += uintptr(xcb_block_len)
  18589. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18590. /* insert padding */
  18591. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18592. xcb_buffer_len += xcb_block_len + xcb_pad
  18593. if uint32(0) != xcb_pad {
  18594. xcb_tmp += uintptr(xcb_pad)
  18595. xcb_pad = uint32(0)
  18596. }
  18597. xcb_block_len = uint32(0)
  18598. return libc.Int32FromUint32(xcb_buffer_len)
  18599. }
  18600. 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) {
  18601. bp := tls.Alloc(48)
  18602. defer tls.Free(48)
  18603. var xcb_ret Txcb_get_keyboard_mapping_cookie_t
  18604. var _ /* xcb_out at bp+36 */ Txcb_get_keyboard_mapping_request_t
  18605. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18606. _ = xcb_ret
  18607. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 36))).Fpad0 = uint8(0)
  18608. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 36))).Ffirst_keycode = first_keycode
  18609. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 36))).Fcount = count
  18610. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 36
  18611. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(6)
  18612. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18613. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18614. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req210)))
  18615. return xcb_ret
  18616. }
  18617. var _xcb_req210 = Txcb_protocol_request_t{
  18618. Fcount: uint32(2),
  18619. Fopcode: uint8(m_XCB_GET_KEYBOARD_MAPPING),
  18620. }
  18621. 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) {
  18622. bp := tls.Alloc(48)
  18623. defer tls.Free(48)
  18624. var xcb_ret Txcb_get_keyboard_mapping_cookie_t
  18625. var _ /* xcb_out at bp+36 */ Txcb_get_keyboard_mapping_request_t
  18626. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18627. _ = xcb_ret
  18628. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 36))).Fpad0 = uint8(0)
  18629. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 36))).Ffirst_keycode = first_keycode
  18630. (*(*Txcb_get_keyboard_mapping_request_t)(unsafe.Pointer(bp + 36))).Fcount = count
  18631. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 36
  18632. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(6)
  18633. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18634. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18635. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req211)))
  18636. return xcb_ret
  18637. }
  18638. var _xcb_req211 = Txcb_protocol_request_t{
  18639. Fcount: uint32(2),
  18640. Fopcode: uint8(m_XCB_GET_KEYBOARD_MAPPING),
  18641. }
  18642. func Xxcb_get_keyboard_mapping_keysyms(tls *libc.TLS, R uintptr) (r uintptr) {
  18643. return R + libc.UintptrFromInt32(1)*32
  18644. }
  18645. func Xxcb_get_keyboard_mapping_keysyms_length(tls *libc.TLS, R uintptr) (r int32) {
  18646. return libc.Int32FromUint32((*Txcb_get_keyboard_mapping_reply_t)(unsafe.Pointer(R)).Flength)
  18647. }
  18648. func Xxcb_get_keyboard_mapping_keysyms_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  18649. var i Txcb_generic_iterator_t
  18650. _ = i
  18651. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_get_keyboard_mapping_reply_t)(unsafe.Pointer(R)).Flength)*4
  18652. i.Frem = 0
  18653. i.Findex = int32(i.Fdata) - int32(R)
  18654. return i
  18655. }
  18656. func Xxcb_get_keyboard_mapping_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_keyboard_mapping_cookie_t, e uintptr) (r uintptr) {
  18657. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  18658. }
  18659. func Xxcb_change_keyboard_control_value_list_serialize(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  18660. bp := tls.Alloc(16)
  18661. defer tls.Free(16)
  18662. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_parts_idx uint32
  18663. var xcb_out, xcb_tmp uintptr
  18664. var xcb_parts [9]Tiovec
  18665. var _ /* xcb_pad0 at bp+0 */ [3]int8
  18666. _, _, _, _, _, _, _, _, _, _ = i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_out, xcb_pad, xcb_padding_offset, xcb_parts, xcb_parts_idx, xcb_tmp
  18667. xcb_out = *(*uintptr)(unsafe.Pointer(_buffer))
  18668. xcb_buffer_len = uint32(0)
  18669. xcb_align_to = uint32(0)
  18670. xcb_padding_offset = uint32(0)
  18671. xcb_pad = uint32(0)
  18672. *(*[3]int8)(unsafe.Pointer(bp)) = [3]int8{}
  18673. xcb_parts_idx = uint32(0)
  18674. xcb_block_len = uint32(0)
  18675. if value_mask&uint32(_XCB_KB_KEY_CLICK_PERCENT) != 0 {
  18676. /* xcb_change_keyboard_control_value_list_t.key_click_percent */
  18677. xcb_parts[xcb_parts_idx].Fiov_base = _aux
  18678. xcb_block_len += uint32(4)
  18679. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  18680. xcb_parts_idx++
  18681. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18682. }
  18683. if value_mask&uint32(_XCB_KB_BELL_PERCENT) != 0 {
  18684. /* xcb_change_keyboard_control_value_list_t.bell_percent */
  18685. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 4
  18686. xcb_block_len += uint32(4)
  18687. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  18688. xcb_parts_idx++
  18689. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18690. }
  18691. if value_mask&uint32(_XCB_KB_BELL_PITCH) != 0 {
  18692. /* xcb_change_keyboard_control_value_list_t.bell_pitch */
  18693. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 8
  18694. xcb_block_len += uint32(4)
  18695. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  18696. xcb_parts_idx++
  18697. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18698. }
  18699. if value_mask&uint32(_XCB_KB_BELL_DURATION) != 0 {
  18700. /* xcb_change_keyboard_control_value_list_t.bell_duration */
  18701. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 12
  18702. xcb_block_len += uint32(4)
  18703. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  18704. xcb_parts_idx++
  18705. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18706. }
  18707. if value_mask&uint32(_XCB_KB_LED) != 0 {
  18708. /* xcb_change_keyboard_control_value_list_t.led */
  18709. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 16
  18710. xcb_block_len += uint32(4)
  18711. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  18712. xcb_parts_idx++
  18713. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18714. }
  18715. if value_mask&uint32(_XCB_KB_LED_MODE) != 0 {
  18716. /* xcb_change_keyboard_control_value_list_t.led_mode */
  18717. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 20
  18718. xcb_block_len += uint32(4)
  18719. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  18720. xcb_parts_idx++
  18721. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18722. }
  18723. if value_mask&uint32(_XCB_KB_KEY) != 0 {
  18724. /* xcb_change_keyboard_control_value_list_t.key */
  18725. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 24
  18726. xcb_block_len += uint32(4)
  18727. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  18728. xcb_parts_idx++
  18729. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18730. }
  18731. if value_mask&uint32(_XCB_KB_AUTO_REPEAT_MODE) != 0 {
  18732. /* xcb_change_keyboard_control_value_list_t.auto_repeat_mode */
  18733. xcb_parts[xcb_parts_idx].Fiov_base = _aux + 28
  18734. xcb_block_len += uint32(4)
  18735. xcb_parts[xcb_parts_idx].Fiov_len = uint32(4)
  18736. xcb_parts_idx++
  18737. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18738. }
  18739. /* insert padding */
  18740. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  18741. xcb_buffer_len += xcb_block_len + xcb_pad
  18742. if uint32(0) != xcb_pad {
  18743. xcb_parts[xcb_parts_idx].Fiov_base = bp
  18744. xcb_parts[xcb_parts_idx].Fiov_len = xcb_pad
  18745. xcb_parts_idx++
  18746. xcb_pad = uint32(0)
  18747. }
  18748. xcb_block_len = uint32(0)
  18749. xcb_padding_offset = uint32(0)
  18750. if libc.UintptrFromInt32(0) == xcb_out {
  18751. /* allocate memory */
  18752. xcb_out = libc.Xmalloc(tls, xcb_buffer_len)
  18753. *(*uintptr)(unsafe.Pointer(_buffer)) = xcb_out
  18754. }
  18755. xcb_tmp = xcb_out
  18756. i = uint32(0)
  18757. for {
  18758. if !(i < xcb_parts_idx) {
  18759. break
  18760. }
  18761. if uintptr(0) != xcb_parts[i].Fiov_base && uint32(0) != xcb_parts[i].Fiov_len {
  18762. libc.Xmemcpy(tls, xcb_tmp, xcb_parts[i].Fiov_base, xcb_parts[i].Fiov_len)
  18763. }
  18764. if uint32(0) != xcb_parts[i].Fiov_len {
  18765. xcb_tmp += uintptr(xcb_parts[i].Fiov_len)
  18766. }
  18767. goto _1
  18768. _1:
  18769. ;
  18770. i++
  18771. }
  18772. return libc.Int32FromUint32(xcb_buffer_len)
  18773. }
  18774. func Xxcb_change_keyboard_control_value_list_unpack(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t, _aux uintptr) (r int32) {
  18775. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset uint32
  18776. var xcb_tmp uintptr
  18777. _, _, _, _, _, _ = xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_padding_offset, xcb_tmp
  18778. xcb_tmp = _buffer
  18779. xcb_buffer_len = uint32(0)
  18780. xcb_block_len = uint32(0)
  18781. xcb_pad = uint32(0)
  18782. xcb_align_to = uint32(0)
  18783. xcb_padding_offset = uint32(0)
  18784. if value_mask&uint32(_XCB_KB_KEY_CLICK_PERCENT) != 0 {
  18785. /* xcb_change_keyboard_control_value_list_t.key_click_percent */
  18786. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fkey_click_percent = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  18787. xcb_block_len += uint32(4)
  18788. xcb_tmp += uintptr(4)
  18789. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18790. }
  18791. if value_mask&uint32(_XCB_KB_BELL_PERCENT) != 0 {
  18792. /* xcb_change_keyboard_control_value_list_t.bell_percent */
  18793. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fbell_percent = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  18794. xcb_block_len += uint32(4)
  18795. xcb_tmp += uintptr(4)
  18796. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18797. }
  18798. if value_mask&uint32(_XCB_KB_BELL_PITCH) != 0 {
  18799. /* xcb_change_keyboard_control_value_list_t.bell_pitch */
  18800. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fbell_pitch = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  18801. xcb_block_len += uint32(4)
  18802. xcb_tmp += uintptr(4)
  18803. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18804. }
  18805. if value_mask&uint32(_XCB_KB_BELL_DURATION) != 0 {
  18806. /* xcb_change_keyboard_control_value_list_t.bell_duration */
  18807. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fbell_duration = *(*Tint32_t)(unsafe.Pointer(xcb_tmp))
  18808. xcb_block_len += uint32(4)
  18809. xcb_tmp += uintptr(4)
  18810. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18811. }
  18812. if value_mask&uint32(_XCB_KB_LED) != 0 {
  18813. /* xcb_change_keyboard_control_value_list_t.led */
  18814. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fled = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  18815. xcb_block_len += uint32(4)
  18816. xcb_tmp += uintptr(4)
  18817. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18818. }
  18819. if value_mask&uint32(_XCB_KB_LED_MODE) != 0 {
  18820. /* xcb_change_keyboard_control_value_list_t.led_mode */
  18821. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fled_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  18822. xcb_block_len += uint32(4)
  18823. xcb_tmp += uintptr(4)
  18824. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18825. }
  18826. if value_mask&uint32(_XCB_KB_KEY) != 0 {
  18827. /* xcb_change_keyboard_control_value_list_t.key */
  18828. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fkey = *(*Txcb_keycode32_t)(unsafe.Pointer(xcb_tmp))
  18829. xcb_block_len += uint32(4)
  18830. xcb_tmp += uintptr(4)
  18831. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18832. }
  18833. if value_mask&uint32(_XCB_KB_AUTO_REPEAT_MODE) != 0 {
  18834. /* xcb_change_keyboard_control_value_list_t.auto_repeat_mode */
  18835. (*Txcb_change_keyboard_control_value_list_t)(unsafe.Pointer(_aux)).Fauto_repeat_mode = *(*Tuint32_t)(unsafe.Pointer(xcb_tmp))
  18836. xcb_block_len += uint32(4)
  18837. xcb_tmp += uintptr(4)
  18838. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  18839. }
  18840. /* insert padding */
  18841. xcb_pad = -(xcb_block_len + xcb_padding_offset) & (xcb_align_to - uint32(1))
  18842. xcb_buffer_len += xcb_block_len + xcb_pad
  18843. if uint32(0) != xcb_pad {
  18844. xcb_tmp += uintptr(xcb_pad)
  18845. xcb_pad = uint32(0)
  18846. }
  18847. xcb_block_len = uint32(0)
  18848. xcb_padding_offset = uint32(0)
  18849. return libc.Int32FromUint32(xcb_buffer_len)
  18850. }
  18851. func Xxcb_change_keyboard_control_value_list_sizeof(tls *libc.TLS, _buffer uintptr, value_mask Tuint32_t) (r int32) {
  18852. bp := tls.Alloc(32)
  18853. defer tls.Free(32)
  18854. var _ /* _aux at bp+0 */ Txcb_change_keyboard_control_value_list_t
  18855. return Xxcb_change_keyboard_control_value_list_unpack(tls, _buffer, value_mask, bp)
  18856. }
  18857. func Xxcb_change_keyboard_control_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  18858. var _aux, xcb_tmp uintptr
  18859. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  18860. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  18861. xcb_tmp = _buffer
  18862. _aux = _buffer
  18863. xcb_buffer_len = uint32(0)
  18864. xcb_block_len = uint32(0)
  18865. xcb_pad = uint32(0)
  18866. xcb_align_to = uint32(0)
  18867. xcb_block_len += uint32(8)
  18868. xcb_tmp += uintptr(xcb_block_len)
  18869. xcb_buffer_len += xcb_block_len
  18870. xcb_block_len = uint32(0)
  18871. /* value_list */
  18872. 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))
  18873. xcb_tmp += uintptr(xcb_block_len)
  18874. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  18875. /* insert padding */
  18876. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  18877. xcb_buffer_len += xcb_block_len + xcb_pad
  18878. if uint32(0) != xcb_pad {
  18879. xcb_tmp += uintptr(xcb_pad)
  18880. xcb_pad = uint32(0)
  18881. }
  18882. xcb_block_len = uint32(0)
  18883. return libc.Int32FromUint32(xcb_buffer_len)
  18884. }
  18885. func Xxcb_change_keyboard_control_checked(tls *libc.TLS, c uintptr, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  18886. bp := tls.Alloc(48)
  18887. defer tls.Free(48)
  18888. var xcb_ret Txcb_void_cookie_t
  18889. var _ /* xcb_out at bp+40 */ Txcb_change_keyboard_control_request_t
  18890. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  18891. _ = xcb_ret
  18892. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  18893. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  18894. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  18895. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  18896. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18897. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18898. /* xcb_change_keyboard_control_value_list_t value_list */
  18899. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  18900. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_keyboard_control_value_list_sizeof(tls, value_list, value_mask))
  18901. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req212)))
  18902. return xcb_ret
  18903. }
  18904. var _xcb_req212 = Txcb_protocol_request_t{
  18905. Fcount: uint32(3),
  18906. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_CONTROL),
  18907. Fisvoid: uint8(1),
  18908. }
  18909. func Xxcb_change_keyboard_control(tls *libc.TLS, c uintptr, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  18910. bp := tls.Alloc(48)
  18911. defer tls.Free(48)
  18912. var xcb_ret Txcb_void_cookie_t
  18913. var _ /* xcb_out at bp+40 */ Txcb_change_keyboard_control_request_t
  18914. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  18915. _ = xcb_ret
  18916. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  18917. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  18918. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  18919. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  18920. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18921. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18922. /* xcb_change_keyboard_control_value_list_t value_list */
  18923. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = value_list
  18924. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_keyboard_control_value_list_sizeof(tls, value_list, value_mask))
  18925. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req213)))
  18926. return xcb_ret
  18927. }
  18928. var _xcb_req213 = Txcb_protocol_request_t{
  18929. Fcount: uint32(3),
  18930. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_CONTROL),
  18931. Fisvoid: uint8(1),
  18932. }
  18933. func Xxcb_change_keyboard_control_aux_checked(tls *libc.TLS, c uintptr, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  18934. bp := tls.Alloc(64)
  18935. defer tls.Free(64)
  18936. var xcb_ret Txcb_void_cookie_t
  18937. var _ /* xcb_aux0 at bp+48 */ uintptr
  18938. var _ /* xcb_out at bp+40 */ Txcb_change_keyboard_control_request_t
  18939. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  18940. _ = xcb_ret
  18941. *(*uintptr)(unsafe.Pointer(bp + 48)) = uintptr(0)
  18942. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  18943. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  18944. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  18945. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  18946. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18947. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18948. /* xcb_change_keyboard_control_value_list_t value_list */
  18949. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_keyboard_control_value_list_serialize(tls, bp+48, value_mask, value_list))
  18950. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 48))
  18951. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req214)))
  18952. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 48)))
  18953. return xcb_ret
  18954. }
  18955. var _xcb_req214 = Txcb_protocol_request_t{
  18956. Fcount: uint32(3),
  18957. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_CONTROL),
  18958. Fisvoid: uint8(1),
  18959. }
  18960. func Xxcb_change_keyboard_control_aux(tls *libc.TLS, c uintptr, value_mask Tuint32_t, value_list uintptr) (r Txcb_void_cookie_t) {
  18961. bp := tls.Alloc(64)
  18962. defer tls.Free(64)
  18963. var xcb_ret Txcb_void_cookie_t
  18964. var _ /* xcb_aux0 at bp+48 */ uintptr
  18965. var _ /* xcb_out at bp+40 */ Txcb_change_keyboard_control_request_t
  18966. var _ /* xcb_parts at bp+0 */ [5]Tiovec
  18967. _ = xcb_ret
  18968. *(*uintptr)(unsafe.Pointer(bp + 48)) = uintptr(0)
  18969. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 40))).Fpad0 = uint8(0)
  18970. (*(*Txcb_change_keyboard_control_request_t)(unsafe.Pointer(bp + 40))).Fvalue_mask = value_mask
  18971. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 40
  18972. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  18973. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  18974. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  18975. /* xcb_change_keyboard_control_value_list_t value_list */
  18976. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(Xxcb_change_keyboard_control_value_list_serialize(tls, bp+48, value_mask, value_list))
  18977. (*(*[5]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = *(*uintptr)(unsafe.Pointer(bp + 48))
  18978. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req215)))
  18979. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(bp + 48)))
  18980. return xcb_ret
  18981. }
  18982. var _xcb_req215 = Txcb_protocol_request_t{
  18983. Fcount: uint32(3),
  18984. Fopcode: uint8(m_XCB_CHANGE_KEYBOARD_CONTROL),
  18985. Fisvoid: uint8(1),
  18986. }
  18987. func Xxcb_change_keyboard_control_value_list(tls *libc.TLS, R uintptr) (r uintptr) {
  18988. return R + libc.UintptrFromInt32(1)*8
  18989. }
  18990. func Xxcb_get_keyboard_control(tls *libc.TLS, c uintptr) (r Txcb_get_keyboard_control_cookie_t) {
  18991. bp := tls.Alloc(48)
  18992. defer tls.Free(48)
  18993. var xcb_ret Txcb_get_keyboard_control_cookie_t
  18994. var _ /* xcb_out at bp+32 */ Txcb_get_keyboard_control_request_t
  18995. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  18996. _ = xcb_ret
  18997. (*(*Txcb_get_keyboard_control_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  18998. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  18999. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19000. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19001. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19002. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req216)))
  19003. return xcb_ret
  19004. }
  19005. var _xcb_req216 = Txcb_protocol_request_t{
  19006. Fcount: uint32(2),
  19007. Fopcode: uint8(m_XCB_GET_KEYBOARD_CONTROL),
  19008. }
  19009. func Xxcb_get_keyboard_control_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_keyboard_control_cookie_t) {
  19010. bp := tls.Alloc(48)
  19011. defer tls.Free(48)
  19012. var xcb_ret Txcb_get_keyboard_control_cookie_t
  19013. var _ /* xcb_out at bp+32 */ Txcb_get_keyboard_control_request_t
  19014. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19015. _ = xcb_ret
  19016. (*(*Txcb_get_keyboard_control_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19017. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19018. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19019. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19020. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19021. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req217)))
  19022. return xcb_ret
  19023. }
  19024. var _xcb_req217 = Txcb_protocol_request_t{
  19025. Fcount: uint32(2),
  19026. Fopcode: uint8(m_XCB_GET_KEYBOARD_CONTROL),
  19027. }
  19028. func Xxcb_get_keyboard_control_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_keyboard_control_cookie_t, e uintptr) (r uintptr) {
  19029. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  19030. }
  19031. func Xxcb_bell_checked(tls *libc.TLS, c uintptr, percent Tint8_t) (r Txcb_void_cookie_t) {
  19032. bp := tls.Alloc(48)
  19033. defer tls.Free(48)
  19034. var xcb_ret Txcb_void_cookie_t
  19035. var _ /* xcb_out at bp+32 */ Txcb_bell_request_t
  19036. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19037. _ = xcb_ret
  19038. (*(*Txcb_bell_request_t)(unsafe.Pointer(bp + 32))).Fpercent = percent
  19039. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19040. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19041. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19042. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19043. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req218)))
  19044. return xcb_ret
  19045. }
  19046. var _xcb_req218 = Txcb_protocol_request_t{
  19047. Fcount: uint32(2),
  19048. Fopcode: uint8(m_XCB_BELL),
  19049. Fisvoid: uint8(1),
  19050. }
  19051. func Xxcb_bell(tls *libc.TLS, c uintptr, percent Tint8_t) (r Txcb_void_cookie_t) {
  19052. bp := tls.Alloc(48)
  19053. defer tls.Free(48)
  19054. var xcb_ret Txcb_void_cookie_t
  19055. var _ /* xcb_out at bp+32 */ Txcb_bell_request_t
  19056. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19057. _ = xcb_ret
  19058. (*(*Txcb_bell_request_t)(unsafe.Pointer(bp + 32))).Fpercent = percent
  19059. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19060. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19061. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19062. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19063. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req219)))
  19064. return xcb_ret
  19065. }
  19066. var _xcb_req219 = Txcb_protocol_request_t{
  19067. Fcount: uint32(2),
  19068. Fopcode: uint8(m_XCB_BELL),
  19069. Fisvoid: uint8(1),
  19070. }
  19071. 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) {
  19072. bp := tls.Alloc(48)
  19073. defer tls.Free(48)
  19074. var xcb_ret Txcb_void_cookie_t
  19075. var _ /* xcb_out at bp+32 */ Txcb_change_pointer_control_request_t
  19076. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19077. _ = xcb_ret
  19078. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19079. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Facceleration_numerator = acceleration_numerator
  19080. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Facceleration_denominator = acceleration_denominator
  19081. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Fthreshold = threshold
  19082. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Fdo_acceleration = do_acceleration
  19083. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Fdo_threshold = do_threshold
  19084. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19085. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  19086. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19087. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19088. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req220)))
  19089. return xcb_ret
  19090. }
  19091. var _xcb_req220 = Txcb_protocol_request_t{
  19092. Fcount: uint32(2),
  19093. Fopcode: uint8(m_XCB_CHANGE_POINTER_CONTROL),
  19094. Fisvoid: uint8(1),
  19095. }
  19096. 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) {
  19097. bp := tls.Alloc(48)
  19098. defer tls.Free(48)
  19099. var xcb_ret Txcb_void_cookie_t
  19100. var _ /* xcb_out at bp+32 */ Txcb_change_pointer_control_request_t
  19101. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19102. _ = xcb_ret
  19103. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19104. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Facceleration_numerator = acceleration_numerator
  19105. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Facceleration_denominator = acceleration_denominator
  19106. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Fthreshold = threshold
  19107. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Fdo_acceleration = do_acceleration
  19108. (*(*Txcb_change_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Fdo_threshold = do_threshold
  19109. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19110. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  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 & uint32(3)
  19113. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req221)))
  19114. return xcb_ret
  19115. }
  19116. var _xcb_req221 = Txcb_protocol_request_t{
  19117. Fcount: uint32(2),
  19118. Fopcode: uint8(m_XCB_CHANGE_POINTER_CONTROL),
  19119. Fisvoid: uint8(1),
  19120. }
  19121. func Xxcb_get_pointer_control(tls *libc.TLS, c uintptr) (r Txcb_get_pointer_control_cookie_t) {
  19122. bp := tls.Alloc(48)
  19123. defer tls.Free(48)
  19124. var xcb_ret Txcb_get_pointer_control_cookie_t
  19125. var _ /* xcb_out at bp+32 */ Txcb_get_pointer_control_request_t
  19126. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19127. _ = xcb_ret
  19128. (*(*Txcb_get_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19129. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19130. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19131. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19132. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19133. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req222)))
  19134. return xcb_ret
  19135. }
  19136. var _xcb_req222 = Txcb_protocol_request_t{
  19137. Fcount: uint32(2),
  19138. Fopcode: uint8(m_XCB_GET_POINTER_CONTROL),
  19139. }
  19140. func Xxcb_get_pointer_control_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_pointer_control_cookie_t) {
  19141. bp := tls.Alloc(48)
  19142. defer tls.Free(48)
  19143. var xcb_ret Txcb_get_pointer_control_cookie_t
  19144. var _ /* xcb_out at bp+32 */ Txcb_get_pointer_control_request_t
  19145. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19146. _ = xcb_ret
  19147. (*(*Txcb_get_pointer_control_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19148. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19149. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19150. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19151. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19152. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req223)))
  19153. return xcb_ret
  19154. }
  19155. var _xcb_req223 = Txcb_protocol_request_t{
  19156. Fcount: uint32(2),
  19157. Fopcode: uint8(m_XCB_GET_POINTER_CONTROL),
  19158. }
  19159. func Xxcb_get_pointer_control_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_pointer_control_cookie_t, e uintptr) (r uintptr) {
  19160. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  19161. }
  19162. 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) {
  19163. bp := tls.Alloc(48)
  19164. defer tls.Free(48)
  19165. var xcb_ret Txcb_void_cookie_t
  19166. var _ /* xcb_out at bp+32 */ Txcb_set_screen_saver_request_t
  19167. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19168. _ = xcb_ret
  19169. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19170. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Ftimeout = timeout
  19171. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Finterval = interval
  19172. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Fprefer_blanking = prefer_blanking
  19173. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Fallow_exposures = allow_exposures
  19174. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19175. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(10)
  19176. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19177. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19178. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req224)))
  19179. return xcb_ret
  19180. }
  19181. var _xcb_req224 = Txcb_protocol_request_t{
  19182. Fcount: uint32(2),
  19183. Fopcode: uint8(m_XCB_SET_SCREEN_SAVER),
  19184. Fisvoid: uint8(1),
  19185. }
  19186. 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) {
  19187. bp := tls.Alloc(48)
  19188. defer tls.Free(48)
  19189. var xcb_ret Txcb_void_cookie_t
  19190. var _ /* xcb_out at bp+32 */ Txcb_set_screen_saver_request_t
  19191. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19192. _ = xcb_ret
  19193. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19194. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Ftimeout = timeout
  19195. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Finterval = interval
  19196. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Fprefer_blanking = prefer_blanking
  19197. (*(*Txcb_set_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Fallow_exposures = allow_exposures
  19198. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19199. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(10)
  19200. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19201. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19202. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req225)))
  19203. return xcb_ret
  19204. }
  19205. var _xcb_req225 = Txcb_protocol_request_t{
  19206. Fcount: uint32(2),
  19207. Fopcode: uint8(m_XCB_SET_SCREEN_SAVER),
  19208. Fisvoid: uint8(1),
  19209. }
  19210. func Xxcb_get_screen_saver(tls *libc.TLS, c uintptr) (r Txcb_get_screen_saver_cookie_t) {
  19211. bp := tls.Alloc(48)
  19212. defer tls.Free(48)
  19213. var xcb_ret Txcb_get_screen_saver_cookie_t
  19214. var _ /* xcb_out at bp+32 */ Txcb_get_screen_saver_request_t
  19215. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19216. _ = xcb_ret
  19217. (*(*Txcb_get_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19218. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19219. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19220. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19221. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19222. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req226)))
  19223. return xcb_ret
  19224. }
  19225. var _xcb_req226 = Txcb_protocol_request_t{
  19226. Fcount: uint32(2),
  19227. Fopcode: uint8(m_XCB_GET_SCREEN_SAVER),
  19228. }
  19229. func Xxcb_get_screen_saver_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_screen_saver_cookie_t) {
  19230. bp := tls.Alloc(48)
  19231. defer tls.Free(48)
  19232. var xcb_ret Txcb_get_screen_saver_cookie_t
  19233. var _ /* xcb_out at bp+32 */ Txcb_get_screen_saver_request_t
  19234. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19235. _ = xcb_ret
  19236. (*(*Txcb_get_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19237. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19238. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19239. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19240. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19241. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req227)))
  19242. return xcb_ret
  19243. }
  19244. var _xcb_req227 = Txcb_protocol_request_t{
  19245. Fcount: uint32(2),
  19246. Fopcode: uint8(m_XCB_GET_SCREEN_SAVER),
  19247. }
  19248. func Xxcb_get_screen_saver_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_screen_saver_cookie_t, e uintptr) (r uintptr) {
  19249. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  19250. }
  19251. func Xxcb_change_hosts_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19252. var _aux, xcb_tmp uintptr
  19253. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  19254. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  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(8)
  19262. xcb_tmp += uintptr(xcb_block_len)
  19263. xcb_buffer_len += xcb_block_len
  19264. xcb_block_len = uint32(0)
  19265. /* address */
  19266. xcb_block_len += uint32((*Txcb_change_hosts_request_t)(unsafe.Pointer(_aux)).Faddress_len) * uint32(1)
  19267. xcb_tmp += uintptr(xcb_block_len)
  19268. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  19269. /* insert padding */
  19270. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19271. xcb_buffer_len += xcb_block_len + xcb_pad
  19272. if uint32(0) != xcb_pad {
  19273. xcb_tmp += uintptr(xcb_pad)
  19274. xcb_pad = uint32(0)
  19275. }
  19276. xcb_block_len = uint32(0)
  19277. return libc.Int32FromUint32(xcb_buffer_len)
  19278. }
  19279. 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) {
  19280. bp := tls.Alloc(64)
  19281. defer tls.Free(64)
  19282. var xcb_ret Txcb_void_cookie_t
  19283. var _ /* xcb_out at bp+48 */ Txcb_change_hosts_request_t
  19284. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19285. _ = xcb_ret
  19286. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 48))).Fmode = mode
  19287. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 48))).Ffamily = family
  19288. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  19289. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 48))).Faddress_len = address_len
  19290. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  19291. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  19292. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19293. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19294. /* uint8_t address */
  19295. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = address
  19296. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(address_len) * uint32(1)
  19297. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  19298. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  19299. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req228)))
  19300. return xcb_ret
  19301. }
  19302. var _xcb_req228 = Txcb_protocol_request_t{
  19303. Fcount: uint32(4),
  19304. Fopcode: uint8(m_XCB_CHANGE_HOSTS),
  19305. Fisvoid: uint8(1),
  19306. }
  19307. 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) {
  19308. bp := tls.Alloc(64)
  19309. defer tls.Free(64)
  19310. var xcb_ret Txcb_void_cookie_t
  19311. var _ /* xcb_out at bp+48 */ Txcb_change_hosts_request_t
  19312. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19313. _ = xcb_ret
  19314. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 48))).Fmode = mode
  19315. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 48))).Ffamily = family
  19316. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  19317. (*(*Txcb_change_hosts_request_t)(unsafe.Pointer(bp + 48))).Faddress_len = address_len
  19318. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  19319. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  19320. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19321. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19322. /* uint8_t address */
  19323. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = address
  19324. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(address_len) * uint32(1)
  19325. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  19326. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  19327. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req229)))
  19328. return xcb_ret
  19329. }
  19330. var _xcb_req229 = Txcb_protocol_request_t{
  19331. Fcount: uint32(4),
  19332. Fopcode: uint8(m_XCB_CHANGE_HOSTS),
  19333. Fisvoid: uint8(1),
  19334. }
  19335. func Xxcb_change_hosts_address(tls *libc.TLS, R uintptr) (r uintptr) {
  19336. return R + libc.UintptrFromInt32(1)*8
  19337. }
  19338. func Xxcb_change_hosts_address_length(tls *libc.TLS, R uintptr) (r int32) {
  19339. return libc.Int32FromUint16((*Txcb_change_hosts_request_t)(unsafe.Pointer(R)).Faddress_len)
  19340. }
  19341. func Xxcb_change_hosts_address_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  19342. var i Txcb_generic_iterator_t
  19343. _ = i
  19344. i.Fdata = R + libc.UintptrFromInt32(1)*8 + uintptr((*Txcb_change_hosts_request_t)(unsafe.Pointer(R)).Faddress_len)
  19345. i.Frem = 0
  19346. i.Findex = int32(i.Fdata) - int32(R)
  19347. return i
  19348. }
  19349. func Xxcb_host_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19350. var _aux, xcb_tmp uintptr
  19351. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  19352. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  19353. xcb_tmp = _buffer
  19354. _aux = _buffer
  19355. xcb_buffer_len = uint32(0)
  19356. xcb_block_len = uint32(0)
  19357. xcb_pad = uint32(0)
  19358. xcb_align_to = uint32(0)
  19359. xcb_block_len += uint32(4)
  19360. xcb_tmp += uintptr(xcb_block_len)
  19361. xcb_buffer_len += xcb_block_len
  19362. xcb_block_len = uint32(0)
  19363. /* address */
  19364. xcb_block_len += uint32((*Txcb_host_t)(unsafe.Pointer(_aux)).Faddress_len) * uint32(1)
  19365. xcb_tmp += uintptr(xcb_block_len)
  19366. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  19367. xcb_align_to = uint32(4)
  19368. /* insert padding */
  19369. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19370. xcb_buffer_len += xcb_block_len + xcb_pad
  19371. if uint32(0) != xcb_pad {
  19372. xcb_tmp += uintptr(xcb_pad)
  19373. xcb_pad = uint32(0)
  19374. }
  19375. xcb_block_len = uint32(0)
  19376. /* insert padding */
  19377. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19378. xcb_buffer_len += xcb_block_len + xcb_pad
  19379. if uint32(0) != xcb_pad {
  19380. xcb_tmp += uintptr(xcb_pad)
  19381. xcb_pad = uint32(0)
  19382. }
  19383. xcb_block_len = uint32(0)
  19384. return libc.Int32FromUint32(xcb_buffer_len)
  19385. }
  19386. func Xxcb_host_address(tls *libc.TLS, R uintptr) (r uintptr) {
  19387. return R + libc.UintptrFromInt32(1)*4
  19388. }
  19389. func Xxcb_host_address_length(tls *libc.TLS, R uintptr) (r int32) {
  19390. return libc.Int32FromUint16((*Txcb_host_t)(unsafe.Pointer(R)).Faddress_len)
  19391. }
  19392. func Xxcb_host_address_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  19393. var i Txcb_generic_iterator_t
  19394. _ = i
  19395. i.Fdata = R + libc.UintptrFromInt32(1)*4 + uintptr((*Txcb_host_t)(unsafe.Pointer(R)).Faddress_len)
  19396. i.Frem = 0
  19397. i.Findex = int32(i.Fdata) - int32(R)
  19398. return i
  19399. }
  19400. func Xxcb_host_next(tls *libc.TLS, i uintptr) {
  19401. var R uintptr
  19402. var child Txcb_generic_iterator_t
  19403. _, _ = R, child
  19404. R = (*Txcb_host_iterator_t)(unsafe.Pointer(i)).Fdata
  19405. child.Fdata = R + uintptr(Xxcb_host_sizeof(tls, R))
  19406. (*Txcb_host_iterator_t)(unsafe.Pointer(i)).Findex = int32(child.Fdata) - int32((*Txcb_host_iterator_t)(unsafe.Pointer(i)).Fdata)
  19407. (*Txcb_host_iterator_t)(unsafe.Pointer(i)).Frem--
  19408. (*Txcb_host_iterator_t)(unsafe.Pointer(i)).Fdata = child.Fdata
  19409. }
  19410. func Xxcb_host_end(tls *libc.TLS, _i Txcb_host_iterator_t) (r Txcb_generic_iterator_t) {
  19411. bp := tls.Alloc(16)
  19412. defer tls.Free(16)
  19413. *(*Txcb_host_iterator_t)(unsafe.Pointer(bp)) = _i
  19414. var ret Txcb_generic_iterator_t
  19415. _ = ret
  19416. for (*(*Txcb_host_iterator_t)(unsafe.Pointer(bp))).Frem > 0 {
  19417. Xxcb_host_next(tls, bp)
  19418. }
  19419. ret.Fdata = (*(*Txcb_host_iterator_t)(unsafe.Pointer(bp))).Fdata
  19420. ret.Frem = (*(*Txcb_host_iterator_t)(unsafe.Pointer(bp))).Frem
  19421. ret.Findex = (*(*Txcb_host_iterator_t)(unsafe.Pointer(bp))).Findex
  19422. return ret
  19423. }
  19424. func Xxcb_list_hosts_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19425. var _aux, xcb_tmp uintptr
  19426. var i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp_len uint32
  19427. _, _, _, _, _, _, _, _ = _aux, i, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp, xcb_tmp_len
  19428. xcb_tmp = _buffer
  19429. _aux = _buffer
  19430. xcb_buffer_len = uint32(0)
  19431. xcb_block_len = uint32(0)
  19432. xcb_pad = uint32(0)
  19433. xcb_align_to = uint32(0)
  19434. xcb_block_len += uint32(32)
  19435. xcb_tmp += uintptr(xcb_block_len)
  19436. xcb_buffer_len += xcb_block_len
  19437. xcb_block_len = uint32(0)
  19438. /* hosts */
  19439. i = uint32(0)
  19440. for {
  19441. if !(i < uint32((*Txcb_list_hosts_reply_t)(unsafe.Pointer(_aux)).Fhosts_len)) {
  19442. break
  19443. }
  19444. xcb_tmp_len = libc.Uint32FromInt32(Xxcb_host_sizeof(tls, xcb_tmp))
  19445. xcb_block_len += xcb_tmp_len
  19446. xcb_tmp += uintptr(xcb_tmp_len)
  19447. goto _1
  19448. _1:
  19449. ;
  19450. i++
  19451. }
  19452. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 2)
  19453. /* insert padding */
  19454. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19455. xcb_buffer_len += xcb_block_len + xcb_pad
  19456. if uint32(0) != xcb_pad {
  19457. xcb_tmp += uintptr(xcb_pad)
  19458. xcb_pad = uint32(0)
  19459. }
  19460. xcb_block_len = uint32(0)
  19461. return libc.Int32FromUint32(xcb_buffer_len)
  19462. }
  19463. func Xxcb_list_hosts(tls *libc.TLS, c uintptr) (r Txcb_list_hosts_cookie_t) {
  19464. bp := tls.Alloc(48)
  19465. defer tls.Free(48)
  19466. var xcb_ret Txcb_list_hosts_cookie_t
  19467. var _ /* xcb_out at bp+32 */ Txcb_list_hosts_request_t
  19468. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19469. _ = xcb_ret
  19470. (*(*Txcb_list_hosts_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19471. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19472. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19473. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19474. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19475. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req230)))
  19476. return xcb_ret
  19477. }
  19478. var _xcb_req230 = Txcb_protocol_request_t{
  19479. Fcount: uint32(2),
  19480. Fopcode: uint8(m_XCB_LIST_HOSTS),
  19481. }
  19482. func Xxcb_list_hosts_unchecked(tls *libc.TLS, c uintptr) (r Txcb_list_hosts_cookie_t) {
  19483. bp := tls.Alloc(48)
  19484. defer tls.Free(48)
  19485. var xcb_ret Txcb_list_hosts_cookie_t
  19486. var _ /* xcb_out at bp+32 */ Txcb_list_hosts_request_t
  19487. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19488. _ = xcb_ret
  19489. (*(*Txcb_list_hosts_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19490. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19491. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19492. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19493. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19494. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req231)))
  19495. return xcb_ret
  19496. }
  19497. var _xcb_req231 = Txcb_protocol_request_t{
  19498. Fcount: uint32(2),
  19499. Fopcode: uint8(m_XCB_LIST_HOSTS),
  19500. }
  19501. func Xxcb_list_hosts_hosts_length(tls *libc.TLS, R uintptr) (r int32) {
  19502. return libc.Int32FromUint16((*Txcb_list_hosts_reply_t)(unsafe.Pointer(R)).Fhosts_len)
  19503. }
  19504. func Xxcb_list_hosts_hosts_iterator(tls *libc.TLS, R uintptr) (r Txcb_host_iterator_t) {
  19505. var i Txcb_host_iterator_t
  19506. _ = i
  19507. i.Fdata = R + libc.UintptrFromInt32(1)*32
  19508. i.Frem = libc.Int32FromUint16((*Txcb_list_hosts_reply_t)(unsafe.Pointer(R)).Fhosts_len)
  19509. i.Findex = int32(i.Fdata) - int32(R)
  19510. return i
  19511. }
  19512. func Xxcb_list_hosts_reply(tls *libc.TLS, c uintptr, cookie Txcb_list_hosts_cookie_t, e uintptr) (r uintptr) {
  19513. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  19514. }
  19515. func Xxcb_set_access_control_checked(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  19516. bp := tls.Alloc(48)
  19517. defer tls.Free(48)
  19518. var xcb_ret Txcb_void_cookie_t
  19519. var _ /* xcb_out at bp+32 */ Txcb_set_access_control_request_t
  19520. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19521. _ = xcb_ret
  19522. (*(*Txcb_set_access_control_request_t)(unsafe.Pointer(bp + 32))).Fmode = mode
  19523. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19524. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19525. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19526. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19527. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req232)))
  19528. return xcb_ret
  19529. }
  19530. var _xcb_req232 = Txcb_protocol_request_t{
  19531. Fcount: uint32(2),
  19532. Fopcode: uint8(m_XCB_SET_ACCESS_CONTROL),
  19533. Fisvoid: uint8(1),
  19534. }
  19535. func Xxcb_set_access_control(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  19536. bp := tls.Alloc(48)
  19537. defer tls.Free(48)
  19538. var xcb_ret Txcb_void_cookie_t
  19539. var _ /* xcb_out at bp+32 */ Txcb_set_access_control_request_t
  19540. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19541. _ = xcb_ret
  19542. (*(*Txcb_set_access_control_request_t)(unsafe.Pointer(bp + 32))).Fmode = mode
  19543. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19544. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19545. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19546. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19547. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req233)))
  19548. return xcb_ret
  19549. }
  19550. var _xcb_req233 = Txcb_protocol_request_t{
  19551. Fcount: uint32(2),
  19552. Fopcode: uint8(m_XCB_SET_ACCESS_CONTROL),
  19553. Fisvoid: uint8(1),
  19554. }
  19555. func Xxcb_set_close_down_mode_checked(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  19556. bp := tls.Alloc(48)
  19557. defer tls.Free(48)
  19558. var xcb_ret Txcb_void_cookie_t
  19559. var _ /* xcb_out at bp+32 */ Txcb_set_close_down_mode_request_t
  19560. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19561. _ = xcb_ret
  19562. (*(*Txcb_set_close_down_mode_request_t)(unsafe.Pointer(bp + 32))).Fmode = mode
  19563. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19564. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19565. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19566. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19567. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req234)))
  19568. return xcb_ret
  19569. }
  19570. var _xcb_req234 = Txcb_protocol_request_t{
  19571. Fcount: uint32(2),
  19572. Fopcode: uint8(m_XCB_SET_CLOSE_DOWN_MODE),
  19573. Fisvoid: uint8(1),
  19574. }
  19575. func Xxcb_set_close_down_mode(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  19576. bp := tls.Alloc(48)
  19577. defer tls.Free(48)
  19578. var xcb_ret Txcb_void_cookie_t
  19579. var _ /* xcb_out at bp+32 */ Txcb_set_close_down_mode_request_t
  19580. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19581. _ = xcb_ret
  19582. (*(*Txcb_set_close_down_mode_request_t)(unsafe.Pointer(bp + 32))).Fmode = mode
  19583. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19584. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19585. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19586. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19587. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req235)))
  19588. return xcb_ret
  19589. }
  19590. var _xcb_req235 = Txcb_protocol_request_t{
  19591. Fcount: uint32(2),
  19592. Fopcode: uint8(m_XCB_SET_CLOSE_DOWN_MODE),
  19593. Fisvoid: uint8(1),
  19594. }
  19595. func Xxcb_kill_client_checked(tls *libc.TLS, c uintptr, resource Tuint32_t) (r Txcb_void_cookie_t) {
  19596. bp := tls.Alloc(48)
  19597. defer tls.Free(48)
  19598. var xcb_ret Txcb_void_cookie_t
  19599. var _ /* xcb_out at bp+32 */ Txcb_kill_client_request_t
  19600. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19601. _ = xcb_ret
  19602. (*(*Txcb_kill_client_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19603. (*(*Txcb_kill_client_request_t)(unsafe.Pointer(bp + 32))).Fresource = resource
  19604. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19605. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  19606. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19607. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19608. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req236)))
  19609. return xcb_ret
  19610. }
  19611. var _xcb_req236 = Txcb_protocol_request_t{
  19612. Fcount: uint32(2),
  19613. Fopcode: uint8(m_XCB_KILL_CLIENT),
  19614. Fisvoid: uint8(1),
  19615. }
  19616. func Xxcb_kill_client(tls *libc.TLS, c uintptr, resource Tuint32_t) (r Txcb_void_cookie_t) {
  19617. bp := tls.Alloc(48)
  19618. defer tls.Free(48)
  19619. var xcb_ret Txcb_void_cookie_t
  19620. var _ /* xcb_out at bp+32 */ Txcb_kill_client_request_t
  19621. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19622. _ = xcb_ret
  19623. (*(*Txcb_kill_client_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19624. (*(*Txcb_kill_client_request_t)(unsafe.Pointer(bp + 32))).Fresource = resource
  19625. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19626. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  19627. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19628. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19629. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req237)))
  19630. return xcb_ret
  19631. }
  19632. var _xcb_req237 = Txcb_protocol_request_t{
  19633. Fcount: uint32(2),
  19634. Fopcode: uint8(m_XCB_KILL_CLIENT),
  19635. Fisvoid: uint8(1),
  19636. }
  19637. func Xxcb_rotate_properties_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19638. var _aux, xcb_tmp uintptr
  19639. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  19640. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  19641. xcb_tmp = _buffer
  19642. _aux = _buffer
  19643. xcb_buffer_len = uint32(0)
  19644. xcb_block_len = uint32(0)
  19645. xcb_pad = uint32(0)
  19646. xcb_align_to = uint32(0)
  19647. xcb_block_len += uint32(12)
  19648. xcb_tmp += uintptr(xcb_block_len)
  19649. xcb_buffer_len += xcb_block_len
  19650. xcb_block_len = uint32(0)
  19651. /* atoms */
  19652. xcb_block_len += uint32((*Txcb_rotate_properties_request_t)(unsafe.Pointer(_aux)).Fatoms_len) * uint32(4)
  19653. xcb_tmp += uintptr(xcb_block_len)
  19654. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  19655. /* insert padding */
  19656. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19657. xcb_buffer_len += xcb_block_len + xcb_pad
  19658. if uint32(0) != xcb_pad {
  19659. xcb_tmp += uintptr(xcb_pad)
  19660. xcb_pad = uint32(0)
  19661. }
  19662. xcb_block_len = uint32(0)
  19663. return libc.Int32FromUint32(xcb_buffer_len)
  19664. }
  19665. 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) {
  19666. bp := tls.Alloc(64)
  19667. defer tls.Free(64)
  19668. var xcb_ret Txcb_void_cookie_t
  19669. var _ /* xcb_out at bp+48 */ Txcb_rotate_properties_request_t
  19670. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19671. _ = xcb_ret
  19672. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  19673. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 48))).Fwindow = window
  19674. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 48))).Fatoms_len = atoms_len
  19675. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 48))).Fdelta = delta
  19676. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  19677. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  19678. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19679. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19680. /* xcb_atom_t atoms */
  19681. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = atoms
  19682. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(atoms_len) * uint32(4)
  19683. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  19684. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  19685. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req238)))
  19686. return xcb_ret
  19687. }
  19688. var _xcb_req238 = Txcb_protocol_request_t{
  19689. Fcount: uint32(4),
  19690. Fopcode: uint8(m_XCB_ROTATE_PROPERTIES),
  19691. Fisvoid: uint8(1),
  19692. }
  19693. 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) {
  19694. bp := tls.Alloc(64)
  19695. defer tls.Free(64)
  19696. var xcb_ret Txcb_void_cookie_t
  19697. var _ /* xcb_out at bp+48 */ Txcb_rotate_properties_request_t
  19698. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19699. _ = xcb_ret
  19700. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 48))).Fpad0 = uint8(0)
  19701. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 48))).Fwindow = window
  19702. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 48))).Fatoms_len = atoms_len
  19703. (*(*Txcb_rotate_properties_request_t)(unsafe.Pointer(bp + 48))).Fdelta = delta
  19704. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  19705. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(12)
  19706. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19707. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19708. /* xcb_atom_t atoms */
  19709. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = atoms
  19710. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(atoms_len) * uint32(4)
  19711. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  19712. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  19713. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req239)))
  19714. return xcb_ret
  19715. }
  19716. var _xcb_req239 = Txcb_protocol_request_t{
  19717. Fcount: uint32(4),
  19718. Fopcode: uint8(m_XCB_ROTATE_PROPERTIES),
  19719. Fisvoid: uint8(1),
  19720. }
  19721. func Xxcb_rotate_properties_atoms(tls *libc.TLS, R uintptr) (r uintptr) {
  19722. return R + libc.UintptrFromInt32(1)*12
  19723. }
  19724. func Xxcb_rotate_properties_atoms_length(tls *libc.TLS, R uintptr) (r int32) {
  19725. return libc.Int32FromUint16((*Txcb_rotate_properties_request_t)(unsafe.Pointer(R)).Fatoms_len)
  19726. }
  19727. func Xxcb_rotate_properties_atoms_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  19728. var i Txcb_generic_iterator_t
  19729. _ = i
  19730. i.Fdata = R + libc.UintptrFromInt32(1)*12 + uintptr((*Txcb_rotate_properties_request_t)(unsafe.Pointer(R)).Fatoms_len)*4
  19731. i.Frem = 0
  19732. i.Findex = int32(i.Fdata) - int32(R)
  19733. return i
  19734. }
  19735. func Xxcb_force_screen_saver_checked(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  19736. bp := tls.Alloc(48)
  19737. defer tls.Free(48)
  19738. var xcb_ret Txcb_void_cookie_t
  19739. var _ /* xcb_out at bp+32 */ Txcb_force_screen_saver_request_t
  19740. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19741. _ = xcb_ret
  19742. (*(*Txcb_force_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Fmode = mode
  19743. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19744. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19745. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19746. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19747. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req240)))
  19748. return xcb_ret
  19749. }
  19750. var _xcb_req240 = Txcb_protocol_request_t{
  19751. Fcount: uint32(2),
  19752. Fopcode: uint8(m_XCB_FORCE_SCREEN_SAVER),
  19753. Fisvoid: uint8(1),
  19754. }
  19755. func Xxcb_force_screen_saver(tls *libc.TLS, c uintptr, mode Tuint8_t) (r Txcb_void_cookie_t) {
  19756. bp := tls.Alloc(48)
  19757. defer tls.Free(48)
  19758. var xcb_ret Txcb_void_cookie_t
  19759. var _ /* xcb_out at bp+32 */ Txcb_force_screen_saver_request_t
  19760. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19761. _ = xcb_ret
  19762. (*(*Txcb_force_screen_saver_request_t)(unsafe.Pointer(bp + 32))).Fmode = mode
  19763. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19764. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19765. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19766. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19767. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req241)))
  19768. return xcb_ret
  19769. }
  19770. var _xcb_req241 = Txcb_protocol_request_t{
  19771. Fcount: uint32(2),
  19772. Fopcode: uint8(m_XCB_FORCE_SCREEN_SAVER),
  19773. Fisvoid: uint8(1),
  19774. }
  19775. func Xxcb_set_pointer_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19776. var _aux, xcb_tmp uintptr
  19777. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  19778. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  19779. xcb_tmp = _buffer
  19780. _aux = _buffer
  19781. xcb_buffer_len = uint32(0)
  19782. xcb_block_len = uint32(0)
  19783. xcb_pad = uint32(0)
  19784. xcb_align_to = uint32(0)
  19785. xcb_block_len += uint32(4)
  19786. xcb_tmp += uintptr(xcb_block_len)
  19787. xcb_buffer_len += xcb_block_len
  19788. xcb_block_len = uint32(0)
  19789. /* map */
  19790. xcb_block_len += uint32((*Txcb_set_pointer_mapping_request_t)(unsafe.Pointer(_aux)).Fmap_len) * uint32(1)
  19791. xcb_tmp += uintptr(xcb_block_len)
  19792. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  19793. /* insert padding */
  19794. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19795. xcb_buffer_len += xcb_block_len + xcb_pad
  19796. if uint32(0) != xcb_pad {
  19797. xcb_tmp += uintptr(xcb_pad)
  19798. xcb_pad = uint32(0)
  19799. }
  19800. xcb_block_len = uint32(0)
  19801. return libc.Int32FromUint32(xcb_buffer_len)
  19802. }
  19803. func Xxcb_set_pointer_mapping(tls *libc.TLS, c uintptr, map_len Tuint8_t, map1 uintptr) (r Txcb_set_pointer_mapping_cookie_t) {
  19804. bp := tls.Alloc(64)
  19805. defer tls.Free(64)
  19806. var xcb_ret Txcb_set_pointer_mapping_cookie_t
  19807. var _ /* xcb_out at bp+48 */ Txcb_set_pointer_mapping_request_t
  19808. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19809. _ = xcb_ret
  19810. (*(*Txcb_set_pointer_mapping_request_t)(unsafe.Pointer(bp + 48))).Fmap_len = map_len
  19811. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  19812. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19813. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19814. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19815. /* uint8_t map */
  19816. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = map1
  19817. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(map_len) * uint32(1)
  19818. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  19819. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  19820. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req242)))
  19821. return xcb_ret
  19822. }
  19823. var _xcb_req242 = Txcb_protocol_request_t{
  19824. Fcount: uint32(4),
  19825. Fopcode: uint8(m_XCB_SET_POINTER_MAPPING),
  19826. }
  19827. func Xxcb_set_pointer_mapping_unchecked(tls *libc.TLS, c uintptr, map_len Tuint8_t, map1 uintptr) (r Txcb_set_pointer_mapping_cookie_t) {
  19828. bp := tls.Alloc(64)
  19829. defer tls.Free(64)
  19830. var xcb_ret Txcb_set_pointer_mapping_cookie_t
  19831. var _ /* xcb_out at bp+48 */ Txcb_set_pointer_mapping_request_t
  19832. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19833. _ = xcb_ret
  19834. (*(*Txcb_set_pointer_mapping_request_t)(unsafe.Pointer(bp + 48))).Fmap_len = map_len
  19835. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  19836. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19837. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19838. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19839. /* uint8_t map */
  19840. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = map1
  19841. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = uint32(map_len) * uint32(1)
  19842. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  19843. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  19844. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req243)))
  19845. return xcb_ret
  19846. }
  19847. var _xcb_req243 = Txcb_protocol_request_t{
  19848. Fcount: uint32(4),
  19849. Fopcode: uint8(m_XCB_SET_POINTER_MAPPING),
  19850. }
  19851. func Xxcb_set_pointer_mapping_reply(tls *libc.TLS, c uintptr, cookie Txcb_set_pointer_mapping_cookie_t, e uintptr) (r uintptr) {
  19852. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  19853. }
  19854. func Xxcb_get_pointer_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19855. var _aux, xcb_tmp uintptr
  19856. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  19857. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  19858. xcb_tmp = _buffer
  19859. _aux = _buffer
  19860. xcb_buffer_len = uint32(0)
  19861. xcb_block_len = uint32(0)
  19862. xcb_pad = uint32(0)
  19863. xcb_align_to = uint32(0)
  19864. xcb_block_len += uint32(32)
  19865. xcb_tmp += uintptr(xcb_block_len)
  19866. xcb_buffer_len += xcb_block_len
  19867. xcb_block_len = uint32(0)
  19868. /* map */
  19869. xcb_block_len += uint32((*Txcb_get_pointer_mapping_reply_t)(unsafe.Pointer(_aux)).Fmap_len) * uint32(1)
  19870. xcb_tmp += uintptr(xcb_block_len)
  19871. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  19872. /* insert padding */
  19873. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19874. xcb_buffer_len += xcb_block_len + xcb_pad
  19875. if uint32(0) != xcb_pad {
  19876. xcb_tmp += uintptr(xcb_pad)
  19877. xcb_pad = uint32(0)
  19878. }
  19879. xcb_block_len = uint32(0)
  19880. return libc.Int32FromUint32(xcb_buffer_len)
  19881. }
  19882. func Xxcb_get_pointer_mapping(tls *libc.TLS, c uintptr) (r Txcb_get_pointer_mapping_cookie_t) {
  19883. bp := tls.Alloc(48)
  19884. defer tls.Free(48)
  19885. var xcb_ret Txcb_get_pointer_mapping_cookie_t
  19886. var _ /* xcb_out at bp+32 */ Txcb_get_pointer_mapping_request_t
  19887. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19888. _ = xcb_ret
  19889. (*(*Txcb_get_pointer_mapping_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19890. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19891. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19892. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19893. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19894. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req244)))
  19895. return xcb_ret
  19896. }
  19897. var _xcb_req244 = Txcb_protocol_request_t{
  19898. Fcount: uint32(2),
  19899. Fopcode: uint8(m_XCB_GET_POINTER_MAPPING),
  19900. }
  19901. func Xxcb_get_pointer_mapping_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_pointer_mapping_cookie_t) {
  19902. bp := tls.Alloc(48)
  19903. defer tls.Free(48)
  19904. var xcb_ret Txcb_get_pointer_mapping_cookie_t
  19905. var _ /* xcb_out at bp+32 */ Txcb_get_pointer_mapping_request_t
  19906. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  19907. _ = xcb_ret
  19908. (*(*Txcb_get_pointer_mapping_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  19909. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  19910. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19911. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19912. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19913. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req245)))
  19914. return xcb_ret
  19915. }
  19916. var _xcb_req245 = Txcb_protocol_request_t{
  19917. Fcount: uint32(2),
  19918. Fopcode: uint8(m_XCB_GET_POINTER_MAPPING),
  19919. }
  19920. func Xxcb_get_pointer_mapping_map(tls *libc.TLS, R uintptr) (r uintptr) {
  19921. return R + libc.UintptrFromInt32(1)*32
  19922. }
  19923. func Xxcb_get_pointer_mapping_map_length(tls *libc.TLS, R uintptr) (r int32) {
  19924. return libc.Int32FromUint8((*Txcb_get_pointer_mapping_reply_t)(unsafe.Pointer(R)).Fmap_len)
  19925. }
  19926. func Xxcb_get_pointer_mapping_map_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  19927. var i Txcb_generic_iterator_t
  19928. _ = i
  19929. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_get_pointer_mapping_reply_t)(unsafe.Pointer(R)).Fmap_len)
  19930. i.Frem = 0
  19931. i.Findex = int32(i.Fdata) - int32(R)
  19932. return i
  19933. }
  19934. func Xxcb_get_pointer_mapping_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_pointer_mapping_cookie_t, e uintptr) (r uintptr) {
  19935. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  19936. }
  19937. func Xxcb_set_modifier_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  19938. var _aux, xcb_tmp uintptr
  19939. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  19940. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  19941. xcb_tmp = _buffer
  19942. _aux = _buffer
  19943. xcb_buffer_len = uint32(0)
  19944. xcb_block_len = uint32(0)
  19945. xcb_pad = uint32(0)
  19946. xcb_align_to = uint32(0)
  19947. xcb_block_len += uint32(4)
  19948. xcb_tmp += uintptr(xcb_block_len)
  19949. xcb_buffer_len += xcb_block_len
  19950. xcb_block_len = uint32(0)
  19951. /* keycodes */
  19952. xcb_block_len += libc.Uint32FromInt32(libc.Int32FromUint8((*Txcb_set_modifier_mapping_request_t)(unsafe.Pointer(_aux)).Fkeycodes_per_modifier)*libc.Int32FromInt32(8)) * uint32(1)
  19953. xcb_tmp += uintptr(xcb_block_len)
  19954. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  19955. /* insert padding */
  19956. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  19957. xcb_buffer_len += xcb_block_len + xcb_pad
  19958. if uint32(0) != xcb_pad {
  19959. xcb_tmp += uintptr(xcb_pad)
  19960. xcb_pad = uint32(0)
  19961. }
  19962. xcb_block_len = uint32(0)
  19963. return libc.Int32FromUint32(xcb_buffer_len)
  19964. }
  19965. func Xxcb_set_modifier_mapping(tls *libc.TLS, c uintptr, keycodes_per_modifier Tuint8_t, keycodes uintptr) (r Txcb_set_modifier_mapping_cookie_t) {
  19966. bp := tls.Alloc(64)
  19967. defer tls.Free(64)
  19968. var xcb_ret Txcb_set_modifier_mapping_cookie_t
  19969. var _ /* xcb_out at bp+48 */ Txcb_set_modifier_mapping_request_t
  19970. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19971. _ = xcb_ret
  19972. (*(*Txcb_set_modifier_mapping_request_t)(unsafe.Pointer(bp + 48))).Fkeycodes_per_modifier = keycodes_per_modifier
  19973. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  19974. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19975. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  19976. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  19977. /* xcb_keycode_t keycodes */
  19978. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = keycodes
  19979. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(libc.Int32FromUint8(keycodes_per_modifier)*libc.Int32FromInt32(8)) * uint32(1)
  19980. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  19981. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  19982. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req246)))
  19983. return xcb_ret
  19984. }
  19985. var _xcb_req246 = Txcb_protocol_request_t{
  19986. Fcount: uint32(4),
  19987. Fopcode: uint8(m_XCB_SET_MODIFIER_MAPPING),
  19988. }
  19989. 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) {
  19990. bp := tls.Alloc(64)
  19991. defer tls.Free(64)
  19992. var xcb_ret Txcb_set_modifier_mapping_cookie_t
  19993. var _ /* xcb_out at bp+48 */ Txcb_set_modifier_mapping_request_t
  19994. var _ /* xcb_parts at bp+0 */ [6]Tiovec
  19995. _ = xcb_ret
  19996. (*(*Txcb_set_modifier_mapping_request_t)(unsafe.Pointer(bp + 48))).Fkeycodes_per_modifier = keycodes_per_modifier
  19997. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 48
  19998. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  19999. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20000. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20001. /* xcb_keycode_t keycodes */
  20002. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_base = keycodes
  20003. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len = libc.Uint32FromInt32(libc.Int32FromUint8(keycodes_per_modifier)*libc.Int32FromInt32(8)) * uint32(1)
  20004. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_base = uintptr(0)
  20005. (*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(5)].Fiov_len = -(*(*[6]Tiovec)(unsafe.Pointer(bp)))[int32(4)].Fiov_len & uint32(3)
  20006. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req247)))
  20007. return xcb_ret
  20008. }
  20009. var _xcb_req247 = Txcb_protocol_request_t{
  20010. Fcount: uint32(4),
  20011. Fopcode: uint8(m_XCB_SET_MODIFIER_MAPPING),
  20012. }
  20013. func Xxcb_set_modifier_mapping_reply(tls *libc.TLS, c uintptr, cookie Txcb_set_modifier_mapping_cookie_t, e uintptr) (r uintptr) {
  20014. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20015. }
  20016. func Xxcb_get_modifier_mapping_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  20017. var _aux, xcb_tmp uintptr
  20018. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  20019. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  20020. xcb_tmp = _buffer
  20021. _aux = _buffer
  20022. xcb_buffer_len = uint32(0)
  20023. xcb_block_len = uint32(0)
  20024. xcb_pad = uint32(0)
  20025. xcb_align_to = uint32(0)
  20026. xcb_block_len += uint32(32)
  20027. xcb_tmp += uintptr(xcb_block_len)
  20028. xcb_buffer_len += xcb_block_len
  20029. xcb_block_len = uint32(0)
  20030. /* keycodes */
  20031. xcb_block_len += libc.Uint32FromInt32(libc.Int32FromUint8((*Txcb_get_modifier_mapping_reply_t)(unsafe.Pointer(_aux)).Fkeycodes_per_modifier)*libc.Int32FromInt32(8)) * uint32(1)
  20032. xcb_tmp += uintptr(xcb_block_len)
  20033. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 1)
  20034. /* insert padding */
  20035. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  20036. xcb_buffer_len += xcb_block_len + xcb_pad
  20037. if uint32(0) != xcb_pad {
  20038. xcb_tmp += uintptr(xcb_pad)
  20039. xcb_pad = uint32(0)
  20040. }
  20041. xcb_block_len = uint32(0)
  20042. return libc.Int32FromUint32(xcb_buffer_len)
  20043. }
  20044. func Xxcb_get_modifier_mapping(tls *libc.TLS, c uintptr) (r Txcb_get_modifier_mapping_cookie_t) {
  20045. bp := tls.Alloc(48)
  20046. defer tls.Free(48)
  20047. var xcb_ret Txcb_get_modifier_mapping_cookie_t
  20048. var _ /* xcb_out at bp+32 */ Txcb_get_modifier_mapping_request_t
  20049. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20050. _ = xcb_ret
  20051. (*(*Txcb_get_modifier_mapping_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  20052. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20053. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  20054. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20055. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20056. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req248)))
  20057. return xcb_ret
  20058. }
  20059. var _xcb_req248 = Txcb_protocol_request_t{
  20060. Fcount: uint32(2),
  20061. Fopcode: uint8(m_XCB_GET_MODIFIER_MAPPING),
  20062. }
  20063. func Xxcb_get_modifier_mapping_unchecked(tls *libc.TLS, c uintptr) (r Txcb_get_modifier_mapping_cookie_t) {
  20064. bp := tls.Alloc(48)
  20065. defer tls.Free(48)
  20066. var xcb_ret Txcb_get_modifier_mapping_cookie_t
  20067. var _ /* xcb_out at bp+32 */ Txcb_get_modifier_mapping_request_t
  20068. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20069. _ = xcb_ret
  20070. (*(*Txcb_get_modifier_mapping_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  20071. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20072. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  20073. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20074. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20075. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req249)))
  20076. return xcb_ret
  20077. }
  20078. var _xcb_req249 = Txcb_protocol_request_t{
  20079. Fcount: uint32(2),
  20080. Fopcode: uint8(m_XCB_GET_MODIFIER_MAPPING),
  20081. }
  20082. func Xxcb_get_modifier_mapping_keycodes(tls *libc.TLS, R uintptr) (r uintptr) {
  20083. return R + libc.UintptrFromInt32(1)*32
  20084. }
  20085. func Xxcb_get_modifier_mapping_keycodes_length(tls *libc.TLS, R uintptr) (r int32) {
  20086. return libc.Int32FromUint8((*Txcb_get_modifier_mapping_reply_t)(unsafe.Pointer(R)).Fkeycodes_per_modifier) * int32(8)
  20087. }
  20088. func Xxcb_get_modifier_mapping_keycodes_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  20089. var i Txcb_generic_iterator_t
  20090. _ = i
  20091. 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))
  20092. i.Frem = 0
  20093. i.Findex = int32(i.Fdata) - int32(R)
  20094. return i
  20095. }
  20096. func Xxcb_get_modifier_mapping_reply(tls *libc.TLS, c uintptr, cookie Txcb_get_modifier_mapping_cookie_t, e uintptr) (r uintptr) {
  20097. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20098. }
  20099. func Xxcb_no_operation_checked(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  20100. bp := tls.Alloc(48)
  20101. defer tls.Free(48)
  20102. var xcb_ret Txcb_void_cookie_t
  20103. var _ /* xcb_out at bp+32 */ Txcb_no_operation_request_t
  20104. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20105. _ = xcb_ret
  20106. (*(*Txcb_no_operation_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  20107. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20108. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  20109. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20110. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20111. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req250)))
  20112. return xcb_ret
  20113. }
  20114. var _xcb_req250 = Txcb_protocol_request_t{
  20115. Fcount: uint32(2),
  20116. Fopcode: uint8(m_XCB_NO_OPERATION),
  20117. Fisvoid: uint8(1),
  20118. }
  20119. func Xxcb_no_operation(tls *libc.TLS, c uintptr) (r Txcb_void_cookie_t) {
  20120. bp := tls.Alloc(48)
  20121. defer tls.Free(48)
  20122. var xcb_ret Txcb_void_cookie_t
  20123. var _ /* xcb_out at bp+32 */ Txcb_no_operation_request_t
  20124. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20125. _ = xcb_ret
  20126. (*(*Txcb_no_operation_request_t)(unsafe.Pointer(bp + 32))).Fpad0 = uint8(0)
  20127. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20128. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  20129. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20130. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20131. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req251)))
  20132. return xcb_ret
  20133. }
  20134. var _xcb_req251 = Txcb_protocol_request_t{
  20135. Fcount: uint32(2),
  20136. Fopcode: uint8(m_XCB_NO_OPERATION),
  20137. Fisvoid: uint8(1),
  20138. }
  20139. func Xxcb_big_requests_enable(tls *libc.TLS, c uintptr) (r Txcb_big_requests_enable_cookie_t) {
  20140. bp := tls.Alloc(48)
  20141. defer tls.Free(48)
  20142. var xcb_ret Txcb_big_requests_enable_cookie_t
  20143. var _ /* xcb_out at bp+32 */ Txcb_big_requests_enable_request_t
  20144. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20145. _ = xcb_ret
  20146. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20147. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  20148. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20149. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20150. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req252)))
  20151. return xcb_ret
  20152. }
  20153. var _xcb_req252 = Txcb_protocol_request_t{
  20154. Fcount: uint32(2),
  20155. Fext: uintptr(unsafe.Pointer(&Xxcb_big_requests_id)),
  20156. }
  20157. func Xxcb_big_requests_enable_unchecked(tls *libc.TLS, c uintptr) (r Txcb_big_requests_enable_cookie_t) {
  20158. bp := tls.Alloc(48)
  20159. defer tls.Free(48)
  20160. var xcb_ret Txcb_big_requests_enable_cookie_t
  20161. var _ /* xcb_out at bp+32 */ Txcb_big_requests_enable_request_t
  20162. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20163. _ = xcb_ret
  20164. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20165. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  20166. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20167. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20168. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req253)))
  20169. return xcb_ret
  20170. }
  20171. var _xcb_req253 = Txcb_protocol_request_t{
  20172. Fcount: uint32(2),
  20173. Fext: uintptr(unsafe.Pointer(&Xxcb_big_requests_id)),
  20174. }
  20175. func Xxcb_big_requests_enable_reply(tls *libc.TLS, c uintptr, cookie Txcb_big_requests_enable_cookie_t, e uintptr) (r uintptr) {
  20176. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20177. }
  20178. 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) {
  20179. bp := tls.Alloc(48)
  20180. defer tls.Free(48)
  20181. var xcb_ret Txcb_xc_misc_get_version_cookie_t
  20182. var _ /* xcb_out at bp+32 */ Txcb_xc_misc_get_version_request_t
  20183. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20184. _ = xcb_ret
  20185. (*(*Txcb_xc_misc_get_version_request_t)(unsafe.Pointer(bp + 32))).Fclient_major_version = client_major_version
  20186. (*(*Txcb_xc_misc_get_version_request_t)(unsafe.Pointer(bp + 32))).Fclient_minor_version = client_minor_version
  20187. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20188. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  20189. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20190. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20191. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req254)))
  20192. return xcb_ret
  20193. }
  20194. var _xcb_req254 = Txcb_protocol_request_t{
  20195. Fcount: uint32(2),
  20196. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  20197. }
  20198. 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) {
  20199. bp := tls.Alloc(48)
  20200. defer tls.Free(48)
  20201. var xcb_ret Txcb_xc_misc_get_version_cookie_t
  20202. var _ /* xcb_out at bp+32 */ Txcb_xc_misc_get_version_request_t
  20203. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20204. _ = xcb_ret
  20205. (*(*Txcb_xc_misc_get_version_request_t)(unsafe.Pointer(bp + 32))).Fclient_major_version = client_major_version
  20206. (*(*Txcb_xc_misc_get_version_request_t)(unsafe.Pointer(bp + 32))).Fclient_minor_version = client_minor_version
  20207. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20208. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  20209. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20210. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20211. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req255)))
  20212. return xcb_ret
  20213. }
  20214. var _xcb_req255 = Txcb_protocol_request_t{
  20215. Fcount: uint32(2),
  20216. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  20217. }
  20218. func Xxcb_xc_misc_get_version_reply(tls *libc.TLS, c uintptr, cookie Txcb_xc_misc_get_version_cookie_t, e uintptr) (r uintptr) {
  20219. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20220. }
  20221. func Xxcb_xc_misc_get_xid_range(tls *libc.TLS, c uintptr) (r Txcb_xc_misc_get_xid_range_cookie_t) {
  20222. bp := tls.Alloc(48)
  20223. defer tls.Free(48)
  20224. var xcb_ret Txcb_xc_misc_get_xid_range_cookie_t
  20225. var _ /* xcb_out at bp+32 */ Txcb_xc_misc_get_xid_range_request_t
  20226. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20227. _ = xcb_ret
  20228. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20229. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  20230. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20231. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20232. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req256)))
  20233. return xcb_ret
  20234. }
  20235. var _xcb_req256 = Txcb_protocol_request_t{
  20236. Fcount: uint32(2),
  20237. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  20238. Fopcode: uint8(m_XCB_XC_MISC_GET_XID_RANGE),
  20239. }
  20240. func Xxcb_xc_misc_get_xid_range_unchecked(tls *libc.TLS, c uintptr) (r Txcb_xc_misc_get_xid_range_cookie_t) {
  20241. bp := tls.Alloc(48)
  20242. defer tls.Free(48)
  20243. var xcb_ret Txcb_xc_misc_get_xid_range_cookie_t
  20244. var _ /* xcb_out at bp+32 */ Txcb_xc_misc_get_xid_range_request_t
  20245. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20246. _ = xcb_ret
  20247. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20248. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(4)
  20249. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20250. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20251. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req257)))
  20252. return xcb_ret
  20253. }
  20254. var _xcb_req257 = Txcb_protocol_request_t{
  20255. Fcount: uint32(2),
  20256. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  20257. Fopcode: uint8(m_XCB_XC_MISC_GET_XID_RANGE),
  20258. }
  20259. 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) {
  20260. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20261. }
  20262. func Xxcb_xc_misc_get_xid_list_sizeof(tls *libc.TLS, _buffer uintptr) (r int32) {
  20263. var _aux, xcb_tmp uintptr
  20264. var xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad uint32
  20265. _, _, _, _, _, _ = _aux, xcb_align_to, xcb_block_len, xcb_buffer_len, xcb_pad, xcb_tmp
  20266. xcb_tmp = _buffer
  20267. _aux = _buffer
  20268. xcb_buffer_len = uint32(0)
  20269. xcb_block_len = uint32(0)
  20270. xcb_pad = uint32(0)
  20271. xcb_align_to = uint32(0)
  20272. xcb_block_len += uint32(32)
  20273. xcb_tmp += uintptr(xcb_block_len)
  20274. xcb_buffer_len += xcb_block_len
  20275. xcb_block_len = uint32(0)
  20276. /* ids */
  20277. xcb_block_len += (*Txcb_xc_misc_get_xid_list_reply_t)(unsafe.Pointer(_aux)).Fids_len * uint32(4)
  20278. xcb_tmp += uintptr(xcb_block_len)
  20279. xcb_align_to = uint32(libc.UintptrFromInt32(0) + 4)
  20280. /* insert padding */
  20281. xcb_pad = -xcb_block_len & (xcb_align_to - uint32(1))
  20282. xcb_buffer_len += xcb_block_len + xcb_pad
  20283. if uint32(0) != xcb_pad {
  20284. xcb_tmp += uintptr(xcb_pad)
  20285. xcb_pad = uint32(0)
  20286. }
  20287. xcb_block_len = uint32(0)
  20288. return libc.Int32FromUint32(xcb_buffer_len)
  20289. }
  20290. func Xxcb_xc_misc_get_xid_list(tls *libc.TLS, c uintptr, count Tuint32_t) (r Txcb_xc_misc_get_xid_list_cookie_t) {
  20291. bp := tls.Alloc(48)
  20292. defer tls.Free(48)
  20293. var xcb_ret Txcb_xc_misc_get_xid_list_cookie_t
  20294. var _ /* xcb_out at bp+32 */ Txcb_xc_misc_get_xid_list_request_t
  20295. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20296. _ = xcb_ret
  20297. (*(*Txcb_xc_misc_get_xid_list_request_t)(unsafe.Pointer(bp + 32))).Fcount = count
  20298. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20299. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  20300. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20301. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20302. xcb_ret.Fsequence = Xxcb_send_request(tls, c, int32(_XCB_REQUEST_CHECKED), bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req258)))
  20303. return xcb_ret
  20304. }
  20305. var _xcb_req258 = Txcb_protocol_request_t{
  20306. Fcount: uint32(2),
  20307. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  20308. Fopcode: uint8(m_XCB_XC_MISC_GET_XID_LIST),
  20309. }
  20310. 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) {
  20311. bp := tls.Alloc(48)
  20312. defer tls.Free(48)
  20313. var xcb_ret Txcb_xc_misc_get_xid_list_cookie_t
  20314. var _ /* xcb_out at bp+32 */ Txcb_xc_misc_get_xid_list_request_t
  20315. var _ /* xcb_parts at bp+0 */ [4]Tiovec
  20316. _ = xcb_ret
  20317. (*(*Txcb_xc_misc_get_xid_list_request_t)(unsafe.Pointer(bp + 32))).Fcount = count
  20318. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_base = bp + 32
  20319. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len = uint32(8)
  20320. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_base = uintptr(0)
  20321. (*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(3)].Fiov_len = -(*(*[4]Tiovec)(unsafe.Pointer(bp)))[int32(2)].Fiov_len & uint32(3)
  20322. xcb_ret.Fsequence = Xxcb_send_request(tls, c, 0, bp+uintptr(2)*8, uintptr(unsafe.Pointer(&_xcb_req259)))
  20323. return xcb_ret
  20324. }
  20325. var _xcb_req259 = Txcb_protocol_request_t{
  20326. Fcount: uint32(2),
  20327. Fext: uintptr(unsafe.Pointer(&Xxcb_xc_misc_id)),
  20328. Fopcode: uint8(m_XCB_XC_MISC_GET_XID_LIST),
  20329. }
  20330. func Xxcb_xc_misc_get_xid_list_ids(tls *libc.TLS, R uintptr) (r uintptr) {
  20331. return R + libc.UintptrFromInt32(1)*32
  20332. }
  20333. func Xxcb_xc_misc_get_xid_list_ids_length(tls *libc.TLS, R uintptr) (r int32) {
  20334. return libc.Int32FromUint32((*Txcb_xc_misc_get_xid_list_reply_t)(unsafe.Pointer(R)).Fids_len)
  20335. }
  20336. func Xxcb_xc_misc_get_xid_list_ids_end(tls *libc.TLS, R uintptr) (r Txcb_generic_iterator_t) {
  20337. var i Txcb_generic_iterator_t
  20338. _ = i
  20339. i.Fdata = R + libc.UintptrFromInt32(1)*32 + uintptr((*Txcb_xc_misc_get_xid_list_reply_t)(unsafe.Pointer(R)).Fids_len)*4
  20340. i.Frem = 0
  20341. i.Findex = int32(i.Fdata) - int32(R)
  20342. return i
  20343. }
  20344. 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) {
  20345. return Xxcb_wait_for_reply(tls, c, cookie.Fsequence, e)
  20346. }
  20347. func __ccgo_fp(f interface{}) uintptr {
  20348. type iface [2]uintptr
  20349. return (*iface)(unsafe.Pointer(&f))[1]
  20350. }
  20351. /**
  20352. * @}
  20353. */
  20354. var Xxcb_big_requests_id = Txcb_extension_t{
  20355. Fname: __ccgo_ts + 93,
  20356. }
  20357. /**
  20358. * @}
  20359. */
  20360. var Xxcb_xc_misc_id = Txcb_extension_t{
  20361. Fname: __ccgo_ts + 106,
  20362. }
  20363. var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data
  20364. var __ccgo_ts1 = "GLX\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"