v0.2.1 c0399be

gskglshader.go RawHistoryFolder

1// Package gsk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gsk
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/glib"
12	"github.com/bnema/puregotk/v4/gobject"
13	"github.com/bnema/puregotk/v4/gobject/types"
14	"github.com/bnema/puregotk/v4/graphene"
15)
16
17type GLShaderClass struct {
18	_ structs.HostLayout
19
20	ParentClass gobject.ObjectClass
21}
22
23func (x *GLShaderClass) GoPointer() uintptr {
24	return uintptr(unsafe.Pointer(x))
25}
26
27// Builds the uniforms data for a `GskGLShader`.
28type ShaderArgsBuilder struct {
29	_ structs.HostLayout
30}
31
32var xShaderArgsBuilderGLibType func() types.GType
33
34func ShaderArgsBuilderGLibType() types.GType {
35	return xShaderArgsBuilderGLibType()
36}
37
38func (x *ShaderArgsBuilder) GoPointer() uintptr {
39	return uintptr(unsafe.Pointer(x))
40}
41
42var xNewShaderArgsBuilder func(uintptr, *glib.Bytes) *ShaderArgsBuilder
43
44// Allocates a builder that can be used to construct a new uniform data
45// chunk.
46func NewShaderArgsBuilder(ShaderVar *GLShader, InitialValuesVar *glib.Bytes) *ShaderArgsBuilder {
47
48	cret := xNewShaderArgsBuilder(ShaderVar.GoPointer(), InitialValuesVar)
49	return cret
50}
51
52var xShaderArgsBuilderFreeToArgs func(uintptr) *glib.Bytes
53
54// Creates a new `GBytes` args from the current state of the
55// given @builder, and frees the @builder instance.
56//
57// Any uniforms of the shader that have not been explicitly set
58// on the @builder are zero-initialized.
59func (x *ShaderArgsBuilder) FreeToArgs() *glib.Bytes {
60
61	cret := xShaderArgsBuilderFreeToArgs(x.GoPointer())
62	return cret
63}
64
65var xShaderArgsBuilderRef func(uintptr) *ShaderArgsBuilder
66
67// Increases the reference count of a `GskShaderArgsBuilder` by one.
68func (x *ShaderArgsBuilder) Ref() *ShaderArgsBuilder {
69
70	cret := xShaderArgsBuilderRef(x.GoPointer())
71	return cret
72}
73
74var xShaderArgsBuilderSetBool func(uintptr, int, bool)
75
76// Sets the value of the uniform @idx.
77//
78// The uniform must be of bool type.
79func (x *ShaderArgsBuilder) SetBool(IdxVar int, ValueVar bool) {
80
81	xShaderArgsBuilderSetBool(x.GoPointer(), IdxVar, ValueVar)
82
83}
84
85var xShaderArgsBuilderSetFloat func(uintptr, int, float32)
86
87// Sets the value of the uniform @idx.
88//
89// The uniform must be of float type.
90func (x *ShaderArgsBuilder) SetFloat(IdxVar int, ValueVar float32) {
91
92	xShaderArgsBuilderSetFloat(x.GoPointer(), IdxVar, ValueVar)
93
94}
95
96var xShaderArgsBuilderSetInt func(uintptr, int, int32)
97
98// Sets the value of the uniform @idx.
99//
100// The uniform must be of int type.
101func (x *ShaderArgsBuilder) SetInt(IdxVar int, ValueVar int32) {
102
103	xShaderArgsBuilderSetInt(x.GoPointer(), IdxVar, ValueVar)
104
105}
106
107var xShaderArgsBuilderSetUint func(uintptr, int, uint32)
108
109// Sets the value of the uniform @idx.
110//
111// The uniform must be of uint type.
112func (x *ShaderArgsBuilder) SetUint(IdxVar int, ValueVar uint32) {
113
114	xShaderArgsBuilderSetUint(x.GoPointer(), IdxVar, ValueVar)
115
116}
117
118var xShaderArgsBuilderSetVec2 func(uintptr, int, *graphene.Vec2)
119
120// Sets the value of the uniform @idx.
121//
122// The uniform must be of vec2 type.
123func (x *ShaderArgsBuilder) SetVec2(IdxVar int, ValueVar *graphene.Vec2) {
124
125	xShaderArgsBuilderSetVec2(x.GoPointer(), IdxVar, ValueVar)
126
127}
128
129var xShaderArgsBuilderSetVec3 func(uintptr, int, *graphene.Vec3)
130
131// Sets the value of the uniform @idx.
132//
133// The uniform must be of vec3 type.
134func (x *ShaderArgsBuilder) SetVec3(IdxVar int, ValueVar *graphene.Vec3) {
135
136	xShaderArgsBuilderSetVec3(x.GoPointer(), IdxVar, ValueVar)
137
138}
139
140var xShaderArgsBuilderSetVec4 func(uintptr, int, *graphene.Vec4)
141
142// Sets the value of the uniform @idx.
143//
144// The uniform must be of vec4 type.
145func (x *ShaderArgsBuilder) SetVec4(IdxVar int, ValueVar *graphene.Vec4) {
146
147	xShaderArgsBuilderSetVec4(x.GoPointer(), IdxVar, ValueVar)
148
149}
150
151var xShaderArgsBuilderToArgs func(uintptr) *glib.Bytes
152
153// Creates a new `GBytes` args from the current state of the
154// given @builder.
155//
156// Any uniforms of the shader that have not been explicitly set on
157// the @builder are zero-initialized.
158//
159// The given `GskShaderArgsBuilder` is reset once this function returns;
160// you cannot call this function multiple times on the same @builder instance.
161//
162// This function is intended primarily for bindings. C code should use
163// [method@Gsk.ShaderArgsBuilder.free_to_args].
164func (x *ShaderArgsBuilder) ToArgs() *glib.Bytes {
165
166	cret := xShaderArgsBuilderToArgs(x.GoPointer())
167	return cret
168}
169
170var xShaderArgsBuilderUnref func(uintptr)
171
172// Decreases the reference count of a `GskShaderArgBuilder` by one.
173//
174// If the resulting reference count is zero, frees the builder.
175func (x *ShaderArgsBuilder) Unref() {
176
177	xShaderArgsBuilderUnref(x.GoPointer())
178
179}
180
181// Implements a fragment shader using GLSL.
182//
183// A fragment shader gets the coordinates being rendered as input and
184// produces the pixel values for that particular pixel. Additionally,
185// the shader can declare a set of other input arguments, called
186// uniforms (as they are uniform over all the calls to your shader in
187// each instance of use). A shader can also receive up to 4
188// textures that it can use as input when producing the pixel data.
189//
190// `GskGLShader` is usually used with gtk_snapshot_push_gl_shader()
191// to produce a [class@Gsk.GLShaderNode] in the rendering hierarchy,
192// and then its input textures are constructed by rendering the child
193// nodes to textures before rendering the shader node itself. (You can
194// pass texture nodes as children if you want to directly use a texture
195// as input).
196//
197// The actual shader code is GLSL code that gets combined with
198// some other code into the fragment shader. Since the exact
199// capabilities of the GPU driver differs between different OpenGL
200// drivers and hardware, GTK adds some defines that you can use
201// to ensure your GLSL code runs on as many drivers as it can.
202//
203// If the OpenGL driver is GLES, then the shader language version
204// is set to 100, and GSK_GLES will be defined in the shader.
205//
206// Otherwise, if the OpenGL driver does not support the 3.2 core profile,
207// then the shader will run with language version 110 for GL2 and 130 for GL3,
208// and GSK_LEGACY will be defined in the shader.
209//
210// If the OpenGL driver supports the 3.2 code profile, it will be used,
211// the shader language version is set to 150, and GSK_GL3 will be defined
212// in the shader.
213//
214// The main function the shader must implement is:
215//
216// ```glsl
217//
218//	void mainImage(out vec4 fragColor,
219//	               in vec2 fragCoord,
220//	               in vec2 resolution,
221//	               in vec2 uv)
222//
223// ```
224//
225// Where the input @fragCoord is the coordinate of the pixel we're
226// currently rendering, relative to the boundary rectangle that was
227// specified in the `GskGLShaderNode`, and @resolution is the width and
228// height of that rectangle. This is in the typical GTK coordinate
229// system with the origin in the top left. @uv contains the u and v
230// coordinates that can be used to index a texture at the
231// corresponding point. These coordinates are in the [0..1]x[0..1]
232// region, with 0, 0 being in the lower left corder (which is typical
233// for OpenGL).
234//
235// The output @fragColor should be a RGBA color (with
236// premultiplied alpha) that will be used as the output for the
237// specified pixel location. Note that this output will be
238// automatically clipped to the clip region of the glshader node.
239//
240// In addition to the function arguments the shader can define
241// up to 4 uniforms for textures which must be called u_textureN
242// (i.e. u_texture1 to u_texture4) as well as any custom uniforms
243// you want of types int, uint, bool, float, vec2, vec3 or vec4.
244//
245// All textures sources contain premultiplied alpha colors, but if some
246// there are outer sources of colors there is a gsk_premultiply() helper
247// to compute premultiplication when needed.
248//
249// Note that GTK parses the uniform declarations, so each uniform has to
250// be on a line by itself with no other code, like so:
251//
252// ```glsl
253// uniform float u_time;
254// uniform vec3 u_color;
255// uniform sampler2D u_texture1;
256// uniform sampler2D u_texture2;
257// ```
258//
259// GTK uses the "gsk" namespace in the symbols it uses in the
260// shader, so your code should not use any symbols with the prefix gsk
261// or GSK. There are some helper functions declared that you can use:
262//
263// ```glsl
264// vec4 GskTexture(sampler2D sampler, vec2 texCoords);
265// ```
266//
267// This samples a texture (e.g. u_texture1) at the specified
268// coordinates, and contains some helper ifdefs to ensure that
269// it works on all OpenGL versions.
270//
271// You can compile the shader yourself using [method@Gsk.GLShader.compile],
272// otherwise the GSK renderer will do it when it handling the glshader
273// node. If errors occurs, the returned @error will include the glsl
274// sources, so you can see what GSK was passing to the compiler. You
275// can also set GSK_DEBUG=shaders in the environment to see the sources
276// and other relevant information about all shaders that GSK is handling.
277//
278// # An example shader
279//
280// ```glsl
281// uniform float position;
282// uniform sampler2D u_texture1;
283// uniform sampler2D u_texture2;
284//
285// void mainImage(out vec4 fragColor,
286//
287//	               in vec2 fragCoord,
288//	               in vec2 resolution,
289//	               in vec2 uv) {
290//	  vec4 source1 = GskTexture(u_texture1, uv);
291//	  vec4 source2 = GskTexture(u_texture2, uv);
292//
293//	  fragColor = position * source1 + (1.0 - position) * source2;
294//	}
295//
296// ```
297type GLShader struct {
298	gobject.Object
299}
300
301var xGLShaderGLibType func() types.GType
302
303func GLShaderGLibType() types.GType {
304	return xGLShaderGLibType()
305}
306
307func GLShaderNewFromInternalPtr(ptr uintptr) *GLShader {
308	cls := &GLShader{}
309	cls.Ptr = ptr
310	return cls
311}
312
313var xNewGLShaderFromBytes func(*glib.Bytes) uintptr
314
315// Creates a `GskGLShader` that will render pixels using the specified code.
316func NewGLShaderFromBytes(SourcecodeVar *glib.Bytes) *GLShader {
317	var cls *GLShader
318
319	cret := xNewGLShaderFromBytes(SourcecodeVar)
320
321	if cret == 0 {
322		return nil
323	}
324	cls = &GLShader{}
325	cls.Ptr = cret
326	return cls
327}
328
329var xNewGLShaderFromResource func(string) uintptr
330
331// Creates a `GskGLShader` that will render pixels using the specified code.
332func NewGLShaderFromResource(ResourcePathVar string) *GLShader {
333	var cls *GLShader
334
335	cret := xNewGLShaderFromResource(ResourcePathVar)
336
337	if cret == 0 {
338		return nil
339	}
340	cls = &GLShader{}
341	cls.Ptr = cret
342	return cls
343}
344
345var xGLShaderCompile func(uintptr, uintptr, **glib.Error) bool
346
347// Tries to compile the @shader for the given @renderer.
348//
349// If there is a problem, this function returns %FALSE and reports
350// an error. You should use this function before relying on the shader
351// for rendering and use a fallback with a simpler shader or without
352// shaders if it fails.
353//
354// Note that this will modify the rendering state (for example
355// change the current GL context) and requires the renderer to be
356// set up. This means that the widget has to be realized. Commonly you
357// want to call this from the realize signal of a widget, or during
358// widget snapshot.
359func (x *GLShader) Compile(RendererVar *Renderer) (bool, error) {
360	var cerr *glib.Error
361
362	cret := xGLShaderCompile(x.GoPointer(), RendererVar.GoPointer(), &cerr)
363	if cerr == nil {
364		return cret, nil
365	}
366	return cret, cerr
367
368}
369
370var xGLShaderFindUniformByName func(uintptr, string) int
371
372// Looks for a uniform by the name @name, and returns the index
373// of the uniform, or -1 if it was not found.
374func (x *GLShader) FindUniformByName(NameVar string) int {
375
376	cret := xGLShaderFindUniformByName(x.GoPointer(), NameVar)
377	return cret
378}
379
380var xGLShaderFormatArgs func(uintptr, ...interface{}) *glib.Bytes
381
382// Formats the uniform data as needed for feeding the named uniforms
383// values into the shader.
384//
385// The argument list is a list of pairs of names, and values for the types
386// that match the declared uniforms (i.e. double/int/guint/gboolean for
387// primitive values and `graphene_vecN_t *` for vecN uniforms).
388//
389// Any uniforms of the shader that are not included in the argument list
390// are zero-initialized.
391func (x *GLShader) FormatArgs(varArgs ...interface{}) *glib.Bytes {
392
393	cret := xGLShaderFormatArgs(x.GoPointer(), varArgs...)
394	return cret
395}
396
397var xGLShaderFormatArgsVa func(uintptr, []interface{}) *glib.Bytes
398
399// Formats the uniform data as needed for feeding the named uniforms
400// values into the shader.
401//
402// The argument list is a list of pairs of names, and values for the
403// types that match the declared uniforms (i.e. double/int/guint/gboolean
404// for primitive values and `graphene_vecN_t *` for vecN uniforms).
405//
406// It is an error to pass a uniform name that is not declared by the shader.
407//
408// Any uniforms of the shader that are not included in the argument list
409// are zero-initialized.
410func (x *GLShader) FormatArgsVa(UniformsVar []interface{}) *glib.Bytes {
411
412	cret := xGLShaderFormatArgsVa(x.GoPointer(), UniformsVar)
413	return cret
414}
415
416var xGLShaderGetArgBool func(uintptr, *glib.Bytes, int) bool
417
418// Gets the value of the uniform @idx in the @args block.
419//
420// The uniform must be of bool type.
421func (x *GLShader) GetArgBool(ArgsVar *glib.Bytes, IdxVar int) bool {
422
423	cret := xGLShaderGetArgBool(x.GoPointer(), ArgsVar, IdxVar)
424	return cret
425}
426
427var xGLShaderGetArgFloat func(uintptr, *glib.Bytes, int) float32
428
429// Gets the value of the uniform @idx in the @args block.
430//
431// The uniform must be of float type.
432func (x *GLShader) GetArgFloat(ArgsVar *glib.Bytes, IdxVar int) float32 {
433
434	cret := xGLShaderGetArgFloat(x.GoPointer(), ArgsVar, IdxVar)
435	return cret
436}
437
438var xGLShaderGetArgInt func(uintptr, *glib.Bytes, int) int32
439
440// Gets the value of the uniform @idx in the @args block.
441//
442// The uniform must be of int type.
443func (x *GLShader) GetArgInt(ArgsVar *glib.Bytes, IdxVar int) int32 {
444
445	cret := xGLShaderGetArgInt(x.GoPointer(), ArgsVar, IdxVar)
446	return cret
447}
448
449var xGLShaderGetArgUint func(uintptr, *glib.Bytes, int) uint32
450
451// Gets the value of the uniform @idx in the @args block.
452//
453// The uniform must be of uint type.
454func (x *GLShader) GetArgUint(ArgsVar *glib.Bytes, IdxVar int) uint32 {
455
456	cret := xGLShaderGetArgUint(x.GoPointer(), ArgsVar, IdxVar)
457	return cret
458}
459
460var xGLShaderGetArgVec2 func(uintptr, *glib.Bytes, int, *graphene.Vec2)
461
462// Gets the value of the uniform @idx in the @args block.
463//
464// The uniform must be of vec2 type.
465func (x *GLShader) GetArgVec2(ArgsVar *glib.Bytes, IdxVar int, OutValueVar *graphene.Vec2) {
466
467	xGLShaderGetArgVec2(x.GoPointer(), ArgsVar, IdxVar, OutValueVar)
468
469}
470
471var xGLShaderGetArgVec3 func(uintptr, *glib.Bytes, int, *graphene.Vec3)
472
473// Gets the value of the uniform @idx in the @args block.
474//
475// The uniform must be of vec3 type.
476func (x *GLShader) GetArgVec3(ArgsVar *glib.Bytes, IdxVar int, OutValueVar *graphene.Vec3) {
477
478	xGLShaderGetArgVec3(x.GoPointer(), ArgsVar, IdxVar, OutValueVar)
479
480}
481
482var xGLShaderGetArgVec4 func(uintptr, *glib.Bytes, int, *graphene.Vec4)
483
484// Gets the value of the uniform @idx in the @args block.
485//
486// The uniform must be of vec4 type.
487func (x *GLShader) GetArgVec4(ArgsVar *glib.Bytes, IdxVar int, OutValueVar *graphene.Vec4) {
488
489	xGLShaderGetArgVec4(x.GoPointer(), ArgsVar, IdxVar, OutValueVar)
490
491}
492
493var xGLShaderGetArgsSize func(uintptr) uint
494
495// Get the size of the data block used to specify arguments for this shader.
496func (x *GLShader) GetArgsSize() uint {
497
498	cret := xGLShaderGetArgsSize(x.GoPointer())
499	return cret
500}
501
502var xGLShaderGetNTextures func(uintptr) int
503
504// Returns the number of textures that the shader requires.
505//
506// This can be used to check that the a passed shader works
507// in your usecase. It is determined by looking at the highest
508// u_textureN value that the shader defines.
509func (x *GLShader) GetNTextures() int {
510
511	cret := xGLShaderGetNTextures(x.GoPointer())
512	return cret
513}
514
515var xGLShaderGetNUniforms func(uintptr) int
516
517// Get the number of declared uniforms for this shader.
518func (x *GLShader) GetNUniforms() int {
519
520	cret := xGLShaderGetNUniforms(x.GoPointer())
521	return cret
522}
523
524var xGLShaderGetResource func(uintptr) string
525
526// Gets the resource path for the GLSL sourcecode being used
527// to render this shader.
528func (x *GLShader) GetResource() string {
529
530	cret := xGLShaderGetResource(x.GoPointer())
531	return cret
532}
533
534var xGLShaderGetSource func(uintptr) *glib.Bytes
535
536// Gets the GLSL sourcecode being used to render this shader.
537func (x *GLShader) GetSource() *glib.Bytes {
538
539	cret := xGLShaderGetSource(x.GoPointer())
540	return cret
541}
542
543var xGLShaderGetUniformName func(uintptr, int) string
544
545// Get the name of the declared uniform for this shader at index @idx.
546func (x *GLShader) GetUniformName(IdxVar int) string {
547
548	cret := xGLShaderGetUniformName(x.GoPointer(), IdxVar)
549	return cret
550}
551
552var xGLShaderGetUniformOffset func(uintptr, int) int
553
554// Get the offset into the data block where data for this uniforms is stored.
555func (x *GLShader) GetUniformOffset(IdxVar int) int {
556
557	cret := xGLShaderGetUniformOffset(x.GoPointer(), IdxVar)
558	return cret
559}
560
561var xGLShaderGetUniformType func(uintptr, int) GLUniformType
562
563// Get the type of the declared uniform for this shader at index @idx.
564func (x *GLShader) GetUniformType(IdxVar int) GLUniformType {
565
566	cret := xGLShaderGetUniformType(x.GoPointer(), IdxVar)
567	return cret
568}
569
570func (c *GLShader) GoPointer() uintptr {
571	if c == nil {
572		return 0
573	}
574	return c.Ptr
575}
576
577func (c *GLShader) SetGoPointer(ptr uintptr) {
578	c.Ptr = ptr
579}
580
581// SetPropertyResource sets the "resource" property.
582// Resource containing the source code for the shader.
583//
584// If the shader source is not coming from a resource, this
585// will be %NULL.
586func (x *GLShader) SetPropertyResource(value string) {
587	var v gobject.Value
588	v.Init(gobject.TypeStringVal)
589	v.SetString(&value)
590	x.SetProperty("resource", &v)
591}
592
593// GetPropertyResource gets the "resource" property.
594// Resource containing the source code for the shader.
595//
596// If the shader source is not coming from a resource, this
597// will be %NULL.
598func (x *GLShader) GetPropertyResource() string {
599	var v gobject.Value
600	x.GetProperty("resource", &v)
601	return v.GetString()
602}
603
604// SetPropertySource sets the "source" property.
605// The source code for the shader, as a `GBytes`.
606func (x *GLShader) SetPropertySource(value uintptr) {
607	var v gobject.Value
608	v.Init(gobject.TypePointerVal)
609	v.SetPointer(value)
610	x.SetProperty("source", &v)
611}
612
613// GetPropertySource gets the "source" property.
614// The source code for the shader, as a `GBytes`.
615func (x *GLShader) GetPropertySource() uintptr {
616	var v gobject.Value
617	x.GetProperty("source", &v)
618	return v.GetPointer()
619}
620
621func init() {
622	core.SetPackageName("GSK", "gtk4")
623	core.SetSharedLibraries("GSK", []string{"libgtk-4.so.1"})
624	var libs []uintptr
625	for _, libPath := range core.GetPaths("GSK") {
626		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
627		if err != nil {
628			panic(err)
629		}
630		libs = append(libs, lib)
631	}
632
633	core.PuregoSafeRegister(&xShaderArgsBuilderGLibType, libs, "gsk_shader_args_builder_get_type")
634
635	core.PuregoSafeRegister(&xNewShaderArgsBuilder, libs, "gsk_shader_args_builder_new")
636
637	core.PuregoSafeRegister(&xShaderArgsBuilderFreeToArgs, libs, "gsk_shader_args_builder_free_to_args")
638	core.PuregoSafeRegister(&xShaderArgsBuilderRef, libs, "gsk_shader_args_builder_ref")
639	core.PuregoSafeRegister(&xShaderArgsBuilderSetBool, libs, "gsk_shader_args_builder_set_bool")
640	core.PuregoSafeRegister(&xShaderArgsBuilderSetFloat, libs, "gsk_shader_args_builder_set_float")
641	core.PuregoSafeRegister(&xShaderArgsBuilderSetInt, libs, "gsk_shader_args_builder_set_int")
642	core.PuregoSafeRegister(&xShaderArgsBuilderSetUint, libs, "gsk_shader_args_builder_set_uint")
643	core.PuregoSafeRegister(&xShaderArgsBuilderSetVec2, libs, "gsk_shader_args_builder_set_vec2")
644	core.PuregoSafeRegister(&xShaderArgsBuilderSetVec3, libs, "gsk_shader_args_builder_set_vec3")
645	core.PuregoSafeRegister(&xShaderArgsBuilderSetVec4, libs, "gsk_shader_args_builder_set_vec4")
646	core.PuregoSafeRegister(&xShaderArgsBuilderToArgs, libs, "gsk_shader_args_builder_to_args")
647	core.PuregoSafeRegister(&xShaderArgsBuilderUnref, libs, "gsk_shader_args_builder_unref")
648
649	core.PuregoSafeRegister(&xGLShaderGLibType, libs, "gsk_gl_shader_get_type")
650
651	core.PuregoSafeRegister(&xNewGLShaderFromBytes, libs, "gsk_gl_shader_new_from_bytes")
652	core.PuregoSafeRegister(&xNewGLShaderFromResource, libs, "gsk_gl_shader_new_from_resource")
653
654	core.PuregoSafeRegister(&xGLShaderCompile, libs, "gsk_gl_shader_compile")
655	core.PuregoSafeRegister(&xGLShaderFindUniformByName, libs, "gsk_gl_shader_find_uniform_by_name")
656	core.PuregoSafeRegister(&xGLShaderFormatArgs, libs, "gsk_gl_shader_format_args")
657	core.PuregoSafeRegister(&xGLShaderFormatArgsVa, libs, "gsk_gl_shader_format_args_va")
658	core.PuregoSafeRegister(&xGLShaderGetArgBool, libs, "gsk_gl_shader_get_arg_bool")
659	core.PuregoSafeRegister(&xGLShaderGetArgFloat, libs, "gsk_gl_shader_get_arg_float")
660	core.PuregoSafeRegister(&xGLShaderGetArgInt, libs, "gsk_gl_shader_get_arg_int")
661	core.PuregoSafeRegister(&xGLShaderGetArgUint, libs, "gsk_gl_shader_get_arg_uint")
662	core.PuregoSafeRegister(&xGLShaderGetArgVec2, libs, "gsk_gl_shader_get_arg_vec2")
663	core.PuregoSafeRegister(&xGLShaderGetArgVec3, libs, "gsk_gl_shader_get_arg_vec3")
664	core.PuregoSafeRegister(&xGLShaderGetArgVec4, libs, "gsk_gl_shader_get_arg_vec4")
665	core.PuregoSafeRegister(&xGLShaderGetArgsSize, libs, "gsk_gl_shader_get_args_size")
666	core.PuregoSafeRegister(&xGLShaderGetNTextures, libs, "gsk_gl_shader_get_n_textures")
667	core.PuregoSafeRegister(&xGLShaderGetNUniforms, libs, "gsk_gl_shader_get_n_uniforms")
668	core.PuregoSafeRegister(&xGLShaderGetResource, libs, "gsk_gl_shader_get_resource")
669	core.PuregoSafeRegister(&xGLShaderGetSource, libs, "gsk_gl_shader_get_source")
670	core.PuregoSafeRegister(&xGLShaderGetUniformName, libs, "gsk_gl_shader_get_uniform_name")
671	core.PuregoSafeRegister(&xGLShaderGetUniformOffset, libs, "gsk_gl_shader_get_uniform_offset")
672	core.PuregoSafeRegister(&xGLShaderGetUniformType, libs, "gsk_gl_shader_get_uniform_type")
673
674}

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 102

↑↓ moveenter openesc close