v0.2.0 107c393

tearingcontrol.go RawHistoryFolder

1// Code generated by wlgen; DO NOT EDIT.
2package tearingcontrol
3
4import (
5	"fmt"
6	wayland "github.com/bnema/purego-libwayland/protocol/wayland"
7	"github.com/bnema/purego-libwayland/server"
8)
9
10var WpTearingControlManagerV1Interface *server.Interface
11var WpTearingControlV1Interface *server.Interface
12
13func init() {
14	WpTearingControlManagerV1Interface = &server.Interface{Name: "wp_tearing_control_manager_v1", Version: 1}
15	WpTearingControlV1Interface = &server.Interface{Name: "wp_tearing_control_v1", Version: 1}
16	WpTearingControlManagerV1Interface.Requests = []server.Message{
17		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
18		{Name: "get_tearing_control", Signature: "no", Types: []*server.Interface{WpTearingControlV1Interface, wayland.SurfaceInterface}},
19	}
20	WpTearingControlManagerV1Interface.Events = []server.Message{}
21	WpTearingControlV1Interface.Requests = []server.Message{
22		{Name: "set_presentation_hint", Signature: "u", Types: []*server.Interface{nil}},
23		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
24	}
25	WpTearingControlV1Interface.Events = []server.Message{}
26	if err := server.NewInterfaces(WpTearingControlManagerV1Interface, WpTearingControlV1Interface); err != nil {
27		panic(err)
28	}
29}
30
31// WpTearingControlManagerV1 protocol for tearing control.
32type WpTearingControlManagerV1 struct{ *server.Resource }
33
34func WrapWpTearingControlManagerV1(r *server.Resource) *WpTearingControlManagerV1 {
35	if r == nil {
36		return nil
37	}
38	return &WpTearingControlManagerV1{r}
39}
40
41const WpTearingControlManagerV1RequestDestroy uint32 = 0
42const WpTearingControlManagerV1RequestGetTearingControl uint32 = 1
43
44// WpTearingControlManagerV1Error .
45type WpTearingControlManagerV1Error uint32
46
47const (
48	WpTearingControlManagerV1ErrorTearingControlExists WpTearingControlManagerV1Error = 0
49)
50
51// WpTearingControlManagerV1Handler handles wp_tearing_control_manager_v1 requests.
52type WpTearingControlManagerV1Handler interface {
53	Destroy(self *WpTearingControlManagerV1)
54	GetTearingControl(self *WpTearingControlManagerV1, id uint32, surface *wayland.Surface)
55}
56
57func NewWpTearingControlManagerV1(c server.Client, version int32, id uint32, h WpTearingControlManagerV1Handler) (*WpTearingControlManagerV1, error) {
58	if h == nil {
59		return nil, fmt.Errorf("purego-libwayland: nil handler for wp_tearing_control_manager_v1")
60	}
61	var self *WpTearingControlManagerV1
62	r, err := c.CreateResource(WpTearingControlManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
63		switch opcode {
64		case 0:
65			h.Destroy(self)
66			self.Destroy()
67		case 1:
68			h.GetTearingControl(self, args[0].NewID(), wayland.WrapSurface(args[1].Resource()))
69		}
70	})
71	if err != nil {
72		return nil, err
73	}
74	self = WrapWpTearingControlManagerV1(r)
75	r.Data = self
76	return self, nil
77}
78func NewWpTearingControlManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
79	return d.CreateGlobal(WpTearingControlManagerV1Interface, version, bind)
80}
81
82// WpTearingControlV1 per-surface tearing control interface.
83type WpTearingControlV1 struct{ *server.Resource }
84
85func WrapWpTearingControlV1(r *server.Resource) *WpTearingControlV1 {
86	if r == nil {
87		return nil
88	}
89	return &WpTearingControlV1{r}
90}
91
92const WpTearingControlV1RequestSetPresentationHint uint32 = 0
93const WpTearingControlV1RequestDestroy uint32 = 1
94
95// WpTearingControlV1PresentationHint presentation hint values.
96type WpTearingControlV1PresentationHint uint32
97
98const (
99	WpTearingControlV1PresentationHintVsync WpTearingControlV1PresentationHint = 0
100	WpTearingControlV1PresentationHintAsync WpTearingControlV1PresentationHint = 1
101)
102
103// WpTearingControlV1Handler handles wp_tearing_control_v1 requests.
104type WpTearingControlV1Handler interface {
105	SetPresentationHint(self *WpTearingControlV1, hint uint32)
106	Destroy(self *WpTearingControlV1)
107}
108
109func NewWpTearingControlV1(c server.Client, version int32, id uint32, h WpTearingControlV1Handler) (*WpTearingControlV1, error) {
110	if h == nil {
111		return nil, fmt.Errorf("purego-libwayland: nil handler for wp_tearing_control_v1")
112	}
113	var self *WpTearingControlV1
114	r, err := c.CreateResource(WpTearingControlV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
115		switch opcode {
116		case 0:
117			h.SetPresentationHint(self, args[0].Uint())
118		case 1:
119			h.Destroy(self)
120			self.Destroy()
121		}
122	})
123	if err != nil {
124		return nil, err
125	}
126	self = WrapWpTearingControlV1(r)
127	r.Data = self
128	return self, nil
129}
130func NewWpTearingControlV1Global(d *server.Display, version int32, bind server.BindFunc) error {
131	return d.CreateGlobal(WpTearingControlV1Interface, version, bind)
132}
133func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
134	if v == nil {
135		return nil
136	}
137	return v.GetResource()
138}
139func (self *WpTearingControlManagerV1) GetResource() *server.Resource {
140	if self == nil {
141		return nil
142	}
143	return self.Resource
144}
145func (self *WpTearingControlV1) GetResource() *server.Resource {
146	if self == nil {
147		return nil
148	}
149	return self.Resource
150}

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