main 602baa7

types_generated.go RawHistoryFolder

1// Code generated by xtgen; DO NOT EDIT.
2package render
3
4import "bnema.dev/xturbo/xproto"
5import "encoding/binary"
6
7type Glyph uint32
8
9type Glyphset uint32
10
11type Picture uint32
12
13type Pictformat uint32
14
15type Fixed int32
16
17type Directformat struct {
18	RedShift   uint16
19	RedMask    uint16
20	GreenShift uint16
21	GreenMask  uint16
22	BlueShift  uint16
23	BlueMask   uint16
24	AlphaShift uint16
25	AlphaMask  uint16
26}
27
28const DirectformatSize = 16
29
30func (v Directformat) Put(p []byte) {
31	clear(p[:16])
32	binary.LittleEndian.PutUint16(p[0:], uint16(v.RedShift))
33	binary.LittleEndian.PutUint16(p[2:], uint16(v.RedMask))
34	binary.LittleEndian.PutUint16(p[4:], uint16(v.GreenShift))
35	binary.LittleEndian.PutUint16(p[6:], uint16(v.GreenMask))
36	binary.LittleEndian.PutUint16(p[8:], uint16(v.BlueShift))
37	binary.LittleEndian.PutUint16(p[10:], uint16(v.BlueMask))
38	binary.LittleEndian.PutUint16(p[12:], uint16(v.AlphaShift))
39	binary.LittleEndian.PutUint16(p[14:], uint16(v.AlphaMask))
40}
41func GetDirectformat(p []byte) (v Directformat) {
42	_ = p[15]
43	v.RedShift = uint16(binary.LittleEndian.Uint16(p[0:]))
44	v.RedMask = uint16(binary.LittleEndian.Uint16(p[2:]))
45	v.GreenShift = uint16(binary.LittleEndian.Uint16(p[4:]))
46	v.GreenMask = uint16(binary.LittleEndian.Uint16(p[6:]))
47	v.BlueShift = uint16(binary.LittleEndian.Uint16(p[8:]))
48	v.BlueMask = uint16(binary.LittleEndian.Uint16(p[10:]))
49	v.AlphaShift = uint16(binary.LittleEndian.Uint16(p[12:]))
50	v.AlphaMask = uint16(binary.LittleEndian.Uint16(p[14:]))
51	return
52}
53
54type Pictforminfo struct {
55	Id       Pictformat
56	Type     PictType
57	Depth    uint8
58	Direct   Directformat
59	Colormap xproto.Colormap
60}
61
62const PictforminfoSize = 28
63
64func (v Pictforminfo) Put(p []byte) {
65	clear(p[:28])
66	binary.LittleEndian.PutUint32(p[0:], uint32(v.Id))
67	p[4:][0] = byte(v.Type)
68	p[5:][0] = byte(v.Depth)
69	v.Direct.Put(p[8:])
70	binary.LittleEndian.PutUint32(p[24:], uint32(v.Colormap))
71}
72func GetPictforminfo(p []byte) (v Pictforminfo) {
73	_ = p[27]
74	v.Id = Pictformat(binary.LittleEndian.Uint32(p[0:]))
75	v.Type = PictType(p[4:][0])
76	v.Depth = uint8(p[5:][0])
77	v.Direct = GetDirectformat(p[8:])
78	v.Colormap = xproto.Colormap(binary.LittleEndian.Uint32(p[24:]))
79	return
80}
81
82type Pictvisual struct {
83	Visual xproto.Visualid
84	Format Pictformat
85}
86
87const PictvisualSize = 8
88
89func (v Pictvisual) Put(p []byte) {
90	clear(p[:8])
91	binary.LittleEndian.PutUint32(p[0:], uint32(v.Visual))
92	binary.LittleEndian.PutUint32(p[4:], uint32(v.Format))
93}
94func GetPictvisual(p []byte) (v Pictvisual) {
95	_ = p[7]
96	v.Visual = xproto.Visualid(binary.LittleEndian.Uint32(p[0:]))
97	v.Format = Pictformat(binary.LittleEndian.Uint32(p[4:]))
98	return
99}
100
101type Pictdepth struct {
102	Depth      uint8
103	NumVisuals uint16
104	Visuals    []Pictvisual
105}
106
107const PictdepthSize = 8
108
109func (v Pictdepth) Size() int {
110	off := 0
111	off += 1
112	off += 1
113	off += 2
114	off += 4
115	off += len(v.Visuals) * 8
116	return off
117}
118func (v Pictdepth) Put(p []byte) {
119	off := 0
120	p[off:][0] = byte(v.Depth)
121	off += 1
122	clear(p[off : off+1])
123	off += 1
124	binary.LittleEndian.PutUint16(p[off:], uint16(v.NumVisuals))
125	off += 2
126	clear(p[off : off+4])
127	off += 4
128	for i := range v.Visuals {
129		v.Visuals[i].Put(p[off+i*8:])
130	}
131	off += len(v.Visuals) * 8
132}
133
134type Pictscreen struct {
135	NumDepths uint32
136	Fallback  Pictformat
137	Depths    []Pictdepth
138}
139
140const PictscreenSize = 8
141
142func (v Pictscreen) Size() int {
143	off := 0
144	off += 4
145	off += 4
146	for i := range v.Depths {
147		off += v.Depths[i].Size()
148	}
149	return off
150}
151func (v Pictscreen) Put(p []byte) {
152	off := 0
153	binary.LittleEndian.PutUint32(p[off:], uint32(v.NumDepths))
154	off += 4
155	binary.LittleEndian.PutUint32(p[off:], uint32(v.Fallback))
156	off += 4
157	for i := range v.Depths {
158		v.Depths[i].Put(p[off:])
159		off += v.Depths[i].Size()
160	}
161}
162
163type Indexvalue struct {
164	Pixel uint32
165	Red   uint16
166	Green uint16
167	Blue  uint16
168	Alpha uint16
169}
170
171const IndexvalueSize = 12
172
173func (v Indexvalue) Put(p []byte) {
174	clear(p[:12])
175	binary.LittleEndian.PutUint32(p[0:], uint32(v.Pixel))
176	binary.LittleEndian.PutUint16(p[4:], uint16(v.Red))
177	binary.LittleEndian.PutUint16(p[6:], uint16(v.Green))
178	binary.LittleEndian.PutUint16(p[8:], uint16(v.Blue))
179	binary.LittleEndian.PutUint16(p[10:], uint16(v.Alpha))
180}
181func GetIndexvalue(p []byte) (v Indexvalue) {
182	_ = p[11]
183	v.Pixel = uint32(binary.LittleEndian.Uint32(p[0:]))
184	v.Red = uint16(binary.LittleEndian.Uint16(p[4:]))
185	v.Green = uint16(binary.LittleEndian.Uint16(p[6:]))
186	v.Blue = uint16(binary.LittleEndian.Uint16(p[8:]))
187	v.Alpha = uint16(binary.LittleEndian.Uint16(p[10:]))
188	return
189}
190
191type Color struct {
192	Red   uint16
193	Green uint16
194	Blue  uint16
195	Alpha uint16
196}
197
198const ColorSize = 8
199
200func (v Color) Put(p []byte) {
201	clear(p[:8])
202	binary.LittleEndian.PutUint16(p[0:], uint16(v.Red))
203	binary.LittleEndian.PutUint16(p[2:], uint16(v.Green))
204	binary.LittleEndian.PutUint16(p[4:], uint16(v.Blue))
205	binary.LittleEndian.PutUint16(p[6:], uint16(v.Alpha))
206}
207func GetColor(p []byte) (v Color) {
208	_ = p[7]
209	v.Red = uint16(binary.LittleEndian.Uint16(p[0:]))
210	v.Green = uint16(binary.LittleEndian.Uint16(p[2:]))
211	v.Blue = uint16(binary.LittleEndian.Uint16(p[4:]))
212	v.Alpha = uint16(binary.LittleEndian.Uint16(p[6:]))
213	return
214}
215
216type Pointfix struct {
217	X Fixed
218	Y Fixed
219}
220
221const PointfixSize = 8
222
223func (v Pointfix) Put(p []byte) {
224	clear(p[:8])
225	binary.LittleEndian.PutUint32(p[0:], uint32(v.X))
226	binary.LittleEndian.PutUint32(p[4:], uint32(v.Y))
227}
228func GetPointfix(p []byte) (v Pointfix) {
229	_ = p[7]
230	v.X = Fixed(binary.LittleEndian.Uint32(p[0:]))
231	v.Y = Fixed(binary.LittleEndian.Uint32(p[4:]))
232	return
233}
234
235type Linefix struct {
236	P1 Pointfix
237	P2 Pointfix
238}
239
240const LinefixSize = 16
241
242func (v Linefix) Put(p []byte) { clear(p[:16]); v.P1.Put(p[0:]); v.P2.Put(p[8:]) }
243func GetLinefix(p []byte) (v Linefix) {
244	_ = p[15]
245	v.P1 = GetPointfix(p[0:])
246	v.P2 = GetPointfix(p[8:])
247	return
248}
249
250type Triangle struct {
251	P1 Pointfix
252	P2 Pointfix
253	P3 Pointfix
254}
255
256const TriangleSize = 24
257
258func (v Triangle) Put(p []byte) { clear(p[:24]); v.P1.Put(p[0:]); v.P2.Put(p[8:]); v.P3.Put(p[16:]) }
259func GetTriangle(p []byte) (v Triangle) {
260	_ = p[23]
261	v.P1 = GetPointfix(p[0:])
262	v.P2 = GetPointfix(p[8:])
263	v.P3 = GetPointfix(p[16:])
264	return
265}
266
267type Trapezoid struct {
268	Top    Fixed
269	Bottom Fixed
270	Left   Linefix
271	Right  Linefix
272}
273
274const TrapezoidSize = 40
275
276func (v Trapezoid) Put(p []byte) {
277	clear(p[:40])
278	binary.LittleEndian.PutUint32(p[0:], uint32(v.Top))
279	binary.LittleEndian.PutUint32(p[4:], uint32(v.Bottom))
280	v.Left.Put(p[8:])
281	v.Right.Put(p[24:])
282}
283func GetTrapezoid(p []byte) (v Trapezoid) {
284	_ = p[39]
285	v.Top = Fixed(binary.LittleEndian.Uint32(p[0:]))
286	v.Bottom = Fixed(binary.LittleEndian.Uint32(p[4:]))
287	v.Left = GetLinefix(p[8:])
288	v.Right = GetLinefix(p[24:])
289	return
290}
291
292type Glyphinfo struct {
293	Width  uint16
294	Height uint16
295	X      int16
296	Y      int16
297	XOff   int16
298	YOff   int16
299}
300
301const GlyphinfoSize = 12
302
303func (v Glyphinfo) Put(p []byte) {
304	clear(p[:12])
305	binary.LittleEndian.PutUint16(p[0:], uint16(v.Width))
306	binary.LittleEndian.PutUint16(p[2:], uint16(v.Height))
307	binary.LittleEndian.PutUint16(p[4:], uint16(v.X))
308	binary.LittleEndian.PutUint16(p[6:], uint16(v.Y))
309	binary.LittleEndian.PutUint16(p[8:], uint16(v.XOff))
310	binary.LittleEndian.PutUint16(p[10:], uint16(v.YOff))
311}
312func GetGlyphinfo(p []byte) (v Glyphinfo) {
313	_ = p[11]
314	v.Width = uint16(binary.LittleEndian.Uint16(p[0:]))
315	v.Height = uint16(binary.LittleEndian.Uint16(p[2:]))
316	v.X = int16(binary.LittleEndian.Uint16(p[4:]))
317	v.Y = int16(binary.LittleEndian.Uint16(p[6:]))
318	v.XOff = int16(binary.LittleEndian.Uint16(p[8:]))
319	v.YOff = int16(binary.LittleEndian.Uint16(p[10:]))
320	return
321}
322
323type Transform struct {
324	Matrix11 Fixed
325	Matrix12 Fixed
326	Matrix13 Fixed
327	Matrix21 Fixed
328	Matrix22 Fixed
329	Matrix23 Fixed
330	Matrix31 Fixed
331	Matrix32 Fixed
332	Matrix33 Fixed
333}
334
335const TransformSize = 36
336
337func (v Transform) Put(p []byte) {
338	clear(p[:36])
339	binary.LittleEndian.PutUint32(p[0:], uint32(v.Matrix11))
340	binary.LittleEndian.PutUint32(p[4:], uint32(v.Matrix12))
341	binary.LittleEndian.PutUint32(p[8:], uint32(v.Matrix13))
342	binary.LittleEndian.PutUint32(p[12:], uint32(v.Matrix21))
343	binary.LittleEndian.PutUint32(p[16:], uint32(v.Matrix22))
344	binary.LittleEndian.PutUint32(p[20:], uint32(v.Matrix23))
345	binary.LittleEndian.PutUint32(p[24:], uint32(v.Matrix31))
346	binary.LittleEndian.PutUint32(p[28:], uint32(v.Matrix32))
347	binary.LittleEndian.PutUint32(p[32:], uint32(v.Matrix33))
348}
349func GetTransform(p []byte) (v Transform) {
350	_ = p[35]
351	v.Matrix11 = Fixed(binary.LittleEndian.Uint32(p[0:]))
352	v.Matrix12 = Fixed(binary.LittleEndian.Uint32(p[4:]))
353	v.Matrix13 = Fixed(binary.LittleEndian.Uint32(p[8:]))
354	v.Matrix21 = Fixed(binary.LittleEndian.Uint32(p[12:]))
355	v.Matrix22 = Fixed(binary.LittleEndian.Uint32(p[16:]))
356	v.Matrix23 = Fixed(binary.LittleEndian.Uint32(p[20:]))
357	v.Matrix31 = Fixed(binary.LittleEndian.Uint32(p[24:]))
358	v.Matrix32 = Fixed(binary.LittleEndian.Uint32(p[28:]))
359	v.Matrix33 = Fixed(binary.LittleEndian.Uint32(p[32:]))
360	return
361}
362
363type Animcursorelt struct {
364	Cursor xproto.Cursor
365	Delay  uint32
366}
367
368const AnimcursoreltSize = 8
369
370func (v Animcursorelt) Put(p []byte) {
371	clear(p[:8])
372	binary.LittleEndian.PutUint32(p[0:], uint32(v.Cursor))
373	binary.LittleEndian.PutUint32(p[4:], uint32(v.Delay))
374}
375func GetAnimcursorelt(p []byte) (v Animcursorelt) {
376	_ = p[7]
377	v.Cursor = xproto.Cursor(binary.LittleEndian.Uint32(p[0:]))
378	v.Delay = uint32(binary.LittleEndian.Uint32(p[4:]))
379	return
380}
381
382type Spanfix struct {
383	L Fixed
384	R Fixed
385	Y Fixed
386}
387
388const SpanfixSize = 12
389
390func (v Spanfix) Put(p []byte) {
391	clear(p[:12])
392	binary.LittleEndian.PutUint32(p[0:], uint32(v.L))
393	binary.LittleEndian.PutUint32(p[4:], uint32(v.R))
394	binary.LittleEndian.PutUint32(p[8:], uint32(v.Y))
395}
396func GetSpanfix(p []byte) (v Spanfix) {
397	_ = p[11]
398	v.L = Fixed(binary.LittleEndian.Uint32(p[0:]))
399	v.R = Fixed(binary.LittleEndian.Uint32(p[4:]))
400	v.Y = Fixed(binary.LittleEndian.Uint32(p[8:]))
401	return
402}
403
404type Trap struct {
405	Top Spanfix
406	Bot Spanfix
407}
408
409const TrapSize = 24
410
411func (v Trap) Put(p []byte) { clear(p[:24]); v.Top.Put(p[0:]); v.Bot.Put(p[12:]) }
412func GetTrap(p []byte) (v Trap) {
413	_ = p[23]
414	v.Top = GetSpanfix(p[0:])
415	v.Bot = GetSpanfix(p[12:])
416	return
417}
418
419type PictType uint8
420
421const PictTypeIndexed PictType = 0
422const PictTypeDirect PictType = 1
423
424const PictureNone Picture = 0
425
426type PictOp uint8
427
428const PictOpClear PictOp = 0
429const PictOpSrc PictOp = 1
430const PictOpDst PictOp = 2
431const PictOpOver PictOp = 3
432const PictOpOverReverse PictOp = 4
433const PictOpIn PictOp = 5
434const PictOpInReverse PictOp = 6
435const PictOpOut PictOp = 7
436const PictOpOutReverse PictOp = 8
437const PictOpAtop PictOp = 9
438const PictOpAtopReverse PictOp = 10
439const PictOpXor PictOp = 11
440const PictOpAdd PictOp = 12
441const PictOpSaturate PictOp = 13
442const PictOpDisjointClear PictOp = 16
443const PictOpDisjointSrc PictOp = 17
444const PictOpDisjointDst PictOp = 18
445const PictOpDisjointOver PictOp = 19
446const PictOpDisjointOverReverse PictOp = 20
447const PictOpDisjointIn PictOp = 21
448const PictOpDisjointInReverse PictOp = 22
449const PictOpDisjointOut PictOp = 23
450const PictOpDisjointOutReverse PictOp = 24
451const PictOpDisjointAtop PictOp = 25
452const PictOpDisjointAtopReverse PictOp = 26
453const PictOpDisjointXor PictOp = 27
454const PictOpConjointClear PictOp = 32
455const PictOpConjointSrc PictOp = 33
456const PictOpConjointDst PictOp = 34
457const PictOpConjointOver PictOp = 35
458const PictOpConjointOverReverse PictOp = 36
459const PictOpConjointIn PictOp = 37
460const PictOpConjointInReverse PictOp = 38
461const PictOpConjointOut PictOp = 39
462const PictOpConjointOutReverse PictOp = 40
463const PictOpConjointAtop PictOp = 41
464const PictOpConjointAtopReverse PictOp = 42
465const PictOpConjointXor PictOp = 43
466const PictOpMultiply PictOp = 48
467const PictOpScreen PictOp = 49
468const PictOpOverlay PictOp = 50
469const PictOpDarken PictOp = 51
470const PictOpLighten PictOp = 52
471const PictOpColorDodge PictOp = 53
472const PictOpColorBurn PictOp = 54
473const PictOpHardLight PictOp = 55
474const PictOpSoftLight PictOp = 56
475const PictOpDifference PictOp = 57
476const PictOpExclusion PictOp = 58
477const PictOpHSLHue PictOp = 59
478const PictOpHSLSaturation PictOp = 60
479const PictOpHSLColor PictOp = 61
480const PictOpHSLLuminosity PictOp = 62
481
482type PolyEdge uint32
483
484const PolyEdgeSharp PolyEdge = 0
485const PolyEdgeSmooth PolyEdge = 1
486
487type PolyMode uint32
488
489const PolyModePrecise PolyMode = 0
490const PolyModeImprecise PolyMode = 1
491
492type Cp uint32
493
494const CpRepeat Cp = 1
495const CpAlphaMap Cp = 2
496const CpAlphaXOrigin Cp = 4
497const CpAlphaYOrigin Cp = 8
498const CpClipXOrigin Cp = 16
499const CpClipYOrigin Cp = 32
500const CpClipMask Cp = 64
501const CpGraphicsExposure Cp = 128
502const CpSubwindowMode Cp = 256
503const CpPolyEdge Cp = 512
504const CpPolyMode Cp = 1024
505const CpDither Cp = 2048
506const CpComponentAlpha Cp = 4096
507
508type SubPixel uint32
509
510const SubPixelUnknown SubPixel = 0
511const SubPixelHorizontalRGB SubPixel = 1
512const SubPixelHorizontalBGR SubPixel = 2
513const SubPixelVerticalRGB SubPixel = 3
514const SubPixelVerticalBGR SubPixel = 4
515const SubPixelNone SubPixel = 5
516
517type Repeat uint32
518
519const RepeatNone Repeat = 0
520const RepeatNormal Repeat = 1
521const RepeatPad Repeat = 2
522const RepeatReflect Repeat = 3

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 1

↑↓ moveenter openesc close