detached 1a6c6c9

xwaylandkeyboardgrab_generated.go RawHistoryFolder

1// Code generated by wlbgen; DO NOT EDIT.
2
3// Upstream protocol copyright and license:
4// Copyright © 2017 Red Hat Inc.
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
25package xwaylandkeyboardgrab
26
27import (
28	"fmt"
29	wayland "github.com/bnema/go-wayland-bindings/server/wayland"
30	"github.com/bnema/purego-libwayland/server"
31)
32
33var ZwpXwaylandKeyboardGrabManagerV1Interface *server.Interface
34var ZwpXwaylandKeyboardGrabV1Interface *server.Interface
35
36func init() {
37	ZwpXwaylandKeyboardGrabManagerV1Interface = &server.Interface{Name: "zwp_xwayland_keyboard_grab_manager_v1", Version: 1}
38	ZwpXwaylandKeyboardGrabV1Interface = &server.Interface{Name: "zwp_xwayland_keyboard_grab_v1", Version: 1}
39	ZwpXwaylandKeyboardGrabManagerV1Interface.Requests = []server.Message{
40		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
41		{Name: "grab_keyboard", Signature: "noo", Types: []*server.Interface{ZwpXwaylandKeyboardGrabV1Interface, wayland.SurfaceInterface, wayland.SeatInterface}},
42	}
43	ZwpXwaylandKeyboardGrabManagerV1Interface.Events = []server.Message{}
44	ZwpXwaylandKeyboardGrabV1Interface.Requests = []server.Message{
45		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
46	}
47	ZwpXwaylandKeyboardGrabV1Interface.Events = []server.Message{}
48	if err := server.NewInterfaces(ZwpXwaylandKeyboardGrabManagerV1Interface, ZwpXwaylandKeyboardGrabV1Interface); err != nil {
49		panic(err)
50	}
51}
52
53// ZwpXwaylandKeyboardGrabManagerV1 context object for keyboard grab manager.
54type ZwpXwaylandKeyboardGrabManagerV1 struct{ *server.Resource }
55
56func WrapZwpXwaylandKeyboardGrabManagerV1(r *server.Resource) *ZwpXwaylandKeyboardGrabManagerV1 {
57	if r == nil {
58		return nil
59	}
60	return &ZwpXwaylandKeyboardGrabManagerV1{r}
61}
62
63const ZwpXwaylandKeyboardGrabManagerV1RequestDestroy uint32 = 0
64const ZwpXwaylandKeyboardGrabManagerV1RequestGrabKeyboard uint32 = 1
65
66// ZwpXwaylandKeyboardGrabManagerV1Handler handles zwp_xwayland_keyboard_grab_manager_v1 requests.
67type ZwpXwaylandKeyboardGrabManagerV1Handler interface {
68	Destroy(self *ZwpXwaylandKeyboardGrabManagerV1)
69	GrabKeyboard(self *ZwpXwaylandKeyboardGrabManagerV1, id uint32, surface *wayland.Surface, seat *wayland.Seat)
70}
71
72func NewZwpXwaylandKeyboardGrabManagerV1(c server.Client, version int32, id uint32, h ZwpXwaylandKeyboardGrabManagerV1Handler) (*ZwpXwaylandKeyboardGrabManagerV1, error) {
73	if h == nil {
74		return nil, fmt.Errorf("purego-libwayland: nil handler for zwp_xwayland_keyboard_grab_manager_v1")
75	}
76	var self *ZwpXwaylandKeyboardGrabManagerV1
77	r, err := c.CreateResource(ZwpXwaylandKeyboardGrabManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
78		switch opcode {
79		case 0:
80			h.Destroy(self)
81			self.Destroy()
82		case 1:
83			h.GrabKeyboard(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()), wayland.WrapSeat(args[2].Resource()))
84		}
85	})
86	if err != nil {
87		return nil, err
88	}
89	self = WrapZwpXwaylandKeyboardGrabManagerV1(r)
90	r.Data = self
91	return self, nil
92}
93func NewZwpXwaylandKeyboardGrabManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
94	return d.CreateGlobal(ZwpXwaylandKeyboardGrabManagerV1Interface, version, bind)
95}
96
97// ZwpXwaylandKeyboardGrabV1 interface for grabbing the keyboard.
98type ZwpXwaylandKeyboardGrabV1 struct{ *server.Resource }
99
100func WrapZwpXwaylandKeyboardGrabV1(r *server.Resource) *ZwpXwaylandKeyboardGrabV1 {
101	if r == nil {
102		return nil
103	}
104	return &ZwpXwaylandKeyboardGrabV1{r}
105}
106
107const ZwpXwaylandKeyboardGrabV1RequestDestroy uint32 = 0
108
109// ZwpXwaylandKeyboardGrabV1Handler handles zwp_xwayland_keyboard_grab_v1 requests.
110type ZwpXwaylandKeyboardGrabV1Handler interface {
111	Destroy(self *ZwpXwaylandKeyboardGrabV1)
112}
113
114func NewZwpXwaylandKeyboardGrabV1(c server.Client, version int32, id uint32, h ZwpXwaylandKeyboardGrabV1Handler) (*ZwpXwaylandKeyboardGrabV1, error) {
115	if h == nil {
116		return nil, fmt.Errorf("purego-libwayland: nil handler for zwp_xwayland_keyboard_grab_v1")
117	}
118	var self *ZwpXwaylandKeyboardGrabV1
119	r, err := c.CreateResource(ZwpXwaylandKeyboardGrabV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
120		switch opcode {
121		case 0:
122			h.Destroy(self)
123			self.Destroy()
124		}
125	})
126	if err != nil {
127		return nil, err
128	}
129	self = WrapZwpXwaylandKeyboardGrabV1(r)
130	r.Data = self
131	return self, nil
132}
133func NewZwpXwaylandKeyboardGrabV1Global(d *server.Display, version int32, bind server.BindFunc) error {
134	return d.CreateGlobal(ZwpXwaylandKeyboardGrabV1Interface, version, bind)
135}
136func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
137	if v == nil {
138		return nil
139	}
140	return v.GetResource()
141}
142func (self *ZwpXwaylandKeyboardGrabManagerV1) GetResource() *server.Resource {
143	if self == nil {
144		return nil
145	}
146	return self.Resource
147}
148func (self *ZwpXwaylandKeyboardGrabV1) GetResource() *server.Resource {
149	if self == nil {
150		return nil
151	}
152	return self.Resource
153}

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