v0.1.0 1a6c6c9

extidlenotify_generated.go RawHistoryFolder

1// Code generated by wlbgen; DO NOT EDIT.
2
3// Upstream protocol copyright and license:
4// Copyright © 2015 Martin Gräßlin
5// Copyright © 2022 Simon Ser
6//
7// Permission is hereby granted, free of charge, to any person obtaining a
8// copy of this software and associated documentation files (the "Software"),
9// to deal in the Software without restriction, including without limitation
10// the rights to use, copy, modify, merge, publish, distribute, sublicense,
11// and/or sell copies of the Software, and to permit persons to whom the
12// Software is furnished to do so, subject to the following conditions:
13//
14// The above copyright notice and this permission notice (including the next
15// paragraph) shall be included in all copies or substantial portions of the
16// Software.
17//
18// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24// DEALINGS IN THE SOFTWARE.
25
26package extidlenotify
27
28import (
29	"fmt"
30	wayland "github.com/bnema/go-wayland-bindings/server/wayland"
31	"github.com/bnema/purego-libwayland/server"
32)
33
34var ExtIdleNotifierV1Interface *server.Interface
35var ExtIdleNotificationV1Interface *server.Interface
36
37func init() {
38	ExtIdleNotifierV1Interface = &server.Interface{Name: "ext_idle_notifier_v1", Version: 2}
39	ExtIdleNotificationV1Interface = &server.Interface{Name: "ext_idle_notification_v1", Version: 2}
40	ExtIdleNotifierV1Interface.Requests = []server.Message{
41		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
42		{Name: "get_idle_notification", Signature: "nuo", Types: []*server.Interface{ExtIdleNotificationV1Interface, nil, wayland.SeatInterface}},
43		{Name: "get_input_idle_notification", Signature: "2nuo", Types: []*server.Interface{ExtIdleNotificationV1Interface, nil, wayland.SeatInterface}},
44	}
45	ExtIdleNotifierV1Interface.Events = []server.Message{}
46	ExtIdleNotificationV1Interface.Requests = []server.Message{
47		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
48	}
49	ExtIdleNotificationV1Interface.Events = []server.Message{
50		{Name: "idled", Signature: "", Types: []*server.Interface{}},
51		{Name: "resumed", Signature: "", Types: []*server.Interface{}},
52	}
53	if err := server.NewInterfaces(ExtIdleNotifierV1Interface, ExtIdleNotificationV1Interface); err != nil {
54		panic(err)
55	}
56}
57
58// ExtIdleNotifierV1 idle notification manager.
59type ExtIdleNotifierV1 struct{ *server.Resource }
60
61func WrapExtIdleNotifierV1(r *server.Resource) *ExtIdleNotifierV1 {
62	if r == nil {
63		return nil
64	}
65	return &ExtIdleNotifierV1{r}
66}
67
68const ExtIdleNotifierV1RequestDestroy uint32 = 0
69const ExtIdleNotifierV1RequestGetIdleNotification uint32 = 1
70const ExtIdleNotifierV1RequestGetInputIdleNotification uint32 = 2
71
72// ExtIdleNotifierV1Handler handles ext_idle_notifier_v1 requests.
73type ExtIdleNotifierV1Handler interface {
74	Destroy(self *ExtIdleNotifierV1)
75	GetIdleNotification(self *ExtIdleNotifierV1, id uint32, timeout uint32, seat *wayland.Seat)
76	GetInputIdleNotification(self *ExtIdleNotifierV1, id uint32, timeout uint32, seat *wayland.Seat)
77}
78
79func NewExtIdleNotifierV1(c server.Client, version int32, id uint32, h ExtIdleNotifierV1Handler) (*ExtIdleNotifierV1, error) {
80	if h == nil {
81		return nil, fmt.Errorf("purego-libwayland: nil handler for ext_idle_notifier_v1")
82	}
83	var self *ExtIdleNotifierV1
84	r, err := c.CreateResource(ExtIdleNotifierV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
85		switch opcode {
86		case 0:
87			h.Destroy(self)
88			self.Destroy()
89		case 1:
90			h.GetIdleNotification(self, args[0].NewID(), args[1].Uint(), wayland.WrapSeat(args[2].Resource()))
91		case 2:
92			h.GetInputIdleNotification(self, args[0].NewID(), args[1].Uint(), wayland.WrapSeat(args[2].Resource()))
93		}
94	})
95	if err != nil {
96		return nil, err
97	}
98	self = WrapExtIdleNotifierV1(r)
99	r.Data = self
100	return self, nil
101}
102func NewExtIdleNotifierV1Global(d *server.Display, version int32, bind server.BindFunc) error {
103	return d.CreateGlobal(ExtIdleNotifierV1Interface, version, bind)
104}
105
106// ExtIdleNotificationV1 idle notification.
107type ExtIdleNotificationV1 struct{ *server.Resource }
108
109func WrapExtIdleNotificationV1(r *server.Resource) *ExtIdleNotificationV1 {
110	if r == nil {
111		return nil
112	}
113	return &ExtIdleNotificationV1{r}
114}
115
116const ExtIdleNotificationV1RequestDestroy uint32 = 0
117const ExtIdleNotificationV1EventIdled uint32 = 0
118const ExtIdleNotificationV1EventResumed uint32 = 1
119
120// ExtIdleNotificationV1Handler handles ext_idle_notification_v1 requests.
121type ExtIdleNotificationV1Handler interface {
122	Destroy(self *ExtIdleNotificationV1)
123}
124
125func NewExtIdleNotificationV1(c server.Client, version int32, id uint32, h ExtIdleNotificationV1Handler) (*ExtIdleNotificationV1, error) {
126	if h == nil {
127		return nil, fmt.Errorf("purego-libwayland: nil handler for ext_idle_notification_v1")
128	}
129	var self *ExtIdleNotificationV1
130	r, err := c.CreateResource(ExtIdleNotificationV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
131		switch opcode {
132		case 0:
133			h.Destroy(self)
134			self.Destroy()
135		}
136	})
137	if err != nil {
138		return nil, err
139	}
140	self = WrapExtIdleNotificationV1(r)
141	r.Data = self
142	return self, nil
143}
144
145// SendIdled notification object is idle.
146func (self *ExtIdleNotificationV1) SendIdled() {
147	self.PostEvent(ExtIdleNotificationV1EventIdled)
148}
149
150// SendResumed notification object is no longer idle.
151func (self *ExtIdleNotificationV1) SendResumed() {
152	self.PostEvent(ExtIdleNotificationV1EventResumed)
153}
154func NewExtIdleNotificationV1Global(d *server.Display, version int32, bind server.BindFunc) error {
155	return d.CreateGlobal(ExtIdleNotificationV1Interface, version, bind)
156}
157func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
158	if v == nil {
159		return nil
160	}
161	return v.GetResource()
162}
163func (self *ExtIdleNotifierV1) GetResource() *server.Resource {
164	if self == nil {
165		return nil
166	}
167	return self.Resource
168}
169func (self *ExtIdleNotificationV1) GetResource() *server.Resource {
170	if self == nil {
171		return nil
172	}
173	return self.Resource
174}

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