detached 602baa7

types_generated.go RawHistoryFolder

1// Code generated by xtgen; DO NOT EDIT.
2package res
3
4import "bnema.dev/xturbo/xproto"
5import "encoding/binary"
6
7type Client struct {
8	ResourceBase uint32
9	ResourceMask uint32
10}
11
12const ClientSize = 8
13
14func (v Client) Put(p []byte) {
15	clear(p[:8])
16	binary.LittleEndian.PutUint32(p[0:], uint32(v.ResourceBase))
17	binary.LittleEndian.PutUint32(p[4:], uint32(v.ResourceMask))
18}
19func GetClient(p []byte) (v Client) {
20	_ = p[7]
21	v.ResourceBase = uint32(binary.LittleEndian.Uint32(p[0:]))
22	v.ResourceMask = uint32(binary.LittleEndian.Uint32(p[4:]))
23	return
24}
25
26type Type struct {
27	ResourceType xproto.Atom
28	Count        uint32
29}
30
31const TypeSize = 8
32
33func (v Type) Put(p []byte) {
34	clear(p[:8])
35	binary.LittleEndian.PutUint32(p[0:], uint32(v.ResourceType))
36	binary.LittleEndian.PutUint32(p[4:], uint32(v.Count))
37}
38func GetType(p []byte) (v Type) {
39	_ = p[7]
40	v.ResourceType = xproto.Atom(binary.LittleEndian.Uint32(p[0:]))
41	v.Count = uint32(binary.LittleEndian.Uint32(p[4:]))
42	return
43}
44
45type ClientIdSpec struct {
46	Client uint32
47	Mask   ClientIdMask
48}
49
50const ClientIdSpecSize = 8
51
52func (v ClientIdSpec) Put(p []byte) {
53	clear(p[:8])
54	binary.LittleEndian.PutUint32(p[0:], uint32(v.Client))
55	binary.LittleEndian.PutUint32(p[4:], uint32(v.Mask))
56}
57func GetClientIdSpec(p []byte) (v ClientIdSpec) {
58	_ = p[7]
59	v.Client = uint32(binary.LittleEndian.Uint32(p[0:]))
60	v.Mask = ClientIdMask(binary.LittleEndian.Uint32(p[4:]))
61	return
62}
63
64type ClientIdValue struct {
65	Spec   ClientIdSpec
66	Length uint32
67	Value  []uint32
68}
69
70const ClientIdValueSize = 12
71
72func (v ClientIdValue) Size() int { off := 0; off += 8; off += 4; off += len(v.Value) * 4; return off }
73func (v ClientIdValue) Put(p []byte) {
74	off := 0
75	v.Spec.Put(p[off:])
76	off += 8
77	binary.LittleEndian.PutUint32(p[off:], uint32(v.Length))
78	off += 4
79	for i := range v.Value {
80		binary.LittleEndian.PutUint32(p[off+i*4:], uint32(v.Value[i]))
81	}
82	off += len(v.Value) * 4
83}
84
85type ResourceIdSpec struct {
86	Resource uint32
87	Type     uint32
88}
89
90const ResourceIdSpecSize = 8
91
92func (v ResourceIdSpec) Put(p []byte) {
93	clear(p[:8])
94	binary.LittleEndian.PutUint32(p[0:], uint32(v.Resource))
95	binary.LittleEndian.PutUint32(p[4:], uint32(v.Type))
96}
97func GetResourceIdSpec(p []byte) (v ResourceIdSpec) {
98	_ = p[7]
99	v.Resource = uint32(binary.LittleEndian.Uint32(p[0:]))
100	v.Type = uint32(binary.LittleEndian.Uint32(p[4:]))
101	return
102}
103
104type ResourceSizeSpec struct {
105	Spec     ResourceIdSpec
106	Bytes    uint32
107	RefCount uint32
108	UseCount uint32
109}
110
111const ResourceSizeSpecSize = 20
112
113func (v ResourceSizeSpec) Put(p []byte) {
114	clear(p[:20])
115	v.Spec.Put(p[0:])
116	binary.LittleEndian.PutUint32(p[8:], uint32(v.Bytes))
117	binary.LittleEndian.PutUint32(p[12:], uint32(v.RefCount))
118	binary.LittleEndian.PutUint32(p[16:], uint32(v.UseCount))
119}
120func GetResourceSizeSpec(p []byte) (v ResourceSizeSpec) {
121	_ = p[19]
122	v.Spec = GetResourceIdSpec(p[0:])
123	v.Bytes = uint32(binary.LittleEndian.Uint32(p[8:]))
124	v.RefCount = uint32(binary.LittleEndian.Uint32(p[12:]))
125	v.UseCount = uint32(binary.LittleEndian.Uint32(p[16:]))
126	return
127}
128
129type ResourceSizeValue struct {
130	Size_              ResourceSizeSpec
131	NumCrossReferences uint32
132	CrossReferences    []ResourceSizeSpec
133}
134
135const ResourceSizeValueSize = 24
136
137func (v ResourceSizeValue) Size() int {
138	off := 0
139	off += 20
140	off += 4
141	off += len(v.CrossReferences) * 20
142	return off
143}
144func (v ResourceSizeValue) Put(p []byte) {
145	off := 0
146	v.Size_.Put(p[off:])
147	off += 20
148	binary.LittleEndian.PutUint32(p[off:], uint32(v.NumCrossReferences))
149	off += 4
150	for i := range v.CrossReferences {
151		v.CrossReferences[i].Put(p[off+i*20:])
152	}
153	off += len(v.CrossReferences) * 20
154}
155
156type ClientIdMask uint32
157
158const ClientIdMaskClientXID ClientIdMask = 1
159const ClientIdMaskLocalClientPID ClientIdMask = 2

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