v0.1.0 1a6c6c9

serverdecoration_generated.go RawHistoryFolder

1// Code generated by wlbgen; DO NOT EDIT.
2
3// Upstream protocol copyright and license:
4// SPDX-FileCopyrightText: 2015 Martin Gräßlin
5//
6// SPDX-License-Identifier: LGPL-2.1-or-later
7
8package serverdecoration
9
10import (
11	"fmt"
12	wayland "github.com/bnema/go-wayland-bindings/server/wayland"
13	"github.com/bnema/purego-libwayland/server"
14)
15
16var OrgKdeKwinServerDecorationManagerInterface *server.Interface
17var OrgKdeKwinServerDecorationInterface *server.Interface
18
19func init() {
20	OrgKdeKwinServerDecorationManagerInterface = &server.Interface{Name: "org_kde_kwin_server_decoration_manager", Version: 1}
21	OrgKdeKwinServerDecorationInterface = &server.Interface{Name: "org_kde_kwin_server_decoration", Version: 1}
22	OrgKdeKwinServerDecorationManagerInterface.Requests = []server.Message{
23		{Name: "create", Signature: "no", Types: []*server.Interface{OrgKdeKwinServerDecorationInterface, wayland.SurfaceInterface}},
24	}
25	OrgKdeKwinServerDecorationManagerInterface.Events = []server.Message{
26		{Name: "default_mode", Signature: "u", Types: []*server.Interface{nil}},
27	}
28	OrgKdeKwinServerDecorationInterface.Requests = []server.Message{
29		{Name: "release", Signature: "", Types: []*server.Interface{}},
30		{Name: "request_mode", Signature: "u", Types: []*server.Interface{nil}},
31	}
32	OrgKdeKwinServerDecorationInterface.Events = []server.Message{
33		{Name: "mode", Signature: "u", Types: []*server.Interface{nil}},
34	}
35	if err := server.NewInterfaces(OrgKdeKwinServerDecorationManagerInterface, OrgKdeKwinServerDecorationInterface); err != nil {
36		panic(err)
37	}
38}
39
40// OrgKdeKwinServerDecorationManager Server side window decoration manager.
41type OrgKdeKwinServerDecorationManager struct{ *server.Resource }
42
43func WrapOrgKdeKwinServerDecorationManager(r *server.Resource) *OrgKdeKwinServerDecorationManager {
44	if r == nil {
45		return nil
46	}
47	return &OrgKdeKwinServerDecorationManager{r}
48}
49
50const OrgKdeKwinServerDecorationManagerRequestCreate uint32 = 0
51const OrgKdeKwinServerDecorationManagerEventDefaultMode uint32 = 0
52
53// OrgKdeKwinServerDecorationManagerMode Possible values to use in request_mode and the event mode..
54type OrgKdeKwinServerDecorationManagerMode uint32
55
56const (
57	OrgKdeKwinServerDecorationManagerModeNone   OrgKdeKwinServerDecorationManagerMode = 0
58	OrgKdeKwinServerDecorationManagerModeClient OrgKdeKwinServerDecorationManagerMode = 1
59	OrgKdeKwinServerDecorationManagerModeServer OrgKdeKwinServerDecorationManagerMode = 2
60)
61
62// OrgKdeKwinServerDecorationManagerHandler handles org_kde_kwin_server_decoration_manager requests.
63type OrgKdeKwinServerDecorationManagerHandler interface {
64	Create(self *OrgKdeKwinServerDecorationManager, id uint32, surface *wayland.Surface)
65}
66
67func NewOrgKdeKwinServerDecorationManager(c server.Client, version int32, id uint32, h OrgKdeKwinServerDecorationManagerHandler) (*OrgKdeKwinServerDecorationManager, error) {
68	if h == nil {
69		return nil, fmt.Errorf("purego-libwayland: nil handler for org_kde_kwin_server_decoration_manager")
70	}
71	var self *OrgKdeKwinServerDecorationManager
72	r, err := c.CreateResource(OrgKdeKwinServerDecorationManagerInterface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
73		switch opcode {
74		case 0:
75			h.Create(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()))
76		}
77	})
78	if err != nil {
79		return nil, err
80	}
81	self = WrapOrgKdeKwinServerDecorationManager(r)
82	r.Data = self
83	return self, nil
84}
85
86// SendDefaultMode The default mode used on the server.
87func (self *OrgKdeKwinServerDecorationManager) SendDefaultMode(mode uint32) {
88	self.PostEvent(OrgKdeKwinServerDecorationManagerEventDefaultMode, server.Uint(mode))
89}
90func NewOrgKdeKwinServerDecorationManagerGlobal(d *server.Display, version int32, bind server.BindFunc) error {
91	return d.CreateGlobal(OrgKdeKwinServerDecorationManagerInterface, version, bind)
92}
93
94// OrgKdeKwinServerDecoration .
95type OrgKdeKwinServerDecoration struct{ *server.Resource }
96
97func WrapOrgKdeKwinServerDecoration(r *server.Resource) *OrgKdeKwinServerDecoration {
98	if r == nil {
99		return nil
100	}
101	return &OrgKdeKwinServerDecoration{r}
102}
103
104const OrgKdeKwinServerDecorationRequestRelease uint32 = 0
105const OrgKdeKwinServerDecorationRequestRequestMode uint32 = 1
106const OrgKdeKwinServerDecorationEventMode uint32 = 0
107
108// OrgKdeKwinServerDecorationMode Possible values to use in request_mode and the event mode..
109type OrgKdeKwinServerDecorationMode uint32
110
111const (
112	OrgKdeKwinServerDecorationModeNone   OrgKdeKwinServerDecorationMode = 0
113	OrgKdeKwinServerDecorationModeClient OrgKdeKwinServerDecorationMode = 1
114	OrgKdeKwinServerDecorationModeServer OrgKdeKwinServerDecorationMode = 2
115)
116
117// OrgKdeKwinServerDecorationHandler handles org_kde_kwin_server_decoration requests.
118type OrgKdeKwinServerDecorationHandler interface {
119	Release(self *OrgKdeKwinServerDecoration)
120	RequestMode(self *OrgKdeKwinServerDecoration, mode uint32)
121}
122
123func NewOrgKdeKwinServerDecoration(c server.Client, version int32, id uint32, h OrgKdeKwinServerDecorationHandler) (*OrgKdeKwinServerDecoration, error) {
124	if h == nil {
125		return nil, fmt.Errorf("purego-libwayland: nil handler for org_kde_kwin_server_decoration")
126	}
127	var self *OrgKdeKwinServerDecoration
128	r, err := c.CreateResource(OrgKdeKwinServerDecorationInterface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
129		switch opcode {
130		case 0:
131			h.Release(self)
132			self.Destroy()
133		case 1:
134			h.RequestMode(self, args[0].Uint())
135		}
136	})
137	if err != nil {
138		return nil, err
139	}
140	self = WrapOrgKdeKwinServerDecoration(r)
141	r.Data = self
142	return self, nil
143}
144
145// SendMode The new decoration mode applied by the server.
146func (self *OrgKdeKwinServerDecoration) SendMode(mode uint32) {
147	self.PostEvent(OrgKdeKwinServerDecorationEventMode, server.Uint(mode))
148}
149func NewOrgKdeKwinServerDecorationGlobal(d *server.Display, version int32, bind server.BindFunc) error {
150	return d.CreateGlobal(OrgKdeKwinServerDecorationInterface, version, bind)
151}
152func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
153	if v == nil {
154		return nil
155	}
156	return v.GetResource()
157}
158func (self *OrgKdeKwinServerDecorationManager) GetResource() *server.Resource {
159	if self == nil {
160		return nil
161	}
162	return self.Resource
163}
164func (self *OrgKdeKwinServerDecoration) GetResource() *server.Resource {
165	if self == nil {
166		return nil
167	}
168	return self.Resource
169}

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