detached 1a6c6c9

extimagecapturesource_generated.go RawHistoryFolder

1// Code generated by wlbgen; DO NOT EDIT.
2
3// Upstream protocol copyright and license:
4// Copyright © 2022 Andri Yngvason
5// Copyright © 2024 Simon Ser
6//
7// Permission is hereby granted, free of charge, to any person obtaining a
8// copy of this software and associated documentation files (the "Software"),
9// to deal in the Software without restriction, including without limitation
10// the rights to use, copy, modify, merge, publish, distribute, sublicense,
11// and/or sell copies of the Software, and to permit persons to whom the
12// Software is furnished to do so, subject to the following conditions:
13//
14// The above copyright notice and this permission notice (including the next
15// paragraph) shall be included in all copies or substantial portions of the
16// Software.
17//
18// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24// DEALINGS IN THE SOFTWARE.
25
26package extimagecapturesource
27
28import (
29	"fmt"
30	extforeigntoplevellist "github.com/bnema/go-wayland-bindings/server/extforeigntoplevellist"
31	wayland "github.com/bnema/go-wayland-bindings/server/wayland"
32	"github.com/bnema/purego-libwayland/server"
33)
34
35var ExtImageCaptureSourceV1Interface *server.Interface
36var ExtOutputImageCaptureSourceManagerV1Interface *server.Interface
37var ExtForeignToplevelImageCaptureSourceManagerV1Interface *server.Interface
38
39func init() {
40	ExtImageCaptureSourceV1Interface = &server.Interface{Name: "ext_image_capture_source_v1", Version: 1}
41	ExtOutputImageCaptureSourceManagerV1Interface = &server.Interface{Name: "ext_output_image_capture_source_manager_v1", Version: 1}
42	ExtForeignToplevelImageCaptureSourceManagerV1Interface = &server.Interface{Name: "ext_foreign_toplevel_image_capture_source_manager_v1", Version: 1}
43	ExtImageCaptureSourceV1Interface.Requests = []server.Message{
44		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
45	}
46	ExtImageCaptureSourceV1Interface.Events = []server.Message{}
47	ExtOutputImageCaptureSourceManagerV1Interface.Requests = []server.Message{
48		{Name: "create_source", Signature: "no", Types: []*server.Interface{ExtImageCaptureSourceV1Interface, wayland.OutputInterface}},
49		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
50	}
51	ExtOutputImageCaptureSourceManagerV1Interface.Events = []server.Message{}
52	ExtForeignToplevelImageCaptureSourceManagerV1Interface.Requests = []server.Message{
53		{Name: "create_source", Signature: "no", Types: []*server.Interface{ExtImageCaptureSourceV1Interface, extforeigntoplevellist.ExtForeignToplevelHandleV1Interface}},
54		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
55	}
56	ExtForeignToplevelImageCaptureSourceManagerV1Interface.Events = []server.Message{}
57	if err := server.NewInterfaces(ExtImageCaptureSourceV1Interface, ExtOutputImageCaptureSourceManagerV1Interface, ExtForeignToplevelImageCaptureSourceManagerV1Interface); err != nil {
58		panic(err)
59	}
60}
61
62// ExtImageCaptureSourceV1 opaque image capture source object.
63type ExtImageCaptureSourceV1 struct{ *server.Resource }
64
65func WrapExtImageCaptureSourceV1(r *server.Resource) *ExtImageCaptureSourceV1 {
66	if r == nil {
67		return nil
68	}
69	return &ExtImageCaptureSourceV1{r}
70}
71
72const ExtImageCaptureSourceV1RequestDestroy uint32 = 0
73
74// ExtImageCaptureSourceV1Handler handles ext_image_capture_source_v1 requests.
75type ExtImageCaptureSourceV1Handler interface {
76	Destroy(self *ExtImageCaptureSourceV1)
77}
78
79func NewExtImageCaptureSourceV1(c server.Client, version int32, id uint32, h ExtImageCaptureSourceV1Handler) (*ExtImageCaptureSourceV1, error) {
80	if h == nil {
81		return nil, fmt.Errorf("purego-libwayland: nil handler for ext_image_capture_source_v1")
82	}
83	var self *ExtImageCaptureSourceV1
84	r, err := c.CreateResource(ExtImageCaptureSourceV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
85		switch opcode {
86		case 0:
87			h.Destroy(self)
88			self.Destroy()
89		}
90	})
91	if err != nil {
92		return nil, err
93	}
94	self = WrapExtImageCaptureSourceV1(r)
95	r.Data = self
96	return self, nil
97}
98func NewExtImageCaptureSourceV1Global(d *server.Display, version int32, bind server.BindFunc) error {
99	return d.CreateGlobal(ExtImageCaptureSourceV1Interface, version, bind)
100}
101
102// ExtOutputImageCaptureSourceManagerV1 image capture source manager for outputs.
103type ExtOutputImageCaptureSourceManagerV1 struct{ *server.Resource }
104
105func WrapExtOutputImageCaptureSourceManagerV1(r *server.Resource) *ExtOutputImageCaptureSourceManagerV1 {
106	if r == nil {
107		return nil
108	}
109	return &ExtOutputImageCaptureSourceManagerV1{r}
110}
111
112const ExtOutputImageCaptureSourceManagerV1RequestCreateSource uint32 = 0
113const ExtOutputImageCaptureSourceManagerV1RequestDestroy uint32 = 1
114
115// ExtOutputImageCaptureSourceManagerV1Handler handles ext_output_image_capture_source_manager_v1 requests.
116type ExtOutputImageCaptureSourceManagerV1Handler interface {
117	CreateSource(self *ExtOutputImageCaptureSourceManagerV1, source uint32, output *wayland.Output)
118	Destroy(self *ExtOutputImageCaptureSourceManagerV1)
119}
120
121func NewExtOutputImageCaptureSourceManagerV1(c server.Client, version int32, id uint32, h ExtOutputImageCaptureSourceManagerV1Handler) (*ExtOutputImageCaptureSourceManagerV1, error) {
122	if h == nil {
123		return nil, fmt.Errorf("purego-libwayland: nil handler for ext_output_image_capture_source_manager_v1")
124	}
125	var self *ExtOutputImageCaptureSourceManagerV1
126	r, err := c.CreateResource(ExtOutputImageCaptureSourceManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
127		switch opcode {
128		case 0:
129			h.CreateSource(self, args[0].NewID(), wayland.WrapOutput(args[1].Resource()))
130		case 1:
131			h.Destroy(self)
132			self.Destroy()
133		}
134	})
135	if err != nil {
136		return nil, err
137	}
138	self = WrapExtOutputImageCaptureSourceManagerV1(r)
139	r.Data = self
140	return self, nil
141}
142func NewExtOutputImageCaptureSourceManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
143	return d.CreateGlobal(ExtOutputImageCaptureSourceManagerV1Interface, version, bind)
144}
145
146// ExtForeignToplevelImageCaptureSourceManagerV1 image capture source manager for foreign toplevels.
147type ExtForeignToplevelImageCaptureSourceManagerV1 struct{ *server.Resource }
148
149func WrapExtForeignToplevelImageCaptureSourceManagerV1(r *server.Resource) *ExtForeignToplevelImageCaptureSourceManagerV1 {
150	if r == nil {
151		return nil
152	}
153	return &ExtForeignToplevelImageCaptureSourceManagerV1{r}
154}
155
156const ExtForeignToplevelImageCaptureSourceManagerV1RequestCreateSource uint32 = 0
157const ExtForeignToplevelImageCaptureSourceManagerV1RequestDestroy uint32 = 1
158
159// ExtForeignToplevelImageCaptureSourceManagerV1Handler handles ext_foreign_toplevel_image_capture_source_manager_v1 requests.
160type ExtForeignToplevelImageCaptureSourceManagerV1Handler interface {
161	CreateSource(self *ExtForeignToplevelImageCaptureSourceManagerV1, source uint32, toplevelHandle *extforeigntoplevellist.ExtForeignToplevelHandleV1)
162	Destroy(self *ExtForeignToplevelImageCaptureSourceManagerV1)
163}
164
165func NewExtForeignToplevelImageCaptureSourceManagerV1(c server.Client, version int32, id uint32, h ExtForeignToplevelImageCaptureSourceManagerV1Handler) (*ExtForeignToplevelImageCaptureSourceManagerV1, error) {
166	if h == nil {
167		return nil, fmt.Errorf("purego-libwayland: nil handler for ext_foreign_toplevel_image_capture_source_manager_v1")
168	}
169	var self *ExtForeignToplevelImageCaptureSourceManagerV1
170	r, err := c.CreateResource(ExtForeignToplevelImageCaptureSourceManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
171		switch opcode {
172		case 0:
173			h.CreateSource(self, args[0].NewID(), extforeigntoplevellist.WrapExtForeignToplevelHandleV1(args[1].Resource()))
174		case 1:
175			h.Destroy(self)
176			self.Destroy()
177		}
178	})
179	if err != nil {
180		return nil, err
181	}
182	self = WrapExtForeignToplevelImageCaptureSourceManagerV1(r)
183	r.Data = self
184	return self, nil
185}
186func NewExtForeignToplevelImageCaptureSourceManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
187	return d.CreateGlobal(ExtForeignToplevelImageCaptureSourceManagerV1Interface, version, bind)
188}
189func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
190	if v == nil {
191		return nil
192	}
193	return v.GetResource()
194}
195func (self *ExtImageCaptureSourceV1) GetResource() *server.Resource {
196	if self == nil {
197		return nil
198	}
199	return self.Resource
200}
201func (self *ExtOutputImageCaptureSourceManagerV1) GetResource() *server.Resource {
202	if self == nil {
203		return nil
204	}
205	return self.Resource
206}
207func (self *ExtForeignToplevelImageCaptureSourceManagerV1) GetResource() *server.Resource {
208	if self == nil {
209		return nil
210	}
211	return self.Resource
212}

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