detached 1a6c6c9

xdgforeign_generated.go RawHistoryFolder

1// Code generated by wlbgen; DO NOT EDIT.
2
3// Upstream protocol copyright and license:
4// Copyright © 2015-2016 Red Hat Inc.
5//
6// Permission is hereby granted, free of charge, to any person obtaining a
7// copy of this software and associated documentation files (the "Software"),
8// to deal in the Software without restriction, including without limitation
9// the rights to use, copy, modify, merge, publish, distribute, sublicense,
10// and/or sell copies of the Software, and to permit persons to whom the
11// Software is furnished to do so, subject to the following conditions:
12//
13// The above copyright notice and this permission notice (including the next
14// paragraph) shall be included in all copies or substantial portions of the
15// Software.
16//
17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
20// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE.
24
25package xdgforeign
26
27import (
28	"fmt"
29	wayland "github.com/bnema/go-wayland-bindings/server/wayland"
30	"github.com/bnema/purego-libwayland/server"
31	"runtime"
32)
33
34var ZxdgExporterV2Interface *server.Interface
35var ZxdgImporterV2Interface *server.Interface
36var ZxdgExportedV2Interface *server.Interface
37var ZxdgImportedV2Interface *server.Interface
38
39func init() {
40	ZxdgExporterV2Interface = &server.Interface{Name: "zxdg_exporter_v2", Version: 1}
41	ZxdgImporterV2Interface = &server.Interface{Name: "zxdg_importer_v2", Version: 1}
42	ZxdgExportedV2Interface = &server.Interface{Name: "zxdg_exported_v2", Version: 1}
43	ZxdgImportedV2Interface = &server.Interface{Name: "zxdg_imported_v2", Version: 1}
44	ZxdgExporterV2Interface.Requests = []server.Message{
45		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
46		{Name: "export_toplevel", Signature: "no", Types: []*server.Interface{ZxdgExportedV2Interface, wayland.SurfaceInterface}},
47	}
48	ZxdgExporterV2Interface.Events = []server.Message{}
49	ZxdgImporterV2Interface.Requests = []server.Message{
50		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
51		{Name: "import_toplevel", Signature: "ns", Types: []*server.Interface{ZxdgImportedV2Interface, nil}},
52	}
53	ZxdgImporterV2Interface.Events = []server.Message{}
54	ZxdgExportedV2Interface.Requests = []server.Message{
55		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
56	}
57	ZxdgExportedV2Interface.Events = []server.Message{
58		{Name: "handle", Signature: "s", Types: []*server.Interface{nil}},
59	}
60	ZxdgImportedV2Interface.Requests = []server.Message{
61		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
62		{Name: "set_parent_of", Signature: "o", Types: []*server.Interface{wayland.SurfaceInterface}},
63	}
64	ZxdgImportedV2Interface.Events = []server.Message{
65		{Name: "destroyed", Signature: "", Types: []*server.Interface{}},
66	}
67	if err := server.NewInterfaces(ZxdgExporterV2Interface, ZxdgImporterV2Interface, ZxdgExportedV2Interface, ZxdgImportedV2Interface); err != nil {
68		panic(err)
69	}
70}
71
72// ZxdgExporterV2 interface for exporting surfaces.
73type ZxdgExporterV2 struct{ *server.Resource }
74
75func WrapZxdgExporterV2(r *server.Resource) *ZxdgExporterV2 {
76	if r == nil {
77		return nil
78	}
79	return &ZxdgExporterV2{r}
80}
81
82const ZxdgExporterV2RequestDestroy uint32 = 0
83const ZxdgExporterV2RequestExportToplevel uint32 = 1
84
85// ZxdgExporterV2Error error values.
86type ZxdgExporterV2Error uint32
87
88const (
89	ZxdgExporterV2ErrorInvalidSurface ZxdgExporterV2Error = 0
90)
91
92// ZxdgExporterV2Handler handles zxdg_exporter_v2 requests.
93type ZxdgExporterV2Handler interface {
94	Destroy(self *ZxdgExporterV2)
95	ExportToplevel(self *ZxdgExporterV2, id uint32, surface *wayland.Surface)
96}
97
98func NewZxdgExporterV2(c server.Client, version int32, id uint32, h ZxdgExporterV2Handler) (*ZxdgExporterV2, error) {
99	if h == nil {
100		return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_exporter_v2")
101	}
102	var self *ZxdgExporterV2
103	r, err := c.CreateResource(ZxdgExporterV2Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
104		switch opcode {
105		case 0:
106			h.Destroy(self)
107			self.Destroy()
108		case 1:
109			h.ExportToplevel(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()))
110		}
111	})
112	if err != nil {
113		return nil, err
114	}
115	self = WrapZxdgExporterV2(r)
116	r.Data = self
117	return self, nil
118}
119func NewZxdgExporterV2Global(d *server.Display, version int32, bind server.BindFunc) error {
120	return d.CreateGlobal(ZxdgExporterV2Interface, version, bind)
121}
122
123// ZxdgImporterV2 interface for importing surfaces.
124type ZxdgImporterV2 struct{ *server.Resource }
125
126func WrapZxdgImporterV2(r *server.Resource) *ZxdgImporterV2 {
127	if r == nil {
128		return nil
129	}
130	return &ZxdgImporterV2{r}
131}
132
133const ZxdgImporterV2RequestDestroy uint32 = 0
134const ZxdgImporterV2RequestImportToplevel uint32 = 1
135
136// ZxdgImporterV2Handler handles zxdg_importer_v2 requests.
137type ZxdgImporterV2Handler interface {
138	Destroy(self *ZxdgImporterV2)
139	ImportToplevel(self *ZxdgImporterV2, id uint32, handle string)
140}
141
142func NewZxdgImporterV2(c server.Client, version int32, id uint32, h ZxdgImporterV2Handler) (*ZxdgImporterV2, error) {
143	if h == nil {
144		return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_importer_v2")
145	}
146	var self *ZxdgImporterV2
147	r, err := c.CreateResource(ZxdgImporterV2Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
148		switch opcode {
149		case 0:
150			h.Destroy(self)
151			self.Destroy()
152		case 1:
153			h.ImportToplevel(self, args[0].NewID(), args[1].String())
154		}
155	})
156	if err != nil {
157		return nil, err
158	}
159	self = WrapZxdgImporterV2(r)
160	r.Data = self
161	return self, nil
162}
163func NewZxdgImporterV2Global(d *server.Display, version int32, bind server.BindFunc) error {
164	return d.CreateGlobal(ZxdgImporterV2Interface, version, bind)
165}
166
167// ZxdgExportedV2 an exported surface handle.
168type ZxdgExportedV2 struct{ *server.Resource }
169
170func WrapZxdgExportedV2(r *server.Resource) *ZxdgExportedV2 {
171	if r == nil {
172		return nil
173	}
174	return &ZxdgExportedV2{r}
175}
176
177const ZxdgExportedV2RequestDestroy uint32 = 0
178const ZxdgExportedV2EventHandle uint32 = 0
179
180// ZxdgExportedV2Handler handles zxdg_exported_v2 requests.
181type ZxdgExportedV2Handler interface {
182	Destroy(self *ZxdgExportedV2)
183}
184
185func NewZxdgExportedV2(c server.Client, version int32, id uint32, h ZxdgExportedV2Handler) (*ZxdgExportedV2, error) {
186	if h == nil {
187		return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_exported_v2")
188	}
189	var self *ZxdgExportedV2
190	r, err := c.CreateResource(ZxdgExportedV2Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
191		switch opcode {
192		case 0:
193			h.Destroy(self)
194			self.Destroy()
195		}
196	})
197	if err != nil {
198		return nil, err
199	}
200	self = WrapZxdgExportedV2(r)
201	r.Data = self
202	return self, nil
203}
204
205// SendHandle the exported surface handle.
206func (self *ZxdgExportedV2) SendHandle(handle string) {
207	var p runtime.Pinner
208	defer p.Unpin()
209	self.PostEvent(ZxdgExportedV2EventHandle, server.String(&p, handle, false))
210}
211func NewZxdgExportedV2Global(d *server.Display, version int32, bind server.BindFunc) error {
212	return d.CreateGlobal(ZxdgExportedV2Interface, version, bind)
213}
214
215// ZxdgImportedV2 an imported surface handle.
216type ZxdgImportedV2 struct{ *server.Resource }
217
218func WrapZxdgImportedV2(r *server.Resource) *ZxdgImportedV2 {
219	if r == nil {
220		return nil
221	}
222	return &ZxdgImportedV2{r}
223}
224
225const ZxdgImportedV2RequestDestroy uint32 = 0
226const ZxdgImportedV2RequestSetParentOf uint32 = 1
227const ZxdgImportedV2EventDestroyed uint32 = 0
228
229// ZxdgImportedV2Error error values.
230type ZxdgImportedV2Error uint32
231
232const (
233	ZxdgImportedV2ErrorInvalidSurface ZxdgImportedV2Error = 0
234)
235
236// ZxdgImportedV2Handler handles zxdg_imported_v2 requests.
237type ZxdgImportedV2Handler interface {
238	Destroy(self *ZxdgImportedV2)
239	SetParentOf(self *ZxdgImportedV2, surface *wayland.Surface)
240}
241
242func NewZxdgImportedV2(c server.Client, version int32, id uint32, h ZxdgImportedV2Handler) (*ZxdgImportedV2, error) {
243	if h == nil {
244		return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_imported_v2")
245	}
246	var self *ZxdgImportedV2
247	r, err := c.CreateResource(ZxdgImportedV2Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
248		switch opcode {
249		case 0:
250			h.Destroy(self)
251			self.Destroy()
252		case 1:
253			h.SetParentOf(self, wayland.WrapSurface(args[0].Resource()))
254		}
255	})
256	if err != nil {
257		return nil, err
258	}
259	self = WrapZxdgImportedV2(r)
260	r.Data = self
261	return self, nil
262}
263
264// SendDestroyed the imported surface handle has been destroyed.
265func (self *ZxdgImportedV2) SendDestroyed() {
266	self.PostEvent(ZxdgImportedV2EventDestroyed)
267}
268func NewZxdgImportedV2Global(d *server.Display, version int32, bind server.BindFunc) error {
269	return d.CreateGlobal(ZxdgImportedV2Interface, version, bind)
270}
271func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
272	if v == nil {
273		return nil
274	}
275	return v.GetResource()
276}
277func (self *ZxdgExporterV2) GetResource() *server.Resource {
278	if self == nil {
279		return nil
280	}
281	return self.Resource
282}
283func (self *ZxdgImporterV2) GetResource() *server.Resource {
284	if self == nil {
285		return nil
286	}
287	return self.Resource
288}
289func (self *ZxdgExportedV2) GetResource() *server.Resource {
290	if self == nil {
291		return nil
292	}
293	return self.Resource
294}
295func (self *ZxdgImportedV2) GetResource() *server.Resource {
296	if self == nil {
297		return nil
298	}
299	return self.Resource
300}

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