detached 8628cd3

merge: xdg-decoration bindings

commit
8628cd3b69a2ff3454db9d40b507dce2d6541d4a
author
brice · · 2026-09-24 09:38 UTC
merge of
70078d0 + 7a2cc46 · diff against the first parent
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +343 -0
M protocol/gen.go +1 -0
@@ -5,3 +5,4 @@ package protocol
55 //go:generate go run ../cmd/wlgen -package xdgshell -out xdgshell/xdgshell.go -import wayland=github.com/bnema/purego-libwayland/protocol/wayland -import-xml wayland=../protocols/wayland.xml ../protocols/xdg-shell.xml
66 //go:generate go run ../cmd/wlgen -package wlrlayershell -out wlrlayershell/wlrlayershell.go -import wayland=github.com/bnema/purego-libwayland/protocol/wayland -import-xml wayland=../protocols/wayland.xml -import xdgshell=github.com/bnema/purego-libwayland/protocol/xdgshell -import-xml xdgshell=../protocols/xdg-shell.xml ../protocols/wlr-layer-shell-unstable-v1.xml
77 //go:generate go run ../cmd/wlgen -package xdgoutput -out xdgoutput/xdgoutput.go -import wayland=github.com/bnema/purego-libwayland/protocol/wayland -import-xml wayland=../protocols/wayland.xml ../protocols/xdg-output-unstable-v1.xml
8+//go:generate go run ../cmd/wlgen -package xdgdecoration -out xdgdecoration/xdgdecoration.go -import xdgshell=github.com/bnema/purego-libwayland/protocol/xdgshell -import-xml xdgshell=../protocols/xdg-shell.xml ../protocols/xdg-decoration-unstable-v1.xml
@@ -5,3 +5,4 @@ package protocol
5 //go:generate go run ../cmd/wlgen -package xdgshell -out xdgshell/xdgshell.go -import wayland=github.com/bnema/purego-libwayland/protocol/wayland -import-xml wayland=../protocols/wayland.xml ../protocols/xdg-shell.xml5 //go:generate go run ../cmd/wlgen -package xdgshell -out xdgshell/xdgshell.go -import wayland=github.com/bnema/purego-libwayland/protocol/wayland -import-xml wayland=../protocols/wayland.xml ../protocols/xdg-shell.xml
6 //go:generate go run ../cmd/wlgen -package wlrlayershell -out wlrlayershell/wlrlayershell.go -import wayland=github.com/bnema/purego-libwayland/protocol/wayland -import-xml wayland=../protocols/wayland.xml -import xdgshell=github.com/bnema/purego-libwayland/protocol/xdgshell -import-xml xdgshell=../protocols/xdg-shell.xml ../protocols/wlr-layer-shell-unstable-v1.xml6 //go:generate go run ../cmd/wlgen -package wlrlayershell -out wlrlayershell/wlrlayershell.go -import wayland=github.com/bnema/purego-libwayland/protocol/wayland -import-xml wayland=../protocols/wayland.xml -import xdgshell=github.com/bnema/purego-libwayland/protocol/xdgshell -import-xml xdgshell=../protocols/xdg-shell.xml ../protocols/wlr-layer-shell-unstable-v1.xml
7 //go:generate go run ../cmd/wlgen -package xdgoutput -out xdgoutput/xdgoutput.go -import wayland=github.com/bnema/purego-libwayland/protocol/wayland -import-xml wayland=../protocols/wayland.xml ../protocols/xdg-output-unstable-v1.xml7 //go:generate go run ../cmd/wlgen -package xdgoutput -out xdgoutput/xdgoutput.go -import wayland=github.com/bnema/purego-libwayland/protocol/wayland -import-xml wayland=../protocols/wayland.xml ../protocols/xdg-output-unstable-v1.xml
8+//go:generate go run ../cmd/wlgen -package xdgdecoration -out xdgdecoration/xdgdecoration.go -import xdgshell=github.com/bnema/purego-libwayland/protocol/xdgshell -import-xml xdgshell=../protocols/xdg-shell.xml ../protocols/xdg-decoration-unstable-v1.xml
A protocol/xdgdecoration/xdgdecoration.go +166 -0
@@ -0,0 +1,166 @@
1+// Code generated by wlgen; DO NOT EDIT.
2+package xdgdecoration
3+
4+import (
5+ "fmt"
6+ xdgshell "github.com/bnema/purego-libwayland/protocol/xdgshell"
7+ "github.com/bnema/purego-libwayland/server"
8+)
9+
10+var ZxdgDecorationManagerV1Interface *server.Interface
11+var ZxdgToplevelDecorationV1Interface *server.Interface
12+
13+func init() {
14+ ZxdgDecorationManagerV1Interface = &server.Interface{Name: "zxdg_decoration_manager_v1", Version: 2}
15+ ZxdgToplevelDecorationV1Interface = &server.Interface{Name: "zxdg_toplevel_decoration_v1", Version: 2}
16+ ZxdgDecorationManagerV1Interface.Requests = []server.Message{
17+ {Name: "destroy", Signature: "", Types: []*server.Interface{}},
18+ {Name: "get_toplevel_decoration", Signature: "no", Types: []*server.Interface{ZxdgToplevelDecorationV1Interface, xdgshell.ToplevelInterface}},
19+ }
20+ ZxdgDecorationManagerV1Interface.Events = []server.Message{}
21+ ZxdgToplevelDecorationV1Interface.Requests = []server.Message{
22+ {Name: "destroy", Signature: "", Types: []*server.Interface{}},
23+ {Name: "set_mode", Signature: "u", Types: []*server.Interface{nil}},
24+ {Name: "unset_mode", Signature: "", Types: []*server.Interface{}},
25+ }
26+ ZxdgToplevelDecorationV1Interface.Events = []server.Message{
27+ {Name: "configure", Signature: "u", Types: []*server.Interface{nil}},
28+ }
29+ if err := server.NewInterfaces(ZxdgDecorationManagerV1Interface, ZxdgToplevelDecorationV1Interface); err != nil {
30+ panic(err)
31+ }
32+}
33+
34+// ZxdgDecorationManagerV1 window decoration manager.
35+type ZxdgDecorationManagerV1 struct{ *server.Resource }
36+
37+func WrapZxdgDecorationManagerV1(r *server.Resource) *ZxdgDecorationManagerV1 {
38+ if r == nil {
39+ return nil
40+ }
41+ return &ZxdgDecorationManagerV1{r}
42+}
43+
44+const ZxdgDecorationManagerV1RequestDestroy uint32 = 0
45+const ZxdgDecorationManagerV1RequestGetToplevelDecoration uint32 = 1
46+
47+// ZxdgDecorationManagerV1Handler handles zxdg_decoration_manager_v1 requests.
48+type ZxdgDecorationManagerV1Handler interface {
49+ Destroy(self *ZxdgDecorationManagerV1)
50+ GetToplevelDecoration(self *ZxdgDecorationManagerV1, id uint32, toplevel *xdgshell.Toplevel)
51+}
52+
53+func NewZxdgDecorationManagerV1(c server.Client, version int32, id uint32, h ZxdgDecorationManagerV1Handler) (*ZxdgDecorationManagerV1, error) {
54+ if h == nil {
55+ return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_decoration_manager_v1")
56+ }
57+ var self *ZxdgDecorationManagerV1
58+ r, err := c.CreateResource(ZxdgDecorationManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
59+ switch opcode {
60+ case 0:
61+ h.Destroy(self)
62+ self.Destroy()
63+ case 1:
64+ h.GetToplevelDecoration(self, args[0].NewID(), xdgshell.WrapToplevel(args[1].Resource()))
65+ }
66+ })
67+ if err != nil {
68+ return nil, err
69+ }
70+ self = WrapZxdgDecorationManagerV1(r)
71+ r.Data = self
72+ return self, nil
73+}
74+func NewZxdgDecorationManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
75+ return d.CreateGlobal(ZxdgDecorationManagerV1Interface, version, bind)
76+}
77+
78+// ZxdgToplevelDecorationV1 decoration object for a toplevel surface.
79+type ZxdgToplevelDecorationV1 struct{ *server.Resource }
80+
81+func WrapZxdgToplevelDecorationV1(r *server.Resource) *ZxdgToplevelDecorationV1 {
82+ if r == nil {
83+ return nil
84+ }
85+ return &ZxdgToplevelDecorationV1{r}
86+}
87+
88+const ZxdgToplevelDecorationV1RequestDestroy uint32 = 0
89+const ZxdgToplevelDecorationV1RequestSetMode uint32 = 1
90+const ZxdgToplevelDecorationV1RequestUnsetMode uint32 = 2
91+const ZxdgToplevelDecorationV1EventConfigure uint32 = 0
92+
93+// ZxdgToplevelDecorationV1Error .
94+type ZxdgToplevelDecorationV1Error uint32
95+
96+const (
97+ ZxdgToplevelDecorationV1ErrorUnconfiguredBuffer ZxdgToplevelDecorationV1Error = 0
98+ ZxdgToplevelDecorationV1ErrorAlreadyConstructed ZxdgToplevelDecorationV1Error = 1
99+ ZxdgToplevelDecorationV1ErrorOrphaned ZxdgToplevelDecorationV1Error = 2
100+ ZxdgToplevelDecorationV1ErrorInvalidMode ZxdgToplevelDecorationV1Error = 3
101+)
102+
103+// ZxdgToplevelDecorationV1Mode window decoration modes.
104+type ZxdgToplevelDecorationV1Mode uint32
105+
106+const (
107+ ZxdgToplevelDecorationV1ModeClientSide ZxdgToplevelDecorationV1Mode = 1
108+ ZxdgToplevelDecorationV1ModeServerSide ZxdgToplevelDecorationV1Mode = 2
109+)
110+
111+// ZxdgToplevelDecorationV1Handler handles zxdg_toplevel_decoration_v1 requests.
112+type ZxdgToplevelDecorationV1Handler interface {
113+ Destroy(self *ZxdgToplevelDecorationV1)
114+ SetMode(self *ZxdgToplevelDecorationV1, mode uint32)
115+ UnsetMode(self *ZxdgToplevelDecorationV1)
116+}
117+
118+func NewZxdgToplevelDecorationV1(c server.Client, version int32, id uint32, h ZxdgToplevelDecorationV1Handler) (*ZxdgToplevelDecorationV1, error) {
119+ if h == nil {
120+ return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_toplevel_decoration_v1")
121+ }
122+ var self *ZxdgToplevelDecorationV1
123+ r, err := c.CreateResource(ZxdgToplevelDecorationV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
124+ switch opcode {
125+ case 0:
126+ h.Destroy(self)
127+ self.Destroy()
128+ case 1:
129+ h.SetMode(self, args[0].Uint())
130+ case 2:
131+ h.UnsetMode(self)
132+ }
133+ })
134+ if err != nil {
135+ return nil, err
136+ }
137+ self = WrapZxdgToplevelDecorationV1(r)
138+ r.Data = self
139+ return self, nil
140+}
141+
142+// SendConfigure notify a decoration mode change.
143+func (self *ZxdgToplevelDecorationV1) SendConfigure(mode uint32) {
144+ self.PostEvent(ZxdgToplevelDecorationV1EventConfigure, server.Uint(mode))
145+}
146+func NewZxdgToplevelDecorationV1Global(d *server.Display, version int32, bind server.BindFunc) error {
147+ return d.CreateGlobal(ZxdgToplevelDecorationV1Interface, version, bind)
148+}
149+func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
150+ if v == nil {
151+ return nil
152+ }
153+ return v.GetResource()
154+}
155+func (self *ZxdgDecorationManagerV1) GetResource() *server.Resource {
156+ if self == nil {
157+ return nil
158+ }
159+ return self.Resource
160+}
161+func (self *ZxdgToplevelDecorationV1) GetResource() *server.Resource {
162+ if self == nil {
163+ return nil
164+ }
165+ return self.Resource
166+}
@@ -0,0 +1,166 @@
1+// Code generated by wlgen; DO NOT EDIT.
2+package xdgdecoration
3+
4+import (
5+ "fmt"
6+ xdgshell "github.com/bnema/purego-libwayland/protocol/xdgshell"
7+ "github.com/bnema/purego-libwayland/server"
8+)
9+
10+var ZxdgDecorationManagerV1Interface *server.Interface
11+var ZxdgToplevelDecorationV1Interface *server.Interface
12+
13+func init() {
14+ ZxdgDecorationManagerV1Interface = &server.Interface{Name: "zxdg_decoration_manager_v1", Version: 2}
15+ ZxdgToplevelDecorationV1Interface = &server.Interface{Name: "zxdg_toplevel_decoration_v1", Version: 2}
16+ ZxdgDecorationManagerV1Interface.Requests = []server.Message{
17+ {Name: "destroy", Signature: "", Types: []*server.Interface{}},
18+ {Name: "get_toplevel_decoration", Signature: "no", Types: []*server.Interface{ZxdgToplevelDecorationV1Interface, xdgshell.ToplevelInterface}},
19+ }
20+ ZxdgDecorationManagerV1Interface.Events = []server.Message{}
21+ ZxdgToplevelDecorationV1Interface.Requests = []server.Message{
22+ {Name: "destroy", Signature: "", Types: []*server.Interface{}},
23+ {Name: "set_mode", Signature: "u", Types: []*server.Interface{nil}},
24+ {Name: "unset_mode", Signature: "", Types: []*server.Interface{}},
25+ }
26+ ZxdgToplevelDecorationV1Interface.Events = []server.Message{
27+ {Name: "configure", Signature: "u", Types: []*server.Interface{nil}},
28+ }
29+ if err := server.NewInterfaces(ZxdgDecorationManagerV1Interface, ZxdgToplevelDecorationV1Interface); err != nil {
30+ panic(err)
31+ }
32+}
33+
34+// ZxdgDecorationManagerV1 window decoration manager.
35+type ZxdgDecorationManagerV1 struct{ *server.Resource }
36+
37+func WrapZxdgDecorationManagerV1(r *server.Resource) *ZxdgDecorationManagerV1 {
38+ if r == nil {
39+ return nil
40+ }
41+ return &ZxdgDecorationManagerV1{r}
42+}
43+
44+const ZxdgDecorationManagerV1RequestDestroy uint32 = 0
45+const ZxdgDecorationManagerV1RequestGetToplevelDecoration uint32 = 1
46+
47+// ZxdgDecorationManagerV1Handler handles zxdg_decoration_manager_v1 requests.
48+type ZxdgDecorationManagerV1Handler interface {
49+ Destroy(self *ZxdgDecorationManagerV1)
50+ GetToplevelDecoration(self *ZxdgDecorationManagerV1, id uint32, toplevel *xdgshell.Toplevel)
51+}
52+
53+func NewZxdgDecorationManagerV1(c server.Client, version int32, id uint32, h ZxdgDecorationManagerV1Handler) (*ZxdgDecorationManagerV1, error) {
54+ if h == nil {
55+ return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_decoration_manager_v1")
56+ }
57+ var self *ZxdgDecorationManagerV1
58+ r, err := c.CreateResource(ZxdgDecorationManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
59+ switch opcode {
60+ case 0:
61+ h.Destroy(self)
62+ self.Destroy()
63+ case 1:
64+ h.GetToplevelDecoration(self, args[0].NewID(), xdgshell.WrapToplevel(args[1].Resource()))
65+ }
66+ })
67+ if err != nil {
68+ return nil, err
69+ }
70+ self = WrapZxdgDecorationManagerV1(r)
71+ r.Data = self
72+ return self, nil
73+}
74+func NewZxdgDecorationManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
75+ return d.CreateGlobal(ZxdgDecorationManagerV1Interface, version, bind)
76+}
77+
78+// ZxdgToplevelDecorationV1 decoration object for a toplevel surface.
79+type ZxdgToplevelDecorationV1 struct{ *server.Resource }
80+
81+func WrapZxdgToplevelDecorationV1(r *server.Resource) *ZxdgToplevelDecorationV1 {
82+ if r == nil {
83+ return nil
84+ }
85+ return &ZxdgToplevelDecorationV1{r}
86+}
87+
88+const ZxdgToplevelDecorationV1RequestDestroy uint32 = 0
89+const ZxdgToplevelDecorationV1RequestSetMode uint32 = 1
90+const ZxdgToplevelDecorationV1RequestUnsetMode uint32 = 2
91+const ZxdgToplevelDecorationV1EventConfigure uint32 = 0
92+
93+// ZxdgToplevelDecorationV1Error .
94+type ZxdgToplevelDecorationV1Error uint32
95+
96+const (
97+ ZxdgToplevelDecorationV1ErrorUnconfiguredBuffer ZxdgToplevelDecorationV1Error = 0
98+ ZxdgToplevelDecorationV1ErrorAlreadyConstructed ZxdgToplevelDecorationV1Error = 1
99+ ZxdgToplevelDecorationV1ErrorOrphaned ZxdgToplevelDecorationV1Error = 2
100+ ZxdgToplevelDecorationV1ErrorInvalidMode ZxdgToplevelDecorationV1Error = 3
101+)
102+
103+// ZxdgToplevelDecorationV1Mode window decoration modes.
104+type ZxdgToplevelDecorationV1Mode uint32
105+
106+const (
107+ ZxdgToplevelDecorationV1ModeClientSide ZxdgToplevelDecorationV1Mode = 1
108+ ZxdgToplevelDecorationV1ModeServerSide ZxdgToplevelDecorationV1Mode = 2
109+)
110+
111+// ZxdgToplevelDecorationV1Handler handles zxdg_toplevel_decoration_v1 requests.
112+type ZxdgToplevelDecorationV1Handler interface {
113+ Destroy(self *ZxdgToplevelDecorationV1)
114+ SetMode(self *ZxdgToplevelDecorationV1, mode uint32)
115+ UnsetMode(self *ZxdgToplevelDecorationV1)
116+}
117+
118+func NewZxdgToplevelDecorationV1(c server.Client, version int32, id uint32, h ZxdgToplevelDecorationV1Handler) (*ZxdgToplevelDecorationV1, error) {
119+ if h == nil {
120+ return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_toplevel_decoration_v1")
121+ }
122+ var self *ZxdgToplevelDecorationV1
123+ r, err := c.CreateResource(ZxdgToplevelDecorationV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
124+ switch opcode {
125+ case 0:
126+ h.Destroy(self)
127+ self.Destroy()
128+ case 1:
129+ h.SetMode(self, args[0].Uint())
130+ case 2:
131+ h.UnsetMode(self)
132+ }
133+ })
134+ if err != nil {
135+ return nil, err
136+ }
137+ self = WrapZxdgToplevelDecorationV1(r)
138+ r.Data = self
139+ return self, nil
140+}
141+
142+// SendConfigure notify a decoration mode change.
143+func (self *ZxdgToplevelDecorationV1) SendConfigure(mode uint32) {
144+ self.PostEvent(ZxdgToplevelDecorationV1EventConfigure, server.Uint(mode))
145+}
146+func NewZxdgToplevelDecorationV1Global(d *server.Display, version int32, bind server.BindFunc) error {
147+ return d.CreateGlobal(ZxdgToplevelDecorationV1Interface, version, bind)
148+}
149+func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
150+ if v == nil {
151+ return nil
152+ }
153+ return v.GetResource()
154+}
155+func (self *ZxdgDecorationManagerV1) GetResource() *server.Resource {
156+ if self == nil {
157+ return nil
158+ }
159+ return self.Resource
160+}
161+func (self *ZxdgToplevelDecorationV1) GetResource() *server.Resource {
162+ if self == nil {
163+ return nil
164+ }
165+ return self.Resource
166+}
A protocols/xdg-decoration-unstable-v1.xml +176 -0
@@ -0,0 +1,176 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<protocol name="xdg_decoration_unstable_v1">
3+ <copyright>
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+ </copyright>
25+
26+ <interface name="zxdg_decoration_manager_v1" version="2">
27+ <description summary="window decoration manager">
28+ This interface allows a compositor to announce support for server-side
29+ decorations.
30+
31+ A window decoration is a set of window controls as deemed appropriate by
32+ the party managing them, such as user interface components used to move,
33+ resize and change a window's state.
34+
35+ A client can use this protocol to request being decorated by a supporting
36+ compositor.
37+
38+ If compositor and client do not negotiate the use of a server-side
39+ decoration using this protocol, clients continue to self-decorate as they
40+ see fit.
41+
42+ Warning! The protocol described in this file is experimental and
43+ backward incompatible changes may be made. Backward compatible changes
44+ may be added together with the corresponding interface version bump.
45+ Backward incompatible changes are done by bumping the version number in
46+ the protocol and interface names and resetting the interface version.
47+ Once the protocol is to be declared stable, the 'z' prefix and the
48+ version number in the protocol and interface names are removed and the
49+ interface version number is reset.
50+ </description>
51+
52+ <request name="destroy" type="destructor">
53+ <description summary="destroy the decoration manager object">
54+ Destroy the decoration manager. This doesn't destroy objects created
55+ with the manager.
56+ </description>
57+ </request>
58+
59+ <request name="get_toplevel_decoration">
60+ <description summary="create a new toplevel decoration object">
61+ Create a new decoration object associated with the given toplevel.
62+
63+ For objects of version 1, creating an xdg_toplevel_decoration from an
64+ xdg_toplevel which has a buffer attached or committed is a client
65+ error, and any attempts by a client to attach or manipulate a buffer
66+ prior to the first xdg_toplevel_decoration.configure event must also be
67+ treated as errors.
68+
69+ For objects of version 2 or newer, creating an xdg_toplevel_decoration
70+ from an xdg_toplevel which has a buffer attached or committed is
71+ allowed. The initial decoration mode of the surface if a buffer is
72+ already attached depends on whether a xdg_toplevel_decoration object
73+ has been associated with the surface or not prior to this request.
74+
75+ If an xdg_toplevel_decoration was associated with the surface, then
76+ destroyed without a surface commit, the previous decoration mode is
77+ retained.
78+
79+ If no xdg_toplevel_decoration was associated with the surface prior to
80+ this request, or if a surface commit has been performed after a previous
81+ xdg_toplevel_decoration object associated with the surface was
82+ destroyed, the decoration mode is assumed to be client-side.
83+ </description>
84+ <arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/>
85+ <arg name="toplevel" type="object" interface="xdg_toplevel"/>
86+ </request>
87+ </interface>
88+
89+ <interface name="zxdg_toplevel_decoration_v1" version="2">
90+ <description summary="decoration object for a toplevel surface">
91+ The decoration object allows the compositor to toggle server-side window
92+ decorations for a toplevel surface. The client can request to switch to
93+ another mode.
94+
95+ The xdg_toplevel_decoration object must be destroyed before its
96+ xdg_toplevel.
97+ </description>
98+
99+ <enum name="error">
100+ <entry name="unconfigured_buffer" value="0"
101+ summary="xdg_toplevel has a buffer attached before configure"/>
102+ <entry name="already_constructed" value="1"
103+ summary="xdg_toplevel already has a decoration object"/>
104+ <entry name="orphaned" value="2"
105+ summary="xdg_toplevel destroyed before the decoration object"/>
106+ <entry name="invalid_mode" value="3" summary="invalid mode"/>
107+ </enum>
108+
109+ <request name="destroy" type="destructor">
110+ <description summary="destroy the decoration object">
111+ Switch back to a mode without any server-side decorations at the next
112+ commit, unless a new xdg_toplevel_decoration is created for the surface
113+ first.
114+ </description>
115+ </request>
116+
117+ <enum name="mode">
118+ <description summary="window decoration modes">
119+ These values describe window decoration modes.
120+ </description>
121+ <entry name="client_side" value="1"
122+ summary="no server-side window decoration"/>
123+ <entry name="server_side" value="2"
124+ summary="server-side window decoration"/>
125+ </enum>
126+
127+ <request name="set_mode">
128+ <description summary="set the decoration mode">
129+ Set the toplevel surface decoration mode. This informs the compositor
130+ that the client prefers the provided decoration mode.
131+
132+ After requesting a decoration mode, the compositor will respond by
133+ emitting an xdg_surface.configure event. The client should then update
134+ its content, drawing it without decorations if the received mode is
135+ server-side decorations. The client must also acknowledge the configure
136+ when committing the new content (see xdg_surface.ack_configure).
137+
138+ The compositor can decide not to use the client's mode and enforce a
139+ different mode instead.
140+
141+ Clients whose decoration mode depend on the xdg_toplevel state may send
142+ a set_mode request in response to an xdg_surface.configure event and wait
143+ for the next xdg_surface.configure event to prevent unwanted state.
144+ Such clients are responsible for preventing configure loops and must
145+ make sure not to send multiple successive set_mode requests with the
146+ same decoration mode.
147+
148+ If an invalid mode is supplied by the client, the invalid_mode protocol
149+ error is raised by the compositor.
150+ </description>
151+ <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
152+ </request>
153+
154+ <request name="unset_mode">
155+ <description summary="unset the decoration mode">
156+ Unset the toplevel surface decoration mode. This informs the compositor
157+ that the client doesn't prefer a particular decoration mode.
158+
159+ This request has the same semantics as set_mode.
160+ </description>
161+ </request>
162+
163+ <event name="configure">
164+ <description summary="notify a decoration mode change">
165+ The configure event configures the effective decoration mode. The
166+ configured state should not be applied immediately. Clients must send an
167+ ack_configure in response to this event. See xdg_surface.configure and
168+ xdg_surface.ack_configure for details.
169+
170+ A configure event can be sent at any time. The specified mode must be
171+ obeyed by the client.
172+ </description>
173+ <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
174+ </event>
175+ </interface>
176+</protocol>
@@ -0,0 +1,176 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<protocol name="xdg_decoration_unstable_v1">
3+ <copyright>
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+ </copyright>
25+
26+ <interface name="zxdg_decoration_manager_v1" version="2">
27+ <description summary="window decoration manager">
28+ This interface allows a compositor to announce support for server-side
29+ decorations.
30+
31+ A window decoration is a set of window controls as deemed appropriate by
32+ the party managing them, such as user interface components used to move,
33+ resize and change a window's state.
34+
35+ A client can use this protocol to request being decorated by a supporting
36+ compositor.
37+
38+ If compositor and client do not negotiate the use of a server-side
39+ decoration using this protocol, clients continue to self-decorate as they
40+ see fit.
41+
42+ Warning! The protocol described in this file is experimental and
43+ backward incompatible changes may be made. Backward compatible changes
44+ may be added together with the corresponding interface version bump.
45+ Backward incompatible changes are done by bumping the version number in
46+ the protocol and interface names and resetting the interface version.
47+ Once the protocol is to be declared stable, the 'z' prefix and the
48+ version number in the protocol and interface names are removed and the
49+ interface version number is reset.
50+ </description>
51+
52+ <request name="destroy" type="destructor">
53+ <description summary="destroy the decoration manager object">
54+ Destroy the decoration manager. This doesn't destroy objects created
55+ with the manager.
56+ </description>
57+ </request>
58+
59+ <request name="get_toplevel_decoration">
60+ <description summary="create a new toplevel decoration object">
61+ Create a new decoration object associated with the given toplevel.
62+
63+ For objects of version 1, creating an xdg_toplevel_decoration from an
64+ xdg_toplevel which has a buffer attached or committed is a client
65+ error, and any attempts by a client to attach or manipulate a buffer
66+ prior to the first xdg_toplevel_decoration.configure event must also be
67+ treated as errors.
68+
69+ For objects of version 2 or newer, creating an xdg_toplevel_decoration
70+ from an xdg_toplevel which has a buffer attached or committed is
71+ allowed. The initial decoration mode of the surface if a buffer is
72+ already attached depends on whether a xdg_toplevel_decoration object
73+ has been associated with the surface or not prior to this request.
74+
75+ If an xdg_toplevel_decoration was associated with the surface, then
76+ destroyed without a surface commit, the previous decoration mode is
77+ retained.
78+
79+ If no xdg_toplevel_decoration was associated with the surface prior to
80+ this request, or if a surface commit has been performed after a previous
81+ xdg_toplevel_decoration object associated with the surface was
82+ destroyed, the decoration mode is assumed to be client-side.
83+ </description>
84+ <arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/>
85+ <arg name="toplevel" type="object" interface="xdg_toplevel"/>
86+ </request>
87+ </interface>
88+
89+ <interface name="zxdg_toplevel_decoration_v1" version="2">
90+ <description summary="decoration object for a toplevel surface">
91+ The decoration object allows the compositor to toggle server-side window
92+ decorations for a toplevel surface. The client can request to switch to
93+ another mode.
94+
95+ The xdg_toplevel_decoration object must be destroyed before its
96+ xdg_toplevel.
97+ </description>
98+
99+ <enum name="error">
100+ <entry name="unconfigured_buffer" value="0"
101+ summary="xdg_toplevel has a buffer attached before configure"/>
102+ <entry name="already_constructed" value="1"
103+ summary="xdg_toplevel already has a decoration object"/>
104+ <entry name="orphaned" value="2"
105+ summary="xdg_toplevel destroyed before the decoration object"/>
106+ <entry name="invalid_mode" value="3" summary="invalid mode"/>
107+ </enum>
108+
109+ <request name="destroy" type="destructor">
110+ <description summary="destroy the decoration object">
111+ Switch back to a mode without any server-side decorations at the next
112+ commit, unless a new xdg_toplevel_decoration is created for the surface
113+ first.
114+ </description>
115+ </request>
116+
117+ <enum name="mode">
118+ <description summary="window decoration modes">
119+ These values describe window decoration modes.
120+ </description>
121+ <entry name="client_side" value="1"
122+ summary="no server-side window decoration"/>
123+ <entry name="server_side" value="2"
124+ summary="server-side window decoration"/>
125+ </enum>
126+
127+ <request name="set_mode">
128+ <description summary="set the decoration mode">
129+ Set the toplevel surface decoration mode. This informs the compositor
130+ that the client prefers the provided decoration mode.
131+
132+ After requesting a decoration mode, the compositor will respond by
133+ emitting an xdg_surface.configure event. The client should then update
134+ its content, drawing it without decorations if the received mode is
135+ server-side decorations. The client must also acknowledge the configure
136+ when committing the new content (see xdg_surface.ack_configure).
137+
138+ The compositor can decide not to use the client's mode and enforce a
139+ different mode instead.
140+
141+ Clients whose decoration mode depend on the xdg_toplevel state may send
142+ a set_mode request in response to an xdg_surface.configure event and wait
143+ for the next xdg_surface.configure event to prevent unwanted state.
144+ Such clients are responsible for preventing configure loops and must
145+ make sure not to send multiple successive set_mode requests with the
146+ same decoration mode.
147+
148+ If an invalid mode is supplied by the client, the invalid_mode protocol
149+ error is raised by the compositor.
150+ </description>
151+ <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
152+ </request>
153+
154+ <request name="unset_mode">
155+ <description summary="unset the decoration mode">
156+ Unset the toplevel surface decoration mode. This informs the compositor
157+ that the client doesn't prefer a particular decoration mode.
158+
159+ This request has the same semantics as set_mode.
160+ </description>
161+ </request>
162+
163+ <event name="configure">
164+ <description summary="notify a decoration mode change">
165+ The configure event configures the effective decoration mode. The
166+ configured state should not be applied immediately. Clients must send an
167+ ack_configure in response to this event. See xdg_surface.configure and
168+ xdg_surface.ack_configure for details.
169+
170+ A configure event can be sent at any time. The specified mode must be
171+ obeyed by the client.
172+ </description>
173+ <arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
174+ </event>
175+ </interface>
176+</protocol>

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