v0.4.0 91c6a74

xwaylandshell.go RawHistoryFolder

1// Code generated by wlgen; DO NOT EDIT.
2package xwaylandshell
3
4import (
5	"fmt"
6	wayland "github.com/bnema/purego-libwayland/protocol/wayland"
7	"github.com/bnema/purego-libwayland/server"
8)
9
10var XwaylandShellV1Interface *server.Interface
11var XwaylandSurfaceV1Interface *server.Interface
12
13func init() {
14	XwaylandShellV1Interface = &server.Interface{Name: "xwayland_shell_v1", Version: 1}
15	XwaylandSurfaceV1Interface = &server.Interface{Name: "xwayland_surface_v1", Version: 1}
16	XwaylandShellV1Interface.Requests = []server.Message{
17		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
18		{Name: "get_xwayland_surface", Signature: "no", Types: []*server.Interface{XwaylandSurfaceV1Interface, wayland.SurfaceInterface}},
19	}
20	XwaylandShellV1Interface.Events = []server.Message{}
21	XwaylandSurfaceV1Interface.Requests = []server.Message{
22		{Name: "set_serial", Signature: "uu", Types: []*server.Interface{nil, nil}},
23		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
24	}
25	XwaylandSurfaceV1Interface.Events = []server.Message{}
26	if err := server.NewInterfaces(XwaylandShellV1Interface, XwaylandSurfaceV1Interface); err != nil {
27		panic(err)
28	}
29}
30
31// XwaylandShellV1 context object for Xwayland shell.
32type XwaylandShellV1 struct{ *server.Resource }
33
34func WrapXwaylandShellV1(r *server.Resource) *XwaylandShellV1 {
35	if r == nil {
36		return nil
37	}
38	return &XwaylandShellV1{r}
39}
40
41const XwaylandShellV1RequestDestroy uint32 = 0
42const XwaylandShellV1RequestGetXwaylandSurface uint32 = 1
43
44// XwaylandShellV1Error .
45type XwaylandShellV1Error uint32
46
47const (
48	XwaylandShellV1ErrorRole XwaylandShellV1Error = 0
49)
50
51// XwaylandShellV1Handler handles xwayland_shell_v1 requests.
52type XwaylandShellV1Handler interface {
53	Destroy(self *XwaylandShellV1)
54	GetXwaylandSurface(self *XwaylandShellV1, id uint32, surface *wayland.Surface)
55}
56
57func NewXwaylandShellV1(c server.Client, version int32, id uint32, h XwaylandShellV1Handler) (*XwaylandShellV1, error) {
58	if h == nil {
59		return nil, fmt.Errorf("purego-libwayland: nil handler for xwayland_shell_v1")
60	}
61	var self *XwaylandShellV1
62	r, err := c.CreateResource(XwaylandShellV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
63		switch opcode {
64		case 0:
65			h.Destroy(self)
66			self.Destroy()
67		case 1:
68			h.GetXwaylandSurface(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()))
69		}
70	})
71	if err != nil {
72		return nil, err
73	}
74	self = WrapXwaylandShellV1(r)
75	r.Data = self
76	return self, nil
77}
78func NewXwaylandShellV1Global(d *server.Display, version int32, bind server.BindFunc) error {
79	return d.CreateGlobal(XwaylandShellV1Interface, version, bind)
80}
81
82// XwaylandSurfaceV1 interface for associating Xwayland windows to wl_surfaces.
83type XwaylandSurfaceV1 struct{ *server.Resource }
84
85func WrapXwaylandSurfaceV1(r *server.Resource) *XwaylandSurfaceV1 {
86	if r == nil {
87		return nil
88	}
89	return &XwaylandSurfaceV1{r}
90}
91
92const XwaylandSurfaceV1RequestSetSerial uint32 = 0
93const XwaylandSurfaceV1RequestDestroy uint32 = 1
94
95// XwaylandSurfaceV1Error .
96type XwaylandSurfaceV1Error uint32
97
98const (
99	XwaylandSurfaceV1ErrorAlreadyAssociated XwaylandSurfaceV1Error = 0
100	XwaylandSurfaceV1ErrorInvalidSerial     XwaylandSurfaceV1Error = 1
101)
102
103// XwaylandSurfaceV1Handler handles xwayland_surface_v1 requests.
104type XwaylandSurfaceV1Handler interface {
105	SetSerial(self *XwaylandSurfaceV1, serialLo uint32, serialHi uint32)
106	Destroy(self *XwaylandSurfaceV1)
107}
108
109func NewXwaylandSurfaceV1(c server.Client, version int32, id uint32, h XwaylandSurfaceV1Handler) (*XwaylandSurfaceV1, error) {
110	if h == nil {
111		return nil, fmt.Errorf("purego-libwayland: nil handler for xwayland_surface_v1")
112	}
113	var self *XwaylandSurfaceV1
114	r, err := c.CreateResource(XwaylandSurfaceV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
115		switch opcode {
116		case 0:
117			h.SetSerial(self, args[0].Uint(), args[1].Uint())
118		case 1:
119			h.Destroy(self)
120			self.Destroy()
121		}
122	})
123	if err != nil {
124		return nil, err
125	}
126	self = WrapXwaylandSurfaceV1(r)
127	r.Data = self
128	return self, nil
129}
130func NewXwaylandSurfaceV1Global(d *server.Display, version int32, bind server.BindFunc) error {
131	return d.CreateGlobal(XwaylandSurfaceV1Interface, version, bind)
132}
133func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
134	if v == nil {
135		return nil
136	}
137	return v.GetResource()
138}
139func (self *XwaylandShellV1) GetResource() *server.Resource {
140	if self == nil {
141		return nil
142	}
143	return self.Resource
144}
145func (self *XwaylandSurfaceV1) GetResource() *server.Resource {
146	if self == nil {
147		return nil
148	}
149	return self.Resource
150}

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