v0.4.0 91c6a74

xdgoutput.go RawHistoryFolder

1// Code generated by wlgen; DO NOT EDIT.
2package xdgoutput
3
4import (
5	"fmt"
6	wayland "github.com/bnema/purego-libwayland/protocol/wayland"
7	"github.com/bnema/purego-libwayland/server"
8	"runtime"
9)
10
11var ZxdgOutputManagerV1Interface *server.Interface
12var ZxdgOutputV1Interface *server.Interface
13
14func init() {
15	ZxdgOutputManagerV1Interface = &server.Interface{Name: "zxdg_output_manager_v1", Version: 3}
16	ZxdgOutputV1Interface = &server.Interface{Name: "zxdg_output_v1", Version: 3}
17	ZxdgOutputManagerV1Interface.Requests = []server.Message{
18		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
19		{Name: "get_xdg_output", Signature: "no", Types: []*server.Interface{ZxdgOutputV1Interface, wayland.OutputInterface}},
20	}
21	ZxdgOutputManagerV1Interface.Events = []server.Message{}
22	ZxdgOutputV1Interface.Requests = []server.Message{
23		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
24	}
25	ZxdgOutputV1Interface.Events = []server.Message{
26		{Name: "logical_position", Signature: "ii", Types: []*server.Interface{nil, nil}},
27		{Name: "logical_size", Signature: "ii", Types: []*server.Interface{nil, nil}},
28		{Name: "done", Signature: "", Types: []*server.Interface{}},
29		{Name: "name", Signature: "2s", Types: []*server.Interface{nil}},
30		{Name: "description", Signature: "2s", Types: []*server.Interface{nil}},
31	}
32	if err := server.NewInterfaces(ZxdgOutputManagerV1Interface, ZxdgOutputV1Interface); err != nil {
33		panic(err)
34	}
35}
36
37// ZxdgOutputManagerV1 manage xdg_output objects.
38type ZxdgOutputManagerV1 struct{ *server.Resource }
39
40func WrapZxdgOutputManagerV1(r *server.Resource) *ZxdgOutputManagerV1 {
41	if r == nil {
42		return nil
43	}
44	return &ZxdgOutputManagerV1{r}
45}
46
47const ZxdgOutputManagerV1RequestDestroy uint32 = 0
48const ZxdgOutputManagerV1RequestGetXdgOutput uint32 = 1
49
50// ZxdgOutputManagerV1Handler handles zxdg_output_manager_v1 requests.
51type ZxdgOutputManagerV1Handler interface {
52	Destroy(self *ZxdgOutputManagerV1)
53	GetXdgOutput(self *ZxdgOutputManagerV1, id uint32, output *wayland.Output)
54}
55
56func NewZxdgOutputManagerV1(c server.Client, version int32, id uint32, h ZxdgOutputManagerV1Handler) (*ZxdgOutputManagerV1, error) {
57	if h == nil {
58		return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_output_manager_v1")
59	}
60	var self *ZxdgOutputManagerV1
61	r, err := c.CreateResource(ZxdgOutputManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
62		switch opcode {
63		case 0:
64			h.Destroy(self)
65			self.Destroy()
66		case 1:
67			h.GetXdgOutput(self, args[0].NewID(), wayland.WrapOutput(args[1].Resource()))
68		}
69	})
70	if err != nil {
71		return nil, err
72	}
73	self = WrapZxdgOutputManagerV1(r)
74	r.Data = self
75	return self, nil
76}
77func NewZxdgOutputManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
78	return d.CreateGlobal(ZxdgOutputManagerV1Interface, version, bind)
79}
80
81// ZxdgOutputV1 compositor logical output region.
82type ZxdgOutputV1 struct{ *server.Resource }
83
84func WrapZxdgOutputV1(r *server.Resource) *ZxdgOutputV1 {
85	if r == nil {
86		return nil
87	}
88	return &ZxdgOutputV1{r}
89}
90
91const ZxdgOutputV1RequestDestroy uint32 = 0
92const ZxdgOutputV1EventLogicalPosition uint32 = 0
93const ZxdgOutputV1EventLogicalSize uint32 = 1
94const ZxdgOutputV1EventDone uint32 = 2
95const ZxdgOutputV1EventName uint32 = 3
96const ZxdgOutputV1EventDescription uint32 = 4
97
98// ZxdgOutputV1Handler handles zxdg_output_v1 requests.
99type ZxdgOutputV1Handler interface {
100	Destroy(self *ZxdgOutputV1)
101}
102
103func NewZxdgOutputV1(c server.Client, version int32, id uint32, h ZxdgOutputV1Handler) (*ZxdgOutputV1, error) {
104	if h == nil {
105		return nil, fmt.Errorf("purego-libwayland: nil handler for zxdg_output_v1")
106	}
107	var self *ZxdgOutputV1
108	r, err := c.CreateResource(ZxdgOutputV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
109		switch opcode {
110		case 0:
111			h.Destroy(self)
112			self.Destroy()
113		}
114	})
115	if err != nil {
116		return nil, err
117	}
118	self = WrapZxdgOutputV1(r)
119	r.Data = self
120	return self, nil
121}
122
123// SendLogicalPosition position of the output within the global compositor space.
124func (self *ZxdgOutputV1) SendLogicalPosition(x int32, y int32) {
125	self.PostEvent(ZxdgOutputV1EventLogicalPosition, server.Int(x), server.Int(y))
126}
127
128// SendLogicalSize size of the output in the global compositor space.
129func (self *ZxdgOutputV1) SendLogicalSize(width int32, height int32) {
130	self.PostEvent(ZxdgOutputV1EventLogicalSize, server.Int(width), server.Int(height))
131}
132
133// SendDone all information about the output have been sent.
134func (self *ZxdgOutputV1) SendDone() {
135	self.PostEvent(ZxdgOutputV1EventDone)
136}
137
138// SendName name of this output (since version 2).
139func (self *ZxdgOutputV1) SendName(name string) {
140	var p runtime.Pinner
141	defer p.Unpin()
142	self.PostEvent(ZxdgOutputV1EventName, server.String(&p, name, false))
143}
144
145// SendDescription human-readable description of this output (since version 2).
146func (self *ZxdgOutputV1) SendDescription(description string) {
147	var p runtime.Pinner
148	defer p.Unpin()
149	self.PostEvent(ZxdgOutputV1EventDescription, server.String(&p, description, false))
150}
151func NewZxdgOutputV1Global(d *server.Display, version int32, bind server.BindFunc) error {
152	return d.CreateGlobal(ZxdgOutputV1Interface, version, bind)
153}
154func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
155	if v == nil {
156		return nil
157	}
158	return v.GetResource()
159}
160func (self *ZxdgOutputManagerV1) GetResource() *server.Resource {
161	if self == nil {
162		return nil
163	}
164	return self.Resource
165}
166func (self *ZxdgOutputV1) GetResource() *server.Resource {
167	if self == nil {
168		return nil
169	}
170	return self.Resource
171}

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