detached 1a6c6c9

extbackgroundeffect_generated.go RawHistoryFolder

1// Code generated by wlbgen; DO NOT EDIT.
2
3// Upstream protocol copyright and license:
4// Copyright (C) 2015 Martin Gräßlin
5// Copyright (C) 2015 Marco Martin
6// Copyright (C) 2020 Vlad Zahorodnii
7// Copyright (C) 2024 Xaver Hugl
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 extbackgroundeffect
29
30import (
31	"fmt"
32	wayland "github.com/bnema/go-wayland-bindings/server/wayland"
33	"github.com/bnema/purego-libwayland/server"
34)
35
36var ExtBackgroundEffectManagerV1Interface *server.Interface
37var ExtBackgroundEffectSurfaceV1Interface *server.Interface
38
39func init() {
40	ExtBackgroundEffectManagerV1Interface = &server.Interface{Name: "ext_background_effect_manager_v1", Version: 1}
41	ExtBackgroundEffectSurfaceV1Interface = &server.Interface{Name: "ext_background_effect_surface_v1", Version: 1}
42	ExtBackgroundEffectManagerV1Interface.Requests = []server.Message{
43		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
44		{Name: "get_background_effect", Signature: "no", Types: []*server.Interface{ExtBackgroundEffectSurfaceV1Interface, wayland.SurfaceInterface}},
45	}
46	ExtBackgroundEffectManagerV1Interface.Events = []server.Message{
47		{Name: "capabilities", Signature: "u", Types: []*server.Interface{nil}},
48	}
49	ExtBackgroundEffectSurfaceV1Interface.Requests = []server.Message{
50		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
51		{Name: "set_blur_region", Signature: "?o", Types: []*server.Interface{wayland.RegionInterface}},
52	}
53	ExtBackgroundEffectSurfaceV1Interface.Events = []server.Message{}
54	if err := server.NewInterfaces(ExtBackgroundEffectManagerV1Interface, ExtBackgroundEffectSurfaceV1Interface); err != nil {
55		panic(err)
56	}
57}
58
59// ExtBackgroundEffectManagerV1 background effect factory.
60type ExtBackgroundEffectManagerV1 struct{ *server.Resource }
61
62func WrapExtBackgroundEffectManagerV1(r *server.Resource) *ExtBackgroundEffectManagerV1 {
63	if r == nil {
64		return nil
65	}
66	return &ExtBackgroundEffectManagerV1{r}
67}
68
69const ExtBackgroundEffectManagerV1RequestDestroy uint32 = 0
70const ExtBackgroundEffectManagerV1RequestGetBackgroundEffect uint32 = 1
71const ExtBackgroundEffectManagerV1EventCapabilities uint32 = 0
72
73// ExtBackgroundEffectManagerV1Error .
74type ExtBackgroundEffectManagerV1Error uint32
75
76const (
77	ExtBackgroundEffectManagerV1ErrorBackgroundEffectExists ExtBackgroundEffectManagerV1Error = 0
78)
79
80// ExtBackgroundEffectManagerV1Capability  (bitfield).
81type ExtBackgroundEffectManagerV1Capability uint32
82
83const (
84	ExtBackgroundEffectManagerV1CapabilityBlur ExtBackgroundEffectManagerV1Capability = 1
85)
86
87// ExtBackgroundEffectManagerV1Handler handles ext_background_effect_manager_v1 requests.
88type ExtBackgroundEffectManagerV1Handler interface {
89	Destroy(self *ExtBackgroundEffectManagerV1)
90	GetBackgroundEffect(self *ExtBackgroundEffectManagerV1, id uint32, surface *wayland.Surface)
91}
92
93func NewExtBackgroundEffectManagerV1(c server.Client, version int32, id uint32, h ExtBackgroundEffectManagerV1Handler) (*ExtBackgroundEffectManagerV1, error) {
94	if h == nil {
95		return nil, fmt.Errorf("purego-libwayland: nil handler for ext_background_effect_manager_v1")
96	}
97	var self *ExtBackgroundEffectManagerV1
98	r, err := c.CreateResource(ExtBackgroundEffectManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
99		switch opcode {
100		case 0:
101			h.Destroy(self)
102			self.Destroy()
103		case 1:
104			h.GetBackgroundEffect(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()))
105		}
106	})
107	if err != nil {
108		return nil, err
109	}
110	self = WrapExtBackgroundEffectManagerV1(r)
111	r.Data = self
112	return self, nil
113}
114
115// SendCapabilities capabilities of the compositor.
116func (self *ExtBackgroundEffectManagerV1) SendCapabilities(flags uint32) {
117	self.PostEvent(ExtBackgroundEffectManagerV1EventCapabilities, server.Uint(flags))
118}
119func NewExtBackgroundEffectManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
120	return d.CreateGlobal(ExtBackgroundEffectManagerV1Interface, version, bind)
121}
122
123// ExtBackgroundEffectSurfaceV1 background effects for a surface.
124type ExtBackgroundEffectSurfaceV1 struct{ *server.Resource }
125
126func WrapExtBackgroundEffectSurfaceV1(r *server.Resource) *ExtBackgroundEffectSurfaceV1 {
127	if r == nil {
128		return nil
129	}
130	return &ExtBackgroundEffectSurfaceV1{r}
131}
132
133const ExtBackgroundEffectSurfaceV1RequestDestroy uint32 = 0
134const ExtBackgroundEffectSurfaceV1RequestSetBlurRegion uint32 = 1
135
136// ExtBackgroundEffectSurfaceV1Error .
137type ExtBackgroundEffectSurfaceV1Error uint32
138
139const (
140	ExtBackgroundEffectSurfaceV1ErrorSurfaceDestroyed ExtBackgroundEffectSurfaceV1Error = 0
141)
142
143// ExtBackgroundEffectSurfaceV1Handler handles ext_background_effect_surface_v1 requests.
144type ExtBackgroundEffectSurfaceV1Handler interface {
145	Destroy(self *ExtBackgroundEffectSurfaceV1)
146	SetBlurRegion(self *ExtBackgroundEffectSurfaceV1, region *wayland.Region)
147}
148
149func NewExtBackgroundEffectSurfaceV1(c server.Client, version int32, id uint32, h ExtBackgroundEffectSurfaceV1Handler) (*ExtBackgroundEffectSurfaceV1, error) {
150	if h == nil {
151		return nil, fmt.Errorf("purego-libwayland: nil handler for ext_background_effect_surface_v1")
152	}
153	var self *ExtBackgroundEffectSurfaceV1
154	r, err := c.CreateResource(ExtBackgroundEffectSurfaceV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
155		switch opcode {
156		case 0:
157			h.Destroy(self)
158			self.Destroy()
159		case 1:
160			h.SetBlurRegion(self, wayland.WrapRegion(args[0].Resource()))
161		}
162	})
163	if err != nil {
164		return nil, err
165	}
166	self = WrapExtBackgroundEffectSurfaceV1(r)
167	r.Data = self
168	return self, nil
169}
170func NewExtBackgroundEffectSurfaceV1Global(d *server.Display, version int32, bind server.BindFunc) error {
171	return d.CreateGlobal(ExtBackgroundEffectSurfaceV1Interface, version, bind)
172}
173func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
174	if v == nil {
175		return nil
176	}
177	return v.GetResource()
178}
179func (self *ExtBackgroundEffectManagerV1) GetResource() *server.Resource {
180	if self == nil {
181		return nil
182	}
183	return self.Resource
184}
185func (self *ExtBackgroundEffectSurfaceV1) GetResource() *server.Resource {
186	if self == nil {
187		return nil
188	}
189	return self.Resource
190}

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