detached 1a6c6c9

wlrvirtualpointer_generated.go RawHistoryFolder

1// Code generated by wlbgen; DO NOT EDIT.
2
3// Upstream protocol copyright and license:
4// Copyright © 2019 Josef Gajdusek
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 wlrvirtualpointer
26
27import (
28	"fmt"
29	wayland "github.com/bnema/go-wayland-bindings/server/wayland"
30	"github.com/bnema/purego-libwayland/server"
31)
32
33var ZwlrVirtualPointerV1Interface *server.Interface
34var ZwlrVirtualPointerManagerV1Interface *server.Interface
35
36func init() {
37	ZwlrVirtualPointerV1Interface = &server.Interface{Name: "zwlr_virtual_pointer_v1", Version: 2}
38	ZwlrVirtualPointerManagerV1Interface = &server.Interface{Name: "zwlr_virtual_pointer_manager_v1", Version: 2}
39	ZwlrVirtualPointerV1Interface.Requests = []server.Message{
40		{Name: "motion", Signature: "uff", Types: []*server.Interface{nil, nil, nil}},
41		{Name: "motion_absolute", Signature: "uuuuu", Types: []*server.Interface{nil, nil, nil, nil, nil}},
42		{Name: "button", Signature: "uuu", Types: []*server.Interface{nil, nil, nil}},
43		{Name: "axis", Signature: "uuf", Types: []*server.Interface{nil, nil, nil}},
44		{Name: "frame", Signature: "", Types: []*server.Interface{}},
45		{Name: "axis_source", Signature: "u", Types: []*server.Interface{nil}},
46		{Name: "axis_stop", Signature: "uu", Types: []*server.Interface{nil, nil}},
47		{Name: "axis_discrete", Signature: "uufi", Types: []*server.Interface{nil, nil, nil, nil}},
48		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
49	}
50	ZwlrVirtualPointerV1Interface.Events = []server.Message{}
51	ZwlrVirtualPointerManagerV1Interface.Requests = []server.Message{
52		{Name: "create_virtual_pointer", Signature: "?on", Types: []*server.Interface{wayland.SeatInterface, ZwlrVirtualPointerV1Interface}},
53		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
54		{Name: "create_virtual_pointer_with_output", Signature: "2?o?on", Types: []*server.Interface{wayland.SeatInterface, wayland.OutputInterface, ZwlrVirtualPointerV1Interface}},
55	}
56	ZwlrVirtualPointerManagerV1Interface.Events = []server.Message{}
57	if err := server.NewInterfaces(ZwlrVirtualPointerV1Interface, ZwlrVirtualPointerManagerV1Interface); err != nil {
58		panic(err)
59	}
60}
61
62// ZwlrVirtualPointerV1 virtual pointer.
63type ZwlrVirtualPointerV1 struct{ *server.Resource }
64
65func WrapZwlrVirtualPointerV1(r *server.Resource) *ZwlrVirtualPointerV1 {
66	if r == nil {
67		return nil
68	}
69	return &ZwlrVirtualPointerV1{r}
70}
71
72const ZwlrVirtualPointerV1RequestMotion uint32 = 0
73const ZwlrVirtualPointerV1RequestMotionAbsolute uint32 = 1
74const ZwlrVirtualPointerV1RequestButton uint32 = 2
75const ZwlrVirtualPointerV1RequestAxis uint32 = 3
76const ZwlrVirtualPointerV1RequestFrame uint32 = 4
77const ZwlrVirtualPointerV1RequestAxisSource uint32 = 5
78const ZwlrVirtualPointerV1RequestAxisStop uint32 = 6
79const ZwlrVirtualPointerV1RequestAxisDiscrete uint32 = 7
80const ZwlrVirtualPointerV1RequestDestroy uint32 = 8
81
82// ZwlrVirtualPointerV1Error .
83type ZwlrVirtualPointerV1Error uint32
84
85const (
86	ZwlrVirtualPointerV1ErrorInvalidAxis       ZwlrVirtualPointerV1Error = 0
87	ZwlrVirtualPointerV1ErrorInvalidAxisSource ZwlrVirtualPointerV1Error = 1
88)
89
90// ZwlrVirtualPointerV1Handler handles zwlr_virtual_pointer_v1 requests.
91type ZwlrVirtualPointerV1Handler interface {
92	Motion(self *ZwlrVirtualPointerV1, time uint32, dx server.Fixed, dy server.Fixed)
93	MotionAbsolute(self *ZwlrVirtualPointerV1, time uint32, x uint32, y uint32, xExtent uint32, yExtent uint32)
94	Button(self *ZwlrVirtualPointerV1, time uint32, button uint32, state uint32)
95	Axis(self *ZwlrVirtualPointerV1, time uint32, axis uint32, value server.Fixed)
96	Frame(self *ZwlrVirtualPointerV1)
97	AxisSource(self *ZwlrVirtualPointerV1, axisSource uint32)
98	AxisStop(self *ZwlrVirtualPointerV1, time uint32, axis uint32)
99	AxisDiscrete(self *ZwlrVirtualPointerV1, time uint32, axis uint32, value server.Fixed, discrete int32)
100	Destroy(self *ZwlrVirtualPointerV1)
101}
102
103func NewZwlrVirtualPointerV1(c server.Client, version int32, id uint32, h ZwlrVirtualPointerV1Handler) (*ZwlrVirtualPointerV1, error) {
104	if h == nil {
105		return nil, fmt.Errorf("purego-libwayland: nil handler for zwlr_virtual_pointer_v1")
106	}
107	var self *ZwlrVirtualPointerV1
108	r, err := c.CreateResource(ZwlrVirtualPointerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
109		switch opcode {
110		case 0:
111			h.Motion(self, args[0].Uint(), args[1].Fixed(), args[2].Fixed())
112		case 1:
113			h.MotionAbsolute(self, args[0].Uint(), args[1].Uint(), args[2].Uint(), args[3].Uint(), args[4].Uint())
114		case 2:
115			h.Button(self, args[0].Uint(), args[1].Uint(), args[2].Uint())
116		case 3:
117			h.Axis(self, args[0].Uint(), args[1].Uint(), args[2].Fixed())
118		case 4:
119			h.Frame(self)
120		case 5:
121			h.AxisSource(self, args[0].Uint())
122		case 6:
123			h.AxisStop(self, args[0].Uint(), args[1].Uint())
124		case 7:
125			h.AxisDiscrete(self, args[0].Uint(), args[1].Uint(), args[2].Fixed(), args[3].Int())
126		case 8:
127			h.Destroy(self)
128			self.Destroy()
129		}
130	})
131	if err != nil {
132		return nil, err
133	}
134	self = WrapZwlrVirtualPointerV1(r)
135	r.Data = self
136	return self, nil
137}
138func NewZwlrVirtualPointerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
139	return d.CreateGlobal(ZwlrVirtualPointerV1Interface, version, bind)
140}
141
142// ZwlrVirtualPointerManagerV1 virtual pointer manager.
143type ZwlrVirtualPointerManagerV1 struct{ *server.Resource }
144
145func WrapZwlrVirtualPointerManagerV1(r *server.Resource) *ZwlrVirtualPointerManagerV1 {
146	if r == nil {
147		return nil
148	}
149	return &ZwlrVirtualPointerManagerV1{r}
150}
151
152const ZwlrVirtualPointerManagerV1RequestCreateVirtualPointer uint32 = 0
153const ZwlrVirtualPointerManagerV1RequestDestroy uint32 = 1
154const ZwlrVirtualPointerManagerV1RequestCreateVirtualPointerWithOutput uint32 = 2
155
156// ZwlrVirtualPointerManagerV1Handler handles zwlr_virtual_pointer_manager_v1 requests.
157type ZwlrVirtualPointerManagerV1Handler interface {
158	CreateVirtualPointer(self *ZwlrVirtualPointerManagerV1, seat *wayland.Seat, id uint32)
159	Destroy(self *ZwlrVirtualPointerManagerV1)
160	CreateVirtualPointerWithOutput(self *ZwlrVirtualPointerManagerV1, seat *wayland.Seat, output *wayland.Output, id uint32)
161}
162
163func NewZwlrVirtualPointerManagerV1(c server.Client, version int32, id uint32, h ZwlrVirtualPointerManagerV1Handler) (*ZwlrVirtualPointerManagerV1, error) {
164	if h == nil {
165		return nil, fmt.Errorf("purego-libwayland: nil handler for zwlr_virtual_pointer_manager_v1")
166	}
167	var self *ZwlrVirtualPointerManagerV1
168	r, err := c.CreateResource(ZwlrVirtualPointerManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
169		switch opcode {
170		case 0:
171			h.CreateVirtualPointer(self, wayland.WrapSeat(args[0].Resource()), args[1].NewID())
172		case 1:
173			h.Destroy(self)
174			self.Destroy()
175		case 2:
176			h.CreateVirtualPointerWithOutput(self, wayland.WrapSeat(args[0].Resource()), wayland.WrapOutput(args[1].Resource()), args[2].NewID())
177		}
178	})
179	if err != nil {
180		return nil, err
181	}
182	self = WrapZwlrVirtualPointerManagerV1(r)
183	r.Data = self
184	return self, nil
185}
186func NewZwlrVirtualPointerManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
187	return d.CreateGlobal(ZwlrVirtualPointerManagerV1Interface, version, bind)
188}
189func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
190	if v == nil {
191		return nil
192	}
193	return v.GetResource()
194}
195func (self *ZwlrVirtualPointerV1) GetResource() *server.Resource {
196	if self == nil {
197		return nil
198	}
199	return self.Resource
200}
201func (self *ZwlrVirtualPointerManagerV1) GetResource() *server.Resource {
202	if self == nil {
203		return nil
204	}
205	return self.Resource
206}

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