v0.4.0 91c6a74

extbackgroundeffect.go RawHistoryFolder

1// Code generated by wlgen; DO NOT EDIT.
2package extbackgroundeffect
3
4import (
5	"fmt"
6	wayland "github.com/bnema/purego-libwayland/protocol/wayland"
7	"github.com/bnema/purego-libwayland/server"
8)
9
10var ExtBackgroundEffectManagerV1Interface *server.Interface
11var ExtBackgroundEffectSurfaceV1Interface *server.Interface
12
13func init() {
14	ExtBackgroundEffectManagerV1Interface = &server.Interface{Name: "ext_background_effect_manager_v1", Version: 1}
15	ExtBackgroundEffectSurfaceV1Interface = &server.Interface{Name: "ext_background_effect_surface_v1", Version: 1}
16	ExtBackgroundEffectManagerV1Interface.Requests = []server.Message{
17		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
18		{Name: "get_background_effect", Signature: "no", Types: []*server.Interface{ExtBackgroundEffectSurfaceV1Interface, wayland.SurfaceInterface}},
19	}
20	ExtBackgroundEffectManagerV1Interface.Events = []server.Message{
21		{Name: "capabilities", Signature: "u", Types: []*server.Interface{nil}},
22	}
23	ExtBackgroundEffectSurfaceV1Interface.Requests = []server.Message{
24		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
25		{Name: "set_blur_region", Signature: "?o", Types: []*server.Interface{wayland.RegionInterface}},
26	}
27	ExtBackgroundEffectSurfaceV1Interface.Events = []server.Message{}
28	if err := server.NewInterfaces(ExtBackgroundEffectManagerV1Interface, ExtBackgroundEffectSurfaceV1Interface); err != nil {
29		panic(err)
30	}
31}
32
33// ExtBackgroundEffectManagerV1 background effect factory.
34type ExtBackgroundEffectManagerV1 struct{ *server.Resource }
35
36func WrapExtBackgroundEffectManagerV1(r *server.Resource) *ExtBackgroundEffectManagerV1 {
37	if r == nil {
38		return nil
39	}
40	return &ExtBackgroundEffectManagerV1{r}
41}
42
43const ExtBackgroundEffectManagerV1RequestDestroy uint32 = 0
44const ExtBackgroundEffectManagerV1RequestGetBackgroundEffect uint32 = 1
45const ExtBackgroundEffectManagerV1EventCapabilities uint32 = 0
46
47// ExtBackgroundEffectManagerV1Error .
48type ExtBackgroundEffectManagerV1Error uint32
49
50const (
51	ExtBackgroundEffectManagerV1ErrorBackgroundEffectExists ExtBackgroundEffectManagerV1Error = 0
52)
53
54// ExtBackgroundEffectManagerV1Capability  (bitfield).
55type ExtBackgroundEffectManagerV1Capability uint32
56
57const (
58	ExtBackgroundEffectManagerV1CapabilityBlur ExtBackgroundEffectManagerV1Capability = 1
59)
60
61// ExtBackgroundEffectManagerV1Handler handles ext_background_effect_manager_v1 requests.
62type ExtBackgroundEffectManagerV1Handler interface {
63	Destroy(self *ExtBackgroundEffectManagerV1)
64	GetBackgroundEffect(self *ExtBackgroundEffectManagerV1, id uint32, surface *wayland.Surface)
65}
66
67func NewExtBackgroundEffectManagerV1(c server.Client, version int32, id uint32, h ExtBackgroundEffectManagerV1Handler) (*ExtBackgroundEffectManagerV1, error) {
68	if h == nil {
69		return nil, fmt.Errorf("purego-libwayland: nil handler for ext_background_effect_manager_v1")
70	}
71	var self *ExtBackgroundEffectManagerV1
72	r, err := c.CreateResource(ExtBackgroundEffectManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
73		switch opcode {
74		case 0:
75			h.Destroy(self)
76			self.Destroy()
77		case 1:
78			h.GetBackgroundEffect(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()))
79		}
80	})
81	if err != nil {
82		return nil, err
83	}
84	self = WrapExtBackgroundEffectManagerV1(r)
85	r.Data = self
86	return self, nil
87}
88
89// SendCapabilities capabilities of the compositor.
90func (self *ExtBackgroundEffectManagerV1) SendCapabilities(flags uint32) {
91	self.PostEvent(ExtBackgroundEffectManagerV1EventCapabilities, server.Uint(flags))
92}
93func NewExtBackgroundEffectManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
94	return d.CreateGlobal(ExtBackgroundEffectManagerV1Interface, version, bind)
95}
96
97// ExtBackgroundEffectSurfaceV1 background effects for a surface.
98type ExtBackgroundEffectSurfaceV1 struct{ *server.Resource }
99
100func WrapExtBackgroundEffectSurfaceV1(r *server.Resource) *ExtBackgroundEffectSurfaceV1 {
101	if r == nil {
102		return nil
103	}
104	return &ExtBackgroundEffectSurfaceV1{r}
105}
106
107const ExtBackgroundEffectSurfaceV1RequestDestroy uint32 = 0
108const ExtBackgroundEffectSurfaceV1RequestSetBlurRegion uint32 = 1
109
110// ExtBackgroundEffectSurfaceV1Error .
111type ExtBackgroundEffectSurfaceV1Error uint32
112
113const (
114	ExtBackgroundEffectSurfaceV1ErrorSurfaceDestroyed ExtBackgroundEffectSurfaceV1Error = 0
115)
116
117// ExtBackgroundEffectSurfaceV1Handler handles ext_background_effect_surface_v1 requests.
118type ExtBackgroundEffectSurfaceV1Handler interface {
119	Destroy(self *ExtBackgroundEffectSurfaceV1)
120	SetBlurRegion(self *ExtBackgroundEffectSurfaceV1, region *wayland.Region)
121}
122
123func NewExtBackgroundEffectSurfaceV1(c server.Client, version int32, id uint32, h ExtBackgroundEffectSurfaceV1Handler) (*ExtBackgroundEffectSurfaceV1, error) {
124	if h == nil {
125		return nil, fmt.Errorf("purego-libwayland: nil handler for ext_background_effect_surface_v1")
126	}
127	var self *ExtBackgroundEffectSurfaceV1
128	r, err := c.CreateResource(ExtBackgroundEffectSurfaceV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
129		switch opcode {
130		case 0:
131			h.Destroy(self)
132			self.Destroy()
133		case 1:
134			h.SetBlurRegion(self, wayland.WrapRegion(args[0].Resource()))
135		}
136	})
137	if err != nil {
138		return nil, err
139	}
140	self = WrapExtBackgroundEffectSurfaceV1(r)
141	r.Data = self
142	return self, nil
143}
144func NewExtBackgroundEffectSurfaceV1Global(d *server.Display, version int32, bind server.BindFunc) error {
145	return d.CreateGlobal(ExtBackgroundEffectSurfaceV1Interface, version, bind)
146}
147func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
148	if v == nil {
149		return nil
150	}
151	return v.GetResource()
152}
153func (self *ExtBackgroundEffectManagerV1) GetResource() *server.Resource {
154	if self == nil {
155		return nil
156	}
157	return self.Resource
158}
159func (self *ExtBackgroundEffectSurfaceV1) GetResource() *server.Resource {
160	if self == nil {
161		return nil
162	}
163	return self.Resource
164}

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