xproto.h 377 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696
  1. /*
  2. * This file generated automatically from xproto.xml by c_client.py.
  3. * Edit at your peril.
  4. */
  5. /**
  6. * @defgroup XCB__API XCB API
  7. * @brief XCB Protocol Implementation.
  8. * @{
  9. **/
  10. #ifndef __XPROTO_H
  11. #define __XPROTO_H
  12. #include "xcb.h"
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /**
  17. * @brief xcb_char2b_t
  18. **/
  19. typedef struct xcb_char2b_t {
  20. uint8_t byte1;
  21. uint8_t byte2;
  22. } xcb_char2b_t;
  23. /**
  24. * @brief xcb_char2b_iterator_t
  25. **/
  26. typedef struct xcb_char2b_iterator_t {
  27. xcb_char2b_t *data;
  28. int rem;
  29. int index;
  30. } xcb_char2b_iterator_t;
  31. typedef uint32_t xcb_window_t;
  32. /**
  33. * @brief xcb_window_iterator_t
  34. **/
  35. typedef struct xcb_window_iterator_t {
  36. xcb_window_t *data;
  37. int rem;
  38. int index;
  39. } xcb_window_iterator_t;
  40. typedef uint32_t xcb_pixmap_t;
  41. /**
  42. * @brief xcb_pixmap_iterator_t
  43. **/
  44. typedef struct xcb_pixmap_iterator_t {
  45. xcb_pixmap_t *data;
  46. int rem;
  47. int index;
  48. } xcb_pixmap_iterator_t;
  49. typedef uint32_t xcb_cursor_t;
  50. /**
  51. * @brief xcb_cursor_iterator_t
  52. **/
  53. typedef struct xcb_cursor_iterator_t {
  54. xcb_cursor_t *data;
  55. int rem;
  56. int index;
  57. } xcb_cursor_iterator_t;
  58. typedef uint32_t xcb_font_t;
  59. /**
  60. * @brief xcb_font_iterator_t
  61. **/
  62. typedef struct xcb_font_iterator_t {
  63. xcb_font_t *data;
  64. int rem;
  65. int index;
  66. } xcb_font_iterator_t;
  67. typedef uint32_t xcb_gcontext_t;
  68. /**
  69. * @brief xcb_gcontext_iterator_t
  70. **/
  71. typedef struct xcb_gcontext_iterator_t {
  72. xcb_gcontext_t *data;
  73. int rem;
  74. int index;
  75. } xcb_gcontext_iterator_t;
  76. typedef uint32_t xcb_colormap_t;
  77. /**
  78. * @brief xcb_colormap_iterator_t
  79. **/
  80. typedef struct xcb_colormap_iterator_t {
  81. xcb_colormap_t *data;
  82. int rem;
  83. int index;
  84. } xcb_colormap_iterator_t;
  85. typedef uint32_t xcb_atom_t;
  86. /**
  87. * @brief xcb_atom_iterator_t
  88. **/
  89. typedef struct xcb_atom_iterator_t {
  90. xcb_atom_t *data;
  91. int rem;
  92. int index;
  93. } xcb_atom_iterator_t;
  94. typedef uint32_t xcb_drawable_t;
  95. /**
  96. * @brief xcb_drawable_iterator_t
  97. **/
  98. typedef struct xcb_drawable_iterator_t {
  99. xcb_drawable_t *data;
  100. int rem;
  101. int index;
  102. } xcb_drawable_iterator_t;
  103. typedef uint32_t xcb_fontable_t;
  104. /**
  105. * @brief xcb_fontable_iterator_t
  106. **/
  107. typedef struct xcb_fontable_iterator_t {
  108. xcb_fontable_t *data;
  109. int rem;
  110. int index;
  111. } xcb_fontable_iterator_t;
  112. typedef uint32_t xcb_bool32_t;
  113. /**
  114. * @brief xcb_bool32_iterator_t
  115. **/
  116. typedef struct xcb_bool32_iterator_t {
  117. xcb_bool32_t *data;
  118. int rem;
  119. int index;
  120. } xcb_bool32_iterator_t;
  121. typedef uint32_t xcb_visualid_t;
  122. /**
  123. * @brief xcb_visualid_iterator_t
  124. **/
  125. typedef struct xcb_visualid_iterator_t {
  126. xcb_visualid_t *data;
  127. int rem;
  128. int index;
  129. } xcb_visualid_iterator_t;
  130. typedef uint32_t xcb_timestamp_t;
  131. /**
  132. * @brief xcb_timestamp_iterator_t
  133. **/
  134. typedef struct xcb_timestamp_iterator_t {
  135. xcb_timestamp_t *data;
  136. int rem;
  137. int index;
  138. } xcb_timestamp_iterator_t;
  139. typedef uint32_t xcb_keysym_t;
  140. /**
  141. * @brief xcb_keysym_iterator_t
  142. **/
  143. typedef struct xcb_keysym_iterator_t {
  144. xcb_keysym_t *data;
  145. int rem;
  146. int index;
  147. } xcb_keysym_iterator_t;
  148. typedef uint8_t xcb_keycode_t;
  149. /**
  150. * @brief xcb_keycode_iterator_t
  151. **/
  152. typedef struct xcb_keycode_iterator_t {
  153. xcb_keycode_t *data;
  154. int rem;
  155. int index;
  156. } xcb_keycode_iterator_t;
  157. typedef uint32_t xcb_keycode32_t;
  158. /**
  159. * @brief xcb_keycode32_iterator_t
  160. **/
  161. typedef struct xcb_keycode32_iterator_t {
  162. xcb_keycode32_t *data;
  163. int rem;
  164. int index;
  165. } xcb_keycode32_iterator_t;
  166. typedef uint8_t xcb_button_t;
  167. /**
  168. * @brief xcb_button_iterator_t
  169. **/
  170. typedef struct xcb_button_iterator_t {
  171. xcb_button_t *data;
  172. int rem;
  173. int index;
  174. } xcb_button_iterator_t;
  175. /**
  176. * @brief xcb_point_t
  177. **/
  178. typedef struct xcb_point_t {
  179. int16_t x;
  180. int16_t y;
  181. } xcb_point_t;
  182. /**
  183. * @brief xcb_point_iterator_t
  184. **/
  185. typedef struct xcb_point_iterator_t {
  186. xcb_point_t *data;
  187. int rem;
  188. int index;
  189. } xcb_point_iterator_t;
  190. /**
  191. * @brief xcb_rectangle_t
  192. **/
  193. typedef struct xcb_rectangle_t {
  194. int16_t x;
  195. int16_t y;
  196. uint16_t width;
  197. uint16_t height;
  198. } xcb_rectangle_t;
  199. /**
  200. * @brief xcb_rectangle_iterator_t
  201. **/
  202. typedef struct xcb_rectangle_iterator_t {
  203. xcb_rectangle_t *data;
  204. int rem;
  205. int index;
  206. } xcb_rectangle_iterator_t;
  207. /**
  208. * @brief xcb_arc_t
  209. **/
  210. typedef struct xcb_arc_t {
  211. int16_t x;
  212. int16_t y;
  213. uint16_t width;
  214. uint16_t height;
  215. int16_t angle1;
  216. int16_t angle2;
  217. } xcb_arc_t;
  218. /**
  219. * @brief xcb_arc_iterator_t
  220. **/
  221. typedef struct xcb_arc_iterator_t {
  222. xcb_arc_t *data;
  223. int rem;
  224. int index;
  225. } xcb_arc_iterator_t;
  226. /**
  227. * @brief xcb_format_t
  228. **/
  229. typedef struct xcb_format_t {
  230. uint8_t depth;
  231. uint8_t bits_per_pixel;
  232. uint8_t scanline_pad;
  233. uint8_t pad0[5];
  234. } xcb_format_t;
  235. /**
  236. * @brief xcb_format_iterator_t
  237. **/
  238. typedef struct xcb_format_iterator_t {
  239. xcb_format_t *data;
  240. int rem;
  241. int index;
  242. } xcb_format_iterator_t;
  243. typedef enum xcb_visual_class_t {
  244. XCB_VISUAL_CLASS_STATIC_GRAY = 0,
  245. XCB_VISUAL_CLASS_GRAY_SCALE = 1,
  246. XCB_VISUAL_CLASS_STATIC_COLOR = 2,
  247. XCB_VISUAL_CLASS_PSEUDO_COLOR = 3,
  248. XCB_VISUAL_CLASS_TRUE_COLOR = 4,
  249. XCB_VISUAL_CLASS_DIRECT_COLOR = 5
  250. } xcb_visual_class_t;
  251. /**
  252. * @brief xcb_visualtype_t
  253. **/
  254. typedef struct xcb_visualtype_t {
  255. xcb_visualid_t visual_id;
  256. uint8_t _class;
  257. uint8_t bits_per_rgb_value;
  258. uint16_t colormap_entries;
  259. uint32_t red_mask;
  260. uint32_t green_mask;
  261. uint32_t blue_mask;
  262. uint8_t pad0[4];
  263. } xcb_visualtype_t;
  264. /**
  265. * @brief xcb_visualtype_iterator_t
  266. **/
  267. typedef struct xcb_visualtype_iterator_t {
  268. xcb_visualtype_t *data;
  269. int rem;
  270. int index;
  271. } xcb_visualtype_iterator_t;
  272. /**
  273. * @brief xcb_depth_t
  274. **/
  275. typedef struct xcb_depth_t {
  276. uint8_t depth;
  277. uint8_t pad0;
  278. uint16_t visuals_len;
  279. uint8_t pad1[4];
  280. } xcb_depth_t;
  281. /**
  282. * @brief xcb_depth_iterator_t
  283. **/
  284. typedef struct xcb_depth_iterator_t {
  285. xcb_depth_t *data;
  286. int rem;
  287. int index;
  288. } xcb_depth_iterator_t;
  289. typedef enum xcb_event_mask_t {
  290. XCB_EVENT_MASK_NO_EVENT = 0,
  291. XCB_EVENT_MASK_KEY_PRESS = 1,
  292. XCB_EVENT_MASK_KEY_RELEASE = 2,
  293. XCB_EVENT_MASK_BUTTON_PRESS = 4,
  294. XCB_EVENT_MASK_BUTTON_RELEASE = 8,
  295. XCB_EVENT_MASK_ENTER_WINDOW = 16,
  296. XCB_EVENT_MASK_LEAVE_WINDOW = 32,
  297. XCB_EVENT_MASK_POINTER_MOTION = 64,
  298. XCB_EVENT_MASK_POINTER_MOTION_HINT = 128,
  299. XCB_EVENT_MASK_BUTTON_1_MOTION = 256,
  300. XCB_EVENT_MASK_BUTTON_2_MOTION = 512,
  301. XCB_EVENT_MASK_BUTTON_3_MOTION = 1024,
  302. XCB_EVENT_MASK_BUTTON_4_MOTION = 2048,
  303. XCB_EVENT_MASK_BUTTON_5_MOTION = 4096,
  304. XCB_EVENT_MASK_BUTTON_MOTION = 8192,
  305. XCB_EVENT_MASK_KEYMAP_STATE = 16384,
  306. XCB_EVENT_MASK_EXPOSURE = 32768,
  307. XCB_EVENT_MASK_VISIBILITY_CHANGE = 65536,
  308. XCB_EVENT_MASK_STRUCTURE_NOTIFY = 131072,
  309. XCB_EVENT_MASK_RESIZE_REDIRECT = 262144,
  310. XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY = 524288,
  311. XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT = 1048576,
  312. XCB_EVENT_MASK_FOCUS_CHANGE = 2097152,
  313. XCB_EVENT_MASK_PROPERTY_CHANGE = 4194304,
  314. XCB_EVENT_MASK_COLOR_MAP_CHANGE = 8388608,
  315. XCB_EVENT_MASK_OWNER_GRAB_BUTTON = 16777216
  316. } xcb_event_mask_t;
  317. typedef enum xcb_backing_store_t {
  318. XCB_BACKING_STORE_NOT_USEFUL = 0,
  319. XCB_BACKING_STORE_WHEN_MAPPED = 1,
  320. XCB_BACKING_STORE_ALWAYS = 2
  321. } xcb_backing_store_t;
  322. /**
  323. * @brief xcb_screen_t
  324. **/
  325. typedef struct xcb_screen_t {
  326. xcb_window_t root;
  327. xcb_colormap_t default_colormap;
  328. uint32_t white_pixel;
  329. uint32_t black_pixel;
  330. uint32_t current_input_masks;
  331. uint16_t width_in_pixels;
  332. uint16_t height_in_pixels;
  333. uint16_t width_in_millimeters;
  334. uint16_t height_in_millimeters;
  335. uint16_t min_installed_maps;
  336. uint16_t max_installed_maps;
  337. xcb_visualid_t root_visual;
  338. uint8_t backing_stores;
  339. uint8_t save_unders;
  340. uint8_t root_depth;
  341. uint8_t allowed_depths_len;
  342. } xcb_screen_t;
  343. /**
  344. * @brief xcb_screen_iterator_t
  345. **/
  346. typedef struct xcb_screen_iterator_t {
  347. xcb_screen_t *data;
  348. int rem;
  349. int index;
  350. } xcb_screen_iterator_t;
  351. /**
  352. * @brief xcb_setup_request_t
  353. **/
  354. typedef struct xcb_setup_request_t {
  355. uint8_t byte_order;
  356. uint8_t pad0;
  357. uint16_t protocol_major_version;
  358. uint16_t protocol_minor_version;
  359. uint16_t authorization_protocol_name_len;
  360. uint16_t authorization_protocol_data_len;
  361. uint8_t pad1[2];
  362. } xcb_setup_request_t;
  363. /**
  364. * @brief xcb_setup_request_iterator_t
  365. **/
  366. typedef struct xcb_setup_request_iterator_t {
  367. xcb_setup_request_t *data;
  368. int rem;
  369. int index;
  370. } xcb_setup_request_iterator_t;
  371. /**
  372. * @brief xcb_setup_failed_t
  373. **/
  374. typedef struct xcb_setup_failed_t {
  375. uint8_t status;
  376. uint8_t reason_len;
  377. uint16_t protocol_major_version;
  378. uint16_t protocol_minor_version;
  379. uint16_t length;
  380. } xcb_setup_failed_t;
  381. /**
  382. * @brief xcb_setup_failed_iterator_t
  383. **/
  384. typedef struct xcb_setup_failed_iterator_t {
  385. xcb_setup_failed_t *data;
  386. int rem;
  387. int index;
  388. } xcb_setup_failed_iterator_t;
  389. /**
  390. * @brief xcb_setup_authenticate_t
  391. **/
  392. typedef struct xcb_setup_authenticate_t {
  393. uint8_t status;
  394. uint8_t pad0[5];
  395. uint16_t length;
  396. } xcb_setup_authenticate_t;
  397. /**
  398. * @brief xcb_setup_authenticate_iterator_t
  399. **/
  400. typedef struct xcb_setup_authenticate_iterator_t {
  401. xcb_setup_authenticate_t *data;
  402. int rem;
  403. int index;
  404. } xcb_setup_authenticate_iterator_t;
  405. typedef enum xcb_image_order_t {
  406. XCB_IMAGE_ORDER_LSB_FIRST = 0,
  407. XCB_IMAGE_ORDER_MSB_FIRST = 1
  408. } xcb_image_order_t;
  409. /**
  410. * @brief xcb_setup_t
  411. **/
  412. typedef struct xcb_setup_t {
  413. uint8_t status;
  414. uint8_t pad0;
  415. uint16_t protocol_major_version;
  416. uint16_t protocol_minor_version;
  417. uint16_t length;
  418. uint32_t release_number;
  419. uint32_t resource_id_base;
  420. uint32_t resource_id_mask;
  421. uint32_t motion_buffer_size;
  422. uint16_t vendor_len;
  423. uint16_t maximum_request_length;
  424. uint8_t roots_len;
  425. uint8_t pixmap_formats_len;
  426. uint8_t image_byte_order;
  427. uint8_t bitmap_format_bit_order;
  428. uint8_t bitmap_format_scanline_unit;
  429. uint8_t bitmap_format_scanline_pad;
  430. xcb_keycode_t min_keycode;
  431. xcb_keycode_t max_keycode;
  432. uint8_t pad1[4];
  433. } xcb_setup_t;
  434. /**
  435. * @brief xcb_setup_iterator_t
  436. **/
  437. typedef struct xcb_setup_iterator_t {
  438. xcb_setup_t *data;
  439. int rem;
  440. int index;
  441. } xcb_setup_iterator_t;
  442. typedef enum xcb_mod_mask_t {
  443. XCB_MOD_MASK_SHIFT = 1,
  444. XCB_MOD_MASK_LOCK = 2,
  445. XCB_MOD_MASK_CONTROL = 4,
  446. XCB_MOD_MASK_1 = 8,
  447. XCB_MOD_MASK_2 = 16,
  448. XCB_MOD_MASK_3 = 32,
  449. XCB_MOD_MASK_4 = 64,
  450. XCB_MOD_MASK_5 = 128,
  451. XCB_MOD_MASK_ANY = 32768
  452. } xcb_mod_mask_t;
  453. typedef enum xcb_key_but_mask_t {
  454. XCB_KEY_BUT_MASK_SHIFT = 1,
  455. XCB_KEY_BUT_MASK_LOCK = 2,
  456. XCB_KEY_BUT_MASK_CONTROL = 4,
  457. XCB_KEY_BUT_MASK_MOD_1 = 8,
  458. XCB_KEY_BUT_MASK_MOD_2 = 16,
  459. XCB_KEY_BUT_MASK_MOD_3 = 32,
  460. XCB_KEY_BUT_MASK_MOD_4 = 64,
  461. XCB_KEY_BUT_MASK_MOD_5 = 128,
  462. XCB_KEY_BUT_MASK_BUTTON_1 = 256,
  463. XCB_KEY_BUT_MASK_BUTTON_2 = 512,
  464. XCB_KEY_BUT_MASK_BUTTON_3 = 1024,
  465. XCB_KEY_BUT_MASK_BUTTON_4 = 2048,
  466. XCB_KEY_BUT_MASK_BUTTON_5 = 4096
  467. } xcb_key_but_mask_t;
  468. typedef enum xcb_window_enum_t {
  469. XCB_WINDOW_NONE = 0
  470. } xcb_window_enum_t;
  471. /** Opcode for xcb_key_press. */
  472. #define XCB_KEY_PRESS 2
  473. /**
  474. * @brief xcb_key_press_event_t
  475. **/
  476. typedef struct xcb_key_press_event_t {
  477. uint8_t response_type;
  478. xcb_keycode_t detail;
  479. uint16_t sequence;
  480. xcb_timestamp_t time;
  481. xcb_window_t root;
  482. xcb_window_t event;
  483. xcb_window_t child;
  484. int16_t root_x;
  485. int16_t root_y;
  486. int16_t event_x;
  487. int16_t event_y;
  488. uint16_t state;
  489. uint8_t same_screen;
  490. uint8_t pad0;
  491. } xcb_key_press_event_t;
  492. /** Opcode for xcb_key_release. */
  493. #define XCB_KEY_RELEASE 3
  494. typedef xcb_key_press_event_t xcb_key_release_event_t;
  495. typedef enum xcb_button_mask_t {
  496. XCB_BUTTON_MASK_1 = 256,
  497. XCB_BUTTON_MASK_2 = 512,
  498. XCB_BUTTON_MASK_3 = 1024,
  499. XCB_BUTTON_MASK_4 = 2048,
  500. XCB_BUTTON_MASK_5 = 4096,
  501. XCB_BUTTON_MASK_ANY = 32768
  502. } xcb_button_mask_t;
  503. /** Opcode for xcb_button_press. */
  504. #define XCB_BUTTON_PRESS 4
  505. /**
  506. * @brief xcb_button_press_event_t
  507. **/
  508. typedef struct xcb_button_press_event_t {
  509. uint8_t response_type;
  510. xcb_button_t detail;
  511. uint16_t sequence;
  512. xcb_timestamp_t time;
  513. xcb_window_t root;
  514. xcb_window_t event;
  515. xcb_window_t child;
  516. int16_t root_x;
  517. int16_t root_y;
  518. int16_t event_x;
  519. int16_t event_y;
  520. uint16_t state;
  521. uint8_t same_screen;
  522. uint8_t pad0;
  523. } xcb_button_press_event_t;
  524. /** Opcode for xcb_button_release. */
  525. #define XCB_BUTTON_RELEASE 5
  526. typedef xcb_button_press_event_t xcb_button_release_event_t;
  527. typedef enum xcb_motion_t {
  528. XCB_MOTION_NORMAL = 0,
  529. XCB_MOTION_HINT = 1
  530. } xcb_motion_t;
  531. /** Opcode for xcb_motion_notify. */
  532. #define XCB_MOTION_NOTIFY 6
  533. /**
  534. * @brief xcb_motion_notify_event_t
  535. **/
  536. typedef struct xcb_motion_notify_event_t {
  537. uint8_t response_type;
  538. uint8_t detail;
  539. uint16_t sequence;
  540. xcb_timestamp_t time;
  541. xcb_window_t root;
  542. xcb_window_t event;
  543. xcb_window_t child;
  544. int16_t root_x;
  545. int16_t root_y;
  546. int16_t event_x;
  547. int16_t event_y;
  548. uint16_t state;
  549. uint8_t same_screen;
  550. uint8_t pad0;
  551. } xcb_motion_notify_event_t;
  552. typedef enum xcb_notify_detail_t {
  553. XCB_NOTIFY_DETAIL_ANCESTOR = 0,
  554. XCB_NOTIFY_DETAIL_VIRTUAL = 1,
  555. XCB_NOTIFY_DETAIL_INFERIOR = 2,
  556. XCB_NOTIFY_DETAIL_NONLINEAR = 3,
  557. XCB_NOTIFY_DETAIL_NONLINEAR_VIRTUAL = 4,
  558. XCB_NOTIFY_DETAIL_POINTER = 5,
  559. XCB_NOTIFY_DETAIL_POINTER_ROOT = 6,
  560. XCB_NOTIFY_DETAIL_NONE = 7
  561. } xcb_notify_detail_t;
  562. typedef enum xcb_notify_mode_t {
  563. XCB_NOTIFY_MODE_NORMAL = 0,
  564. XCB_NOTIFY_MODE_GRAB = 1,
  565. XCB_NOTIFY_MODE_UNGRAB = 2,
  566. XCB_NOTIFY_MODE_WHILE_GRABBED = 3
  567. } xcb_notify_mode_t;
  568. /** Opcode for xcb_enter_notify. */
  569. #define XCB_ENTER_NOTIFY 7
  570. /**
  571. * @brief xcb_enter_notify_event_t
  572. **/
  573. typedef struct xcb_enter_notify_event_t {
  574. uint8_t response_type;
  575. uint8_t detail;
  576. uint16_t sequence;
  577. xcb_timestamp_t time;
  578. xcb_window_t root;
  579. xcb_window_t event;
  580. xcb_window_t child;
  581. int16_t root_x;
  582. int16_t root_y;
  583. int16_t event_x;
  584. int16_t event_y;
  585. uint16_t state;
  586. uint8_t mode;
  587. uint8_t same_screen_focus;
  588. } xcb_enter_notify_event_t;
  589. /** Opcode for xcb_leave_notify. */
  590. #define XCB_LEAVE_NOTIFY 8
  591. typedef xcb_enter_notify_event_t xcb_leave_notify_event_t;
  592. /** Opcode for xcb_focus_in. */
  593. #define XCB_FOCUS_IN 9
  594. /**
  595. * @brief xcb_focus_in_event_t
  596. **/
  597. typedef struct xcb_focus_in_event_t {
  598. uint8_t response_type;
  599. uint8_t detail;
  600. uint16_t sequence;
  601. xcb_window_t event;
  602. uint8_t mode;
  603. uint8_t pad0[3];
  604. } xcb_focus_in_event_t;
  605. /** Opcode for xcb_focus_out. */
  606. #define XCB_FOCUS_OUT 10
  607. typedef xcb_focus_in_event_t xcb_focus_out_event_t;
  608. /** Opcode for xcb_keymap_notify. */
  609. #define XCB_KEYMAP_NOTIFY 11
  610. /**
  611. * @brief xcb_keymap_notify_event_t
  612. **/
  613. typedef struct xcb_keymap_notify_event_t {
  614. uint8_t response_type;
  615. uint8_t keys[31];
  616. } xcb_keymap_notify_event_t;
  617. /** Opcode for xcb_expose. */
  618. #define XCB_EXPOSE 12
  619. /**
  620. * @brief xcb_expose_event_t
  621. **/
  622. typedef struct xcb_expose_event_t {
  623. uint8_t response_type;
  624. uint8_t pad0;
  625. uint16_t sequence;
  626. xcb_window_t window;
  627. uint16_t x;
  628. uint16_t y;
  629. uint16_t width;
  630. uint16_t height;
  631. uint16_t count;
  632. uint8_t pad1[2];
  633. } xcb_expose_event_t;
  634. /** Opcode for xcb_graphics_exposure. */
  635. #define XCB_GRAPHICS_EXPOSURE 13
  636. /**
  637. * @brief xcb_graphics_exposure_event_t
  638. **/
  639. typedef struct xcb_graphics_exposure_event_t {
  640. uint8_t response_type;
  641. uint8_t pad0;
  642. uint16_t sequence;
  643. xcb_drawable_t drawable;
  644. uint16_t x;
  645. uint16_t y;
  646. uint16_t width;
  647. uint16_t height;
  648. uint16_t minor_opcode;
  649. uint16_t count;
  650. uint8_t major_opcode;
  651. uint8_t pad1[3];
  652. } xcb_graphics_exposure_event_t;
  653. /** Opcode for xcb_no_exposure. */
  654. #define XCB_NO_EXPOSURE 14
  655. /**
  656. * @brief xcb_no_exposure_event_t
  657. **/
  658. typedef struct xcb_no_exposure_event_t {
  659. uint8_t response_type;
  660. uint8_t pad0;
  661. uint16_t sequence;
  662. xcb_drawable_t drawable;
  663. uint16_t minor_opcode;
  664. uint8_t major_opcode;
  665. uint8_t pad1;
  666. } xcb_no_exposure_event_t;
  667. typedef enum xcb_visibility_t {
  668. XCB_VISIBILITY_UNOBSCURED = 0,
  669. XCB_VISIBILITY_PARTIALLY_OBSCURED = 1,
  670. XCB_VISIBILITY_FULLY_OBSCURED = 2
  671. } xcb_visibility_t;
  672. /** Opcode for xcb_visibility_notify. */
  673. #define XCB_VISIBILITY_NOTIFY 15
  674. /**
  675. * @brief xcb_visibility_notify_event_t
  676. **/
  677. typedef struct xcb_visibility_notify_event_t {
  678. uint8_t response_type;
  679. uint8_t pad0;
  680. uint16_t sequence;
  681. xcb_window_t window;
  682. uint8_t state;
  683. uint8_t pad1[3];
  684. } xcb_visibility_notify_event_t;
  685. /** Opcode for xcb_create_notify. */
  686. #define XCB_CREATE_NOTIFY 16
  687. /**
  688. * @brief xcb_create_notify_event_t
  689. **/
  690. typedef struct xcb_create_notify_event_t {
  691. uint8_t response_type;
  692. uint8_t pad0;
  693. uint16_t sequence;
  694. xcb_window_t parent;
  695. xcb_window_t window;
  696. int16_t x;
  697. int16_t y;
  698. uint16_t width;
  699. uint16_t height;
  700. uint16_t border_width;
  701. uint8_t override_redirect;
  702. uint8_t pad1;
  703. } xcb_create_notify_event_t;
  704. /** Opcode for xcb_destroy_notify. */
  705. #define XCB_DESTROY_NOTIFY 17
  706. /**
  707. * @brief xcb_destroy_notify_event_t
  708. **/
  709. typedef struct xcb_destroy_notify_event_t {
  710. uint8_t response_type;
  711. uint8_t pad0;
  712. uint16_t sequence;
  713. xcb_window_t event;
  714. xcb_window_t window;
  715. } xcb_destroy_notify_event_t;
  716. /** Opcode for xcb_unmap_notify. */
  717. #define XCB_UNMAP_NOTIFY 18
  718. /**
  719. * @brief xcb_unmap_notify_event_t
  720. **/
  721. typedef struct xcb_unmap_notify_event_t {
  722. uint8_t response_type;
  723. uint8_t pad0;
  724. uint16_t sequence;
  725. xcb_window_t event;
  726. xcb_window_t window;
  727. uint8_t from_configure;
  728. uint8_t pad1[3];
  729. } xcb_unmap_notify_event_t;
  730. /** Opcode for xcb_map_notify. */
  731. #define XCB_MAP_NOTIFY 19
  732. /**
  733. * @brief xcb_map_notify_event_t
  734. **/
  735. typedef struct xcb_map_notify_event_t {
  736. uint8_t response_type;
  737. uint8_t pad0;
  738. uint16_t sequence;
  739. xcb_window_t event;
  740. xcb_window_t window;
  741. uint8_t override_redirect;
  742. uint8_t pad1[3];
  743. } xcb_map_notify_event_t;
  744. /** Opcode for xcb_map_request. */
  745. #define XCB_MAP_REQUEST 20
  746. /**
  747. * @brief xcb_map_request_event_t
  748. **/
  749. typedef struct xcb_map_request_event_t {
  750. uint8_t response_type;
  751. uint8_t pad0;
  752. uint16_t sequence;
  753. xcb_window_t parent;
  754. xcb_window_t window;
  755. } xcb_map_request_event_t;
  756. /** Opcode for xcb_reparent_notify. */
  757. #define XCB_REPARENT_NOTIFY 21
  758. /**
  759. * @brief xcb_reparent_notify_event_t
  760. **/
  761. typedef struct xcb_reparent_notify_event_t {
  762. uint8_t response_type;
  763. uint8_t pad0;
  764. uint16_t sequence;
  765. xcb_window_t event;
  766. xcb_window_t window;
  767. xcb_window_t parent;
  768. int16_t x;
  769. int16_t y;
  770. uint8_t override_redirect;
  771. uint8_t pad1[3];
  772. } xcb_reparent_notify_event_t;
  773. /** Opcode for xcb_configure_notify. */
  774. #define XCB_CONFIGURE_NOTIFY 22
  775. /**
  776. * @brief xcb_configure_notify_event_t
  777. **/
  778. typedef struct xcb_configure_notify_event_t {
  779. uint8_t response_type;
  780. uint8_t pad0;
  781. uint16_t sequence;
  782. xcb_window_t event;
  783. xcb_window_t window;
  784. xcb_window_t above_sibling;
  785. int16_t x;
  786. int16_t y;
  787. uint16_t width;
  788. uint16_t height;
  789. uint16_t border_width;
  790. uint8_t override_redirect;
  791. uint8_t pad1;
  792. } xcb_configure_notify_event_t;
  793. /** Opcode for xcb_configure_request. */
  794. #define XCB_CONFIGURE_REQUEST 23
  795. /**
  796. * @brief xcb_configure_request_event_t
  797. **/
  798. typedef struct xcb_configure_request_event_t {
  799. uint8_t response_type;
  800. uint8_t stack_mode;
  801. uint16_t sequence;
  802. xcb_window_t parent;
  803. xcb_window_t window;
  804. xcb_window_t sibling;
  805. int16_t x;
  806. int16_t y;
  807. uint16_t width;
  808. uint16_t height;
  809. uint16_t border_width;
  810. uint16_t value_mask;
  811. } xcb_configure_request_event_t;
  812. /** Opcode for xcb_gravity_notify. */
  813. #define XCB_GRAVITY_NOTIFY 24
  814. /**
  815. * @brief xcb_gravity_notify_event_t
  816. **/
  817. typedef struct xcb_gravity_notify_event_t {
  818. uint8_t response_type;
  819. uint8_t pad0;
  820. uint16_t sequence;
  821. xcb_window_t event;
  822. xcb_window_t window;
  823. int16_t x;
  824. int16_t y;
  825. } xcb_gravity_notify_event_t;
  826. /** Opcode for xcb_resize_request. */
  827. #define XCB_RESIZE_REQUEST 25
  828. /**
  829. * @brief xcb_resize_request_event_t
  830. **/
  831. typedef struct xcb_resize_request_event_t {
  832. uint8_t response_type;
  833. uint8_t pad0;
  834. uint16_t sequence;
  835. xcb_window_t window;
  836. uint16_t width;
  837. uint16_t height;
  838. } xcb_resize_request_event_t;
  839. typedef enum xcb_place_t {
  840. XCB_PLACE_ON_TOP = 0,
  841. /**< The window is now on top of all siblings. */
  842. XCB_PLACE_ON_BOTTOM = 1
  843. /**< The window is now below all siblings. */
  844. } xcb_place_t;
  845. /** Opcode for xcb_circulate_notify. */
  846. #define XCB_CIRCULATE_NOTIFY 26
  847. /**
  848. * @brief xcb_circulate_notify_event_t
  849. **/
  850. typedef struct xcb_circulate_notify_event_t {
  851. uint8_t response_type;
  852. uint8_t pad0;
  853. uint16_t sequence;
  854. xcb_window_t event;
  855. xcb_window_t window;
  856. uint8_t pad1[4];
  857. uint8_t place;
  858. uint8_t pad2[3];
  859. } xcb_circulate_notify_event_t;
  860. /** Opcode for xcb_circulate_request. */
  861. #define XCB_CIRCULATE_REQUEST 27
  862. typedef xcb_circulate_notify_event_t xcb_circulate_request_event_t;
  863. typedef enum xcb_property_t {
  864. XCB_PROPERTY_NEW_VALUE = 0,
  865. XCB_PROPERTY_DELETE = 1
  866. } xcb_property_t;
  867. /** Opcode for xcb_property_notify. */
  868. #define XCB_PROPERTY_NOTIFY 28
  869. /**
  870. * @brief xcb_property_notify_event_t
  871. **/
  872. typedef struct xcb_property_notify_event_t {
  873. uint8_t response_type;
  874. uint8_t pad0;
  875. uint16_t sequence;
  876. xcb_window_t window;
  877. xcb_atom_t atom;
  878. xcb_timestamp_t time;
  879. uint8_t state;
  880. uint8_t pad1[3];
  881. } xcb_property_notify_event_t;
  882. /** Opcode for xcb_selection_clear. */
  883. #define XCB_SELECTION_CLEAR 29
  884. /**
  885. * @brief xcb_selection_clear_event_t
  886. **/
  887. typedef struct xcb_selection_clear_event_t {
  888. uint8_t response_type;
  889. uint8_t pad0;
  890. uint16_t sequence;
  891. xcb_timestamp_t time;
  892. xcb_window_t owner;
  893. xcb_atom_t selection;
  894. } xcb_selection_clear_event_t;
  895. typedef enum xcb_time_t {
  896. XCB_TIME_CURRENT_TIME = 0
  897. } xcb_time_t;
  898. typedef enum xcb_atom_enum_t {
  899. XCB_ATOM_NONE = 0,
  900. XCB_ATOM_ANY = 0,
  901. XCB_ATOM_PRIMARY = 1,
  902. XCB_ATOM_SECONDARY = 2,
  903. XCB_ATOM_ARC = 3,
  904. XCB_ATOM_ATOM = 4,
  905. XCB_ATOM_BITMAP = 5,
  906. XCB_ATOM_CARDINAL = 6,
  907. XCB_ATOM_COLORMAP = 7,
  908. XCB_ATOM_CURSOR = 8,
  909. XCB_ATOM_CUT_BUFFER0 = 9,
  910. XCB_ATOM_CUT_BUFFER1 = 10,
  911. XCB_ATOM_CUT_BUFFER2 = 11,
  912. XCB_ATOM_CUT_BUFFER3 = 12,
  913. XCB_ATOM_CUT_BUFFER4 = 13,
  914. XCB_ATOM_CUT_BUFFER5 = 14,
  915. XCB_ATOM_CUT_BUFFER6 = 15,
  916. XCB_ATOM_CUT_BUFFER7 = 16,
  917. XCB_ATOM_DRAWABLE = 17,
  918. XCB_ATOM_FONT = 18,
  919. XCB_ATOM_INTEGER = 19,
  920. XCB_ATOM_PIXMAP = 20,
  921. XCB_ATOM_POINT = 21,
  922. XCB_ATOM_RECTANGLE = 22,
  923. XCB_ATOM_RESOURCE_MANAGER = 23,
  924. XCB_ATOM_RGB_COLOR_MAP = 24,
  925. XCB_ATOM_RGB_BEST_MAP = 25,
  926. XCB_ATOM_RGB_BLUE_MAP = 26,
  927. XCB_ATOM_RGB_DEFAULT_MAP = 27,
  928. XCB_ATOM_RGB_GRAY_MAP = 28,
  929. XCB_ATOM_RGB_GREEN_MAP = 29,
  930. XCB_ATOM_RGB_RED_MAP = 30,
  931. XCB_ATOM_STRING = 31,
  932. XCB_ATOM_VISUALID = 32,
  933. XCB_ATOM_WINDOW = 33,
  934. XCB_ATOM_WM_COMMAND = 34,
  935. XCB_ATOM_WM_HINTS = 35,
  936. XCB_ATOM_WM_CLIENT_MACHINE = 36,
  937. XCB_ATOM_WM_ICON_NAME = 37,
  938. XCB_ATOM_WM_ICON_SIZE = 38,
  939. XCB_ATOM_WM_NAME = 39,
  940. XCB_ATOM_WM_NORMAL_HINTS = 40,
  941. XCB_ATOM_WM_SIZE_HINTS = 41,
  942. XCB_ATOM_WM_ZOOM_HINTS = 42,
  943. XCB_ATOM_MIN_SPACE = 43,
  944. XCB_ATOM_NORM_SPACE = 44,
  945. XCB_ATOM_MAX_SPACE = 45,
  946. XCB_ATOM_END_SPACE = 46,
  947. XCB_ATOM_SUPERSCRIPT_X = 47,
  948. XCB_ATOM_SUPERSCRIPT_Y = 48,
  949. XCB_ATOM_SUBSCRIPT_X = 49,
  950. XCB_ATOM_SUBSCRIPT_Y = 50,
  951. XCB_ATOM_UNDERLINE_POSITION = 51,
  952. XCB_ATOM_UNDERLINE_THICKNESS = 52,
  953. XCB_ATOM_STRIKEOUT_ASCENT = 53,
  954. XCB_ATOM_STRIKEOUT_DESCENT = 54,
  955. XCB_ATOM_ITALIC_ANGLE = 55,
  956. XCB_ATOM_X_HEIGHT = 56,
  957. XCB_ATOM_QUAD_WIDTH = 57,
  958. XCB_ATOM_WEIGHT = 58,
  959. XCB_ATOM_POINT_SIZE = 59,
  960. XCB_ATOM_RESOLUTION = 60,
  961. XCB_ATOM_COPYRIGHT = 61,
  962. XCB_ATOM_NOTICE = 62,
  963. XCB_ATOM_FONT_NAME = 63,
  964. XCB_ATOM_FAMILY_NAME = 64,
  965. XCB_ATOM_FULL_NAME = 65,
  966. XCB_ATOM_CAP_HEIGHT = 66,
  967. XCB_ATOM_WM_CLASS = 67,
  968. XCB_ATOM_WM_TRANSIENT_FOR = 68
  969. } xcb_atom_enum_t;
  970. /** Opcode for xcb_selection_request. */
  971. #define XCB_SELECTION_REQUEST 30
  972. /**
  973. * @brief xcb_selection_request_event_t
  974. **/
  975. typedef struct xcb_selection_request_event_t {
  976. uint8_t response_type;
  977. uint8_t pad0;
  978. uint16_t sequence;
  979. xcb_timestamp_t time;
  980. xcb_window_t owner;
  981. xcb_window_t requestor;
  982. xcb_atom_t selection;
  983. xcb_atom_t target;
  984. xcb_atom_t property;
  985. } xcb_selection_request_event_t;
  986. /** Opcode for xcb_selection_notify. */
  987. #define XCB_SELECTION_NOTIFY 31
  988. /**
  989. * @brief xcb_selection_notify_event_t
  990. **/
  991. typedef struct xcb_selection_notify_event_t {
  992. uint8_t response_type;
  993. uint8_t pad0;
  994. uint16_t sequence;
  995. xcb_timestamp_t time;
  996. xcb_window_t requestor;
  997. xcb_atom_t selection;
  998. xcb_atom_t target;
  999. xcb_atom_t property;
  1000. } xcb_selection_notify_event_t;
  1001. typedef enum xcb_colormap_state_t {
  1002. XCB_COLORMAP_STATE_UNINSTALLED = 0,
  1003. /**< The colormap was uninstalled. */
  1004. XCB_COLORMAP_STATE_INSTALLED = 1
  1005. /**< The colormap was installed. */
  1006. } xcb_colormap_state_t;
  1007. typedef enum xcb_colormap_enum_t {
  1008. XCB_COLORMAP_NONE = 0
  1009. } xcb_colormap_enum_t;
  1010. /** Opcode for xcb_colormap_notify. */
  1011. #define XCB_COLORMAP_NOTIFY 32
  1012. /**
  1013. * @brief xcb_colormap_notify_event_t
  1014. **/
  1015. typedef struct xcb_colormap_notify_event_t {
  1016. uint8_t response_type;
  1017. uint8_t pad0;
  1018. uint16_t sequence;
  1019. xcb_window_t window;
  1020. xcb_colormap_t colormap;
  1021. uint8_t _new;
  1022. uint8_t state;
  1023. uint8_t pad1[2];
  1024. } xcb_colormap_notify_event_t;
  1025. /**
  1026. * @brief xcb_client_message_data_t
  1027. **/
  1028. typedef union xcb_client_message_data_t {
  1029. uint8_t data8[20];
  1030. uint16_t data16[10];
  1031. uint32_t data32[5];
  1032. } xcb_client_message_data_t;
  1033. /**
  1034. * @brief xcb_client_message_data_iterator_t
  1035. **/
  1036. typedef struct xcb_client_message_data_iterator_t {
  1037. xcb_client_message_data_t *data;
  1038. int rem;
  1039. int index;
  1040. } xcb_client_message_data_iterator_t;
  1041. /** Opcode for xcb_client_message. */
  1042. #define XCB_CLIENT_MESSAGE 33
  1043. /**
  1044. * @brief xcb_client_message_event_t
  1045. **/
  1046. typedef struct xcb_client_message_event_t {
  1047. uint8_t response_type;
  1048. uint8_t format;
  1049. uint16_t sequence;
  1050. xcb_window_t window;
  1051. xcb_atom_t type;
  1052. xcb_client_message_data_t data;
  1053. } xcb_client_message_event_t;
  1054. typedef enum xcb_mapping_t {
  1055. XCB_MAPPING_MODIFIER = 0,
  1056. XCB_MAPPING_KEYBOARD = 1,
  1057. XCB_MAPPING_POINTER = 2
  1058. } xcb_mapping_t;
  1059. /** Opcode for xcb_mapping_notify. */
  1060. #define XCB_MAPPING_NOTIFY 34
  1061. /**
  1062. * @brief xcb_mapping_notify_event_t
  1063. **/
  1064. typedef struct xcb_mapping_notify_event_t {
  1065. uint8_t response_type;
  1066. uint8_t pad0;
  1067. uint16_t sequence;
  1068. uint8_t request;
  1069. xcb_keycode_t first_keycode;
  1070. uint8_t count;
  1071. uint8_t pad1;
  1072. } xcb_mapping_notify_event_t;
  1073. /** Opcode for xcb_ge_generic. */
  1074. #define XCB_GE_GENERIC 35
  1075. /**
  1076. * @brief xcb_ge_generic_event_t
  1077. **/
  1078. typedef struct xcb_ge_generic_event_t {
  1079. uint8_t response_type;
  1080. uint8_t extension;
  1081. uint16_t sequence;
  1082. uint32_t length;
  1083. uint16_t event_type;
  1084. uint8_t pad0[22];
  1085. uint32_t full_sequence;
  1086. } xcb_ge_generic_event_t;
  1087. /** Opcode for xcb_request. */
  1088. #define XCB_REQUEST 1
  1089. /**
  1090. * @brief xcb_request_error_t
  1091. **/
  1092. typedef struct xcb_request_error_t {
  1093. uint8_t response_type;
  1094. uint8_t error_code;
  1095. uint16_t sequence;
  1096. uint32_t bad_value;
  1097. uint16_t minor_opcode;
  1098. uint8_t major_opcode;
  1099. uint8_t pad0;
  1100. } xcb_request_error_t;
  1101. /** Opcode for xcb_value. */
  1102. #define XCB_VALUE 2
  1103. /**
  1104. * @brief xcb_value_error_t
  1105. **/
  1106. typedef struct xcb_value_error_t {
  1107. uint8_t response_type;
  1108. uint8_t error_code;
  1109. uint16_t sequence;
  1110. uint32_t bad_value;
  1111. uint16_t minor_opcode;
  1112. uint8_t major_opcode;
  1113. uint8_t pad0;
  1114. } xcb_value_error_t;
  1115. /** Opcode for xcb_window. */
  1116. #define XCB_WINDOW 3
  1117. typedef xcb_value_error_t xcb_window_error_t;
  1118. /** Opcode for xcb_pixmap. */
  1119. #define XCB_PIXMAP 4
  1120. typedef xcb_value_error_t xcb_pixmap_error_t;
  1121. /** Opcode for xcb_atom. */
  1122. #define XCB_ATOM 5
  1123. typedef xcb_value_error_t xcb_atom_error_t;
  1124. /** Opcode for xcb_cursor. */
  1125. #define XCB_CURSOR 6
  1126. typedef xcb_value_error_t xcb_cursor_error_t;
  1127. /** Opcode for xcb_font. */
  1128. #define XCB_FONT 7
  1129. typedef xcb_value_error_t xcb_font_error_t;
  1130. /** Opcode for xcb_match. */
  1131. #define XCB_MATCH 8
  1132. typedef xcb_request_error_t xcb_match_error_t;
  1133. /** Opcode for xcb_drawable. */
  1134. #define XCB_DRAWABLE 9
  1135. typedef xcb_value_error_t xcb_drawable_error_t;
  1136. /** Opcode for xcb_access. */
  1137. #define XCB_ACCESS 10
  1138. typedef xcb_request_error_t xcb_access_error_t;
  1139. /** Opcode for xcb_alloc. */
  1140. #define XCB_ALLOC 11
  1141. typedef xcb_request_error_t xcb_alloc_error_t;
  1142. /** Opcode for xcb_colormap. */
  1143. #define XCB_COLORMAP 12
  1144. typedef xcb_value_error_t xcb_colormap_error_t;
  1145. /** Opcode for xcb_g_context. */
  1146. #define XCB_G_CONTEXT 13
  1147. typedef xcb_value_error_t xcb_g_context_error_t;
  1148. /** Opcode for xcb_id_choice. */
  1149. #define XCB_ID_CHOICE 14
  1150. typedef xcb_value_error_t xcb_id_choice_error_t;
  1151. /** Opcode for xcb_name. */
  1152. #define XCB_NAME 15
  1153. typedef xcb_request_error_t xcb_name_error_t;
  1154. /** Opcode for xcb_length. */
  1155. #define XCB_LENGTH 16
  1156. typedef xcb_request_error_t xcb_length_error_t;
  1157. /** Opcode for xcb_implementation. */
  1158. #define XCB_IMPLEMENTATION 17
  1159. typedef xcb_request_error_t xcb_implementation_error_t;
  1160. typedef enum xcb_window_class_t {
  1161. XCB_WINDOW_CLASS_COPY_FROM_PARENT = 0,
  1162. XCB_WINDOW_CLASS_INPUT_OUTPUT = 1,
  1163. XCB_WINDOW_CLASS_INPUT_ONLY = 2
  1164. } xcb_window_class_t;
  1165. typedef enum xcb_cw_t {
  1166. XCB_CW_BACK_PIXMAP = 1,
  1167. /**< Overrides the default background-pixmap. The background pixmap and window must
  1168. have the same root and same depth. Any size pixmap can be used, although some
  1169. sizes may be faster than others.
  1170. If `XCB_BACK_PIXMAP_NONE` is specified, the window has no defined background.
  1171. The server may fill the contents with the previous screen contents or with
  1172. contents of its own choosing.
  1173. If `XCB_BACK_PIXMAP_PARENT_RELATIVE` is specified, the parent's background is
  1174. used, but the window must have the same depth as the parent (or a Match error
  1175. results). The parent's background is tracked, and the current version is
  1176. used each time the window background is required. */
  1177. XCB_CW_BACK_PIXEL = 2,
  1178. /**< Overrides `BackPixmap`. A pixmap of undefined size filled with the specified
  1179. background pixel is used for the background. Range-checking is not performed,
  1180. the background pixel is truncated to the appropriate number of bits. */
  1181. XCB_CW_BORDER_PIXMAP = 4,
  1182. /**< Overrides the default border-pixmap. The border pixmap and window must have the
  1183. same root and the same depth. Any size pixmap can be used, although some sizes
  1184. may be faster than others.
  1185. The special value `XCB_COPY_FROM_PARENT` means the parent's border pixmap is
  1186. copied (subsequent changes to the parent's border attribute do not affect the
  1187. child), but the window must have the same depth as the parent. */
  1188. XCB_CW_BORDER_PIXEL = 8,
  1189. /**< Overrides `BorderPixmap`. A pixmap of undefined size filled with the specified
  1190. border pixel is used for the border. Range checking is not performed on the
  1191. border-pixel value, it is truncated to the appropriate number of bits. */
  1192. XCB_CW_BIT_GRAVITY = 16,
  1193. /**< Defines which region of the window should be retained if the window is resized. */
  1194. XCB_CW_WIN_GRAVITY = 32,
  1195. /**< Defines how the window should be repositioned if the parent is resized (see
  1196. `ConfigureWindow`). */
  1197. XCB_CW_BACKING_STORE = 64,
  1198. /**< A backing-store of `WhenMapped` advises the server that maintaining contents of
  1199. obscured regions when the window is mapped would be beneficial. A backing-store
  1200. of `Always` advises the server that maintaining contents even when the window
  1201. is unmapped would be beneficial. In this case, the server may generate an
  1202. exposure event when the window is created. A value of `NotUseful` advises the
  1203. server that maintaining contents is unnecessary, although a server may still
  1204. choose to maintain contents while the window is mapped. Note that if the server
  1205. maintains contents, then the server should maintain complete contents not just
  1206. the region within the parent boundaries, even if the window is larger than its
  1207. parent. While the server maintains contents, exposure events will not normally
  1208. be generated, but the server may stop maintaining contents at any time. */
  1209. XCB_CW_BACKING_PLANES = 128,
  1210. /**< The backing-planes indicates (with bits set to 1) which bit planes of the
  1211. window hold dynamic data that must be preserved in backing-stores and during
  1212. save-unders. */
  1213. XCB_CW_BACKING_PIXEL = 256,
  1214. /**< The backing-pixel specifies what value to use in planes not covered by
  1215. backing-planes. The server is free to save only the specified bit planes in the
  1216. backing-store or save-under and regenerate the remaining planes with the
  1217. specified pixel value. Any bits beyond the specified depth of the window in
  1218. these values are simply ignored. */
  1219. XCB_CW_OVERRIDE_REDIRECT = 512,
  1220. /**< The override-redirect specifies whether map and configure requests on this
  1221. window should override a SubstructureRedirect on the parent, typically to
  1222. inform a window manager not to tamper with the window. */
  1223. XCB_CW_SAVE_UNDER = 1024,
  1224. /**< If 1, the server is advised that when this window is mapped, saving the
  1225. contents of windows it obscures would be beneficial. */
  1226. XCB_CW_EVENT_MASK = 2048,
  1227. /**< The event-mask defines which events the client is interested in for this window
  1228. (or for some event types, inferiors of the window). */
  1229. XCB_CW_DONT_PROPAGATE = 4096,
  1230. /**< The do-not-propagate-mask defines which events should not be propagated to
  1231. ancestor windows when no client has the event type selected in this window. */
  1232. XCB_CW_COLORMAP = 8192,
  1233. /**< The colormap specifies the colormap that best reflects the true colors of the window. Servers
  1234. capable of supporting multiple hardware colormaps may use this information, and window man-
  1235. agers may use it for InstallColormap requests. The colormap must have the same visual type
  1236. and root as the window (or a Match error results). If CopyFromParent is specified, the parent's
  1237. colormap is copied (subsequent changes to the parent's colormap attribute do not affect the child).
  1238. However, the window must have the same visual type as the parent (or a Match error results),
  1239. and the parent must not have a colormap of None (or a Match error results). For an explanation
  1240. of None, see FreeColormap request. The colormap is copied by sharing the colormap object
  1241. between the child and the parent, not by making a complete copy of the colormap contents. */
  1242. XCB_CW_CURSOR = 16384
  1243. /**< If a cursor is specified, it will be used whenever the pointer is in the window. If None is speci-
  1244. fied, the parent's cursor will be used when the pointer is in the window, and any change in the
  1245. parent's cursor will cause an immediate change in the displayed cursor. */
  1246. } xcb_cw_t;
  1247. typedef enum xcb_back_pixmap_t {
  1248. XCB_BACK_PIXMAP_NONE = 0,
  1249. XCB_BACK_PIXMAP_PARENT_RELATIVE = 1
  1250. } xcb_back_pixmap_t;
  1251. typedef enum xcb_gravity_t {
  1252. XCB_GRAVITY_BIT_FORGET = 0,
  1253. XCB_GRAVITY_WIN_UNMAP = 0,
  1254. XCB_GRAVITY_NORTH_WEST = 1,
  1255. XCB_GRAVITY_NORTH = 2,
  1256. XCB_GRAVITY_NORTH_EAST = 3,
  1257. XCB_GRAVITY_WEST = 4,
  1258. XCB_GRAVITY_CENTER = 5,
  1259. XCB_GRAVITY_EAST = 6,
  1260. XCB_GRAVITY_SOUTH_WEST = 7,
  1261. XCB_GRAVITY_SOUTH = 8,
  1262. XCB_GRAVITY_SOUTH_EAST = 9,
  1263. XCB_GRAVITY_STATIC = 10
  1264. } xcb_gravity_t;
  1265. /**
  1266. * @brief xcb_create_window_value_list_t
  1267. **/
  1268. typedef struct xcb_create_window_value_list_t {
  1269. xcb_pixmap_t background_pixmap;
  1270. uint32_t background_pixel;
  1271. xcb_pixmap_t border_pixmap;
  1272. uint32_t border_pixel;
  1273. uint32_t bit_gravity;
  1274. uint32_t win_gravity;
  1275. uint32_t backing_store;
  1276. uint32_t backing_planes;
  1277. uint32_t backing_pixel;
  1278. xcb_bool32_t override_redirect;
  1279. xcb_bool32_t save_under;
  1280. uint32_t event_mask;
  1281. uint32_t do_not_propogate_mask;
  1282. xcb_colormap_t colormap;
  1283. xcb_cursor_t cursor;
  1284. } xcb_create_window_value_list_t;
  1285. /** Opcode for xcb_create_window. */
  1286. #define XCB_CREATE_WINDOW 1
  1287. /**
  1288. * @brief xcb_create_window_request_t
  1289. **/
  1290. typedef struct xcb_create_window_request_t {
  1291. uint8_t major_opcode;
  1292. uint8_t depth;
  1293. uint16_t length;
  1294. xcb_window_t wid;
  1295. xcb_window_t parent;
  1296. int16_t x;
  1297. int16_t y;
  1298. uint16_t width;
  1299. uint16_t height;
  1300. uint16_t border_width;
  1301. uint16_t _class;
  1302. xcb_visualid_t visual;
  1303. uint32_t value_mask;
  1304. } xcb_create_window_request_t;
  1305. /**
  1306. * @brief xcb_change_window_attributes_value_list_t
  1307. **/
  1308. typedef struct xcb_change_window_attributes_value_list_t {
  1309. xcb_pixmap_t background_pixmap;
  1310. uint32_t background_pixel;
  1311. xcb_pixmap_t border_pixmap;
  1312. uint32_t border_pixel;
  1313. uint32_t bit_gravity;
  1314. uint32_t win_gravity;
  1315. uint32_t backing_store;
  1316. uint32_t backing_planes;
  1317. uint32_t backing_pixel;
  1318. xcb_bool32_t override_redirect;
  1319. xcb_bool32_t save_under;
  1320. uint32_t event_mask;
  1321. uint32_t do_not_propogate_mask;
  1322. xcb_colormap_t colormap;
  1323. xcb_cursor_t cursor;
  1324. } xcb_change_window_attributes_value_list_t;
  1325. /** Opcode for xcb_change_window_attributes. */
  1326. #define XCB_CHANGE_WINDOW_ATTRIBUTES 2
  1327. /**
  1328. * @brief xcb_change_window_attributes_request_t
  1329. **/
  1330. typedef struct xcb_change_window_attributes_request_t {
  1331. uint8_t major_opcode;
  1332. uint8_t pad0;
  1333. uint16_t length;
  1334. xcb_window_t window;
  1335. uint32_t value_mask;
  1336. } xcb_change_window_attributes_request_t;
  1337. typedef enum xcb_map_state_t {
  1338. XCB_MAP_STATE_UNMAPPED = 0,
  1339. XCB_MAP_STATE_UNVIEWABLE = 1,
  1340. XCB_MAP_STATE_VIEWABLE = 2
  1341. } xcb_map_state_t;
  1342. /**
  1343. * @brief xcb_get_window_attributes_cookie_t
  1344. **/
  1345. typedef struct xcb_get_window_attributes_cookie_t {
  1346. unsigned int sequence;
  1347. } xcb_get_window_attributes_cookie_t;
  1348. /** Opcode for xcb_get_window_attributes. */
  1349. #define XCB_GET_WINDOW_ATTRIBUTES 3
  1350. /**
  1351. * @brief xcb_get_window_attributes_request_t
  1352. **/
  1353. typedef struct xcb_get_window_attributes_request_t {
  1354. uint8_t major_opcode;
  1355. uint8_t pad0;
  1356. uint16_t length;
  1357. xcb_window_t window;
  1358. } xcb_get_window_attributes_request_t;
  1359. /**
  1360. * @brief xcb_get_window_attributes_reply_t
  1361. **/
  1362. typedef struct xcb_get_window_attributes_reply_t {
  1363. uint8_t response_type;
  1364. uint8_t backing_store;
  1365. uint16_t sequence;
  1366. uint32_t length;
  1367. xcb_visualid_t visual;
  1368. uint16_t _class;
  1369. uint8_t bit_gravity;
  1370. uint8_t win_gravity;
  1371. uint32_t backing_planes;
  1372. uint32_t backing_pixel;
  1373. uint8_t save_under;
  1374. uint8_t map_is_installed;
  1375. uint8_t map_state;
  1376. uint8_t override_redirect;
  1377. xcb_colormap_t colormap;
  1378. uint32_t all_event_masks;
  1379. uint32_t your_event_mask;
  1380. uint16_t do_not_propagate_mask;
  1381. uint8_t pad0[2];
  1382. } xcb_get_window_attributes_reply_t;
  1383. /** Opcode for xcb_destroy_window. */
  1384. #define XCB_DESTROY_WINDOW 4
  1385. /**
  1386. * @brief xcb_destroy_window_request_t
  1387. **/
  1388. typedef struct xcb_destroy_window_request_t {
  1389. uint8_t major_opcode;
  1390. uint8_t pad0;
  1391. uint16_t length;
  1392. xcb_window_t window;
  1393. } xcb_destroy_window_request_t;
  1394. /** Opcode for xcb_destroy_subwindows. */
  1395. #define XCB_DESTROY_SUBWINDOWS 5
  1396. /**
  1397. * @brief xcb_destroy_subwindows_request_t
  1398. **/
  1399. typedef struct xcb_destroy_subwindows_request_t {
  1400. uint8_t major_opcode;
  1401. uint8_t pad0;
  1402. uint16_t length;
  1403. xcb_window_t window;
  1404. } xcb_destroy_subwindows_request_t;
  1405. typedef enum xcb_set_mode_t {
  1406. XCB_SET_MODE_INSERT = 0,
  1407. XCB_SET_MODE_DELETE = 1
  1408. } xcb_set_mode_t;
  1409. /** Opcode for xcb_change_save_set. */
  1410. #define XCB_CHANGE_SAVE_SET 6
  1411. /**
  1412. * @brief xcb_change_save_set_request_t
  1413. **/
  1414. typedef struct xcb_change_save_set_request_t {
  1415. uint8_t major_opcode;
  1416. uint8_t mode;
  1417. uint16_t length;
  1418. xcb_window_t window;
  1419. } xcb_change_save_set_request_t;
  1420. /** Opcode for xcb_reparent_window. */
  1421. #define XCB_REPARENT_WINDOW 7
  1422. /**
  1423. * @brief xcb_reparent_window_request_t
  1424. **/
  1425. typedef struct xcb_reparent_window_request_t {
  1426. uint8_t major_opcode;
  1427. uint8_t pad0;
  1428. uint16_t length;
  1429. xcb_window_t window;
  1430. xcb_window_t parent;
  1431. int16_t x;
  1432. int16_t y;
  1433. } xcb_reparent_window_request_t;
  1434. /** Opcode for xcb_map_window. */
  1435. #define XCB_MAP_WINDOW 8
  1436. /**
  1437. * @brief xcb_map_window_request_t
  1438. **/
  1439. typedef struct xcb_map_window_request_t {
  1440. uint8_t major_opcode;
  1441. uint8_t pad0;
  1442. uint16_t length;
  1443. xcb_window_t window;
  1444. } xcb_map_window_request_t;
  1445. /** Opcode for xcb_map_subwindows. */
  1446. #define XCB_MAP_SUBWINDOWS 9
  1447. /**
  1448. * @brief xcb_map_subwindows_request_t
  1449. **/
  1450. typedef struct xcb_map_subwindows_request_t {
  1451. uint8_t major_opcode;
  1452. uint8_t pad0;
  1453. uint16_t length;
  1454. xcb_window_t window;
  1455. } xcb_map_subwindows_request_t;
  1456. /** Opcode for xcb_unmap_window. */
  1457. #define XCB_UNMAP_WINDOW 10
  1458. /**
  1459. * @brief xcb_unmap_window_request_t
  1460. **/
  1461. typedef struct xcb_unmap_window_request_t {
  1462. uint8_t major_opcode;
  1463. uint8_t pad0;
  1464. uint16_t length;
  1465. xcb_window_t window;
  1466. } xcb_unmap_window_request_t;
  1467. /** Opcode for xcb_unmap_subwindows. */
  1468. #define XCB_UNMAP_SUBWINDOWS 11
  1469. /**
  1470. * @brief xcb_unmap_subwindows_request_t
  1471. **/
  1472. typedef struct xcb_unmap_subwindows_request_t {
  1473. uint8_t major_opcode;
  1474. uint8_t pad0;
  1475. uint16_t length;
  1476. xcb_window_t window;
  1477. } xcb_unmap_subwindows_request_t;
  1478. typedef enum xcb_config_window_t {
  1479. XCB_CONFIG_WINDOW_X = 1,
  1480. XCB_CONFIG_WINDOW_Y = 2,
  1481. XCB_CONFIG_WINDOW_WIDTH = 4,
  1482. XCB_CONFIG_WINDOW_HEIGHT = 8,
  1483. XCB_CONFIG_WINDOW_BORDER_WIDTH = 16,
  1484. XCB_CONFIG_WINDOW_SIBLING = 32,
  1485. XCB_CONFIG_WINDOW_STACK_MODE = 64
  1486. } xcb_config_window_t;
  1487. typedef enum xcb_stack_mode_t {
  1488. XCB_STACK_MODE_ABOVE = 0,
  1489. XCB_STACK_MODE_BELOW = 1,
  1490. XCB_STACK_MODE_TOP_IF = 2,
  1491. XCB_STACK_MODE_BOTTOM_IF = 3,
  1492. XCB_STACK_MODE_OPPOSITE = 4
  1493. } xcb_stack_mode_t;
  1494. /**
  1495. * @brief xcb_configure_window_value_list_t
  1496. **/
  1497. typedef struct xcb_configure_window_value_list_t {
  1498. int32_t x;
  1499. int32_t y;
  1500. uint32_t width;
  1501. uint32_t height;
  1502. uint32_t border_width;
  1503. xcb_window_t sibling;
  1504. uint32_t stack_mode;
  1505. } xcb_configure_window_value_list_t;
  1506. /** Opcode for xcb_configure_window. */
  1507. #define XCB_CONFIGURE_WINDOW 12
  1508. /**
  1509. * @brief xcb_configure_window_request_t
  1510. **/
  1511. typedef struct xcb_configure_window_request_t {
  1512. uint8_t major_opcode;
  1513. uint8_t pad0;
  1514. uint16_t length;
  1515. xcb_window_t window;
  1516. uint16_t value_mask;
  1517. uint8_t pad1[2];
  1518. } xcb_configure_window_request_t;
  1519. typedef enum xcb_circulate_t {
  1520. XCB_CIRCULATE_RAISE_LOWEST = 0,
  1521. XCB_CIRCULATE_LOWER_HIGHEST = 1
  1522. } xcb_circulate_t;
  1523. /** Opcode for xcb_circulate_window. */
  1524. #define XCB_CIRCULATE_WINDOW 13
  1525. /**
  1526. * @brief xcb_circulate_window_request_t
  1527. **/
  1528. typedef struct xcb_circulate_window_request_t {
  1529. uint8_t major_opcode;
  1530. uint8_t direction;
  1531. uint16_t length;
  1532. xcb_window_t window;
  1533. } xcb_circulate_window_request_t;
  1534. /**
  1535. * @brief xcb_get_geometry_cookie_t
  1536. **/
  1537. typedef struct xcb_get_geometry_cookie_t {
  1538. unsigned int sequence;
  1539. } xcb_get_geometry_cookie_t;
  1540. /** Opcode for xcb_get_geometry. */
  1541. #define XCB_GET_GEOMETRY 14
  1542. /**
  1543. * @brief xcb_get_geometry_request_t
  1544. **/
  1545. typedef struct xcb_get_geometry_request_t {
  1546. uint8_t major_opcode;
  1547. uint8_t pad0;
  1548. uint16_t length;
  1549. xcb_drawable_t drawable;
  1550. } xcb_get_geometry_request_t;
  1551. /**
  1552. * @brief xcb_get_geometry_reply_t
  1553. **/
  1554. typedef struct xcb_get_geometry_reply_t {
  1555. uint8_t response_type;
  1556. uint8_t depth;
  1557. uint16_t sequence;
  1558. uint32_t length;
  1559. xcb_window_t root;
  1560. int16_t x;
  1561. int16_t y;
  1562. uint16_t width;
  1563. uint16_t height;
  1564. uint16_t border_width;
  1565. uint8_t pad0[2];
  1566. } xcb_get_geometry_reply_t;
  1567. /**
  1568. * @brief xcb_query_tree_cookie_t
  1569. **/
  1570. typedef struct xcb_query_tree_cookie_t {
  1571. unsigned int sequence;
  1572. } xcb_query_tree_cookie_t;
  1573. /** Opcode for xcb_query_tree. */
  1574. #define XCB_QUERY_TREE 15
  1575. /**
  1576. * @brief xcb_query_tree_request_t
  1577. **/
  1578. typedef struct xcb_query_tree_request_t {
  1579. uint8_t major_opcode;
  1580. uint8_t pad0;
  1581. uint16_t length;
  1582. xcb_window_t window;
  1583. } xcb_query_tree_request_t;
  1584. /**
  1585. * @brief xcb_query_tree_reply_t
  1586. **/
  1587. typedef struct xcb_query_tree_reply_t {
  1588. uint8_t response_type;
  1589. uint8_t pad0;
  1590. uint16_t sequence;
  1591. uint32_t length;
  1592. xcb_window_t root;
  1593. xcb_window_t parent;
  1594. uint16_t children_len;
  1595. uint8_t pad1[14];
  1596. } xcb_query_tree_reply_t;
  1597. /**
  1598. * @brief xcb_intern_atom_cookie_t
  1599. **/
  1600. typedef struct xcb_intern_atom_cookie_t {
  1601. unsigned int sequence;
  1602. } xcb_intern_atom_cookie_t;
  1603. /** Opcode for xcb_intern_atom. */
  1604. #define XCB_INTERN_ATOM 16
  1605. /**
  1606. * @brief xcb_intern_atom_request_t
  1607. **/
  1608. typedef struct xcb_intern_atom_request_t {
  1609. uint8_t major_opcode;
  1610. uint8_t only_if_exists;
  1611. uint16_t length;
  1612. uint16_t name_len;
  1613. uint8_t pad0[2];
  1614. } xcb_intern_atom_request_t;
  1615. /**
  1616. * @brief xcb_intern_atom_reply_t
  1617. **/
  1618. typedef struct xcb_intern_atom_reply_t {
  1619. uint8_t response_type;
  1620. uint8_t pad0;
  1621. uint16_t sequence;
  1622. uint32_t length;
  1623. xcb_atom_t atom;
  1624. } xcb_intern_atom_reply_t;
  1625. /**
  1626. * @brief xcb_get_atom_name_cookie_t
  1627. **/
  1628. typedef struct xcb_get_atom_name_cookie_t {
  1629. unsigned int sequence;
  1630. } xcb_get_atom_name_cookie_t;
  1631. /** Opcode for xcb_get_atom_name. */
  1632. #define XCB_GET_ATOM_NAME 17
  1633. /**
  1634. * @brief xcb_get_atom_name_request_t
  1635. **/
  1636. typedef struct xcb_get_atom_name_request_t {
  1637. uint8_t major_opcode;
  1638. uint8_t pad0;
  1639. uint16_t length;
  1640. xcb_atom_t atom;
  1641. } xcb_get_atom_name_request_t;
  1642. /**
  1643. * @brief xcb_get_atom_name_reply_t
  1644. **/
  1645. typedef struct xcb_get_atom_name_reply_t {
  1646. uint8_t response_type;
  1647. uint8_t pad0;
  1648. uint16_t sequence;
  1649. uint32_t length;
  1650. uint16_t name_len;
  1651. uint8_t pad1[22];
  1652. } xcb_get_atom_name_reply_t;
  1653. typedef enum xcb_prop_mode_t {
  1654. XCB_PROP_MODE_REPLACE = 0,
  1655. /**< Discard the previous property value and store the new data. */
  1656. XCB_PROP_MODE_PREPEND = 1,
  1657. /**< Insert the new data before the beginning of existing data. The `format` must
  1658. match existing property value. If the property is undefined, it is treated as
  1659. defined with the correct type and format with zero-length data. */
  1660. XCB_PROP_MODE_APPEND = 2
  1661. /**< Insert the new data after the beginning of existing data. The `format` must
  1662. match existing property value. If the property is undefined, it is treated as
  1663. defined with the correct type and format with zero-length data. */
  1664. } xcb_prop_mode_t;
  1665. /** Opcode for xcb_change_property. */
  1666. #define XCB_CHANGE_PROPERTY 18
  1667. /**
  1668. * @brief xcb_change_property_request_t
  1669. **/
  1670. typedef struct xcb_change_property_request_t {
  1671. uint8_t major_opcode;
  1672. uint8_t mode;
  1673. uint16_t length;
  1674. xcb_window_t window;
  1675. xcb_atom_t property;
  1676. xcb_atom_t type;
  1677. uint8_t format;
  1678. uint8_t pad0[3];
  1679. uint32_t data_len;
  1680. } xcb_change_property_request_t;
  1681. /** Opcode for xcb_delete_property. */
  1682. #define XCB_DELETE_PROPERTY 19
  1683. /**
  1684. * @brief xcb_delete_property_request_t
  1685. **/
  1686. typedef struct xcb_delete_property_request_t {
  1687. uint8_t major_opcode;
  1688. uint8_t pad0;
  1689. uint16_t length;
  1690. xcb_window_t window;
  1691. xcb_atom_t property;
  1692. } xcb_delete_property_request_t;
  1693. typedef enum xcb_get_property_type_t {
  1694. XCB_GET_PROPERTY_TYPE_ANY = 0
  1695. } xcb_get_property_type_t;
  1696. /**
  1697. * @brief xcb_get_property_cookie_t
  1698. **/
  1699. typedef struct xcb_get_property_cookie_t {
  1700. unsigned int sequence;
  1701. } xcb_get_property_cookie_t;
  1702. /** Opcode for xcb_get_property. */
  1703. #define XCB_GET_PROPERTY 20
  1704. /**
  1705. * @brief xcb_get_property_request_t
  1706. **/
  1707. typedef struct xcb_get_property_request_t {
  1708. uint8_t major_opcode;
  1709. uint8_t _delete;
  1710. uint16_t length;
  1711. xcb_window_t window;
  1712. xcb_atom_t property;
  1713. xcb_atom_t type;
  1714. uint32_t long_offset;
  1715. uint32_t long_length;
  1716. } xcb_get_property_request_t;
  1717. /**
  1718. * @brief xcb_get_property_reply_t
  1719. **/
  1720. typedef struct xcb_get_property_reply_t {
  1721. uint8_t response_type;
  1722. uint8_t format;
  1723. uint16_t sequence;
  1724. uint32_t length;
  1725. xcb_atom_t type;
  1726. uint32_t bytes_after;
  1727. uint32_t value_len;
  1728. uint8_t pad0[12];
  1729. } xcb_get_property_reply_t;
  1730. /**
  1731. * @brief xcb_list_properties_cookie_t
  1732. **/
  1733. typedef struct xcb_list_properties_cookie_t {
  1734. unsigned int sequence;
  1735. } xcb_list_properties_cookie_t;
  1736. /** Opcode for xcb_list_properties. */
  1737. #define XCB_LIST_PROPERTIES 21
  1738. /**
  1739. * @brief xcb_list_properties_request_t
  1740. **/
  1741. typedef struct xcb_list_properties_request_t {
  1742. uint8_t major_opcode;
  1743. uint8_t pad0;
  1744. uint16_t length;
  1745. xcb_window_t window;
  1746. } xcb_list_properties_request_t;
  1747. /**
  1748. * @brief xcb_list_properties_reply_t
  1749. **/
  1750. typedef struct xcb_list_properties_reply_t {
  1751. uint8_t response_type;
  1752. uint8_t pad0;
  1753. uint16_t sequence;
  1754. uint32_t length;
  1755. uint16_t atoms_len;
  1756. uint8_t pad1[22];
  1757. } xcb_list_properties_reply_t;
  1758. /** Opcode for xcb_set_selection_owner. */
  1759. #define XCB_SET_SELECTION_OWNER 22
  1760. /**
  1761. * @brief xcb_set_selection_owner_request_t
  1762. **/
  1763. typedef struct xcb_set_selection_owner_request_t {
  1764. uint8_t major_opcode;
  1765. uint8_t pad0;
  1766. uint16_t length;
  1767. xcb_window_t owner;
  1768. xcb_atom_t selection;
  1769. xcb_timestamp_t time;
  1770. } xcb_set_selection_owner_request_t;
  1771. /**
  1772. * @brief xcb_get_selection_owner_cookie_t
  1773. **/
  1774. typedef struct xcb_get_selection_owner_cookie_t {
  1775. unsigned int sequence;
  1776. } xcb_get_selection_owner_cookie_t;
  1777. /** Opcode for xcb_get_selection_owner. */
  1778. #define XCB_GET_SELECTION_OWNER 23
  1779. /**
  1780. * @brief xcb_get_selection_owner_request_t
  1781. **/
  1782. typedef struct xcb_get_selection_owner_request_t {
  1783. uint8_t major_opcode;
  1784. uint8_t pad0;
  1785. uint16_t length;
  1786. xcb_atom_t selection;
  1787. } xcb_get_selection_owner_request_t;
  1788. /**
  1789. * @brief xcb_get_selection_owner_reply_t
  1790. **/
  1791. typedef struct xcb_get_selection_owner_reply_t {
  1792. uint8_t response_type;
  1793. uint8_t pad0;
  1794. uint16_t sequence;
  1795. uint32_t length;
  1796. xcb_window_t owner;
  1797. } xcb_get_selection_owner_reply_t;
  1798. /** Opcode for xcb_convert_selection. */
  1799. #define XCB_CONVERT_SELECTION 24
  1800. /**
  1801. * @brief xcb_convert_selection_request_t
  1802. **/
  1803. typedef struct xcb_convert_selection_request_t {
  1804. uint8_t major_opcode;
  1805. uint8_t pad0;
  1806. uint16_t length;
  1807. xcb_window_t requestor;
  1808. xcb_atom_t selection;
  1809. xcb_atom_t target;
  1810. xcb_atom_t property;
  1811. xcb_timestamp_t time;
  1812. } xcb_convert_selection_request_t;
  1813. typedef enum xcb_send_event_dest_t {
  1814. XCB_SEND_EVENT_DEST_POINTER_WINDOW = 0,
  1815. XCB_SEND_EVENT_DEST_ITEM_FOCUS = 1
  1816. } xcb_send_event_dest_t;
  1817. /** Opcode for xcb_send_event. */
  1818. #define XCB_SEND_EVENT 25
  1819. /**
  1820. * @brief xcb_send_event_request_t
  1821. **/
  1822. typedef struct xcb_send_event_request_t {
  1823. uint8_t major_opcode;
  1824. uint8_t propagate;
  1825. uint16_t length;
  1826. xcb_window_t destination;
  1827. uint32_t event_mask;
  1828. char event[32];
  1829. } xcb_send_event_request_t;
  1830. typedef enum xcb_grab_mode_t {
  1831. XCB_GRAB_MODE_SYNC = 0,
  1832. /**< The state of the keyboard appears to freeze: No further keyboard events are
  1833. generated by the server until the grabbing client issues a releasing
  1834. `AllowEvents` request or until the keyboard grab is released. */
  1835. XCB_GRAB_MODE_ASYNC = 1
  1836. /**< Keyboard event processing continues normally. */
  1837. } xcb_grab_mode_t;
  1838. typedef enum xcb_grab_status_t {
  1839. XCB_GRAB_STATUS_SUCCESS = 0,
  1840. XCB_GRAB_STATUS_ALREADY_GRABBED = 1,
  1841. XCB_GRAB_STATUS_INVALID_TIME = 2,
  1842. XCB_GRAB_STATUS_NOT_VIEWABLE = 3,
  1843. XCB_GRAB_STATUS_FROZEN = 4
  1844. } xcb_grab_status_t;
  1845. typedef enum xcb_cursor_enum_t {
  1846. XCB_CURSOR_NONE = 0
  1847. } xcb_cursor_enum_t;
  1848. /**
  1849. * @brief xcb_grab_pointer_cookie_t
  1850. **/
  1851. typedef struct xcb_grab_pointer_cookie_t {
  1852. unsigned int sequence;
  1853. } xcb_grab_pointer_cookie_t;
  1854. /** Opcode for xcb_grab_pointer. */
  1855. #define XCB_GRAB_POINTER 26
  1856. /**
  1857. * @brief xcb_grab_pointer_request_t
  1858. **/
  1859. typedef struct xcb_grab_pointer_request_t {
  1860. uint8_t major_opcode;
  1861. uint8_t owner_events;
  1862. uint16_t length;
  1863. xcb_window_t grab_window;
  1864. uint16_t event_mask;
  1865. uint8_t pointer_mode;
  1866. uint8_t keyboard_mode;
  1867. xcb_window_t confine_to;
  1868. xcb_cursor_t cursor;
  1869. xcb_timestamp_t time;
  1870. } xcb_grab_pointer_request_t;
  1871. /**
  1872. * @brief xcb_grab_pointer_reply_t
  1873. **/
  1874. typedef struct xcb_grab_pointer_reply_t {
  1875. uint8_t response_type;
  1876. uint8_t status;
  1877. uint16_t sequence;
  1878. uint32_t length;
  1879. } xcb_grab_pointer_reply_t;
  1880. /** Opcode for xcb_ungrab_pointer. */
  1881. #define XCB_UNGRAB_POINTER 27
  1882. /**
  1883. * @brief xcb_ungrab_pointer_request_t
  1884. **/
  1885. typedef struct xcb_ungrab_pointer_request_t {
  1886. uint8_t major_opcode;
  1887. uint8_t pad0;
  1888. uint16_t length;
  1889. xcb_timestamp_t time;
  1890. } xcb_ungrab_pointer_request_t;
  1891. typedef enum xcb_button_index_t {
  1892. XCB_BUTTON_INDEX_ANY = 0,
  1893. /**< Any of the following (or none): */
  1894. XCB_BUTTON_INDEX_1 = 1,
  1895. /**< The left mouse button. */
  1896. XCB_BUTTON_INDEX_2 = 2,
  1897. /**< The right mouse button. */
  1898. XCB_BUTTON_INDEX_3 = 3,
  1899. /**< The middle mouse button. */
  1900. XCB_BUTTON_INDEX_4 = 4,
  1901. /**< Scroll wheel. TODO: direction? */
  1902. XCB_BUTTON_INDEX_5 = 5
  1903. /**< Scroll wheel. TODO: direction? */
  1904. } xcb_button_index_t;
  1905. /** Opcode for xcb_grab_button. */
  1906. #define XCB_GRAB_BUTTON 28
  1907. /**
  1908. * @brief xcb_grab_button_request_t
  1909. **/
  1910. typedef struct xcb_grab_button_request_t {
  1911. uint8_t major_opcode;
  1912. uint8_t owner_events;
  1913. uint16_t length;
  1914. xcb_window_t grab_window;
  1915. uint16_t event_mask;
  1916. uint8_t pointer_mode;
  1917. uint8_t keyboard_mode;
  1918. xcb_window_t confine_to;
  1919. xcb_cursor_t cursor;
  1920. uint8_t button;
  1921. uint8_t pad0;
  1922. uint16_t modifiers;
  1923. } xcb_grab_button_request_t;
  1924. /** Opcode for xcb_ungrab_button. */
  1925. #define XCB_UNGRAB_BUTTON 29
  1926. /**
  1927. * @brief xcb_ungrab_button_request_t
  1928. **/
  1929. typedef struct xcb_ungrab_button_request_t {
  1930. uint8_t major_opcode;
  1931. uint8_t button;
  1932. uint16_t length;
  1933. xcb_window_t grab_window;
  1934. uint16_t modifiers;
  1935. uint8_t pad0[2];
  1936. } xcb_ungrab_button_request_t;
  1937. /** Opcode for xcb_change_active_pointer_grab. */
  1938. #define XCB_CHANGE_ACTIVE_POINTER_GRAB 30
  1939. /**
  1940. * @brief xcb_change_active_pointer_grab_request_t
  1941. **/
  1942. typedef struct xcb_change_active_pointer_grab_request_t {
  1943. uint8_t major_opcode;
  1944. uint8_t pad0;
  1945. uint16_t length;
  1946. xcb_cursor_t cursor;
  1947. xcb_timestamp_t time;
  1948. uint16_t event_mask;
  1949. uint8_t pad1[2];
  1950. } xcb_change_active_pointer_grab_request_t;
  1951. /**
  1952. * @brief xcb_grab_keyboard_cookie_t
  1953. **/
  1954. typedef struct xcb_grab_keyboard_cookie_t {
  1955. unsigned int sequence;
  1956. } xcb_grab_keyboard_cookie_t;
  1957. /** Opcode for xcb_grab_keyboard. */
  1958. #define XCB_GRAB_KEYBOARD 31
  1959. /**
  1960. * @brief xcb_grab_keyboard_request_t
  1961. **/
  1962. typedef struct xcb_grab_keyboard_request_t {
  1963. uint8_t major_opcode;
  1964. uint8_t owner_events;
  1965. uint16_t length;
  1966. xcb_window_t grab_window;
  1967. xcb_timestamp_t time;
  1968. uint8_t pointer_mode;
  1969. uint8_t keyboard_mode;
  1970. uint8_t pad0[2];
  1971. } xcb_grab_keyboard_request_t;
  1972. /**
  1973. * @brief xcb_grab_keyboard_reply_t
  1974. **/
  1975. typedef struct xcb_grab_keyboard_reply_t {
  1976. uint8_t response_type;
  1977. uint8_t status;
  1978. uint16_t sequence;
  1979. uint32_t length;
  1980. } xcb_grab_keyboard_reply_t;
  1981. /** Opcode for xcb_ungrab_keyboard. */
  1982. #define XCB_UNGRAB_KEYBOARD 32
  1983. /**
  1984. * @brief xcb_ungrab_keyboard_request_t
  1985. **/
  1986. typedef struct xcb_ungrab_keyboard_request_t {
  1987. uint8_t major_opcode;
  1988. uint8_t pad0;
  1989. uint16_t length;
  1990. xcb_timestamp_t time;
  1991. } xcb_ungrab_keyboard_request_t;
  1992. typedef enum xcb_grab_t {
  1993. XCB_GRAB_ANY = 0
  1994. } xcb_grab_t;
  1995. /** Opcode for xcb_grab_key. */
  1996. #define XCB_GRAB_KEY 33
  1997. /**
  1998. * @brief xcb_grab_key_request_t
  1999. **/
  2000. typedef struct xcb_grab_key_request_t {
  2001. uint8_t major_opcode;
  2002. uint8_t owner_events;
  2003. uint16_t length;
  2004. xcb_window_t grab_window;
  2005. uint16_t modifiers;
  2006. xcb_keycode_t key;
  2007. uint8_t pointer_mode;
  2008. uint8_t keyboard_mode;
  2009. uint8_t pad0[3];
  2010. } xcb_grab_key_request_t;
  2011. /** Opcode for xcb_ungrab_key. */
  2012. #define XCB_UNGRAB_KEY 34
  2013. /**
  2014. * @brief xcb_ungrab_key_request_t
  2015. **/
  2016. typedef struct xcb_ungrab_key_request_t {
  2017. uint8_t major_opcode;
  2018. xcb_keycode_t key;
  2019. uint16_t length;
  2020. xcb_window_t grab_window;
  2021. uint16_t modifiers;
  2022. uint8_t pad0[2];
  2023. } xcb_ungrab_key_request_t;
  2024. typedef enum xcb_allow_t {
  2025. XCB_ALLOW_ASYNC_POINTER = 0,
  2026. /**< For AsyncPointer, if the pointer is frozen by the client, pointer event
  2027. processing continues normally. If the pointer is frozen twice by the client on
  2028. behalf of two separate grabs, AsyncPointer thaws for both. AsyncPointer has no
  2029. effect if the pointer is not frozen by the client, but the pointer need not be
  2030. grabbed by the client.
  2031. TODO: rewrite this in more understandable terms. */
  2032. XCB_ALLOW_SYNC_POINTER = 1,
  2033. /**< For SyncPointer, if the pointer is frozen and actively grabbed by the client,
  2034. pointer event processing continues normally until the next ButtonPress or
  2035. ButtonRelease event is reported to the client, at which time the pointer again
  2036. appears to freeze. However, if the reported event causes the pointer grab to be
  2037. released, then the pointer does not freeze. SyncPointer has no effect if the
  2038. pointer is not frozen by the client or if the pointer is not grabbed by the
  2039. client. */
  2040. XCB_ALLOW_REPLAY_POINTER = 2,
  2041. /**< For ReplayPointer, if the pointer is actively grabbed by the client and is
  2042. frozen as the result of an event having been sent to the client (either from
  2043. the activation of a GrabButton or from a previous AllowEvents with mode
  2044. SyncPointer but not from a GrabPointer), then the pointer grab is released and
  2045. that event is completely reprocessed, this time ignoring any passive grabs at
  2046. or above (towards the root) the grab-window of the grab just released. The
  2047. request has no effect if the pointer is not grabbed by the client or if the
  2048. pointer is not frozen as the result of an event. */
  2049. XCB_ALLOW_ASYNC_KEYBOARD = 3,
  2050. /**< For AsyncKeyboard, if the keyboard is frozen by the client, keyboard event
  2051. processing continues normally. If the keyboard is frozen twice by the client on
  2052. behalf of two separate grabs, AsyncKeyboard thaws for both. AsyncKeyboard has
  2053. no effect if the keyboard is not frozen by the client, but the keyboard need
  2054. not be grabbed by the client. */
  2055. XCB_ALLOW_SYNC_KEYBOARD = 4,
  2056. /**< For SyncKeyboard, if the keyboard is frozen and actively grabbed by the client,
  2057. keyboard event processing continues normally until the next KeyPress or
  2058. KeyRelease event is reported to the client, at which time the keyboard again
  2059. appears to freeze. However, if the reported event causes the keyboard grab to
  2060. be released, then the keyboard does not freeze. SyncKeyboard has no effect if
  2061. the keyboard is not frozen by the client or if the keyboard is not grabbed by
  2062. the client. */
  2063. XCB_ALLOW_REPLAY_KEYBOARD = 5,
  2064. /**< For ReplayKeyboard, if the keyboard is actively grabbed by the client and is
  2065. frozen as the result of an event having been sent to the client (either from
  2066. the activation of a GrabKey or from a previous AllowEvents with mode
  2067. SyncKeyboard but not from a GrabKeyboard), then the keyboard grab is released
  2068. and that event is completely reprocessed, this time ignoring any passive grabs
  2069. at or above (towards the root) the grab-window of the grab just released. The
  2070. request has no effect if the keyboard is not grabbed by the client or if the
  2071. keyboard is not frozen as the result of an event. */
  2072. XCB_ALLOW_ASYNC_BOTH = 6,
  2073. /**< For AsyncBoth, if the pointer and the keyboard are frozen by the client, event
  2074. processing for both devices continues normally. If a device is frozen twice by
  2075. the client on behalf of two separate grabs, AsyncBoth thaws for both. AsyncBoth
  2076. has no effect unless both pointer and keyboard are frozen by the client. */
  2077. XCB_ALLOW_SYNC_BOTH = 7
  2078. /**< For SyncBoth, if both pointer and keyboard are frozen by the client, event
  2079. processing (for both devices) continues normally until the next ButtonPress,
  2080. ButtonRelease, KeyPress, or KeyRelease event is reported to the client for a
  2081. grabbed device (button event for the pointer, key event for the keyboard), at
  2082. which time the devices again appear to freeze. However, if the reported event
  2083. causes the grab to be released, then the devices do not freeze (but if the
  2084. other device is still grabbed, then a subsequent event for it will still cause
  2085. both devices to freeze). SyncBoth has no effect unless both pointer and
  2086. keyboard are frozen by the client. If the pointer or keyboard is frozen twice
  2087. by the client on behalf of two separate grabs, SyncBoth thaws for both (but a
  2088. subsequent freeze for SyncBoth will only freeze each device once). */
  2089. } xcb_allow_t;
  2090. /** Opcode for xcb_allow_events. */
  2091. #define XCB_ALLOW_EVENTS 35
  2092. /**
  2093. * @brief xcb_allow_events_request_t
  2094. **/
  2095. typedef struct xcb_allow_events_request_t {
  2096. uint8_t major_opcode;
  2097. uint8_t mode;
  2098. uint16_t length;
  2099. xcb_timestamp_t time;
  2100. } xcb_allow_events_request_t;
  2101. /** Opcode for xcb_grab_server. */
  2102. #define XCB_GRAB_SERVER 36
  2103. /**
  2104. * @brief xcb_grab_server_request_t
  2105. **/
  2106. typedef struct xcb_grab_server_request_t {
  2107. uint8_t major_opcode;
  2108. uint8_t pad0;
  2109. uint16_t length;
  2110. } xcb_grab_server_request_t;
  2111. /** Opcode for xcb_ungrab_server. */
  2112. #define XCB_UNGRAB_SERVER 37
  2113. /**
  2114. * @brief xcb_ungrab_server_request_t
  2115. **/
  2116. typedef struct xcb_ungrab_server_request_t {
  2117. uint8_t major_opcode;
  2118. uint8_t pad0;
  2119. uint16_t length;
  2120. } xcb_ungrab_server_request_t;
  2121. /**
  2122. * @brief xcb_query_pointer_cookie_t
  2123. **/
  2124. typedef struct xcb_query_pointer_cookie_t {
  2125. unsigned int sequence;
  2126. } xcb_query_pointer_cookie_t;
  2127. /** Opcode for xcb_query_pointer. */
  2128. #define XCB_QUERY_POINTER 38
  2129. /**
  2130. * @brief xcb_query_pointer_request_t
  2131. **/
  2132. typedef struct xcb_query_pointer_request_t {
  2133. uint8_t major_opcode;
  2134. uint8_t pad0;
  2135. uint16_t length;
  2136. xcb_window_t window;
  2137. } xcb_query_pointer_request_t;
  2138. /**
  2139. * @brief xcb_query_pointer_reply_t
  2140. **/
  2141. typedef struct xcb_query_pointer_reply_t {
  2142. uint8_t response_type;
  2143. uint8_t same_screen;
  2144. uint16_t sequence;
  2145. uint32_t length;
  2146. xcb_window_t root;
  2147. xcb_window_t child;
  2148. int16_t root_x;
  2149. int16_t root_y;
  2150. int16_t win_x;
  2151. int16_t win_y;
  2152. uint16_t mask;
  2153. uint8_t pad0[2];
  2154. } xcb_query_pointer_reply_t;
  2155. /**
  2156. * @brief xcb_timecoord_t
  2157. **/
  2158. typedef struct xcb_timecoord_t {
  2159. xcb_timestamp_t time;
  2160. int16_t x;
  2161. int16_t y;
  2162. } xcb_timecoord_t;
  2163. /**
  2164. * @brief xcb_timecoord_iterator_t
  2165. **/
  2166. typedef struct xcb_timecoord_iterator_t {
  2167. xcb_timecoord_t *data;
  2168. int rem;
  2169. int index;
  2170. } xcb_timecoord_iterator_t;
  2171. /**
  2172. * @brief xcb_get_motion_events_cookie_t
  2173. **/
  2174. typedef struct xcb_get_motion_events_cookie_t {
  2175. unsigned int sequence;
  2176. } xcb_get_motion_events_cookie_t;
  2177. /** Opcode for xcb_get_motion_events. */
  2178. #define XCB_GET_MOTION_EVENTS 39
  2179. /**
  2180. * @brief xcb_get_motion_events_request_t
  2181. **/
  2182. typedef struct xcb_get_motion_events_request_t {
  2183. uint8_t major_opcode;
  2184. uint8_t pad0;
  2185. uint16_t length;
  2186. xcb_window_t window;
  2187. xcb_timestamp_t start;
  2188. xcb_timestamp_t stop;
  2189. } xcb_get_motion_events_request_t;
  2190. /**
  2191. * @brief xcb_get_motion_events_reply_t
  2192. **/
  2193. typedef struct xcb_get_motion_events_reply_t {
  2194. uint8_t response_type;
  2195. uint8_t pad0;
  2196. uint16_t sequence;
  2197. uint32_t length;
  2198. uint32_t events_len;
  2199. uint8_t pad1[20];
  2200. } xcb_get_motion_events_reply_t;
  2201. /**
  2202. * @brief xcb_translate_coordinates_cookie_t
  2203. **/
  2204. typedef struct xcb_translate_coordinates_cookie_t {
  2205. unsigned int sequence;
  2206. } xcb_translate_coordinates_cookie_t;
  2207. /** Opcode for xcb_translate_coordinates. */
  2208. #define XCB_TRANSLATE_COORDINATES 40
  2209. /**
  2210. * @brief xcb_translate_coordinates_request_t
  2211. **/
  2212. typedef struct xcb_translate_coordinates_request_t {
  2213. uint8_t major_opcode;
  2214. uint8_t pad0;
  2215. uint16_t length;
  2216. xcb_window_t src_window;
  2217. xcb_window_t dst_window;
  2218. int16_t src_x;
  2219. int16_t src_y;
  2220. } xcb_translate_coordinates_request_t;
  2221. /**
  2222. * @brief xcb_translate_coordinates_reply_t
  2223. **/
  2224. typedef struct xcb_translate_coordinates_reply_t {
  2225. uint8_t response_type;
  2226. uint8_t same_screen;
  2227. uint16_t sequence;
  2228. uint32_t length;
  2229. xcb_window_t child;
  2230. int16_t dst_x;
  2231. int16_t dst_y;
  2232. } xcb_translate_coordinates_reply_t;
  2233. /** Opcode for xcb_warp_pointer. */
  2234. #define XCB_WARP_POINTER 41
  2235. /**
  2236. * @brief xcb_warp_pointer_request_t
  2237. **/
  2238. typedef struct xcb_warp_pointer_request_t {
  2239. uint8_t major_opcode;
  2240. uint8_t pad0;
  2241. uint16_t length;
  2242. xcb_window_t src_window;
  2243. xcb_window_t dst_window;
  2244. int16_t src_x;
  2245. int16_t src_y;
  2246. uint16_t src_width;
  2247. uint16_t src_height;
  2248. int16_t dst_x;
  2249. int16_t dst_y;
  2250. } xcb_warp_pointer_request_t;
  2251. typedef enum xcb_input_focus_t {
  2252. XCB_INPUT_FOCUS_NONE = 0,
  2253. /**< The focus reverts to `XCB_NONE`, so no window will have the input focus. */
  2254. XCB_INPUT_FOCUS_POINTER_ROOT = 1,
  2255. /**< The focus reverts to `XCB_POINTER_ROOT` respectively. When the focus reverts,
  2256. FocusIn and FocusOut events are generated, but the last-focus-change time is
  2257. not changed. */
  2258. XCB_INPUT_FOCUS_PARENT = 2,
  2259. /**< The focus reverts to the parent (or closest viewable ancestor) and the new
  2260. revert_to value is `XCB_INPUT_FOCUS_NONE`. */
  2261. XCB_INPUT_FOCUS_FOLLOW_KEYBOARD = 3
  2262. /**< NOT YET DOCUMENTED. Only relevant for the xinput extension. */
  2263. } xcb_input_focus_t;
  2264. /** Opcode for xcb_set_input_focus. */
  2265. #define XCB_SET_INPUT_FOCUS 42
  2266. /**
  2267. * @brief xcb_set_input_focus_request_t
  2268. **/
  2269. typedef struct xcb_set_input_focus_request_t {
  2270. uint8_t major_opcode;
  2271. uint8_t revert_to;
  2272. uint16_t length;
  2273. xcb_window_t focus;
  2274. xcb_timestamp_t time;
  2275. } xcb_set_input_focus_request_t;
  2276. /**
  2277. * @brief xcb_get_input_focus_cookie_t
  2278. **/
  2279. typedef struct xcb_get_input_focus_cookie_t {
  2280. unsigned int sequence;
  2281. } xcb_get_input_focus_cookie_t;
  2282. /** Opcode for xcb_get_input_focus. */
  2283. #define XCB_GET_INPUT_FOCUS 43
  2284. /**
  2285. * @brief xcb_get_input_focus_request_t
  2286. **/
  2287. typedef struct xcb_get_input_focus_request_t {
  2288. uint8_t major_opcode;
  2289. uint8_t pad0;
  2290. uint16_t length;
  2291. } xcb_get_input_focus_request_t;
  2292. /**
  2293. * @brief xcb_get_input_focus_reply_t
  2294. **/
  2295. typedef struct xcb_get_input_focus_reply_t {
  2296. uint8_t response_type;
  2297. uint8_t revert_to;
  2298. uint16_t sequence;
  2299. uint32_t length;
  2300. xcb_window_t focus;
  2301. } xcb_get_input_focus_reply_t;
  2302. /**
  2303. * @brief xcb_query_keymap_cookie_t
  2304. **/
  2305. typedef struct xcb_query_keymap_cookie_t {
  2306. unsigned int sequence;
  2307. } xcb_query_keymap_cookie_t;
  2308. /** Opcode for xcb_query_keymap. */
  2309. #define XCB_QUERY_KEYMAP 44
  2310. /**
  2311. * @brief xcb_query_keymap_request_t
  2312. **/
  2313. typedef struct xcb_query_keymap_request_t {
  2314. uint8_t major_opcode;
  2315. uint8_t pad0;
  2316. uint16_t length;
  2317. } xcb_query_keymap_request_t;
  2318. /**
  2319. * @brief xcb_query_keymap_reply_t
  2320. **/
  2321. typedef struct xcb_query_keymap_reply_t {
  2322. uint8_t response_type;
  2323. uint8_t pad0;
  2324. uint16_t sequence;
  2325. uint32_t length;
  2326. uint8_t keys[32];
  2327. } xcb_query_keymap_reply_t;
  2328. /** Opcode for xcb_open_font. */
  2329. #define XCB_OPEN_FONT 45
  2330. /**
  2331. * @brief xcb_open_font_request_t
  2332. **/
  2333. typedef struct xcb_open_font_request_t {
  2334. uint8_t major_opcode;
  2335. uint8_t pad0;
  2336. uint16_t length;
  2337. xcb_font_t fid;
  2338. uint16_t name_len;
  2339. uint8_t pad1[2];
  2340. } xcb_open_font_request_t;
  2341. /** Opcode for xcb_close_font. */
  2342. #define XCB_CLOSE_FONT 46
  2343. /**
  2344. * @brief xcb_close_font_request_t
  2345. **/
  2346. typedef struct xcb_close_font_request_t {
  2347. uint8_t major_opcode;
  2348. uint8_t pad0;
  2349. uint16_t length;
  2350. xcb_font_t font;
  2351. } xcb_close_font_request_t;
  2352. typedef enum xcb_font_draw_t {
  2353. XCB_FONT_DRAW_LEFT_TO_RIGHT = 0,
  2354. XCB_FONT_DRAW_RIGHT_TO_LEFT = 1
  2355. } xcb_font_draw_t;
  2356. /**
  2357. * @brief xcb_fontprop_t
  2358. **/
  2359. typedef struct xcb_fontprop_t {
  2360. xcb_atom_t name;
  2361. uint32_t value;
  2362. } xcb_fontprop_t;
  2363. /**
  2364. * @brief xcb_fontprop_iterator_t
  2365. **/
  2366. typedef struct xcb_fontprop_iterator_t {
  2367. xcb_fontprop_t *data;
  2368. int rem;
  2369. int index;
  2370. } xcb_fontprop_iterator_t;
  2371. /**
  2372. * @brief xcb_charinfo_t
  2373. **/
  2374. typedef struct xcb_charinfo_t {
  2375. int16_t left_side_bearing;
  2376. int16_t right_side_bearing;
  2377. int16_t character_width;
  2378. int16_t ascent;
  2379. int16_t descent;
  2380. uint16_t attributes;
  2381. } xcb_charinfo_t;
  2382. /**
  2383. * @brief xcb_charinfo_iterator_t
  2384. **/
  2385. typedef struct xcb_charinfo_iterator_t {
  2386. xcb_charinfo_t *data;
  2387. int rem;
  2388. int index;
  2389. } xcb_charinfo_iterator_t;
  2390. /**
  2391. * @brief xcb_query_font_cookie_t
  2392. **/
  2393. typedef struct xcb_query_font_cookie_t {
  2394. unsigned int sequence;
  2395. } xcb_query_font_cookie_t;
  2396. /** Opcode for xcb_query_font. */
  2397. #define XCB_QUERY_FONT 47
  2398. /**
  2399. * @brief xcb_query_font_request_t
  2400. **/
  2401. typedef struct xcb_query_font_request_t {
  2402. uint8_t major_opcode;
  2403. uint8_t pad0;
  2404. uint16_t length;
  2405. xcb_fontable_t font;
  2406. } xcb_query_font_request_t;
  2407. /**
  2408. * @brief xcb_query_font_reply_t
  2409. **/
  2410. typedef struct xcb_query_font_reply_t {
  2411. uint8_t response_type;
  2412. uint8_t pad0;
  2413. uint16_t sequence;
  2414. uint32_t length;
  2415. xcb_charinfo_t min_bounds;
  2416. uint8_t pad1[4];
  2417. xcb_charinfo_t max_bounds;
  2418. uint8_t pad2[4];
  2419. uint16_t min_char_or_byte2;
  2420. uint16_t max_char_or_byte2;
  2421. uint16_t default_char;
  2422. uint16_t properties_len;
  2423. uint8_t draw_direction;
  2424. uint8_t min_byte1;
  2425. uint8_t max_byte1;
  2426. uint8_t all_chars_exist;
  2427. int16_t font_ascent;
  2428. int16_t font_descent;
  2429. uint32_t char_infos_len;
  2430. } xcb_query_font_reply_t;
  2431. /**
  2432. * @brief xcb_query_text_extents_cookie_t
  2433. **/
  2434. typedef struct xcb_query_text_extents_cookie_t {
  2435. unsigned int sequence;
  2436. } xcb_query_text_extents_cookie_t;
  2437. /** Opcode for xcb_query_text_extents. */
  2438. #define XCB_QUERY_TEXT_EXTENTS 48
  2439. /**
  2440. * @brief xcb_query_text_extents_request_t
  2441. **/
  2442. typedef struct xcb_query_text_extents_request_t {
  2443. uint8_t major_opcode;
  2444. uint8_t odd_length;
  2445. uint16_t length;
  2446. xcb_fontable_t font;
  2447. } xcb_query_text_extents_request_t;
  2448. /**
  2449. * @brief xcb_query_text_extents_reply_t
  2450. **/
  2451. typedef struct xcb_query_text_extents_reply_t {
  2452. uint8_t response_type;
  2453. uint8_t draw_direction;
  2454. uint16_t sequence;
  2455. uint32_t length;
  2456. int16_t font_ascent;
  2457. int16_t font_descent;
  2458. int16_t overall_ascent;
  2459. int16_t overall_descent;
  2460. int32_t overall_width;
  2461. int32_t overall_left;
  2462. int32_t overall_right;
  2463. } xcb_query_text_extents_reply_t;
  2464. /**
  2465. * @brief xcb_str_t
  2466. **/
  2467. typedef struct xcb_str_t {
  2468. uint8_t name_len;
  2469. } xcb_str_t;
  2470. /**
  2471. * @brief xcb_str_iterator_t
  2472. **/
  2473. typedef struct xcb_str_iterator_t {
  2474. xcb_str_t *data;
  2475. int rem;
  2476. int index;
  2477. } xcb_str_iterator_t;
  2478. /**
  2479. * @brief xcb_list_fonts_cookie_t
  2480. **/
  2481. typedef struct xcb_list_fonts_cookie_t {
  2482. unsigned int sequence;
  2483. } xcb_list_fonts_cookie_t;
  2484. /** Opcode for xcb_list_fonts. */
  2485. #define XCB_LIST_FONTS 49
  2486. /**
  2487. * @brief xcb_list_fonts_request_t
  2488. **/
  2489. typedef struct xcb_list_fonts_request_t {
  2490. uint8_t major_opcode;
  2491. uint8_t pad0;
  2492. uint16_t length;
  2493. uint16_t max_names;
  2494. uint16_t pattern_len;
  2495. } xcb_list_fonts_request_t;
  2496. /**
  2497. * @brief xcb_list_fonts_reply_t
  2498. **/
  2499. typedef struct xcb_list_fonts_reply_t {
  2500. uint8_t response_type;
  2501. uint8_t pad0;
  2502. uint16_t sequence;
  2503. uint32_t length;
  2504. uint16_t names_len;
  2505. uint8_t pad1[22];
  2506. } xcb_list_fonts_reply_t;
  2507. /**
  2508. * @brief xcb_list_fonts_with_info_cookie_t
  2509. **/
  2510. typedef struct xcb_list_fonts_with_info_cookie_t {
  2511. unsigned int sequence;
  2512. } xcb_list_fonts_with_info_cookie_t;
  2513. /** Opcode for xcb_list_fonts_with_info. */
  2514. #define XCB_LIST_FONTS_WITH_INFO 50
  2515. /**
  2516. * @brief xcb_list_fonts_with_info_request_t
  2517. **/
  2518. typedef struct xcb_list_fonts_with_info_request_t {
  2519. uint8_t major_opcode;
  2520. uint8_t pad0;
  2521. uint16_t length;
  2522. uint16_t max_names;
  2523. uint16_t pattern_len;
  2524. } xcb_list_fonts_with_info_request_t;
  2525. /**
  2526. * @brief xcb_list_fonts_with_info_reply_t
  2527. **/
  2528. typedef struct xcb_list_fonts_with_info_reply_t {
  2529. uint8_t response_type;
  2530. uint8_t name_len;
  2531. uint16_t sequence;
  2532. uint32_t length;
  2533. xcb_charinfo_t min_bounds;
  2534. uint8_t pad0[4];
  2535. xcb_charinfo_t max_bounds;
  2536. uint8_t pad1[4];
  2537. uint16_t min_char_or_byte2;
  2538. uint16_t max_char_or_byte2;
  2539. uint16_t default_char;
  2540. uint16_t properties_len;
  2541. uint8_t draw_direction;
  2542. uint8_t min_byte1;
  2543. uint8_t max_byte1;
  2544. uint8_t all_chars_exist;
  2545. int16_t font_ascent;
  2546. int16_t font_descent;
  2547. uint32_t replies_hint;
  2548. } xcb_list_fonts_with_info_reply_t;
  2549. /** Opcode for xcb_set_font_path. */
  2550. #define XCB_SET_FONT_PATH 51
  2551. /**
  2552. * @brief xcb_set_font_path_request_t
  2553. **/
  2554. typedef struct xcb_set_font_path_request_t {
  2555. uint8_t major_opcode;
  2556. uint8_t pad0;
  2557. uint16_t length;
  2558. uint16_t font_qty;
  2559. uint8_t pad1[2];
  2560. } xcb_set_font_path_request_t;
  2561. /**
  2562. * @brief xcb_get_font_path_cookie_t
  2563. **/
  2564. typedef struct xcb_get_font_path_cookie_t {
  2565. unsigned int sequence;
  2566. } xcb_get_font_path_cookie_t;
  2567. /** Opcode for xcb_get_font_path. */
  2568. #define XCB_GET_FONT_PATH 52
  2569. /**
  2570. * @brief xcb_get_font_path_request_t
  2571. **/
  2572. typedef struct xcb_get_font_path_request_t {
  2573. uint8_t major_opcode;
  2574. uint8_t pad0;
  2575. uint16_t length;
  2576. } xcb_get_font_path_request_t;
  2577. /**
  2578. * @brief xcb_get_font_path_reply_t
  2579. **/
  2580. typedef struct xcb_get_font_path_reply_t {
  2581. uint8_t response_type;
  2582. uint8_t pad0;
  2583. uint16_t sequence;
  2584. uint32_t length;
  2585. uint16_t path_len;
  2586. uint8_t pad1[22];
  2587. } xcb_get_font_path_reply_t;
  2588. /** Opcode for xcb_create_pixmap. */
  2589. #define XCB_CREATE_PIXMAP 53
  2590. /**
  2591. * @brief xcb_create_pixmap_request_t
  2592. **/
  2593. typedef struct xcb_create_pixmap_request_t {
  2594. uint8_t major_opcode;
  2595. uint8_t depth;
  2596. uint16_t length;
  2597. xcb_pixmap_t pid;
  2598. xcb_drawable_t drawable;
  2599. uint16_t width;
  2600. uint16_t height;
  2601. } xcb_create_pixmap_request_t;
  2602. /** Opcode for xcb_free_pixmap. */
  2603. #define XCB_FREE_PIXMAP 54
  2604. /**
  2605. * @brief xcb_free_pixmap_request_t
  2606. **/
  2607. typedef struct xcb_free_pixmap_request_t {
  2608. uint8_t major_opcode;
  2609. uint8_t pad0;
  2610. uint16_t length;
  2611. xcb_pixmap_t pixmap;
  2612. } xcb_free_pixmap_request_t;
  2613. typedef enum xcb_gc_t {
  2614. XCB_GC_FUNCTION = 1,
  2615. /**< TODO: Refer to GX */
  2616. XCB_GC_PLANE_MASK = 2,
  2617. /**< In graphics operations, given a source and destination pixel, the result is
  2618. computed bitwise on corresponding bits of the pixels; that is, a Boolean
  2619. operation is performed in each bit plane. The plane-mask restricts the
  2620. operation to a subset of planes, so the result is:
  2621. ((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask)) */
  2622. XCB_GC_FOREGROUND = 4,
  2623. /**< Foreground colorpixel. */
  2624. XCB_GC_BACKGROUND = 8,
  2625. /**< Background colorpixel. */
  2626. XCB_GC_LINE_WIDTH = 16,
  2627. /**< The line-width is measured in pixels and can be greater than or equal to one, a wide line, or the
  2628. special value zero, a thin line. */
  2629. XCB_GC_LINE_STYLE = 32,
  2630. /**< The line-style defines which sections of a line are drawn:
  2631. Solid The full path of the line is drawn.
  2632. DoubleDash The full path of the line is drawn, but the even dashes are filled differently
  2633. than the odd dashes (see fill-style), with Butt cap-style used where even and
  2634. odd dashes meet.
  2635. OnOffDash Only the even dashes are drawn, and cap-style applies to all internal ends of
  2636. the individual dashes (except NotLast is treated as Butt). */
  2637. XCB_GC_CAP_STYLE = 64,
  2638. /**< The cap-style defines how the endpoints of a path are drawn:
  2639. NotLast The result is equivalent to Butt, except that for a line-width of zero the final
  2640. endpoint is not drawn.
  2641. Butt The result is square at the endpoint (perpendicular to the slope of the line)
  2642. with no projection beyond.
  2643. Round The result is a circular arc with its diameter equal to the line-width, centered
  2644. on the endpoint; it is equivalent to Butt for line-width zero.
  2645. Projecting The result is square at the end, but the path continues beyond the endpoint for
  2646. a distance equal to half the line-width; it is equivalent to Butt for line-width
  2647. zero. */
  2648. XCB_GC_JOIN_STYLE = 128,
  2649. /**< The join-style defines how corners are drawn for wide lines:
  2650. Miter The outer edges of the two lines extend to meet at an angle. However, if the
  2651. angle is less than 11 degrees, a Bevel join-style is used instead.
  2652. Round The result is a circular arc with a diameter equal to the line-width, centered
  2653. on the joinpoint.
  2654. Bevel The result is Butt endpoint styles, and then the triangular notch is filled. */
  2655. XCB_GC_FILL_STYLE = 256,
  2656. /**< The fill-style defines the contents of the source for line, text, and fill requests. For all text and fill
  2657. requests (for example, PolyText8, PolyText16, PolyFillRectangle, FillPoly, and PolyFillArc)
  2658. as well as for line requests with line-style Solid, (for example, PolyLine, PolySegment,
  2659. PolyRectangle, PolyArc) and for the even dashes for line requests with line-style OnOffDash
  2660. or DoubleDash:
  2661. Solid Foreground
  2662. Tiled Tile
  2663. OpaqueStippled A tile with the same width and height as stipple but with background
  2664. everywhere stipple has a zero and with foreground everywhere stipple
  2665. has a one
  2666. Stippled Foreground masked by stipple
  2667. For the odd dashes for line requests with line-style DoubleDash:
  2668. Solid Background
  2669. Tiled Same as for even dashes
  2670. OpaqueStippled Same as for even dashes
  2671. Stippled Background masked by stipple */
  2672. XCB_GC_FILL_RULE = 512,
  2673. /**< */
  2674. XCB_GC_TILE = 1024,
  2675. /**< The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all
  2676. dimensions. When that plane is superimposed on the drawable for use in a graphics operation,
  2677. the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable
  2678. specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the
  2679. origin of whatever destination drawable is specified in a graphics request.
  2680. The tile pixmap must have the same root and depth as the gcontext (or a Match error results).
  2681. The stipple pixmap must have depth one and must have the same root as the gcontext (or a
  2682. Match error results). For fill-style Stippled (but not fill-style
  2683. OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an
  2684. additional clip mask to be ANDed with the clip-mask.
  2685. Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than
  2686. others. */
  2687. XCB_GC_STIPPLE = 2048,
  2688. /**< The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all
  2689. dimensions. When that plane is superimposed on the drawable for use in a graphics operation,
  2690. the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable
  2691. specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the
  2692. origin of whatever destination drawable is specified in a graphics request.
  2693. The tile pixmap must have the same root and depth as the gcontext (or a Match error results).
  2694. The stipple pixmap must have depth one and must have the same root as the gcontext (or a
  2695. Match error results). For fill-style Stippled (but not fill-style
  2696. OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an
  2697. additional clip mask to be ANDed with the clip-mask.
  2698. Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than
  2699. others. */
  2700. XCB_GC_TILE_STIPPLE_ORIGIN_X = 4096,
  2701. /**< TODO */
  2702. XCB_GC_TILE_STIPPLE_ORIGIN_Y = 8192,
  2703. /**< TODO */
  2704. XCB_GC_FONT = 16384,
  2705. /**< Which font to use for the `ImageText8` and `ImageText16` requests. */
  2706. XCB_GC_SUBWINDOW_MODE = 32768,
  2707. /**< For ClipByChildren, both source and destination windows are additionally
  2708. clipped by all viewable InputOutput children. For IncludeInferiors, neither
  2709. source nor destination window is
  2710. clipped by inferiors. This will result in including subwindow contents in the source and drawing
  2711. through subwindow boundaries of the destination. The use of IncludeInferiors with a source or
  2712. destination window of one depth with mapped inferiors of differing depth is not illegal, but the
  2713. semantics is undefined by the core protocol. */
  2714. XCB_GC_GRAPHICS_EXPOSURES = 65536,
  2715. /**< Whether ExposureEvents should be generated (1) or not (0).
  2716. The default is 1. */
  2717. XCB_GC_CLIP_ORIGIN_X = 131072,
  2718. /**< TODO */
  2719. XCB_GC_CLIP_ORIGIN_Y = 262144,
  2720. /**< TODO */
  2721. XCB_GC_CLIP_MASK = 524288,
  2722. /**< The clip-mask restricts writes to the destination drawable. Only pixels where the clip-mask has
  2723. bits set to 1 are drawn. Pixels are not drawn outside the area covered by the clip-mask or where
  2724. the clip-mask has bits set to 0. The clip-mask affects all graphics requests, but it does not clip
  2725. sources. The clip-mask origin is interpreted relative to the origin of whatever destination drawable is specified in a graphics request. If a pixmap is specified as the clip-mask, it must have
  2726. depth 1 and have the same root as the gcontext (or a Match error results). If clip-mask is None,
  2727. then pixels are always drawn, regardless of the clip origin. The clip-mask can also be set with the
  2728. SetClipRectangles request. */
  2729. XCB_GC_DASH_OFFSET = 1048576,
  2730. /**< TODO */
  2731. XCB_GC_DASH_LIST = 2097152,
  2732. /**< TODO */
  2733. XCB_GC_ARC_MODE = 4194304
  2734. /**< TODO */
  2735. } xcb_gc_t;
  2736. typedef enum xcb_gx_t {
  2737. XCB_GX_CLEAR = 0,
  2738. XCB_GX_AND = 1,
  2739. XCB_GX_AND_REVERSE = 2,
  2740. XCB_GX_COPY = 3,
  2741. XCB_GX_AND_INVERTED = 4,
  2742. XCB_GX_NOOP = 5,
  2743. XCB_GX_XOR = 6,
  2744. XCB_GX_OR = 7,
  2745. XCB_GX_NOR = 8,
  2746. XCB_GX_EQUIV = 9,
  2747. XCB_GX_INVERT = 10,
  2748. XCB_GX_OR_REVERSE = 11,
  2749. XCB_GX_COPY_INVERTED = 12,
  2750. XCB_GX_OR_INVERTED = 13,
  2751. XCB_GX_NAND = 14,
  2752. XCB_GX_SET = 15
  2753. } xcb_gx_t;
  2754. typedef enum xcb_line_style_t {
  2755. XCB_LINE_STYLE_SOLID = 0,
  2756. XCB_LINE_STYLE_ON_OFF_DASH = 1,
  2757. XCB_LINE_STYLE_DOUBLE_DASH = 2
  2758. } xcb_line_style_t;
  2759. typedef enum xcb_cap_style_t {
  2760. XCB_CAP_STYLE_NOT_LAST = 0,
  2761. XCB_CAP_STYLE_BUTT = 1,
  2762. XCB_CAP_STYLE_ROUND = 2,
  2763. XCB_CAP_STYLE_PROJECTING = 3
  2764. } xcb_cap_style_t;
  2765. typedef enum xcb_join_style_t {
  2766. XCB_JOIN_STYLE_MITER = 0,
  2767. XCB_JOIN_STYLE_ROUND = 1,
  2768. XCB_JOIN_STYLE_BEVEL = 2
  2769. } xcb_join_style_t;
  2770. typedef enum xcb_fill_style_t {
  2771. XCB_FILL_STYLE_SOLID = 0,
  2772. XCB_FILL_STYLE_TILED = 1,
  2773. XCB_FILL_STYLE_STIPPLED = 2,
  2774. XCB_FILL_STYLE_OPAQUE_STIPPLED = 3
  2775. } xcb_fill_style_t;
  2776. typedef enum xcb_fill_rule_t {
  2777. XCB_FILL_RULE_EVEN_ODD = 0,
  2778. XCB_FILL_RULE_WINDING = 1
  2779. } xcb_fill_rule_t;
  2780. typedef enum xcb_subwindow_mode_t {
  2781. XCB_SUBWINDOW_MODE_CLIP_BY_CHILDREN = 0,
  2782. XCB_SUBWINDOW_MODE_INCLUDE_INFERIORS = 1
  2783. } xcb_subwindow_mode_t;
  2784. typedef enum xcb_arc_mode_t {
  2785. XCB_ARC_MODE_CHORD = 0,
  2786. XCB_ARC_MODE_PIE_SLICE = 1
  2787. } xcb_arc_mode_t;
  2788. /**
  2789. * @brief xcb_create_gc_value_list_t
  2790. **/
  2791. typedef struct xcb_create_gc_value_list_t {
  2792. uint32_t function;
  2793. uint32_t plane_mask;
  2794. uint32_t foreground;
  2795. uint32_t background;
  2796. uint32_t line_width;
  2797. uint32_t line_style;
  2798. uint32_t cap_style;
  2799. uint32_t join_style;
  2800. uint32_t fill_style;
  2801. uint32_t fill_rule;
  2802. xcb_pixmap_t tile;
  2803. xcb_pixmap_t stipple;
  2804. int32_t tile_stipple_x_origin;
  2805. int32_t tile_stipple_y_origin;
  2806. xcb_font_t font;
  2807. uint32_t subwindow_mode;
  2808. xcb_bool32_t graphics_exposures;
  2809. int32_t clip_x_origin;
  2810. int32_t clip_y_origin;
  2811. xcb_pixmap_t clip_mask;
  2812. uint32_t dash_offset;
  2813. uint32_t dashes;
  2814. uint32_t arc_mode;
  2815. } xcb_create_gc_value_list_t;
  2816. /** Opcode for xcb_create_gc. */
  2817. #define XCB_CREATE_GC 55
  2818. /**
  2819. * @brief xcb_create_gc_request_t
  2820. **/
  2821. typedef struct xcb_create_gc_request_t {
  2822. uint8_t major_opcode;
  2823. uint8_t pad0;
  2824. uint16_t length;
  2825. xcb_gcontext_t cid;
  2826. xcb_drawable_t drawable;
  2827. uint32_t value_mask;
  2828. } xcb_create_gc_request_t;
  2829. /**
  2830. * @brief xcb_change_gc_value_list_t
  2831. **/
  2832. typedef struct xcb_change_gc_value_list_t {
  2833. uint32_t function;
  2834. uint32_t plane_mask;
  2835. uint32_t foreground;
  2836. uint32_t background;
  2837. uint32_t line_width;
  2838. uint32_t line_style;
  2839. uint32_t cap_style;
  2840. uint32_t join_style;
  2841. uint32_t fill_style;
  2842. uint32_t fill_rule;
  2843. xcb_pixmap_t tile;
  2844. xcb_pixmap_t stipple;
  2845. int32_t tile_stipple_x_origin;
  2846. int32_t tile_stipple_y_origin;
  2847. xcb_font_t font;
  2848. uint32_t subwindow_mode;
  2849. xcb_bool32_t graphics_exposures;
  2850. int32_t clip_x_origin;
  2851. int32_t clip_y_origin;
  2852. xcb_pixmap_t clip_mask;
  2853. uint32_t dash_offset;
  2854. uint32_t dashes;
  2855. uint32_t arc_mode;
  2856. } xcb_change_gc_value_list_t;
  2857. /** Opcode for xcb_change_gc. */
  2858. #define XCB_CHANGE_GC 56
  2859. /**
  2860. * @brief xcb_change_gc_request_t
  2861. **/
  2862. typedef struct xcb_change_gc_request_t {
  2863. uint8_t major_opcode;
  2864. uint8_t pad0;
  2865. uint16_t length;
  2866. xcb_gcontext_t gc;
  2867. uint32_t value_mask;
  2868. } xcb_change_gc_request_t;
  2869. /** Opcode for xcb_copy_gc. */
  2870. #define XCB_COPY_GC 57
  2871. /**
  2872. * @brief xcb_copy_gc_request_t
  2873. **/
  2874. typedef struct xcb_copy_gc_request_t {
  2875. uint8_t major_opcode;
  2876. uint8_t pad0;
  2877. uint16_t length;
  2878. xcb_gcontext_t src_gc;
  2879. xcb_gcontext_t dst_gc;
  2880. uint32_t value_mask;
  2881. } xcb_copy_gc_request_t;
  2882. /** Opcode for xcb_set_dashes. */
  2883. #define XCB_SET_DASHES 58
  2884. /**
  2885. * @brief xcb_set_dashes_request_t
  2886. **/
  2887. typedef struct xcb_set_dashes_request_t {
  2888. uint8_t major_opcode;
  2889. uint8_t pad0;
  2890. uint16_t length;
  2891. xcb_gcontext_t gc;
  2892. uint16_t dash_offset;
  2893. uint16_t dashes_len;
  2894. } xcb_set_dashes_request_t;
  2895. typedef enum xcb_clip_ordering_t {
  2896. XCB_CLIP_ORDERING_UNSORTED = 0,
  2897. XCB_CLIP_ORDERING_Y_SORTED = 1,
  2898. XCB_CLIP_ORDERING_YX_SORTED = 2,
  2899. XCB_CLIP_ORDERING_YX_BANDED = 3
  2900. } xcb_clip_ordering_t;
  2901. /** Opcode for xcb_set_clip_rectangles. */
  2902. #define XCB_SET_CLIP_RECTANGLES 59
  2903. /**
  2904. * @brief xcb_set_clip_rectangles_request_t
  2905. **/
  2906. typedef struct xcb_set_clip_rectangles_request_t {
  2907. uint8_t major_opcode;
  2908. uint8_t ordering;
  2909. uint16_t length;
  2910. xcb_gcontext_t gc;
  2911. int16_t clip_x_origin;
  2912. int16_t clip_y_origin;
  2913. } xcb_set_clip_rectangles_request_t;
  2914. /** Opcode for xcb_free_gc. */
  2915. #define XCB_FREE_GC 60
  2916. /**
  2917. * @brief xcb_free_gc_request_t
  2918. **/
  2919. typedef struct xcb_free_gc_request_t {
  2920. uint8_t major_opcode;
  2921. uint8_t pad0;
  2922. uint16_t length;
  2923. xcb_gcontext_t gc;
  2924. } xcb_free_gc_request_t;
  2925. /** Opcode for xcb_clear_area. */
  2926. #define XCB_CLEAR_AREA 61
  2927. /**
  2928. * @brief xcb_clear_area_request_t
  2929. **/
  2930. typedef struct xcb_clear_area_request_t {
  2931. uint8_t major_opcode;
  2932. uint8_t exposures;
  2933. uint16_t length;
  2934. xcb_window_t window;
  2935. int16_t x;
  2936. int16_t y;
  2937. uint16_t width;
  2938. uint16_t height;
  2939. } xcb_clear_area_request_t;
  2940. /** Opcode for xcb_copy_area. */
  2941. #define XCB_COPY_AREA 62
  2942. /**
  2943. * @brief xcb_copy_area_request_t
  2944. **/
  2945. typedef struct xcb_copy_area_request_t {
  2946. uint8_t major_opcode;
  2947. uint8_t pad0;
  2948. uint16_t length;
  2949. xcb_drawable_t src_drawable;
  2950. xcb_drawable_t dst_drawable;
  2951. xcb_gcontext_t gc;
  2952. int16_t src_x;
  2953. int16_t src_y;
  2954. int16_t dst_x;
  2955. int16_t dst_y;
  2956. uint16_t width;
  2957. uint16_t height;
  2958. } xcb_copy_area_request_t;
  2959. /** Opcode for xcb_copy_plane. */
  2960. #define XCB_COPY_PLANE 63
  2961. /**
  2962. * @brief xcb_copy_plane_request_t
  2963. **/
  2964. typedef struct xcb_copy_plane_request_t {
  2965. uint8_t major_opcode;
  2966. uint8_t pad0;
  2967. uint16_t length;
  2968. xcb_drawable_t src_drawable;
  2969. xcb_drawable_t dst_drawable;
  2970. xcb_gcontext_t gc;
  2971. int16_t src_x;
  2972. int16_t src_y;
  2973. int16_t dst_x;
  2974. int16_t dst_y;
  2975. uint16_t width;
  2976. uint16_t height;
  2977. uint32_t bit_plane;
  2978. } xcb_copy_plane_request_t;
  2979. typedef enum xcb_coord_mode_t {
  2980. XCB_COORD_MODE_ORIGIN = 0,
  2981. /**< Treats all coordinates as relative to the origin. */
  2982. XCB_COORD_MODE_PREVIOUS = 1
  2983. /**< Treats all coordinates after the first as relative to the previous coordinate. */
  2984. } xcb_coord_mode_t;
  2985. /** Opcode for xcb_poly_point. */
  2986. #define XCB_POLY_POINT 64
  2987. /**
  2988. * @brief xcb_poly_point_request_t
  2989. **/
  2990. typedef struct xcb_poly_point_request_t {
  2991. uint8_t major_opcode;
  2992. uint8_t coordinate_mode;
  2993. uint16_t length;
  2994. xcb_drawable_t drawable;
  2995. xcb_gcontext_t gc;
  2996. } xcb_poly_point_request_t;
  2997. /** Opcode for xcb_poly_line. */
  2998. #define XCB_POLY_LINE 65
  2999. /**
  3000. * @brief xcb_poly_line_request_t
  3001. **/
  3002. typedef struct xcb_poly_line_request_t {
  3003. uint8_t major_opcode;
  3004. uint8_t coordinate_mode;
  3005. uint16_t length;
  3006. xcb_drawable_t drawable;
  3007. xcb_gcontext_t gc;
  3008. } xcb_poly_line_request_t;
  3009. /**
  3010. * @brief xcb_segment_t
  3011. **/
  3012. typedef struct xcb_segment_t {
  3013. int16_t x1;
  3014. int16_t y1;
  3015. int16_t x2;
  3016. int16_t y2;
  3017. } xcb_segment_t;
  3018. /**
  3019. * @brief xcb_segment_iterator_t
  3020. **/
  3021. typedef struct xcb_segment_iterator_t {
  3022. xcb_segment_t *data;
  3023. int rem;
  3024. int index;
  3025. } xcb_segment_iterator_t;
  3026. /** Opcode for xcb_poly_segment. */
  3027. #define XCB_POLY_SEGMENT 66
  3028. /**
  3029. * @brief xcb_poly_segment_request_t
  3030. **/
  3031. typedef struct xcb_poly_segment_request_t {
  3032. uint8_t major_opcode;
  3033. uint8_t pad0;
  3034. uint16_t length;
  3035. xcb_drawable_t drawable;
  3036. xcb_gcontext_t gc;
  3037. } xcb_poly_segment_request_t;
  3038. /** Opcode for xcb_poly_rectangle. */
  3039. #define XCB_POLY_RECTANGLE 67
  3040. /**
  3041. * @brief xcb_poly_rectangle_request_t
  3042. **/
  3043. typedef struct xcb_poly_rectangle_request_t {
  3044. uint8_t major_opcode;
  3045. uint8_t pad0;
  3046. uint16_t length;
  3047. xcb_drawable_t drawable;
  3048. xcb_gcontext_t gc;
  3049. } xcb_poly_rectangle_request_t;
  3050. /** Opcode for xcb_poly_arc. */
  3051. #define XCB_POLY_ARC 68
  3052. /**
  3053. * @brief xcb_poly_arc_request_t
  3054. **/
  3055. typedef struct xcb_poly_arc_request_t {
  3056. uint8_t major_opcode;
  3057. uint8_t pad0;
  3058. uint16_t length;
  3059. xcb_drawable_t drawable;
  3060. xcb_gcontext_t gc;
  3061. } xcb_poly_arc_request_t;
  3062. typedef enum xcb_poly_shape_t {
  3063. XCB_POLY_SHAPE_COMPLEX = 0,
  3064. XCB_POLY_SHAPE_NONCONVEX = 1,
  3065. XCB_POLY_SHAPE_CONVEX = 2
  3066. } xcb_poly_shape_t;
  3067. /** Opcode for xcb_fill_poly. */
  3068. #define XCB_FILL_POLY 69
  3069. /**
  3070. * @brief xcb_fill_poly_request_t
  3071. **/
  3072. typedef struct xcb_fill_poly_request_t {
  3073. uint8_t major_opcode;
  3074. uint8_t pad0;
  3075. uint16_t length;
  3076. xcb_drawable_t drawable;
  3077. xcb_gcontext_t gc;
  3078. uint8_t shape;
  3079. uint8_t coordinate_mode;
  3080. uint8_t pad1[2];
  3081. } xcb_fill_poly_request_t;
  3082. /** Opcode for xcb_poly_fill_rectangle. */
  3083. #define XCB_POLY_FILL_RECTANGLE 70
  3084. /**
  3085. * @brief xcb_poly_fill_rectangle_request_t
  3086. **/
  3087. typedef struct xcb_poly_fill_rectangle_request_t {
  3088. uint8_t major_opcode;
  3089. uint8_t pad0;
  3090. uint16_t length;
  3091. xcb_drawable_t drawable;
  3092. xcb_gcontext_t gc;
  3093. } xcb_poly_fill_rectangle_request_t;
  3094. /** Opcode for xcb_poly_fill_arc. */
  3095. #define XCB_POLY_FILL_ARC 71
  3096. /**
  3097. * @brief xcb_poly_fill_arc_request_t
  3098. **/
  3099. typedef struct xcb_poly_fill_arc_request_t {
  3100. uint8_t major_opcode;
  3101. uint8_t pad0;
  3102. uint16_t length;
  3103. xcb_drawable_t drawable;
  3104. xcb_gcontext_t gc;
  3105. } xcb_poly_fill_arc_request_t;
  3106. typedef enum xcb_image_format_t {
  3107. XCB_IMAGE_FORMAT_XY_BITMAP = 0,
  3108. XCB_IMAGE_FORMAT_XY_PIXMAP = 1,
  3109. XCB_IMAGE_FORMAT_Z_PIXMAP = 2
  3110. } xcb_image_format_t;
  3111. /** Opcode for xcb_put_image. */
  3112. #define XCB_PUT_IMAGE 72
  3113. /**
  3114. * @brief xcb_put_image_request_t
  3115. **/
  3116. typedef struct xcb_put_image_request_t {
  3117. uint8_t major_opcode;
  3118. uint8_t format;
  3119. uint16_t length;
  3120. xcb_drawable_t drawable;
  3121. xcb_gcontext_t gc;
  3122. uint16_t width;
  3123. uint16_t height;
  3124. int16_t dst_x;
  3125. int16_t dst_y;
  3126. uint8_t left_pad;
  3127. uint8_t depth;
  3128. uint8_t pad0[2];
  3129. } xcb_put_image_request_t;
  3130. /**
  3131. * @brief xcb_get_image_cookie_t
  3132. **/
  3133. typedef struct xcb_get_image_cookie_t {
  3134. unsigned int sequence;
  3135. } xcb_get_image_cookie_t;
  3136. /** Opcode for xcb_get_image. */
  3137. #define XCB_GET_IMAGE 73
  3138. /**
  3139. * @brief xcb_get_image_request_t
  3140. **/
  3141. typedef struct xcb_get_image_request_t {
  3142. uint8_t major_opcode;
  3143. uint8_t format;
  3144. uint16_t length;
  3145. xcb_drawable_t drawable;
  3146. int16_t x;
  3147. int16_t y;
  3148. uint16_t width;
  3149. uint16_t height;
  3150. uint32_t plane_mask;
  3151. } xcb_get_image_request_t;
  3152. /**
  3153. * @brief xcb_get_image_reply_t
  3154. **/
  3155. typedef struct xcb_get_image_reply_t {
  3156. uint8_t response_type;
  3157. uint8_t depth;
  3158. uint16_t sequence;
  3159. uint32_t length;
  3160. xcb_visualid_t visual;
  3161. uint8_t pad0[20];
  3162. } xcb_get_image_reply_t;
  3163. /** Opcode for xcb_poly_text_8. */
  3164. #define XCB_POLY_TEXT_8 74
  3165. /**
  3166. * @brief xcb_poly_text_8_request_t
  3167. **/
  3168. typedef struct xcb_poly_text_8_request_t {
  3169. uint8_t major_opcode;
  3170. uint8_t pad0;
  3171. uint16_t length;
  3172. xcb_drawable_t drawable;
  3173. xcb_gcontext_t gc;
  3174. int16_t x;
  3175. int16_t y;
  3176. } xcb_poly_text_8_request_t;
  3177. /** Opcode for xcb_poly_text_16. */
  3178. #define XCB_POLY_TEXT_16 75
  3179. /**
  3180. * @brief xcb_poly_text_16_request_t
  3181. **/
  3182. typedef struct xcb_poly_text_16_request_t {
  3183. uint8_t major_opcode;
  3184. uint8_t pad0;
  3185. uint16_t length;
  3186. xcb_drawable_t drawable;
  3187. xcb_gcontext_t gc;
  3188. int16_t x;
  3189. int16_t y;
  3190. } xcb_poly_text_16_request_t;
  3191. /** Opcode for xcb_image_text_8. */
  3192. #define XCB_IMAGE_TEXT_8 76
  3193. /**
  3194. * @brief xcb_image_text_8_request_t
  3195. **/
  3196. typedef struct xcb_image_text_8_request_t {
  3197. uint8_t major_opcode;
  3198. uint8_t string_len;
  3199. uint16_t length;
  3200. xcb_drawable_t drawable;
  3201. xcb_gcontext_t gc;
  3202. int16_t x;
  3203. int16_t y;
  3204. } xcb_image_text_8_request_t;
  3205. /** Opcode for xcb_image_text_16. */
  3206. #define XCB_IMAGE_TEXT_16 77
  3207. /**
  3208. * @brief xcb_image_text_16_request_t
  3209. **/
  3210. typedef struct xcb_image_text_16_request_t {
  3211. uint8_t major_opcode;
  3212. uint8_t string_len;
  3213. uint16_t length;
  3214. xcb_drawable_t drawable;
  3215. xcb_gcontext_t gc;
  3216. int16_t x;
  3217. int16_t y;
  3218. } xcb_image_text_16_request_t;
  3219. typedef enum xcb_colormap_alloc_t {
  3220. XCB_COLORMAP_ALLOC_NONE = 0,
  3221. XCB_COLORMAP_ALLOC_ALL = 1
  3222. } xcb_colormap_alloc_t;
  3223. /** Opcode for xcb_create_colormap. */
  3224. #define XCB_CREATE_COLORMAP 78
  3225. /**
  3226. * @brief xcb_create_colormap_request_t
  3227. **/
  3228. typedef struct xcb_create_colormap_request_t {
  3229. uint8_t major_opcode;
  3230. uint8_t alloc;
  3231. uint16_t length;
  3232. xcb_colormap_t mid;
  3233. xcb_window_t window;
  3234. xcb_visualid_t visual;
  3235. } xcb_create_colormap_request_t;
  3236. /** Opcode for xcb_free_colormap. */
  3237. #define XCB_FREE_COLORMAP 79
  3238. /**
  3239. * @brief xcb_free_colormap_request_t
  3240. **/
  3241. typedef struct xcb_free_colormap_request_t {
  3242. uint8_t major_opcode;
  3243. uint8_t pad0;
  3244. uint16_t length;
  3245. xcb_colormap_t cmap;
  3246. } xcb_free_colormap_request_t;
  3247. /** Opcode for xcb_copy_colormap_and_free. */
  3248. #define XCB_COPY_COLORMAP_AND_FREE 80
  3249. /**
  3250. * @brief xcb_copy_colormap_and_free_request_t
  3251. **/
  3252. typedef struct xcb_copy_colormap_and_free_request_t {
  3253. uint8_t major_opcode;
  3254. uint8_t pad0;
  3255. uint16_t length;
  3256. xcb_colormap_t mid;
  3257. xcb_colormap_t src_cmap;
  3258. } xcb_copy_colormap_and_free_request_t;
  3259. /** Opcode for xcb_install_colormap. */
  3260. #define XCB_INSTALL_COLORMAP 81
  3261. /**
  3262. * @brief xcb_install_colormap_request_t
  3263. **/
  3264. typedef struct xcb_install_colormap_request_t {
  3265. uint8_t major_opcode;
  3266. uint8_t pad0;
  3267. uint16_t length;
  3268. xcb_colormap_t cmap;
  3269. } xcb_install_colormap_request_t;
  3270. /** Opcode for xcb_uninstall_colormap. */
  3271. #define XCB_UNINSTALL_COLORMAP 82
  3272. /**
  3273. * @brief xcb_uninstall_colormap_request_t
  3274. **/
  3275. typedef struct xcb_uninstall_colormap_request_t {
  3276. uint8_t major_opcode;
  3277. uint8_t pad0;
  3278. uint16_t length;
  3279. xcb_colormap_t cmap;
  3280. } xcb_uninstall_colormap_request_t;
  3281. /**
  3282. * @brief xcb_list_installed_colormaps_cookie_t
  3283. **/
  3284. typedef struct xcb_list_installed_colormaps_cookie_t {
  3285. unsigned int sequence;
  3286. } xcb_list_installed_colormaps_cookie_t;
  3287. /** Opcode for xcb_list_installed_colormaps. */
  3288. #define XCB_LIST_INSTALLED_COLORMAPS 83
  3289. /**
  3290. * @brief xcb_list_installed_colormaps_request_t
  3291. **/
  3292. typedef struct xcb_list_installed_colormaps_request_t {
  3293. uint8_t major_opcode;
  3294. uint8_t pad0;
  3295. uint16_t length;
  3296. xcb_window_t window;
  3297. } xcb_list_installed_colormaps_request_t;
  3298. /**
  3299. * @brief xcb_list_installed_colormaps_reply_t
  3300. **/
  3301. typedef struct xcb_list_installed_colormaps_reply_t {
  3302. uint8_t response_type;
  3303. uint8_t pad0;
  3304. uint16_t sequence;
  3305. uint32_t length;
  3306. uint16_t cmaps_len;
  3307. uint8_t pad1[22];
  3308. } xcb_list_installed_colormaps_reply_t;
  3309. /**
  3310. * @brief xcb_alloc_color_cookie_t
  3311. **/
  3312. typedef struct xcb_alloc_color_cookie_t {
  3313. unsigned int sequence;
  3314. } xcb_alloc_color_cookie_t;
  3315. /** Opcode for xcb_alloc_color. */
  3316. #define XCB_ALLOC_COLOR 84
  3317. /**
  3318. * @brief xcb_alloc_color_request_t
  3319. **/
  3320. typedef struct xcb_alloc_color_request_t {
  3321. uint8_t major_opcode;
  3322. uint8_t pad0;
  3323. uint16_t length;
  3324. xcb_colormap_t cmap;
  3325. uint16_t red;
  3326. uint16_t green;
  3327. uint16_t blue;
  3328. uint8_t pad1[2];
  3329. } xcb_alloc_color_request_t;
  3330. /**
  3331. * @brief xcb_alloc_color_reply_t
  3332. **/
  3333. typedef struct xcb_alloc_color_reply_t {
  3334. uint8_t response_type;
  3335. uint8_t pad0;
  3336. uint16_t sequence;
  3337. uint32_t length;
  3338. uint16_t red;
  3339. uint16_t green;
  3340. uint16_t blue;
  3341. uint8_t pad1[2];
  3342. uint32_t pixel;
  3343. } xcb_alloc_color_reply_t;
  3344. /**
  3345. * @brief xcb_alloc_named_color_cookie_t
  3346. **/
  3347. typedef struct xcb_alloc_named_color_cookie_t {
  3348. unsigned int sequence;
  3349. } xcb_alloc_named_color_cookie_t;
  3350. /** Opcode for xcb_alloc_named_color. */
  3351. #define XCB_ALLOC_NAMED_COLOR 85
  3352. /**
  3353. * @brief xcb_alloc_named_color_request_t
  3354. **/
  3355. typedef struct xcb_alloc_named_color_request_t {
  3356. uint8_t major_opcode;
  3357. uint8_t pad0;
  3358. uint16_t length;
  3359. xcb_colormap_t cmap;
  3360. uint16_t name_len;
  3361. uint8_t pad1[2];
  3362. } xcb_alloc_named_color_request_t;
  3363. /**
  3364. * @brief xcb_alloc_named_color_reply_t
  3365. **/
  3366. typedef struct xcb_alloc_named_color_reply_t {
  3367. uint8_t response_type;
  3368. uint8_t pad0;
  3369. uint16_t sequence;
  3370. uint32_t length;
  3371. uint32_t pixel;
  3372. uint16_t exact_red;
  3373. uint16_t exact_green;
  3374. uint16_t exact_blue;
  3375. uint16_t visual_red;
  3376. uint16_t visual_green;
  3377. uint16_t visual_blue;
  3378. } xcb_alloc_named_color_reply_t;
  3379. /**
  3380. * @brief xcb_alloc_color_cells_cookie_t
  3381. **/
  3382. typedef struct xcb_alloc_color_cells_cookie_t {
  3383. unsigned int sequence;
  3384. } xcb_alloc_color_cells_cookie_t;
  3385. /** Opcode for xcb_alloc_color_cells. */
  3386. #define XCB_ALLOC_COLOR_CELLS 86
  3387. /**
  3388. * @brief xcb_alloc_color_cells_request_t
  3389. **/
  3390. typedef struct xcb_alloc_color_cells_request_t {
  3391. uint8_t major_opcode;
  3392. uint8_t contiguous;
  3393. uint16_t length;
  3394. xcb_colormap_t cmap;
  3395. uint16_t colors;
  3396. uint16_t planes;
  3397. } xcb_alloc_color_cells_request_t;
  3398. /**
  3399. * @brief xcb_alloc_color_cells_reply_t
  3400. **/
  3401. typedef struct xcb_alloc_color_cells_reply_t {
  3402. uint8_t response_type;
  3403. uint8_t pad0;
  3404. uint16_t sequence;
  3405. uint32_t length;
  3406. uint16_t pixels_len;
  3407. uint16_t masks_len;
  3408. uint8_t pad1[20];
  3409. } xcb_alloc_color_cells_reply_t;
  3410. /**
  3411. * @brief xcb_alloc_color_planes_cookie_t
  3412. **/
  3413. typedef struct xcb_alloc_color_planes_cookie_t {
  3414. unsigned int sequence;
  3415. } xcb_alloc_color_planes_cookie_t;
  3416. /** Opcode for xcb_alloc_color_planes. */
  3417. #define XCB_ALLOC_COLOR_PLANES 87
  3418. /**
  3419. * @brief xcb_alloc_color_planes_request_t
  3420. **/
  3421. typedef struct xcb_alloc_color_planes_request_t {
  3422. uint8_t major_opcode;
  3423. uint8_t contiguous;
  3424. uint16_t length;
  3425. xcb_colormap_t cmap;
  3426. uint16_t colors;
  3427. uint16_t reds;
  3428. uint16_t greens;
  3429. uint16_t blues;
  3430. } xcb_alloc_color_planes_request_t;
  3431. /**
  3432. * @brief xcb_alloc_color_planes_reply_t
  3433. **/
  3434. typedef struct xcb_alloc_color_planes_reply_t {
  3435. uint8_t response_type;
  3436. uint8_t pad0;
  3437. uint16_t sequence;
  3438. uint32_t length;
  3439. uint16_t pixels_len;
  3440. uint8_t pad1[2];
  3441. uint32_t red_mask;
  3442. uint32_t green_mask;
  3443. uint32_t blue_mask;
  3444. uint8_t pad2[8];
  3445. } xcb_alloc_color_planes_reply_t;
  3446. /** Opcode for xcb_free_colors. */
  3447. #define XCB_FREE_COLORS 88
  3448. /**
  3449. * @brief xcb_free_colors_request_t
  3450. **/
  3451. typedef struct xcb_free_colors_request_t {
  3452. uint8_t major_opcode;
  3453. uint8_t pad0;
  3454. uint16_t length;
  3455. xcb_colormap_t cmap;
  3456. uint32_t plane_mask;
  3457. } xcb_free_colors_request_t;
  3458. typedef enum xcb_color_flag_t {
  3459. XCB_COLOR_FLAG_RED = 1,
  3460. XCB_COLOR_FLAG_GREEN = 2,
  3461. XCB_COLOR_FLAG_BLUE = 4
  3462. } xcb_color_flag_t;
  3463. /**
  3464. * @brief xcb_coloritem_t
  3465. **/
  3466. typedef struct xcb_coloritem_t {
  3467. uint32_t pixel;
  3468. uint16_t red;
  3469. uint16_t green;
  3470. uint16_t blue;
  3471. uint8_t flags;
  3472. uint8_t pad0;
  3473. } xcb_coloritem_t;
  3474. /**
  3475. * @brief xcb_coloritem_iterator_t
  3476. **/
  3477. typedef struct xcb_coloritem_iterator_t {
  3478. xcb_coloritem_t *data;
  3479. int rem;
  3480. int index;
  3481. } xcb_coloritem_iterator_t;
  3482. /** Opcode for xcb_store_colors. */
  3483. #define XCB_STORE_COLORS 89
  3484. /**
  3485. * @brief xcb_store_colors_request_t
  3486. **/
  3487. typedef struct xcb_store_colors_request_t {
  3488. uint8_t major_opcode;
  3489. uint8_t pad0;
  3490. uint16_t length;
  3491. xcb_colormap_t cmap;
  3492. } xcb_store_colors_request_t;
  3493. /** Opcode for xcb_store_named_color. */
  3494. #define XCB_STORE_NAMED_COLOR 90
  3495. /**
  3496. * @brief xcb_store_named_color_request_t
  3497. **/
  3498. typedef struct xcb_store_named_color_request_t {
  3499. uint8_t major_opcode;
  3500. uint8_t flags;
  3501. uint16_t length;
  3502. xcb_colormap_t cmap;
  3503. uint32_t pixel;
  3504. uint16_t name_len;
  3505. uint8_t pad0[2];
  3506. } xcb_store_named_color_request_t;
  3507. /**
  3508. * @brief xcb_rgb_t
  3509. **/
  3510. typedef struct xcb_rgb_t {
  3511. uint16_t red;
  3512. uint16_t green;
  3513. uint16_t blue;
  3514. uint8_t pad0[2];
  3515. } xcb_rgb_t;
  3516. /**
  3517. * @brief xcb_rgb_iterator_t
  3518. **/
  3519. typedef struct xcb_rgb_iterator_t {
  3520. xcb_rgb_t *data;
  3521. int rem;
  3522. int index;
  3523. } xcb_rgb_iterator_t;
  3524. /**
  3525. * @brief xcb_query_colors_cookie_t
  3526. **/
  3527. typedef struct xcb_query_colors_cookie_t {
  3528. unsigned int sequence;
  3529. } xcb_query_colors_cookie_t;
  3530. /** Opcode for xcb_query_colors. */
  3531. #define XCB_QUERY_COLORS 91
  3532. /**
  3533. * @brief xcb_query_colors_request_t
  3534. **/
  3535. typedef struct xcb_query_colors_request_t {
  3536. uint8_t major_opcode;
  3537. uint8_t pad0;
  3538. uint16_t length;
  3539. xcb_colormap_t cmap;
  3540. } xcb_query_colors_request_t;
  3541. /**
  3542. * @brief xcb_query_colors_reply_t
  3543. **/
  3544. typedef struct xcb_query_colors_reply_t {
  3545. uint8_t response_type;
  3546. uint8_t pad0;
  3547. uint16_t sequence;
  3548. uint32_t length;
  3549. uint16_t colors_len;
  3550. uint8_t pad1[22];
  3551. } xcb_query_colors_reply_t;
  3552. /**
  3553. * @brief xcb_lookup_color_cookie_t
  3554. **/
  3555. typedef struct xcb_lookup_color_cookie_t {
  3556. unsigned int sequence;
  3557. } xcb_lookup_color_cookie_t;
  3558. /** Opcode for xcb_lookup_color. */
  3559. #define XCB_LOOKUP_COLOR 92
  3560. /**
  3561. * @brief xcb_lookup_color_request_t
  3562. **/
  3563. typedef struct xcb_lookup_color_request_t {
  3564. uint8_t major_opcode;
  3565. uint8_t pad0;
  3566. uint16_t length;
  3567. xcb_colormap_t cmap;
  3568. uint16_t name_len;
  3569. uint8_t pad1[2];
  3570. } xcb_lookup_color_request_t;
  3571. /**
  3572. * @brief xcb_lookup_color_reply_t
  3573. **/
  3574. typedef struct xcb_lookup_color_reply_t {
  3575. uint8_t response_type;
  3576. uint8_t pad0;
  3577. uint16_t sequence;
  3578. uint32_t length;
  3579. uint16_t exact_red;
  3580. uint16_t exact_green;
  3581. uint16_t exact_blue;
  3582. uint16_t visual_red;
  3583. uint16_t visual_green;
  3584. uint16_t visual_blue;
  3585. } xcb_lookup_color_reply_t;
  3586. typedef enum xcb_pixmap_enum_t {
  3587. XCB_PIXMAP_NONE = 0
  3588. } xcb_pixmap_enum_t;
  3589. /** Opcode for xcb_create_cursor. */
  3590. #define XCB_CREATE_CURSOR 93
  3591. /**
  3592. * @brief xcb_create_cursor_request_t
  3593. **/
  3594. typedef struct xcb_create_cursor_request_t {
  3595. uint8_t major_opcode;
  3596. uint8_t pad0;
  3597. uint16_t length;
  3598. xcb_cursor_t cid;
  3599. xcb_pixmap_t source;
  3600. xcb_pixmap_t mask;
  3601. uint16_t fore_red;
  3602. uint16_t fore_green;
  3603. uint16_t fore_blue;
  3604. uint16_t back_red;
  3605. uint16_t back_green;
  3606. uint16_t back_blue;
  3607. uint16_t x;
  3608. uint16_t y;
  3609. } xcb_create_cursor_request_t;
  3610. typedef enum xcb_font_enum_t {
  3611. XCB_FONT_NONE = 0
  3612. } xcb_font_enum_t;
  3613. /** Opcode for xcb_create_glyph_cursor. */
  3614. #define XCB_CREATE_GLYPH_CURSOR 94
  3615. /**
  3616. * @brief xcb_create_glyph_cursor_request_t
  3617. **/
  3618. typedef struct xcb_create_glyph_cursor_request_t {
  3619. uint8_t major_opcode;
  3620. uint8_t pad0;
  3621. uint16_t length;
  3622. xcb_cursor_t cid;
  3623. xcb_font_t source_font;
  3624. xcb_font_t mask_font;
  3625. uint16_t source_char;
  3626. uint16_t mask_char;
  3627. uint16_t fore_red;
  3628. uint16_t fore_green;
  3629. uint16_t fore_blue;
  3630. uint16_t back_red;
  3631. uint16_t back_green;
  3632. uint16_t back_blue;
  3633. } xcb_create_glyph_cursor_request_t;
  3634. /** Opcode for xcb_free_cursor. */
  3635. #define XCB_FREE_CURSOR 95
  3636. /**
  3637. * @brief xcb_free_cursor_request_t
  3638. **/
  3639. typedef struct xcb_free_cursor_request_t {
  3640. uint8_t major_opcode;
  3641. uint8_t pad0;
  3642. uint16_t length;
  3643. xcb_cursor_t cursor;
  3644. } xcb_free_cursor_request_t;
  3645. /** Opcode for xcb_recolor_cursor. */
  3646. #define XCB_RECOLOR_CURSOR 96
  3647. /**
  3648. * @brief xcb_recolor_cursor_request_t
  3649. **/
  3650. typedef struct xcb_recolor_cursor_request_t {
  3651. uint8_t major_opcode;
  3652. uint8_t pad0;
  3653. uint16_t length;
  3654. xcb_cursor_t cursor;
  3655. uint16_t fore_red;
  3656. uint16_t fore_green;
  3657. uint16_t fore_blue;
  3658. uint16_t back_red;
  3659. uint16_t back_green;
  3660. uint16_t back_blue;
  3661. } xcb_recolor_cursor_request_t;
  3662. typedef enum xcb_query_shape_of_t {
  3663. XCB_QUERY_SHAPE_OF_LARGEST_CURSOR = 0,
  3664. XCB_QUERY_SHAPE_OF_FASTEST_TILE = 1,
  3665. XCB_QUERY_SHAPE_OF_FASTEST_STIPPLE = 2
  3666. } xcb_query_shape_of_t;
  3667. /**
  3668. * @brief xcb_query_best_size_cookie_t
  3669. **/
  3670. typedef struct xcb_query_best_size_cookie_t {
  3671. unsigned int sequence;
  3672. } xcb_query_best_size_cookie_t;
  3673. /** Opcode for xcb_query_best_size. */
  3674. #define XCB_QUERY_BEST_SIZE 97
  3675. /**
  3676. * @brief xcb_query_best_size_request_t
  3677. **/
  3678. typedef struct xcb_query_best_size_request_t {
  3679. uint8_t major_opcode;
  3680. uint8_t _class;
  3681. uint16_t length;
  3682. xcb_drawable_t drawable;
  3683. uint16_t width;
  3684. uint16_t height;
  3685. } xcb_query_best_size_request_t;
  3686. /**
  3687. * @brief xcb_query_best_size_reply_t
  3688. **/
  3689. typedef struct xcb_query_best_size_reply_t {
  3690. uint8_t response_type;
  3691. uint8_t pad0;
  3692. uint16_t sequence;
  3693. uint32_t length;
  3694. uint16_t width;
  3695. uint16_t height;
  3696. } xcb_query_best_size_reply_t;
  3697. /**
  3698. * @brief xcb_query_extension_cookie_t
  3699. **/
  3700. typedef struct xcb_query_extension_cookie_t {
  3701. unsigned int sequence;
  3702. } xcb_query_extension_cookie_t;
  3703. /** Opcode for xcb_query_extension. */
  3704. #define XCB_QUERY_EXTENSION 98
  3705. /**
  3706. * @brief xcb_query_extension_request_t
  3707. **/
  3708. typedef struct xcb_query_extension_request_t {
  3709. uint8_t major_opcode;
  3710. uint8_t pad0;
  3711. uint16_t length;
  3712. uint16_t name_len;
  3713. uint8_t pad1[2];
  3714. } xcb_query_extension_request_t;
  3715. /**
  3716. * @brief xcb_query_extension_reply_t
  3717. **/
  3718. typedef struct xcb_query_extension_reply_t {
  3719. uint8_t response_type;
  3720. uint8_t pad0;
  3721. uint16_t sequence;
  3722. uint32_t length;
  3723. uint8_t present;
  3724. uint8_t major_opcode;
  3725. uint8_t first_event;
  3726. uint8_t first_error;
  3727. } xcb_query_extension_reply_t;
  3728. /**
  3729. * @brief xcb_list_extensions_cookie_t
  3730. **/
  3731. typedef struct xcb_list_extensions_cookie_t {
  3732. unsigned int sequence;
  3733. } xcb_list_extensions_cookie_t;
  3734. /** Opcode for xcb_list_extensions. */
  3735. #define XCB_LIST_EXTENSIONS 99
  3736. /**
  3737. * @brief xcb_list_extensions_request_t
  3738. **/
  3739. typedef struct xcb_list_extensions_request_t {
  3740. uint8_t major_opcode;
  3741. uint8_t pad0;
  3742. uint16_t length;
  3743. } xcb_list_extensions_request_t;
  3744. /**
  3745. * @brief xcb_list_extensions_reply_t
  3746. **/
  3747. typedef struct xcb_list_extensions_reply_t {
  3748. uint8_t response_type;
  3749. uint8_t names_len;
  3750. uint16_t sequence;
  3751. uint32_t length;
  3752. uint8_t pad0[24];
  3753. } xcb_list_extensions_reply_t;
  3754. /** Opcode for xcb_change_keyboard_mapping. */
  3755. #define XCB_CHANGE_KEYBOARD_MAPPING 100
  3756. /**
  3757. * @brief xcb_change_keyboard_mapping_request_t
  3758. **/
  3759. typedef struct xcb_change_keyboard_mapping_request_t {
  3760. uint8_t major_opcode;
  3761. uint8_t keycode_count;
  3762. uint16_t length;
  3763. xcb_keycode_t first_keycode;
  3764. uint8_t keysyms_per_keycode;
  3765. uint8_t pad0[2];
  3766. } xcb_change_keyboard_mapping_request_t;
  3767. /**
  3768. * @brief xcb_get_keyboard_mapping_cookie_t
  3769. **/
  3770. typedef struct xcb_get_keyboard_mapping_cookie_t {
  3771. unsigned int sequence;
  3772. } xcb_get_keyboard_mapping_cookie_t;
  3773. /** Opcode for xcb_get_keyboard_mapping. */
  3774. #define XCB_GET_KEYBOARD_MAPPING 101
  3775. /**
  3776. * @brief xcb_get_keyboard_mapping_request_t
  3777. **/
  3778. typedef struct xcb_get_keyboard_mapping_request_t {
  3779. uint8_t major_opcode;
  3780. uint8_t pad0;
  3781. uint16_t length;
  3782. xcb_keycode_t first_keycode;
  3783. uint8_t count;
  3784. } xcb_get_keyboard_mapping_request_t;
  3785. /**
  3786. * @brief xcb_get_keyboard_mapping_reply_t
  3787. **/
  3788. typedef struct xcb_get_keyboard_mapping_reply_t {
  3789. uint8_t response_type;
  3790. uint8_t keysyms_per_keycode;
  3791. uint16_t sequence;
  3792. uint32_t length;
  3793. uint8_t pad0[24];
  3794. } xcb_get_keyboard_mapping_reply_t;
  3795. typedef enum xcb_kb_t {
  3796. XCB_KB_KEY_CLICK_PERCENT = 1,
  3797. XCB_KB_BELL_PERCENT = 2,
  3798. XCB_KB_BELL_PITCH = 4,
  3799. XCB_KB_BELL_DURATION = 8,
  3800. XCB_KB_LED = 16,
  3801. XCB_KB_LED_MODE = 32,
  3802. XCB_KB_KEY = 64,
  3803. XCB_KB_AUTO_REPEAT_MODE = 128
  3804. } xcb_kb_t;
  3805. typedef enum xcb_led_mode_t {
  3806. XCB_LED_MODE_OFF = 0,
  3807. XCB_LED_MODE_ON = 1
  3808. } xcb_led_mode_t;
  3809. typedef enum xcb_auto_repeat_mode_t {
  3810. XCB_AUTO_REPEAT_MODE_OFF = 0,
  3811. XCB_AUTO_REPEAT_MODE_ON = 1,
  3812. XCB_AUTO_REPEAT_MODE_DEFAULT = 2
  3813. } xcb_auto_repeat_mode_t;
  3814. /**
  3815. * @brief xcb_change_keyboard_control_value_list_t
  3816. **/
  3817. typedef struct xcb_change_keyboard_control_value_list_t {
  3818. int32_t key_click_percent;
  3819. int32_t bell_percent;
  3820. int32_t bell_pitch;
  3821. int32_t bell_duration;
  3822. uint32_t led;
  3823. uint32_t led_mode;
  3824. xcb_keycode32_t key;
  3825. uint32_t auto_repeat_mode;
  3826. } xcb_change_keyboard_control_value_list_t;
  3827. /** Opcode for xcb_change_keyboard_control. */
  3828. #define XCB_CHANGE_KEYBOARD_CONTROL 102
  3829. /**
  3830. * @brief xcb_change_keyboard_control_request_t
  3831. **/
  3832. typedef struct xcb_change_keyboard_control_request_t {
  3833. uint8_t major_opcode;
  3834. uint8_t pad0;
  3835. uint16_t length;
  3836. uint32_t value_mask;
  3837. } xcb_change_keyboard_control_request_t;
  3838. /**
  3839. * @brief xcb_get_keyboard_control_cookie_t
  3840. **/
  3841. typedef struct xcb_get_keyboard_control_cookie_t {
  3842. unsigned int sequence;
  3843. } xcb_get_keyboard_control_cookie_t;
  3844. /** Opcode for xcb_get_keyboard_control. */
  3845. #define XCB_GET_KEYBOARD_CONTROL 103
  3846. /**
  3847. * @brief xcb_get_keyboard_control_request_t
  3848. **/
  3849. typedef struct xcb_get_keyboard_control_request_t {
  3850. uint8_t major_opcode;
  3851. uint8_t pad0;
  3852. uint16_t length;
  3853. } xcb_get_keyboard_control_request_t;
  3854. /**
  3855. * @brief xcb_get_keyboard_control_reply_t
  3856. **/
  3857. typedef struct xcb_get_keyboard_control_reply_t {
  3858. uint8_t response_type;
  3859. uint8_t global_auto_repeat;
  3860. uint16_t sequence;
  3861. uint32_t length;
  3862. uint32_t led_mask;
  3863. uint8_t key_click_percent;
  3864. uint8_t bell_percent;
  3865. uint16_t bell_pitch;
  3866. uint16_t bell_duration;
  3867. uint8_t pad0[2];
  3868. uint8_t auto_repeats[32];
  3869. } xcb_get_keyboard_control_reply_t;
  3870. /** Opcode for xcb_bell. */
  3871. #define XCB_BELL 104
  3872. /**
  3873. * @brief xcb_bell_request_t
  3874. **/
  3875. typedef struct xcb_bell_request_t {
  3876. uint8_t major_opcode;
  3877. int8_t percent;
  3878. uint16_t length;
  3879. } xcb_bell_request_t;
  3880. /** Opcode for xcb_change_pointer_control. */
  3881. #define XCB_CHANGE_POINTER_CONTROL 105
  3882. /**
  3883. * @brief xcb_change_pointer_control_request_t
  3884. **/
  3885. typedef struct xcb_change_pointer_control_request_t {
  3886. uint8_t major_opcode;
  3887. uint8_t pad0;
  3888. uint16_t length;
  3889. int16_t acceleration_numerator;
  3890. int16_t acceleration_denominator;
  3891. int16_t threshold;
  3892. uint8_t do_acceleration;
  3893. uint8_t do_threshold;
  3894. } xcb_change_pointer_control_request_t;
  3895. /**
  3896. * @brief xcb_get_pointer_control_cookie_t
  3897. **/
  3898. typedef struct xcb_get_pointer_control_cookie_t {
  3899. unsigned int sequence;
  3900. } xcb_get_pointer_control_cookie_t;
  3901. /** Opcode for xcb_get_pointer_control. */
  3902. #define XCB_GET_POINTER_CONTROL 106
  3903. /**
  3904. * @brief xcb_get_pointer_control_request_t
  3905. **/
  3906. typedef struct xcb_get_pointer_control_request_t {
  3907. uint8_t major_opcode;
  3908. uint8_t pad0;
  3909. uint16_t length;
  3910. } xcb_get_pointer_control_request_t;
  3911. /**
  3912. * @brief xcb_get_pointer_control_reply_t
  3913. **/
  3914. typedef struct xcb_get_pointer_control_reply_t {
  3915. uint8_t response_type;
  3916. uint8_t pad0;
  3917. uint16_t sequence;
  3918. uint32_t length;
  3919. uint16_t acceleration_numerator;
  3920. uint16_t acceleration_denominator;
  3921. uint16_t threshold;
  3922. uint8_t pad1[18];
  3923. } xcb_get_pointer_control_reply_t;
  3924. typedef enum xcb_blanking_t {
  3925. XCB_BLANKING_NOT_PREFERRED = 0,
  3926. XCB_BLANKING_PREFERRED = 1,
  3927. XCB_BLANKING_DEFAULT = 2
  3928. } xcb_blanking_t;
  3929. typedef enum xcb_exposures_t {
  3930. XCB_EXPOSURES_NOT_ALLOWED = 0,
  3931. XCB_EXPOSURES_ALLOWED = 1,
  3932. XCB_EXPOSURES_DEFAULT = 2
  3933. } xcb_exposures_t;
  3934. /** Opcode for xcb_set_screen_saver. */
  3935. #define XCB_SET_SCREEN_SAVER 107
  3936. /**
  3937. * @brief xcb_set_screen_saver_request_t
  3938. **/
  3939. typedef struct xcb_set_screen_saver_request_t {
  3940. uint8_t major_opcode;
  3941. uint8_t pad0;
  3942. uint16_t length;
  3943. int16_t timeout;
  3944. int16_t interval;
  3945. uint8_t prefer_blanking;
  3946. uint8_t allow_exposures;
  3947. } xcb_set_screen_saver_request_t;
  3948. /**
  3949. * @brief xcb_get_screen_saver_cookie_t
  3950. **/
  3951. typedef struct xcb_get_screen_saver_cookie_t {
  3952. unsigned int sequence;
  3953. } xcb_get_screen_saver_cookie_t;
  3954. /** Opcode for xcb_get_screen_saver. */
  3955. #define XCB_GET_SCREEN_SAVER 108
  3956. /**
  3957. * @brief xcb_get_screen_saver_request_t
  3958. **/
  3959. typedef struct xcb_get_screen_saver_request_t {
  3960. uint8_t major_opcode;
  3961. uint8_t pad0;
  3962. uint16_t length;
  3963. } xcb_get_screen_saver_request_t;
  3964. /**
  3965. * @brief xcb_get_screen_saver_reply_t
  3966. **/
  3967. typedef struct xcb_get_screen_saver_reply_t {
  3968. uint8_t response_type;
  3969. uint8_t pad0;
  3970. uint16_t sequence;
  3971. uint32_t length;
  3972. uint16_t timeout;
  3973. uint16_t interval;
  3974. uint8_t prefer_blanking;
  3975. uint8_t allow_exposures;
  3976. uint8_t pad1[18];
  3977. } xcb_get_screen_saver_reply_t;
  3978. typedef enum xcb_host_mode_t {
  3979. XCB_HOST_MODE_INSERT = 0,
  3980. XCB_HOST_MODE_DELETE = 1
  3981. } xcb_host_mode_t;
  3982. typedef enum xcb_family_t {
  3983. XCB_FAMILY_INTERNET = 0,
  3984. XCB_FAMILY_DECNET = 1,
  3985. XCB_FAMILY_CHAOS = 2,
  3986. XCB_FAMILY_SERVER_INTERPRETED = 5,
  3987. XCB_FAMILY_INTERNET_6 = 6
  3988. } xcb_family_t;
  3989. /** Opcode for xcb_change_hosts. */
  3990. #define XCB_CHANGE_HOSTS 109
  3991. /**
  3992. * @brief xcb_change_hosts_request_t
  3993. **/
  3994. typedef struct xcb_change_hosts_request_t {
  3995. uint8_t major_opcode;
  3996. uint8_t mode;
  3997. uint16_t length;
  3998. uint8_t family;
  3999. uint8_t pad0;
  4000. uint16_t address_len;
  4001. } xcb_change_hosts_request_t;
  4002. /**
  4003. * @brief xcb_host_t
  4004. **/
  4005. typedef struct xcb_host_t {
  4006. uint8_t family;
  4007. uint8_t pad0;
  4008. uint16_t address_len;
  4009. } xcb_host_t;
  4010. /**
  4011. * @brief xcb_host_iterator_t
  4012. **/
  4013. typedef struct xcb_host_iterator_t {
  4014. xcb_host_t *data;
  4015. int rem;
  4016. int index;
  4017. } xcb_host_iterator_t;
  4018. /**
  4019. * @brief xcb_list_hosts_cookie_t
  4020. **/
  4021. typedef struct xcb_list_hosts_cookie_t {
  4022. unsigned int sequence;
  4023. } xcb_list_hosts_cookie_t;
  4024. /** Opcode for xcb_list_hosts. */
  4025. #define XCB_LIST_HOSTS 110
  4026. /**
  4027. * @brief xcb_list_hosts_request_t
  4028. **/
  4029. typedef struct xcb_list_hosts_request_t {
  4030. uint8_t major_opcode;
  4031. uint8_t pad0;
  4032. uint16_t length;
  4033. } xcb_list_hosts_request_t;
  4034. /**
  4035. * @brief xcb_list_hosts_reply_t
  4036. **/
  4037. typedef struct xcb_list_hosts_reply_t {
  4038. uint8_t response_type;
  4039. uint8_t mode;
  4040. uint16_t sequence;
  4041. uint32_t length;
  4042. uint16_t hosts_len;
  4043. uint8_t pad0[22];
  4044. } xcb_list_hosts_reply_t;
  4045. typedef enum xcb_access_control_t {
  4046. XCB_ACCESS_CONTROL_DISABLE = 0,
  4047. XCB_ACCESS_CONTROL_ENABLE = 1
  4048. } xcb_access_control_t;
  4049. /** Opcode for xcb_set_access_control. */
  4050. #define XCB_SET_ACCESS_CONTROL 111
  4051. /**
  4052. * @brief xcb_set_access_control_request_t
  4053. **/
  4054. typedef struct xcb_set_access_control_request_t {
  4055. uint8_t major_opcode;
  4056. uint8_t mode;
  4057. uint16_t length;
  4058. } xcb_set_access_control_request_t;
  4059. typedef enum xcb_close_down_t {
  4060. XCB_CLOSE_DOWN_DESTROY_ALL = 0,
  4061. XCB_CLOSE_DOWN_RETAIN_PERMANENT = 1,
  4062. XCB_CLOSE_DOWN_RETAIN_TEMPORARY = 2
  4063. } xcb_close_down_t;
  4064. /** Opcode for xcb_set_close_down_mode. */
  4065. #define XCB_SET_CLOSE_DOWN_MODE 112
  4066. /**
  4067. * @brief xcb_set_close_down_mode_request_t
  4068. **/
  4069. typedef struct xcb_set_close_down_mode_request_t {
  4070. uint8_t major_opcode;
  4071. uint8_t mode;
  4072. uint16_t length;
  4073. } xcb_set_close_down_mode_request_t;
  4074. typedef enum xcb_kill_t {
  4075. XCB_KILL_ALL_TEMPORARY = 0
  4076. } xcb_kill_t;
  4077. /** Opcode for xcb_kill_client. */
  4078. #define XCB_KILL_CLIENT 113
  4079. /**
  4080. * @brief xcb_kill_client_request_t
  4081. **/
  4082. typedef struct xcb_kill_client_request_t {
  4083. uint8_t major_opcode;
  4084. uint8_t pad0;
  4085. uint16_t length;
  4086. uint32_t resource;
  4087. } xcb_kill_client_request_t;
  4088. /** Opcode for xcb_rotate_properties. */
  4089. #define XCB_ROTATE_PROPERTIES 114
  4090. /**
  4091. * @brief xcb_rotate_properties_request_t
  4092. **/
  4093. typedef struct xcb_rotate_properties_request_t {
  4094. uint8_t major_opcode;
  4095. uint8_t pad0;
  4096. uint16_t length;
  4097. xcb_window_t window;
  4098. uint16_t atoms_len;
  4099. int16_t delta;
  4100. } xcb_rotate_properties_request_t;
  4101. typedef enum xcb_screen_saver_t {
  4102. XCB_SCREEN_SAVER_RESET = 0,
  4103. XCB_SCREEN_SAVER_ACTIVE = 1
  4104. } xcb_screen_saver_t;
  4105. /** Opcode for xcb_force_screen_saver. */
  4106. #define XCB_FORCE_SCREEN_SAVER 115
  4107. /**
  4108. * @brief xcb_force_screen_saver_request_t
  4109. **/
  4110. typedef struct xcb_force_screen_saver_request_t {
  4111. uint8_t major_opcode;
  4112. uint8_t mode;
  4113. uint16_t length;
  4114. } xcb_force_screen_saver_request_t;
  4115. typedef enum xcb_mapping_status_t {
  4116. XCB_MAPPING_STATUS_SUCCESS = 0,
  4117. XCB_MAPPING_STATUS_BUSY = 1,
  4118. XCB_MAPPING_STATUS_FAILURE = 2
  4119. } xcb_mapping_status_t;
  4120. /**
  4121. * @brief xcb_set_pointer_mapping_cookie_t
  4122. **/
  4123. typedef struct xcb_set_pointer_mapping_cookie_t {
  4124. unsigned int sequence;
  4125. } xcb_set_pointer_mapping_cookie_t;
  4126. /** Opcode for xcb_set_pointer_mapping. */
  4127. #define XCB_SET_POINTER_MAPPING 116
  4128. /**
  4129. * @brief xcb_set_pointer_mapping_request_t
  4130. **/
  4131. typedef struct xcb_set_pointer_mapping_request_t {
  4132. uint8_t major_opcode;
  4133. uint8_t map_len;
  4134. uint16_t length;
  4135. } xcb_set_pointer_mapping_request_t;
  4136. /**
  4137. * @brief xcb_set_pointer_mapping_reply_t
  4138. **/
  4139. typedef struct xcb_set_pointer_mapping_reply_t {
  4140. uint8_t response_type;
  4141. uint8_t status;
  4142. uint16_t sequence;
  4143. uint32_t length;
  4144. } xcb_set_pointer_mapping_reply_t;
  4145. /**
  4146. * @brief xcb_get_pointer_mapping_cookie_t
  4147. **/
  4148. typedef struct xcb_get_pointer_mapping_cookie_t {
  4149. unsigned int sequence;
  4150. } xcb_get_pointer_mapping_cookie_t;
  4151. /** Opcode for xcb_get_pointer_mapping. */
  4152. #define XCB_GET_POINTER_MAPPING 117
  4153. /**
  4154. * @brief xcb_get_pointer_mapping_request_t
  4155. **/
  4156. typedef struct xcb_get_pointer_mapping_request_t {
  4157. uint8_t major_opcode;
  4158. uint8_t pad0;
  4159. uint16_t length;
  4160. } xcb_get_pointer_mapping_request_t;
  4161. /**
  4162. * @brief xcb_get_pointer_mapping_reply_t
  4163. **/
  4164. typedef struct xcb_get_pointer_mapping_reply_t {
  4165. uint8_t response_type;
  4166. uint8_t map_len;
  4167. uint16_t sequence;
  4168. uint32_t length;
  4169. uint8_t pad0[24];
  4170. } xcb_get_pointer_mapping_reply_t;
  4171. typedef enum xcb_map_index_t {
  4172. XCB_MAP_INDEX_SHIFT = 0,
  4173. XCB_MAP_INDEX_LOCK = 1,
  4174. XCB_MAP_INDEX_CONTROL = 2,
  4175. XCB_MAP_INDEX_1 = 3,
  4176. XCB_MAP_INDEX_2 = 4,
  4177. XCB_MAP_INDEX_3 = 5,
  4178. XCB_MAP_INDEX_4 = 6,
  4179. XCB_MAP_INDEX_5 = 7
  4180. } xcb_map_index_t;
  4181. /**
  4182. * @brief xcb_set_modifier_mapping_cookie_t
  4183. **/
  4184. typedef struct xcb_set_modifier_mapping_cookie_t {
  4185. unsigned int sequence;
  4186. } xcb_set_modifier_mapping_cookie_t;
  4187. /** Opcode for xcb_set_modifier_mapping. */
  4188. #define XCB_SET_MODIFIER_MAPPING 118
  4189. /**
  4190. * @brief xcb_set_modifier_mapping_request_t
  4191. **/
  4192. typedef struct xcb_set_modifier_mapping_request_t {
  4193. uint8_t major_opcode;
  4194. uint8_t keycodes_per_modifier;
  4195. uint16_t length;
  4196. } xcb_set_modifier_mapping_request_t;
  4197. /**
  4198. * @brief xcb_set_modifier_mapping_reply_t
  4199. **/
  4200. typedef struct xcb_set_modifier_mapping_reply_t {
  4201. uint8_t response_type;
  4202. uint8_t status;
  4203. uint16_t sequence;
  4204. uint32_t length;
  4205. } xcb_set_modifier_mapping_reply_t;
  4206. /**
  4207. * @brief xcb_get_modifier_mapping_cookie_t
  4208. **/
  4209. typedef struct xcb_get_modifier_mapping_cookie_t {
  4210. unsigned int sequence;
  4211. } xcb_get_modifier_mapping_cookie_t;
  4212. /** Opcode for xcb_get_modifier_mapping. */
  4213. #define XCB_GET_MODIFIER_MAPPING 119
  4214. /**
  4215. * @brief xcb_get_modifier_mapping_request_t
  4216. **/
  4217. typedef struct xcb_get_modifier_mapping_request_t {
  4218. uint8_t major_opcode;
  4219. uint8_t pad0;
  4220. uint16_t length;
  4221. } xcb_get_modifier_mapping_request_t;
  4222. /**
  4223. * @brief xcb_get_modifier_mapping_reply_t
  4224. **/
  4225. typedef struct xcb_get_modifier_mapping_reply_t {
  4226. uint8_t response_type;
  4227. uint8_t keycodes_per_modifier;
  4228. uint16_t sequence;
  4229. uint32_t length;
  4230. uint8_t pad0[24];
  4231. } xcb_get_modifier_mapping_reply_t;
  4232. /** Opcode for xcb_no_operation. */
  4233. #define XCB_NO_OPERATION 127
  4234. /**
  4235. * @brief xcb_no_operation_request_t
  4236. **/
  4237. typedef struct xcb_no_operation_request_t {
  4238. uint8_t major_opcode;
  4239. uint8_t pad0;
  4240. uint16_t length;
  4241. } xcb_no_operation_request_t;
  4242. /**
  4243. * Get the next element of the iterator
  4244. * @param i Pointer to a xcb_char2b_iterator_t
  4245. *
  4246. * Get the next element in the iterator. The member rem is
  4247. * decreased by one. The member data points to the next
  4248. * element. The member index is increased by sizeof(xcb_char2b_t)
  4249. */
  4250. void
  4251. xcb_char2b_next (xcb_char2b_iterator_t *i);
  4252. /**
  4253. * Return the iterator pointing to the last element
  4254. * @param i An xcb_char2b_iterator_t
  4255. * @return The iterator pointing to the last element
  4256. *
  4257. * Set the current element in the iterator to the last element.
  4258. * The member rem is set to 0. The member data points to the
  4259. * last element.
  4260. */
  4261. xcb_generic_iterator_t
  4262. xcb_char2b_end (xcb_char2b_iterator_t i);
  4263. /**
  4264. * Get the next element of the iterator
  4265. * @param i Pointer to a xcb_window_iterator_t
  4266. *
  4267. * Get the next element in the iterator. The member rem is
  4268. * decreased by one. The member data points to the next
  4269. * element. The member index is increased by sizeof(xcb_window_t)
  4270. */
  4271. void
  4272. xcb_window_next (xcb_window_iterator_t *i);
  4273. /**
  4274. * Return the iterator pointing to the last element
  4275. * @param i An xcb_window_iterator_t
  4276. * @return The iterator pointing to the last element
  4277. *
  4278. * Set the current element in the iterator to the last element.
  4279. * The member rem is set to 0. The member data points to the
  4280. * last element.
  4281. */
  4282. xcb_generic_iterator_t
  4283. xcb_window_end (xcb_window_iterator_t i);
  4284. /**
  4285. * Get the next element of the iterator
  4286. * @param i Pointer to a xcb_pixmap_iterator_t
  4287. *
  4288. * Get the next element in the iterator. The member rem is
  4289. * decreased by one. The member data points to the next
  4290. * element. The member index is increased by sizeof(xcb_pixmap_t)
  4291. */
  4292. void
  4293. xcb_pixmap_next (xcb_pixmap_iterator_t *i);
  4294. /**
  4295. * Return the iterator pointing to the last element
  4296. * @param i An xcb_pixmap_iterator_t
  4297. * @return The iterator pointing to the last element
  4298. *
  4299. * Set the current element in the iterator to the last element.
  4300. * The member rem is set to 0. The member data points to the
  4301. * last element.
  4302. */
  4303. xcb_generic_iterator_t
  4304. xcb_pixmap_end (xcb_pixmap_iterator_t i);
  4305. /**
  4306. * Get the next element of the iterator
  4307. * @param i Pointer to a xcb_cursor_iterator_t
  4308. *
  4309. * Get the next element in the iterator. The member rem is
  4310. * decreased by one. The member data points to the next
  4311. * element. The member index is increased by sizeof(xcb_cursor_t)
  4312. */
  4313. void
  4314. xcb_cursor_next (xcb_cursor_iterator_t *i);
  4315. /**
  4316. * Return the iterator pointing to the last element
  4317. * @param i An xcb_cursor_iterator_t
  4318. * @return The iterator pointing to the last element
  4319. *
  4320. * Set the current element in the iterator to the last element.
  4321. * The member rem is set to 0. The member data points to the
  4322. * last element.
  4323. */
  4324. xcb_generic_iterator_t
  4325. xcb_cursor_end (xcb_cursor_iterator_t i);
  4326. /**
  4327. * Get the next element of the iterator
  4328. * @param i Pointer to a xcb_font_iterator_t
  4329. *
  4330. * Get the next element in the iterator. The member rem is
  4331. * decreased by one. The member data points to the next
  4332. * element. The member index is increased by sizeof(xcb_font_t)
  4333. */
  4334. void
  4335. xcb_font_next (xcb_font_iterator_t *i);
  4336. /**
  4337. * Return the iterator pointing to the last element
  4338. * @param i An xcb_font_iterator_t
  4339. * @return The iterator pointing to the last element
  4340. *
  4341. * Set the current element in the iterator to the last element.
  4342. * The member rem is set to 0. The member data points to the
  4343. * last element.
  4344. */
  4345. xcb_generic_iterator_t
  4346. xcb_font_end (xcb_font_iterator_t i);
  4347. /**
  4348. * Get the next element of the iterator
  4349. * @param i Pointer to a xcb_gcontext_iterator_t
  4350. *
  4351. * Get the next element in the iterator. The member rem is
  4352. * decreased by one. The member data points to the next
  4353. * element. The member index is increased by sizeof(xcb_gcontext_t)
  4354. */
  4355. void
  4356. xcb_gcontext_next (xcb_gcontext_iterator_t *i);
  4357. /**
  4358. * Return the iterator pointing to the last element
  4359. * @param i An xcb_gcontext_iterator_t
  4360. * @return The iterator pointing to the last element
  4361. *
  4362. * Set the current element in the iterator to the last element.
  4363. * The member rem is set to 0. The member data points to the
  4364. * last element.
  4365. */
  4366. xcb_generic_iterator_t
  4367. xcb_gcontext_end (xcb_gcontext_iterator_t i);
  4368. /**
  4369. * Get the next element of the iterator
  4370. * @param i Pointer to a xcb_colormap_iterator_t
  4371. *
  4372. * Get the next element in the iterator. The member rem is
  4373. * decreased by one. The member data points to the next
  4374. * element. The member index is increased by sizeof(xcb_colormap_t)
  4375. */
  4376. void
  4377. xcb_colormap_next (xcb_colormap_iterator_t *i);
  4378. /**
  4379. * Return the iterator pointing to the last element
  4380. * @param i An xcb_colormap_iterator_t
  4381. * @return The iterator pointing to the last element
  4382. *
  4383. * Set the current element in the iterator to the last element.
  4384. * The member rem is set to 0. The member data points to the
  4385. * last element.
  4386. */
  4387. xcb_generic_iterator_t
  4388. xcb_colormap_end (xcb_colormap_iterator_t i);
  4389. /**
  4390. * Get the next element of the iterator
  4391. * @param i Pointer to a xcb_atom_iterator_t
  4392. *
  4393. * Get the next element in the iterator. The member rem is
  4394. * decreased by one. The member data points to the next
  4395. * element. The member index is increased by sizeof(xcb_atom_t)
  4396. */
  4397. void
  4398. xcb_atom_next (xcb_atom_iterator_t *i);
  4399. /**
  4400. * Return the iterator pointing to the last element
  4401. * @param i An xcb_atom_iterator_t
  4402. * @return The iterator pointing to the last element
  4403. *
  4404. * Set the current element in the iterator to the last element.
  4405. * The member rem is set to 0. The member data points to the
  4406. * last element.
  4407. */
  4408. xcb_generic_iterator_t
  4409. xcb_atom_end (xcb_atom_iterator_t i);
  4410. /**
  4411. * Get the next element of the iterator
  4412. * @param i Pointer to a xcb_drawable_iterator_t
  4413. *
  4414. * Get the next element in the iterator. The member rem is
  4415. * decreased by one. The member data points to the next
  4416. * element. The member index is increased by sizeof(xcb_drawable_t)
  4417. */
  4418. void
  4419. xcb_drawable_next (xcb_drawable_iterator_t *i);
  4420. /**
  4421. * Return the iterator pointing to the last element
  4422. * @param i An xcb_drawable_iterator_t
  4423. * @return The iterator pointing to the last element
  4424. *
  4425. * Set the current element in the iterator to the last element.
  4426. * The member rem is set to 0. The member data points to the
  4427. * last element.
  4428. */
  4429. xcb_generic_iterator_t
  4430. xcb_drawable_end (xcb_drawable_iterator_t i);
  4431. /**
  4432. * Get the next element of the iterator
  4433. * @param i Pointer to a xcb_fontable_iterator_t
  4434. *
  4435. * Get the next element in the iterator. The member rem is
  4436. * decreased by one. The member data points to the next
  4437. * element. The member index is increased by sizeof(xcb_fontable_t)
  4438. */
  4439. void
  4440. xcb_fontable_next (xcb_fontable_iterator_t *i);
  4441. /**
  4442. * Return the iterator pointing to the last element
  4443. * @param i An xcb_fontable_iterator_t
  4444. * @return The iterator pointing to the last element
  4445. *
  4446. * Set the current element in the iterator to the last element.
  4447. * The member rem is set to 0. The member data points to the
  4448. * last element.
  4449. */
  4450. xcb_generic_iterator_t
  4451. xcb_fontable_end (xcb_fontable_iterator_t i);
  4452. /**
  4453. * Get the next element of the iterator
  4454. * @param i Pointer to a xcb_bool32_iterator_t
  4455. *
  4456. * Get the next element in the iterator. The member rem is
  4457. * decreased by one. The member data points to the next
  4458. * element. The member index is increased by sizeof(xcb_bool32_t)
  4459. */
  4460. void
  4461. xcb_bool32_next (xcb_bool32_iterator_t *i);
  4462. /**
  4463. * Return the iterator pointing to the last element
  4464. * @param i An xcb_bool32_iterator_t
  4465. * @return The iterator pointing to the last element
  4466. *
  4467. * Set the current element in the iterator to the last element.
  4468. * The member rem is set to 0. The member data points to the
  4469. * last element.
  4470. */
  4471. xcb_generic_iterator_t
  4472. xcb_bool32_end (xcb_bool32_iterator_t i);
  4473. /**
  4474. * Get the next element of the iterator
  4475. * @param i Pointer to a xcb_visualid_iterator_t
  4476. *
  4477. * Get the next element in the iterator. The member rem is
  4478. * decreased by one. The member data points to the next
  4479. * element. The member index is increased by sizeof(xcb_visualid_t)
  4480. */
  4481. void
  4482. xcb_visualid_next (xcb_visualid_iterator_t *i);
  4483. /**
  4484. * Return the iterator pointing to the last element
  4485. * @param i An xcb_visualid_iterator_t
  4486. * @return The iterator pointing to the last element
  4487. *
  4488. * Set the current element in the iterator to the last element.
  4489. * The member rem is set to 0. The member data points to the
  4490. * last element.
  4491. */
  4492. xcb_generic_iterator_t
  4493. xcb_visualid_end (xcb_visualid_iterator_t i);
  4494. /**
  4495. * Get the next element of the iterator
  4496. * @param i Pointer to a xcb_timestamp_iterator_t
  4497. *
  4498. * Get the next element in the iterator. The member rem is
  4499. * decreased by one. The member data points to the next
  4500. * element. The member index is increased by sizeof(xcb_timestamp_t)
  4501. */
  4502. void
  4503. xcb_timestamp_next (xcb_timestamp_iterator_t *i);
  4504. /**
  4505. * Return the iterator pointing to the last element
  4506. * @param i An xcb_timestamp_iterator_t
  4507. * @return The iterator pointing to the last element
  4508. *
  4509. * Set the current element in the iterator to the last element.
  4510. * The member rem is set to 0. The member data points to the
  4511. * last element.
  4512. */
  4513. xcb_generic_iterator_t
  4514. xcb_timestamp_end (xcb_timestamp_iterator_t i);
  4515. /**
  4516. * Get the next element of the iterator
  4517. * @param i Pointer to a xcb_keysym_iterator_t
  4518. *
  4519. * Get the next element in the iterator. The member rem is
  4520. * decreased by one. The member data points to the next
  4521. * element. The member index is increased by sizeof(xcb_keysym_t)
  4522. */
  4523. void
  4524. xcb_keysym_next (xcb_keysym_iterator_t *i);
  4525. /**
  4526. * Return the iterator pointing to the last element
  4527. * @param i An xcb_keysym_iterator_t
  4528. * @return The iterator pointing to the last element
  4529. *
  4530. * Set the current element in the iterator to the last element.
  4531. * The member rem is set to 0. The member data points to the
  4532. * last element.
  4533. */
  4534. xcb_generic_iterator_t
  4535. xcb_keysym_end (xcb_keysym_iterator_t i);
  4536. /**
  4537. * Get the next element of the iterator
  4538. * @param i Pointer to a xcb_keycode_iterator_t
  4539. *
  4540. * Get the next element in the iterator. The member rem is
  4541. * decreased by one. The member data points to the next
  4542. * element. The member index is increased by sizeof(xcb_keycode_t)
  4543. */
  4544. void
  4545. xcb_keycode_next (xcb_keycode_iterator_t *i);
  4546. /**
  4547. * Return the iterator pointing to the last element
  4548. * @param i An xcb_keycode_iterator_t
  4549. * @return The iterator pointing to the last element
  4550. *
  4551. * Set the current element in the iterator to the last element.
  4552. * The member rem is set to 0. The member data points to the
  4553. * last element.
  4554. */
  4555. xcb_generic_iterator_t
  4556. xcb_keycode_end (xcb_keycode_iterator_t i);
  4557. /**
  4558. * Get the next element of the iterator
  4559. * @param i Pointer to a xcb_keycode32_iterator_t
  4560. *
  4561. * Get the next element in the iterator. The member rem is
  4562. * decreased by one. The member data points to the next
  4563. * element. The member index is increased by sizeof(xcb_keycode32_t)
  4564. */
  4565. void
  4566. xcb_keycode32_next (xcb_keycode32_iterator_t *i);
  4567. /**
  4568. * Return the iterator pointing to the last element
  4569. * @param i An xcb_keycode32_iterator_t
  4570. * @return The iterator pointing to the last element
  4571. *
  4572. * Set the current element in the iterator to the last element.
  4573. * The member rem is set to 0. The member data points to the
  4574. * last element.
  4575. */
  4576. xcb_generic_iterator_t
  4577. xcb_keycode32_end (xcb_keycode32_iterator_t i);
  4578. /**
  4579. * Get the next element of the iterator
  4580. * @param i Pointer to a xcb_button_iterator_t
  4581. *
  4582. * Get the next element in the iterator. The member rem is
  4583. * decreased by one. The member data points to the next
  4584. * element. The member index is increased by sizeof(xcb_button_t)
  4585. */
  4586. void
  4587. xcb_button_next (xcb_button_iterator_t *i);
  4588. /**
  4589. * Return the iterator pointing to the last element
  4590. * @param i An xcb_button_iterator_t
  4591. * @return The iterator pointing to the last element
  4592. *
  4593. * Set the current element in the iterator to the last element.
  4594. * The member rem is set to 0. The member data points to the
  4595. * last element.
  4596. */
  4597. xcb_generic_iterator_t
  4598. xcb_button_end (xcb_button_iterator_t i);
  4599. /**
  4600. * Get the next element of the iterator
  4601. * @param i Pointer to a xcb_point_iterator_t
  4602. *
  4603. * Get the next element in the iterator. The member rem is
  4604. * decreased by one. The member data points to the next
  4605. * element. The member index is increased by sizeof(xcb_point_t)
  4606. */
  4607. void
  4608. xcb_point_next (xcb_point_iterator_t *i);
  4609. /**
  4610. * Return the iterator pointing to the last element
  4611. * @param i An xcb_point_iterator_t
  4612. * @return The iterator pointing to the last element
  4613. *
  4614. * Set the current element in the iterator to the last element.
  4615. * The member rem is set to 0. The member data points to the
  4616. * last element.
  4617. */
  4618. xcb_generic_iterator_t
  4619. xcb_point_end (xcb_point_iterator_t i);
  4620. /**
  4621. * Get the next element of the iterator
  4622. * @param i Pointer to a xcb_rectangle_iterator_t
  4623. *
  4624. * Get the next element in the iterator. The member rem is
  4625. * decreased by one. The member data points to the next
  4626. * element. The member index is increased by sizeof(xcb_rectangle_t)
  4627. */
  4628. void
  4629. xcb_rectangle_next (xcb_rectangle_iterator_t *i);
  4630. /**
  4631. * Return the iterator pointing to the last element
  4632. * @param i An xcb_rectangle_iterator_t
  4633. * @return The iterator pointing to the last element
  4634. *
  4635. * Set the current element in the iterator to the last element.
  4636. * The member rem is set to 0. The member data points to the
  4637. * last element.
  4638. */
  4639. xcb_generic_iterator_t
  4640. xcb_rectangle_end (xcb_rectangle_iterator_t i);
  4641. /**
  4642. * Get the next element of the iterator
  4643. * @param i Pointer to a xcb_arc_iterator_t
  4644. *
  4645. * Get the next element in the iterator. The member rem is
  4646. * decreased by one. The member data points to the next
  4647. * element. The member index is increased by sizeof(xcb_arc_t)
  4648. */
  4649. void
  4650. xcb_arc_next (xcb_arc_iterator_t *i);
  4651. /**
  4652. * Return the iterator pointing to the last element
  4653. * @param i An xcb_arc_iterator_t
  4654. * @return The iterator pointing to the last element
  4655. *
  4656. * Set the current element in the iterator to the last element.
  4657. * The member rem is set to 0. The member data points to the
  4658. * last element.
  4659. */
  4660. xcb_generic_iterator_t
  4661. xcb_arc_end (xcb_arc_iterator_t i);
  4662. /**
  4663. * Get the next element of the iterator
  4664. * @param i Pointer to a xcb_format_iterator_t
  4665. *
  4666. * Get the next element in the iterator. The member rem is
  4667. * decreased by one. The member data points to the next
  4668. * element. The member index is increased by sizeof(xcb_format_t)
  4669. */
  4670. void
  4671. xcb_format_next (xcb_format_iterator_t *i);
  4672. /**
  4673. * Return the iterator pointing to the last element
  4674. * @param i An xcb_format_iterator_t
  4675. * @return The iterator pointing to the last element
  4676. *
  4677. * Set the current element in the iterator to the last element.
  4678. * The member rem is set to 0. The member data points to the
  4679. * last element.
  4680. */
  4681. xcb_generic_iterator_t
  4682. xcb_format_end (xcb_format_iterator_t i);
  4683. /**
  4684. * Get the next element of the iterator
  4685. * @param i Pointer to a xcb_visualtype_iterator_t
  4686. *
  4687. * Get the next element in the iterator. The member rem is
  4688. * decreased by one. The member data points to the next
  4689. * element. The member index is increased by sizeof(xcb_visualtype_t)
  4690. */
  4691. void
  4692. xcb_visualtype_next (xcb_visualtype_iterator_t *i);
  4693. /**
  4694. * Return the iterator pointing to the last element
  4695. * @param i An xcb_visualtype_iterator_t
  4696. * @return The iterator pointing to the last element
  4697. *
  4698. * Set the current element in the iterator to the last element.
  4699. * The member rem is set to 0. The member data points to the
  4700. * last element.
  4701. */
  4702. xcb_generic_iterator_t
  4703. xcb_visualtype_end (xcb_visualtype_iterator_t i);
  4704. int
  4705. xcb_depth_sizeof (const void *_buffer);
  4706. xcb_visualtype_t *
  4707. xcb_depth_visuals (const xcb_depth_t *R);
  4708. int
  4709. xcb_depth_visuals_length (const xcb_depth_t *R);
  4710. xcb_visualtype_iterator_t
  4711. xcb_depth_visuals_iterator (const xcb_depth_t *R);
  4712. /**
  4713. * Get the next element of the iterator
  4714. * @param i Pointer to a xcb_depth_iterator_t
  4715. *
  4716. * Get the next element in the iterator. The member rem is
  4717. * decreased by one. The member data points to the next
  4718. * element. The member index is increased by sizeof(xcb_depth_t)
  4719. */
  4720. void
  4721. xcb_depth_next (xcb_depth_iterator_t *i);
  4722. /**
  4723. * Return the iterator pointing to the last element
  4724. * @param i An xcb_depth_iterator_t
  4725. * @return The iterator pointing to the last element
  4726. *
  4727. * Set the current element in the iterator to the last element.
  4728. * The member rem is set to 0. The member data points to the
  4729. * last element.
  4730. */
  4731. xcb_generic_iterator_t
  4732. xcb_depth_end (xcb_depth_iterator_t i);
  4733. int
  4734. xcb_screen_sizeof (const void *_buffer);
  4735. int
  4736. xcb_screen_allowed_depths_length (const xcb_screen_t *R);
  4737. xcb_depth_iterator_t
  4738. xcb_screen_allowed_depths_iterator (const xcb_screen_t *R);
  4739. /**
  4740. * Get the next element of the iterator
  4741. * @param i Pointer to a xcb_screen_iterator_t
  4742. *
  4743. * Get the next element in the iterator. The member rem is
  4744. * decreased by one. The member data points to the next
  4745. * element. The member index is increased by sizeof(xcb_screen_t)
  4746. */
  4747. void
  4748. xcb_screen_next (xcb_screen_iterator_t *i);
  4749. /**
  4750. * Return the iterator pointing to the last element
  4751. * @param i An xcb_screen_iterator_t
  4752. * @return The iterator pointing to the last element
  4753. *
  4754. * Set the current element in the iterator to the last element.
  4755. * The member rem is set to 0. The member data points to the
  4756. * last element.
  4757. */
  4758. xcb_generic_iterator_t
  4759. xcb_screen_end (xcb_screen_iterator_t i);
  4760. int
  4761. xcb_setup_request_sizeof (const void *_buffer);
  4762. char *
  4763. xcb_setup_request_authorization_protocol_name (const xcb_setup_request_t *R);
  4764. int
  4765. xcb_setup_request_authorization_protocol_name_length (const xcb_setup_request_t *R);
  4766. xcb_generic_iterator_t
  4767. xcb_setup_request_authorization_protocol_name_end (const xcb_setup_request_t *R);
  4768. char *
  4769. xcb_setup_request_authorization_protocol_data (const xcb_setup_request_t *R);
  4770. int
  4771. xcb_setup_request_authorization_protocol_data_length (const xcb_setup_request_t *R);
  4772. xcb_generic_iterator_t
  4773. xcb_setup_request_authorization_protocol_data_end (const xcb_setup_request_t *R);
  4774. /**
  4775. * Get the next element of the iterator
  4776. * @param i Pointer to a xcb_setup_request_iterator_t
  4777. *
  4778. * Get the next element in the iterator. The member rem is
  4779. * decreased by one. The member data points to the next
  4780. * element. The member index is increased by sizeof(xcb_setup_request_t)
  4781. */
  4782. void
  4783. xcb_setup_request_next (xcb_setup_request_iterator_t *i);
  4784. /**
  4785. * Return the iterator pointing to the last element
  4786. * @param i An xcb_setup_request_iterator_t
  4787. * @return The iterator pointing to the last element
  4788. *
  4789. * Set the current element in the iterator to the last element.
  4790. * The member rem is set to 0. The member data points to the
  4791. * last element.
  4792. */
  4793. xcb_generic_iterator_t
  4794. xcb_setup_request_end (xcb_setup_request_iterator_t i);
  4795. int
  4796. xcb_setup_failed_sizeof (const void *_buffer);
  4797. char *
  4798. xcb_setup_failed_reason (const xcb_setup_failed_t *R);
  4799. int
  4800. xcb_setup_failed_reason_length (const xcb_setup_failed_t *R);
  4801. xcb_generic_iterator_t
  4802. xcb_setup_failed_reason_end (const xcb_setup_failed_t *R);
  4803. /**
  4804. * Get the next element of the iterator
  4805. * @param i Pointer to a xcb_setup_failed_iterator_t
  4806. *
  4807. * Get the next element in the iterator. The member rem is
  4808. * decreased by one. The member data points to the next
  4809. * element. The member index is increased by sizeof(xcb_setup_failed_t)
  4810. */
  4811. void
  4812. xcb_setup_failed_next (xcb_setup_failed_iterator_t *i);
  4813. /**
  4814. * Return the iterator pointing to the last element
  4815. * @param i An xcb_setup_failed_iterator_t
  4816. * @return The iterator pointing to the last element
  4817. *
  4818. * Set the current element in the iterator to the last element.
  4819. * The member rem is set to 0. The member data points to the
  4820. * last element.
  4821. */
  4822. xcb_generic_iterator_t
  4823. xcb_setup_failed_end (xcb_setup_failed_iterator_t i);
  4824. int
  4825. xcb_setup_authenticate_sizeof (const void *_buffer);
  4826. char *
  4827. xcb_setup_authenticate_reason (const xcb_setup_authenticate_t *R);
  4828. int
  4829. xcb_setup_authenticate_reason_length (const xcb_setup_authenticate_t *R);
  4830. xcb_generic_iterator_t
  4831. xcb_setup_authenticate_reason_end (const xcb_setup_authenticate_t *R);
  4832. /**
  4833. * Get the next element of the iterator
  4834. * @param i Pointer to a xcb_setup_authenticate_iterator_t
  4835. *
  4836. * Get the next element in the iterator. The member rem is
  4837. * decreased by one. The member data points to the next
  4838. * element. The member index is increased by sizeof(xcb_setup_authenticate_t)
  4839. */
  4840. void
  4841. xcb_setup_authenticate_next (xcb_setup_authenticate_iterator_t *i);
  4842. /**
  4843. * Return the iterator pointing to the last element
  4844. * @param i An xcb_setup_authenticate_iterator_t
  4845. * @return The iterator pointing to the last element
  4846. *
  4847. * Set the current element in the iterator to the last element.
  4848. * The member rem is set to 0. The member data points to the
  4849. * last element.
  4850. */
  4851. xcb_generic_iterator_t
  4852. xcb_setup_authenticate_end (xcb_setup_authenticate_iterator_t i);
  4853. int
  4854. xcb_setup_sizeof (const void *_buffer);
  4855. char *
  4856. xcb_setup_vendor (const xcb_setup_t *R);
  4857. int
  4858. xcb_setup_vendor_length (const xcb_setup_t *R);
  4859. xcb_generic_iterator_t
  4860. xcb_setup_vendor_end (const xcb_setup_t *R);
  4861. xcb_format_t *
  4862. xcb_setup_pixmap_formats (const xcb_setup_t *R);
  4863. int
  4864. xcb_setup_pixmap_formats_length (const xcb_setup_t *R);
  4865. xcb_format_iterator_t
  4866. xcb_setup_pixmap_formats_iterator (const xcb_setup_t *R);
  4867. int
  4868. xcb_setup_roots_length (const xcb_setup_t *R);
  4869. xcb_screen_iterator_t
  4870. xcb_setup_roots_iterator (const xcb_setup_t *R);
  4871. /**
  4872. * Get the next element of the iterator
  4873. * @param i Pointer to a xcb_setup_iterator_t
  4874. *
  4875. * Get the next element in the iterator. The member rem is
  4876. * decreased by one. The member data points to the next
  4877. * element. The member index is increased by sizeof(xcb_setup_t)
  4878. */
  4879. void
  4880. xcb_setup_next (xcb_setup_iterator_t *i);
  4881. /**
  4882. * Return the iterator pointing to the last element
  4883. * @param i An xcb_setup_iterator_t
  4884. * @return The iterator pointing to the last element
  4885. *
  4886. * Set the current element in the iterator to the last element.
  4887. * The member rem is set to 0. The member data points to the
  4888. * last element.
  4889. */
  4890. xcb_generic_iterator_t
  4891. xcb_setup_end (xcb_setup_iterator_t i);
  4892. /**
  4893. * Get the next element of the iterator
  4894. * @param i Pointer to a xcb_client_message_data_iterator_t
  4895. *
  4896. * Get the next element in the iterator. The member rem is
  4897. * decreased by one. The member data points to the next
  4898. * element. The member index is increased by sizeof(xcb_client_message_data_t)
  4899. */
  4900. void
  4901. xcb_client_message_data_next (xcb_client_message_data_iterator_t *i);
  4902. /**
  4903. * Return the iterator pointing to the last element
  4904. * @param i An xcb_client_message_data_iterator_t
  4905. * @return The iterator pointing to the last element
  4906. *
  4907. * Set the current element in the iterator to the last element.
  4908. * The member rem is set to 0. The member data points to the
  4909. * last element.
  4910. */
  4911. xcb_generic_iterator_t
  4912. xcb_client_message_data_end (xcb_client_message_data_iterator_t i);
  4913. int
  4914. xcb_create_window_value_list_serialize (void **_buffer,
  4915. uint32_t value_mask,
  4916. const xcb_create_window_value_list_t *_aux);
  4917. int
  4918. xcb_create_window_value_list_unpack (const void *_buffer,
  4919. uint32_t value_mask,
  4920. xcb_create_window_value_list_t *_aux);
  4921. int
  4922. xcb_create_window_value_list_sizeof (const void *_buffer,
  4923. uint32_t value_mask);
  4924. int
  4925. xcb_create_window_sizeof (const void *_buffer);
  4926. /**
  4927. * @brief Creates a window
  4928. *
  4929. * @param c The connection
  4930. * @param depth Specifies the new window's depth (TODO: what unit?).
  4931. * \n
  4932. * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the
  4933. * \a parent window.
  4934. * @param wid The ID with which you will refer to the new window, created by
  4935. * `xcb_generate_id`.
  4936. * @param parent The parent window of the new window.
  4937. * @param x The X coordinate of the new window.
  4938. * @param y The Y coordinate of the new window.
  4939. * @param width The width of the new window.
  4940. * @param height The height of the new window.
  4941. * @param border_width TODO:
  4942. * \n
  4943. * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs.
  4944. * @param _class A bitmask of #xcb_window_class_t values.
  4945. * @param _class \n
  4946. * @param visual Specifies the id for the new window's visual.
  4947. * \n
  4948. * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the
  4949. * \a parent window.
  4950. * @param value_mask A bitmask of #xcb_cw_t values.
  4951. * @return A cookie
  4952. *
  4953. * Creates an unmapped window as child of the specified \a parent window. A
  4954. * CreateNotify event will be generated. The new window is placed on top in the
  4955. * stacking order with respect to siblings.
  4956. *
  4957. * The coordinate system has the X axis horizontal and the Y axis vertical with
  4958. * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms
  4959. * of pixels, and coincide with pixel centers. Each window and pixmap has its own
  4960. * coordinate system. For a window, the origin is inside the border at the inside,
  4961. * upper-left corner.
  4962. *
  4963. * The created window is not yet displayed (mapped), call `xcb_map_window` to
  4964. * display it.
  4965. *
  4966. * The created window will initially use the same cursor as its parent.
  4967. *
  4968. * This form can be used only if the request will not cause
  4969. * a reply to be generated. Any returned error will be
  4970. * saved for handling by xcb_request_check().
  4971. */
  4972. xcb_void_cookie_t
  4973. xcb_create_window_checked (xcb_connection_t *c,
  4974. uint8_t depth,
  4975. xcb_window_t wid,
  4976. xcb_window_t parent,
  4977. int16_t x,
  4978. int16_t y,
  4979. uint16_t width,
  4980. uint16_t height,
  4981. uint16_t border_width,
  4982. uint16_t _class,
  4983. xcb_visualid_t visual,
  4984. uint32_t value_mask,
  4985. const void *value_list);
  4986. /**
  4987. * @brief Creates a window
  4988. *
  4989. * @param c The connection
  4990. * @param depth Specifies the new window's depth (TODO: what unit?).
  4991. * \n
  4992. * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the
  4993. * \a parent window.
  4994. * @param wid The ID with which you will refer to the new window, created by
  4995. * `xcb_generate_id`.
  4996. * @param parent The parent window of the new window.
  4997. * @param x The X coordinate of the new window.
  4998. * @param y The Y coordinate of the new window.
  4999. * @param width The width of the new window.
  5000. * @param height The height of the new window.
  5001. * @param border_width TODO:
  5002. * \n
  5003. * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs.
  5004. * @param _class A bitmask of #xcb_window_class_t values.
  5005. * @param _class \n
  5006. * @param visual Specifies the id for the new window's visual.
  5007. * \n
  5008. * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the
  5009. * \a parent window.
  5010. * @param value_mask A bitmask of #xcb_cw_t values.
  5011. * @return A cookie
  5012. *
  5013. * Creates an unmapped window as child of the specified \a parent window. A
  5014. * CreateNotify event will be generated. The new window is placed on top in the
  5015. * stacking order with respect to siblings.
  5016. *
  5017. * The coordinate system has the X axis horizontal and the Y axis vertical with
  5018. * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms
  5019. * of pixels, and coincide with pixel centers. Each window and pixmap has its own
  5020. * coordinate system. For a window, the origin is inside the border at the inside,
  5021. * upper-left corner.
  5022. *
  5023. * The created window is not yet displayed (mapped), call `xcb_map_window` to
  5024. * display it.
  5025. *
  5026. * The created window will initially use the same cursor as its parent.
  5027. *
  5028. */
  5029. xcb_void_cookie_t
  5030. xcb_create_window (xcb_connection_t *c,
  5031. uint8_t depth,
  5032. xcb_window_t wid,
  5033. xcb_window_t parent,
  5034. int16_t x,
  5035. int16_t y,
  5036. uint16_t width,
  5037. uint16_t height,
  5038. uint16_t border_width,
  5039. uint16_t _class,
  5040. xcb_visualid_t visual,
  5041. uint32_t value_mask,
  5042. const void *value_list);
  5043. /**
  5044. * @brief Creates a window
  5045. *
  5046. * @param c The connection
  5047. * @param depth Specifies the new window's depth (TODO: what unit?).
  5048. * \n
  5049. * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the
  5050. * \a parent window.
  5051. * @param wid The ID with which you will refer to the new window, created by
  5052. * `xcb_generate_id`.
  5053. * @param parent The parent window of the new window.
  5054. * @param x The X coordinate of the new window.
  5055. * @param y The Y coordinate of the new window.
  5056. * @param width The width of the new window.
  5057. * @param height The height of the new window.
  5058. * @param border_width TODO:
  5059. * \n
  5060. * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs.
  5061. * @param _class A bitmask of #xcb_window_class_t values.
  5062. * @param _class \n
  5063. * @param visual Specifies the id for the new window's visual.
  5064. * \n
  5065. * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the
  5066. * \a parent window.
  5067. * @param value_mask A bitmask of #xcb_cw_t values.
  5068. * @return A cookie
  5069. *
  5070. * Creates an unmapped window as child of the specified \a parent window. A
  5071. * CreateNotify event will be generated. The new window is placed on top in the
  5072. * stacking order with respect to siblings.
  5073. *
  5074. * The coordinate system has the X axis horizontal and the Y axis vertical with
  5075. * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms
  5076. * of pixels, and coincide with pixel centers. Each window and pixmap has its own
  5077. * coordinate system. For a window, the origin is inside the border at the inside,
  5078. * upper-left corner.
  5079. *
  5080. * The created window is not yet displayed (mapped), call `xcb_map_window` to
  5081. * display it.
  5082. *
  5083. * The created window will initially use the same cursor as its parent.
  5084. *
  5085. * This form can be used only if the request will not cause
  5086. * a reply to be generated. Any returned error will be
  5087. * saved for handling by xcb_request_check().
  5088. */
  5089. xcb_void_cookie_t
  5090. xcb_create_window_aux_checked (xcb_connection_t *c,
  5091. uint8_t depth,
  5092. xcb_window_t wid,
  5093. xcb_window_t parent,
  5094. int16_t x,
  5095. int16_t y,
  5096. uint16_t width,
  5097. uint16_t height,
  5098. uint16_t border_width,
  5099. uint16_t _class,
  5100. xcb_visualid_t visual,
  5101. uint32_t value_mask,
  5102. const xcb_create_window_value_list_t *value_list);
  5103. /**
  5104. * @brief Creates a window
  5105. *
  5106. * @param c The connection
  5107. * @param depth Specifies the new window's depth (TODO: what unit?).
  5108. * \n
  5109. * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the
  5110. * \a parent window.
  5111. * @param wid The ID with which you will refer to the new window, created by
  5112. * `xcb_generate_id`.
  5113. * @param parent The parent window of the new window.
  5114. * @param x The X coordinate of the new window.
  5115. * @param y The Y coordinate of the new window.
  5116. * @param width The width of the new window.
  5117. * @param height The height of the new window.
  5118. * @param border_width TODO:
  5119. * \n
  5120. * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs.
  5121. * @param _class A bitmask of #xcb_window_class_t values.
  5122. * @param _class \n
  5123. * @param visual Specifies the id for the new window's visual.
  5124. * \n
  5125. * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the
  5126. * \a parent window.
  5127. * @param value_mask A bitmask of #xcb_cw_t values.
  5128. * @return A cookie
  5129. *
  5130. * Creates an unmapped window as child of the specified \a parent window. A
  5131. * CreateNotify event will be generated. The new window is placed on top in the
  5132. * stacking order with respect to siblings.
  5133. *
  5134. * The coordinate system has the X axis horizontal and the Y axis vertical with
  5135. * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms
  5136. * of pixels, and coincide with pixel centers. Each window and pixmap has its own
  5137. * coordinate system. For a window, the origin is inside the border at the inside,
  5138. * upper-left corner.
  5139. *
  5140. * The created window is not yet displayed (mapped), call `xcb_map_window` to
  5141. * display it.
  5142. *
  5143. * The created window will initially use the same cursor as its parent.
  5144. *
  5145. */
  5146. xcb_void_cookie_t
  5147. xcb_create_window_aux (xcb_connection_t *c,
  5148. uint8_t depth,
  5149. xcb_window_t wid,
  5150. xcb_window_t parent,
  5151. int16_t x,
  5152. int16_t y,
  5153. uint16_t width,
  5154. uint16_t height,
  5155. uint16_t border_width,
  5156. uint16_t _class,
  5157. xcb_visualid_t visual,
  5158. uint32_t value_mask,
  5159. const xcb_create_window_value_list_t *value_list);
  5160. void *
  5161. xcb_create_window_value_list (const xcb_create_window_request_t *R);
  5162. int
  5163. xcb_change_window_attributes_value_list_serialize (void **_buffer,
  5164. uint32_t value_mask,
  5165. const xcb_change_window_attributes_value_list_t *_aux);
  5166. int
  5167. xcb_change_window_attributes_value_list_unpack (const void *_buffer,
  5168. uint32_t value_mask,
  5169. xcb_change_window_attributes_value_list_t *_aux);
  5170. int
  5171. xcb_change_window_attributes_value_list_sizeof (const void *_buffer,
  5172. uint32_t value_mask);
  5173. int
  5174. xcb_change_window_attributes_sizeof (const void *_buffer);
  5175. /**
  5176. * @brief change window attributes
  5177. *
  5178. * @param c The connection
  5179. * @param window The window to change.
  5180. * @param value_mask A bitmask of #xcb_cw_t values.
  5181. * @param value_mask \n
  5182. * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The
  5183. * order has to correspond to the order of possible \a value_mask bits. See the
  5184. * example.
  5185. * @return A cookie
  5186. *
  5187. * Changes the attributes specified by \a value_mask for the specified \a window.
  5188. *
  5189. * This form can be used only if the request will not cause
  5190. * a reply to be generated. Any returned error will be
  5191. * saved for handling by xcb_request_check().
  5192. */
  5193. xcb_void_cookie_t
  5194. xcb_change_window_attributes_checked (xcb_connection_t *c,
  5195. xcb_window_t window,
  5196. uint32_t value_mask,
  5197. const void *value_list);
  5198. /**
  5199. * @brief change window attributes
  5200. *
  5201. * @param c The connection
  5202. * @param window The window to change.
  5203. * @param value_mask A bitmask of #xcb_cw_t values.
  5204. * @param value_mask \n
  5205. * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The
  5206. * order has to correspond to the order of possible \a value_mask bits. See the
  5207. * example.
  5208. * @return A cookie
  5209. *
  5210. * Changes the attributes specified by \a value_mask for the specified \a window.
  5211. *
  5212. */
  5213. xcb_void_cookie_t
  5214. xcb_change_window_attributes (xcb_connection_t *c,
  5215. xcb_window_t window,
  5216. uint32_t value_mask,
  5217. const void *value_list);
  5218. /**
  5219. * @brief change window attributes
  5220. *
  5221. * @param c The connection
  5222. * @param window The window to change.
  5223. * @param value_mask A bitmask of #xcb_cw_t values.
  5224. * @param value_mask \n
  5225. * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The
  5226. * order has to correspond to the order of possible \a value_mask bits. See the
  5227. * example.
  5228. * @return A cookie
  5229. *
  5230. * Changes the attributes specified by \a value_mask for the specified \a window.
  5231. *
  5232. * This form can be used only if the request will not cause
  5233. * a reply to be generated. Any returned error will be
  5234. * saved for handling by xcb_request_check().
  5235. */
  5236. xcb_void_cookie_t
  5237. xcb_change_window_attributes_aux_checked (xcb_connection_t *c,
  5238. xcb_window_t window,
  5239. uint32_t value_mask,
  5240. const xcb_change_window_attributes_value_list_t *value_list);
  5241. /**
  5242. * @brief change window attributes
  5243. *
  5244. * @param c The connection
  5245. * @param window The window to change.
  5246. * @param value_mask A bitmask of #xcb_cw_t values.
  5247. * @param value_mask \n
  5248. * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The
  5249. * order has to correspond to the order of possible \a value_mask bits. See the
  5250. * example.
  5251. * @return A cookie
  5252. *
  5253. * Changes the attributes specified by \a value_mask for the specified \a window.
  5254. *
  5255. */
  5256. xcb_void_cookie_t
  5257. xcb_change_window_attributes_aux (xcb_connection_t *c,
  5258. xcb_window_t window,
  5259. uint32_t value_mask,
  5260. const xcb_change_window_attributes_value_list_t *value_list);
  5261. void *
  5262. xcb_change_window_attributes_value_list (const xcb_change_window_attributes_request_t *R);
  5263. /**
  5264. * @brief Gets window attributes
  5265. *
  5266. * @param c The connection
  5267. * @param window The window to get the attributes from.
  5268. * @return A cookie
  5269. *
  5270. * Gets the current attributes for the specified \a window.
  5271. *
  5272. */
  5273. xcb_get_window_attributes_cookie_t
  5274. xcb_get_window_attributes (xcb_connection_t *c,
  5275. xcb_window_t window);
  5276. /**
  5277. * @brief Gets window attributes
  5278. *
  5279. * @param c The connection
  5280. * @param window The window to get the attributes from.
  5281. * @return A cookie
  5282. *
  5283. * Gets the current attributes for the specified \a window.
  5284. *
  5285. * This form can be used only if the request will cause
  5286. * a reply to be generated. Any returned error will be
  5287. * placed in the event queue.
  5288. */
  5289. xcb_get_window_attributes_cookie_t
  5290. xcb_get_window_attributes_unchecked (xcb_connection_t *c,
  5291. xcb_window_t window);
  5292. /**
  5293. * Return the reply
  5294. * @param c The connection
  5295. * @param cookie The cookie
  5296. * @param e The xcb_generic_error_t supplied
  5297. *
  5298. * Returns the reply of the request asked by
  5299. *
  5300. * The parameter @p e supplied to this function must be NULL if
  5301. * xcb_get_window_attributes_unchecked(). is used.
  5302. * Otherwise, it stores the error if any.
  5303. *
  5304. * The returned value must be freed by the caller using free().
  5305. */
  5306. xcb_get_window_attributes_reply_t *
  5307. xcb_get_window_attributes_reply (xcb_connection_t *c,
  5308. xcb_get_window_attributes_cookie_t cookie /**< */,
  5309. xcb_generic_error_t **e);
  5310. /**
  5311. * @brief Destroys a window
  5312. *
  5313. * @param c The connection
  5314. * @param window The window to destroy.
  5315. * @return A cookie
  5316. *
  5317. * Destroys the specified window and all of its subwindows. A DestroyNotify event
  5318. * is generated for each destroyed window (a DestroyNotify event is first generated
  5319. * for any given window's inferiors). If the window was mapped, it will be
  5320. * automatically unmapped before destroying.
  5321. *
  5322. * Calling DestroyWindow on the root window will do nothing.
  5323. *
  5324. * This form can be used only if the request will not cause
  5325. * a reply to be generated. Any returned error will be
  5326. * saved for handling by xcb_request_check().
  5327. */
  5328. xcb_void_cookie_t
  5329. xcb_destroy_window_checked (xcb_connection_t *c,
  5330. xcb_window_t window);
  5331. /**
  5332. * @brief Destroys a window
  5333. *
  5334. * @param c The connection
  5335. * @param window The window to destroy.
  5336. * @return A cookie
  5337. *
  5338. * Destroys the specified window and all of its subwindows. A DestroyNotify event
  5339. * is generated for each destroyed window (a DestroyNotify event is first generated
  5340. * for any given window's inferiors). If the window was mapped, it will be
  5341. * automatically unmapped before destroying.
  5342. *
  5343. * Calling DestroyWindow on the root window will do nothing.
  5344. *
  5345. */
  5346. xcb_void_cookie_t
  5347. xcb_destroy_window (xcb_connection_t *c,
  5348. xcb_window_t window);
  5349. /**
  5350. *
  5351. * @param c The connection
  5352. * @return A cookie
  5353. *
  5354. * Delivers a request to the X server.
  5355. *
  5356. * This form can be used only if the request will not cause
  5357. * a reply to be generated. Any returned error will be
  5358. * saved for handling by xcb_request_check().
  5359. */
  5360. xcb_void_cookie_t
  5361. xcb_destroy_subwindows_checked (xcb_connection_t *c,
  5362. xcb_window_t window);
  5363. /**
  5364. *
  5365. * @param c The connection
  5366. * @return A cookie
  5367. *
  5368. * Delivers a request to the X server.
  5369. *
  5370. */
  5371. xcb_void_cookie_t
  5372. xcb_destroy_subwindows (xcb_connection_t *c,
  5373. xcb_window_t window);
  5374. /**
  5375. * @brief Changes a client's save set
  5376. *
  5377. * @param c The connection
  5378. * @param mode A bitmask of #xcb_set_mode_t values.
  5379. * @param mode Insert to add the specified window to the save set or Delete to delete it from the save set.
  5380. * @param window The window to add or delete to/from your save set.
  5381. * @return A cookie
  5382. *
  5383. * TODO: explain what the save set is for.
  5384. *
  5385. * This function either adds or removes the specified window to the client's (your
  5386. * application's) save set.
  5387. *
  5388. * This form can be used only if the request will not cause
  5389. * a reply to be generated. Any returned error will be
  5390. * saved for handling by xcb_request_check().
  5391. */
  5392. xcb_void_cookie_t
  5393. xcb_change_save_set_checked (xcb_connection_t *c,
  5394. uint8_t mode,
  5395. xcb_window_t window);
  5396. /**
  5397. * @brief Changes a client's save set
  5398. *
  5399. * @param c The connection
  5400. * @param mode A bitmask of #xcb_set_mode_t values.
  5401. * @param mode Insert to add the specified window to the save set or Delete to delete it from the save set.
  5402. * @param window The window to add or delete to/from your save set.
  5403. * @return A cookie
  5404. *
  5405. * TODO: explain what the save set is for.
  5406. *
  5407. * This function either adds or removes the specified window to the client's (your
  5408. * application's) save set.
  5409. *
  5410. */
  5411. xcb_void_cookie_t
  5412. xcb_change_save_set (xcb_connection_t *c,
  5413. uint8_t mode,
  5414. xcb_window_t window);
  5415. /**
  5416. * @brief Reparents a window
  5417. *
  5418. * @param c The connection
  5419. * @param window The window to reparent.
  5420. * @param parent The new parent of the window.
  5421. * @param x The X position of the window within its new parent.
  5422. * @param y The Y position of the window within its new parent.
  5423. * @return A cookie
  5424. *
  5425. * Makes the specified window a child of the specified parent window. If the
  5426. * window is mapped, it will automatically be unmapped before reparenting and
  5427. * re-mapped after reparenting. The window is placed in the stacking order on top
  5428. * with respect to sibling windows.
  5429. *
  5430. * After reparenting, a ReparentNotify event is generated.
  5431. *
  5432. * This form can be used only if the request will not cause
  5433. * a reply to be generated. Any returned error will be
  5434. * saved for handling by xcb_request_check().
  5435. */
  5436. xcb_void_cookie_t
  5437. xcb_reparent_window_checked (xcb_connection_t *c,
  5438. xcb_window_t window,
  5439. xcb_window_t parent,
  5440. int16_t x,
  5441. int16_t y);
  5442. /**
  5443. * @brief Reparents a window
  5444. *
  5445. * @param c The connection
  5446. * @param window The window to reparent.
  5447. * @param parent The new parent of the window.
  5448. * @param x The X position of the window within its new parent.
  5449. * @param y The Y position of the window within its new parent.
  5450. * @return A cookie
  5451. *
  5452. * Makes the specified window a child of the specified parent window. If the
  5453. * window is mapped, it will automatically be unmapped before reparenting and
  5454. * re-mapped after reparenting. The window is placed in the stacking order on top
  5455. * with respect to sibling windows.
  5456. *
  5457. * After reparenting, a ReparentNotify event is generated.
  5458. *
  5459. */
  5460. xcb_void_cookie_t
  5461. xcb_reparent_window (xcb_connection_t *c,
  5462. xcb_window_t window,
  5463. xcb_window_t parent,
  5464. int16_t x,
  5465. int16_t y);
  5466. /**
  5467. * @brief Makes a window visible
  5468. *
  5469. * @param c The connection
  5470. * @param window The window to make visible.
  5471. * @return A cookie
  5472. *
  5473. * Maps the specified window. This means making the window visible (as long as its
  5474. * parent is visible).
  5475. *
  5476. * This MapWindow request will be translated to a MapRequest request if a window
  5477. * manager is running. The window manager then decides to either map the window or
  5478. * not. Set the override-redirect window attribute to true if you want to bypass
  5479. * this mechanism.
  5480. *
  5481. * If the window manager decides to map the window (or if no window manager is
  5482. * running), a MapNotify event is generated.
  5483. *
  5484. * If the window becomes viewable and no earlier contents for it are remembered,
  5485. * the X server tiles the window with its background. If the window's background
  5486. * is undefined, the existing screen contents are not altered, and the X server
  5487. * generates zero or more Expose events.
  5488. *
  5489. * If the window type is InputOutput, an Expose event will be generated when the
  5490. * window becomes visible. The normal response to an Expose event should be to
  5491. * repaint the window.
  5492. *
  5493. * This form can be used only if the request will not cause
  5494. * a reply to be generated. Any returned error will be
  5495. * saved for handling by xcb_request_check().
  5496. */
  5497. xcb_void_cookie_t
  5498. xcb_map_window_checked (xcb_connection_t *c,
  5499. xcb_window_t window);
  5500. /**
  5501. * @brief Makes a window visible
  5502. *
  5503. * @param c The connection
  5504. * @param window The window to make visible.
  5505. * @return A cookie
  5506. *
  5507. * Maps the specified window. This means making the window visible (as long as its
  5508. * parent is visible).
  5509. *
  5510. * This MapWindow request will be translated to a MapRequest request if a window
  5511. * manager is running. The window manager then decides to either map the window or
  5512. * not. Set the override-redirect window attribute to true if you want to bypass
  5513. * this mechanism.
  5514. *
  5515. * If the window manager decides to map the window (or if no window manager is
  5516. * running), a MapNotify event is generated.
  5517. *
  5518. * If the window becomes viewable and no earlier contents for it are remembered,
  5519. * the X server tiles the window with its background. If the window's background
  5520. * is undefined, the existing screen contents are not altered, and the X server
  5521. * generates zero or more Expose events.
  5522. *
  5523. * If the window type is InputOutput, an Expose event will be generated when the
  5524. * window becomes visible. The normal response to an Expose event should be to
  5525. * repaint the window.
  5526. *
  5527. */
  5528. xcb_void_cookie_t
  5529. xcb_map_window (xcb_connection_t *c,
  5530. xcb_window_t window);
  5531. /**
  5532. *
  5533. * @param c The connection
  5534. * @return A cookie
  5535. *
  5536. * Delivers a request to the X server.
  5537. *
  5538. * This form can be used only if the request will not cause
  5539. * a reply to be generated. Any returned error will be
  5540. * saved for handling by xcb_request_check().
  5541. */
  5542. xcb_void_cookie_t
  5543. xcb_map_subwindows_checked (xcb_connection_t *c,
  5544. xcb_window_t window);
  5545. /**
  5546. *
  5547. * @param c The connection
  5548. * @return A cookie
  5549. *
  5550. * Delivers a request to the X server.
  5551. *
  5552. */
  5553. xcb_void_cookie_t
  5554. xcb_map_subwindows (xcb_connection_t *c,
  5555. xcb_window_t window);
  5556. /**
  5557. * @brief Makes a window invisible
  5558. *
  5559. * @param c The connection
  5560. * @param window The window to make invisible.
  5561. * @return A cookie
  5562. *
  5563. * Unmaps the specified window. This means making the window invisible (and all
  5564. * its child windows).
  5565. *
  5566. * Unmapping a window leads to the `UnmapNotify` event being generated. Also,
  5567. * `Expose` events are generated for formerly obscured windows.
  5568. *
  5569. * This form can be used only if the request will not cause
  5570. * a reply to be generated. Any returned error will be
  5571. * saved for handling by xcb_request_check().
  5572. */
  5573. xcb_void_cookie_t
  5574. xcb_unmap_window_checked (xcb_connection_t *c,
  5575. xcb_window_t window);
  5576. /**
  5577. * @brief Makes a window invisible
  5578. *
  5579. * @param c The connection
  5580. * @param window The window to make invisible.
  5581. * @return A cookie
  5582. *
  5583. * Unmaps the specified window. This means making the window invisible (and all
  5584. * its child windows).
  5585. *
  5586. * Unmapping a window leads to the `UnmapNotify` event being generated. Also,
  5587. * `Expose` events are generated for formerly obscured windows.
  5588. *
  5589. */
  5590. xcb_void_cookie_t
  5591. xcb_unmap_window (xcb_connection_t *c,
  5592. xcb_window_t window);
  5593. /**
  5594. *
  5595. * @param c The connection
  5596. * @return A cookie
  5597. *
  5598. * Delivers a request to the X server.
  5599. *
  5600. * This form can be used only if the request will not cause
  5601. * a reply to be generated. Any returned error will be
  5602. * saved for handling by xcb_request_check().
  5603. */
  5604. xcb_void_cookie_t
  5605. xcb_unmap_subwindows_checked (xcb_connection_t *c,
  5606. xcb_window_t window);
  5607. /**
  5608. *
  5609. * @param c The connection
  5610. * @return A cookie
  5611. *
  5612. * Delivers a request to the X server.
  5613. *
  5614. */
  5615. xcb_void_cookie_t
  5616. xcb_unmap_subwindows (xcb_connection_t *c,
  5617. xcb_window_t window);
  5618. int
  5619. xcb_configure_window_value_list_serialize (void **_buffer,
  5620. uint16_t value_mask,
  5621. const xcb_configure_window_value_list_t *_aux);
  5622. int
  5623. xcb_configure_window_value_list_unpack (const void *_buffer,
  5624. uint16_t value_mask,
  5625. xcb_configure_window_value_list_t *_aux);
  5626. int
  5627. xcb_configure_window_value_list_sizeof (const void *_buffer,
  5628. uint16_t value_mask);
  5629. int
  5630. xcb_configure_window_sizeof (const void *_buffer);
  5631. /**
  5632. * @brief Configures window attributes
  5633. *
  5634. * @param c The connection
  5635. * @param window The window to configure.
  5636. * @param value_mask Bitmask of attributes to change.
  5637. * @param value_list New values, corresponding to the attributes in value_mask. The order has to
  5638. * correspond to the order of possible \a value_mask bits. See the example.
  5639. * @return A cookie
  5640. *
  5641. * Configures a window's size, position, border width and stacking order.
  5642. *
  5643. * This form can be used only if the request will not cause
  5644. * a reply to be generated. Any returned error will be
  5645. * saved for handling by xcb_request_check().
  5646. */
  5647. xcb_void_cookie_t
  5648. xcb_configure_window_checked (xcb_connection_t *c,
  5649. xcb_window_t window,
  5650. uint16_t value_mask,
  5651. const void *value_list);
  5652. /**
  5653. * @brief Configures window attributes
  5654. *
  5655. * @param c The connection
  5656. * @param window The window to configure.
  5657. * @param value_mask Bitmask of attributes to change.
  5658. * @param value_list New values, corresponding to the attributes in value_mask. The order has to
  5659. * correspond to the order of possible \a value_mask bits. See the example.
  5660. * @return A cookie
  5661. *
  5662. * Configures a window's size, position, border width and stacking order.
  5663. *
  5664. */
  5665. xcb_void_cookie_t
  5666. xcb_configure_window (xcb_connection_t *c,
  5667. xcb_window_t window,
  5668. uint16_t value_mask,
  5669. const void *value_list);
  5670. /**
  5671. * @brief Configures window attributes
  5672. *
  5673. * @param c The connection
  5674. * @param window The window to configure.
  5675. * @param value_mask Bitmask of attributes to change.
  5676. * @param value_list New values, corresponding to the attributes in value_mask. The order has to
  5677. * correspond to the order of possible \a value_mask bits. See the example.
  5678. * @return A cookie
  5679. *
  5680. * Configures a window's size, position, border width and stacking order.
  5681. *
  5682. * This form can be used only if the request will not cause
  5683. * a reply to be generated. Any returned error will be
  5684. * saved for handling by xcb_request_check().
  5685. */
  5686. xcb_void_cookie_t
  5687. xcb_configure_window_aux_checked (xcb_connection_t *c,
  5688. xcb_window_t window,
  5689. uint16_t value_mask,
  5690. const xcb_configure_window_value_list_t *value_list);
  5691. /**
  5692. * @brief Configures window attributes
  5693. *
  5694. * @param c The connection
  5695. * @param window The window to configure.
  5696. * @param value_mask Bitmask of attributes to change.
  5697. * @param value_list New values, corresponding to the attributes in value_mask. The order has to
  5698. * correspond to the order of possible \a value_mask bits. See the example.
  5699. * @return A cookie
  5700. *
  5701. * Configures a window's size, position, border width and stacking order.
  5702. *
  5703. */
  5704. xcb_void_cookie_t
  5705. xcb_configure_window_aux (xcb_connection_t *c,
  5706. xcb_window_t window,
  5707. uint16_t value_mask,
  5708. const xcb_configure_window_value_list_t *value_list);
  5709. void *
  5710. xcb_configure_window_value_list (const xcb_configure_window_request_t *R);
  5711. /**
  5712. * @brief Change window stacking order
  5713. *
  5714. * @param c The connection
  5715. * @param direction A bitmask of #xcb_circulate_t values.
  5716. * @param direction \n
  5717. * @param window The window to raise/lower (depending on \a direction).
  5718. * @return A cookie
  5719. *
  5720. * If \a direction is `XCB_CIRCULATE_RAISE_LOWEST`, the lowest mapped child (if
  5721. * any) will be raised to the top of the stack.
  5722. *
  5723. * If \a direction is `XCB_CIRCULATE_LOWER_HIGHEST`, the highest mapped child will
  5724. * be lowered to the bottom of the stack.
  5725. *
  5726. * This form can be used only if the request will not cause
  5727. * a reply to be generated. Any returned error will be
  5728. * saved for handling by xcb_request_check().
  5729. */
  5730. xcb_void_cookie_t
  5731. xcb_circulate_window_checked (xcb_connection_t *c,
  5732. uint8_t direction,
  5733. xcb_window_t window);
  5734. /**
  5735. * @brief Change window stacking order
  5736. *
  5737. * @param c The connection
  5738. * @param direction A bitmask of #xcb_circulate_t values.
  5739. * @param direction \n
  5740. * @param window The window to raise/lower (depending on \a direction).
  5741. * @return A cookie
  5742. *
  5743. * If \a direction is `XCB_CIRCULATE_RAISE_LOWEST`, the lowest mapped child (if
  5744. * any) will be raised to the top of the stack.
  5745. *
  5746. * If \a direction is `XCB_CIRCULATE_LOWER_HIGHEST`, the highest mapped child will
  5747. * be lowered to the bottom of the stack.
  5748. *
  5749. */
  5750. xcb_void_cookie_t
  5751. xcb_circulate_window (xcb_connection_t *c,
  5752. uint8_t direction,
  5753. xcb_window_t window);
  5754. /**
  5755. * @brief Get current window geometry
  5756. *
  5757. * @param c The connection
  5758. * @param drawable The drawable (`Window` or `Pixmap`) of which the geometry will be received.
  5759. * @return A cookie
  5760. *
  5761. * Gets the current geometry of the specified drawable (either `Window` or `Pixmap`).
  5762. *
  5763. */
  5764. xcb_get_geometry_cookie_t
  5765. xcb_get_geometry (xcb_connection_t *c,
  5766. xcb_drawable_t drawable);
  5767. /**
  5768. * @brief Get current window geometry
  5769. *
  5770. * @param c The connection
  5771. * @param drawable The drawable (`Window` or `Pixmap`) of which the geometry will be received.
  5772. * @return A cookie
  5773. *
  5774. * Gets the current geometry of the specified drawable (either `Window` or `Pixmap`).
  5775. *
  5776. * This form can be used only if the request will cause
  5777. * a reply to be generated. Any returned error will be
  5778. * placed in the event queue.
  5779. */
  5780. xcb_get_geometry_cookie_t
  5781. xcb_get_geometry_unchecked (xcb_connection_t *c,
  5782. xcb_drawable_t drawable);
  5783. /**
  5784. * Return the reply
  5785. * @param c The connection
  5786. * @param cookie The cookie
  5787. * @param e The xcb_generic_error_t supplied
  5788. *
  5789. * Returns the reply of the request asked by
  5790. *
  5791. * The parameter @p e supplied to this function must be NULL if
  5792. * xcb_get_geometry_unchecked(). is used.
  5793. * Otherwise, it stores the error if any.
  5794. *
  5795. * The returned value must be freed by the caller using free().
  5796. */
  5797. xcb_get_geometry_reply_t *
  5798. xcb_get_geometry_reply (xcb_connection_t *c,
  5799. xcb_get_geometry_cookie_t cookie /**< */,
  5800. xcb_generic_error_t **e);
  5801. int
  5802. xcb_query_tree_sizeof (const void *_buffer);
  5803. /**
  5804. * @brief query the window tree
  5805. *
  5806. * @param c The connection
  5807. * @param window The \a window to query.
  5808. * @return A cookie
  5809. *
  5810. * Gets the root window ID, parent window ID and list of children windows for the
  5811. * specified \a window. The children are listed in bottom-to-top stacking order.
  5812. *
  5813. */
  5814. xcb_query_tree_cookie_t
  5815. xcb_query_tree (xcb_connection_t *c,
  5816. xcb_window_t window);
  5817. /**
  5818. * @brief query the window tree
  5819. *
  5820. * @param c The connection
  5821. * @param window The \a window to query.
  5822. * @return A cookie
  5823. *
  5824. * Gets the root window ID, parent window ID and list of children windows for the
  5825. * specified \a window. The children are listed in bottom-to-top stacking order.
  5826. *
  5827. * This form can be used only if the request will cause
  5828. * a reply to be generated. Any returned error will be
  5829. * placed in the event queue.
  5830. */
  5831. xcb_query_tree_cookie_t
  5832. xcb_query_tree_unchecked (xcb_connection_t *c,
  5833. xcb_window_t window);
  5834. xcb_window_t *
  5835. xcb_query_tree_children (const xcb_query_tree_reply_t *R);
  5836. int
  5837. xcb_query_tree_children_length (const xcb_query_tree_reply_t *R);
  5838. xcb_generic_iterator_t
  5839. xcb_query_tree_children_end (const xcb_query_tree_reply_t *R);
  5840. /**
  5841. * Return the reply
  5842. * @param c The connection
  5843. * @param cookie The cookie
  5844. * @param e The xcb_generic_error_t supplied
  5845. *
  5846. * Returns the reply of the request asked by
  5847. *
  5848. * The parameter @p e supplied to this function must be NULL if
  5849. * xcb_query_tree_unchecked(). is used.
  5850. * Otherwise, it stores the error if any.
  5851. *
  5852. * The returned value must be freed by the caller using free().
  5853. */
  5854. xcb_query_tree_reply_t *
  5855. xcb_query_tree_reply (xcb_connection_t *c,
  5856. xcb_query_tree_cookie_t cookie /**< */,
  5857. xcb_generic_error_t **e);
  5858. int
  5859. xcb_intern_atom_sizeof (const void *_buffer);
  5860. /**
  5861. * @brief Get atom identifier by name
  5862. *
  5863. * @param c The connection
  5864. * @param only_if_exists Return a valid atom id only if the atom already exists.
  5865. * @param name_len The length of the following \a name.
  5866. * @param name The name of the atom.
  5867. * @return A cookie
  5868. *
  5869. * Retrieves the identifier (xcb_atom_t TODO) for the atom with the specified
  5870. * name. Atoms are used in protocols like EWMH, for example to store window titles
  5871. * (`_NET_WM_NAME` atom) as property of a window.
  5872. *
  5873. * If \a only_if_exists is 0, the atom will be created if it does not already exist.
  5874. * If \a only_if_exists is 1, `XCB_ATOM_NONE` will be returned if the atom does
  5875. * not yet exist.
  5876. *
  5877. */
  5878. xcb_intern_atom_cookie_t
  5879. xcb_intern_atom (xcb_connection_t *c,
  5880. uint8_t only_if_exists,
  5881. uint16_t name_len,
  5882. const char *name);
  5883. /**
  5884. * @brief Get atom identifier by name
  5885. *
  5886. * @param c The connection
  5887. * @param only_if_exists Return a valid atom id only if the atom already exists.
  5888. * @param name_len The length of the following \a name.
  5889. * @param name The name of the atom.
  5890. * @return A cookie
  5891. *
  5892. * Retrieves the identifier (xcb_atom_t TODO) for the atom with the specified
  5893. * name. Atoms are used in protocols like EWMH, for example to store window titles
  5894. * (`_NET_WM_NAME` atom) as property of a window.
  5895. *
  5896. * If \a only_if_exists is 0, the atom will be created if it does not already exist.
  5897. * If \a only_if_exists is 1, `XCB_ATOM_NONE` will be returned if the atom does
  5898. * not yet exist.
  5899. *
  5900. * This form can be used only if the request will cause
  5901. * a reply to be generated. Any returned error will be
  5902. * placed in the event queue.
  5903. */
  5904. xcb_intern_atom_cookie_t
  5905. xcb_intern_atom_unchecked (xcb_connection_t *c,
  5906. uint8_t only_if_exists,
  5907. uint16_t name_len,
  5908. const char *name);
  5909. /**
  5910. * Return the reply
  5911. * @param c The connection
  5912. * @param cookie The cookie
  5913. * @param e The xcb_generic_error_t supplied
  5914. *
  5915. * Returns the reply of the request asked by
  5916. *
  5917. * The parameter @p e supplied to this function must be NULL if
  5918. * xcb_intern_atom_unchecked(). is used.
  5919. * Otherwise, it stores the error if any.
  5920. *
  5921. * The returned value must be freed by the caller using free().
  5922. */
  5923. xcb_intern_atom_reply_t *
  5924. xcb_intern_atom_reply (xcb_connection_t *c,
  5925. xcb_intern_atom_cookie_t cookie /**< */,
  5926. xcb_generic_error_t **e);
  5927. int
  5928. xcb_get_atom_name_sizeof (const void *_buffer);
  5929. /**
  5930. *
  5931. * @param c The connection
  5932. * @return A cookie
  5933. *
  5934. * Delivers a request to the X server.
  5935. *
  5936. */
  5937. xcb_get_atom_name_cookie_t
  5938. xcb_get_atom_name (xcb_connection_t *c,
  5939. xcb_atom_t atom);
  5940. /**
  5941. *
  5942. * @param c The connection
  5943. * @return A cookie
  5944. *
  5945. * Delivers a request to the X server.
  5946. *
  5947. * This form can be used only if the request will cause
  5948. * a reply to be generated. Any returned error will be
  5949. * placed in the event queue.
  5950. */
  5951. xcb_get_atom_name_cookie_t
  5952. xcb_get_atom_name_unchecked (xcb_connection_t *c,
  5953. xcb_atom_t atom);
  5954. char *
  5955. xcb_get_atom_name_name (const xcb_get_atom_name_reply_t *R);
  5956. int
  5957. xcb_get_atom_name_name_length (const xcb_get_atom_name_reply_t *R);
  5958. xcb_generic_iterator_t
  5959. xcb_get_atom_name_name_end (const xcb_get_atom_name_reply_t *R);
  5960. /**
  5961. * Return the reply
  5962. * @param c The connection
  5963. * @param cookie The cookie
  5964. * @param e The xcb_generic_error_t supplied
  5965. *
  5966. * Returns the reply of the request asked by
  5967. *
  5968. * The parameter @p e supplied to this function must be NULL if
  5969. * xcb_get_atom_name_unchecked(). is used.
  5970. * Otherwise, it stores the error if any.
  5971. *
  5972. * The returned value must be freed by the caller using free().
  5973. */
  5974. xcb_get_atom_name_reply_t *
  5975. xcb_get_atom_name_reply (xcb_connection_t *c,
  5976. xcb_get_atom_name_cookie_t cookie /**< */,
  5977. xcb_generic_error_t **e);
  5978. int
  5979. xcb_change_property_sizeof (const void *_buffer);
  5980. /**
  5981. * @brief Changes a window property
  5982. *
  5983. * @param c The connection
  5984. * @param mode A bitmask of #xcb_prop_mode_t values.
  5985. * @param mode \n
  5986. * @param window The window whose property you want to change.
  5987. * @param property The property you want to change (an atom).
  5988. * @param type The type of the property you want to change (an atom).
  5989. * @param format Specifies whether the data should be viewed as a list of 8-bit, 16-bit or
  5990. * 32-bit quantities. Possible values are 8, 16 and 32. This information allows
  5991. * the X server to correctly perform byte-swap operations as necessary.
  5992. * @param data_len Specifies the number of elements (see \a format).
  5993. * @param data The property data.
  5994. * @return A cookie
  5995. *
  5996. * Sets or updates a property on the specified \a window. Properties are for
  5997. * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`).
  5998. * Protocols such as EWMH also use properties - for example EWMH defines the
  5999. * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property.
  6000. *
  6001. * This form can be used only if the request will not cause
  6002. * a reply to be generated. Any returned error will be
  6003. * saved for handling by xcb_request_check().
  6004. */
  6005. xcb_void_cookie_t
  6006. xcb_change_property_checked (xcb_connection_t *c,
  6007. uint8_t mode,
  6008. xcb_window_t window,
  6009. xcb_atom_t property,
  6010. xcb_atom_t type,
  6011. uint8_t format,
  6012. uint32_t data_len,
  6013. const void *data);
  6014. /**
  6015. * @brief Changes a window property
  6016. *
  6017. * @param c The connection
  6018. * @param mode A bitmask of #xcb_prop_mode_t values.
  6019. * @param mode \n
  6020. * @param window The window whose property you want to change.
  6021. * @param property The property you want to change (an atom).
  6022. * @param type The type of the property you want to change (an atom).
  6023. * @param format Specifies whether the data should be viewed as a list of 8-bit, 16-bit or
  6024. * 32-bit quantities. Possible values are 8, 16 and 32. This information allows
  6025. * the X server to correctly perform byte-swap operations as necessary.
  6026. * @param data_len Specifies the number of elements (see \a format).
  6027. * @param data The property data.
  6028. * @return A cookie
  6029. *
  6030. * Sets or updates a property on the specified \a window. Properties are for
  6031. * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`).
  6032. * Protocols such as EWMH also use properties - for example EWMH defines the
  6033. * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property.
  6034. *
  6035. */
  6036. xcb_void_cookie_t
  6037. xcb_change_property (xcb_connection_t *c,
  6038. uint8_t mode,
  6039. xcb_window_t window,
  6040. xcb_atom_t property,
  6041. xcb_atom_t type,
  6042. uint8_t format,
  6043. uint32_t data_len,
  6044. const void *data);
  6045. void *
  6046. xcb_change_property_data (const xcb_change_property_request_t *R);
  6047. int
  6048. xcb_change_property_data_length (const xcb_change_property_request_t *R);
  6049. xcb_generic_iterator_t
  6050. xcb_change_property_data_end (const xcb_change_property_request_t *R);
  6051. /**
  6052. *
  6053. * @param c The connection
  6054. * @return A cookie
  6055. *
  6056. * Delivers a request to the X server.
  6057. *
  6058. * This form can be used only if the request will not cause
  6059. * a reply to be generated. Any returned error will be
  6060. * saved for handling by xcb_request_check().
  6061. */
  6062. xcb_void_cookie_t
  6063. xcb_delete_property_checked (xcb_connection_t *c,
  6064. xcb_window_t window,
  6065. xcb_atom_t property);
  6066. /**
  6067. *
  6068. * @param c The connection
  6069. * @return A cookie
  6070. *
  6071. * Delivers a request to the X server.
  6072. *
  6073. */
  6074. xcb_void_cookie_t
  6075. xcb_delete_property (xcb_connection_t *c,
  6076. xcb_window_t window,
  6077. xcb_atom_t property);
  6078. int
  6079. xcb_get_property_sizeof (const void *_buffer);
  6080. /**
  6081. * @brief Gets a window property
  6082. *
  6083. * @param c The connection
  6084. * @param _delete Whether the property should actually be deleted. For deleting a property, the
  6085. * specified \a type has to match the actual property type.
  6086. * @param window The window whose property you want to get.
  6087. * @param property The property you want to get (an atom).
  6088. * @param type The type of the property you want to get (an atom).
  6089. * @param long_offset Specifies the offset (in 32-bit multiples) in the specified property where the
  6090. * data is to be retrieved.
  6091. * @param long_length Specifies how many 32-bit multiples of data should be retrieved (e.g. if you
  6092. * set \a long_length to 4, you will receive 16 bytes of data).
  6093. * @return A cookie
  6094. *
  6095. * Gets the specified \a property from the specified \a window. Properties are for
  6096. * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`).
  6097. * Protocols such as EWMH also use properties - for example EWMH defines the
  6098. * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property.
  6099. *
  6100. * TODO: talk about \a type
  6101. *
  6102. * TODO: talk about `delete`
  6103. *
  6104. * TODO: talk about the offset/length thing. what's a valid use case?
  6105. *
  6106. */
  6107. xcb_get_property_cookie_t
  6108. xcb_get_property (xcb_connection_t *c,
  6109. uint8_t _delete,
  6110. xcb_window_t window,
  6111. xcb_atom_t property,
  6112. xcb_atom_t type,
  6113. uint32_t long_offset,
  6114. uint32_t long_length);
  6115. /**
  6116. * @brief Gets a window property
  6117. *
  6118. * @param c The connection
  6119. * @param _delete Whether the property should actually be deleted. For deleting a property, the
  6120. * specified \a type has to match the actual property type.
  6121. * @param window The window whose property you want to get.
  6122. * @param property The property you want to get (an atom).
  6123. * @param type The type of the property you want to get (an atom).
  6124. * @param long_offset Specifies the offset (in 32-bit multiples) in the specified property where the
  6125. * data is to be retrieved.
  6126. * @param long_length Specifies how many 32-bit multiples of data should be retrieved (e.g. if you
  6127. * set \a long_length to 4, you will receive 16 bytes of data).
  6128. * @return A cookie
  6129. *
  6130. * Gets the specified \a property from the specified \a window. Properties are for
  6131. * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`).
  6132. * Protocols such as EWMH also use properties - for example EWMH defines the
  6133. * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property.
  6134. *
  6135. * TODO: talk about \a type
  6136. *
  6137. * TODO: talk about `delete`
  6138. *
  6139. * TODO: talk about the offset/length thing. what's a valid use case?
  6140. *
  6141. * This form can be used only if the request will cause
  6142. * a reply to be generated. Any returned error will be
  6143. * placed in the event queue.
  6144. */
  6145. xcb_get_property_cookie_t
  6146. xcb_get_property_unchecked (xcb_connection_t *c,
  6147. uint8_t _delete,
  6148. xcb_window_t window,
  6149. xcb_atom_t property,
  6150. xcb_atom_t type,
  6151. uint32_t long_offset,
  6152. uint32_t long_length);
  6153. void *
  6154. xcb_get_property_value (const xcb_get_property_reply_t *R);
  6155. int
  6156. xcb_get_property_value_length (const xcb_get_property_reply_t *R);
  6157. xcb_generic_iterator_t
  6158. xcb_get_property_value_end (const xcb_get_property_reply_t *R);
  6159. /**
  6160. * Return the reply
  6161. * @param c The connection
  6162. * @param cookie The cookie
  6163. * @param e The xcb_generic_error_t supplied
  6164. *
  6165. * Returns the reply of the request asked by
  6166. *
  6167. * The parameter @p e supplied to this function must be NULL if
  6168. * xcb_get_property_unchecked(). is used.
  6169. * Otherwise, it stores the error if any.
  6170. *
  6171. * The returned value must be freed by the caller using free().
  6172. */
  6173. xcb_get_property_reply_t *
  6174. xcb_get_property_reply (xcb_connection_t *c,
  6175. xcb_get_property_cookie_t cookie /**< */,
  6176. xcb_generic_error_t **e);
  6177. int
  6178. xcb_list_properties_sizeof (const void *_buffer);
  6179. /**
  6180. *
  6181. * @param c The connection
  6182. * @return A cookie
  6183. *
  6184. * Delivers a request to the X server.
  6185. *
  6186. */
  6187. xcb_list_properties_cookie_t
  6188. xcb_list_properties (xcb_connection_t *c,
  6189. xcb_window_t window);
  6190. /**
  6191. *
  6192. * @param c The connection
  6193. * @return A cookie
  6194. *
  6195. * Delivers a request to the X server.
  6196. *
  6197. * This form can be used only if the request will cause
  6198. * a reply to be generated. Any returned error will be
  6199. * placed in the event queue.
  6200. */
  6201. xcb_list_properties_cookie_t
  6202. xcb_list_properties_unchecked (xcb_connection_t *c,
  6203. xcb_window_t window);
  6204. xcb_atom_t *
  6205. xcb_list_properties_atoms (const xcb_list_properties_reply_t *R);
  6206. int
  6207. xcb_list_properties_atoms_length (const xcb_list_properties_reply_t *R);
  6208. xcb_generic_iterator_t
  6209. xcb_list_properties_atoms_end (const xcb_list_properties_reply_t *R);
  6210. /**
  6211. * Return the reply
  6212. * @param c The connection
  6213. * @param cookie The cookie
  6214. * @param e The xcb_generic_error_t supplied
  6215. *
  6216. * Returns the reply of the request asked by
  6217. *
  6218. * The parameter @p e supplied to this function must be NULL if
  6219. * xcb_list_properties_unchecked(). is used.
  6220. * Otherwise, it stores the error if any.
  6221. *
  6222. * The returned value must be freed by the caller using free().
  6223. */
  6224. xcb_list_properties_reply_t *
  6225. xcb_list_properties_reply (xcb_connection_t *c,
  6226. xcb_list_properties_cookie_t cookie /**< */,
  6227. xcb_generic_error_t **e);
  6228. /**
  6229. * @brief Sets the owner of a selection
  6230. *
  6231. * @param c The connection
  6232. * @param owner The new owner of the selection.
  6233. * \n
  6234. * The special value `XCB_NONE` means that the selection will have no owner.
  6235. * @param selection The selection.
  6236. * @param time Timestamp to avoid race conditions when running X over the network.
  6237. * \n
  6238. * The selection will not be changed if \a time is earlier than the current
  6239. * last-change time of the \a selection or is later than the current X server time.
  6240. * Otherwise, the last-change time is set to the specified time.
  6241. * \n
  6242. * The special value `XCB_CURRENT_TIME` will be replaced with the current server
  6243. * time.
  6244. * @return A cookie
  6245. *
  6246. * Makes `window` the owner of the selection \a selection and updates the
  6247. * last-change time of the specified selection.
  6248. *
  6249. * TODO: briefly explain what a selection is.
  6250. *
  6251. * This form can be used only if the request will not cause
  6252. * a reply to be generated. Any returned error will be
  6253. * saved for handling by xcb_request_check().
  6254. */
  6255. xcb_void_cookie_t
  6256. xcb_set_selection_owner_checked (xcb_connection_t *c,
  6257. xcb_window_t owner,
  6258. xcb_atom_t selection,
  6259. xcb_timestamp_t time);
  6260. /**
  6261. * @brief Sets the owner of a selection
  6262. *
  6263. * @param c The connection
  6264. * @param owner The new owner of the selection.
  6265. * \n
  6266. * The special value `XCB_NONE` means that the selection will have no owner.
  6267. * @param selection The selection.
  6268. * @param time Timestamp to avoid race conditions when running X over the network.
  6269. * \n
  6270. * The selection will not be changed if \a time is earlier than the current
  6271. * last-change time of the \a selection or is later than the current X server time.
  6272. * Otherwise, the last-change time is set to the specified time.
  6273. * \n
  6274. * The special value `XCB_CURRENT_TIME` will be replaced with the current server
  6275. * time.
  6276. * @return A cookie
  6277. *
  6278. * Makes `window` the owner of the selection \a selection and updates the
  6279. * last-change time of the specified selection.
  6280. *
  6281. * TODO: briefly explain what a selection is.
  6282. *
  6283. */
  6284. xcb_void_cookie_t
  6285. xcb_set_selection_owner (xcb_connection_t *c,
  6286. xcb_window_t owner,
  6287. xcb_atom_t selection,
  6288. xcb_timestamp_t time);
  6289. /**
  6290. * @brief Gets the owner of a selection
  6291. *
  6292. * @param c The connection
  6293. * @param selection The selection.
  6294. * @return A cookie
  6295. *
  6296. * Gets the owner of the specified selection.
  6297. *
  6298. * TODO: briefly explain what a selection is.
  6299. *
  6300. */
  6301. xcb_get_selection_owner_cookie_t
  6302. xcb_get_selection_owner (xcb_connection_t *c,
  6303. xcb_atom_t selection);
  6304. /**
  6305. * @brief Gets the owner of a selection
  6306. *
  6307. * @param c The connection
  6308. * @param selection The selection.
  6309. * @return A cookie
  6310. *
  6311. * Gets the owner of the specified selection.
  6312. *
  6313. * TODO: briefly explain what a selection is.
  6314. *
  6315. * This form can be used only if the request will cause
  6316. * a reply to be generated. Any returned error will be
  6317. * placed in the event queue.
  6318. */
  6319. xcb_get_selection_owner_cookie_t
  6320. xcb_get_selection_owner_unchecked (xcb_connection_t *c,
  6321. xcb_atom_t selection);
  6322. /**
  6323. * Return the reply
  6324. * @param c The connection
  6325. * @param cookie The cookie
  6326. * @param e The xcb_generic_error_t supplied
  6327. *
  6328. * Returns the reply of the request asked by
  6329. *
  6330. * The parameter @p e supplied to this function must be NULL if
  6331. * xcb_get_selection_owner_unchecked(). is used.
  6332. * Otherwise, it stores the error if any.
  6333. *
  6334. * The returned value must be freed by the caller using free().
  6335. */
  6336. xcb_get_selection_owner_reply_t *
  6337. xcb_get_selection_owner_reply (xcb_connection_t *c,
  6338. xcb_get_selection_owner_cookie_t cookie /**< */,
  6339. xcb_generic_error_t **e);
  6340. /**
  6341. *
  6342. * @param c The connection
  6343. * @return A cookie
  6344. *
  6345. * Delivers a request to the X server.
  6346. *
  6347. * This form can be used only if the request will not cause
  6348. * a reply to be generated. Any returned error will be
  6349. * saved for handling by xcb_request_check().
  6350. */
  6351. xcb_void_cookie_t
  6352. xcb_convert_selection_checked (xcb_connection_t *c,
  6353. xcb_window_t requestor,
  6354. xcb_atom_t selection,
  6355. xcb_atom_t target,
  6356. xcb_atom_t property,
  6357. xcb_timestamp_t time);
  6358. /**
  6359. *
  6360. * @param c The connection
  6361. * @return A cookie
  6362. *
  6363. * Delivers a request to the X server.
  6364. *
  6365. */
  6366. xcb_void_cookie_t
  6367. xcb_convert_selection (xcb_connection_t *c,
  6368. xcb_window_t requestor,
  6369. xcb_atom_t selection,
  6370. xcb_atom_t target,
  6371. xcb_atom_t property,
  6372. xcb_timestamp_t time);
  6373. /**
  6374. * @brief send an event
  6375. *
  6376. * @param c The connection
  6377. * @param propagate If \a propagate is true and no clients have selected any event on \a destination,
  6378. * the destination is replaced with the closest ancestor of \a destination for
  6379. * which some client has selected a type in \a event_mask and for which no
  6380. * intervening window has that type in its do-not-propagate-mask. If no such
  6381. * window exists or if the window is an ancestor of the focus window and
  6382. * `InputFocus` was originally specified as the destination, the event is not sent
  6383. * to any clients. Otherwise, the event is reported to every client selecting on
  6384. * the final destination any of the types specified in \a event_mask.
  6385. * @param destination The window to send this event to. Every client which selects any event within
  6386. * \a event_mask on \a destination will get the event.
  6387. * \n
  6388. * The special value `XCB_SEND_EVENT_DEST_POINTER_WINDOW` refers to the window
  6389. * that contains the mouse pointer.
  6390. * \n
  6391. * The special value `XCB_SEND_EVENT_DEST_ITEM_FOCUS` refers to the window which
  6392. * has the keyboard focus.
  6393. * @param event_mask Event_mask for determining which clients should receive the specified event.
  6394. * See \a destination and \a propagate.
  6395. * @param event The event to send to the specified \a destination.
  6396. * @return A cookie
  6397. *
  6398. * Identifies the \a destination window, determines which clients should receive
  6399. * the specified event and ignores any active grabs.
  6400. *
  6401. * The \a event must be one of the core events or an event defined by an extension,
  6402. * so that the X server can correctly byte-swap the contents as necessary. The
  6403. * contents of \a event are otherwise unaltered and unchecked except for the
  6404. * `send_event` field which is forced to 'true'.
  6405. *
  6406. * This form can be used only if the request will not cause
  6407. * a reply to be generated. Any returned error will be
  6408. * saved for handling by xcb_request_check().
  6409. */
  6410. xcb_void_cookie_t
  6411. xcb_send_event_checked (xcb_connection_t *c,
  6412. uint8_t propagate,
  6413. xcb_window_t destination,
  6414. uint32_t event_mask,
  6415. const char *event);
  6416. /**
  6417. * @brief send an event
  6418. *
  6419. * @param c The connection
  6420. * @param propagate If \a propagate is true and no clients have selected any event on \a destination,
  6421. * the destination is replaced with the closest ancestor of \a destination for
  6422. * which some client has selected a type in \a event_mask and for which no
  6423. * intervening window has that type in its do-not-propagate-mask. If no such
  6424. * window exists or if the window is an ancestor of the focus window and
  6425. * `InputFocus` was originally specified as the destination, the event is not sent
  6426. * to any clients. Otherwise, the event is reported to every client selecting on
  6427. * the final destination any of the types specified in \a event_mask.
  6428. * @param destination The window to send this event to. Every client which selects any event within
  6429. * \a event_mask on \a destination will get the event.
  6430. * \n
  6431. * The special value `XCB_SEND_EVENT_DEST_POINTER_WINDOW` refers to the window
  6432. * that contains the mouse pointer.
  6433. * \n
  6434. * The special value `XCB_SEND_EVENT_DEST_ITEM_FOCUS` refers to the window which
  6435. * has the keyboard focus.
  6436. * @param event_mask Event_mask for determining which clients should receive the specified event.
  6437. * See \a destination and \a propagate.
  6438. * @param event The event to send to the specified \a destination.
  6439. * @return A cookie
  6440. *
  6441. * Identifies the \a destination window, determines which clients should receive
  6442. * the specified event and ignores any active grabs.
  6443. *
  6444. * The \a event must be one of the core events or an event defined by an extension,
  6445. * so that the X server can correctly byte-swap the contents as necessary. The
  6446. * contents of \a event are otherwise unaltered and unchecked except for the
  6447. * `send_event` field which is forced to 'true'.
  6448. *
  6449. */
  6450. xcb_void_cookie_t
  6451. xcb_send_event (xcb_connection_t *c,
  6452. uint8_t propagate,
  6453. xcb_window_t destination,
  6454. uint32_t event_mask,
  6455. const char *event);
  6456. /**
  6457. * @brief Grab the pointer
  6458. *
  6459. * @param c The connection
  6460. * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not
  6461. * reported to the \a grab_window.
  6462. * @param grab_window Specifies the window on which the pointer should be grabbed.
  6463. * @param event_mask Specifies which pointer events are reported to the client.
  6464. * \n
  6465. * TODO: which values?
  6466. * @param pointer_mode A bitmask of #xcb_grab_mode_t values.
  6467. * @param pointer_mode \n
  6468. * @param keyboard_mode A bitmask of #xcb_grab_mode_t values.
  6469. * @param keyboard_mode \n
  6470. * @param confine_to Specifies the window to confine the pointer in (the user will not be able to
  6471. * move the pointer out of that window).
  6472. * \n
  6473. * The special value `XCB_NONE` means don't confine the pointer.
  6474. * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the
  6475. * cursor.
  6476. * @param time The time argument allows you to avoid certain circumstances that come up if
  6477. * applications take a long time to respond or if there are long network delays.
  6478. * Consider a situation where you have two applications, both of which normally
  6479. * grab the pointer when clicked on. If both applications specify the timestamp
  6480. * from the event, the second application may wake up faster and successfully grab
  6481. * the pointer before the first application. The first application then will get
  6482. * an indication that the other application grabbed the pointer before its request
  6483. * was processed.
  6484. * \n
  6485. * The special value `XCB_CURRENT_TIME` will be replaced with the current server
  6486. * time.
  6487. * @return A cookie
  6488. *
  6489. * Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client.
  6490. *
  6491. */
  6492. xcb_grab_pointer_cookie_t
  6493. xcb_grab_pointer (xcb_connection_t *c,
  6494. uint8_t owner_events,
  6495. xcb_window_t grab_window,
  6496. uint16_t event_mask,
  6497. uint8_t pointer_mode,
  6498. uint8_t keyboard_mode,
  6499. xcb_window_t confine_to,
  6500. xcb_cursor_t cursor,
  6501. xcb_timestamp_t time);
  6502. /**
  6503. * @brief Grab the pointer
  6504. *
  6505. * @param c The connection
  6506. * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not
  6507. * reported to the \a grab_window.
  6508. * @param grab_window Specifies the window on which the pointer should be grabbed.
  6509. * @param event_mask Specifies which pointer events are reported to the client.
  6510. * \n
  6511. * TODO: which values?
  6512. * @param pointer_mode A bitmask of #xcb_grab_mode_t values.
  6513. * @param pointer_mode \n
  6514. * @param keyboard_mode A bitmask of #xcb_grab_mode_t values.
  6515. * @param keyboard_mode \n
  6516. * @param confine_to Specifies the window to confine the pointer in (the user will not be able to
  6517. * move the pointer out of that window).
  6518. * \n
  6519. * The special value `XCB_NONE` means don't confine the pointer.
  6520. * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the
  6521. * cursor.
  6522. * @param time The time argument allows you to avoid certain circumstances that come up if
  6523. * applications take a long time to respond or if there are long network delays.
  6524. * Consider a situation where you have two applications, both of which normally
  6525. * grab the pointer when clicked on. If both applications specify the timestamp
  6526. * from the event, the second application may wake up faster and successfully grab
  6527. * the pointer before the first application. The first application then will get
  6528. * an indication that the other application grabbed the pointer before its request
  6529. * was processed.
  6530. * \n
  6531. * The special value `XCB_CURRENT_TIME` will be replaced with the current server
  6532. * time.
  6533. * @return A cookie
  6534. *
  6535. * Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client.
  6536. *
  6537. * This form can be used only if the request will cause
  6538. * a reply to be generated. Any returned error will be
  6539. * placed in the event queue.
  6540. */
  6541. xcb_grab_pointer_cookie_t
  6542. xcb_grab_pointer_unchecked (xcb_connection_t *c,
  6543. uint8_t owner_events,
  6544. xcb_window_t grab_window,
  6545. uint16_t event_mask,
  6546. uint8_t pointer_mode,
  6547. uint8_t keyboard_mode,
  6548. xcb_window_t confine_to,
  6549. xcb_cursor_t cursor,
  6550. xcb_timestamp_t time);
  6551. /**
  6552. * Return the reply
  6553. * @param c The connection
  6554. * @param cookie The cookie
  6555. * @param e The xcb_generic_error_t supplied
  6556. *
  6557. * Returns the reply of the request asked by
  6558. *
  6559. * The parameter @p e supplied to this function must be NULL if
  6560. * xcb_grab_pointer_unchecked(). is used.
  6561. * Otherwise, it stores the error if any.
  6562. *
  6563. * The returned value must be freed by the caller using free().
  6564. */
  6565. xcb_grab_pointer_reply_t *
  6566. xcb_grab_pointer_reply (xcb_connection_t *c,
  6567. xcb_grab_pointer_cookie_t cookie /**< */,
  6568. xcb_generic_error_t **e);
  6569. /**
  6570. * @brief release the pointer
  6571. *
  6572. * @param c The connection
  6573. * @param time Timestamp to avoid race conditions when running X over the network.
  6574. * \n
  6575. * The pointer will not be released if \a time is earlier than the
  6576. * last-pointer-grab time or later than the current X server time.
  6577. * @return A cookie
  6578. *
  6579. * Releases the pointer and any queued events if you actively grabbed the pointer
  6580. * before using `xcb_grab_pointer`, `xcb_grab_button` or within a normal button
  6581. * press.
  6582. *
  6583. * EnterNotify and LeaveNotify events are generated.
  6584. *
  6585. * This form can be used only if the request will not cause
  6586. * a reply to be generated. Any returned error will be
  6587. * saved for handling by xcb_request_check().
  6588. */
  6589. xcb_void_cookie_t
  6590. xcb_ungrab_pointer_checked (xcb_connection_t *c,
  6591. xcb_timestamp_t time);
  6592. /**
  6593. * @brief release the pointer
  6594. *
  6595. * @param c The connection
  6596. * @param time Timestamp to avoid race conditions when running X over the network.
  6597. * \n
  6598. * The pointer will not be released if \a time is earlier than the
  6599. * last-pointer-grab time or later than the current X server time.
  6600. * @return A cookie
  6601. *
  6602. * Releases the pointer and any queued events if you actively grabbed the pointer
  6603. * before using `xcb_grab_pointer`, `xcb_grab_button` or within a normal button
  6604. * press.
  6605. *
  6606. * EnterNotify and LeaveNotify events are generated.
  6607. *
  6608. */
  6609. xcb_void_cookie_t
  6610. xcb_ungrab_pointer (xcb_connection_t *c,
  6611. xcb_timestamp_t time);
  6612. /**
  6613. * @brief Grab pointer button(s)
  6614. *
  6615. * @param c The connection
  6616. * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not
  6617. * reported to the \a grab_window.
  6618. * @param grab_window Specifies the window on which the pointer should be grabbed.
  6619. * @param event_mask Specifies which pointer events are reported to the client.
  6620. * \n
  6621. * TODO: which values?
  6622. * @param pointer_mode A bitmask of #xcb_grab_mode_t values.
  6623. * @param pointer_mode \n
  6624. * @param keyboard_mode A bitmask of #xcb_grab_mode_t values.
  6625. * @param keyboard_mode \n
  6626. * @param confine_to Specifies the window to confine the pointer in (the user will not be able to
  6627. * move the pointer out of that window).
  6628. * \n
  6629. * The special value `XCB_NONE` means don't confine the pointer.
  6630. * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the
  6631. * cursor.
  6632. * @param button A bitmask of #xcb_button_index_t values.
  6633. * @param button \n
  6634. * @param modifiers The modifiers to grab.
  6635. * \n
  6636. * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all
  6637. * possible modifier combinations.
  6638. * @return A cookie
  6639. *
  6640. * This request establishes a passive grab. The pointer is actively grabbed as
  6641. * described in GrabPointer, the last-pointer-grab time is set to the time at
  6642. * which the button was pressed (as transmitted in the ButtonPress event), and the
  6643. * ButtonPress event is reported if all of the following conditions are true:
  6644. *
  6645. * The pointer is not grabbed and the specified button is logically pressed when
  6646. * the specified modifier keys are logically down, and no other buttons or
  6647. * modifier keys are logically down.
  6648. *
  6649. * The grab-window contains the pointer.
  6650. *
  6651. * The confine-to window (if any) is viewable.
  6652. *
  6653. * A passive grab on the same button/key combination does not exist on any
  6654. * ancestor of grab-window.
  6655. *
  6656. * The interpretation of the remaining arguments is the same as for GrabPointer.
  6657. * The active grab is terminated automatically when the logical state of the
  6658. * pointer has all buttons released, independent of the logical state of modifier
  6659. * keys. Note that the logical state of a device (as seen by means of the
  6660. * protocol) may lag the physical state if device event processing is frozen. This
  6661. * request overrides all previous passive grabs by the same client on the same
  6662. * button/key combinations on the same window. A modifier of AnyModifier is
  6663. * equivalent to issuing the request for all possible modifier combinations
  6664. * (including the combination of no modifiers). It is not required that all
  6665. * specified modifiers have currently assigned keycodes. A button of AnyButton is
  6666. * equivalent to issuing the request for all possible buttons. Otherwise, it is
  6667. * not required that the button specified currently be assigned to a physical
  6668. * button.
  6669. *
  6670. * An Access error is generated if some other client has already issued a
  6671. * GrabButton request with the same button/key combination on the same window.
  6672. * When using AnyModifier or AnyButton, the request fails completely (no grabs are
  6673. * established), and an Access error is generated if there is a conflicting grab
  6674. * for any combination. The request has no effect on an active grab.
  6675. *
  6676. * This form can be used only if the request will not cause
  6677. * a reply to be generated. Any returned error will be
  6678. * saved for handling by xcb_request_check().
  6679. */
  6680. xcb_void_cookie_t
  6681. xcb_grab_button_checked (xcb_connection_t *c,
  6682. uint8_t owner_events,
  6683. xcb_window_t grab_window,
  6684. uint16_t event_mask,
  6685. uint8_t pointer_mode,
  6686. uint8_t keyboard_mode,
  6687. xcb_window_t confine_to,
  6688. xcb_cursor_t cursor,
  6689. uint8_t button,
  6690. uint16_t modifiers);
  6691. /**
  6692. * @brief Grab pointer button(s)
  6693. *
  6694. * @param c The connection
  6695. * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not
  6696. * reported to the \a grab_window.
  6697. * @param grab_window Specifies the window on which the pointer should be grabbed.
  6698. * @param event_mask Specifies which pointer events are reported to the client.
  6699. * \n
  6700. * TODO: which values?
  6701. * @param pointer_mode A bitmask of #xcb_grab_mode_t values.
  6702. * @param pointer_mode \n
  6703. * @param keyboard_mode A bitmask of #xcb_grab_mode_t values.
  6704. * @param keyboard_mode \n
  6705. * @param confine_to Specifies the window to confine the pointer in (the user will not be able to
  6706. * move the pointer out of that window).
  6707. * \n
  6708. * The special value `XCB_NONE` means don't confine the pointer.
  6709. * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the
  6710. * cursor.
  6711. * @param button A bitmask of #xcb_button_index_t values.
  6712. * @param button \n
  6713. * @param modifiers The modifiers to grab.
  6714. * \n
  6715. * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all
  6716. * possible modifier combinations.
  6717. * @return A cookie
  6718. *
  6719. * This request establishes a passive grab. The pointer is actively grabbed as
  6720. * described in GrabPointer, the last-pointer-grab time is set to the time at
  6721. * which the button was pressed (as transmitted in the ButtonPress event), and the
  6722. * ButtonPress event is reported if all of the following conditions are true:
  6723. *
  6724. * The pointer is not grabbed and the specified button is logically pressed when
  6725. * the specified modifier keys are logically down, and no other buttons or
  6726. * modifier keys are logically down.
  6727. *
  6728. * The grab-window contains the pointer.
  6729. *
  6730. * The confine-to window (if any) is viewable.
  6731. *
  6732. * A passive grab on the same button/key combination does not exist on any
  6733. * ancestor of grab-window.
  6734. *
  6735. * The interpretation of the remaining arguments is the same as for GrabPointer.
  6736. * The active grab is terminated automatically when the logical state of the
  6737. * pointer has all buttons released, independent of the logical state of modifier
  6738. * keys. Note that the logical state of a device (as seen by means of the
  6739. * protocol) may lag the physical state if device event processing is frozen. This
  6740. * request overrides all previous passive grabs by the same client on the same
  6741. * button/key combinations on the same window. A modifier of AnyModifier is
  6742. * equivalent to issuing the request for all possible modifier combinations
  6743. * (including the combination of no modifiers). It is not required that all
  6744. * specified modifiers have currently assigned keycodes. A button of AnyButton is
  6745. * equivalent to issuing the request for all possible buttons. Otherwise, it is
  6746. * not required that the button specified currently be assigned to a physical
  6747. * button.
  6748. *
  6749. * An Access error is generated if some other client has already issued a
  6750. * GrabButton request with the same button/key combination on the same window.
  6751. * When using AnyModifier or AnyButton, the request fails completely (no grabs are
  6752. * established), and an Access error is generated if there is a conflicting grab
  6753. * for any combination. The request has no effect on an active grab.
  6754. *
  6755. */
  6756. xcb_void_cookie_t
  6757. xcb_grab_button (xcb_connection_t *c,
  6758. uint8_t owner_events,
  6759. xcb_window_t grab_window,
  6760. uint16_t event_mask,
  6761. uint8_t pointer_mode,
  6762. uint8_t keyboard_mode,
  6763. xcb_window_t confine_to,
  6764. xcb_cursor_t cursor,
  6765. uint8_t button,
  6766. uint16_t modifiers);
  6767. /**
  6768. *
  6769. * @param c The connection
  6770. * @return A cookie
  6771. *
  6772. * Delivers a request to the X server.
  6773. *
  6774. * This form can be used only if the request will not cause
  6775. * a reply to be generated. Any returned error will be
  6776. * saved for handling by xcb_request_check().
  6777. */
  6778. xcb_void_cookie_t
  6779. xcb_ungrab_button_checked (xcb_connection_t *c,
  6780. uint8_t button,
  6781. xcb_window_t grab_window,
  6782. uint16_t modifiers);
  6783. /**
  6784. *
  6785. * @param c The connection
  6786. * @return A cookie
  6787. *
  6788. * Delivers a request to the X server.
  6789. *
  6790. */
  6791. xcb_void_cookie_t
  6792. xcb_ungrab_button (xcb_connection_t *c,
  6793. uint8_t button,
  6794. xcb_window_t grab_window,
  6795. uint16_t modifiers);
  6796. /**
  6797. *
  6798. * @param c The connection
  6799. * @return A cookie
  6800. *
  6801. * Delivers a request to the X server.
  6802. *
  6803. * This form can be used only if the request will not cause
  6804. * a reply to be generated. Any returned error will be
  6805. * saved for handling by xcb_request_check().
  6806. */
  6807. xcb_void_cookie_t
  6808. xcb_change_active_pointer_grab_checked (xcb_connection_t *c,
  6809. xcb_cursor_t cursor,
  6810. xcb_timestamp_t time,
  6811. uint16_t event_mask);
  6812. /**
  6813. *
  6814. * @param c The connection
  6815. * @return A cookie
  6816. *
  6817. * Delivers a request to the X server.
  6818. *
  6819. */
  6820. xcb_void_cookie_t
  6821. xcb_change_active_pointer_grab (xcb_connection_t *c,
  6822. xcb_cursor_t cursor,
  6823. xcb_timestamp_t time,
  6824. uint16_t event_mask);
  6825. /**
  6826. * @brief Grab the keyboard
  6827. *
  6828. * @param c The connection
  6829. * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not
  6830. * reported to the \a grab_window.
  6831. * @param grab_window Specifies the window on which the pointer should be grabbed.
  6832. * @param time Timestamp to avoid race conditions when running X over the network.
  6833. * \n
  6834. * The special value `XCB_CURRENT_TIME` will be replaced with the current server
  6835. * time.
  6836. * @param pointer_mode A bitmask of #xcb_grab_mode_t values.
  6837. * @param pointer_mode \n
  6838. * @param keyboard_mode A bitmask of #xcb_grab_mode_t values.
  6839. * @param keyboard_mode \n
  6840. * @return A cookie
  6841. *
  6842. * Actively grabs control of the keyboard and generates FocusIn and FocusOut
  6843. * events. Further key events are reported only to the grabbing client.
  6844. *
  6845. * Any active keyboard grab by this client is overridden. If the keyboard is
  6846. * actively grabbed by some other client, `AlreadyGrabbed` is returned. If
  6847. * \a grab_window is not viewable, `GrabNotViewable` is returned. If the keyboard
  6848. * is frozen by an active grab of another client, `GrabFrozen` is returned. If the
  6849. * specified \a time is earlier than the last-keyboard-grab time or later than the
  6850. * current X server time, `GrabInvalidTime` is returned. Otherwise, the
  6851. * last-keyboard-grab time is set to the specified time.
  6852. *
  6853. */
  6854. xcb_grab_keyboard_cookie_t
  6855. xcb_grab_keyboard (xcb_connection_t *c,
  6856. uint8_t owner_events,
  6857. xcb_window_t grab_window,
  6858. xcb_timestamp_t time,
  6859. uint8_t pointer_mode,
  6860. uint8_t keyboard_mode);
  6861. /**
  6862. * @brief Grab the keyboard
  6863. *
  6864. * @param c The connection
  6865. * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not
  6866. * reported to the \a grab_window.
  6867. * @param grab_window Specifies the window on which the pointer should be grabbed.
  6868. * @param time Timestamp to avoid race conditions when running X over the network.
  6869. * \n
  6870. * The special value `XCB_CURRENT_TIME` will be replaced with the current server
  6871. * time.
  6872. * @param pointer_mode A bitmask of #xcb_grab_mode_t values.
  6873. * @param pointer_mode \n
  6874. * @param keyboard_mode A bitmask of #xcb_grab_mode_t values.
  6875. * @param keyboard_mode \n
  6876. * @return A cookie
  6877. *
  6878. * Actively grabs control of the keyboard and generates FocusIn and FocusOut
  6879. * events. Further key events are reported only to the grabbing client.
  6880. *
  6881. * Any active keyboard grab by this client is overridden. If the keyboard is
  6882. * actively grabbed by some other client, `AlreadyGrabbed` is returned. If
  6883. * \a grab_window is not viewable, `GrabNotViewable` is returned. If the keyboard
  6884. * is frozen by an active grab of another client, `GrabFrozen` is returned. If the
  6885. * specified \a time is earlier than the last-keyboard-grab time or later than the
  6886. * current X server time, `GrabInvalidTime` is returned. Otherwise, the
  6887. * last-keyboard-grab time is set to the specified time.
  6888. *
  6889. * This form can be used only if the request will cause
  6890. * a reply to be generated. Any returned error will be
  6891. * placed in the event queue.
  6892. */
  6893. xcb_grab_keyboard_cookie_t
  6894. xcb_grab_keyboard_unchecked (xcb_connection_t *c,
  6895. uint8_t owner_events,
  6896. xcb_window_t grab_window,
  6897. xcb_timestamp_t time,
  6898. uint8_t pointer_mode,
  6899. uint8_t keyboard_mode);
  6900. /**
  6901. * Return the reply
  6902. * @param c The connection
  6903. * @param cookie The cookie
  6904. * @param e The xcb_generic_error_t supplied
  6905. *
  6906. * Returns the reply of the request asked by
  6907. *
  6908. * The parameter @p e supplied to this function must be NULL if
  6909. * xcb_grab_keyboard_unchecked(). is used.
  6910. * Otherwise, it stores the error if any.
  6911. *
  6912. * The returned value must be freed by the caller using free().
  6913. */
  6914. xcb_grab_keyboard_reply_t *
  6915. xcb_grab_keyboard_reply (xcb_connection_t *c,
  6916. xcb_grab_keyboard_cookie_t cookie /**< */,
  6917. xcb_generic_error_t **e);
  6918. /**
  6919. *
  6920. * @param c The connection
  6921. * @return A cookie
  6922. *
  6923. * Delivers a request to the X server.
  6924. *
  6925. * This form can be used only if the request will not cause
  6926. * a reply to be generated. Any returned error will be
  6927. * saved for handling by xcb_request_check().
  6928. */
  6929. xcb_void_cookie_t
  6930. xcb_ungrab_keyboard_checked (xcb_connection_t *c,
  6931. xcb_timestamp_t time);
  6932. /**
  6933. *
  6934. * @param c The connection
  6935. * @return A cookie
  6936. *
  6937. * Delivers a request to the X server.
  6938. *
  6939. */
  6940. xcb_void_cookie_t
  6941. xcb_ungrab_keyboard (xcb_connection_t *c,
  6942. xcb_timestamp_t time);
  6943. /**
  6944. * @brief Grab keyboard key(s)
  6945. *
  6946. * @param c The connection
  6947. * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not
  6948. * reported to the \a grab_window.
  6949. * @param grab_window Specifies the window on which the pointer should be grabbed.
  6950. * @param modifiers The modifiers to grab.
  6951. * \n
  6952. * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all
  6953. * possible modifier combinations.
  6954. * @param key The keycode of the key to grab.
  6955. * \n
  6956. * The special value `XCB_GRAB_ANY` means grab any key.
  6957. * @param pointer_mode A bitmask of #xcb_grab_mode_t values.
  6958. * @param pointer_mode \n
  6959. * @param keyboard_mode A bitmask of #xcb_grab_mode_t values.
  6960. * @param keyboard_mode \n
  6961. * @return A cookie
  6962. *
  6963. * Establishes a passive grab on the keyboard. In the future, the keyboard is
  6964. * actively grabbed (as for `GrabKeyboard`), the last-keyboard-grab time is set to
  6965. * the time at which the key was pressed (as transmitted in the KeyPress event),
  6966. * and the KeyPress event is reported if all of the following conditions are true:
  6967. *
  6968. * The keyboard is not grabbed and the specified key (which can itself be a
  6969. * modifier key) is logically pressed when the specified modifier keys are
  6970. * logically down, and no other modifier keys are logically down.
  6971. *
  6972. * Either the grab_window is an ancestor of (or is) the focus window, or the
  6973. * grab_window is a descendant of the focus window and contains the pointer.
  6974. *
  6975. * A passive grab on the same key combination does not exist on any ancestor of
  6976. * grab_window.
  6977. *
  6978. * The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated
  6979. * automatically when the logical state of the keyboard has the specified key released (independent of the
  6980. * logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window.
  6981. *
  6982. * Note that the logical state of a device (as seen by client applications) may lag the physical state if
  6983. * device event processing is frozen.
  6984. *
  6985. * A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified
  6986. * have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for
  6987. * all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode
  6988. * and max_keycode in the connection setup, or a BadValue error results.
  6989. *
  6990. * If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess
  6991. * error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error
  6992. * results (no grabs are established) if there is a conflicting grab for any combination.
  6993. *
  6994. * This form can be used only if the request will not cause
  6995. * a reply to be generated. Any returned error will be
  6996. * saved for handling by xcb_request_check().
  6997. */
  6998. xcb_void_cookie_t
  6999. xcb_grab_key_checked (xcb_connection_t *c,
  7000. uint8_t owner_events,
  7001. xcb_window_t grab_window,
  7002. uint16_t modifiers,
  7003. xcb_keycode_t key,
  7004. uint8_t pointer_mode,
  7005. uint8_t keyboard_mode);
  7006. /**
  7007. * @brief Grab keyboard key(s)
  7008. *
  7009. * @param c The connection
  7010. * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not
  7011. * reported to the \a grab_window.
  7012. * @param grab_window Specifies the window on which the pointer should be grabbed.
  7013. * @param modifiers The modifiers to grab.
  7014. * \n
  7015. * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all
  7016. * possible modifier combinations.
  7017. * @param key The keycode of the key to grab.
  7018. * \n
  7019. * The special value `XCB_GRAB_ANY` means grab any key.
  7020. * @param pointer_mode A bitmask of #xcb_grab_mode_t values.
  7021. * @param pointer_mode \n
  7022. * @param keyboard_mode A bitmask of #xcb_grab_mode_t values.
  7023. * @param keyboard_mode \n
  7024. * @return A cookie
  7025. *
  7026. * Establishes a passive grab on the keyboard. In the future, the keyboard is
  7027. * actively grabbed (as for `GrabKeyboard`), the last-keyboard-grab time is set to
  7028. * the time at which the key was pressed (as transmitted in the KeyPress event),
  7029. * and the KeyPress event is reported if all of the following conditions are true:
  7030. *
  7031. * The keyboard is not grabbed and the specified key (which can itself be a
  7032. * modifier key) is logically pressed when the specified modifier keys are
  7033. * logically down, and no other modifier keys are logically down.
  7034. *
  7035. * Either the grab_window is an ancestor of (or is) the focus window, or the
  7036. * grab_window is a descendant of the focus window and contains the pointer.
  7037. *
  7038. * A passive grab on the same key combination does not exist on any ancestor of
  7039. * grab_window.
  7040. *
  7041. * The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated
  7042. * automatically when the logical state of the keyboard has the specified key released (independent of the
  7043. * logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window.
  7044. *
  7045. * Note that the logical state of a device (as seen by client applications) may lag the physical state if
  7046. * device event processing is frozen.
  7047. *
  7048. * A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified
  7049. * have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for
  7050. * all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode
  7051. * and max_keycode in the connection setup, or a BadValue error results.
  7052. *
  7053. * If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess
  7054. * error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error
  7055. * results (no grabs are established) if there is a conflicting grab for any combination.
  7056. *
  7057. */
  7058. xcb_void_cookie_t
  7059. xcb_grab_key (xcb_connection_t *c,
  7060. uint8_t owner_events,
  7061. xcb_window_t grab_window,
  7062. uint16_t modifiers,
  7063. xcb_keycode_t key,
  7064. uint8_t pointer_mode,
  7065. uint8_t keyboard_mode);
  7066. /**
  7067. * @brief release a key combination
  7068. *
  7069. * @param c The connection
  7070. * @param key The keycode of the specified key combination.
  7071. * \n
  7072. * Using the special value `XCB_GRAB_ANY` means releasing all possible key codes.
  7073. * @param grab_window The window on which the grabbed key combination will be released.
  7074. * @param modifiers The modifiers of the specified key combination.
  7075. * \n
  7076. * Using the special value `XCB_MOD_MASK_ANY` means releasing the key combination
  7077. * with every possible modifier combination.
  7078. * @return A cookie
  7079. *
  7080. * Releases the key combination on \a grab_window if you grabbed it using
  7081. * `xcb_grab_key` before.
  7082. *
  7083. * This form can be used only if the request will not cause
  7084. * a reply to be generated. Any returned error will be
  7085. * saved for handling by xcb_request_check().
  7086. */
  7087. xcb_void_cookie_t
  7088. xcb_ungrab_key_checked (xcb_connection_t *c,
  7089. xcb_keycode_t key,
  7090. xcb_window_t grab_window,
  7091. uint16_t modifiers);
  7092. /**
  7093. * @brief release a key combination
  7094. *
  7095. * @param c The connection
  7096. * @param key The keycode of the specified key combination.
  7097. * \n
  7098. * Using the special value `XCB_GRAB_ANY` means releasing all possible key codes.
  7099. * @param grab_window The window on which the grabbed key combination will be released.
  7100. * @param modifiers The modifiers of the specified key combination.
  7101. * \n
  7102. * Using the special value `XCB_MOD_MASK_ANY` means releasing the key combination
  7103. * with every possible modifier combination.
  7104. * @return A cookie
  7105. *
  7106. * Releases the key combination on \a grab_window if you grabbed it using
  7107. * `xcb_grab_key` before.
  7108. *
  7109. */
  7110. xcb_void_cookie_t
  7111. xcb_ungrab_key (xcb_connection_t *c,
  7112. xcb_keycode_t key,
  7113. xcb_window_t grab_window,
  7114. uint16_t modifiers);
  7115. /**
  7116. * @brief release queued events
  7117. *
  7118. * @param c The connection
  7119. * @param mode A bitmask of #xcb_allow_t values.
  7120. * @param mode \n
  7121. * @param time Timestamp to avoid race conditions when running X over the network.
  7122. * \n
  7123. * The special value `XCB_CURRENT_TIME` will be replaced with the current server
  7124. * time.
  7125. * @return A cookie
  7126. *
  7127. * Releases queued events if the client has caused a device (pointer/keyboard) to
  7128. * freeze due to grabbing it actively. This request has no effect if \a time is
  7129. * earlier than the last-grab time of the most recent active grab for this client
  7130. * or if \a time is later than the current X server time.
  7131. *
  7132. * This form can be used only if the request will not cause
  7133. * a reply to be generated. Any returned error will be
  7134. * saved for handling by xcb_request_check().
  7135. */
  7136. xcb_void_cookie_t
  7137. xcb_allow_events_checked (xcb_connection_t *c,
  7138. uint8_t mode,
  7139. xcb_timestamp_t time);
  7140. /**
  7141. * @brief release queued events
  7142. *
  7143. * @param c The connection
  7144. * @param mode A bitmask of #xcb_allow_t values.
  7145. * @param mode \n
  7146. * @param time Timestamp to avoid race conditions when running X over the network.
  7147. * \n
  7148. * The special value `XCB_CURRENT_TIME` will be replaced with the current server
  7149. * time.
  7150. * @return A cookie
  7151. *
  7152. * Releases queued events if the client has caused a device (pointer/keyboard) to
  7153. * freeze due to grabbing it actively. This request has no effect if \a time is
  7154. * earlier than the last-grab time of the most recent active grab for this client
  7155. * or if \a time is later than the current X server time.
  7156. *
  7157. */
  7158. xcb_void_cookie_t
  7159. xcb_allow_events (xcb_connection_t *c,
  7160. uint8_t mode,
  7161. xcb_timestamp_t time);
  7162. /**
  7163. *
  7164. * @param c The connection
  7165. * @return A cookie
  7166. *
  7167. * Delivers a request to the X server.
  7168. *
  7169. * This form can be used only if the request will not cause
  7170. * a reply to be generated. Any returned error will be
  7171. * saved for handling by xcb_request_check().
  7172. */
  7173. xcb_void_cookie_t
  7174. xcb_grab_server_checked (xcb_connection_t *c);
  7175. /**
  7176. *
  7177. * @param c The connection
  7178. * @return A cookie
  7179. *
  7180. * Delivers a request to the X server.
  7181. *
  7182. */
  7183. xcb_void_cookie_t
  7184. xcb_grab_server (xcb_connection_t *c);
  7185. /**
  7186. *
  7187. * @param c The connection
  7188. * @return A cookie
  7189. *
  7190. * Delivers a request to the X server.
  7191. *
  7192. * This form can be used only if the request will not cause
  7193. * a reply to be generated. Any returned error will be
  7194. * saved for handling by xcb_request_check().
  7195. */
  7196. xcb_void_cookie_t
  7197. xcb_ungrab_server_checked (xcb_connection_t *c);
  7198. /**
  7199. *
  7200. * @param c The connection
  7201. * @return A cookie
  7202. *
  7203. * Delivers a request to the X server.
  7204. *
  7205. */
  7206. xcb_void_cookie_t
  7207. xcb_ungrab_server (xcb_connection_t *c);
  7208. /**
  7209. * @brief get pointer coordinates
  7210. *
  7211. * @param c The connection
  7212. * @param window A window to check if the pointer is on the same screen as \a window (see the
  7213. * `same_screen` field in the reply).
  7214. * @return A cookie
  7215. *
  7216. * Gets the root window the pointer is logically on and the pointer coordinates
  7217. * relative to the root window's origin.
  7218. *
  7219. */
  7220. xcb_query_pointer_cookie_t
  7221. xcb_query_pointer (xcb_connection_t *c,
  7222. xcb_window_t window);
  7223. /**
  7224. * @brief get pointer coordinates
  7225. *
  7226. * @param c The connection
  7227. * @param window A window to check if the pointer is on the same screen as \a window (see the
  7228. * `same_screen` field in the reply).
  7229. * @return A cookie
  7230. *
  7231. * Gets the root window the pointer is logically on and the pointer coordinates
  7232. * relative to the root window's origin.
  7233. *
  7234. * This form can be used only if the request will cause
  7235. * a reply to be generated. Any returned error will be
  7236. * placed in the event queue.
  7237. */
  7238. xcb_query_pointer_cookie_t
  7239. xcb_query_pointer_unchecked (xcb_connection_t *c,
  7240. xcb_window_t window);
  7241. /**
  7242. * Return the reply
  7243. * @param c The connection
  7244. * @param cookie The cookie
  7245. * @param e The xcb_generic_error_t supplied
  7246. *
  7247. * Returns the reply of the request asked by
  7248. *
  7249. * The parameter @p e supplied to this function must be NULL if
  7250. * xcb_query_pointer_unchecked(). is used.
  7251. * Otherwise, it stores the error if any.
  7252. *
  7253. * The returned value must be freed by the caller using free().
  7254. */
  7255. xcb_query_pointer_reply_t *
  7256. xcb_query_pointer_reply (xcb_connection_t *c,
  7257. xcb_query_pointer_cookie_t cookie /**< */,
  7258. xcb_generic_error_t **e);
  7259. /**
  7260. * Get the next element of the iterator
  7261. * @param i Pointer to a xcb_timecoord_iterator_t
  7262. *
  7263. * Get the next element in the iterator. The member rem is
  7264. * decreased by one. The member data points to the next
  7265. * element. The member index is increased by sizeof(xcb_timecoord_t)
  7266. */
  7267. void
  7268. xcb_timecoord_next (xcb_timecoord_iterator_t *i);
  7269. /**
  7270. * Return the iterator pointing to the last element
  7271. * @param i An xcb_timecoord_iterator_t
  7272. * @return The iterator pointing to the last element
  7273. *
  7274. * Set the current element in the iterator to the last element.
  7275. * The member rem is set to 0. The member data points to the
  7276. * last element.
  7277. */
  7278. xcb_generic_iterator_t
  7279. xcb_timecoord_end (xcb_timecoord_iterator_t i);
  7280. int
  7281. xcb_get_motion_events_sizeof (const void *_buffer);
  7282. /**
  7283. *
  7284. * @param c The connection
  7285. * @return A cookie
  7286. *
  7287. * Delivers a request to the X server.
  7288. *
  7289. */
  7290. xcb_get_motion_events_cookie_t
  7291. xcb_get_motion_events (xcb_connection_t *c,
  7292. xcb_window_t window,
  7293. xcb_timestamp_t start,
  7294. xcb_timestamp_t stop);
  7295. /**
  7296. *
  7297. * @param c The connection
  7298. * @return A cookie
  7299. *
  7300. * Delivers a request to the X server.
  7301. *
  7302. * This form can be used only if the request will cause
  7303. * a reply to be generated. Any returned error will be
  7304. * placed in the event queue.
  7305. */
  7306. xcb_get_motion_events_cookie_t
  7307. xcb_get_motion_events_unchecked (xcb_connection_t *c,
  7308. xcb_window_t window,
  7309. xcb_timestamp_t start,
  7310. xcb_timestamp_t stop);
  7311. xcb_timecoord_t *
  7312. xcb_get_motion_events_events (const xcb_get_motion_events_reply_t *R);
  7313. int
  7314. xcb_get_motion_events_events_length (const xcb_get_motion_events_reply_t *R);
  7315. xcb_timecoord_iterator_t
  7316. xcb_get_motion_events_events_iterator (const xcb_get_motion_events_reply_t *R);
  7317. /**
  7318. * Return the reply
  7319. * @param c The connection
  7320. * @param cookie The cookie
  7321. * @param e The xcb_generic_error_t supplied
  7322. *
  7323. * Returns the reply of the request asked by
  7324. *
  7325. * The parameter @p e supplied to this function must be NULL if
  7326. * xcb_get_motion_events_unchecked(). is used.
  7327. * Otherwise, it stores the error if any.
  7328. *
  7329. * The returned value must be freed by the caller using free().
  7330. */
  7331. xcb_get_motion_events_reply_t *
  7332. xcb_get_motion_events_reply (xcb_connection_t *c,
  7333. xcb_get_motion_events_cookie_t cookie /**< */,
  7334. xcb_generic_error_t **e);
  7335. /**
  7336. *
  7337. * @param c The connection
  7338. * @return A cookie
  7339. *
  7340. * Delivers a request to the X server.
  7341. *
  7342. */
  7343. xcb_translate_coordinates_cookie_t
  7344. xcb_translate_coordinates (xcb_connection_t *c,
  7345. xcb_window_t src_window,
  7346. xcb_window_t dst_window,
  7347. int16_t src_x,
  7348. int16_t src_y);
  7349. /**
  7350. *
  7351. * @param c The connection
  7352. * @return A cookie
  7353. *
  7354. * Delivers a request to the X server.
  7355. *
  7356. * This form can be used only if the request will cause
  7357. * a reply to be generated. Any returned error will be
  7358. * placed in the event queue.
  7359. */
  7360. xcb_translate_coordinates_cookie_t
  7361. xcb_translate_coordinates_unchecked (xcb_connection_t *c,
  7362. xcb_window_t src_window,
  7363. xcb_window_t dst_window,
  7364. int16_t src_x,
  7365. int16_t src_y);
  7366. /**
  7367. * Return the reply
  7368. * @param c The connection
  7369. * @param cookie The cookie
  7370. * @param e The xcb_generic_error_t supplied
  7371. *
  7372. * Returns the reply of the request asked by
  7373. *
  7374. * The parameter @p e supplied to this function must be NULL if
  7375. * xcb_translate_coordinates_unchecked(). is used.
  7376. * Otherwise, it stores the error if any.
  7377. *
  7378. * The returned value must be freed by the caller using free().
  7379. */
  7380. xcb_translate_coordinates_reply_t *
  7381. xcb_translate_coordinates_reply (xcb_connection_t *c,
  7382. xcb_translate_coordinates_cookie_t cookie /**< */,
  7383. xcb_generic_error_t **e);
  7384. /**
  7385. * @brief move mouse pointer
  7386. *
  7387. * @param c The connection
  7388. * @param src_window If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the
  7389. * pointer is inside \a src_window and within the rectangle specified by (\a src_x,
  7390. * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to
  7391. * \a src_window.
  7392. * @param dst_window If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the
  7393. * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is
  7394. * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y)
  7395. * relative to the current position of the pointer.
  7396. * @return A cookie
  7397. *
  7398. * Moves the mouse pointer to the specified position.
  7399. *
  7400. * If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the
  7401. * pointer is inside \a src_window and within the rectangle specified by (\a src_x,
  7402. * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to
  7403. * \a src_window.
  7404. *
  7405. * If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the
  7406. * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is
  7407. * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y)
  7408. * relative to the current position of the pointer.
  7409. *
  7410. * This form can be used only if the request will not cause
  7411. * a reply to be generated. Any returned error will be
  7412. * saved for handling by xcb_request_check().
  7413. */
  7414. xcb_void_cookie_t
  7415. xcb_warp_pointer_checked (xcb_connection_t *c,
  7416. xcb_window_t src_window,
  7417. xcb_window_t dst_window,
  7418. int16_t src_x,
  7419. int16_t src_y,
  7420. uint16_t src_width,
  7421. uint16_t src_height,
  7422. int16_t dst_x,
  7423. int16_t dst_y);
  7424. /**
  7425. * @brief move mouse pointer
  7426. *
  7427. * @param c The connection
  7428. * @param src_window If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the
  7429. * pointer is inside \a src_window and within the rectangle specified by (\a src_x,
  7430. * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to
  7431. * \a src_window.
  7432. * @param dst_window If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the
  7433. * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is
  7434. * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y)
  7435. * relative to the current position of the pointer.
  7436. * @return A cookie
  7437. *
  7438. * Moves the mouse pointer to the specified position.
  7439. *
  7440. * If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the
  7441. * pointer is inside \a src_window and within the rectangle specified by (\a src_x,
  7442. * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to
  7443. * \a src_window.
  7444. *
  7445. * If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the
  7446. * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is
  7447. * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y)
  7448. * relative to the current position of the pointer.
  7449. *
  7450. */
  7451. xcb_void_cookie_t
  7452. xcb_warp_pointer (xcb_connection_t *c,
  7453. xcb_window_t src_window,
  7454. xcb_window_t dst_window,
  7455. int16_t src_x,
  7456. int16_t src_y,
  7457. uint16_t src_width,
  7458. uint16_t src_height,
  7459. int16_t dst_x,
  7460. int16_t dst_y);
  7461. /**
  7462. * @brief Sets input focus
  7463. *
  7464. * @param c The connection
  7465. * @param revert_to A bitmask of #xcb_input_focus_t values.
  7466. * @param revert_to Specifies what happens when the \a focus window becomes unviewable (if \a focus
  7467. * is neither `XCB_NONE` nor `XCB_POINTER_ROOT`).
  7468. * @param focus The window to focus. All keyboard events will be reported to this window. The
  7469. * window must be viewable (TODO), or a `xcb_match_error_t` occurs (TODO).
  7470. * \n
  7471. * If \a focus is `XCB_NONE` (TODO), all keyboard events are
  7472. * discarded until a new focus window is set.
  7473. * \n
  7474. * If \a focus is `XCB_POINTER_ROOT` (TODO), focus is on the root window of the
  7475. * screen on which the pointer is on currently.
  7476. * @param time Timestamp to avoid race conditions when running X over the network.
  7477. * \n
  7478. * The special value `XCB_CURRENT_TIME` will be replaced with the current server
  7479. * time.
  7480. * @return A cookie
  7481. *
  7482. * Changes the input focus and the last-focus-change time. If the specified \a time
  7483. * is earlier than the current last-focus-change time, the request is ignored (to
  7484. * avoid race conditions when running X over the network).
  7485. *
  7486. * A FocusIn and FocusOut event is generated when focus is changed.
  7487. *
  7488. * This form can be used only if the request will not cause
  7489. * a reply to be generated. Any returned error will be
  7490. * saved for handling by xcb_request_check().
  7491. */
  7492. xcb_void_cookie_t
  7493. xcb_set_input_focus_checked (xcb_connection_t *c,
  7494. uint8_t revert_to,
  7495. xcb_window_t focus,
  7496. xcb_timestamp_t time);
  7497. /**
  7498. * @brief Sets input focus
  7499. *
  7500. * @param c The connection
  7501. * @param revert_to A bitmask of #xcb_input_focus_t values.
  7502. * @param revert_to Specifies what happens when the \a focus window becomes unviewable (if \a focus
  7503. * is neither `XCB_NONE` nor `XCB_POINTER_ROOT`).
  7504. * @param focus The window to focus. All keyboard events will be reported to this window. The
  7505. * window must be viewable (TODO), or a `xcb_match_error_t` occurs (TODO).
  7506. * \n
  7507. * If \a focus is `XCB_NONE` (TODO), all keyboard events are
  7508. * discarded until a new focus window is set.
  7509. * \n
  7510. * If \a focus is `XCB_POINTER_ROOT` (TODO), focus is on the root window of the
  7511. * screen on which the pointer is on currently.
  7512. * @param time Timestamp to avoid race conditions when running X over the network.
  7513. * \n
  7514. * The special value `XCB_CURRENT_TIME` will be replaced with the current server
  7515. * time.
  7516. * @return A cookie
  7517. *
  7518. * Changes the input focus and the last-focus-change time. If the specified \a time
  7519. * is earlier than the current last-focus-change time, the request is ignored (to
  7520. * avoid race conditions when running X over the network).
  7521. *
  7522. * A FocusIn and FocusOut event is generated when focus is changed.
  7523. *
  7524. */
  7525. xcb_void_cookie_t
  7526. xcb_set_input_focus (xcb_connection_t *c,
  7527. uint8_t revert_to,
  7528. xcb_window_t focus,
  7529. xcb_timestamp_t time);
  7530. /**
  7531. *
  7532. * @param c The connection
  7533. * @return A cookie
  7534. *
  7535. * Delivers a request to the X server.
  7536. *
  7537. */
  7538. xcb_get_input_focus_cookie_t
  7539. xcb_get_input_focus (xcb_connection_t *c);
  7540. /**
  7541. *
  7542. * @param c The connection
  7543. * @return A cookie
  7544. *
  7545. * Delivers a request to the X server.
  7546. *
  7547. * This form can be used only if the request will cause
  7548. * a reply to be generated. Any returned error will be
  7549. * placed in the event queue.
  7550. */
  7551. xcb_get_input_focus_cookie_t
  7552. xcb_get_input_focus_unchecked (xcb_connection_t *c);
  7553. /**
  7554. * Return the reply
  7555. * @param c The connection
  7556. * @param cookie The cookie
  7557. * @param e The xcb_generic_error_t supplied
  7558. *
  7559. * Returns the reply of the request asked by
  7560. *
  7561. * The parameter @p e supplied to this function must be NULL if
  7562. * xcb_get_input_focus_unchecked(). is used.
  7563. * Otherwise, it stores the error if any.
  7564. *
  7565. * The returned value must be freed by the caller using free().
  7566. */
  7567. xcb_get_input_focus_reply_t *
  7568. xcb_get_input_focus_reply (xcb_connection_t *c,
  7569. xcb_get_input_focus_cookie_t cookie /**< */,
  7570. xcb_generic_error_t **e);
  7571. /**
  7572. *
  7573. * @param c The connection
  7574. * @return A cookie
  7575. *
  7576. * Delivers a request to the X server.
  7577. *
  7578. */
  7579. xcb_query_keymap_cookie_t
  7580. xcb_query_keymap (xcb_connection_t *c);
  7581. /**
  7582. *
  7583. * @param c The connection
  7584. * @return A cookie
  7585. *
  7586. * Delivers a request to the X server.
  7587. *
  7588. * This form can be used only if the request will cause
  7589. * a reply to be generated. Any returned error will be
  7590. * placed in the event queue.
  7591. */
  7592. xcb_query_keymap_cookie_t
  7593. xcb_query_keymap_unchecked (xcb_connection_t *c);
  7594. /**
  7595. * Return the reply
  7596. * @param c The connection
  7597. * @param cookie The cookie
  7598. * @param e The xcb_generic_error_t supplied
  7599. *
  7600. * Returns the reply of the request asked by
  7601. *
  7602. * The parameter @p e supplied to this function must be NULL if
  7603. * xcb_query_keymap_unchecked(). is used.
  7604. * Otherwise, it stores the error if any.
  7605. *
  7606. * The returned value must be freed by the caller using free().
  7607. */
  7608. xcb_query_keymap_reply_t *
  7609. xcb_query_keymap_reply (xcb_connection_t *c,
  7610. xcb_query_keymap_cookie_t cookie /**< */,
  7611. xcb_generic_error_t **e);
  7612. int
  7613. xcb_open_font_sizeof (const void *_buffer);
  7614. /**
  7615. * @brief opens a font
  7616. *
  7617. * @param c The connection
  7618. * @param fid The ID with which you will refer to the font, created by `xcb_generate_id`.
  7619. * @param name_len Length (in bytes) of \a name.
  7620. * @param name A pattern describing an X core font.
  7621. * @return A cookie
  7622. *
  7623. * Opens any X core font matching the given \a name (for example "-misc-fixed-*").
  7624. *
  7625. * Note that X core fonts are deprecated (but still supported) in favor of
  7626. * client-side rendering using Xft.
  7627. *
  7628. * This form can be used only if the request will not cause
  7629. * a reply to be generated. Any returned error will be
  7630. * saved for handling by xcb_request_check().
  7631. */
  7632. xcb_void_cookie_t
  7633. xcb_open_font_checked (xcb_connection_t *c,
  7634. xcb_font_t fid,
  7635. uint16_t name_len,
  7636. const char *name);
  7637. /**
  7638. * @brief opens a font
  7639. *
  7640. * @param c The connection
  7641. * @param fid The ID with which you will refer to the font, created by `xcb_generate_id`.
  7642. * @param name_len Length (in bytes) of \a name.
  7643. * @param name A pattern describing an X core font.
  7644. * @return A cookie
  7645. *
  7646. * Opens any X core font matching the given \a name (for example "-misc-fixed-*").
  7647. *
  7648. * Note that X core fonts are deprecated (but still supported) in favor of
  7649. * client-side rendering using Xft.
  7650. *
  7651. */
  7652. xcb_void_cookie_t
  7653. xcb_open_font (xcb_connection_t *c,
  7654. xcb_font_t fid,
  7655. uint16_t name_len,
  7656. const char *name);
  7657. char *
  7658. xcb_open_font_name (const xcb_open_font_request_t *R);
  7659. int
  7660. xcb_open_font_name_length (const xcb_open_font_request_t *R);
  7661. xcb_generic_iterator_t
  7662. xcb_open_font_name_end (const xcb_open_font_request_t *R);
  7663. /**
  7664. *
  7665. * @param c The connection
  7666. * @return A cookie
  7667. *
  7668. * Delivers a request to the X server.
  7669. *
  7670. * This form can be used only if the request will not cause
  7671. * a reply to be generated. Any returned error will be
  7672. * saved for handling by xcb_request_check().
  7673. */
  7674. xcb_void_cookie_t
  7675. xcb_close_font_checked (xcb_connection_t *c,
  7676. xcb_font_t font);
  7677. /**
  7678. *
  7679. * @param c The connection
  7680. * @return A cookie
  7681. *
  7682. * Delivers a request to the X server.
  7683. *
  7684. */
  7685. xcb_void_cookie_t
  7686. xcb_close_font (xcb_connection_t *c,
  7687. xcb_font_t font);
  7688. /**
  7689. * Get the next element of the iterator
  7690. * @param i Pointer to a xcb_fontprop_iterator_t
  7691. *
  7692. * Get the next element in the iterator. The member rem is
  7693. * decreased by one. The member data points to the next
  7694. * element. The member index is increased by sizeof(xcb_fontprop_t)
  7695. */
  7696. void
  7697. xcb_fontprop_next (xcb_fontprop_iterator_t *i);
  7698. /**
  7699. * Return the iterator pointing to the last element
  7700. * @param i An xcb_fontprop_iterator_t
  7701. * @return The iterator pointing to the last element
  7702. *
  7703. * Set the current element in the iterator to the last element.
  7704. * The member rem is set to 0. The member data points to the
  7705. * last element.
  7706. */
  7707. xcb_generic_iterator_t
  7708. xcb_fontprop_end (xcb_fontprop_iterator_t i);
  7709. /**
  7710. * Get the next element of the iterator
  7711. * @param i Pointer to a xcb_charinfo_iterator_t
  7712. *
  7713. * Get the next element in the iterator. The member rem is
  7714. * decreased by one. The member data points to the next
  7715. * element. The member index is increased by sizeof(xcb_charinfo_t)
  7716. */
  7717. void
  7718. xcb_charinfo_next (xcb_charinfo_iterator_t *i);
  7719. /**
  7720. * Return the iterator pointing to the last element
  7721. * @param i An xcb_charinfo_iterator_t
  7722. * @return The iterator pointing to the last element
  7723. *
  7724. * Set the current element in the iterator to the last element.
  7725. * The member rem is set to 0. The member data points to the
  7726. * last element.
  7727. */
  7728. xcb_generic_iterator_t
  7729. xcb_charinfo_end (xcb_charinfo_iterator_t i);
  7730. int
  7731. xcb_query_font_sizeof (const void *_buffer);
  7732. /**
  7733. * @brief query font metrics
  7734. *
  7735. * @param c The connection
  7736. * @param font The fontable (Font or Graphics Context) to query.
  7737. * @return A cookie
  7738. *
  7739. * Queries information associated with the font.
  7740. *
  7741. */
  7742. xcb_query_font_cookie_t
  7743. xcb_query_font (xcb_connection_t *c,
  7744. xcb_fontable_t font);
  7745. /**
  7746. * @brief query font metrics
  7747. *
  7748. * @param c The connection
  7749. * @param font The fontable (Font or Graphics Context) to query.
  7750. * @return A cookie
  7751. *
  7752. * Queries information associated with the font.
  7753. *
  7754. * This form can be used only if the request will cause
  7755. * a reply to be generated. Any returned error will be
  7756. * placed in the event queue.
  7757. */
  7758. xcb_query_font_cookie_t
  7759. xcb_query_font_unchecked (xcb_connection_t *c,
  7760. xcb_fontable_t font);
  7761. xcb_fontprop_t *
  7762. xcb_query_font_properties (const xcb_query_font_reply_t *R);
  7763. int
  7764. xcb_query_font_properties_length (const xcb_query_font_reply_t *R);
  7765. xcb_fontprop_iterator_t
  7766. xcb_query_font_properties_iterator (const xcb_query_font_reply_t *R);
  7767. xcb_charinfo_t *
  7768. xcb_query_font_char_infos (const xcb_query_font_reply_t *R);
  7769. int
  7770. xcb_query_font_char_infos_length (const xcb_query_font_reply_t *R);
  7771. xcb_charinfo_iterator_t
  7772. xcb_query_font_char_infos_iterator (const xcb_query_font_reply_t *R);
  7773. /**
  7774. * Return the reply
  7775. * @param c The connection
  7776. * @param cookie The cookie
  7777. * @param e The xcb_generic_error_t supplied
  7778. *
  7779. * Returns the reply of the request asked by
  7780. *
  7781. * The parameter @p e supplied to this function must be NULL if
  7782. * xcb_query_font_unchecked(). is used.
  7783. * Otherwise, it stores the error if any.
  7784. *
  7785. * The returned value must be freed by the caller using free().
  7786. */
  7787. xcb_query_font_reply_t *
  7788. xcb_query_font_reply (xcb_connection_t *c,
  7789. xcb_query_font_cookie_t cookie /**< */,
  7790. xcb_generic_error_t **e);
  7791. int
  7792. xcb_query_text_extents_sizeof (const void *_buffer,
  7793. uint32_t string_len);
  7794. /**
  7795. * @brief get text extents
  7796. *
  7797. * @param c The connection
  7798. * @param font The \a font to calculate text extents in. You can also pass a graphics context.
  7799. * @param string_len The number of characters in \a string.
  7800. * @param string The text to get text extents for.
  7801. * @return A cookie
  7802. *
  7803. * Query text extents from the X11 server. This request returns the bounding box
  7804. * of the specified 16-bit character string in the specified \a font or the font
  7805. * contained in the specified graphics context.
  7806. *
  7807. * `font_ascent` is set to the maximum of the ascent metrics of all characters in
  7808. * the string. `font_descent` is set to the maximum of the descent metrics.
  7809. * `overall_width` is set to the sum of the character-width metrics of all
  7810. * characters in the string. For each character in the string, let W be the sum of
  7811. * the character-width metrics of all characters preceding it in the string. Let L
  7812. * be the left-side-bearing metric of the character plus W. Let R be the
  7813. * right-side-bearing metric of the character plus W. The lbearing member is set
  7814. * to the minimum L of all characters in the string. The rbearing member is set to
  7815. * the maximum R.
  7816. *
  7817. * For fonts defined with linear indexing rather than 2-byte matrix indexing, each
  7818. * `xcb_char2b_t` structure is interpreted as a 16-bit number with byte1 as the
  7819. * most significant byte. If the font has no defined default character, undefined
  7820. * characters in the string are taken to have all zero metrics.
  7821. *
  7822. * Characters with all zero metrics are ignored. If the font has no defined
  7823. * default_char, the undefined characters in the string are also ignored.
  7824. *
  7825. */
  7826. xcb_query_text_extents_cookie_t
  7827. xcb_query_text_extents (xcb_connection_t *c,
  7828. xcb_fontable_t font,
  7829. uint32_t string_len,
  7830. const xcb_char2b_t *string);
  7831. /**
  7832. * @brief get text extents
  7833. *
  7834. * @param c The connection
  7835. * @param font The \a font to calculate text extents in. You can also pass a graphics context.
  7836. * @param string_len The number of characters in \a string.
  7837. * @param string The text to get text extents for.
  7838. * @return A cookie
  7839. *
  7840. * Query text extents from the X11 server. This request returns the bounding box
  7841. * of the specified 16-bit character string in the specified \a font or the font
  7842. * contained in the specified graphics context.
  7843. *
  7844. * `font_ascent` is set to the maximum of the ascent metrics of all characters in
  7845. * the string. `font_descent` is set to the maximum of the descent metrics.
  7846. * `overall_width` is set to the sum of the character-width metrics of all
  7847. * characters in the string. For each character in the string, let W be the sum of
  7848. * the character-width metrics of all characters preceding it in the string. Let L
  7849. * be the left-side-bearing metric of the character plus W. Let R be the
  7850. * right-side-bearing metric of the character plus W. The lbearing member is set
  7851. * to the minimum L of all characters in the string. The rbearing member is set to
  7852. * the maximum R.
  7853. *
  7854. * For fonts defined with linear indexing rather than 2-byte matrix indexing, each
  7855. * `xcb_char2b_t` structure is interpreted as a 16-bit number with byte1 as the
  7856. * most significant byte. If the font has no defined default character, undefined
  7857. * characters in the string are taken to have all zero metrics.
  7858. *
  7859. * Characters with all zero metrics are ignored. If the font has no defined
  7860. * default_char, the undefined characters in the string are also ignored.
  7861. *
  7862. * This form can be used only if the request will cause
  7863. * a reply to be generated. Any returned error will be
  7864. * placed in the event queue.
  7865. */
  7866. xcb_query_text_extents_cookie_t
  7867. xcb_query_text_extents_unchecked (xcb_connection_t *c,
  7868. xcb_fontable_t font,
  7869. uint32_t string_len,
  7870. const xcb_char2b_t *string);
  7871. /**
  7872. * Return the reply
  7873. * @param c The connection
  7874. * @param cookie The cookie
  7875. * @param e The xcb_generic_error_t supplied
  7876. *
  7877. * Returns the reply of the request asked by
  7878. *
  7879. * The parameter @p e supplied to this function must be NULL if
  7880. * xcb_query_text_extents_unchecked(). is used.
  7881. * Otherwise, it stores the error if any.
  7882. *
  7883. * The returned value must be freed by the caller using free().
  7884. */
  7885. xcb_query_text_extents_reply_t *
  7886. xcb_query_text_extents_reply (xcb_connection_t *c,
  7887. xcb_query_text_extents_cookie_t cookie /**< */,
  7888. xcb_generic_error_t **e);
  7889. int
  7890. xcb_str_sizeof (const void *_buffer);
  7891. char *
  7892. xcb_str_name (const xcb_str_t *R);
  7893. int
  7894. xcb_str_name_length (const xcb_str_t *R);
  7895. xcb_generic_iterator_t
  7896. xcb_str_name_end (const xcb_str_t *R);
  7897. /**
  7898. * Get the next element of the iterator
  7899. * @param i Pointer to a xcb_str_iterator_t
  7900. *
  7901. * Get the next element in the iterator. The member rem is
  7902. * decreased by one. The member data points to the next
  7903. * element. The member index is increased by sizeof(xcb_str_t)
  7904. */
  7905. void
  7906. xcb_str_next (xcb_str_iterator_t *i);
  7907. /**
  7908. * Return the iterator pointing to the last element
  7909. * @param i An xcb_str_iterator_t
  7910. * @return The iterator pointing to the last element
  7911. *
  7912. * Set the current element in the iterator to the last element.
  7913. * The member rem is set to 0. The member data points to the
  7914. * last element.
  7915. */
  7916. xcb_generic_iterator_t
  7917. xcb_str_end (xcb_str_iterator_t i);
  7918. int
  7919. xcb_list_fonts_sizeof (const void *_buffer);
  7920. /**
  7921. * @brief get matching font names
  7922. *
  7923. * @param c The connection
  7924. * @param max_names The maximum number of fonts to be returned.
  7925. * @param pattern_len The length (in bytes) of \a pattern.
  7926. * @param pattern A font pattern, for example "-misc-fixed-*".
  7927. * \n
  7928. * The asterisk (*) is a wildcard for any number of characters. The question mark
  7929. * (?) is a wildcard for a single character. Use of uppercase or lowercase does
  7930. * not matter.
  7931. * @return A cookie
  7932. *
  7933. * Gets a list of available font names which match the given \a pattern.
  7934. *
  7935. */
  7936. xcb_list_fonts_cookie_t
  7937. xcb_list_fonts (xcb_connection_t *c,
  7938. uint16_t max_names,
  7939. uint16_t pattern_len,
  7940. const char *pattern);
  7941. /**
  7942. * @brief get matching font names
  7943. *
  7944. * @param c The connection
  7945. * @param max_names The maximum number of fonts to be returned.
  7946. * @param pattern_len The length (in bytes) of \a pattern.
  7947. * @param pattern A font pattern, for example "-misc-fixed-*".
  7948. * \n
  7949. * The asterisk (*) is a wildcard for any number of characters. The question mark
  7950. * (?) is a wildcard for a single character. Use of uppercase or lowercase does
  7951. * not matter.
  7952. * @return A cookie
  7953. *
  7954. * Gets a list of available font names which match the given \a pattern.
  7955. *
  7956. * This form can be used only if the request will cause
  7957. * a reply to be generated. Any returned error will be
  7958. * placed in the event queue.
  7959. */
  7960. xcb_list_fonts_cookie_t
  7961. xcb_list_fonts_unchecked (xcb_connection_t *c,
  7962. uint16_t max_names,
  7963. uint16_t pattern_len,
  7964. const char *pattern);
  7965. int
  7966. xcb_list_fonts_names_length (const xcb_list_fonts_reply_t *R);
  7967. xcb_str_iterator_t
  7968. xcb_list_fonts_names_iterator (const xcb_list_fonts_reply_t *R);
  7969. /**
  7970. * Return the reply
  7971. * @param c The connection
  7972. * @param cookie The cookie
  7973. * @param e The xcb_generic_error_t supplied
  7974. *
  7975. * Returns the reply of the request asked by
  7976. *
  7977. * The parameter @p e supplied to this function must be NULL if
  7978. * xcb_list_fonts_unchecked(). is used.
  7979. * Otherwise, it stores the error if any.
  7980. *
  7981. * The returned value must be freed by the caller using free().
  7982. */
  7983. xcb_list_fonts_reply_t *
  7984. xcb_list_fonts_reply (xcb_connection_t *c,
  7985. xcb_list_fonts_cookie_t cookie /**< */,
  7986. xcb_generic_error_t **e);
  7987. int
  7988. xcb_list_fonts_with_info_sizeof (const void *_buffer);
  7989. /**
  7990. * @brief get matching font names and information
  7991. *
  7992. * @param c The connection
  7993. * @param max_names The maximum number of fonts to be returned.
  7994. * @param pattern_len The length (in bytes) of \a pattern.
  7995. * @param pattern A font pattern, for example "-misc-fixed-*".
  7996. * \n
  7997. * The asterisk (*) is a wildcard for any number of characters. The question mark
  7998. * (?) is a wildcard for a single character. Use of uppercase or lowercase does
  7999. * not matter.
  8000. * @return A cookie
  8001. *
  8002. * Gets a list of available font names which match the given \a pattern.
  8003. *
  8004. */
  8005. xcb_list_fonts_with_info_cookie_t
  8006. xcb_list_fonts_with_info (xcb_connection_t *c,
  8007. uint16_t max_names,
  8008. uint16_t pattern_len,
  8009. const char *pattern);
  8010. /**
  8011. * @brief get matching font names and information
  8012. *
  8013. * @param c The connection
  8014. * @param max_names The maximum number of fonts to be returned.
  8015. * @param pattern_len The length (in bytes) of \a pattern.
  8016. * @param pattern A font pattern, for example "-misc-fixed-*".
  8017. * \n
  8018. * The asterisk (*) is a wildcard for any number of characters. The question mark
  8019. * (?) is a wildcard for a single character. Use of uppercase or lowercase does
  8020. * not matter.
  8021. * @return A cookie
  8022. *
  8023. * Gets a list of available font names which match the given \a pattern.
  8024. *
  8025. * This form can be used only if the request will cause
  8026. * a reply to be generated. Any returned error will be
  8027. * placed in the event queue.
  8028. */
  8029. xcb_list_fonts_with_info_cookie_t
  8030. xcb_list_fonts_with_info_unchecked (xcb_connection_t *c,
  8031. uint16_t max_names,
  8032. uint16_t pattern_len,
  8033. const char *pattern);
  8034. xcb_fontprop_t *
  8035. xcb_list_fonts_with_info_properties (const xcb_list_fonts_with_info_reply_t *R);
  8036. int
  8037. xcb_list_fonts_with_info_properties_length (const xcb_list_fonts_with_info_reply_t *R);
  8038. xcb_fontprop_iterator_t
  8039. xcb_list_fonts_with_info_properties_iterator (const xcb_list_fonts_with_info_reply_t *R);
  8040. char *
  8041. xcb_list_fonts_with_info_name (const xcb_list_fonts_with_info_reply_t *R);
  8042. int
  8043. xcb_list_fonts_with_info_name_length (const xcb_list_fonts_with_info_reply_t *R);
  8044. xcb_generic_iterator_t
  8045. xcb_list_fonts_with_info_name_end (const xcb_list_fonts_with_info_reply_t *R);
  8046. /**
  8047. * Return the reply
  8048. * @param c The connection
  8049. * @param cookie The cookie
  8050. * @param e The xcb_generic_error_t supplied
  8051. *
  8052. * Returns the reply of the request asked by
  8053. *
  8054. * The parameter @p e supplied to this function must be NULL if
  8055. * xcb_list_fonts_with_info_unchecked(). is used.
  8056. * Otherwise, it stores the error if any.
  8057. *
  8058. * The returned value must be freed by the caller using free().
  8059. */
  8060. xcb_list_fonts_with_info_reply_t *
  8061. xcb_list_fonts_with_info_reply (xcb_connection_t *c,
  8062. xcb_list_fonts_with_info_cookie_t cookie /**< */,
  8063. xcb_generic_error_t **e);
  8064. int
  8065. xcb_set_font_path_sizeof (const void *_buffer);
  8066. /**
  8067. *
  8068. * @param c The connection
  8069. * @return A cookie
  8070. *
  8071. * Delivers a request to the X server.
  8072. *
  8073. * This form can be used only if the request will not cause
  8074. * a reply to be generated. Any returned error will be
  8075. * saved for handling by xcb_request_check().
  8076. */
  8077. xcb_void_cookie_t
  8078. xcb_set_font_path_checked (xcb_connection_t *c,
  8079. uint16_t font_qty,
  8080. const xcb_str_t *font);
  8081. /**
  8082. *
  8083. * @param c The connection
  8084. * @return A cookie
  8085. *
  8086. * Delivers a request to the X server.
  8087. *
  8088. */
  8089. xcb_void_cookie_t
  8090. xcb_set_font_path (xcb_connection_t *c,
  8091. uint16_t font_qty,
  8092. const xcb_str_t *font);
  8093. int
  8094. xcb_set_font_path_font_length (const xcb_set_font_path_request_t *R);
  8095. xcb_str_iterator_t
  8096. xcb_set_font_path_font_iterator (const xcb_set_font_path_request_t *R);
  8097. int
  8098. xcb_get_font_path_sizeof (const void *_buffer);
  8099. /**
  8100. *
  8101. * @param c The connection
  8102. * @return A cookie
  8103. *
  8104. * Delivers a request to the X server.
  8105. *
  8106. */
  8107. xcb_get_font_path_cookie_t
  8108. xcb_get_font_path (xcb_connection_t *c);
  8109. /**
  8110. *
  8111. * @param c The connection
  8112. * @return A cookie
  8113. *
  8114. * Delivers a request to the X server.
  8115. *
  8116. * This form can be used only if the request will cause
  8117. * a reply to be generated. Any returned error will be
  8118. * placed in the event queue.
  8119. */
  8120. xcb_get_font_path_cookie_t
  8121. xcb_get_font_path_unchecked (xcb_connection_t *c);
  8122. int
  8123. xcb_get_font_path_path_length (const xcb_get_font_path_reply_t *R);
  8124. xcb_str_iterator_t
  8125. xcb_get_font_path_path_iterator (const xcb_get_font_path_reply_t *R);
  8126. /**
  8127. * Return the reply
  8128. * @param c The connection
  8129. * @param cookie The cookie
  8130. * @param e The xcb_generic_error_t supplied
  8131. *
  8132. * Returns the reply of the request asked by
  8133. *
  8134. * The parameter @p e supplied to this function must be NULL if
  8135. * xcb_get_font_path_unchecked(). is used.
  8136. * Otherwise, it stores the error if any.
  8137. *
  8138. * The returned value must be freed by the caller using free().
  8139. */
  8140. xcb_get_font_path_reply_t *
  8141. xcb_get_font_path_reply (xcb_connection_t *c,
  8142. xcb_get_font_path_cookie_t cookie /**< */,
  8143. xcb_generic_error_t **e);
  8144. /**
  8145. * @brief Creates a pixmap
  8146. *
  8147. * @param c The connection
  8148. * @param depth TODO
  8149. * @param pid The ID with which you will refer to the new pixmap, created by
  8150. * `xcb_generate_id`.
  8151. * @param drawable Drawable to get the screen from.
  8152. * @param width The width of the new pixmap.
  8153. * @param height The height of the new pixmap.
  8154. * @return A cookie
  8155. *
  8156. * Creates a pixmap. The pixmap can only be used on the same screen as \a drawable
  8157. * is on and only with drawables of the same \a depth.
  8158. *
  8159. * This form can be used only if the request will not cause
  8160. * a reply to be generated. Any returned error will be
  8161. * saved for handling by xcb_request_check().
  8162. */
  8163. xcb_void_cookie_t
  8164. xcb_create_pixmap_checked (xcb_connection_t *c,
  8165. uint8_t depth,
  8166. xcb_pixmap_t pid,
  8167. xcb_drawable_t drawable,
  8168. uint16_t width,
  8169. uint16_t height);
  8170. /**
  8171. * @brief Creates a pixmap
  8172. *
  8173. * @param c The connection
  8174. * @param depth TODO
  8175. * @param pid The ID with which you will refer to the new pixmap, created by
  8176. * `xcb_generate_id`.
  8177. * @param drawable Drawable to get the screen from.
  8178. * @param width The width of the new pixmap.
  8179. * @param height The height of the new pixmap.
  8180. * @return A cookie
  8181. *
  8182. * Creates a pixmap. The pixmap can only be used on the same screen as \a drawable
  8183. * is on and only with drawables of the same \a depth.
  8184. *
  8185. */
  8186. xcb_void_cookie_t
  8187. xcb_create_pixmap (xcb_connection_t *c,
  8188. uint8_t depth,
  8189. xcb_pixmap_t pid,
  8190. xcb_drawable_t drawable,
  8191. uint16_t width,
  8192. uint16_t height);
  8193. /**
  8194. * @brief Destroys a pixmap
  8195. *
  8196. * @param c The connection
  8197. * @param pixmap The pixmap to destroy.
  8198. * @return A cookie
  8199. *
  8200. * Deletes the association between the pixmap ID and the pixmap. The pixmap
  8201. * storage will be freed when there are no more references to it.
  8202. *
  8203. * This form can be used only if the request will not cause
  8204. * a reply to be generated. Any returned error will be
  8205. * saved for handling by xcb_request_check().
  8206. */
  8207. xcb_void_cookie_t
  8208. xcb_free_pixmap_checked (xcb_connection_t *c,
  8209. xcb_pixmap_t pixmap);
  8210. /**
  8211. * @brief Destroys a pixmap
  8212. *
  8213. * @param c The connection
  8214. * @param pixmap The pixmap to destroy.
  8215. * @return A cookie
  8216. *
  8217. * Deletes the association between the pixmap ID and the pixmap. The pixmap
  8218. * storage will be freed when there are no more references to it.
  8219. *
  8220. */
  8221. xcb_void_cookie_t
  8222. xcb_free_pixmap (xcb_connection_t *c,
  8223. xcb_pixmap_t pixmap);
  8224. int
  8225. xcb_create_gc_value_list_serialize (void **_buffer,
  8226. uint32_t value_mask,
  8227. const xcb_create_gc_value_list_t *_aux);
  8228. int
  8229. xcb_create_gc_value_list_unpack (const void *_buffer,
  8230. uint32_t value_mask,
  8231. xcb_create_gc_value_list_t *_aux);
  8232. int
  8233. xcb_create_gc_value_list_sizeof (const void *_buffer,
  8234. uint32_t value_mask);
  8235. int
  8236. xcb_create_gc_sizeof (const void *_buffer);
  8237. /**
  8238. * @brief Creates a graphics context
  8239. *
  8240. * @param c The connection
  8241. * @param cid The ID with which you will refer to the graphics context, created by
  8242. * `xcb_generate_id`.
  8243. * @param drawable Drawable to get the root/depth from.
  8244. * @return A cookie
  8245. *
  8246. * Creates a graphics context. The graphics context can be used with any drawable
  8247. * that has the same root and depth as the specified drawable.
  8248. *
  8249. * This form can be used only if the request will not cause
  8250. * a reply to be generated. Any returned error will be
  8251. * saved for handling by xcb_request_check().
  8252. */
  8253. xcb_void_cookie_t
  8254. xcb_create_gc_checked (xcb_connection_t *c,
  8255. xcb_gcontext_t cid,
  8256. xcb_drawable_t drawable,
  8257. uint32_t value_mask,
  8258. const void *value_list);
  8259. /**
  8260. * @brief Creates a graphics context
  8261. *
  8262. * @param c The connection
  8263. * @param cid The ID with which you will refer to the graphics context, created by
  8264. * `xcb_generate_id`.
  8265. * @param drawable Drawable to get the root/depth from.
  8266. * @return A cookie
  8267. *
  8268. * Creates a graphics context. The graphics context can be used with any drawable
  8269. * that has the same root and depth as the specified drawable.
  8270. *
  8271. */
  8272. xcb_void_cookie_t
  8273. xcb_create_gc (xcb_connection_t *c,
  8274. xcb_gcontext_t cid,
  8275. xcb_drawable_t drawable,
  8276. uint32_t value_mask,
  8277. const void *value_list);
  8278. /**
  8279. * @brief Creates a graphics context
  8280. *
  8281. * @param c The connection
  8282. * @param cid The ID with which you will refer to the graphics context, created by
  8283. * `xcb_generate_id`.
  8284. * @param drawable Drawable to get the root/depth from.
  8285. * @return A cookie
  8286. *
  8287. * Creates a graphics context. The graphics context can be used with any drawable
  8288. * that has the same root and depth as the specified drawable.
  8289. *
  8290. * This form can be used only if the request will not cause
  8291. * a reply to be generated. Any returned error will be
  8292. * saved for handling by xcb_request_check().
  8293. */
  8294. xcb_void_cookie_t
  8295. xcb_create_gc_aux_checked (xcb_connection_t *c,
  8296. xcb_gcontext_t cid,
  8297. xcb_drawable_t drawable,
  8298. uint32_t value_mask,
  8299. const xcb_create_gc_value_list_t *value_list);
  8300. /**
  8301. * @brief Creates a graphics context
  8302. *
  8303. * @param c The connection
  8304. * @param cid The ID with which you will refer to the graphics context, created by
  8305. * `xcb_generate_id`.
  8306. * @param drawable Drawable to get the root/depth from.
  8307. * @return A cookie
  8308. *
  8309. * Creates a graphics context. The graphics context can be used with any drawable
  8310. * that has the same root and depth as the specified drawable.
  8311. *
  8312. */
  8313. xcb_void_cookie_t
  8314. xcb_create_gc_aux (xcb_connection_t *c,
  8315. xcb_gcontext_t cid,
  8316. xcb_drawable_t drawable,
  8317. uint32_t value_mask,
  8318. const xcb_create_gc_value_list_t *value_list);
  8319. void *
  8320. xcb_create_gc_value_list (const xcb_create_gc_request_t *R);
  8321. int
  8322. xcb_change_gc_value_list_serialize (void **_buffer,
  8323. uint32_t value_mask,
  8324. const xcb_change_gc_value_list_t *_aux);
  8325. int
  8326. xcb_change_gc_value_list_unpack (const void *_buffer,
  8327. uint32_t value_mask,
  8328. xcb_change_gc_value_list_t *_aux);
  8329. int
  8330. xcb_change_gc_value_list_sizeof (const void *_buffer,
  8331. uint32_t value_mask);
  8332. int
  8333. xcb_change_gc_sizeof (const void *_buffer);
  8334. /**
  8335. * @brief change graphics context components
  8336. *
  8337. * @param c The connection
  8338. * @param gc The graphics context to change.
  8339. * @param value_mask A bitmask of #xcb_gc_t values.
  8340. * @param value_mask \n
  8341. * @param value_list Values for each of the components specified in the bitmask \a value_mask. The
  8342. * order has to correspond to the order of possible \a value_mask bits. See the
  8343. * example.
  8344. * @return A cookie
  8345. *
  8346. * Changes the components specified by \a value_mask for the specified graphics context.
  8347. *
  8348. * This form can be used only if the request will not cause
  8349. * a reply to be generated. Any returned error will be
  8350. * saved for handling by xcb_request_check().
  8351. */
  8352. xcb_void_cookie_t
  8353. xcb_change_gc_checked (xcb_connection_t *c,
  8354. xcb_gcontext_t gc,
  8355. uint32_t value_mask,
  8356. const void *value_list);
  8357. /**
  8358. * @brief change graphics context components
  8359. *
  8360. * @param c The connection
  8361. * @param gc The graphics context to change.
  8362. * @param value_mask A bitmask of #xcb_gc_t values.
  8363. * @param value_mask \n
  8364. * @param value_list Values for each of the components specified in the bitmask \a value_mask. The
  8365. * order has to correspond to the order of possible \a value_mask bits. See the
  8366. * example.
  8367. * @return A cookie
  8368. *
  8369. * Changes the components specified by \a value_mask for the specified graphics context.
  8370. *
  8371. */
  8372. xcb_void_cookie_t
  8373. xcb_change_gc (xcb_connection_t *c,
  8374. xcb_gcontext_t gc,
  8375. uint32_t value_mask,
  8376. const void *value_list);
  8377. /**
  8378. * @brief change graphics context components
  8379. *
  8380. * @param c The connection
  8381. * @param gc The graphics context to change.
  8382. * @param value_mask A bitmask of #xcb_gc_t values.
  8383. * @param value_mask \n
  8384. * @param value_list Values for each of the components specified in the bitmask \a value_mask. The
  8385. * order has to correspond to the order of possible \a value_mask bits. See the
  8386. * example.
  8387. * @return A cookie
  8388. *
  8389. * Changes the components specified by \a value_mask for the specified graphics context.
  8390. *
  8391. * This form can be used only if the request will not cause
  8392. * a reply to be generated. Any returned error will be
  8393. * saved for handling by xcb_request_check().
  8394. */
  8395. xcb_void_cookie_t
  8396. xcb_change_gc_aux_checked (xcb_connection_t *c,
  8397. xcb_gcontext_t gc,
  8398. uint32_t value_mask,
  8399. const xcb_change_gc_value_list_t *value_list);
  8400. /**
  8401. * @brief change graphics context components
  8402. *
  8403. * @param c The connection
  8404. * @param gc The graphics context to change.
  8405. * @param value_mask A bitmask of #xcb_gc_t values.
  8406. * @param value_mask \n
  8407. * @param value_list Values for each of the components specified in the bitmask \a value_mask. The
  8408. * order has to correspond to the order of possible \a value_mask bits. See the
  8409. * example.
  8410. * @return A cookie
  8411. *
  8412. * Changes the components specified by \a value_mask for the specified graphics context.
  8413. *
  8414. */
  8415. xcb_void_cookie_t
  8416. xcb_change_gc_aux (xcb_connection_t *c,
  8417. xcb_gcontext_t gc,
  8418. uint32_t value_mask,
  8419. const xcb_change_gc_value_list_t *value_list);
  8420. void *
  8421. xcb_change_gc_value_list (const xcb_change_gc_request_t *R);
  8422. /**
  8423. *
  8424. * @param c The connection
  8425. * @return A cookie
  8426. *
  8427. * Delivers a request to the X server.
  8428. *
  8429. * This form can be used only if the request will not cause
  8430. * a reply to be generated. Any returned error will be
  8431. * saved for handling by xcb_request_check().
  8432. */
  8433. xcb_void_cookie_t
  8434. xcb_copy_gc_checked (xcb_connection_t *c,
  8435. xcb_gcontext_t src_gc,
  8436. xcb_gcontext_t dst_gc,
  8437. uint32_t value_mask);
  8438. /**
  8439. *
  8440. * @param c The connection
  8441. * @return A cookie
  8442. *
  8443. * Delivers a request to the X server.
  8444. *
  8445. */
  8446. xcb_void_cookie_t
  8447. xcb_copy_gc (xcb_connection_t *c,
  8448. xcb_gcontext_t src_gc,
  8449. xcb_gcontext_t dst_gc,
  8450. uint32_t value_mask);
  8451. int
  8452. xcb_set_dashes_sizeof (const void *_buffer);
  8453. /**
  8454. *
  8455. * @param c The connection
  8456. * @return A cookie
  8457. *
  8458. * Delivers a request to the X server.
  8459. *
  8460. * This form can be used only if the request will not cause
  8461. * a reply to be generated. Any returned error will be
  8462. * saved for handling by xcb_request_check().
  8463. */
  8464. xcb_void_cookie_t
  8465. xcb_set_dashes_checked (xcb_connection_t *c,
  8466. xcb_gcontext_t gc,
  8467. uint16_t dash_offset,
  8468. uint16_t dashes_len,
  8469. const uint8_t *dashes);
  8470. /**
  8471. *
  8472. * @param c The connection
  8473. * @return A cookie
  8474. *
  8475. * Delivers a request to the X server.
  8476. *
  8477. */
  8478. xcb_void_cookie_t
  8479. xcb_set_dashes (xcb_connection_t *c,
  8480. xcb_gcontext_t gc,
  8481. uint16_t dash_offset,
  8482. uint16_t dashes_len,
  8483. const uint8_t *dashes);
  8484. uint8_t *
  8485. xcb_set_dashes_dashes (const xcb_set_dashes_request_t *R);
  8486. int
  8487. xcb_set_dashes_dashes_length (const xcb_set_dashes_request_t *R);
  8488. xcb_generic_iterator_t
  8489. xcb_set_dashes_dashes_end (const xcb_set_dashes_request_t *R);
  8490. int
  8491. xcb_set_clip_rectangles_sizeof (const void *_buffer,
  8492. uint32_t rectangles_len);
  8493. /**
  8494. *
  8495. * @param c The connection
  8496. * @return A cookie
  8497. *
  8498. * Delivers a request to the X server.
  8499. *
  8500. * This form can be used only if the request will not cause
  8501. * a reply to be generated. Any returned error will be
  8502. * saved for handling by xcb_request_check().
  8503. */
  8504. xcb_void_cookie_t
  8505. xcb_set_clip_rectangles_checked (xcb_connection_t *c,
  8506. uint8_t ordering,
  8507. xcb_gcontext_t gc,
  8508. int16_t clip_x_origin,
  8509. int16_t clip_y_origin,
  8510. uint32_t rectangles_len,
  8511. const xcb_rectangle_t *rectangles);
  8512. /**
  8513. *
  8514. * @param c The connection
  8515. * @return A cookie
  8516. *
  8517. * Delivers a request to the X server.
  8518. *
  8519. */
  8520. xcb_void_cookie_t
  8521. xcb_set_clip_rectangles (xcb_connection_t *c,
  8522. uint8_t ordering,
  8523. xcb_gcontext_t gc,
  8524. int16_t clip_x_origin,
  8525. int16_t clip_y_origin,
  8526. uint32_t rectangles_len,
  8527. const xcb_rectangle_t *rectangles);
  8528. xcb_rectangle_t *
  8529. xcb_set_clip_rectangles_rectangles (const xcb_set_clip_rectangles_request_t *R);
  8530. int
  8531. xcb_set_clip_rectangles_rectangles_length (const xcb_set_clip_rectangles_request_t *R);
  8532. xcb_rectangle_iterator_t
  8533. xcb_set_clip_rectangles_rectangles_iterator (const xcb_set_clip_rectangles_request_t *R);
  8534. /**
  8535. * @brief Destroys a graphics context
  8536. *
  8537. * @param c The connection
  8538. * @param gc The graphics context to destroy.
  8539. * @return A cookie
  8540. *
  8541. * Destroys the specified \a gc and all associated storage.
  8542. *
  8543. * This form can be used only if the request will not cause
  8544. * a reply to be generated. Any returned error will be
  8545. * saved for handling by xcb_request_check().
  8546. */
  8547. xcb_void_cookie_t
  8548. xcb_free_gc_checked (xcb_connection_t *c,
  8549. xcb_gcontext_t gc);
  8550. /**
  8551. * @brief Destroys a graphics context
  8552. *
  8553. * @param c The connection
  8554. * @param gc The graphics context to destroy.
  8555. * @return A cookie
  8556. *
  8557. * Destroys the specified \a gc and all associated storage.
  8558. *
  8559. */
  8560. xcb_void_cookie_t
  8561. xcb_free_gc (xcb_connection_t *c,
  8562. xcb_gcontext_t gc);
  8563. /**
  8564. *
  8565. * @param c The connection
  8566. * @return A cookie
  8567. *
  8568. * Delivers a request to the X server.
  8569. *
  8570. * This form can be used only if the request will not cause
  8571. * a reply to be generated. Any returned error will be
  8572. * saved for handling by xcb_request_check().
  8573. */
  8574. xcb_void_cookie_t
  8575. xcb_clear_area_checked (xcb_connection_t *c,
  8576. uint8_t exposures,
  8577. xcb_window_t window,
  8578. int16_t x,
  8579. int16_t y,
  8580. uint16_t width,
  8581. uint16_t height);
  8582. /**
  8583. *
  8584. * @param c The connection
  8585. * @return A cookie
  8586. *
  8587. * Delivers a request to the X server.
  8588. *
  8589. */
  8590. xcb_void_cookie_t
  8591. xcb_clear_area (xcb_connection_t *c,
  8592. uint8_t exposures,
  8593. xcb_window_t window,
  8594. int16_t x,
  8595. int16_t y,
  8596. uint16_t width,
  8597. uint16_t height);
  8598. /**
  8599. * @brief copy areas
  8600. *
  8601. * @param c The connection
  8602. * @param src_drawable The source drawable (Window or Pixmap).
  8603. * @param dst_drawable The destination drawable (Window or Pixmap).
  8604. * @param gc The graphics context to use.
  8605. * @param src_x The source X coordinate.
  8606. * @param src_y The source Y coordinate.
  8607. * @param dst_x The destination X coordinate.
  8608. * @param dst_y The destination Y coordinate.
  8609. * @param width The width of the area to copy (in pixels).
  8610. * @param height The height of the area to copy (in pixels).
  8611. * @return A cookie
  8612. *
  8613. * Copies the specified rectangle from \a src_drawable to \a dst_drawable.
  8614. *
  8615. * This form can be used only if the request will not cause
  8616. * a reply to be generated. Any returned error will be
  8617. * saved for handling by xcb_request_check().
  8618. */
  8619. xcb_void_cookie_t
  8620. xcb_copy_area_checked (xcb_connection_t *c,
  8621. xcb_drawable_t src_drawable,
  8622. xcb_drawable_t dst_drawable,
  8623. xcb_gcontext_t gc,
  8624. int16_t src_x,
  8625. int16_t src_y,
  8626. int16_t dst_x,
  8627. int16_t dst_y,
  8628. uint16_t width,
  8629. uint16_t height);
  8630. /**
  8631. * @brief copy areas
  8632. *
  8633. * @param c The connection
  8634. * @param src_drawable The source drawable (Window or Pixmap).
  8635. * @param dst_drawable The destination drawable (Window or Pixmap).
  8636. * @param gc The graphics context to use.
  8637. * @param src_x The source X coordinate.
  8638. * @param src_y The source Y coordinate.
  8639. * @param dst_x The destination X coordinate.
  8640. * @param dst_y The destination Y coordinate.
  8641. * @param width The width of the area to copy (in pixels).
  8642. * @param height The height of the area to copy (in pixels).
  8643. * @return A cookie
  8644. *
  8645. * Copies the specified rectangle from \a src_drawable to \a dst_drawable.
  8646. *
  8647. */
  8648. xcb_void_cookie_t
  8649. xcb_copy_area (xcb_connection_t *c,
  8650. xcb_drawable_t src_drawable,
  8651. xcb_drawable_t dst_drawable,
  8652. xcb_gcontext_t gc,
  8653. int16_t src_x,
  8654. int16_t src_y,
  8655. int16_t dst_x,
  8656. int16_t dst_y,
  8657. uint16_t width,
  8658. uint16_t height);
  8659. /**
  8660. *
  8661. * @param c The connection
  8662. * @return A cookie
  8663. *
  8664. * Delivers a request to the X server.
  8665. *
  8666. * This form can be used only if the request will not cause
  8667. * a reply to be generated. Any returned error will be
  8668. * saved for handling by xcb_request_check().
  8669. */
  8670. xcb_void_cookie_t
  8671. xcb_copy_plane_checked (xcb_connection_t *c,
  8672. xcb_drawable_t src_drawable,
  8673. xcb_drawable_t dst_drawable,
  8674. xcb_gcontext_t gc,
  8675. int16_t src_x,
  8676. int16_t src_y,
  8677. int16_t dst_x,
  8678. int16_t dst_y,
  8679. uint16_t width,
  8680. uint16_t height,
  8681. uint32_t bit_plane);
  8682. /**
  8683. *
  8684. * @param c The connection
  8685. * @return A cookie
  8686. *
  8687. * Delivers a request to the X server.
  8688. *
  8689. */
  8690. xcb_void_cookie_t
  8691. xcb_copy_plane (xcb_connection_t *c,
  8692. xcb_drawable_t src_drawable,
  8693. xcb_drawable_t dst_drawable,
  8694. xcb_gcontext_t gc,
  8695. int16_t src_x,
  8696. int16_t src_y,
  8697. int16_t dst_x,
  8698. int16_t dst_y,
  8699. uint16_t width,
  8700. uint16_t height,
  8701. uint32_t bit_plane);
  8702. int
  8703. xcb_poly_point_sizeof (const void *_buffer,
  8704. uint32_t points_len);
  8705. /**
  8706. *
  8707. * @param c The connection
  8708. * @return A cookie
  8709. *
  8710. * Delivers a request to the X server.
  8711. *
  8712. * This form can be used only if the request will not cause
  8713. * a reply to be generated. Any returned error will be
  8714. * saved for handling by xcb_request_check().
  8715. */
  8716. xcb_void_cookie_t
  8717. xcb_poly_point_checked (xcb_connection_t *c,
  8718. uint8_t coordinate_mode,
  8719. xcb_drawable_t drawable,
  8720. xcb_gcontext_t gc,
  8721. uint32_t points_len,
  8722. const xcb_point_t *points);
  8723. /**
  8724. *
  8725. * @param c The connection
  8726. * @return A cookie
  8727. *
  8728. * Delivers a request to the X server.
  8729. *
  8730. */
  8731. xcb_void_cookie_t
  8732. xcb_poly_point (xcb_connection_t *c,
  8733. uint8_t coordinate_mode,
  8734. xcb_drawable_t drawable,
  8735. xcb_gcontext_t gc,
  8736. uint32_t points_len,
  8737. const xcb_point_t *points);
  8738. xcb_point_t *
  8739. xcb_poly_point_points (const xcb_poly_point_request_t *R);
  8740. int
  8741. xcb_poly_point_points_length (const xcb_poly_point_request_t *R);
  8742. xcb_point_iterator_t
  8743. xcb_poly_point_points_iterator (const xcb_poly_point_request_t *R);
  8744. int
  8745. xcb_poly_line_sizeof (const void *_buffer,
  8746. uint32_t points_len);
  8747. /**
  8748. * @brief draw lines
  8749. *
  8750. * @param c The connection
  8751. * @param coordinate_mode A bitmask of #xcb_coord_mode_t values.
  8752. * @param coordinate_mode \n
  8753. * @param drawable The drawable to draw the line(s) on.
  8754. * @param gc The graphics context to use.
  8755. * @param points_len The number of `xcb_point_t` structures in \a points.
  8756. * @param points An array of points.
  8757. * @return A cookie
  8758. *
  8759. * Draws \a points_len-1 lines between each pair of points (point[i], point[i+1])
  8760. * in the \a points array. The lines are drawn in the order listed in the array.
  8761. * They join correctly at all intermediate points, and if the first and last
  8762. * points coincide, the first and last lines also join correctly. For any given
  8763. * line, a pixel is not drawn more than once. If thin (zero line-width) lines
  8764. * intersect, the intersecting pixels are drawn multiple times. If wide lines
  8765. * intersect, the intersecting pixels are drawn only once, as though the entire
  8766. * request were a single, filled shape.
  8767. *
  8768. * This form can be used only if the request will not cause
  8769. * a reply to be generated. Any returned error will be
  8770. * saved for handling by xcb_request_check().
  8771. */
  8772. xcb_void_cookie_t
  8773. xcb_poly_line_checked (xcb_connection_t *c,
  8774. uint8_t coordinate_mode,
  8775. xcb_drawable_t drawable,
  8776. xcb_gcontext_t gc,
  8777. uint32_t points_len,
  8778. const xcb_point_t *points);
  8779. /**
  8780. * @brief draw lines
  8781. *
  8782. * @param c The connection
  8783. * @param coordinate_mode A bitmask of #xcb_coord_mode_t values.
  8784. * @param coordinate_mode \n
  8785. * @param drawable The drawable to draw the line(s) on.
  8786. * @param gc The graphics context to use.
  8787. * @param points_len The number of `xcb_point_t` structures in \a points.
  8788. * @param points An array of points.
  8789. * @return A cookie
  8790. *
  8791. * Draws \a points_len-1 lines between each pair of points (point[i], point[i+1])
  8792. * in the \a points array. The lines are drawn in the order listed in the array.
  8793. * They join correctly at all intermediate points, and if the first and last
  8794. * points coincide, the first and last lines also join correctly. For any given
  8795. * line, a pixel is not drawn more than once. If thin (zero line-width) lines
  8796. * intersect, the intersecting pixels are drawn multiple times. If wide lines
  8797. * intersect, the intersecting pixels are drawn only once, as though the entire
  8798. * request were a single, filled shape.
  8799. *
  8800. */
  8801. xcb_void_cookie_t
  8802. xcb_poly_line (xcb_connection_t *c,
  8803. uint8_t coordinate_mode,
  8804. xcb_drawable_t drawable,
  8805. xcb_gcontext_t gc,
  8806. uint32_t points_len,
  8807. const xcb_point_t *points);
  8808. xcb_point_t *
  8809. xcb_poly_line_points (const xcb_poly_line_request_t *R);
  8810. int
  8811. xcb_poly_line_points_length (const xcb_poly_line_request_t *R);
  8812. xcb_point_iterator_t
  8813. xcb_poly_line_points_iterator (const xcb_poly_line_request_t *R);
  8814. /**
  8815. * Get the next element of the iterator
  8816. * @param i Pointer to a xcb_segment_iterator_t
  8817. *
  8818. * Get the next element in the iterator. The member rem is
  8819. * decreased by one. The member data points to the next
  8820. * element. The member index is increased by sizeof(xcb_segment_t)
  8821. */
  8822. void
  8823. xcb_segment_next (xcb_segment_iterator_t *i);
  8824. /**
  8825. * Return the iterator pointing to the last element
  8826. * @param i An xcb_segment_iterator_t
  8827. * @return The iterator pointing to the last element
  8828. *
  8829. * Set the current element in the iterator to the last element.
  8830. * The member rem is set to 0. The member data points to the
  8831. * last element.
  8832. */
  8833. xcb_generic_iterator_t
  8834. xcb_segment_end (xcb_segment_iterator_t i);
  8835. int
  8836. xcb_poly_segment_sizeof (const void *_buffer,
  8837. uint32_t segments_len);
  8838. /**
  8839. * @brief draw lines
  8840. *
  8841. * @param c The connection
  8842. * @param drawable A drawable (Window or Pixmap) to draw on.
  8843. * @param gc The graphics context to use.
  8844. * \n
  8845. * TODO: document which attributes of a gc are used
  8846. * @param segments_len The number of `xcb_segment_t` structures in \a segments.
  8847. * @param segments An array of `xcb_segment_t` structures.
  8848. * @return A cookie
  8849. *
  8850. * Draws multiple, unconnected lines. For each segment, a line is drawn between
  8851. * (x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of
  8852. * `xcb_segment_t` structures and does not perform joining at coincident
  8853. * endpoints. For any given line, a pixel is not drawn more than once. If lines
  8854. * intersect, the intersecting pixels are drawn multiple times.
  8855. *
  8856. * TODO: include the xcb_segment_t data structure
  8857. *
  8858. * TODO: an example
  8859. *
  8860. * This form can be used only if the request will not cause
  8861. * a reply to be generated. Any returned error will be
  8862. * saved for handling by xcb_request_check().
  8863. */
  8864. xcb_void_cookie_t
  8865. xcb_poly_segment_checked (xcb_connection_t *c,
  8866. xcb_drawable_t drawable,
  8867. xcb_gcontext_t gc,
  8868. uint32_t segments_len,
  8869. const xcb_segment_t *segments);
  8870. /**
  8871. * @brief draw lines
  8872. *
  8873. * @param c The connection
  8874. * @param drawable A drawable (Window or Pixmap) to draw on.
  8875. * @param gc The graphics context to use.
  8876. * \n
  8877. * TODO: document which attributes of a gc are used
  8878. * @param segments_len The number of `xcb_segment_t` structures in \a segments.
  8879. * @param segments An array of `xcb_segment_t` structures.
  8880. * @return A cookie
  8881. *
  8882. * Draws multiple, unconnected lines. For each segment, a line is drawn between
  8883. * (x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of
  8884. * `xcb_segment_t` structures and does not perform joining at coincident
  8885. * endpoints. For any given line, a pixel is not drawn more than once. If lines
  8886. * intersect, the intersecting pixels are drawn multiple times.
  8887. *
  8888. * TODO: include the xcb_segment_t data structure
  8889. *
  8890. * TODO: an example
  8891. *
  8892. */
  8893. xcb_void_cookie_t
  8894. xcb_poly_segment (xcb_connection_t *c,
  8895. xcb_drawable_t drawable,
  8896. xcb_gcontext_t gc,
  8897. uint32_t segments_len,
  8898. const xcb_segment_t *segments);
  8899. xcb_segment_t *
  8900. xcb_poly_segment_segments (const xcb_poly_segment_request_t *R);
  8901. int
  8902. xcb_poly_segment_segments_length (const xcb_poly_segment_request_t *R);
  8903. xcb_segment_iterator_t
  8904. xcb_poly_segment_segments_iterator (const xcb_poly_segment_request_t *R);
  8905. int
  8906. xcb_poly_rectangle_sizeof (const void *_buffer,
  8907. uint32_t rectangles_len);
  8908. /**
  8909. *
  8910. * @param c The connection
  8911. * @return A cookie
  8912. *
  8913. * Delivers a request to the X server.
  8914. *
  8915. * This form can be used only if the request will not cause
  8916. * a reply to be generated. Any returned error will be
  8917. * saved for handling by xcb_request_check().
  8918. */
  8919. xcb_void_cookie_t
  8920. xcb_poly_rectangle_checked (xcb_connection_t *c,
  8921. xcb_drawable_t drawable,
  8922. xcb_gcontext_t gc,
  8923. uint32_t rectangles_len,
  8924. const xcb_rectangle_t *rectangles);
  8925. /**
  8926. *
  8927. * @param c The connection
  8928. * @return A cookie
  8929. *
  8930. * Delivers a request to the X server.
  8931. *
  8932. */
  8933. xcb_void_cookie_t
  8934. xcb_poly_rectangle (xcb_connection_t *c,
  8935. xcb_drawable_t drawable,
  8936. xcb_gcontext_t gc,
  8937. uint32_t rectangles_len,
  8938. const xcb_rectangle_t *rectangles);
  8939. xcb_rectangle_t *
  8940. xcb_poly_rectangle_rectangles (const xcb_poly_rectangle_request_t *R);
  8941. int
  8942. xcb_poly_rectangle_rectangles_length (const xcb_poly_rectangle_request_t *R);
  8943. xcb_rectangle_iterator_t
  8944. xcb_poly_rectangle_rectangles_iterator (const xcb_poly_rectangle_request_t *R);
  8945. int
  8946. xcb_poly_arc_sizeof (const void *_buffer,
  8947. uint32_t arcs_len);
  8948. /**
  8949. *
  8950. * @param c The connection
  8951. * @return A cookie
  8952. *
  8953. * Delivers a request to the X server.
  8954. *
  8955. * This form can be used only if the request will not cause
  8956. * a reply to be generated. Any returned error will be
  8957. * saved for handling by xcb_request_check().
  8958. */
  8959. xcb_void_cookie_t
  8960. xcb_poly_arc_checked (xcb_connection_t *c,
  8961. xcb_drawable_t drawable,
  8962. xcb_gcontext_t gc,
  8963. uint32_t arcs_len,
  8964. const xcb_arc_t *arcs);
  8965. /**
  8966. *
  8967. * @param c The connection
  8968. * @return A cookie
  8969. *
  8970. * Delivers a request to the X server.
  8971. *
  8972. */
  8973. xcb_void_cookie_t
  8974. xcb_poly_arc (xcb_connection_t *c,
  8975. xcb_drawable_t drawable,
  8976. xcb_gcontext_t gc,
  8977. uint32_t arcs_len,
  8978. const xcb_arc_t *arcs);
  8979. xcb_arc_t *
  8980. xcb_poly_arc_arcs (const xcb_poly_arc_request_t *R);
  8981. int
  8982. xcb_poly_arc_arcs_length (const xcb_poly_arc_request_t *R);
  8983. xcb_arc_iterator_t
  8984. xcb_poly_arc_arcs_iterator (const xcb_poly_arc_request_t *R);
  8985. int
  8986. xcb_fill_poly_sizeof (const void *_buffer,
  8987. uint32_t points_len);
  8988. /**
  8989. *
  8990. * @param c The connection
  8991. * @return A cookie
  8992. *
  8993. * Delivers a request to the X server.
  8994. *
  8995. * This form can be used only if the request will not cause
  8996. * a reply to be generated. Any returned error will be
  8997. * saved for handling by xcb_request_check().
  8998. */
  8999. xcb_void_cookie_t
  9000. xcb_fill_poly_checked (xcb_connection_t *c,
  9001. xcb_drawable_t drawable,
  9002. xcb_gcontext_t gc,
  9003. uint8_t shape,
  9004. uint8_t coordinate_mode,
  9005. uint32_t points_len,
  9006. const xcb_point_t *points);
  9007. /**
  9008. *
  9009. * @param c The connection
  9010. * @return A cookie
  9011. *
  9012. * Delivers a request to the X server.
  9013. *
  9014. */
  9015. xcb_void_cookie_t
  9016. xcb_fill_poly (xcb_connection_t *c,
  9017. xcb_drawable_t drawable,
  9018. xcb_gcontext_t gc,
  9019. uint8_t shape,
  9020. uint8_t coordinate_mode,
  9021. uint32_t points_len,
  9022. const xcb_point_t *points);
  9023. xcb_point_t *
  9024. xcb_fill_poly_points (const xcb_fill_poly_request_t *R);
  9025. int
  9026. xcb_fill_poly_points_length (const xcb_fill_poly_request_t *R);
  9027. xcb_point_iterator_t
  9028. xcb_fill_poly_points_iterator (const xcb_fill_poly_request_t *R);
  9029. int
  9030. xcb_poly_fill_rectangle_sizeof (const void *_buffer,
  9031. uint32_t rectangles_len);
  9032. /**
  9033. * @brief Fills rectangles
  9034. *
  9035. * @param c The connection
  9036. * @param drawable The drawable (Window or Pixmap) to draw on.
  9037. * @param gc The graphics context to use.
  9038. * \n
  9039. * The following graphics context components are used: function, plane-mask,
  9040. * fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
  9041. * \n
  9042. * The following graphics context mode-dependent components are used:
  9043. * foreground, background, tile, stipple, tile-stipple-x-origin, and
  9044. * tile-stipple-y-origin.
  9045. * @param rectangles_len The number of `xcb_rectangle_t` structures in \a rectangles.
  9046. * @param rectangles The rectangles to fill.
  9047. * @return A cookie
  9048. *
  9049. * Fills the specified rectangle(s) in the order listed in the array. For any
  9050. * given rectangle, each pixel is not drawn more than once. If rectangles
  9051. * intersect, the intersecting pixels are drawn multiple times.
  9052. *
  9053. * This form can be used only if the request will not cause
  9054. * a reply to be generated. Any returned error will be
  9055. * saved for handling by xcb_request_check().
  9056. */
  9057. xcb_void_cookie_t
  9058. xcb_poly_fill_rectangle_checked (xcb_connection_t *c,
  9059. xcb_drawable_t drawable,
  9060. xcb_gcontext_t gc,
  9061. uint32_t rectangles_len,
  9062. const xcb_rectangle_t *rectangles);
  9063. /**
  9064. * @brief Fills rectangles
  9065. *
  9066. * @param c The connection
  9067. * @param drawable The drawable (Window or Pixmap) to draw on.
  9068. * @param gc The graphics context to use.
  9069. * \n
  9070. * The following graphics context components are used: function, plane-mask,
  9071. * fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
  9072. * \n
  9073. * The following graphics context mode-dependent components are used:
  9074. * foreground, background, tile, stipple, tile-stipple-x-origin, and
  9075. * tile-stipple-y-origin.
  9076. * @param rectangles_len The number of `xcb_rectangle_t` structures in \a rectangles.
  9077. * @param rectangles The rectangles to fill.
  9078. * @return A cookie
  9079. *
  9080. * Fills the specified rectangle(s) in the order listed in the array. For any
  9081. * given rectangle, each pixel is not drawn more than once. If rectangles
  9082. * intersect, the intersecting pixels are drawn multiple times.
  9083. *
  9084. */
  9085. xcb_void_cookie_t
  9086. xcb_poly_fill_rectangle (xcb_connection_t *c,
  9087. xcb_drawable_t drawable,
  9088. xcb_gcontext_t gc,
  9089. uint32_t rectangles_len,
  9090. const xcb_rectangle_t *rectangles);
  9091. xcb_rectangle_t *
  9092. xcb_poly_fill_rectangle_rectangles (const xcb_poly_fill_rectangle_request_t *R);
  9093. int
  9094. xcb_poly_fill_rectangle_rectangles_length (const xcb_poly_fill_rectangle_request_t *R);
  9095. xcb_rectangle_iterator_t
  9096. xcb_poly_fill_rectangle_rectangles_iterator (const xcb_poly_fill_rectangle_request_t *R);
  9097. int
  9098. xcb_poly_fill_arc_sizeof (const void *_buffer,
  9099. uint32_t arcs_len);
  9100. /**
  9101. *
  9102. * @param c The connection
  9103. * @return A cookie
  9104. *
  9105. * Delivers a request to the X server.
  9106. *
  9107. * This form can be used only if the request will not cause
  9108. * a reply to be generated. Any returned error will be
  9109. * saved for handling by xcb_request_check().
  9110. */
  9111. xcb_void_cookie_t
  9112. xcb_poly_fill_arc_checked (xcb_connection_t *c,
  9113. xcb_drawable_t drawable,
  9114. xcb_gcontext_t gc,
  9115. uint32_t arcs_len,
  9116. const xcb_arc_t *arcs);
  9117. /**
  9118. *
  9119. * @param c The connection
  9120. * @return A cookie
  9121. *
  9122. * Delivers a request to the X server.
  9123. *
  9124. */
  9125. xcb_void_cookie_t
  9126. xcb_poly_fill_arc (xcb_connection_t *c,
  9127. xcb_drawable_t drawable,
  9128. xcb_gcontext_t gc,
  9129. uint32_t arcs_len,
  9130. const xcb_arc_t *arcs);
  9131. xcb_arc_t *
  9132. xcb_poly_fill_arc_arcs (const xcb_poly_fill_arc_request_t *R);
  9133. int
  9134. xcb_poly_fill_arc_arcs_length (const xcb_poly_fill_arc_request_t *R);
  9135. xcb_arc_iterator_t
  9136. xcb_poly_fill_arc_arcs_iterator (const xcb_poly_fill_arc_request_t *R);
  9137. int
  9138. xcb_put_image_sizeof (const void *_buffer,
  9139. uint32_t data_len);
  9140. /**
  9141. *
  9142. * @param c The connection
  9143. * @return A cookie
  9144. *
  9145. * Delivers a request to the X server.
  9146. *
  9147. * This form can be used only if the request will not cause
  9148. * a reply to be generated. Any returned error will be
  9149. * saved for handling by xcb_request_check().
  9150. */
  9151. xcb_void_cookie_t
  9152. xcb_put_image_checked (xcb_connection_t *c,
  9153. uint8_t format,
  9154. xcb_drawable_t drawable,
  9155. xcb_gcontext_t gc,
  9156. uint16_t width,
  9157. uint16_t height,
  9158. int16_t dst_x,
  9159. int16_t dst_y,
  9160. uint8_t left_pad,
  9161. uint8_t depth,
  9162. uint32_t data_len,
  9163. const uint8_t *data);
  9164. /**
  9165. *
  9166. * @param c The connection
  9167. * @return A cookie
  9168. *
  9169. * Delivers a request to the X server.
  9170. *
  9171. */
  9172. xcb_void_cookie_t
  9173. xcb_put_image (xcb_connection_t *c,
  9174. uint8_t format,
  9175. xcb_drawable_t drawable,
  9176. xcb_gcontext_t gc,
  9177. uint16_t width,
  9178. uint16_t height,
  9179. int16_t dst_x,
  9180. int16_t dst_y,
  9181. uint8_t left_pad,
  9182. uint8_t depth,
  9183. uint32_t data_len,
  9184. const uint8_t *data);
  9185. uint8_t *
  9186. xcb_put_image_data (const xcb_put_image_request_t *R);
  9187. int
  9188. xcb_put_image_data_length (const xcb_put_image_request_t *R);
  9189. xcb_generic_iterator_t
  9190. xcb_put_image_data_end (const xcb_put_image_request_t *R);
  9191. int
  9192. xcb_get_image_sizeof (const void *_buffer);
  9193. /**
  9194. *
  9195. * @param c The connection
  9196. * @return A cookie
  9197. *
  9198. * Delivers a request to the X server.
  9199. *
  9200. */
  9201. xcb_get_image_cookie_t
  9202. xcb_get_image (xcb_connection_t *c,
  9203. uint8_t format,
  9204. xcb_drawable_t drawable,
  9205. int16_t x,
  9206. int16_t y,
  9207. uint16_t width,
  9208. uint16_t height,
  9209. uint32_t plane_mask);
  9210. /**
  9211. *
  9212. * @param c The connection
  9213. * @return A cookie
  9214. *
  9215. * Delivers a request to the X server.
  9216. *
  9217. * This form can be used only if the request will cause
  9218. * a reply to be generated. Any returned error will be
  9219. * placed in the event queue.
  9220. */
  9221. xcb_get_image_cookie_t
  9222. xcb_get_image_unchecked (xcb_connection_t *c,
  9223. uint8_t format,
  9224. xcb_drawable_t drawable,
  9225. int16_t x,
  9226. int16_t y,
  9227. uint16_t width,
  9228. uint16_t height,
  9229. uint32_t plane_mask);
  9230. uint8_t *
  9231. xcb_get_image_data (const xcb_get_image_reply_t *R);
  9232. int
  9233. xcb_get_image_data_length (const xcb_get_image_reply_t *R);
  9234. xcb_generic_iterator_t
  9235. xcb_get_image_data_end (const xcb_get_image_reply_t *R);
  9236. /**
  9237. * Return the reply
  9238. * @param c The connection
  9239. * @param cookie The cookie
  9240. * @param e The xcb_generic_error_t supplied
  9241. *
  9242. * Returns the reply of the request asked by
  9243. *
  9244. * The parameter @p e supplied to this function must be NULL if
  9245. * xcb_get_image_unchecked(). is used.
  9246. * Otherwise, it stores the error if any.
  9247. *
  9248. * The returned value must be freed by the caller using free().
  9249. */
  9250. xcb_get_image_reply_t *
  9251. xcb_get_image_reply (xcb_connection_t *c,
  9252. xcb_get_image_cookie_t cookie /**< */,
  9253. xcb_generic_error_t **e);
  9254. int
  9255. xcb_poly_text_8_sizeof (const void *_buffer,
  9256. uint32_t items_len);
  9257. /**
  9258. *
  9259. * @param c The connection
  9260. * @return A cookie
  9261. *
  9262. * Delivers a request to the X server.
  9263. *
  9264. * This form can be used only if the request will not cause
  9265. * a reply to be generated. Any returned error will be
  9266. * saved for handling by xcb_request_check().
  9267. */
  9268. xcb_void_cookie_t
  9269. xcb_poly_text_8_checked (xcb_connection_t *c,
  9270. xcb_drawable_t drawable,
  9271. xcb_gcontext_t gc,
  9272. int16_t x,
  9273. int16_t y,
  9274. uint32_t items_len,
  9275. const uint8_t *items);
  9276. /**
  9277. *
  9278. * @param c The connection
  9279. * @return A cookie
  9280. *
  9281. * Delivers a request to the X server.
  9282. *
  9283. */
  9284. xcb_void_cookie_t
  9285. xcb_poly_text_8 (xcb_connection_t *c,
  9286. xcb_drawable_t drawable,
  9287. xcb_gcontext_t gc,
  9288. int16_t x,
  9289. int16_t y,
  9290. uint32_t items_len,
  9291. const uint8_t *items);
  9292. uint8_t *
  9293. xcb_poly_text_8_items (const xcb_poly_text_8_request_t *R);
  9294. int
  9295. xcb_poly_text_8_items_length (const xcb_poly_text_8_request_t *R);
  9296. xcb_generic_iterator_t
  9297. xcb_poly_text_8_items_end (const xcb_poly_text_8_request_t *R);
  9298. int
  9299. xcb_poly_text_16_sizeof (const void *_buffer,
  9300. uint32_t items_len);
  9301. /**
  9302. *
  9303. * @param c The connection
  9304. * @return A cookie
  9305. *
  9306. * Delivers a request to the X server.
  9307. *
  9308. * This form can be used only if the request will not cause
  9309. * a reply to be generated. Any returned error will be
  9310. * saved for handling by xcb_request_check().
  9311. */
  9312. xcb_void_cookie_t
  9313. xcb_poly_text_16_checked (xcb_connection_t *c,
  9314. xcb_drawable_t drawable,
  9315. xcb_gcontext_t gc,
  9316. int16_t x,
  9317. int16_t y,
  9318. uint32_t items_len,
  9319. const uint8_t *items);
  9320. /**
  9321. *
  9322. * @param c The connection
  9323. * @return A cookie
  9324. *
  9325. * Delivers a request to the X server.
  9326. *
  9327. */
  9328. xcb_void_cookie_t
  9329. xcb_poly_text_16 (xcb_connection_t *c,
  9330. xcb_drawable_t drawable,
  9331. xcb_gcontext_t gc,
  9332. int16_t x,
  9333. int16_t y,
  9334. uint32_t items_len,
  9335. const uint8_t *items);
  9336. uint8_t *
  9337. xcb_poly_text_16_items (const xcb_poly_text_16_request_t *R);
  9338. int
  9339. xcb_poly_text_16_items_length (const xcb_poly_text_16_request_t *R);
  9340. xcb_generic_iterator_t
  9341. xcb_poly_text_16_items_end (const xcb_poly_text_16_request_t *R);
  9342. int
  9343. xcb_image_text_8_sizeof (const void *_buffer);
  9344. /**
  9345. * @brief Draws text
  9346. *
  9347. * @param c The connection
  9348. * @param string_len The length of the \a string. Note that this parameter limited by 255 due to
  9349. * using 8 bits!
  9350. * @param drawable The drawable (Window or Pixmap) to draw text on.
  9351. * @param gc The graphics context to use.
  9352. * \n
  9353. * The following graphics context components are used: plane-mask, foreground,
  9354. * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
  9355. * @param x The x coordinate of the first character, relative to the origin of \a drawable.
  9356. * @param y The y coordinate of the first character, relative to the origin of \a drawable.
  9357. * @param string The string to draw. Only the first 255 characters are relevant due to the data
  9358. * type of \a string_len.
  9359. * @return A cookie
  9360. *
  9361. * Fills the destination rectangle with the background pixel from \a gc, then
  9362. * paints the text with the foreground pixel from \a gc. The upper-left corner of
  9363. * the filled rectangle is at [x, y - font-ascent]. The width is overall-width,
  9364. * the height is font-ascent + font-descent. The overall-width, font-ascent and
  9365. * font-descent are as returned by `xcb_query_text_extents` (TODO).
  9366. *
  9367. * Note that using X core fonts is deprecated (but still supported) in favor of
  9368. * client-side rendering using Xft.
  9369. *
  9370. * This form can be used only if the request will not cause
  9371. * a reply to be generated. Any returned error will be
  9372. * saved for handling by xcb_request_check().
  9373. */
  9374. xcb_void_cookie_t
  9375. xcb_image_text_8_checked (xcb_connection_t *c,
  9376. uint8_t string_len,
  9377. xcb_drawable_t drawable,
  9378. xcb_gcontext_t gc,
  9379. int16_t x,
  9380. int16_t y,
  9381. const char *string);
  9382. /**
  9383. * @brief Draws text
  9384. *
  9385. * @param c The connection
  9386. * @param string_len The length of the \a string. Note that this parameter limited by 255 due to
  9387. * using 8 bits!
  9388. * @param drawable The drawable (Window or Pixmap) to draw text on.
  9389. * @param gc The graphics context to use.
  9390. * \n
  9391. * The following graphics context components are used: plane-mask, foreground,
  9392. * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
  9393. * @param x The x coordinate of the first character, relative to the origin of \a drawable.
  9394. * @param y The y coordinate of the first character, relative to the origin of \a drawable.
  9395. * @param string The string to draw. Only the first 255 characters are relevant due to the data
  9396. * type of \a string_len.
  9397. * @return A cookie
  9398. *
  9399. * Fills the destination rectangle with the background pixel from \a gc, then
  9400. * paints the text with the foreground pixel from \a gc. The upper-left corner of
  9401. * the filled rectangle is at [x, y - font-ascent]. The width is overall-width,
  9402. * the height is font-ascent + font-descent. The overall-width, font-ascent and
  9403. * font-descent are as returned by `xcb_query_text_extents` (TODO).
  9404. *
  9405. * Note that using X core fonts is deprecated (but still supported) in favor of
  9406. * client-side rendering using Xft.
  9407. *
  9408. */
  9409. xcb_void_cookie_t
  9410. xcb_image_text_8 (xcb_connection_t *c,
  9411. uint8_t string_len,
  9412. xcb_drawable_t drawable,
  9413. xcb_gcontext_t gc,
  9414. int16_t x,
  9415. int16_t y,
  9416. const char *string);
  9417. char *
  9418. xcb_image_text_8_string (const xcb_image_text_8_request_t *R);
  9419. int
  9420. xcb_image_text_8_string_length (const xcb_image_text_8_request_t *R);
  9421. xcb_generic_iterator_t
  9422. xcb_image_text_8_string_end (const xcb_image_text_8_request_t *R);
  9423. int
  9424. xcb_image_text_16_sizeof (const void *_buffer);
  9425. /**
  9426. * @brief Draws text
  9427. *
  9428. * @param c The connection
  9429. * @param string_len The length of the \a string in characters. Note that this parameter limited by
  9430. * 255 due to using 8 bits!
  9431. * @param drawable The drawable (Window or Pixmap) to draw text on.
  9432. * @param gc The graphics context to use.
  9433. * \n
  9434. * The following graphics context components are used: plane-mask, foreground,
  9435. * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
  9436. * @param x The x coordinate of the first character, relative to the origin of \a drawable.
  9437. * @param y The y coordinate of the first character, relative to the origin of \a drawable.
  9438. * @param string The string to draw. Only the first 255 characters are relevant due to the data
  9439. * type of \a string_len. Every character uses 2 bytes (hence the 16 in this
  9440. * request's name).
  9441. * @return A cookie
  9442. *
  9443. * Fills the destination rectangle with the background pixel from \a gc, then
  9444. * paints the text with the foreground pixel from \a gc. The upper-left corner of
  9445. * the filled rectangle is at [x, y - font-ascent]. The width is overall-width,
  9446. * the height is font-ascent + font-descent. The overall-width, font-ascent and
  9447. * font-descent are as returned by `xcb_query_text_extents` (TODO).
  9448. *
  9449. * Note that using X core fonts is deprecated (but still supported) in favor of
  9450. * client-side rendering using Xft.
  9451. *
  9452. * This form can be used only if the request will not cause
  9453. * a reply to be generated. Any returned error will be
  9454. * saved for handling by xcb_request_check().
  9455. */
  9456. xcb_void_cookie_t
  9457. xcb_image_text_16_checked (xcb_connection_t *c,
  9458. uint8_t string_len,
  9459. xcb_drawable_t drawable,
  9460. xcb_gcontext_t gc,
  9461. int16_t x,
  9462. int16_t y,
  9463. const xcb_char2b_t *string);
  9464. /**
  9465. * @brief Draws text
  9466. *
  9467. * @param c The connection
  9468. * @param string_len The length of the \a string in characters. Note that this parameter limited by
  9469. * 255 due to using 8 bits!
  9470. * @param drawable The drawable (Window or Pixmap) to draw text on.
  9471. * @param gc The graphics context to use.
  9472. * \n
  9473. * The following graphics context components are used: plane-mask, foreground,
  9474. * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
  9475. * @param x The x coordinate of the first character, relative to the origin of \a drawable.
  9476. * @param y The y coordinate of the first character, relative to the origin of \a drawable.
  9477. * @param string The string to draw. Only the first 255 characters are relevant due to the data
  9478. * type of \a string_len. Every character uses 2 bytes (hence the 16 in this
  9479. * request's name).
  9480. * @return A cookie
  9481. *
  9482. * Fills the destination rectangle with the background pixel from \a gc, then
  9483. * paints the text with the foreground pixel from \a gc. The upper-left corner of
  9484. * the filled rectangle is at [x, y - font-ascent]. The width is overall-width,
  9485. * the height is font-ascent + font-descent. The overall-width, font-ascent and
  9486. * font-descent are as returned by `xcb_query_text_extents` (TODO).
  9487. *
  9488. * Note that using X core fonts is deprecated (but still supported) in favor of
  9489. * client-side rendering using Xft.
  9490. *
  9491. */
  9492. xcb_void_cookie_t
  9493. xcb_image_text_16 (xcb_connection_t *c,
  9494. uint8_t string_len,
  9495. xcb_drawable_t drawable,
  9496. xcb_gcontext_t gc,
  9497. int16_t x,
  9498. int16_t y,
  9499. const xcb_char2b_t *string);
  9500. xcb_char2b_t *
  9501. xcb_image_text_16_string (const xcb_image_text_16_request_t *R);
  9502. int
  9503. xcb_image_text_16_string_length (const xcb_image_text_16_request_t *R);
  9504. xcb_char2b_iterator_t
  9505. xcb_image_text_16_string_iterator (const xcb_image_text_16_request_t *R);
  9506. /**
  9507. *
  9508. * @param c The connection
  9509. * @return A cookie
  9510. *
  9511. * Delivers a request to the X server.
  9512. *
  9513. * This form can be used only if the request will not cause
  9514. * a reply to be generated. Any returned error will be
  9515. * saved for handling by xcb_request_check().
  9516. */
  9517. xcb_void_cookie_t
  9518. xcb_create_colormap_checked (xcb_connection_t *c,
  9519. uint8_t alloc,
  9520. xcb_colormap_t mid,
  9521. xcb_window_t window,
  9522. xcb_visualid_t visual);
  9523. /**
  9524. *
  9525. * @param c The connection
  9526. * @return A cookie
  9527. *
  9528. * Delivers a request to the X server.
  9529. *
  9530. */
  9531. xcb_void_cookie_t
  9532. xcb_create_colormap (xcb_connection_t *c,
  9533. uint8_t alloc,
  9534. xcb_colormap_t mid,
  9535. xcb_window_t window,
  9536. xcb_visualid_t visual);
  9537. /**
  9538. *
  9539. * @param c The connection
  9540. * @return A cookie
  9541. *
  9542. * Delivers a request to the X server.
  9543. *
  9544. * This form can be used only if the request will not cause
  9545. * a reply to be generated. Any returned error will be
  9546. * saved for handling by xcb_request_check().
  9547. */
  9548. xcb_void_cookie_t
  9549. xcb_free_colormap_checked (xcb_connection_t *c,
  9550. xcb_colormap_t cmap);
  9551. /**
  9552. *
  9553. * @param c The connection
  9554. * @return A cookie
  9555. *
  9556. * Delivers a request to the X server.
  9557. *
  9558. */
  9559. xcb_void_cookie_t
  9560. xcb_free_colormap (xcb_connection_t *c,
  9561. xcb_colormap_t cmap);
  9562. /**
  9563. *
  9564. * @param c The connection
  9565. * @return A cookie
  9566. *
  9567. * Delivers a request to the X server.
  9568. *
  9569. * This form can be used only if the request will not cause
  9570. * a reply to be generated. Any returned error will be
  9571. * saved for handling by xcb_request_check().
  9572. */
  9573. xcb_void_cookie_t
  9574. xcb_copy_colormap_and_free_checked (xcb_connection_t *c,
  9575. xcb_colormap_t mid,
  9576. xcb_colormap_t src_cmap);
  9577. /**
  9578. *
  9579. * @param c The connection
  9580. * @return A cookie
  9581. *
  9582. * Delivers a request to the X server.
  9583. *
  9584. */
  9585. xcb_void_cookie_t
  9586. xcb_copy_colormap_and_free (xcb_connection_t *c,
  9587. xcb_colormap_t mid,
  9588. xcb_colormap_t src_cmap);
  9589. /**
  9590. *
  9591. * @param c The connection
  9592. * @return A cookie
  9593. *
  9594. * Delivers a request to the X server.
  9595. *
  9596. * This form can be used only if the request will not cause
  9597. * a reply to be generated. Any returned error will be
  9598. * saved for handling by xcb_request_check().
  9599. */
  9600. xcb_void_cookie_t
  9601. xcb_install_colormap_checked (xcb_connection_t *c,
  9602. xcb_colormap_t cmap);
  9603. /**
  9604. *
  9605. * @param c The connection
  9606. * @return A cookie
  9607. *
  9608. * Delivers a request to the X server.
  9609. *
  9610. */
  9611. xcb_void_cookie_t
  9612. xcb_install_colormap (xcb_connection_t *c,
  9613. xcb_colormap_t cmap);
  9614. /**
  9615. *
  9616. * @param c The connection
  9617. * @return A cookie
  9618. *
  9619. * Delivers a request to the X server.
  9620. *
  9621. * This form can be used only if the request will not cause
  9622. * a reply to be generated. Any returned error will be
  9623. * saved for handling by xcb_request_check().
  9624. */
  9625. xcb_void_cookie_t
  9626. xcb_uninstall_colormap_checked (xcb_connection_t *c,
  9627. xcb_colormap_t cmap);
  9628. /**
  9629. *
  9630. * @param c The connection
  9631. * @return A cookie
  9632. *
  9633. * Delivers a request to the X server.
  9634. *
  9635. */
  9636. xcb_void_cookie_t
  9637. xcb_uninstall_colormap (xcb_connection_t *c,
  9638. xcb_colormap_t cmap);
  9639. int
  9640. xcb_list_installed_colormaps_sizeof (const void *_buffer);
  9641. /**
  9642. *
  9643. * @param c The connection
  9644. * @return A cookie
  9645. *
  9646. * Delivers a request to the X server.
  9647. *
  9648. */
  9649. xcb_list_installed_colormaps_cookie_t
  9650. xcb_list_installed_colormaps (xcb_connection_t *c,
  9651. xcb_window_t window);
  9652. /**
  9653. *
  9654. * @param c The connection
  9655. * @return A cookie
  9656. *
  9657. * Delivers a request to the X server.
  9658. *
  9659. * This form can be used only if the request will cause
  9660. * a reply to be generated. Any returned error will be
  9661. * placed in the event queue.
  9662. */
  9663. xcb_list_installed_colormaps_cookie_t
  9664. xcb_list_installed_colormaps_unchecked (xcb_connection_t *c,
  9665. xcb_window_t window);
  9666. xcb_colormap_t *
  9667. xcb_list_installed_colormaps_cmaps (const xcb_list_installed_colormaps_reply_t *R);
  9668. int
  9669. xcb_list_installed_colormaps_cmaps_length (const xcb_list_installed_colormaps_reply_t *R);
  9670. xcb_generic_iterator_t
  9671. xcb_list_installed_colormaps_cmaps_end (const xcb_list_installed_colormaps_reply_t *R);
  9672. /**
  9673. * Return the reply
  9674. * @param c The connection
  9675. * @param cookie The cookie
  9676. * @param e The xcb_generic_error_t supplied
  9677. *
  9678. * Returns the reply of the request asked by
  9679. *
  9680. * The parameter @p e supplied to this function must be NULL if
  9681. * xcb_list_installed_colormaps_unchecked(). is used.
  9682. * Otherwise, it stores the error if any.
  9683. *
  9684. * The returned value must be freed by the caller using free().
  9685. */
  9686. xcb_list_installed_colormaps_reply_t *
  9687. xcb_list_installed_colormaps_reply (xcb_connection_t *c,
  9688. xcb_list_installed_colormaps_cookie_t cookie /**< */,
  9689. xcb_generic_error_t **e);
  9690. /**
  9691. * @brief Allocate a color
  9692. *
  9693. * @param c The connection
  9694. * @param cmap TODO
  9695. * @param red The red value of your color.
  9696. * @param green The green value of your color.
  9697. * @param blue The blue value of your color.
  9698. * @return A cookie
  9699. *
  9700. * Allocates a read-only colormap entry corresponding to the closest RGB value
  9701. * supported by the hardware. If you are using TrueColor, you can take a shortcut
  9702. * and directly calculate the color pixel value to avoid the round trip. But, for
  9703. * example, on 16-bit color setups (VNC), you can easily get the closest supported
  9704. * RGB value to the RGB value you are specifying.
  9705. *
  9706. */
  9707. xcb_alloc_color_cookie_t
  9708. xcb_alloc_color (xcb_connection_t *c,
  9709. xcb_colormap_t cmap,
  9710. uint16_t red,
  9711. uint16_t green,
  9712. uint16_t blue);
  9713. /**
  9714. * @brief Allocate a color
  9715. *
  9716. * @param c The connection
  9717. * @param cmap TODO
  9718. * @param red The red value of your color.
  9719. * @param green The green value of your color.
  9720. * @param blue The blue value of your color.
  9721. * @return A cookie
  9722. *
  9723. * Allocates a read-only colormap entry corresponding to the closest RGB value
  9724. * supported by the hardware. If you are using TrueColor, you can take a shortcut
  9725. * and directly calculate the color pixel value to avoid the round trip. But, for
  9726. * example, on 16-bit color setups (VNC), you can easily get the closest supported
  9727. * RGB value to the RGB value you are specifying.
  9728. *
  9729. * This form can be used only if the request will cause
  9730. * a reply to be generated. Any returned error will be
  9731. * placed in the event queue.
  9732. */
  9733. xcb_alloc_color_cookie_t
  9734. xcb_alloc_color_unchecked (xcb_connection_t *c,
  9735. xcb_colormap_t cmap,
  9736. uint16_t red,
  9737. uint16_t green,
  9738. uint16_t blue);
  9739. /**
  9740. * Return the reply
  9741. * @param c The connection
  9742. * @param cookie The cookie
  9743. * @param e The xcb_generic_error_t supplied
  9744. *
  9745. * Returns the reply of the request asked by
  9746. *
  9747. * The parameter @p e supplied to this function must be NULL if
  9748. * xcb_alloc_color_unchecked(). is used.
  9749. * Otherwise, it stores the error if any.
  9750. *
  9751. * The returned value must be freed by the caller using free().
  9752. */
  9753. xcb_alloc_color_reply_t *
  9754. xcb_alloc_color_reply (xcb_connection_t *c,
  9755. xcb_alloc_color_cookie_t cookie /**< */,
  9756. xcb_generic_error_t **e);
  9757. int
  9758. xcb_alloc_named_color_sizeof (const void *_buffer);
  9759. /**
  9760. *
  9761. * @param c The connection
  9762. * @return A cookie
  9763. *
  9764. * Delivers a request to the X server.
  9765. *
  9766. */
  9767. xcb_alloc_named_color_cookie_t
  9768. xcb_alloc_named_color (xcb_connection_t *c,
  9769. xcb_colormap_t cmap,
  9770. uint16_t name_len,
  9771. const char *name);
  9772. /**
  9773. *
  9774. * @param c The connection
  9775. * @return A cookie
  9776. *
  9777. * Delivers a request to the X server.
  9778. *
  9779. * This form can be used only if the request will cause
  9780. * a reply to be generated. Any returned error will be
  9781. * placed in the event queue.
  9782. */
  9783. xcb_alloc_named_color_cookie_t
  9784. xcb_alloc_named_color_unchecked (xcb_connection_t *c,
  9785. xcb_colormap_t cmap,
  9786. uint16_t name_len,
  9787. const char *name);
  9788. /**
  9789. * Return the reply
  9790. * @param c The connection
  9791. * @param cookie The cookie
  9792. * @param e The xcb_generic_error_t supplied
  9793. *
  9794. * Returns the reply of the request asked by
  9795. *
  9796. * The parameter @p e supplied to this function must be NULL if
  9797. * xcb_alloc_named_color_unchecked(). is used.
  9798. * Otherwise, it stores the error if any.
  9799. *
  9800. * The returned value must be freed by the caller using free().
  9801. */
  9802. xcb_alloc_named_color_reply_t *
  9803. xcb_alloc_named_color_reply (xcb_connection_t *c,
  9804. xcb_alloc_named_color_cookie_t cookie /**< */,
  9805. xcb_generic_error_t **e);
  9806. int
  9807. xcb_alloc_color_cells_sizeof (const void *_buffer);
  9808. /**
  9809. *
  9810. * @param c The connection
  9811. * @return A cookie
  9812. *
  9813. * Delivers a request to the X server.
  9814. *
  9815. */
  9816. xcb_alloc_color_cells_cookie_t
  9817. xcb_alloc_color_cells (xcb_connection_t *c,
  9818. uint8_t contiguous,
  9819. xcb_colormap_t cmap,
  9820. uint16_t colors,
  9821. uint16_t planes);
  9822. /**
  9823. *
  9824. * @param c The connection
  9825. * @return A cookie
  9826. *
  9827. * Delivers a request to the X server.
  9828. *
  9829. * This form can be used only if the request will cause
  9830. * a reply to be generated. Any returned error will be
  9831. * placed in the event queue.
  9832. */
  9833. xcb_alloc_color_cells_cookie_t
  9834. xcb_alloc_color_cells_unchecked (xcb_connection_t *c,
  9835. uint8_t contiguous,
  9836. xcb_colormap_t cmap,
  9837. uint16_t colors,
  9838. uint16_t planes);
  9839. uint32_t *
  9840. xcb_alloc_color_cells_pixels (const xcb_alloc_color_cells_reply_t *R);
  9841. int
  9842. xcb_alloc_color_cells_pixels_length (const xcb_alloc_color_cells_reply_t *R);
  9843. xcb_generic_iterator_t
  9844. xcb_alloc_color_cells_pixels_end (const xcb_alloc_color_cells_reply_t *R);
  9845. uint32_t *
  9846. xcb_alloc_color_cells_masks (const xcb_alloc_color_cells_reply_t *R);
  9847. int
  9848. xcb_alloc_color_cells_masks_length (const xcb_alloc_color_cells_reply_t *R);
  9849. xcb_generic_iterator_t
  9850. xcb_alloc_color_cells_masks_end (const xcb_alloc_color_cells_reply_t *R);
  9851. /**
  9852. * Return the reply
  9853. * @param c The connection
  9854. * @param cookie The cookie
  9855. * @param e The xcb_generic_error_t supplied
  9856. *
  9857. * Returns the reply of the request asked by
  9858. *
  9859. * The parameter @p e supplied to this function must be NULL if
  9860. * xcb_alloc_color_cells_unchecked(). is used.
  9861. * Otherwise, it stores the error if any.
  9862. *
  9863. * The returned value must be freed by the caller using free().
  9864. */
  9865. xcb_alloc_color_cells_reply_t *
  9866. xcb_alloc_color_cells_reply (xcb_connection_t *c,
  9867. xcb_alloc_color_cells_cookie_t cookie /**< */,
  9868. xcb_generic_error_t **e);
  9869. int
  9870. xcb_alloc_color_planes_sizeof (const void *_buffer);
  9871. /**
  9872. *
  9873. * @param c The connection
  9874. * @return A cookie
  9875. *
  9876. * Delivers a request to the X server.
  9877. *
  9878. */
  9879. xcb_alloc_color_planes_cookie_t
  9880. xcb_alloc_color_planes (xcb_connection_t *c,
  9881. uint8_t contiguous,
  9882. xcb_colormap_t cmap,
  9883. uint16_t colors,
  9884. uint16_t reds,
  9885. uint16_t greens,
  9886. uint16_t blues);
  9887. /**
  9888. *
  9889. * @param c The connection
  9890. * @return A cookie
  9891. *
  9892. * Delivers a request to the X server.
  9893. *
  9894. * This form can be used only if the request will cause
  9895. * a reply to be generated. Any returned error will be
  9896. * placed in the event queue.
  9897. */
  9898. xcb_alloc_color_planes_cookie_t
  9899. xcb_alloc_color_planes_unchecked (xcb_connection_t *c,
  9900. uint8_t contiguous,
  9901. xcb_colormap_t cmap,
  9902. uint16_t colors,
  9903. uint16_t reds,
  9904. uint16_t greens,
  9905. uint16_t blues);
  9906. uint32_t *
  9907. xcb_alloc_color_planes_pixels (const xcb_alloc_color_planes_reply_t *R);
  9908. int
  9909. xcb_alloc_color_planes_pixels_length (const xcb_alloc_color_planes_reply_t *R);
  9910. xcb_generic_iterator_t
  9911. xcb_alloc_color_planes_pixels_end (const xcb_alloc_color_planes_reply_t *R);
  9912. /**
  9913. * Return the reply
  9914. * @param c The connection
  9915. * @param cookie The cookie
  9916. * @param e The xcb_generic_error_t supplied
  9917. *
  9918. * Returns the reply of the request asked by
  9919. *
  9920. * The parameter @p e supplied to this function must be NULL if
  9921. * xcb_alloc_color_planes_unchecked(). is used.
  9922. * Otherwise, it stores the error if any.
  9923. *
  9924. * The returned value must be freed by the caller using free().
  9925. */
  9926. xcb_alloc_color_planes_reply_t *
  9927. xcb_alloc_color_planes_reply (xcb_connection_t *c,
  9928. xcb_alloc_color_planes_cookie_t cookie /**< */,
  9929. xcb_generic_error_t **e);
  9930. int
  9931. xcb_free_colors_sizeof (const void *_buffer,
  9932. uint32_t pixels_len);
  9933. /**
  9934. *
  9935. * @param c The connection
  9936. * @return A cookie
  9937. *
  9938. * Delivers a request to the X server.
  9939. *
  9940. * This form can be used only if the request will not cause
  9941. * a reply to be generated. Any returned error will be
  9942. * saved for handling by xcb_request_check().
  9943. */
  9944. xcb_void_cookie_t
  9945. xcb_free_colors_checked (xcb_connection_t *c,
  9946. xcb_colormap_t cmap,
  9947. uint32_t plane_mask,
  9948. uint32_t pixels_len,
  9949. const uint32_t *pixels);
  9950. /**
  9951. *
  9952. * @param c The connection
  9953. * @return A cookie
  9954. *
  9955. * Delivers a request to the X server.
  9956. *
  9957. */
  9958. xcb_void_cookie_t
  9959. xcb_free_colors (xcb_connection_t *c,
  9960. xcb_colormap_t cmap,
  9961. uint32_t plane_mask,
  9962. uint32_t pixels_len,
  9963. const uint32_t *pixels);
  9964. uint32_t *
  9965. xcb_free_colors_pixels (const xcb_free_colors_request_t *R);
  9966. int
  9967. xcb_free_colors_pixels_length (const xcb_free_colors_request_t *R);
  9968. xcb_generic_iterator_t
  9969. xcb_free_colors_pixels_end (const xcb_free_colors_request_t *R);
  9970. /**
  9971. * Get the next element of the iterator
  9972. * @param i Pointer to a xcb_coloritem_iterator_t
  9973. *
  9974. * Get the next element in the iterator. The member rem is
  9975. * decreased by one. The member data points to the next
  9976. * element. The member index is increased by sizeof(xcb_coloritem_t)
  9977. */
  9978. void
  9979. xcb_coloritem_next (xcb_coloritem_iterator_t *i);
  9980. /**
  9981. * Return the iterator pointing to the last element
  9982. * @param i An xcb_coloritem_iterator_t
  9983. * @return The iterator pointing to the last element
  9984. *
  9985. * Set the current element in the iterator to the last element.
  9986. * The member rem is set to 0. The member data points to the
  9987. * last element.
  9988. */
  9989. xcb_generic_iterator_t
  9990. xcb_coloritem_end (xcb_coloritem_iterator_t i);
  9991. int
  9992. xcb_store_colors_sizeof (const void *_buffer,
  9993. uint32_t items_len);
  9994. /**
  9995. *
  9996. * @param c The connection
  9997. * @return A cookie
  9998. *
  9999. * Delivers a request to the X server.
  10000. *
  10001. * This form can be used only if the request will not cause
  10002. * a reply to be generated. Any returned error will be
  10003. * saved for handling by xcb_request_check().
  10004. */
  10005. xcb_void_cookie_t
  10006. xcb_store_colors_checked (xcb_connection_t *c,
  10007. xcb_colormap_t cmap,
  10008. uint32_t items_len,
  10009. const xcb_coloritem_t *items);
  10010. /**
  10011. *
  10012. * @param c The connection
  10013. * @return A cookie
  10014. *
  10015. * Delivers a request to the X server.
  10016. *
  10017. */
  10018. xcb_void_cookie_t
  10019. xcb_store_colors (xcb_connection_t *c,
  10020. xcb_colormap_t cmap,
  10021. uint32_t items_len,
  10022. const xcb_coloritem_t *items);
  10023. xcb_coloritem_t *
  10024. xcb_store_colors_items (const xcb_store_colors_request_t *R);
  10025. int
  10026. xcb_store_colors_items_length (const xcb_store_colors_request_t *R);
  10027. xcb_coloritem_iterator_t
  10028. xcb_store_colors_items_iterator (const xcb_store_colors_request_t *R);
  10029. int
  10030. xcb_store_named_color_sizeof (const void *_buffer);
  10031. /**
  10032. *
  10033. * @param c The connection
  10034. * @return A cookie
  10035. *
  10036. * Delivers a request to the X server.
  10037. *
  10038. * This form can be used only if the request will not cause
  10039. * a reply to be generated. Any returned error will be
  10040. * saved for handling by xcb_request_check().
  10041. */
  10042. xcb_void_cookie_t
  10043. xcb_store_named_color_checked (xcb_connection_t *c,
  10044. uint8_t flags,
  10045. xcb_colormap_t cmap,
  10046. uint32_t pixel,
  10047. uint16_t name_len,
  10048. const char *name);
  10049. /**
  10050. *
  10051. * @param c The connection
  10052. * @return A cookie
  10053. *
  10054. * Delivers a request to the X server.
  10055. *
  10056. */
  10057. xcb_void_cookie_t
  10058. xcb_store_named_color (xcb_connection_t *c,
  10059. uint8_t flags,
  10060. xcb_colormap_t cmap,
  10061. uint32_t pixel,
  10062. uint16_t name_len,
  10063. const char *name);
  10064. char *
  10065. xcb_store_named_color_name (const xcb_store_named_color_request_t *R);
  10066. int
  10067. xcb_store_named_color_name_length (const xcb_store_named_color_request_t *R);
  10068. xcb_generic_iterator_t
  10069. xcb_store_named_color_name_end (const xcb_store_named_color_request_t *R);
  10070. /**
  10071. * Get the next element of the iterator
  10072. * @param i Pointer to a xcb_rgb_iterator_t
  10073. *
  10074. * Get the next element in the iterator. The member rem is
  10075. * decreased by one. The member data points to the next
  10076. * element. The member index is increased by sizeof(xcb_rgb_t)
  10077. */
  10078. void
  10079. xcb_rgb_next (xcb_rgb_iterator_t *i);
  10080. /**
  10081. * Return the iterator pointing to the last element
  10082. * @param i An xcb_rgb_iterator_t
  10083. * @return The iterator pointing to the last element
  10084. *
  10085. * Set the current element in the iterator to the last element.
  10086. * The member rem is set to 0. The member data points to the
  10087. * last element.
  10088. */
  10089. xcb_generic_iterator_t
  10090. xcb_rgb_end (xcb_rgb_iterator_t i);
  10091. int
  10092. xcb_query_colors_sizeof (const void *_buffer,
  10093. uint32_t pixels_len);
  10094. /**
  10095. *
  10096. * @param c The connection
  10097. * @return A cookie
  10098. *
  10099. * Delivers a request to the X server.
  10100. *
  10101. */
  10102. xcb_query_colors_cookie_t
  10103. xcb_query_colors (xcb_connection_t *c,
  10104. xcb_colormap_t cmap,
  10105. uint32_t pixels_len,
  10106. const uint32_t *pixels);
  10107. /**
  10108. *
  10109. * @param c The connection
  10110. * @return A cookie
  10111. *
  10112. * Delivers a request to the X server.
  10113. *
  10114. * This form can be used only if the request will cause
  10115. * a reply to be generated. Any returned error will be
  10116. * placed in the event queue.
  10117. */
  10118. xcb_query_colors_cookie_t
  10119. xcb_query_colors_unchecked (xcb_connection_t *c,
  10120. xcb_colormap_t cmap,
  10121. uint32_t pixels_len,
  10122. const uint32_t *pixels);
  10123. xcb_rgb_t *
  10124. xcb_query_colors_colors (const xcb_query_colors_reply_t *R);
  10125. int
  10126. xcb_query_colors_colors_length (const xcb_query_colors_reply_t *R);
  10127. xcb_rgb_iterator_t
  10128. xcb_query_colors_colors_iterator (const xcb_query_colors_reply_t *R);
  10129. /**
  10130. * Return the reply
  10131. * @param c The connection
  10132. * @param cookie The cookie
  10133. * @param e The xcb_generic_error_t supplied
  10134. *
  10135. * Returns the reply of the request asked by
  10136. *
  10137. * The parameter @p e supplied to this function must be NULL if
  10138. * xcb_query_colors_unchecked(). is used.
  10139. * Otherwise, it stores the error if any.
  10140. *
  10141. * The returned value must be freed by the caller using free().
  10142. */
  10143. xcb_query_colors_reply_t *
  10144. xcb_query_colors_reply (xcb_connection_t *c,
  10145. xcb_query_colors_cookie_t cookie /**< */,
  10146. xcb_generic_error_t **e);
  10147. int
  10148. xcb_lookup_color_sizeof (const void *_buffer);
  10149. /**
  10150. *
  10151. * @param c The connection
  10152. * @return A cookie
  10153. *
  10154. * Delivers a request to the X server.
  10155. *
  10156. */
  10157. xcb_lookup_color_cookie_t
  10158. xcb_lookup_color (xcb_connection_t *c,
  10159. xcb_colormap_t cmap,
  10160. uint16_t name_len,
  10161. const char *name);
  10162. /**
  10163. *
  10164. * @param c The connection
  10165. * @return A cookie
  10166. *
  10167. * Delivers a request to the X server.
  10168. *
  10169. * This form can be used only if the request will cause
  10170. * a reply to be generated. Any returned error will be
  10171. * placed in the event queue.
  10172. */
  10173. xcb_lookup_color_cookie_t
  10174. xcb_lookup_color_unchecked (xcb_connection_t *c,
  10175. xcb_colormap_t cmap,
  10176. uint16_t name_len,
  10177. const char *name);
  10178. /**
  10179. * Return the reply
  10180. * @param c The connection
  10181. * @param cookie The cookie
  10182. * @param e The xcb_generic_error_t supplied
  10183. *
  10184. * Returns the reply of the request asked by
  10185. *
  10186. * The parameter @p e supplied to this function must be NULL if
  10187. * xcb_lookup_color_unchecked(). is used.
  10188. * Otherwise, it stores the error if any.
  10189. *
  10190. * The returned value must be freed by the caller using free().
  10191. */
  10192. xcb_lookup_color_reply_t *
  10193. xcb_lookup_color_reply (xcb_connection_t *c,
  10194. xcb_lookup_color_cookie_t cookie /**< */,
  10195. xcb_generic_error_t **e);
  10196. /**
  10197. *
  10198. * @param c The connection
  10199. * @return A cookie
  10200. *
  10201. * Delivers a request to the X server.
  10202. *
  10203. * This form can be used only if the request will not cause
  10204. * a reply to be generated. Any returned error will be
  10205. * saved for handling by xcb_request_check().
  10206. */
  10207. xcb_void_cookie_t
  10208. xcb_create_cursor_checked (xcb_connection_t *c,
  10209. xcb_cursor_t cid,
  10210. xcb_pixmap_t source,
  10211. xcb_pixmap_t mask,
  10212. uint16_t fore_red,
  10213. uint16_t fore_green,
  10214. uint16_t fore_blue,
  10215. uint16_t back_red,
  10216. uint16_t back_green,
  10217. uint16_t back_blue,
  10218. uint16_t x,
  10219. uint16_t y);
  10220. /**
  10221. *
  10222. * @param c The connection
  10223. * @return A cookie
  10224. *
  10225. * Delivers a request to the X server.
  10226. *
  10227. */
  10228. xcb_void_cookie_t
  10229. xcb_create_cursor (xcb_connection_t *c,
  10230. xcb_cursor_t cid,
  10231. xcb_pixmap_t source,
  10232. xcb_pixmap_t mask,
  10233. uint16_t fore_red,
  10234. uint16_t fore_green,
  10235. uint16_t fore_blue,
  10236. uint16_t back_red,
  10237. uint16_t back_green,
  10238. uint16_t back_blue,
  10239. uint16_t x,
  10240. uint16_t y);
  10241. /**
  10242. * @brief create cursor
  10243. *
  10244. * @param c The connection
  10245. * @param cid The ID with which you will refer to the cursor, created by `xcb_generate_id`.
  10246. * @param source_font In which font to look for the cursor glyph.
  10247. * @param mask_font In which font to look for the mask glyph.
  10248. * @param source_char The glyph of \a source_font to use.
  10249. * @param mask_char The glyph of \a mask_font to use as a mask: Pixels which are set to 1 define
  10250. * which source pixels are displayed. All pixels which are set to 0 are not
  10251. * displayed.
  10252. * @param fore_red The red value of the foreground color.
  10253. * @param fore_green The green value of the foreground color.
  10254. * @param fore_blue The blue value of the foreground color.
  10255. * @param back_red The red value of the background color.
  10256. * @param back_green The green value of the background color.
  10257. * @param back_blue The blue value of the background color.
  10258. * @return A cookie
  10259. *
  10260. * Creates a cursor from a font glyph. X provides a set of standard cursor shapes
  10261. * in a special font named cursor. Applications are encouraged to use this
  10262. * interface for their cursors because the font can be customized for the
  10263. * individual display type.
  10264. *
  10265. * All pixels which are set to 1 in the source will use the foreground color (as
  10266. * specified by \a fore_red, \a fore_green and \a fore_blue). All pixels set to 0
  10267. * will use the background color (as specified by \a back_red, \a back_green and
  10268. * \a back_blue).
  10269. *
  10270. * This form can be used only if the request will not cause
  10271. * a reply to be generated. Any returned error will be
  10272. * saved for handling by xcb_request_check().
  10273. */
  10274. xcb_void_cookie_t
  10275. xcb_create_glyph_cursor_checked (xcb_connection_t *c,
  10276. xcb_cursor_t cid,
  10277. xcb_font_t source_font,
  10278. xcb_font_t mask_font,
  10279. uint16_t source_char,
  10280. uint16_t mask_char,
  10281. uint16_t fore_red,
  10282. uint16_t fore_green,
  10283. uint16_t fore_blue,
  10284. uint16_t back_red,
  10285. uint16_t back_green,
  10286. uint16_t back_blue);
  10287. /**
  10288. * @brief create cursor
  10289. *
  10290. * @param c The connection
  10291. * @param cid The ID with which you will refer to the cursor, created by `xcb_generate_id`.
  10292. * @param source_font In which font to look for the cursor glyph.
  10293. * @param mask_font In which font to look for the mask glyph.
  10294. * @param source_char The glyph of \a source_font to use.
  10295. * @param mask_char The glyph of \a mask_font to use as a mask: Pixels which are set to 1 define
  10296. * which source pixels are displayed. All pixels which are set to 0 are not
  10297. * displayed.
  10298. * @param fore_red The red value of the foreground color.
  10299. * @param fore_green The green value of the foreground color.
  10300. * @param fore_blue The blue value of the foreground color.
  10301. * @param back_red The red value of the background color.
  10302. * @param back_green The green value of the background color.
  10303. * @param back_blue The blue value of the background color.
  10304. * @return A cookie
  10305. *
  10306. * Creates a cursor from a font glyph. X provides a set of standard cursor shapes
  10307. * in a special font named cursor. Applications are encouraged to use this
  10308. * interface for their cursors because the font can be customized for the
  10309. * individual display type.
  10310. *
  10311. * All pixels which are set to 1 in the source will use the foreground color (as
  10312. * specified by \a fore_red, \a fore_green and \a fore_blue). All pixels set to 0
  10313. * will use the background color (as specified by \a back_red, \a back_green and
  10314. * \a back_blue).
  10315. *
  10316. */
  10317. xcb_void_cookie_t
  10318. xcb_create_glyph_cursor (xcb_connection_t *c,
  10319. xcb_cursor_t cid,
  10320. xcb_font_t source_font,
  10321. xcb_font_t mask_font,
  10322. uint16_t source_char,
  10323. uint16_t mask_char,
  10324. uint16_t fore_red,
  10325. uint16_t fore_green,
  10326. uint16_t fore_blue,
  10327. uint16_t back_red,
  10328. uint16_t back_green,
  10329. uint16_t back_blue);
  10330. /**
  10331. * @brief Deletes a cursor
  10332. *
  10333. * @param c The connection
  10334. * @param cursor The cursor to destroy.
  10335. * @return A cookie
  10336. *
  10337. * Deletes the association between the cursor resource ID and the specified
  10338. * cursor. The cursor is freed when no other resource references it.
  10339. *
  10340. * This form can be used only if the request will not cause
  10341. * a reply to be generated. Any returned error will be
  10342. * saved for handling by xcb_request_check().
  10343. */
  10344. xcb_void_cookie_t
  10345. xcb_free_cursor_checked (xcb_connection_t *c,
  10346. xcb_cursor_t cursor);
  10347. /**
  10348. * @brief Deletes a cursor
  10349. *
  10350. * @param c The connection
  10351. * @param cursor The cursor to destroy.
  10352. * @return A cookie
  10353. *
  10354. * Deletes the association between the cursor resource ID and the specified
  10355. * cursor. The cursor is freed when no other resource references it.
  10356. *
  10357. */
  10358. xcb_void_cookie_t
  10359. xcb_free_cursor (xcb_connection_t *c,
  10360. xcb_cursor_t cursor);
  10361. /**
  10362. *
  10363. * @param c The connection
  10364. * @return A cookie
  10365. *
  10366. * Delivers a request to the X server.
  10367. *
  10368. * This form can be used only if the request will not cause
  10369. * a reply to be generated. Any returned error will be
  10370. * saved for handling by xcb_request_check().
  10371. */
  10372. xcb_void_cookie_t
  10373. xcb_recolor_cursor_checked (xcb_connection_t *c,
  10374. xcb_cursor_t cursor,
  10375. uint16_t fore_red,
  10376. uint16_t fore_green,
  10377. uint16_t fore_blue,
  10378. uint16_t back_red,
  10379. uint16_t back_green,
  10380. uint16_t back_blue);
  10381. /**
  10382. *
  10383. * @param c The connection
  10384. * @return A cookie
  10385. *
  10386. * Delivers a request to the X server.
  10387. *
  10388. */
  10389. xcb_void_cookie_t
  10390. xcb_recolor_cursor (xcb_connection_t *c,
  10391. xcb_cursor_t cursor,
  10392. uint16_t fore_red,
  10393. uint16_t fore_green,
  10394. uint16_t fore_blue,
  10395. uint16_t back_red,
  10396. uint16_t back_green,
  10397. uint16_t back_blue);
  10398. /**
  10399. *
  10400. * @param c The connection
  10401. * @return A cookie
  10402. *
  10403. * Delivers a request to the X server.
  10404. *
  10405. */
  10406. xcb_query_best_size_cookie_t
  10407. xcb_query_best_size (xcb_connection_t *c,
  10408. uint8_t _class,
  10409. xcb_drawable_t drawable,
  10410. uint16_t width,
  10411. uint16_t height);
  10412. /**
  10413. *
  10414. * @param c The connection
  10415. * @return A cookie
  10416. *
  10417. * Delivers a request to the X server.
  10418. *
  10419. * This form can be used only if the request will cause
  10420. * a reply to be generated. Any returned error will be
  10421. * placed in the event queue.
  10422. */
  10423. xcb_query_best_size_cookie_t
  10424. xcb_query_best_size_unchecked (xcb_connection_t *c,
  10425. uint8_t _class,
  10426. xcb_drawable_t drawable,
  10427. uint16_t width,
  10428. uint16_t height);
  10429. /**
  10430. * Return the reply
  10431. * @param c The connection
  10432. * @param cookie The cookie
  10433. * @param e The xcb_generic_error_t supplied
  10434. *
  10435. * Returns the reply of the request asked by
  10436. *
  10437. * The parameter @p e supplied to this function must be NULL if
  10438. * xcb_query_best_size_unchecked(). is used.
  10439. * Otherwise, it stores the error if any.
  10440. *
  10441. * The returned value must be freed by the caller using free().
  10442. */
  10443. xcb_query_best_size_reply_t *
  10444. xcb_query_best_size_reply (xcb_connection_t *c,
  10445. xcb_query_best_size_cookie_t cookie /**< */,
  10446. xcb_generic_error_t **e);
  10447. int
  10448. xcb_query_extension_sizeof (const void *_buffer);
  10449. /**
  10450. * @brief check if extension is present
  10451. *
  10452. * @param c The connection
  10453. * @param name_len The length of \a name in bytes.
  10454. * @param name The name of the extension to query, for example "RANDR". This is case
  10455. * sensitive!
  10456. * @return A cookie
  10457. *
  10458. * Determines if the specified extension is present on this X11 server.
  10459. *
  10460. * Every extension has a unique `major_opcode` to identify requests, the minor
  10461. * opcodes and request formats are extension-specific. If the extension provides
  10462. * events and errors, the `first_event` and `first_error` fields in the reply are
  10463. * set accordingly.
  10464. *
  10465. * There should rarely be a need to use this request directly, XCB provides the
  10466. * `xcb_get_extension_data` function instead.
  10467. *
  10468. */
  10469. xcb_query_extension_cookie_t
  10470. xcb_query_extension (xcb_connection_t *c,
  10471. uint16_t name_len,
  10472. const char *name);
  10473. /**
  10474. * @brief check if extension is present
  10475. *
  10476. * @param c The connection
  10477. * @param name_len The length of \a name in bytes.
  10478. * @param name The name of the extension to query, for example "RANDR". This is case
  10479. * sensitive!
  10480. * @return A cookie
  10481. *
  10482. * Determines if the specified extension is present on this X11 server.
  10483. *
  10484. * Every extension has a unique `major_opcode` to identify requests, the minor
  10485. * opcodes and request formats are extension-specific. If the extension provides
  10486. * events and errors, the `first_event` and `first_error` fields in the reply are
  10487. * set accordingly.
  10488. *
  10489. * There should rarely be a need to use this request directly, XCB provides the
  10490. * `xcb_get_extension_data` function instead.
  10491. *
  10492. * This form can be used only if the request will cause
  10493. * a reply to be generated. Any returned error will be
  10494. * placed in the event queue.
  10495. */
  10496. xcb_query_extension_cookie_t
  10497. xcb_query_extension_unchecked (xcb_connection_t *c,
  10498. uint16_t name_len,
  10499. const char *name);
  10500. /**
  10501. * Return the reply
  10502. * @param c The connection
  10503. * @param cookie The cookie
  10504. * @param e The xcb_generic_error_t supplied
  10505. *
  10506. * Returns the reply of the request asked by
  10507. *
  10508. * The parameter @p e supplied to this function must be NULL if
  10509. * xcb_query_extension_unchecked(). is used.
  10510. * Otherwise, it stores the error if any.
  10511. *
  10512. * The returned value must be freed by the caller using free().
  10513. */
  10514. xcb_query_extension_reply_t *
  10515. xcb_query_extension_reply (xcb_connection_t *c,
  10516. xcb_query_extension_cookie_t cookie /**< */,
  10517. xcb_generic_error_t **e);
  10518. int
  10519. xcb_list_extensions_sizeof (const void *_buffer);
  10520. /**
  10521. *
  10522. * @param c The connection
  10523. * @return A cookie
  10524. *
  10525. * Delivers a request to the X server.
  10526. *
  10527. */
  10528. xcb_list_extensions_cookie_t
  10529. xcb_list_extensions (xcb_connection_t *c);
  10530. /**
  10531. *
  10532. * @param c The connection
  10533. * @return A cookie
  10534. *
  10535. * Delivers a request to the X server.
  10536. *
  10537. * This form can be used only if the request will cause
  10538. * a reply to be generated. Any returned error will be
  10539. * placed in the event queue.
  10540. */
  10541. xcb_list_extensions_cookie_t
  10542. xcb_list_extensions_unchecked (xcb_connection_t *c);
  10543. int
  10544. xcb_list_extensions_names_length (const xcb_list_extensions_reply_t *R);
  10545. xcb_str_iterator_t
  10546. xcb_list_extensions_names_iterator (const xcb_list_extensions_reply_t *R);
  10547. /**
  10548. * Return the reply
  10549. * @param c The connection
  10550. * @param cookie The cookie
  10551. * @param e The xcb_generic_error_t supplied
  10552. *
  10553. * Returns the reply of the request asked by
  10554. *
  10555. * The parameter @p e supplied to this function must be NULL if
  10556. * xcb_list_extensions_unchecked(). is used.
  10557. * Otherwise, it stores the error if any.
  10558. *
  10559. * The returned value must be freed by the caller using free().
  10560. */
  10561. xcb_list_extensions_reply_t *
  10562. xcb_list_extensions_reply (xcb_connection_t *c,
  10563. xcb_list_extensions_cookie_t cookie /**< */,
  10564. xcb_generic_error_t **e);
  10565. int
  10566. xcb_change_keyboard_mapping_sizeof (const void *_buffer);
  10567. /**
  10568. *
  10569. * @param c The connection
  10570. * @return A cookie
  10571. *
  10572. * Delivers a request to the X server.
  10573. *
  10574. * This form can be used only if the request will not cause
  10575. * a reply to be generated. Any returned error will be
  10576. * saved for handling by xcb_request_check().
  10577. */
  10578. xcb_void_cookie_t
  10579. xcb_change_keyboard_mapping_checked (xcb_connection_t *c,
  10580. uint8_t keycode_count,
  10581. xcb_keycode_t first_keycode,
  10582. uint8_t keysyms_per_keycode,
  10583. const xcb_keysym_t *keysyms);
  10584. /**
  10585. *
  10586. * @param c The connection
  10587. * @return A cookie
  10588. *
  10589. * Delivers a request to the X server.
  10590. *
  10591. */
  10592. xcb_void_cookie_t
  10593. xcb_change_keyboard_mapping (xcb_connection_t *c,
  10594. uint8_t keycode_count,
  10595. xcb_keycode_t first_keycode,
  10596. uint8_t keysyms_per_keycode,
  10597. const xcb_keysym_t *keysyms);
  10598. xcb_keysym_t *
  10599. xcb_change_keyboard_mapping_keysyms (const xcb_change_keyboard_mapping_request_t *R);
  10600. int
  10601. xcb_change_keyboard_mapping_keysyms_length (const xcb_change_keyboard_mapping_request_t *R);
  10602. xcb_generic_iterator_t
  10603. xcb_change_keyboard_mapping_keysyms_end (const xcb_change_keyboard_mapping_request_t *R);
  10604. int
  10605. xcb_get_keyboard_mapping_sizeof (const void *_buffer);
  10606. /**
  10607. *
  10608. * @param c The connection
  10609. * @return A cookie
  10610. *
  10611. * Delivers a request to the X server.
  10612. *
  10613. */
  10614. xcb_get_keyboard_mapping_cookie_t
  10615. xcb_get_keyboard_mapping (xcb_connection_t *c,
  10616. xcb_keycode_t first_keycode,
  10617. uint8_t count);
  10618. /**
  10619. *
  10620. * @param c The connection
  10621. * @return A cookie
  10622. *
  10623. * Delivers a request to the X server.
  10624. *
  10625. * This form can be used only if the request will cause
  10626. * a reply to be generated. Any returned error will be
  10627. * placed in the event queue.
  10628. */
  10629. xcb_get_keyboard_mapping_cookie_t
  10630. xcb_get_keyboard_mapping_unchecked (xcb_connection_t *c,
  10631. xcb_keycode_t first_keycode,
  10632. uint8_t count);
  10633. xcb_keysym_t *
  10634. xcb_get_keyboard_mapping_keysyms (const xcb_get_keyboard_mapping_reply_t *R);
  10635. int
  10636. xcb_get_keyboard_mapping_keysyms_length (const xcb_get_keyboard_mapping_reply_t *R);
  10637. xcb_generic_iterator_t
  10638. xcb_get_keyboard_mapping_keysyms_end (const xcb_get_keyboard_mapping_reply_t *R);
  10639. /**
  10640. * Return the reply
  10641. * @param c The connection
  10642. * @param cookie The cookie
  10643. * @param e The xcb_generic_error_t supplied
  10644. *
  10645. * Returns the reply of the request asked by
  10646. *
  10647. * The parameter @p e supplied to this function must be NULL if
  10648. * xcb_get_keyboard_mapping_unchecked(). is used.
  10649. * Otherwise, it stores the error if any.
  10650. *
  10651. * The returned value must be freed by the caller using free().
  10652. */
  10653. xcb_get_keyboard_mapping_reply_t *
  10654. xcb_get_keyboard_mapping_reply (xcb_connection_t *c,
  10655. xcb_get_keyboard_mapping_cookie_t cookie /**< */,
  10656. xcb_generic_error_t **e);
  10657. int
  10658. xcb_change_keyboard_control_value_list_serialize (void **_buffer,
  10659. uint32_t value_mask,
  10660. const xcb_change_keyboard_control_value_list_t *_aux);
  10661. int
  10662. xcb_change_keyboard_control_value_list_unpack (const void *_buffer,
  10663. uint32_t value_mask,
  10664. xcb_change_keyboard_control_value_list_t *_aux);
  10665. int
  10666. xcb_change_keyboard_control_value_list_sizeof (const void *_buffer,
  10667. uint32_t value_mask);
  10668. int
  10669. xcb_change_keyboard_control_sizeof (const void *_buffer);
  10670. /**
  10671. *
  10672. * @param c The connection
  10673. * @return A cookie
  10674. *
  10675. * Delivers a request to the X server.
  10676. *
  10677. * This form can be used only if the request will not cause
  10678. * a reply to be generated. Any returned error will be
  10679. * saved for handling by xcb_request_check().
  10680. */
  10681. xcb_void_cookie_t
  10682. xcb_change_keyboard_control_checked (xcb_connection_t *c,
  10683. uint32_t value_mask,
  10684. const void *value_list);
  10685. /**
  10686. *
  10687. * @param c The connection
  10688. * @return A cookie
  10689. *
  10690. * Delivers a request to the X server.
  10691. *
  10692. */
  10693. xcb_void_cookie_t
  10694. xcb_change_keyboard_control (xcb_connection_t *c,
  10695. uint32_t value_mask,
  10696. const void *value_list);
  10697. /**
  10698. *
  10699. * @param c The connection
  10700. * @return A cookie
  10701. *
  10702. * Delivers a request to the X server.
  10703. *
  10704. * This form can be used only if the request will not cause
  10705. * a reply to be generated. Any returned error will be
  10706. * saved for handling by xcb_request_check().
  10707. */
  10708. xcb_void_cookie_t
  10709. xcb_change_keyboard_control_aux_checked (xcb_connection_t *c,
  10710. uint32_t value_mask,
  10711. const xcb_change_keyboard_control_value_list_t *value_list);
  10712. /**
  10713. *
  10714. * @param c The connection
  10715. * @return A cookie
  10716. *
  10717. * Delivers a request to the X server.
  10718. *
  10719. */
  10720. xcb_void_cookie_t
  10721. xcb_change_keyboard_control_aux (xcb_connection_t *c,
  10722. uint32_t value_mask,
  10723. const xcb_change_keyboard_control_value_list_t *value_list);
  10724. void *
  10725. xcb_change_keyboard_control_value_list (const xcb_change_keyboard_control_request_t *R);
  10726. /**
  10727. *
  10728. * @param c The connection
  10729. * @return A cookie
  10730. *
  10731. * Delivers a request to the X server.
  10732. *
  10733. */
  10734. xcb_get_keyboard_control_cookie_t
  10735. xcb_get_keyboard_control (xcb_connection_t *c);
  10736. /**
  10737. *
  10738. * @param c The connection
  10739. * @return A cookie
  10740. *
  10741. * Delivers a request to the X server.
  10742. *
  10743. * This form can be used only if the request will cause
  10744. * a reply to be generated. Any returned error will be
  10745. * placed in the event queue.
  10746. */
  10747. xcb_get_keyboard_control_cookie_t
  10748. xcb_get_keyboard_control_unchecked (xcb_connection_t *c);
  10749. /**
  10750. * Return the reply
  10751. * @param c The connection
  10752. * @param cookie The cookie
  10753. * @param e The xcb_generic_error_t supplied
  10754. *
  10755. * Returns the reply of the request asked by
  10756. *
  10757. * The parameter @p e supplied to this function must be NULL if
  10758. * xcb_get_keyboard_control_unchecked(). is used.
  10759. * Otherwise, it stores the error if any.
  10760. *
  10761. * The returned value must be freed by the caller using free().
  10762. */
  10763. xcb_get_keyboard_control_reply_t *
  10764. xcb_get_keyboard_control_reply (xcb_connection_t *c,
  10765. xcb_get_keyboard_control_cookie_t cookie /**< */,
  10766. xcb_generic_error_t **e);
  10767. /**
  10768. *
  10769. * @param c The connection
  10770. * @return A cookie
  10771. *
  10772. * Delivers a request to the X server.
  10773. *
  10774. * This form can be used only if the request will not cause
  10775. * a reply to be generated. Any returned error will be
  10776. * saved for handling by xcb_request_check().
  10777. */
  10778. xcb_void_cookie_t
  10779. xcb_bell_checked (xcb_connection_t *c,
  10780. int8_t percent);
  10781. /**
  10782. *
  10783. * @param c The connection
  10784. * @return A cookie
  10785. *
  10786. * Delivers a request to the X server.
  10787. *
  10788. */
  10789. xcb_void_cookie_t
  10790. xcb_bell (xcb_connection_t *c,
  10791. int8_t percent);
  10792. /**
  10793. *
  10794. * @param c The connection
  10795. * @return A cookie
  10796. *
  10797. * Delivers a request to the X server.
  10798. *
  10799. * This form can be used only if the request will not cause
  10800. * a reply to be generated. Any returned error will be
  10801. * saved for handling by xcb_request_check().
  10802. */
  10803. xcb_void_cookie_t
  10804. xcb_change_pointer_control_checked (xcb_connection_t *c,
  10805. int16_t acceleration_numerator,
  10806. int16_t acceleration_denominator,
  10807. int16_t threshold,
  10808. uint8_t do_acceleration,
  10809. uint8_t do_threshold);
  10810. /**
  10811. *
  10812. * @param c The connection
  10813. * @return A cookie
  10814. *
  10815. * Delivers a request to the X server.
  10816. *
  10817. */
  10818. xcb_void_cookie_t
  10819. xcb_change_pointer_control (xcb_connection_t *c,
  10820. int16_t acceleration_numerator,
  10821. int16_t acceleration_denominator,
  10822. int16_t threshold,
  10823. uint8_t do_acceleration,
  10824. uint8_t do_threshold);
  10825. /**
  10826. *
  10827. * @param c The connection
  10828. * @return A cookie
  10829. *
  10830. * Delivers a request to the X server.
  10831. *
  10832. */
  10833. xcb_get_pointer_control_cookie_t
  10834. xcb_get_pointer_control (xcb_connection_t *c);
  10835. /**
  10836. *
  10837. * @param c The connection
  10838. * @return A cookie
  10839. *
  10840. * Delivers a request to the X server.
  10841. *
  10842. * This form can be used only if the request will cause
  10843. * a reply to be generated. Any returned error will be
  10844. * placed in the event queue.
  10845. */
  10846. xcb_get_pointer_control_cookie_t
  10847. xcb_get_pointer_control_unchecked (xcb_connection_t *c);
  10848. /**
  10849. * Return the reply
  10850. * @param c The connection
  10851. * @param cookie The cookie
  10852. * @param e The xcb_generic_error_t supplied
  10853. *
  10854. * Returns the reply of the request asked by
  10855. *
  10856. * The parameter @p e supplied to this function must be NULL if
  10857. * xcb_get_pointer_control_unchecked(). is used.
  10858. * Otherwise, it stores the error if any.
  10859. *
  10860. * The returned value must be freed by the caller using free().
  10861. */
  10862. xcb_get_pointer_control_reply_t *
  10863. xcb_get_pointer_control_reply (xcb_connection_t *c,
  10864. xcb_get_pointer_control_cookie_t cookie /**< */,
  10865. xcb_generic_error_t **e);
  10866. /**
  10867. *
  10868. * @param c The connection
  10869. * @return A cookie
  10870. *
  10871. * Delivers a request to the X server.
  10872. *
  10873. * This form can be used only if the request will not cause
  10874. * a reply to be generated. Any returned error will be
  10875. * saved for handling by xcb_request_check().
  10876. */
  10877. xcb_void_cookie_t
  10878. xcb_set_screen_saver_checked (xcb_connection_t *c,
  10879. int16_t timeout,
  10880. int16_t interval,
  10881. uint8_t prefer_blanking,
  10882. uint8_t allow_exposures);
  10883. /**
  10884. *
  10885. * @param c The connection
  10886. * @return A cookie
  10887. *
  10888. * Delivers a request to the X server.
  10889. *
  10890. */
  10891. xcb_void_cookie_t
  10892. xcb_set_screen_saver (xcb_connection_t *c,
  10893. int16_t timeout,
  10894. int16_t interval,
  10895. uint8_t prefer_blanking,
  10896. uint8_t allow_exposures);
  10897. /**
  10898. *
  10899. * @param c The connection
  10900. * @return A cookie
  10901. *
  10902. * Delivers a request to the X server.
  10903. *
  10904. */
  10905. xcb_get_screen_saver_cookie_t
  10906. xcb_get_screen_saver (xcb_connection_t *c);
  10907. /**
  10908. *
  10909. * @param c The connection
  10910. * @return A cookie
  10911. *
  10912. * Delivers a request to the X server.
  10913. *
  10914. * This form can be used only if the request will cause
  10915. * a reply to be generated. Any returned error will be
  10916. * placed in the event queue.
  10917. */
  10918. xcb_get_screen_saver_cookie_t
  10919. xcb_get_screen_saver_unchecked (xcb_connection_t *c);
  10920. /**
  10921. * Return the reply
  10922. * @param c The connection
  10923. * @param cookie The cookie
  10924. * @param e The xcb_generic_error_t supplied
  10925. *
  10926. * Returns the reply of the request asked by
  10927. *
  10928. * The parameter @p e supplied to this function must be NULL if
  10929. * xcb_get_screen_saver_unchecked(). is used.
  10930. * Otherwise, it stores the error if any.
  10931. *
  10932. * The returned value must be freed by the caller using free().
  10933. */
  10934. xcb_get_screen_saver_reply_t *
  10935. xcb_get_screen_saver_reply (xcb_connection_t *c,
  10936. xcb_get_screen_saver_cookie_t cookie /**< */,
  10937. xcb_generic_error_t **e);
  10938. int
  10939. xcb_change_hosts_sizeof (const void *_buffer);
  10940. /**
  10941. *
  10942. * @param c The connection
  10943. * @return A cookie
  10944. *
  10945. * Delivers a request to the X server.
  10946. *
  10947. * This form can be used only if the request will not cause
  10948. * a reply to be generated. Any returned error will be
  10949. * saved for handling by xcb_request_check().
  10950. */
  10951. xcb_void_cookie_t
  10952. xcb_change_hosts_checked (xcb_connection_t *c,
  10953. uint8_t mode,
  10954. uint8_t family,
  10955. uint16_t address_len,
  10956. const uint8_t *address);
  10957. /**
  10958. *
  10959. * @param c The connection
  10960. * @return A cookie
  10961. *
  10962. * Delivers a request to the X server.
  10963. *
  10964. */
  10965. xcb_void_cookie_t
  10966. xcb_change_hosts (xcb_connection_t *c,
  10967. uint8_t mode,
  10968. uint8_t family,
  10969. uint16_t address_len,
  10970. const uint8_t *address);
  10971. uint8_t *
  10972. xcb_change_hosts_address (const xcb_change_hosts_request_t *R);
  10973. int
  10974. xcb_change_hosts_address_length (const xcb_change_hosts_request_t *R);
  10975. xcb_generic_iterator_t
  10976. xcb_change_hosts_address_end (const xcb_change_hosts_request_t *R);
  10977. int
  10978. xcb_host_sizeof (const void *_buffer);
  10979. uint8_t *
  10980. xcb_host_address (const xcb_host_t *R);
  10981. int
  10982. xcb_host_address_length (const xcb_host_t *R);
  10983. xcb_generic_iterator_t
  10984. xcb_host_address_end (const xcb_host_t *R);
  10985. /**
  10986. * Get the next element of the iterator
  10987. * @param i Pointer to a xcb_host_iterator_t
  10988. *
  10989. * Get the next element in the iterator. The member rem is
  10990. * decreased by one. The member data points to the next
  10991. * element. The member index is increased by sizeof(xcb_host_t)
  10992. */
  10993. void
  10994. xcb_host_next (xcb_host_iterator_t *i);
  10995. /**
  10996. * Return the iterator pointing to the last element
  10997. * @param i An xcb_host_iterator_t
  10998. * @return The iterator pointing to the last element
  10999. *
  11000. * Set the current element in the iterator to the last element.
  11001. * The member rem is set to 0. The member data points to the
  11002. * last element.
  11003. */
  11004. xcb_generic_iterator_t
  11005. xcb_host_end (xcb_host_iterator_t i);
  11006. int
  11007. xcb_list_hosts_sizeof (const void *_buffer);
  11008. /**
  11009. *
  11010. * @param c The connection
  11011. * @return A cookie
  11012. *
  11013. * Delivers a request to the X server.
  11014. *
  11015. */
  11016. xcb_list_hosts_cookie_t
  11017. xcb_list_hosts (xcb_connection_t *c);
  11018. /**
  11019. *
  11020. * @param c The connection
  11021. * @return A cookie
  11022. *
  11023. * Delivers a request to the X server.
  11024. *
  11025. * This form can be used only if the request will cause
  11026. * a reply to be generated. Any returned error will be
  11027. * placed in the event queue.
  11028. */
  11029. xcb_list_hosts_cookie_t
  11030. xcb_list_hosts_unchecked (xcb_connection_t *c);
  11031. int
  11032. xcb_list_hosts_hosts_length (const xcb_list_hosts_reply_t *R);
  11033. xcb_host_iterator_t
  11034. xcb_list_hosts_hosts_iterator (const xcb_list_hosts_reply_t *R);
  11035. /**
  11036. * Return the reply
  11037. * @param c The connection
  11038. * @param cookie The cookie
  11039. * @param e The xcb_generic_error_t supplied
  11040. *
  11041. * Returns the reply of the request asked by
  11042. *
  11043. * The parameter @p e supplied to this function must be NULL if
  11044. * xcb_list_hosts_unchecked(). is used.
  11045. * Otherwise, it stores the error if any.
  11046. *
  11047. * The returned value must be freed by the caller using free().
  11048. */
  11049. xcb_list_hosts_reply_t *
  11050. xcb_list_hosts_reply (xcb_connection_t *c,
  11051. xcb_list_hosts_cookie_t cookie /**< */,
  11052. xcb_generic_error_t **e);
  11053. /**
  11054. *
  11055. * @param c The connection
  11056. * @return A cookie
  11057. *
  11058. * Delivers a request to the X server.
  11059. *
  11060. * This form can be used only if the request will not cause
  11061. * a reply to be generated. Any returned error will be
  11062. * saved for handling by xcb_request_check().
  11063. */
  11064. xcb_void_cookie_t
  11065. xcb_set_access_control_checked (xcb_connection_t *c,
  11066. uint8_t mode);
  11067. /**
  11068. *
  11069. * @param c The connection
  11070. * @return A cookie
  11071. *
  11072. * Delivers a request to the X server.
  11073. *
  11074. */
  11075. xcb_void_cookie_t
  11076. xcb_set_access_control (xcb_connection_t *c,
  11077. uint8_t mode);
  11078. /**
  11079. *
  11080. * @param c The connection
  11081. * @return A cookie
  11082. *
  11083. * Delivers a request to the X server.
  11084. *
  11085. * This form can be used only if the request will not cause
  11086. * a reply to be generated. Any returned error will be
  11087. * saved for handling by xcb_request_check().
  11088. */
  11089. xcb_void_cookie_t
  11090. xcb_set_close_down_mode_checked (xcb_connection_t *c,
  11091. uint8_t mode);
  11092. /**
  11093. *
  11094. * @param c The connection
  11095. * @return A cookie
  11096. *
  11097. * Delivers a request to the X server.
  11098. *
  11099. */
  11100. xcb_void_cookie_t
  11101. xcb_set_close_down_mode (xcb_connection_t *c,
  11102. uint8_t mode);
  11103. /**
  11104. * @brief kills a client
  11105. *
  11106. * @param c The connection
  11107. * @param resource Any resource belonging to the client (for example a Window), used to identify
  11108. * the client connection.
  11109. * \n
  11110. * The special value of `XCB_KILL_ALL_TEMPORARY`, the resources of all clients
  11111. * that have terminated in `RetainTemporary` (TODO) are destroyed.
  11112. * @return A cookie
  11113. *
  11114. * Forces a close down of the client that created the specified \a resource.
  11115. *
  11116. * This form can be used only if the request will not cause
  11117. * a reply to be generated. Any returned error will be
  11118. * saved for handling by xcb_request_check().
  11119. */
  11120. xcb_void_cookie_t
  11121. xcb_kill_client_checked (xcb_connection_t *c,
  11122. uint32_t resource);
  11123. /**
  11124. * @brief kills a client
  11125. *
  11126. * @param c The connection
  11127. * @param resource Any resource belonging to the client (for example a Window), used to identify
  11128. * the client connection.
  11129. * \n
  11130. * The special value of `XCB_KILL_ALL_TEMPORARY`, the resources of all clients
  11131. * that have terminated in `RetainTemporary` (TODO) are destroyed.
  11132. * @return A cookie
  11133. *
  11134. * Forces a close down of the client that created the specified \a resource.
  11135. *
  11136. */
  11137. xcb_void_cookie_t
  11138. xcb_kill_client (xcb_connection_t *c,
  11139. uint32_t resource);
  11140. int
  11141. xcb_rotate_properties_sizeof (const void *_buffer);
  11142. /**
  11143. *
  11144. * @param c The connection
  11145. * @return A cookie
  11146. *
  11147. * Delivers a request to the X server.
  11148. *
  11149. * This form can be used only if the request will not cause
  11150. * a reply to be generated. Any returned error will be
  11151. * saved for handling by xcb_request_check().
  11152. */
  11153. xcb_void_cookie_t
  11154. xcb_rotate_properties_checked (xcb_connection_t *c,
  11155. xcb_window_t window,
  11156. uint16_t atoms_len,
  11157. int16_t delta,
  11158. const xcb_atom_t *atoms);
  11159. /**
  11160. *
  11161. * @param c The connection
  11162. * @return A cookie
  11163. *
  11164. * Delivers a request to the X server.
  11165. *
  11166. */
  11167. xcb_void_cookie_t
  11168. xcb_rotate_properties (xcb_connection_t *c,
  11169. xcb_window_t window,
  11170. uint16_t atoms_len,
  11171. int16_t delta,
  11172. const xcb_atom_t *atoms);
  11173. xcb_atom_t *
  11174. xcb_rotate_properties_atoms (const xcb_rotate_properties_request_t *R);
  11175. int
  11176. xcb_rotate_properties_atoms_length (const xcb_rotate_properties_request_t *R);
  11177. xcb_generic_iterator_t
  11178. xcb_rotate_properties_atoms_end (const xcb_rotate_properties_request_t *R);
  11179. /**
  11180. *
  11181. * @param c The connection
  11182. * @return A cookie
  11183. *
  11184. * Delivers a request to the X server.
  11185. *
  11186. * This form can be used only if the request will not cause
  11187. * a reply to be generated. Any returned error will be
  11188. * saved for handling by xcb_request_check().
  11189. */
  11190. xcb_void_cookie_t
  11191. xcb_force_screen_saver_checked (xcb_connection_t *c,
  11192. uint8_t mode);
  11193. /**
  11194. *
  11195. * @param c The connection
  11196. * @return A cookie
  11197. *
  11198. * Delivers a request to the X server.
  11199. *
  11200. */
  11201. xcb_void_cookie_t
  11202. xcb_force_screen_saver (xcb_connection_t *c,
  11203. uint8_t mode);
  11204. int
  11205. xcb_set_pointer_mapping_sizeof (const void *_buffer);
  11206. /**
  11207. *
  11208. * @param c The connection
  11209. * @return A cookie
  11210. *
  11211. * Delivers a request to the X server.
  11212. *
  11213. */
  11214. xcb_set_pointer_mapping_cookie_t
  11215. xcb_set_pointer_mapping (xcb_connection_t *c,
  11216. uint8_t map_len,
  11217. const uint8_t *map);
  11218. /**
  11219. *
  11220. * @param c The connection
  11221. * @return A cookie
  11222. *
  11223. * Delivers a request to the X server.
  11224. *
  11225. * This form can be used only if the request will cause
  11226. * a reply to be generated. Any returned error will be
  11227. * placed in the event queue.
  11228. */
  11229. xcb_set_pointer_mapping_cookie_t
  11230. xcb_set_pointer_mapping_unchecked (xcb_connection_t *c,
  11231. uint8_t map_len,
  11232. const uint8_t *map);
  11233. /**
  11234. * Return the reply
  11235. * @param c The connection
  11236. * @param cookie The cookie
  11237. * @param e The xcb_generic_error_t supplied
  11238. *
  11239. * Returns the reply of the request asked by
  11240. *
  11241. * The parameter @p e supplied to this function must be NULL if
  11242. * xcb_set_pointer_mapping_unchecked(). is used.
  11243. * Otherwise, it stores the error if any.
  11244. *
  11245. * The returned value must be freed by the caller using free().
  11246. */
  11247. xcb_set_pointer_mapping_reply_t *
  11248. xcb_set_pointer_mapping_reply (xcb_connection_t *c,
  11249. xcb_set_pointer_mapping_cookie_t cookie /**< */,
  11250. xcb_generic_error_t **e);
  11251. int
  11252. xcb_get_pointer_mapping_sizeof (const void *_buffer);
  11253. /**
  11254. *
  11255. * @param c The connection
  11256. * @return A cookie
  11257. *
  11258. * Delivers a request to the X server.
  11259. *
  11260. */
  11261. xcb_get_pointer_mapping_cookie_t
  11262. xcb_get_pointer_mapping (xcb_connection_t *c);
  11263. /**
  11264. *
  11265. * @param c The connection
  11266. * @return A cookie
  11267. *
  11268. * Delivers a request to the X server.
  11269. *
  11270. * This form can be used only if the request will cause
  11271. * a reply to be generated. Any returned error will be
  11272. * placed in the event queue.
  11273. */
  11274. xcb_get_pointer_mapping_cookie_t
  11275. xcb_get_pointer_mapping_unchecked (xcb_connection_t *c);
  11276. uint8_t *
  11277. xcb_get_pointer_mapping_map (const xcb_get_pointer_mapping_reply_t *R);
  11278. int
  11279. xcb_get_pointer_mapping_map_length (const xcb_get_pointer_mapping_reply_t *R);
  11280. xcb_generic_iterator_t
  11281. xcb_get_pointer_mapping_map_end (const xcb_get_pointer_mapping_reply_t *R);
  11282. /**
  11283. * Return the reply
  11284. * @param c The connection
  11285. * @param cookie The cookie
  11286. * @param e The xcb_generic_error_t supplied
  11287. *
  11288. * Returns the reply of the request asked by
  11289. *
  11290. * The parameter @p e supplied to this function must be NULL if
  11291. * xcb_get_pointer_mapping_unchecked(). is used.
  11292. * Otherwise, it stores the error if any.
  11293. *
  11294. * The returned value must be freed by the caller using free().
  11295. */
  11296. xcb_get_pointer_mapping_reply_t *
  11297. xcb_get_pointer_mapping_reply (xcb_connection_t *c,
  11298. xcb_get_pointer_mapping_cookie_t cookie /**< */,
  11299. xcb_generic_error_t **e);
  11300. int
  11301. xcb_set_modifier_mapping_sizeof (const void *_buffer);
  11302. /**
  11303. *
  11304. * @param c The connection
  11305. * @return A cookie
  11306. *
  11307. * Delivers a request to the X server.
  11308. *
  11309. */
  11310. xcb_set_modifier_mapping_cookie_t
  11311. xcb_set_modifier_mapping (xcb_connection_t *c,
  11312. uint8_t keycodes_per_modifier,
  11313. const xcb_keycode_t *keycodes);
  11314. /**
  11315. *
  11316. * @param c The connection
  11317. * @return A cookie
  11318. *
  11319. * Delivers a request to the X server.
  11320. *
  11321. * This form can be used only if the request will cause
  11322. * a reply to be generated. Any returned error will be
  11323. * placed in the event queue.
  11324. */
  11325. xcb_set_modifier_mapping_cookie_t
  11326. xcb_set_modifier_mapping_unchecked (xcb_connection_t *c,
  11327. uint8_t keycodes_per_modifier,
  11328. const xcb_keycode_t *keycodes);
  11329. /**
  11330. * Return the reply
  11331. * @param c The connection
  11332. * @param cookie The cookie
  11333. * @param e The xcb_generic_error_t supplied
  11334. *
  11335. * Returns the reply of the request asked by
  11336. *
  11337. * The parameter @p e supplied to this function must be NULL if
  11338. * xcb_set_modifier_mapping_unchecked(). is used.
  11339. * Otherwise, it stores the error if any.
  11340. *
  11341. * The returned value must be freed by the caller using free().
  11342. */
  11343. xcb_set_modifier_mapping_reply_t *
  11344. xcb_set_modifier_mapping_reply (xcb_connection_t *c,
  11345. xcb_set_modifier_mapping_cookie_t cookie /**< */,
  11346. xcb_generic_error_t **e);
  11347. int
  11348. xcb_get_modifier_mapping_sizeof (const void *_buffer);
  11349. /**
  11350. *
  11351. * @param c The connection
  11352. * @return A cookie
  11353. *
  11354. * Delivers a request to the X server.
  11355. *
  11356. */
  11357. xcb_get_modifier_mapping_cookie_t
  11358. xcb_get_modifier_mapping (xcb_connection_t *c);
  11359. /**
  11360. *
  11361. * @param c The connection
  11362. * @return A cookie
  11363. *
  11364. * Delivers a request to the X server.
  11365. *
  11366. * This form can be used only if the request will cause
  11367. * a reply to be generated. Any returned error will be
  11368. * placed in the event queue.
  11369. */
  11370. xcb_get_modifier_mapping_cookie_t
  11371. xcb_get_modifier_mapping_unchecked (xcb_connection_t *c);
  11372. xcb_keycode_t *
  11373. xcb_get_modifier_mapping_keycodes (const xcb_get_modifier_mapping_reply_t *R);
  11374. int
  11375. xcb_get_modifier_mapping_keycodes_length (const xcb_get_modifier_mapping_reply_t *R);
  11376. xcb_generic_iterator_t
  11377. xcb_get_modifier_mapping_keycodes_end (const xcb_get_modifier_mapping_reply_t *R);
  11378. /**
  11379. * Return the reply
  11380. * @param c The connection
  11381. * @param cookie The cookie
  11382. * @param e The xcb_generic_error_t supplied
  11383. *
  11384. * Returns the reply of the request asked by
  11385. *
  11386. * The parameter @p e supplied to this function must be NULL if
  11387. * xcb_get_modifier_mapping_unchecked(). is used.
  11388. * Otherwise, it stores the error if any.
  11389. *
  11390. * The returned value must be freed by the caller using free().
  11391. */
  11392. xcb_get_modifier_mapping_reply_t *
  11393. xcb_get_modifier_mapping_reply (xcb_connection_t *c,
  11394. xcb_get_modifier_mapping_cookie_t cookie /**< */,
  11395. xcb_generic_error_t **e);
  11396. /**
  11397. *
  11398. * @param c The connection
  11399. * @return A cookie
  11400. *
  11401. * Delivers a request to the X server.
  11402. *
  11403. * This form can be used only if the request will not cause
  11404. * a reply to be generated. Any returned error will be
  11405. * saved for handling by xcb_request_check().
  11406. */
  11407. xcb_void_cookie_t
  11408. xcb_no_operation_checked (xcb_connection_t *c);
  11409. /**
  11410. *
  11411. * @param c The connection
  11412. * @return A cookie
  11413. *
  11414. * Delivers a request to the X server.
  11415. *
  11416. */
  11417. xcb_void_cookie_t
  11418. xcb_no_operation (xcb_connection_t *c);
  11419. #ifdef __cplusplus
  11420. }
  11421. #endif
  11422. #endif
  11423. /**
  11424. * @}
  11425. */