detached 1a6c6c9

contenttype_generated.go RawHistoryFolder

1// Code generated by wlbgen. DO NOT EDIT.
2// Protocol: content_type_v1
3// Source: content-type-v1.xml
4
5// Upstream protocol copyright and license:
6// Copyright © 2021 Emmanuel Gil Peyrot
7// Copyright © 2022 Xaver Hugl
8//
9// Permission is hereby granted, free of charge, to any person obtaining a
10// copy of this software and associated documentation files (the "Software"),
11// to deal in the Software without restriction, including without limitation
12// the rights to use, copy, modify, merge, publish, distribute, sublicense,
13// and/or sell copies of the Software, and to permit persons to whom the
14// Software is furnished to do so, subject to the following conditions:
15//
16// The above copyright notice and this permission notice (including the next
17// paragraph) shall be included in all copies or substantial portions of the
18// Software.
19//
20// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
23// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26// DEALINGS IN THE SOFTWARE.
27
28package contenttype
29
30import (
31	cross_wl_surface "github.com/bnema/go-wayland-bindings/client/wayland"
32	"github.com/bnema/wlturbo/wl"
33)
34
35// ERROR_ALREADY_CONSTRUCTED is the error already_constructed value.
36const ERROR_ALREADY_CONSTRUCTED = 0
37
38// TYPE_NONE is the type none value.
39const TYPE_NONE = 0
40
41// TYPE_PHOTO is the type photo value.
42const TYPE_PHOTO = 1
43
44// TYPE_VIDEO is the type video value.
45const TYPE_VIDEO = 2
46
47// TYPE_GAME is the type game value.
48const TYPE_GAME = 3
49
50// WpContentTypeManagerInterface is the protocol interface name.
51const WpContentTypeManagerInterface = "wp_content_type_manager_v1"
52
53// WpContentTypeManager is the generated binding for wp_content_type_manager_v1 version 1.
54type WpContentTypeManager struct {
55	wl.BaseProxy
56}
57
58// NewWpContentTypeManager returns an unbound WpContentTypeManager.
59func NewWpContentTypeManager(ctx *wl.Context) *WpContentTypeManager {
60	obj := &WpContentTypeManager{}
61	obj.SetContext(ctx)
62	ctx.Register(obj)
63	return obj
64}
65
66// Destroy the content type manager. This doesn't destroy objects created with the manager.
67func (o *WpContentTypeManager) Destroy() error {
68	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "wp_content_type_manager_v1.destroy", Destructor: true}); err != nil {
69		return err
70	}
71	return nil
72}
73
74// Create a new content type object associated with the given surface. Creating a wp_content_type_v1 from a wl_surface which already has one attached is a client error: already_constructed.
75func (o *WpContentTypeManager) GetSurfaceContentType(surface *cross_wl_surface.Surface) (*WpContentType, error) {
76	var arg1 wl.Object
77	if surface != nil {
78		arg1 = surface
79	}
80	child := &WpContentType{}
81	child.SetContext(o.Context())
82	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 1, Name: "wp_content_type_manager_v1.get_surface_content_type", Child: child}, wl.ArgObject(child), wl.ArgObject(arg1)); err != nil {
83		return nil, err
84	}
85	return child, nil
86}
87
88// EventSignature returns the declared event argument types in wire order.
89func (o *WpContentTypeManager) EventSignature(opcode uint16) (string, bool) {
90	switch opcode {
91	default:
92		return "", false
93	}
94}
95
96// Dispatch decodes one event on wp_content_type_manager_v1 and calls the registered handlers.
97func (o *WpContentTypeManager) Dispatch(event *wl.Event) {
98	switch event.Opcode {
99	default:
100	}
101}
102
103// WpContentTypeInterface is the protocol interface name.
104const WpContentTypeInterface = "wp_content_type_v1"
105
106// WpContentType is the generated binding for wp_content_type_v1 version 1.
107type WpContentType struct {
108	wl.BaseProxy
109}
110
111// NewWpContentType returns an unbound WpContentType.
112func NewWpContentType(ctx *wl.Context) *WpContentType {
113	obj := &WpContentType{}
114	obj.SetContext(ctx)
115	ctx.Register(obj)
116	return obj
117}
118
119// Switch back to not specifying the content type of this surface. This is equivalent to setting the content type to none, including double buffering semantics. See set_content_type for details.
120func (o *WpContentType) Destroy() error {
121	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "wp_content_type_v1.destroy", Destructor: true}); err != nil {
122		return err
123	}
124	return nil
125}
126
127// Set the surface content type. This informs the compositor that the client believes it is displaying buffers matching this content type. This is purely a hint for the compositor, which can be used to adjust its behavior or hardware settings to fit the presented content best. The content type is double-buffered state, see wl_surface.commit for details.
128func (o *WpContentType) SetContentType(contentType uint32) error {
129	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 1, Name: "wp_content_type_v1.set_content_type"}, wl.ArgUint(contentType)); err != nil {
130		return err
131	}
132	return nil
133}
134
135// EventSignature returns the declared event argument types in wire order.
136func (o *WpContentType) EventSignature(opcode uint16) (string, bool) {
137	switch opcode {
138	default:
139		return "", false
140	}
141}
142
143// Dispatch decodes one event on wp_content_type_v1 and calls the registered handlers.
144func (o *WpContentType) Dispatch(event *wl.Event) {
145	switch event.Opcode {
146	default:
147	}
148}

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