main 5004296

alphamodifier_generated.go RawHistoryFolder

1// Code generated by wlbgen. DO NOT EDIT.
2// Protocol: alpha_modifier_v1
3// Source: alpha-modifier-v1.xml
4
5// Upstream protocol copyright and license:
6// Copyright © 2024 Xaver Hugl
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 alphamodifier
28
29import (
30	cross_wl_surface "github.com/bnema/go-wayland-bindings/client/wayland"
31	"github.com/bnema/wlturbo/wl"
32)
33
34// ERROR_ALREADY_CONSTRUCTED is the error already_constructed value.
35const ERROR_ALREADY_CONSTRUCTED = 0
36
37// ERROR_NO_SURFACE is the error no_surface value.
38const ERROR_NO_SURFACE = 0
39
40// WpAlphaModifierInterface is the protocol interface name.
41const WpAlphaModifierInterface = "wp_alpha_modifier_v1"
42
43// WpAlphaModifier is the generated binding for wp_alpha_modifier_v1 version 1.
44type WpAlphaModifier struct {
45	wl.BaseProxy
46}
47
48// NewWpAlphaModifier returns an unbound WpAlphaModifier.
49func NewWpAlphaModifier(ctx *wl.Context) *WpAlphaModifier {
50	obj := &WpAlphaModifier{}
51	obj.SetContext(ctx)
52	ctx.Register(obj)
53	return obj
54}
55
56// Destroy the alpha modifier manager. This doesn't destroy objects created with the manager.
57func (o *WpAlphaModifier) Destroy() error {
58	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "wp_alpha_modifier_v1.destroy", Destructor: true}); err != nil {
59		return err
60	}
61	return nil
62}
63
64// Create a new alpha modifier surface object associated with the given wl_surface. If there is already such an object associated with the wl_surface, the already_constructed error will be raised.
65func (o *WpAlphaModifier) GetSurface(surface *cross_wl_surface.Surface) (*WpAlphaModifierSurface, error) {
66	var arg1 wl.Object
67	if surface != nil {
68		arg1 = surface
69	}
70	child := &WpAlphaModifierSurface{}
71	child.SetContext(o.Context())
72	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 1, Name: "wp_alpha_modifier_v1.get_surface", Child: child}, wl.ArgObject(child), wl.ArgObject(arg1)); err != nil {
73		return nil, err
74	}
75	return child, nil
76}
77
78// EventSignature returns the declared event argument types in wire order.
79func (o *WpAlphaModifier) EventSignature(opcode uint16) (string, bool) {
80	switch opcode {
81	default:
82		return "", false
83	}
84}
85
86// Dispatch decodes one event on wp_alpha_modifier_v1 and calls the registered handlers.
87func (o *WpAlphaModifier) Dispatch(event *wl.Event) {
88	switch event.Opcode {
89	default:
90	}
91}
92
93// WpAlphaModifierSurfaceInterface is the protocol interface name.
94const WpAlphaModifierSurfaceInterface = "wp_alpha_modifier_surface_v1"
95
96// WpAlphaModifierSurface is the generated binding for wp_alpha_modifier_surface_v1 version 1.
97type WpAlphaModifierSurface struct {
98	wl.BaseProxy
99}
100
101// NewWpAlphaModifierSurface returns an unbound WpAlphaModifierSurface.
102func NewWpAlphaModifierSurface(ctx *wl.Context) *WpAlphaModifierSurface {
103	obj := &WpAlphaModifierSurface{}
104	obj.SetContext(ctx)
105	ctx.Register(obj)
106	return obj
107}
108
109// This destroys the object, and is equivalent to set_multiplier with a value of UINT32_MAX, with the same double-buffered semantics as set_multiplier.
110func (o *WpAlphaModifierSurface) Destroy() error {
111	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 0, Name: "wp_alpha_modifier_surface_v1.destroy", Destructor: true}); err != nil {
112		return err
113	}
114	return nil
115}
116
117// Sets the alpha multiplier for the surface. The alpha multiplier is double-buffered state, see wl_surface.commit for details. This factor is applied in the compositor's blending space, as an additional step after the processing of per-pixel alpha values for the wl_surface. The exact meaning of the factor is thus undefined, unless the blending space is specified in a different extension. This multiplier is applied even if the buffer attached to the wl_surface doesn't have an alpha channel; in that case an alpha value of one is used instead. Zero means completely transparent, UINT32_MAX means completely opaque.
118func (o *WpAlphaModifierSurface) SetMultiplier(factor uint32) error {
119	if err := o.Context().RequestArgs(wl.Request{Proxy: o, Opcode: 1, Name: "wp_alpha_modifier_surface_v1.set_multiplier"}, wl.ArgUint(factor)); err != nil {
120		return err
121	}
122	return nil
123}
124
125// EventSignature returns the declared event argument types in wire order.
126func (o *WpAlphaModifierSurface) EventSignature(opcode uint16) (string, bool) {
127	switch opcode {
128	default:
129		return "", false
130	}
131}
132
133// Dispatch decodes one event on wp_alpha_modifier_surface_v1 and calls the registered handlers.
134func (o *WpAlphaModifierSurface) Dispatch(event *wl.Event) {
135	switch event.Opcode {
136	default:
137	}
138}

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