v0.1.0 1a6c6c9

committiming_generated.go RawHistoryFolder

1// Code generated by wlbgen. DO NOT EDIT.
2// Protocol: commit_timing_v1
3// Source: commit-timing-v1.xml
4
5// Upstream protocol copyright and license:
6// Copyright © 2023 Valve Corporation
7//
8// Permission is hereby granted, free of charge, to any person obtaining a
9// copy of this software and associated documentation files (the "Software"),
10// to deal in the Software without restriction, including without limitation
11// the rights to use, copy, modify, merge, publish, distribute, sublicense,
12// and/or sell copies of the Software, and to permit persons to whom the
13// Software is furnished to do so, subject to the following conditions:
14//
15// The above copyright notice and this permission notice (including the next
16// paragraph) shall be included in all copies or substantial portions of the
17// Software.
18//
19// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
22// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25// DEALINGS IN THE SOFTWARE.
26
27package committiming
28
29import (
30	cross_wl_surface "github.com/bnema/go-wayland-bindings/client/wayland"
31	"github.com/bnema/wlturbo/wl"
32)
33
34// ERROR_COMMIT_TIMER_EXISTS is the error commit_timer_exists value.
35const ERROR_COMMIT_TIMER_EXISTS = 0
36
37// ERROR_INVALID_TIMESTAMP is the error invalid_timestamp value.
38const ERROR_INVALID_TIMESTAMP = 0
39
40// ERROR_TIMESTAMP_EXISTS is the error timestamp_exists value.
41const ERROR_TIMESTAMP_EXISTS = 1
42
43// ERROR_SURFACE_DESTROYED is the error surface_destroyed value.
44const ERROR_SURFACE_DESTROYED = 2
45
46// WpCommitTimingManagerInterface is the protocol interface name.
47const WpCommitTimingManagerInterface = "wp_commit_timing_manager_v1"
48
49// WpCommitTimingManager is the generated binding for wp_commit_timing_manager_v1 version 1.
50type WpCommitTimingManager struct {
51	wl.BaseProxy
52}
53
54// NewWpCommitTimingManager returns an unbound WpCommitTimingManager.
55func NewWpCommitTimingManager(ctx *wl.Context) *WpCommitTimingManager {
56	obj := &WpCommitTimingManager{}
57	obj.SetContext(ctx)
58	ctx.Register(obj)
59	return obj
60}
61
62// Informs the server that the client will no longer be using this protocol object. Existing objects created by this object are not affected.
63func (o *WpCommitTimingManager) Destroy() error {
64	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "wp_commit_timing_manager_v1.destroy", Destructor: true}); err != nil {
65		return err
66	}
67	return nil
68}
69
70// Establish a timing controller for a surface. Only one commit timer can be created for a surface, or a commit_timer_exists protocol error will be generated.
71func (o *WpCommitTimingManager) GetTimer(surface *cross_wl_surface.Surface) (*WpCommitTimer, error) {
72	var arg1 wl.Object
73	if surface != nil {
74		arg1 = surface
75	}
76	child := &WpCommitTimer{}
77	child.SetContext(o.Context())
78	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 1, Name: "wp_commit_timing_manager_v1.get_timer", Child: child}, wl.ArgObject(child), wl.ArgObject(arg1)); err != nil {
79		return nil, err
80	}
81	return child, nil
82}
83
84// EventSignature returns the declared event argument types in wire order.
85func (o *WpCommitTimingManager) EventSignature(opcode uint16) (string, bool) {
86	switch opcode {
87	default:
88		return "", false
89	}
90}
91
92// Dispatch decodes one event on wp_commit_timing_manager_v1 and calls the registered handlers.
93func (o *WpCommitTimingManager) Dispatch(event *wl.Event) {
94	switch event.Opcode {
95	default:
96	}
97}
98
99// WpCommitTimerInterface is the protocol interface name.
100const WpCommitTimerInterface = "wp_commit_timer_v1"
101
102// WpCommitTimer is the generated binding for wp_commit_timer_v1 version 1.
103type WpCommitTimer struct {
104	wl.BaseProxy
105}
106
107// NewWpCommitTimer returns an unbound WpCommitTimer.
108func NewWpCommitTimer(ctx *wl.Context) *WpCommitTimer {
109	obj := &WpCommitTimer{}
110	obj.SetContext(ctx)
111	ctx.Register(obj)
112	return obj
113}
114
115// Provide a timing constraint for a surface content update. A set_timestamp request may be made before a wl_surface.commit to tell the compositor that the content is intended to be presented as closely as possible to, but not before, the specified time. The time is in the domain of the compositor's presentation clock. An invalid_timestamp error will be generated for invalid tv_nsec. If a timestamp already exists on the surface, a timestamp_exists error is generated. Requesting set_timestamp after the commit_timer object's surface is destroyed will generate a "surface_destroyed" error.
116func (o *WpCommitTimer) SetTimestamp(tvSecHi uint32, tvSecLo uint32, tvNsec uint32) error {
117	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "wp_commit_timer_v1.set_timestamp"}, wl.ArgUint(tvSecHi), wl.ArgUint(tvSecLo), wl.ArgUint(tvNsec)); err != nil {
118		return err
119	}
120	return nil
121}
122
123// Informs the server that the client will no longer be using this protocol object. Existing timing constraints are not affected by the destruction.
124func (o *WpCommitTimer) Destroy() error {
125	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 1, Name: "wp_commit_timer_v1.destroy", Destructor: true}); err != nil {
126		return err
127	}
128	return nil
129}
130
131// EventSignature returns the declared event argument types in wire order.
132func (o *WpCommitTimer) EventSignature(opcode uint16) (string, bool) {
133	switch opcode {
134	default:
135		return "", false
136	}
137}
138
139// Dispatch decodes one event on wp_commit_timer_v1 and calls the registered handlers.
140func (o *WpCommitTimer) Dispatch(event *wl.Event) {
141	switch event.Opcode {
142	default:
143	}
144}

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