detached 1a6c6c9

xdgdecoration_generated.go RawHistoryFolder

1// Code generated by wlbgen; DO NOT EDIT.
2
3// Upstream protocol copyright and license:
4// Copyright © 2018 Simon Ser
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 xdgdecoration
26
27import (
28	"fmt"
29	xdgshell "github.com/bnema/go-wayland-bindings/server/xdgshell"
30	"github.com/bnema/purego-libwayland/server"
31)
32
33var ZxdgDecorationManagerV1Interface *server.Interface
34var ZxdgToplevelDecorationV1Interface *server.Interface
35
36func init() {
37	ZxdgDecorationManagerV1Interface = &server.Interface{Name: "zxdg_decoration_manager_v1", Version: 2}
38	ZxdgToplevelDecorationV1Interface = &server.Interface{Name: "zxdg_toplevel_decoration_v1", Version: 2}
39	ZxdgDecorationManagerV1Interface.Requests = []server.Message{
40		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
41		{Name: "get_toplevel_decoration", Signature: "no", Types: []*server.Interface{ZxdgToplevelDecorationV1Interface, xdgshell.ToplevelInterface}},
42	}
43	ZxdgDecorationManagerV1Interface.Events = []server.Message{}
44	ZxdgToplevelDecorationV1Interface.Requests = []server.Message{
45		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
46		{Name: "set_mode", Signature: "u", Types: []*server.Interface{nil}},
47		{Name: "unset_mode", Signature: "", Types: []*server.Interface{}},
48	}
49	ZxdgToplevelDecorationV1Interface.Events = []server.Message{
50		{Name: "configure", Signature: "u", Types: []*server.Interface{nil}},
51	}
52	if err := server.NewInterfaces(ZxdgDecorationManagerV1Interface, ZxdgToplevelDecorationV1Interface); err != nil {
53		panic(err)
54	}
55}
56
57// ZxdgDecorationManagerV1 window decoration manager.
58type ZxdgDecorationManagerV1 struct{ *server.Resource }
59
60func WrapZxdgDecorationManagerV1(r *server.Resource) *ZxdgDecorationManagerV1 {
61	if r == nil {
62		return nil
63	}
64	return &ZxdgDecorationManagerV1{r}
65}
66
67const ZxdgDecorationManagerV1RequestDestroy uint32 = 0
68const ZxdgDecorationManagerV1RequestGetToplevelDecoration uint32 = 1
69
70// ZxdgDecorationManagerV1Handler handles zxdg_decoration_manager_v1 requests.
71type ZxdgDecorationManagerV1Handler interface {
72	Destroy(self *ZxdgDecorationManagerV1)
73	GetToplevelDecoration(self *ZxdgDecorationManagerV1, id uint32, toplevel *xdgshell.Toplevel)
74}
75
76func NewZxdgDecorationManagerV1(c server.Client, version int32, id uint32, h ZxdgDecorationManagerV1Handler) (*ZxdgDecorationManagerV1, error) {
77	if h == nil {
78		return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_decoration_manager_v1")
79	}
80	var self *ZxdgDecorationManagerV1
81	r, err := c.CreateResource(ZxdgDecorationManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
82		switch opcode {
83		case 0:
84			h.Destroy(self)
85			self.Destroy()
86		case 1:
87			h.GetToplevelDecoration(self, args[0].NewID(), xdgshell.WrapToplevel(args[1].Resource()))
88		}
89	})
90	if err != nil {
91		return nil, err
92	}
93	self = WrapZxdgDecorationManagerV1(r)
94	r.Data = self
95	return self, nil
96}
97func NewZxdgDecorationManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
98	return d.CreateGlobal(ZxdgDecorationManagerV1Interface, version, bind)
99}
100
101// ZxdgToplevelDecorationV1 decoration object for a toplevel surface.
102type ZxdgToplevelDecorationV1 struct{ *server.Resource }
103
104func WrapZxdgToplevelDecorationV1(r *server.Resource) *ZxdgToplevelDecorationV1 {
105	if r == nil {
106		return nil
107	}
108	return &ZxdgToplevelDecorationV1{r}
109}
110
111const ZxdgToplevelDecorationV1RequestDestroy uint32 = 0
112const ZxdgToplevelDecorationV1RequestSetMode uint32 = 1
113const ZxdgToplevelDecorationV1RequestUnsetMode uint32 = 2
114const ZxdgToplevelDecorationV1EventConfigure uint32 = 0
115
116// ZxdgToplevelDecorationV1Error .
117type ZxdgToplevelDecorationV1Error uint32
118
119const (
120	ZxdgToplevelDecorationV1ErrorUnconfiguredBuffer ZxdgToplevelDecorationV1Error = 0
121	ZxdgToplevelDecorationV1ErrorAlreadyConstructed ZxdgToplevelDecorationV1Error = 1
122	ZxdgToplevelDecorationV1ErrorOrphaned           ZxdgToplevelDecorationV1Error = 2
123	ZxdgToplevelDecorationV1ErrorInvalidMode        ZxdgToplevelDecorationV1Error = 3
124)
125
126// ZxdgToplevelDecorationV1Mode window decoration modes.
127type ZxdgToplevelDecorationV1Mode uint32
128
129const (
130	ZxdgToplevelDecorationV1ModeClientSide ZxdgToplevelDecorationV1Mode = 1
131	ZxdgToplevelDecorationV1ModeServerSide ZxdgToplevelDecorationV1Mode = 2
132)
133
134// ZxdgToplevelDecorationV1Handler handles zxdg_toplevel_decoration_v1 requests.
135type ZxdgToplevelDecorationV1Handler interface {
136	Destroy(self *ZxdgToplevelDecorationV1)
137	SetMode(self *ZxdgToplevelDecorationV1, mode uint32)
138	UnsetMode(self *ZxdgToplevelDecorationV1)
139}
140
141func NewZxdgToplevelDecorationV1(c server.Client, version int32, id uint32, h ZxdgToplevelDecorationV1Handler) (*ZxdgToplevelDecorationV1, error) {
142	if h == nil {
143		return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_toplevel_decoration_v1")
144	}
145	var self *ZxdgToplevelDecorationV1
146	r, err := c.CreateResource(ZxdgToplevelDecorationV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
147		switch opcode {
148		case 0:
149			h.Destroy(self)
150			self.Destroy()
151		case 1:
152			h.SetMode(self, args[0].Uint())
153		case 2:
154			h.UnsetMode(self)
155		}
156	})
157	if err != nil {
158		return nil, err
159	}
160	self = WrapZxdgToplevelDecorationV1(r)
161	r.Data = self
162	return self, nil
163}
164
165// SendConfigure notify a decoration mode change.
166func (self *ZxdgToplevelDecorationV1) SendConfigure(mode uint32) {
167	self.PostEvent(ZxdgToplevelDecorationV1EventConfigure, server.Uint(mode))
168}
169func NewZxdgToplevelDecorationV1Global(d *server.Display, version int32, bind server.BindFunc) error {
170	return d.CreateGlobal(ZxdgToplevelDecorationV1Interface, version, bind)
171}
172func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
173	if v == nil {
174		return nil
175	}
176	return v.GetResource()
177}
178func (self *ZxdgDecorationManagerV1) GetResource() *server.Resource {
179	if self == nil {
180		return nil
181	}
182	return self.Resource
183}
184func (self *ZxdgToplevelDecorationV1) GetResource() *server.Resource {
185	if self == nil {
186		return nil
187	}
188	return self.Resource
189}

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