feat/freeze-key 753c87f

neferwl.go RawHistoryFolder

1// Code generated by wlgen; DO NOT EDIT.
2package neferwl
3
4import (
5	"fmt"
6	extimagecapturesource "github.com/bnema/purego-libwayland/protocol/extimagecapturesource"
7	extimagecopycapture "github.com/bnema/purego-libwayland/protocol/extimagecopycapture"
8	extworkspace "github.com/bnema/purego-libwayland/protocol/extworkspace"
9	wayland "github.com/bnema/purego-libwayland/protocol/wayland"
10	"github.com/bnema/purego-libwayland/server"
11	"runtime"
12)
13
14var NeferwlImageCaptureSourceManagerV1Interface *server.Interface
15var NeferwlWorkspaceFrameV1Interface *server.Interface
16var NeferwlCaptureExclusionManagerV1Interface *server.Interface
17var NeferwlCaptureExclusionV1Interface *server.Interface
18var NeferwlCaptureLayerV1Interface *server.Interface
19
20func init() {
21	NeferwlImageCaptureSourceManagerV1Interface = &server.Interface{Name: "neferwl_image_capture_source_manager_v1", Version: 1}
22	NeferwlWorkspaceFrameV1Interface = &server.Interface{Name: "neferwl_workspace_frame_v1", Version: 1}
23	NeferwlCaptureExclusionManagerV1Interface = &server.Interface{Name: "neferwl_capture_exclusion_manager_v1", Version: 1}
24	NeferwlCaptureExclusionV1Interface = &server.Interface{Name: "neferwl_capture_exclusion_v1", Version: 1}
25	NeferwlCaptureLayerV1Interface = &server.Interface{Name: "neferwl_capture_layer_v1", Version: 1}
26	NeferwlImageCaptureSourceManagerV1Interface.Requests = []server.Message{
27		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
28		{Name: "create_workspace_source", Signature: "no", Types: []*server.Interface{extimagecapturesource.ExtImageCaptureSourceV1Interface, extworkspace.ExtWorkspaceHandleV1Interface}},
29		{Name: "create_output_region_source", Signature: "noiiii", Types: []*server.Interface{extimagecapturesource.ExtImageCaptureSourceV1Interface, wayland.OutputInterface, nil, nil, nil, nil}},
30		{Name: "get_workspace_frame", Signature: "no", Types: []*server.Interface{NeferwlWorkspaceFrameV1Interface, extworkspace.ExtWorkspaceHandleV1Interface}},
31	}
32	NeferwlImageCaptureSourceManagerV1Interface.Events = []server.Message{}
33	NeferwlWorkspaceFrameV1Interface.Requests = []server.Message{
34		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
35	}
36	NeferwlWorkspaceFrameV1Interface.Events = []server.Message{
37		{Name: "frame", Signature: "iiii", Types: []*server.Interface{nil, nil, nil, nil}},
38	}
39	NeferwlCaptureExclusionManagerV1Interface.Requests = []server.Message{
40		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
41		{Name: "get_exclusion", Signature: "no", Types: []*server.Interface{NeferwlCaptureExclusionV1Interface, extimagecopycapture.ExtImageCopyCaptureSessionV1Interface}},
42		{Name: "attach_surface", Signature: "nso", Types: []*server.Interface{NeferwlCaptureLayerV1Interface, nil, wayland.SurfaceInterface}},
43	}
44	NeferwlCaptureExclusionManagerV1Interface.Events = []server.Message{}
45	NeferwlCaptureExclusionV1Interface.Requests = []server.Message{
46		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
47	}
48	NeferwlCaptureExclusionV1Interface.Events = []server.Message{
49		{Name: "token", Signature: "s", Types: []*server.Interface{nil}},
50		{Name: "failed", Signature: "u", Types: []*server.Interface{nil}},
51	}
52	NeferwlCaptureLayerV1Interface.Requests = []server.Message{
53		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
54	}
55	NeferwlCaptureLayerV1Interface.Events = []server.Message{
56		{Name: "attached", Signature: "", Types: []*server.Interface{}},
57		{Name: "failed", Signature: "u", Types: []*server.Interface{nil}},
58		{Name: "detached", Signature: "u", Types: []*server.Interface{nil}},
59	}
60	if err := server.NewInterfaces(NeferwlImageCaptureSourceManagerV1Interface, NeferwlWorkspaceFrameV1Interface, NeferwlCaptureExclusionManagerV1Interface, NeferwlCaptureExclusionV1Interface, NeferwlCaptureLayerV1Interface); err != nil {
61		panic(err)
62	}
63}
64
65// NeferwlImageCaptureSourceManagerV1 workspace and output-region capture sources.
66type NeferwlImageCaptureSourceManagerV1 struct{ *server.Resource }
67
68func WrapNeferwlImageCaptureSourceManagerV1(r *server.Resource) *NeferwlImageCaptureSourceManagerV1 {
69	if r == nil {
70		return nil
71	}
72	return &NeferwlImageCaptureSourceManagerV1{r}
73}
74
75const NeferwlImageCaptureSourceManagerV1RequestDestroy uint32 = 0
76const NeferwlImageCaptureSourceManagerV1RequestCreateWorkspaceSource uint32 = 1
77const NeferwlImageCaptureSourceManagerV1RequestCreateOutputRegionSource uint32 = 2
78const NeferwlImageCaptureSourceManagerV1RequestGetWorkspaceFrame uint32 = 3
79
80// NeferwlImageCaptureSourceManagerV1Error .
81type NeferwlImageCaptureSourceManagerV1Error uint32
82
83const (
84	NeferwlImageCaptureSourceManagerV1ErrorInvalidRegion NeferwlImageCaptureSourceManagerV1Error = 0
85)
86
87// NeferwlImageCaptureSourceManagerV1Handler handles neferwl_image_capture_source_manager_v1 requests.
88type NeferwlImageCaptureSourceManagerV1Handler interface {
89	Destroy(self *NeferwlImageCaptureSourceManagerV1)
90	CreateWorkspaceSource(self *NeferwlImageCaptureSourceManagerV1, source uint32, workspace *extworkspace.ExtWorkspaceHandleV1)
91	CreateOutputRegionSource(self *NeferwlImageCaptureSourceManagerV1, source uint32, output *wayland.Output, x int32, y int32, width int32, height int32)
92	GetWorkspaceFrame(self *NeferwlImageCaptureSourceManagerV1, id uint32, workspace *extworkspace.ExtWorkspaceHandleV1)
93}
94
95func NewNeferwlImageCaptureSourceManagerV1(c server.Client, version int32, id uint32, h NeferwlImageCaptureSourceManagerV1Handler) (*NeferwlImageCaptureSourceManagerV1, error) {
96	if h == nil {
97		return nil, fmt.Errorf("purego-libwayland: nil handler for neferwl_image_capture_source_manager_v1")
98	}
99	var self *NeferwlImageCaptureSourceManagerV1
100	r, err := c.CreateResource(NeferwlImageCaptureSourceManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
101		switch opcode {
102		case 0:
103			h.Destroy(self)
104			self.Destroy()
105		case 1:
106			h.CreateWorkspaceSource(self, args[0].NewID(), extworkspace.WrapExtWorkspaceHandleV1(args[1].Resource()))
107		case 2:
108			h.CreateOutputRegionSource(self, args[0].NewID(), wayland.WrapOutput(args[1].Resource()), args[2].Int(), args[3].Int(), args[4].Int(), args[5].Int())
109		case 3:
110			h.GetWorkspaceFrame(self, args[0].NewID(), extworkspace.WrapExtWorkspaceHandleV1(args[1].Resource()))
111		}
112	})
113	if err != nil {
114		return nil, err
115	}
116	self = WrapNeferwlImageCaptureSourceManagerV1(r)
117	r.Data = self
118	return self, nil
119}
120func NewNeferwlImageCaptureSourceManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
121	return d.CreateGlobal(NeferwlImageCaptureSourceManagerV1Interface, version, bind)
122}
123
124// NeferwlWorkspaceFrameV1 the frame of one workspace.
125type NeferwlWorkspaceFrameV1 struct{ *server.Resource }
126
127func WrapNeferwlWorkspaceFrameV1(r *server.Resource) *NeferwlWorkspaceFrameV1 {
128	if r == nil {
129		return nil
130	}
131	return &NeferwlWorkspaceFrameV1{r}
132}
133
134const NeferwlWorkspaceFrameV1RequestDestroy uint32 = 0
135const NeferwlWorkspaceFrameV1EventFrame uint32 = 0
136
137// NeferwlWorkspaceFrameV1Handler handles neferwl_workspace_frame_v1 requests.
138type NeferwlWorkspaceFrameV1Handler interface {
139	Destroy(self *NeferwlWorkspaceFrameV1)
140}
141
142func NewNeferwlWorkspaceFrameV1(c server.Client, version int32, id uint32, h NeferwlWorkspaceFrameV1Handler) (*NeferwlWorkspaceFrameV1, error) {
143	if h == nil {
144		return nil, fmt.Errorf("purego-libwayland: nil handler for neferwl_workspace_frame_v1")
145	}
146	var self *NeferwlWorkspaceFrameV1
147	r, err := c.CreateResource(NeferwlWorkspaceFrameV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
148		switch opcode {
149		case 0:
150			h.Destroy(self)
151			self.Destroy()
152		}
153	})
154	if err != nil {
155		return nil, err
156	}
157	self = WrapNeferwlWorkspaceFrameV1(r)
158	r.Data = self
159	return self, nil
160}
161
162// SendFrame the workspace frame.
163func (self *NeferwlWorkspaceFrameV1) SendFrame(x int32, y int32, width int32, height int32) {
164	self.PostEvent(NeferwlWorkspaceFrameV1EventFrame, server.Int(x), server.Int(y), server.Int(width), server.Int(height))
165}
166func NewNeferwlWorkspaceFrameV1Global(d *server.Display, version int32, bind server.BindFunc) error {
167	return d.CreateGlobal(NeferwlWorkspaceFrameV1Interface, version, bind)
168}
169
170// NeferwlCaptureExclusionManagerV1 leave a client's own surfaces out of its captures.
171type NeferwlCaptureExclusionManagerV1 struct{ *server.Resource }
172
173func WrapNeferwlCaptureExclusionManagerV1(r *server.Resource) *NeferwlCaptureExclusionManagerV1 {
174	if r == nil {
175		return nil
176	}
177	return &NeferwlCaptureExclusionManagerV1{r}
178}
179
180const NeferwlCaptureExclusionManagerV1RequestDestroy uint32 = 0
181const NeferwlCaptureExclusionManagerV1RequestGetExclusion uint32 = 1
182const NeferwlCaptureExclusionManagerV1RequestAttachSurface uint32 = 2
183
184// NeferwlCaptureExclusionManagerV1Error .
185type NeferwlCaptureExclusionManagerV1Error uint32
186
187const (
188	NeferwlCaptureExclusionManagerV1ErrorSurfaceRole       NeferwlCaptureExclusionManagerV1Error = 0
189	NeferwlCaptureExclusionManagerV1ErrorInvalidLayer      NeferwlCaptureExclusionManagerV1Error = 1
190	NeferwlCaptureExclusionManagerV1ErrorExclusiveKeyboard NeferwlCaptureExclusionManagerV1Error = 2
191	NeferwlCaptureExclusionManagerV1ErrorInvalidSurface    NeferwlCaptureExclusionManagerV1Error = 3
192	NeferwlCaptureExclusionManagerV1ErrorAlreadyExcluded   NeferwlCaptureExclusionManagerV1Error = 4
193)
194
195// NeferwlCaptureExclusionManagerV1Handler handles neferwl_capture_exclusion_manager_v1 requests.
196type NeferwlCaptureExclusionManagerV1Handler interface {
197	Destroy(self *NeferwlCaptureExclusionManagerV1)
198	GetExclusion(self *NeferwlCaptureExclusionManagerV1, id uint32, session *extimagecopycapture.ExtImageCopyCaptureSessionV1)
199	AttachSurface(self *NeferwlCaptureExclusionManagerV1, id uint32, token string, surface *wayland.Surface)
200}
201
202func NewNeferwlCaptureExclusionManagerV1(c server.Client, version int32, id uint32, h NeferwlCaptureExclusionManagerV1Handler) (*NeferwlCaptureExclusionManagerV1, error) {
203	if h == nil {
204		return nil, fmt.Errorf("purego-libwayland: nil handler for neferwl_capture_exclusion_manager_v1")
205	}
206	var self *NeferwlCaptureExclusionManagerV1
207	r, err := c.CreateResource(NeferwlCaptureExclusionManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
208		switch opcode {
209		case 0:
210			h.Destroy(self)
211			self.Destroy()
212		case 1:
213			h.GetExclusion(self, args[0].NewID(), extimagecopycapture.WrapExtImageCopyCaptureSessionV1(args[1].Resource()))
214		case 2:
215			h.AttachSurface(self, args[0].NewID(), args[1].String(), wayland.WrapSurface(args[2].Resource()))
216		}
217	})
218	if err != nil {
219		return nil, err
220	}
221	self = WrapNeferwlCaptureExclusionManagerV1(r)
222	r.Data = self
223	return self, nil
224}
225func NewNeferwlCaptureExclusionManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
226	return d.CreateGlobal(NeferwlCaptureExclusionManagerV1Interface, version, bind)
227}
228
229// NeferwlCaptureExclusionV1 the exclusion of one capture session.
230type NeferwlCaptureExclusionV1 struct{ *server.Resource }
231
232func WrapNeferwlCaptureExclusionV1(r *server.Resource) *NeferwlCaptureExclusionV1 {
233	if r == nil {
234		return nil
235	}
236	return &NeferwlCaptureExclusionV1{r}
237}
238
239const NeferwlCaptureExclusionV1RequestDestroy uint32 = 0
240const NeferwlCaptureExclusionV1EventToken uint32 = 0
241const NeferwlCaptureExclusionV1EventFailed uint32 = 1
242
243// NeferwlCaptureExclusionV1Failure .
244type NeferwlCaptureExclusionV1Failure uint32
245
246const (
247	NeferwlCaptureExclusionV1FailureBusy           NeferwlCaptureExclusionV1Failure = 0
248	NeferwlCaptureExclusionV1FailureSessionStopped NeferwlCaptureExclusionV1Failure = 1
249)
250
251// NeferwlCaptureExclusionV1Handler handles neferwl_capture_exclusion_v1 requests.
252type NeferwlCaptureExclusionV1Handler interface {
253	Destroy(self *NeferwlCaptureExclusionV1)
254}
255
256func NewNeferwlCaptureExclusionV1(c server.Client, version int32, id uint32, h NeferwlCaptureExclusionV1Handler) (*NeferwlCaptureExclusionV1, error) {
257	if h == nil {
258		return nil, fmt.Errorf("purego-libwayland: nil handler for neferwl_capture_exclusion_v1")
259	}
260	var self *NeferwlCaptureExclusionV1
261	r, err := c.CreateResource(NeferwlCaptureExclusionV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
262		switch opcode {
263		case 0:
264			h.Destroy(self)
265			self.Destroy()
266		}
267	})
268	if err != nil {
269		return nil, err
270	}
271	self = WrapNeferwlCaptureExclusionV1(r)
272	r.Data = self
273	return self, nil
274}
275
276// SendToken the attachment token.
277func (self *NeferwlCaptureExclusionV1) SendToken(token string) {
278	var p runtime.Pinner
279	defer p.Unpin()
280	self.PostEvent(NeferwlCaptureExclusionV1EventToken, server.String(&p, token, false))
281}
282
283// SendFailed no exclusion.
284func (self *NeferwlCaptureExclusionV1) SendFailed(reason uint32) {
285	self.PostEvent(NeferwlCaptureExclusionV1EventFailed, server.Uint(reason))
286}
287func NewNeferwlCaptureExclusionV1Global(d *server.Display, version int32, bind server.BindFunc) error {
288	return d.CreateGlobal(NeferwlCaptureExclusionV1Interface, version, bind)
289}
290
291// NeferwlCaptureLayerV1 a layer surface attached to an exclusion.
292type NeferwlCaptureLayerV1 struct{ *server.Resource }
293
294func WrapNeferwlCaptureLayerV1(r *server.Resource) *NeferwlCaptureLayerV1 {
295	if r == nil {
296		return nil
297	}
298	return &NeferwlCaptureLayerV1{r}
299}
300
301const NeferwlCaptureLayerV1RequestDestroy uint32 = 0
302const NeferwlCaptureLayerV1EventAttached uint32 = 0
303const NeferwlCaptureLayerV1EventFailed uint32 = 1
304const NeferwlCaptureLayerV1EventDetached uint32 = 2
305
306// NeferwlCaptureLayerV1Failure .
307type NeferwlCaptureLayerV1Failure uint32
308
309const (
310	NeferwlCaptureLayerV1FailureUnknownToken    NeferwlCaptureLayerV1Failure = 0
311	NeferwlCaptureLayerV1FailureUnauthorized    NeferwlCaptureLayerV1Failure = 1
312	NeferwlCaptureLayerV1FailureTooManyLayers   NeferwlCaptureLayerV1Failure = 2
313	NeferwlCaptureLayerV1FailureAlreadyAttached NeferwlCaptureLayerV1Failure = 3
314	NeferwlCaptureLayerV1FailureExclusionEnded  NeferwlCaptureLayerV1Failure = 4
315	NeferwlCaptureLayerV1FailureLayerDestroyed  NeferwlCaptureLayerV1Failure = 5
316)
317
318// NeferwlCaptureLayerV1DetachReason .
319type NeferwlCaptureLayerV1DetachReason uint32
320
321const (
322	NeferwlCaptureLayerV1DetachReasonExclusionEnded NeferwlCaptureLayerV1DetachReason = 0
323	NeferwlCaptureLayerV1DetachReasonLayerDestroyed NeferwlCaptureLayerV1DetachReason = 1
324)
325
326// NeferwlCaptureLayerV1Handler handles neferwl_capture_layer_v1 requests.
327type NeferwlCaptureLayerV1Handler interface {
328	Destroy(self *NeferwlCaptureLayerV1)
329}
330
331func NewNeferwlCaptureLayerV1(c server.Client, version int32, id uint32, h NeferwlCaptureLayerV1Handler) (*NeferwlCaptureLayerV1, error) {
332	if h == nil {
333		return nil, fmt.Errorf("purego-libwayland: nil handler for neferwl_capture_layer_v1")
334	}
335	var self *NeferwlCaptureLayerV1
336	r, err := c.CreateResource(NeferwlCaptureLayerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
337		switch opcode {
338		case 0:
339			h.Destroy(self)
340			self.Destroy()
341		}
342	})
343	if err != nil {
344		return nil, err
345	}
346	self = WrapNeferwlCaptureLayerV1(r)
347	r.Data = self
348	return self, nil
349}
350
351// SendAttached the layer is excluded.
352func (self *NeferwlCaptureLayerV1) SendAttached() {
353	self.PostEvent(NeferwlCaptureLayerV1EventAttached)
354}
355
356// SendFailed the attachment was refused.
357func (self *NeferwlCaptureLayerV1) SendFailed(reason uint32) {
358	self.PostEvent(NeferwlCaptureLayerV1EventFailed, server.Uint(reason))
359}
360
361// SendDetached the layer left the exclusion.
362func (self *NeferwlCaptureLayerV1) SendDetached(reason uint32) {
363	self.PostEvent(NeferwlCaptureLayerV1EventDetached, server.Uint(reason))
364}
365func NewNeferwlCaptureLayerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
366	return d.CreateGlobal(NeferwlCaptureLayerV1Interface, version, bind)
367}
368func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
369	if v == nil {
370		return nil
371	}
372	return v.GetResource()
373}
374func (self *NeferwlImageCaptureSourceManagerV1) GetResource() *server.Resource {
375	if self == nil {
376		return nil
377	}
378	return self.Resource
379}
380func (self *NeferwlWorkspaceFrameV1) GetResource() *server.Resource {
381	if self == nil {
382		return nil
383	}
384	return self.Resource
385}
386func (self *NeferwlCaptureExclusionManagerV1) GetResource() *server.Resource {
387	if self == nil {
388		return nil
389	}
390	return self.Resource
391}
392func (self *NeferwlCaptureExclusionV1) GetResource() *server.Resource {
393	if self == nil {
394		return nil
395	}
396	return self.Resource
397}
398func (self *NeferwlCaptureLayerV1) GetResource() *server.Resource {
399	if self == nil {
400		return nil
401	}
402	return self.Resource
403}

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 2

Tags 9

↑↓ moveenter openesc close