v0.5.0 089fa12

linux-drm-syncobj-v1_generated.go RawHistoryFolder

1// Code generated by wlturbo-scanner. DO NOT EDIT.
2// Protocol: linux_drm_syncobj_v1
3// Source: linux-drm-syncobj-v1.xml
4
5// Upstream protocol copyright and license:
6// Copyright 2016 The Chromium Authors.
7// Copyright 2017 Intel Corporation
8// Copyright 2018 Collabora, Ltd
9// Copyright 2021 Simon Ser
10//
11// Permission is hereby granted, free of charge, to any person obtaining a
12// copy of this software and associated documentation files (the "Software"),
13// to deal in the Software without restriction, including without limitation
14// the rights to use, copy, modify, merge, publish, distribute, sublicense,
15// and/or sell copies of the Software, and to permit persons to whom the
16// Software is furnished to do so, subject to the following conditions:
17//
18// The above copyright notice and this permission notice (including the next
19// paragraph) shall be included in all copies or substantial portions of the
20// Software.
21//
22// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28// DEALINGS IN THE SOFTWARE.
29
30package drmsyncobj
31
32import (
33	cross_wl_surface "github.com/bnema/wlturbo/protocol/core"
34	"github.com/bnema/wlturbo/wl"
35)
36
37// ERROR_SURFACE_EXISTS is the error surface_exists value.
38const ERROR_SURFACE_EXISTS = 0
39
40// ERROR_INVALID_TIMELINE is the error invalid_timeline value.
41const ERROR_INVALID_TIMELINE = 1
42
43// ERROR_NO_SURFACE is the error no_surface value.
44const ERROR_NO_SURFACE = 1
45
46// ERROR_UNSUPPORTED_BUFFER is the error unsupported_buffer value.
47const ERROR_UNSUPPORTED_BUFFER = 2
48
49// ERROR_NO_BUFFER is the error no_buffer value.
50const ERROR_NO_BUFFER = 3
51
52// ERROR_NO_ACQUIRE_POINT is the error no_acquire_point value.
53const ERROR_NO_ACQUIRE_POINT = 4
54
55// ERROR_NO_RELEASE_POINT is the error no_release_point value.
56const ERROR_NO_RELEASE_POINT = 5
57
58// ERROR_CONFLICTING_POINTS is the error conflicting_points value.
59const ERROR_CONFLICTING_POINTS = 6
60
61// WpLinuxDrmSyncobjManagerInterface is the protocol interface name.
62const WpLinuxDrmSyncobjManagerInterface = "wp_linux_drm_syncobj_manager_v1"
63
64// WpLinuxDrmSyncobjManager is the generated binding for wp_linux_drm_syncobj_manager_v1 version 1.
65type WpLinuxDrmSyncobjManager struct {
66	wl.BaseProxy
67}
68
69// NewWpLinuxDrmSyncobjManager returns an unbound WpLinuxDrmSyncobjManager.
70func NewWpLinuxDrmSyncobjManager(ctx *wl.Context) *WpLinuxDrmSyncobjManager {
71	obj := &WpLinuxDrmSyncobjManager{}
72	obj.SetContext(ctx)
73	ctx.Register(obj)
74	return obj
75}
76
77// Destroy this explicit synchronization factory object. Other objects shall not be affected by this request.
78func (o *WpLinuxDrmSyncobjManager) Destroy() error {
79	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "wp_linux_drm_syncobj_manager_v1.destroy", Destructor: true}); err != nil {
80		return err
81	}
82	return nil
83}
84
85// Instantiate an interface extension for the given wl_surface to provide explicit synchronization. If the given wl_surface already has an explicit synchronization object associated, the surface_exists protocol error is raised. Graphics APIs, like EGL or Vulkan, that manage the buffer queue and commits of a wl_surface themselves, are likely to be using this extension internally. If a client is using such an API for a wl_surface, it should not directly use this extension on that surface, to avoid raising a surface_exists protocol error.
86func (o *WpLinuxDrmSyncobjManager) GetSurface(surface *cross_wl_surface.Surface) (*WpLinuxDrmSyncobjSurface, error) {
87	var arg1 wl.Object
88	if surface != nil {
89		arg1 = surface
90	}
91	child := &WpLinuxDrmSyncobjSurface{}
92	child.SetContext(o.Context())
93	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 1, Name: "wp_linux_drm_syncobj_manager_v1.get_surface", Child: child}, wl.ArgObject(child), wl.ArgObject(arg1)); err != nil {
94		return nil, err
95	}
96	return child, nil
97}
98
99// Import a DRM synchronization object timeline. If the FD cannot be imported, the invalid_timeline error is raised.
100func (o *WpLinuxDrmSyncobjManager) ImportTimeline(fd int) (*WpLinuxDrmSyncobjTimeline, error) {
101	child := &WpLinuxDrmSyncobjTimeline{}
102	child.SetContext(o.Context())
103	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 2, Name: "wp_linux_drm_syncobj_manager_v1.import_timeline", Child: child, FDs: []int{fd}}, wl.ArgObject(child), wl.ArgFD()); err != nil {
104		return nil, err
105	}
106	return child, nil
107}
108
109// EventSignature returns the declared event argument types in wire order.
110func (o *WpLinuxDrmSyncobjManager) EventSignature(opcode uint16) (string, bool) {
111	switch opcode {
112	default:
113		return "", false
114	}
115}
116
117// Dispatch decodes one event on wp_linux_drm_syncobj_manager_v1 and calls the registered handlers.
118func (o *WpLinuxDrmSyncobjManager) Dispatch(event *wl.Event) {
119	switch event.Opcode {
120	default:
121	}
122}
123
124// WpLinuxDrmSyncobjTimelineInterface is the protocol interface name.
125const WpLinuxDrmSyncobjTimelineInterface = "wp_linux_drm_syncobj_timeline_v1"
126
127// WpLinuxDrmSyncobjTimeline is the generated binding for wp_linux_drm_syncobj_timeline_v1 version 1.
128type WpLinuxDrmSyncobjTimeline struct {
129	wl.BaseProxy
130}
131
132// NewWpLinuxDrmSyncobjTimeline returns an unbound WpLinuxDrmSyncobjTimeline.
133func NewWpLinuxDrmSyncobjTimeline(ctx *wl.Context) *WpLinuxDrmSyncobjTimeline {
134	obj := &WpLinuxDrmSyncobjTimeline{}
135	obj.SetContext(ctx)
136	ctx.Register(obj)
137	return obj
138}
139
140// Destroy the synchronization object timeline. Other objects are not affected by this request, in particular timeline points set by set_acquire_point and set_release_point are not unset.
141func (o *WpLinuxDrmSyncobjTimeline) Destroy() error {
142	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "wp_linux_drm_syncobj_timeline_v1.destroy", Destructor: true}); err != nil {
143		return err
144	}
145	return nil
146}
147
148// EventSignature returns the declared event argument types in wire order.
149func (o *WpLinuxDrmSyncobjTimeline) EventSignature(opcode uint16) (string, bool) {
150	switch opcode {
151	default:
152		return "", false
153	}
154}
155
156// Dispatch decodes one event on wp_linux_drm_syncobj_timeline_v1 and calls the registered handlers.
157func (o *WpLinuxDrmSyncobjTimeline) Dispatch(event *wl.Event) {
158	switch event.Opcode {
159	default:
160	}
161}
162
163// WpLinuxDrmSyncobjSurfaceInterface is the protocol interface name.
164const WpLinuxDrmSyncobjSurfaceInterface = "wp_linux_drm_syncobj_surface_v1"
165
166// WpLinuxDrmSyncobjSurface is the generated binding for wp_linux_drm_syncobj_surface_v1 version 1.
167type WpLinuxDrmSyncobjSurface struct {
168	wl.BaseProxy
169}
170
171// NewWpLinuxDrmSyncobjSurface returns an unbound WpLinuxDrmSyncobjSurface.
172func NewWpLinuxDrmSyncobjSurface(ctx *wl.Context) *WpLinuxDrmSyncobjSurface {
173	obj := &WpLinuxDrmSyncobjSurface{}
174	obj.SetContext(ctx)
175	ctx.Register(obj)
176	return obj
177}
178
179// Destroy this surface synchronization object. Any timeline point set by this object with set_acquire_point or set_release_point since the last commit may be discarded by the compositor. Any timeline point set by this object before the last commit will not be affected.
180func (o *WpLinuxDrmSyncobjSurface) Destroy() error {
181	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "wp_linux_drm_syncobj_surface_v1.destroy", Destructor: true}); err != nil {
182		return err
183	}
184	return nil
185}
186
187// Set the timeline point that must be signalled before the compositor may sample from the buffer attached with wl_surface.attach. The 64-bit unsigned value combined from point_hi and point_lo is the point value. The acquire point is double-buffered state, and will be applied on the next wl_surface.commit request for the associated surface. Thus, it applies only to the buffer that is attached to the surface at commit time. If an acquire point has already been attached during the same commit cycle, the new point replaces the old one. If the associated wl_surface was destroyed, a no_surface error is raised. If at surface commit time there is a pending acquire timeline point set but no pending buffer attached, a no_buffer error is raised. If at surface commit time there is a pending buffer attached but no pending acquire timeline point set, the no_acquire_point protocol error is raised.
188func (o *WpLinuxDrmSyncobjSurface) SetAcquirePoint(timeline *WpLinuxDrmSyncobjTimeline, pointHi uint32, pointLo uint32) error {
189	var arg0 wl.Object
190	if timeline != nil {
191		arg0 = timeline
192	}
193	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 1, Name: "wp_linux_drm_syncobj_surface_v1.set_acquire_point"}, wl.ArgObject(arg0), wl.ArgUint(pointHi), wl.ArgUint(pointLo)); err != nil {
194		return err
195	}
196	return nil
197}
198
199// Set the timeline point that must be signalled by the compositor when it has finished its usage of the buffer attached with wl_surface.attach for the relevant commit. Once the timeline point is signaled, and assuming the associated buffer is not pending release from other wl_surface.commit requests, no additional explicit or implicit synchronization with the compositor is required to safely re-use the buffer. Note that clients cannot rely on the release point being always signaled after the acquire point: compositors may release buffers without ever reading from them. In addition, the compositor may use different presentation paths for different commits, which may have different release behavior. As a result, the compositor may signal the release points in a different order than the client committed them. Because signaling a timeline point also signals every previous point, it is generally not safe to use the same timeline object for the release points of multiple buffers. The out-of-order signaling described above may lead to a release point being signaled before the compositor has finished reading. To avoid this, it is strongly recommended that each buffer should use a separate timeline for its release points. The 64-bit unsigned value combined from point_hi and point_lo is the point value. The release point is double-buffered state, and will be applied on the next wl_surface.commit request for the associated surface. Thus, it applies only to the buffer that is attached to the surface at commit time. If a release point has already been attached during the same commit cycle, the new point replaces the old one. If the associated wl_surface was destroyed, a no_surface error is raised. If at surface commit time there is a pending release timeline point set but no pending buffer attached, a no_buffer error is raised. If at surface commit time there is a pending buffer attached but no pending release timeline point set, the no_release_point protocol error is raised.
200func (o *WpLinuxDrmSyncobjSurface) SetReleasePoint(timeline *WpLinuxDrmSyncobjTimeline, pointHi uint32, pointLo uint32) error {
201	var arg0 wl.Object
202	if timeline != nil {
203		arg0 = timeline
204	}
205	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 2, Name: "wp_linux_drm_syncobj_surface_v1.set_release_point"}, wl.ArgObject(arg0), wl.ArgUint(pointHi), wl.ArgUint(pointLo)); err != nil {
206		return err
207	}
208	return nil
209}
210
211// EventSignature returns the declared event argument types in wire order.
212func (o *WpLinuxDrmSyncobjSurface) EventSignature(opcode uint16) (string, bool) {
213	switch opcode {
214	default:
215		return "", false
216	}
217}
218
219// Dispatch decodes one event on wp_linux_drm_syncobj_surface_v1 and calls the registered handlers.
220func (o *WpLinuxDrmSyncobjSurface) Dispatch(event *wl.Event) {
221	switch event.Opcode {
222	default:
223	}
224}

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 8

↑↓ moveenter openesc close