v0.1.1 ac96fe0

kdedecoration.go RawHistoryFolder

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

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