v0.2.1 c0399be

gskcairorenderer.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/gobject/types"
12)
13
14type CairoRendererClass struct {
15	_ structs.HostLayout
16}
17
18func (x *CairoRendererClass) GoPointer() uintptr {
19	return uintptr(unsafe.Pointer(x))
20}
21
22// Renders a GSK rendernode tree with cairo.
23//
24// Since it is using cairo, this renderer cannot support
25// 3D transformations.
26type CairoRenderer struct {
27	Renderer
28}
29
30var xCairoRendererGLibType func() types.GType
31
32func CairoRendererGLibType() types.GType {
33	return xCairoRendererGLibType()
34}
35
36func CairoRendererNewFromInternalPtr(ptr uintptr) *CairoRenderer {
37	cls := &CairoRenderer{}
38	cls.Ptr = ptr
39	return cls
40}
41
42var xNewCairoRenderer func() uintptr
43
44// Creates a new Cairo renderer.
45//
46// The Cairo renderer is the fallback renderer drawing in ways similar
47// to how GTK 3 drew its content. Its primary use is as comparison tool.
48//
49// The Cairo renderer is incomplete. It cannot render 3D transformed
50// content and will instead render an error marker. Its usage should be
51// avoided.
52func NewCairoRenderer() *CairoRenderer {
53	var cls *CairoRenderer
54
55	cret := xNewCairoRenderer()
56
57	if cret == 0 {
58		return nil
59	}
60	cls = &CairoRenderer{}
61	cls.Ptr = cret
62	return cls
63}
64
65func (c *CairoRenderer) GoPointer() uintptr {
66	if c == nil {
67		return 0
68	}
69	return c.Ptr
70}
71
72func (c *CairoRenderer) SetGoPointer(ptr uintptr) {
73	c.Ptr = ptr
74}
75
76func init() {
77	core.SetPackageName("GSK", "gtk4")
78	core.SetSharedLibraries("GSK", []string{"libgtk-4.so.1"})
79	var libs []uintptr
80	for _, libPath := range core.GetPaths("GSK") {
81		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
82		if err != nil {
83			panic(err)
84		}
85		libs = append(libs, lib)
86	}
87
88	core.PuregoSafeRegister(&xCairoRendererGLibType, libs, "gsk_cairo_renderer_get_type")
89
90	core.PuregoSafeRegister(&xNewCairoRenderer, libs, "gsk_cairo_renderer_new")
91
92}

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