v0.6.0 d4696de

fifo.go RawHistoryFolder

1// Code generated by wlgen; DO NOT EDIT.
2package fifo
3
4import (
5	"fmt"
6	wayland "github.com/bnema/purego-libwayland/protocol/wayland"
7	"github.com/bnema/purego-libwayland/server"
8)
9
10var WpFifoManagerV1Interface *server.Interface
11var WpFifoV1Interface *server.Interface
12
13func init() {
14	WpFifoManagerV1Interface = &server.Interface{Name: "wp_fifo_manager_v1", Version: 1}
15	WpFifoV1Interface = &server.Interface{Name: "wp_fifo_v1", Version: 1}
16	WpFifoManagerV1Interface.Requests = []server.Message{
17		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
18		{Name: "get_fifo", Signature: "no", Types: []*server.Interface{WpFifoV1Interface, wayland.SurfaceInterface}},
19	}
20	WpFifoManagerV1Interface.Events = []server.Message{}
21	WpFifoV1Interface.Requests = []server.Message{
22		{Name: "set_barrier", Signature: "", Types: []*server.Interface{}},
23		{Name: "wait_barrier", Signature: "", Types: []*server.Interface{}},
24		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
25	}
26	WpFifoV1Interface.Events = []server.Message{}
27	if err := server.NewInterfaces(WpFifoManagerV1Interface, WpFifoV1Interface); err != nil {
28		panic(err)
29	}
30}
31
32// WpFifoManagerV1 protocol for fifo constraints.
33type WpFifoManagerV1 struct{ *server.Resource }
34
35func WrapWpFifoManagerV1(r *server.Resource) *WpFifoManagerV1 {
36	if r == nil {
37		return nil
38	}
39	return &WpFifoManagerV1{r}
40}
41
42const WpFifoManagerV1RequestDestroy uint32 = 0
43const WpFifoManagerV1RequestGetFifo uint32 = 1
44
45// WpFifoManagerV1Error fatal presentation error.
46type WpFifoManagerV1Error uint32
47
48const (
49	WpFifoManagerV1ErrorAlreadyExists WpFifoManagerV1Error = 0
50)
51
52// WpFifoManagerV1Handler handles wp_fifo_manager_v1 requests.
53type WpFifoManagerV1Handler interface {
54	Destroy(self *WpFifoManagerV1)
55	GetFifo(self *WpFifoManagerV1, id uint32, surface *wayland.Surface)
56}
57
58func NewWpFifoManagerV1(c server.Client, version int32, id uint32, h WpFifoManagerV1Handler) (*WpFifoManagerV1, error) {
59	if h == nil {
60		return nil, fmt.Errorf("purego-libwayland: nil handler for wp_fifo_manager_v1")
61	}
62	var self *WpFifoManagerV1
63	r, err := c.CreateResource(WpFifoManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
64		switch opcode {
65		case 0:
66			h.Destroy(self)
67			self.Destroy()
68		case 1:
69			h.GetFifo(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()))
70		}
71	})
72	if err != nil {
73		return nil, err
74	}
75	self = WrapWpFifoManagerV1(r)
76	r.Data = self
77	return self, nil
78}
79func NewWpFifoManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
80	return d.CreateGlobal(WpFifoManagerV1Interface, version, bind)
81}
82
83// WpFifoV1 fifo interface.
84type WpFifoV1 struct{ *server.Resource }
85
86func WrapWpFifoV1(r *server.Resource) *WpFifoV1 {
87	if r == nil {
88		return nil
89	}
90	return &WpFifoV1{r}
91}
92
93const WpFifoV1RequestSetBarrier uint32 = 0
94const WpFifoV1RequestWaitBarrier uint32 = 1
95const WpFifoV1RequestDestroy uint32 = 2
96
97// WpFifoV1Error fatal error.
98type WpFifoV1Error uint32
99
100const (
101	WpFifoV1ErrorSurfaceDestroyed WpFifoV1Error = 0
102)
103
104// WpFifoV1Handler handles wp_fifo_v1 requests.
105type WpFifoV1Handler interface {
106	SetBarrier(self *WpFifoV1)
107	WaitBarrier(self *WpFifoV1)
108	Destroy(self *WpFifoV1)
109}
110
111func NewWpFifoV1(c server.Client, version int32, id uint32, h WpFifoV1Handler) (*WpFifoV1, error) {
112	if h == nil {
113		return nil, fmt.Errorf("purego-libwayland: nil handler for wp_fifo_v1")
114	}
115	var self *WpFifoV1
116	r, err := c.CreateResource(WpFifoV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
117		switch opcode {
118		case 0:
119			h.SetBarrier(self)
120		case 1:
121			h.WaitBarrier(self)
122		case 2:
123			h.Destroy(self)
124			self.Destroy()
125		}
126	})
127	if err != nil {
128		return nil, err
129	}
130	self = WrapWpFifoV1(r)
131	r.Data = self
132	return self, nil
133}
134func NewWpFifoV1Global(d *server.Display, version int32, bind server.BindFunc) error {
135	return d.CreateGlobal(WpFifoV1Interface, version, bind)
136}
137func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
138	if v == nil {
139		return nil
140	}
141	return v.GetResource()
142}
143func (self *WpFifoManagerV1) GetResource() *server.Resource {
144	if self == nil {
145		return nil
146	}
147	return self.Resource
148}
149func (self *WpFifoV1) GetResource() *server.Resource {
150	if self == nil {
151		return nil
152	}
153	return self.Resource
154}

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 14

↑↓ moveenter openesc close