detached 1a6c6c9

virtualkeyboard_generated.go RawHistoryFolder

1// Code generated by wlbgen; DO NOT EDIT.
2
3// Upstream protocol copyright and license:
4// Copyright © 2008-2011  Kristian Høgsberg
5// Copyright © 2010-2013  Intel Corporation
6// Copyright © 2012-2013  Collabora, Ltd.
7// Copyright © 2018       Purism SPC
8//
9// Permission is hereby granted, free of charge, to any person obtaining a
10// copy of this software and associated documentation files (the "Software"),
11// to deal in the Software without restriction, including without limitation
12// the rights to use, copy, modify, merge, publish, distribute, sublicense,
13// and/or sell copies of the Software, and to permit persons to whom the
14// Software is furnished to do so, subject to the following conditions:
15//
16// The above copyright notice and this permission notice (including the next
17// paragraph) shall be included in all copies or substantial portions of the
18// Software.
19//
20// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
23// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26// DEALINGS IN THE SOFTWARE.
27
28package virtualkeyboard
29
30import (
31	"fmt"
32	wayland "github.com/bnema/go-wayland-bindings/server/wayland"
33	"github.com/bnema/purego-libwayland/server"
34)
35
36var ZwpVirtualKeyboardV1Interface *server.Interface
37var ZwpVirtualKeyboardManagerV1Interface *server.Interface
38
39func init() {
40	ZwpVirtualKeyboardV1Interface = &server.Interface{Name: "zwp_virtual_keyboard_v1", Version: 1}
41	ZwpVirtualKeyboardManagerV1Interface = &server.Interface{Name: "zwp_virtual_keyboard_manager_v1", Version: 1}
42	ZwpVirtualKeyboardV1Interface.Requests = []server.Message{
43		{Name: "keymap", Signature: "uhu", Types: []*server.Interface{nil, nil, nil}},
44		{Name: "key", Signature: "uuu", Types: []*server.Interface{nil, nil, nil}},
45		{Name: "modifiers", Signature: "uuuu", Types: []*server.Interface{nil, nil, nil, nil}},
46		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
47	}
48	ZwpVirtualKeyboardV1Interface.Events = []server.Message{}
49	ZwpVirtualKeyboardManagerV1Interface.Requests = []server.Message{
50		{Name: "create_virtual_keyboard", Signature: "on", Types: []*server.Interface{wayland.SeatInterface, ZwpVirtualKeyboardV1Interface}},
51	}
52	ZwpVirtualKeyboardManagerV1Interface.Events = []server.Message{}
53	if err := server.NewInterfaces(ZwpVirtualKeyboardV1Interface, ZwpVirtualKeyboardManagerV1Interface); err != nil {
54		panic(err)
55	}
56}
57
58// ZwpVirtualKeyboardV1 virtual keyboard.
59type ZwpVirtualKeyboardV1 struct{ *server.Resource }
60
61func WrapZwpVirtualKeyboardV1(r *server.Resource) *ZwpVirtualKeyboardV1 {
62	if r == nil {
63		return nil
64	}
65	return &ZwpVirtualKeyboardV1{r}
66}
67
68const ZwpVirtualKeyboardV1RequestKeymap uint32 = 0
69const ZwpVirtualKeyboardV1RequestKey uint32 = 1
70const ZwpVirtualKeyboardV1RequestModifiers uint32 = 2
71const ZwpVirtualKeyboardV1RequestDestroy uint32 = 3
72
73// ZwpVirtualKeyboardV1Error .
74type ZwpVirtualKeyboardV1Error uint32
75
76const (
77	ZwpVirtualKeyboardV1ErrorNoKeymap ZwpVirtualKeyboardV1Error = 0
78)
79
80// ZwpVirtualKeyboardV1Handler handles zwp_virtual_keyboard_v1 requests.
81type ZwpVirtualKeyboardV1Handler interface {
82	Keymap(self *ZwpVirtualKeyboardV1, format uint32, fd int, size uint32)
83	Key(self *ZwpVirtualKeyboardV1, time uint32, key uint32, state uint32)
84	Modifiers(self *ZwpVirtualKeyboardV1, modsDepressed uint32, modsLatched uint32, modsLocked uint32, group uint32)
85	Destroy(self *ZwpVirtualKeyboardV1)
86}
87
88func NewZwpVirtualKeyboardV1(c server.Client, version int32, id uint32, h ZwpVirtualKeyboardV1Handler) (*ZwpVirtualKeyboardV1, error) {
89	if h == nil {
90		return nil, fmt.Errorf("purego-libwayland: nil handler for zwp_virtual_keyboard_v1")
91	}
92	var self *ZwpVirtualKeyboardV1
93	r, err := c.CreateResource(ZwpVirtualKeyboardV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
94		switch opcode {
95		case 0:
96			h.Keymap(self, args[0].Uint(), args[1].Fd(), args[2].Uint())
97		case 1:
98			h.Key(self, args[0].Uint(), args[1].Uint(), args[2].Uint())
99		case 2:
100			h.Modifiers(self, args[0].Uint(), args[1].Uint(), args[2].Uint(), args[3].Uint())
101		case 3:
102			h.Destroy(self)
103			self.Destroy()
104		}
105	})
106	if err != nil {
107		return nil, err
108	}
109	self = WrapZwpVirtualKeyboardV1(r)
110	r.Data = self
111	return self, nil
112}
113func NewZwpVirtualKeyboardV1Global(d *server.Display, version int32, bind server.BindFunc) error {
114	return d.CreateGlobal(ZwpVirtualKeyboardV1Interface, version, bind)
115}
116
117// ZwpVirtualKeyboardManagerV1 virtual keyboard manager.
118type ZwpVirtualKeyboardManagerV1 struct{ *server.Resource }
119
120func WrapZwpVirtualKeyboardManagerV1(r *server.Resource) *ZwpVirtualKeyboardManagerV1 {
121	if r == nil {
122		return nil
123	}
124	return &ZwpVirtualKeyboardManagerV1{r}
125}
126
127const ZwpVirtualKeyboardManagerV1RequestCreateVirtualKeyboard uint32 = 0
128
129// ZwpVirtualKeyboardManagerV1Error .
130type ZwpVirtualKeyboardManagerV1Error uint32
131
132const (
133	ZwpVirtualKeyboardManagerV1ErrorUnauthorized ZwpVirtualKeyboardManagerV1Error = 0
134)
135
136// ZwpVirtualKeyboardManagerV1Handler handles zwp_virtual_keyboard_manager_v1 requests.
137type ZwpVirtualKeyboardManagerV1Handler interface {
138	CreateVirtualKeyboard(self *ZwpVirtualKeyboardManagerV1, seat *wayland.Seat, id uint32)
139}
140
141func NewZwpVirtualKeyboardManagerV1(c server.Client, version int32, id uint32, h ZwpVirtualKeyboardManagerV1Handler) (*ZwpVirtualKeyboardManagerV1, error) {
142	if h == nil {
143		return nil, fmt.Errorf("purego-libwayland: nil handler for zwp_virtual_keyboard_manager_v1")
144	}
145	var self *ZwpVirtualKeyboardManagerV1
146	r, err := c.CreateResource(ZwpVirtualKeyboardManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
147		switch opcode {
148		case 0:
149			h.CreateVirtualKeyboard(self, wayland.WrapSeat(args[0].Resource()), args[1].NewID())
150		}
151	})
152	if err != nil {
153		return nil, err
154	}
155	self = WrapZwpVirtualKeyboardManagerV1(r)
156	r.Data = self
157	return self, nil
158}
159func NewZwpVirtualKeyboardManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
160	return d.CreateGlobal(ZwpVirtualKeyboardManagerV1Interface, version, bind)
161}
162func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
163	if v == nil {
164		return nil
165	}
166	return v.GetResource()
167}
168func (self *ZwpVirtualKeyboardV1) GetResource() *server.Resource {
169	if self == nil {
170		return nil
171	}
172	return self.Resource
173}
174func (self *ZwpVirtualKeyboardManagerV1) GetResource() *server.Resource {
175	if self == nil {
176		return nil
177	}
178	return self.Resource
179}

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