main 602baa7

requests_generated.go RawHistoryFolder

1// Code generated by xtgen; DO NOT EDIT.
2package shape
3
4import "bnema.dev/xturbo/xproto"
5import "encoding/binary"
6import "bnema.dev/xturbo"
7
8func QueryVersion(b *xturbo.Buf) xturbo.Seq {
9	if b.Ext == nil {
10		b.Fail(xturbo.ErrExtMissing)
11		return 0
12	}
13	major := b.Ext.Major(xturbo.ExtShape)
14	if major == 0 {
15		b.Fail(xturbo.ErrExtMissing)
16		return 0
17	}
18	p, seq := b.Request(major, 0, 0)
19	if p == nil {
20		return 0
21	}
22	return seq
23}
24
25func Rectangles(b *xturbo.Buf, operation So, destinationKind Sk, ordering xproto.ClipOrdering, destinationWindow xproto.Window, xOffset int16, yOffset int16, rectangles []xproto.Rectangle) xturbo.Seq {
26	size := 0
27	size += 1
28	size += 1
29	size += 1
30	size += 1
31	size += 4
32	size += 2
33	size += 2
34	size += len(rectangles) * 8
35	size = (size + 3) &^ 3
36	if b.Ext == nil {
37		b.Fail(xturbo.ErrExtMissing)
38		return 0
39	}
40	major := b.Ext.Major(xturbo.ExtShape)
41	if major == 0 {
42		b.Fail(xturbo.ErrExtMissing)
43		return 0
44	}
45	p, seq := b.Request(major, 1, size)
46	if p == nil {
47		return 0
48	}
49	off := 0
50	p[off:][0] = byte(operation)
51	off += 1
52	p[off:][0] = byte(destinationKind)
53	off += 1
54	p[off:][0] = byte(ordering)
55	off += 1
56	off += 1
57	binary.LittleEndian.PutUint32(p[off:], uint32(destinationWindow))
58	off += 4
59	binary.LittleEndian.PutUint16(p[off:], uint16(xOffset))
60	off += 2
61	binary.LittleEndian.PutUint16(p[off:], uint16(yOffset))
62	off += 2
63	for i := range rectangles {
64		rectangles[i].Put(p[off:])
65		off += 8
66	}
67	return seq
68}
69
70func Mask(b *xturbo.Buf, operation So, destinationKind Sk, destinationWindow xproto.Window, xOffset int16, yOffset int16, sourceBitmap xproto.Pixmap) xturbo.Seq {
71	if b.Ext == nil {
72		b.Fail(xturbo.ErrExtMissing)
73		return 0
74	}
75	major := b.Ext.Major(xturbo.ExtShape)
76	if major == 0 {
77		b.Fail(xturbo.ErrExtMissing)
78		return 0
79	}
80	p, seq := b.Request(major, 2, 16)
81	if p == nil {
82		return 0
83	}
84	p[0:][0] = byte(operation)
85	p[1:][0] = byte(destinationKind)
86	binary.LittleEndian.PutUint32(p[4:], uint32(destinationWindow))
87	binary.LittleEndian.PutUint16(p[8:], uint16(xOffset))
88	binary.LittleEndian.PutUint16(p[10:], uint16(yOffset))
89	binary.LittleEndian.PutUint32(p[12:], uint32(sourceBitmap))
90	return seq
91}
92
93func Combine(b *xturbo.Buf, operation So, destinationKind Sk, sourceKind Sk, destinationWindow xproto.Window, xOffset int16, yOffset int16, sourceWindow xproto.Window) xturbo.Seq {
94	if b.Ext == nil {
95		b.Fail(xturbo.ErrExtMissing)
96		return 0
97	}
98	major := b.Ext.Major(xturbo.ExtShape)
99	if major == 0 {
100		b.Fail(xturbo.ErrExtMissing)
101		return 0
102	}
103	p, seq := b.Request(major, 3, 16)
104	if p == nil {
105		return 0
106	}
107	p[0:][0] = byte(operation)
108	p[1:][0] = byte(destinationKind)
109	p[2:][0] = byte(sourceKind)
110	binary.LittleEndian.PutUint32(p[4:], uint32(destinationWindow))
111	binary.LittleEndian.PutUint16(p[8:], uint16(xOffset))
112	binary.LittleEndian.PutUint16(p[10:], uint16(yOffset))
113	binary.LittleEndian.PutUint32(p[12:], uint32(sourceWindow))
114	return seq
115}
116
117func Offset(b *xturbo.Buf, destinationKind Sk, destinationWindow xproto.Window, xOffset int16, yOffset int16) xturbo.Seq {
118	if b.Ext == nil {
119		b.Fail(xturbo.ErrExtMissing)
120		return 0
121	}
122	major := b.Ext.Major(xturbo.ExtShape)
123	if major == 0 {
124		b.Fail(xturbo.ErrExtMissing)
125		return 0
126	}
127	p, seq := b.Request(major, 4, 12)
128	if p == nil {
129		return 0
130	}
131	p[0:][0] = byte(destinationKind)
132	binary.LittleEndian.PutUint32(p[4:], uint32(destinationWindow))
133	binary.LittleEndian.PutUint16(p[8:], uint16(xOffset))
134	binary.LittleEndian.PutUint16(p[10:], uint16(yOffset))
135	return seq
136}
137
138func QueryExtents(b *xturbo.Buf, destinationWindow xproto.Window) xturbo.Seq {
139	if b.Ext == nil {
140		b.Fail(xturbo.ErrExtMissing)
141		return 0
142	}
143	major := b.Ext.Major(xturbo.ExtShape)
144	if major == 0 {
145		b.Fail(xturbo.ErrExtMissing)
146		return 0
147	}
148	p, seq := b.Request(major, 5, 4)
149	if p == nil {
150		return 0
151	}
152	binary.LittleEndian.PutUint32(p[0:], uint32(destinationWindow))
153	return seq
154}
155
156func SelectInput(b *xturbo.Buf, destinationWindow xproto.Window, enable bool) xturbo.Seq {
157	if b.Ext == nil {
158		b.Fail(xturbo.ErrExtMissing)
159		return 0
160	}
161	major := b.Ext.Major(xturbo.ExtShape)
162	if major == 0 {
163		b.Fail(xturbo.ErrExtMissing)
164		return 0
165	}
166	p, seq := b.Request(major, 6, 8)
167	if p == nil {
168		return 0
169	}
170	binary.LittleEndian.PutUint32(p[0:], uint32(destinationWindow))
171	if enable {
172		p[4:][0] = 1
173	} else {
174		p[4:][0] = 0
175	}
176	return seq
177}
178
179func InputSelected(b *xturbo.Buf, destinationWindow xproto.Window) xturbo.Seq {
180	if b.Ext == nil {
181		b.Fail(xturbo.ErrExtMissing)
182		return 0
183	}
184	major := b.Ext.Major(xturbo.ExtShape)
185	if major == 0 {
186		b.Fail(xturbo.ErrExtMissing)
187		return 0
188	}
189	p, seq := b.Request(major, 7, 4)
190	if p == nil {
191		return 0
192	}
193	binary.LittleEndian.PutUint32(p[0:], uint32(destinationWindow))
194	return seq
195}
196
197func GetRectangles(b *xturbo.Buf, window xproto.Window, sourceKind Sk) xturbo.Seq {
198	if b.Ext == nil {
199		b.Fail(xturbo.ErrExtMissing)
200		return 0
201	}
202	major := b.Ext.Major(xturbo.ExtShape)
203	if major == 0 {
204		b.Fail(xturbo.ErrExtMissing)
205		return 0
206	}
207	p, seq := b.Request(major, 8, 8)
208	if p == nil {
209		return 0
210	}
211	binary.LittleEndian.PutUint32(p[0:], uint32(window))
212	p[4:][0] = byte(sourceKind)
213	return seq
214}

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