v0.4.1 d14b9a5

keyboardshortcutsinhibit.go RawHistoryFolder

1// Code generated by wlgen; DO NOT EDIT.
2package keyboardshortcutsinhibit
3
4import (
5	"fmt"
6	wayland "github.com/bnema/purego-libwayland/protocol/wayland"
7	"github.com/bnema/purego-libwayland/server"
8)
9
10var ZwpKeyboardShortcutsInhibitManagerV1Interface *server.Interface
11var ZwpKeyboardShortcutsInhibitorV1Interface *server.Interface
12
13func init() {
14	ZwpKeyboardShortcutsInhibitManagerV1Interface = &server.Interface{Name: "zwp_keyboard_shortcuts_inhibit_manager_v1", Version: 1}
15	ZwpKeyboardShortcutsInhibitorV1Interface = &server.Interface{Name: "zwp_keyboard_shortcuts_inhibitor_v1", Version: 1}
16	ZwpKeyboardShortcutsInhibitManagerV1Interface.Requests = []server.Message{
17		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
18		{Name: "inhibit_shortcuts", Signature: "noo", Types: []*server.Interface{ZwpKeyboardShortcutsInhibitorV1Interface, wayland.SurfaceInterface, wayland.SeatInterface}},
19	}
20	ZwpKeyboardShortcutsInhibitManagerV1Interface.Events = []server.Message{}
21	ZwpKeyboardShortcutsInhibitorV1Interface.Requests = []server.Message{
22		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
23	}
24	ZwpKeyboardShortcutsInhibitorV1Interface.Events = []server.Message{
25		{Name: "active", Signature: "", Types: []*server.Interface{}},
26		{Name: "inactive", Signature: "", Types: []*server.Interface{}},
27	}
28	if err := server.NewInterfaces(ZwpKeyboardShortcutsInhibitManagerV1Interface, ZwpKeyboardShortcutsInhibitorV1Interface); err != nil {
29		panic(err)
30	}
31}
32
33// ZwpKeyboardShortcutsInhibitManagerV1 context object for keyboard grab_manager.
34type ZwpKeyboardShortcutsInhibitManagerV1 struct{ *server.Resource }
35
36func WrapZwpKeyboardShortcutsInhibitManagerV1(r *server.Resource) *ZwpKeyboardShortcutsInhibitManagerV1 {
37	if r == nil {
38		return nil
39	}
40	return &ZwpKeyboardShortcutsInhibitManagerV1{r}
41}
42
43const ZwpKeyboardShortcutsInhibitManagerV1RequestDestroy uint32 = 0
44const ZwpKeyboardShortcutsInhibitManagerV1RequestInhibitShortcuts uint32 = 1
45
46// ZwpKeyboardShortcutsInhibitManagerV1Error .
47type ZwpKeyboardShortcutsInhibitManagerV1Error uint32
48
49const (
50	ZwpKeyboardShortcutsInhibitManagerV1ErrorAlreadyInhibited ZwpKeyboardShortcutsInhibitManagerV1Error = 0
51)
52
53// ZwpKeyboardShortcutsInhibitManagerV1Handler handles zwp_keyboard_shortcuts_inhibit_manager_v1 requests.
54type ZwpKeyboardShortcutsInhibitManagerV1Handler interface {
55	Destroy(self *ZwpKeyboardShortcutsInhibitManagerV1)
56	InhibitShortcuts(self *ZwpKeyboardShortcutsInhibitManagerV1, id uint32, surface *wayland.Surface, seat *wayland.Seat)
57}
58
59func NewZwpKeyboardShortcutsInhibitManagerV1(c server.Client, version int32, id uint32, h ZwpKeyboardShortcutsInhibitManagerV1Handler) (*ZwpKeyboardShortcutsInhibitManagerV1, error) {
60	if h == nil {
61		return nil, fmt.Errorf("purego-libwayland: nil handler for zwp_keyboard_shortcuts_inhibit_manager_v1")
62	}
63	var self *ZwpKeyboardShortcutsInhibitManagerV1
64	r, err := c.CreateResource(ZwpKeyboardShortcutsInhibitManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
65		switch opcode {
66		case 0:
67			h.Destroy(self)
68			self.Destroy()
69		case 1:
70			h.InhibitShortcuts(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()), wayland.WrapSeat(args[2].Resource()))
71		}
72	})
73	if err != nil {
74		return nil, err
75	}
76	self = WrapZwpKeyboardShortcutsInhibitManagerV1(r)
77	r.Data = self
78	return self, nil
79}
80func NewZwpKeyboardShortcutsInhibitManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
81	return d.CreateGlobal(ZwpKeyboardShortcutsInhibitManagerV1Interface, version, bind)
82}
83
84// ZwpKeyboardShortcutsInhibitorV1 context object for keyboard shortcuts inhibitor.
85type ZwpKeyboardShortcutsInhibitorV1 struct{ *server.Resource }
86
87func WrapZwpKeyboardShortcutsInhibitorV1(r *server.Resource) *ZwpKeyboardShortcutsInhibitorV1 {
88	if r == nil {
89		return nil
90	}
91	return &ZwpKeyboardShortcutsInhibitorV1{r}
92}
93
94const ZwpKeyboardShortcutsInhibitorV1RequestDestroy uint32 = 0
95const ZwpKeyboardShortcutsInhibitorV1EventActive uint32 = 0
96const ZwpKeyboardShortcutsInhibitorV1EventInactive uint32 = 1
97
98// ZwpKeyboardShortcutsInhibitorV1Handler handles zwp_keyboard_shortcuts_inhibitor_v1 requests.
99type ZwpKeyboardShortcutsInhibitorV1Handler interface {
100	Destroy(self *ZwpKeyboardShortcutsInhibitorV1)
101}
102
103func NewZwpKeyboardShortcutsInhibitorV1(c server.Client, version int32, id uint32, h ZwpKeyboardShortcutsInhibitorV1Handler) (*ZwpKeyboardShortcutsInhibitorV1, error) {
104	if h == nil {
105		return nil, fmt.Errorf("purego-libwayland: nil handler for zwp_keyboard_shortcuts_inhibitor_v1")
106	}
107	var self *ZwpKeyboardShortcutsInhibitorV1
108	r, err := c.CreateResource(ZwpKeyboardShortcutsInhibitorV1Interface, 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 = WrapZwpKeyboardShortcutsInhibitorV1(r)
119	r.Data = self
120	return self, nil
121}
122
123// SendActive shortcuts are inhibited.
124func (self *ZwpKeyboardShortcutsInhibitorV1) SendActive() {
125	self.PostEvent(ZwpKeyboardShortcutsInhibitorV1EventActive)
126}
127
128// SendInactive shortcuts are restored.
129func (self *ZwpKeyboardShortcutsInhibitorV1) SendInactive() {
130	self.PostEvent(ZwpKeyboardShortcutsInhibitorV1EventInactive)
131}
132func NewZwpKeyboardShortcutsInhibitorV1Global(d *server.Display, version int32, bind server.BindFunc) error {
133	return d.CreateGlobal(ZwpKeyboardShortcutsInhibitorV1Interface, version, bind)
134}
135func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
136	if v == nil {
137		return nil
138	}
139	return v.GetResource()
140}
141func (self *ZwpKeyboardShortcutsInhibitManagerV1) GetResource() *server.Resource {
142	if self == nil {
143		return nil
144	}
145	return self.Resource
146}
147func (self *ZwpKeyboardShortcutsInhibitorV1) GetResource() *server.Resource {
148	if self == nil {
149		return nil
150	}
151	return self.Resource
152}

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