v0.1.0 1a6c6c9

linuxdrmsyncobj_generated.go RawHistoryFolder

1// Code generated by wlbgen; DO NOT EDIT.
2
3// Upstream protocol copyright and license:
4// Copyright 2016 The Chromium Authors.
5// Copyright 2017 Intel Corporation
6// Copyright 2018 Collabora, Ltd
7// Copyright 2021 Simon Ser
8//
9// Permission is hereby granted, free of charge, to any person obtaining a
10// copy of this software and associated documentation files (the "Software"),
11// to deal in the Software without restriction, including without limitation
12// the rights to use, copy, modify, merge, publish, distribute, sublicense,
13// and/or sell copies of the Software, and to permit persons to whom the
14// Software is furnished to do so, subject to the following conditions:
15//
16// The above copyright notice and this permission notice (including the next
17// paragraph) shall be included in all copies or substantial portions of the
18// Software.
19//
20// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26// DEALINGS IN THE SOFTWARE.
27
28package linuxdrmsyncobj
29
30import (
31	"fmt"
32	wayland "github.com/bnema/go-wayland-bindings/server/wayland"
33	"github.com/bnema/purego-libwayland/server"
34)
35
36var WpLinuxDrmSyncobjManagerV1Interface *server.Interface
37var WpLinuxDrmSyncobjTimelineV1Interface *server.Interface
38var WpLinuxDrmSyncobjSurfaceV1Interface *server.Interface
39
40func init() {
41	WpLinuxDrmSyncobjManagerV1Interface = &server.Interface{Name: "wp_linux_drm_syncobj_manager_v1", Version: 1}
42	WpLinuxDrmSyncobjTimelineV1Interface = &server.Interface{Name: "wp_linux_drm_syncobj_timeline_v1", Version: 1}
43	WpLinuxDrmSyncobjSurfaceV1Interface = &server.Interface{Name: "wp_linux_drm_syncobj_surface_v1", Version: 1}
44	WpLinuxDrmSyncobjManagerV1Interface.Requests = []server.Message{
45		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
46		{Name: "get_surface", Signature: "no", Types: []*server.Interface{WpLinuxDrmSyncobjSurfaceV1Interface, wayland.SurfaceInterface}},
47		{Name: "import_timeline", Signature: "nh", Types: []*server.Interface{WpLinuxDrmSyncobjTimelineV1Interface, nil}},
48	}
49	WpLinuxDrmSyncobjManagerV1Interface.Events = []server.Message{}
50	WpLinuxDrmSyncobjTimelineV1Interface.Requests = []server.Message{
51		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
52	}
53	WpLinuxDrmSyncobjTimelineV1Interface.Events = []server.Message{}
54	WpLinuxDrmSyncobjSurfaceV1Interface.Requests = []server.Message{
55		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
56		{Name: "set_acquire_point", Signature: "ouu", Types: []*server.Interface{WpLinuxDrmSyncobjTimelineV1Interface, nil, nil}},
57		{Name: "set_release_point", Signature: "ouu", Types: []*server.Interface{WpLinuxDrmSyncobjTimelineV1Interface, nil, nil}},
58	}
59	WpLinuxDrmSyncobjSurfaceV1Interface.Events = []server.Message{}
60	if err := server.NewInterfaces(WpLinuxDrmSyncobjManagerV1Interface, WpLinuxDrmSyncobjTimelineV1Interface, WpLinuxDrmSyncobjSurfaceV1Interface); err != nil {
61		panic(err)
62	}
63}
64
65// WpLinuxDrmSyncobjManagerV1 global for providing explicit synchronization.
66type WpLinuxDrmSyncobjManagerV1 struct{ *server.Resource }
67
68func WrapWpLinuxDrmSyncobjManagerV1(r *server.Resource) *WpLinuxDrmSyncobjManagerV1 {
69	if r == nil {
70		return nil
71	}
72	return &WpLinuxDrmSyncobjManagerV1{r}
73}
74
75const WpLinuxDrmSyncobjManagerV1RequestDestroy uint32 = 0
76const WpLinuxDrmSyncobjManagerV1RequestGetSurface uint32 = 1
77const WpLinuxDrmSyncobjManagerV1RequestImportTimeline uint32 = 2
78
79// WpLinuxDrmSyncobjManagerV1Error .
80type WpLinuxDrmSyncobjManagerV1Error uint32
81
82const (
83	WpLinuxDrmSyncobjManagerV1ErrorSurfaceExists   WpLinuxDrmSyncobjManagerV1Error = 0
84	WpLinuxDrmSyncobjManagerV1ErrorInvalidTimeline WpLinuxDrmSyncobjManagerV1Error = 1
85)
86
87// WpLinuxDrmSyncobjManagerV1Handler handles wp_linux_drm_syncobj_manager_v1 requests.
88type WpLinuxDrmSyncobjManagerV1Handler interface {
89	Destroy(self *WpLinuxDrmSyncobjManagerV1)
90	GetSurface(self *WpLinuxDrmSyncobjManagerV1, id uint32, surface *wayland.Surface)
91	ImportTimeline(self *WpLinuxDrmSyncobjManagerV1, id uint32, fd int)
92}
93
94func NewWpLinuxDrmSyncobjManagerV1(c server.Client, version int32, id uint32, h WpLinuxDrmSyncobjManagerV1Handler) (*WpLinuxDrmSyncobjManagerV1, error) {
95	if h == nil {
96		return nil, fmt.Errorf("purego-libwayland: nil handler for wp_linux_drm_syncobj_manager_v1")
97	}
98	var self *WpLinuxDrmSyncobjManagerV1
99	r, err := c.CreateResource(WpLinuxDrmSyncobjManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
100		switch opcode {
101		case 0:
102			h.Destroy(self)
103			self.Destroy()
104		case 1:
105			h.GetSurface(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()))
106		case 2:
107			h.ImportTimeline(self, args[0].NewID(), args[1].Fd())
108		}
109	})
110	if err != nil {
111		return nil, err
112	}
113	self = WrapWpLinuxDrmSyncobjManagerV1(r)
114	r.Data = self
115	return self, nil
116}
117func NewWpLinuxDrmSyncobjManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
118	return d.CreateGlobal(WpLinuxDrmSyncobjManagerV1Interface, version, bind)
119}
120
121// WpLinuxDrmSyncobjTimelineV1 synchronization object timeline.
122type WpLinuxDrmSyncobjTimelineV1 struct{ *server.Resource }
123
124func WrapWpLinuxDrmSyncobjTimelineV1(r *server.Resource) *WpLinuxDrmSyncobjTimelineV1 {
125	if r == nil {
126		return nil
127	}
128	return &WpLinuxDrmSyncobjTimelineV1{r}
129}
130
131const WpLinuxDrmSyncobjTimelineV1RequestDestroy uint32 = 0
132
133// WpLinuxDrmSyncobjTimelineV1Handler handles wp_linux_drm_syncobj_timeline_v1 requests.
134type WpLinuxDrmSyncobjTimelineV1Handler interface {
135	Destroy(self *WpLinuxDrmSyncobjTimelineV1)
136}
137
138func NewWpLinuxDrmSyncobjTimelineV1(c server.Client, version int32, id uint32, h WpLinuxDrmSyncobjTimelineV1Handler) (*WpLinuxDrmSyncobjTimelineV1, error) {
139	if h == nil {
140		return nil, fmt.Errorf("purego-libwayland: nil handler for wp_linux_drm_syncobj_timeline_v1")
141	}
142	var self *WpLinuxDrmSyncobjTimelineV1
143	r, err := c.CreateResource(WpLinuxDrmSyncobjTimelineV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
144		switch opcode {
145		case 0:
146			h.Destroy(self)
147			self.Destroy()
148		}
149	})
150	if err != nil {
151		return nil, err
152	}
153	self = WrapWpLinuxDrmSyncobjTimelineV1(r)
154	r.Data = self
155	return self, nil
156}
157func NewWpLinuxDrmSyncobjTimelineV1Global(d *server.Display, version int32, bind server.BindFunc) error {
158	return d.CreateGlobal(WpLinuxDrmSyncobjTimelineV1Interface, version, bind)
159}
160
161// WpLinuxDrmSyncobjSurfaceV1 per-surface explicit synchronization.
162type WpLinuxDrmSyncobjSurfaceV1 struct{ *server.Resource }
163
164func WrapWpLinuxDrmSyncobjSurfaceV1(r *server.Resource) *WpLinuxDrmSyncobjSurfaceV1 {
165	if r == nil {
166		return nil
167	}
168	return &WpLinuxDrmSyncobjSurfaceV1{r}
169}
170
171const WpLinuxDrmSyncobjSurfaceV1RequestDestroy uint32 = 0
172const WpLinuxDrmSyncobjSurfaceV1RequestSetAcquirePoint uint32 = 1
173const WpLinuxDrmSyncobjSurfaceV1RequestSetReleasePoint uint32 = 2
174
175// WpLinuxDrmSyncobjSurfaceV1Error .
176type WpLinuxDrmSyncobjSurfaceV1Error uint32
177
178const (
179	WpLinuxDrmSyncobjSurfaceV1ErrorNoSurface         WpLinuxDrmSyncobjSurfaceV1Error = 1
180	WpLinuxDrmSyncobjSurfaceV1ErrorUnsupportedBuffer WpLinuxDrmSyncobjSurfaceV1Error = 2
181	WpLinuxDrmSyncobjSurfaceV1ErrorNoBuffer          WpLinuxDrmSyncobjSurfaceV1Error = 3
182	WpLinuxDrmSyncobjSurfaceV1ErrorNoAcquirePoint    WpLinuxDrmSyncobjSurfaceV1Error = 4
183	WpLinuxDrmSyncobjSurfaceV1ErrorNoReleasePoint    WpLinuxDrmSyncobjSurfaceV1Error = 5
184	WpLinuxDrmSyncobjSurfaceV1ErrorConflictingPoints WpLinuxDrmSyncobjSurfaceV1Error = 6
185)
186
187// WpLinuxDrmSyncobjSurfaceV1Handler handles wp_linux_drm_syncobj_surface_v1 requests.
188type WpLinuxDrmSyncobjSurfaceV1Handler interface {
189	Destroy(self *WpLinuxDrmSyncobjSurfaceV1)
190	SetAcquirePoint(self *WpLinuxDrmSyncobjSurfaceV1, timeline *WpLinuxDrmSyncobjTimelineV1, pointHi uint32, pointLo uint32)
191	SetReleasePoint(self *WpLinuxDrmSyncobjSurfaceV1, timeline *WpLinuxDrmSyncobjTimelineV1, pointHi uint32, pointLo uint32)
192}
193
194func NewWpLinuxDrmSyncobjSurfaceV1(c server.Client, version int32, id uint32, h WpLinuxDrmSyncobjSurfaceV1Handler) (*WpLinuxDrmSyncobjSurfaceV1, error) {
195	if h == nil {
196		return nil, fmt.Errorf("purego-libwayland: nil handler for wp_linux_drm_syncobj_surface_v1")
197	}
198	var self *WpLinuxDrmSyncobjSurfaceV1
199	r, err := c.CreateResource(WpLinuxDrmSyncobjSurfaceV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
200		switch opcode {
201		case 0:
202			h.Destroy(self)
203			self.Destroy()
204		case 1:
205			h.SetAcquirePoint(self, WrapWpLinuxDrmSyncobjTimelineV1(args[0].Resource()), args[1].Uint(), args[2].Uint())
206		case 2:
207			h.SetReleasePoint(self, WrapWpLinuxDrmSyncobjTimelineV1(args[0].Resource()), args[1].Uint(), args[2].Uint())
208		}
209	})
210	if err != nil {
211		return nil, err
212	}
213	self = WrapWpLinuxDrmSyncobjSurfaceV1(r)
214	r.Data = self
215	return self, nil
216}
217func NewWpLinuxDrmSyncobjSurfaceV1Global(d *server.Display, version int32, bind server.BindFunc) error {
218	return d.CreateGlobal(WpLinuxDrmSyncobjSurfaceV1Interface, version, bind)
219}
220func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
221	if v == nil {
222		return nil
223	}
224	return v.GetResource()
225}
226func (self *WpLinuxDrmSyncobjManagerV1) GetResource() *server.Resource {
227	if self == nil {
228		return nil
229	}
230	return self.Resource
231}
232func (self *WpLinuxDrmSyncobjTimelineV1) GetResource() *server.Resource {
233	if self == nil {
234		return nil
235	}
236	return self.Resource
237}
238func (self *WpLinuxDrmSyncobjSurfaceV1) GetResource() *server.Resource {
239	if self == nil {
240		return nil
241	}
242	return self.Resource
243}

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