v0.2.1 c0399be

gtkrender.go RawHistoryFolder

1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
3
4import (
5	"github.com/ebitengine/purego"
6
7	"github.com/bnema/puregotk/pkg/core"
8	"github.com/bnema/puregotk/v4/cairo"
9	"github.com/bnema/puregotk/v4/gdk"
10	"github.com/bnema/puregotk/v4/pango"
11)
12
13var xRenderActivity func(uintptr, *cairo.Context, float64, float64, float64, float64)
14
15// Renders an activity indicator (such as in `GtkSpinner`).
16// The state %GTK_STATE_FLAG_CHECKED determines whether there is
17// activity going on.
18func RenderActivity(ContextVar *StyleContext, CrVar *cairo.Context, XVar float64, YVar float64, WidthVar float64, HeightVar float64) {
19
20	xRenderActivity(ContextVar.GoPointer(), CrVar, XVar, YVar, WidthVar, HeightVar)
21
22}
23
24var xRenderArrow func(uintptr, *cairo.Context, float64, float64, float64, float64)
25
26// Renders an arrow pointing to @angle.
27//
28// Typical arrow rendering at 0, 1⁄2 π;, π; and 3⁄2 π:
29//
30// ![](arrows.png)
31func RenderArrow(ContextVar *StyleContext, CrVar *cairo.Context, AngleVar float64, XVar float64, YVar float64, SizeVar float64) {
32
33	xRenderArrow(ContextVar.GoPointer(), CrVar, AngleVar, XVar, YVar, SizeVar)
34
35}
36
37var xRenderBackground func(uintptr, *cairo.Context, float64, float64, float64, float64)
38
39// Renders the background of an element.
40//
41// Typical background rendering, showing the effect of
42// `background-image`, `border-width` and `border-radius`:
43//
44// ![](background.png)
45func RenderBackground(ContextVar *StyleContext, CrVar *cairo.Context, XVar float64, YVar float64, WidthVar float64, HeightVar float64) {
46
47	xRenderBackground(ContextVar.GoPointer(), CrVar, XVar, YVar, WidthVar, HeightVar)
48
49}
50
51var xRenderCheck func(uintptr, *cairo.Context, float64, float64, float64, float64)
52
53// Renders a checkmark (as in a `GtkCheckButton`).
54//
55// The %GTK_STATE_FLAG_CHECKED state determines whether the check is
56// on or off, and %GTK_STATE_FLAG_INCONSISTENT determines whether it
57// should be marked as undefined.
58//
59// Typical checkmark rendering:
60//
61// ![](checks.png)
62func RenderCheck(ContextVar *StyleContext, CrVar *cairo.Context, XVar float64, YVar float64, WidthVar float64, HeightVar float64) {
63
64	xRenderCheck(ContextVar.GoPointer(), CrVar, XVar, YVar, WidthVar, HeightVar)
65
66}
67
68var xRenderExpander func(uintptr, *cairo.Context, float64, float64, float64, float64)
69
70// Renders an expander (as used in `GtkTreeView` and `GtkExpander`) in the area
71// defined by @x, @y, @width, @height. The state %GTK_STATE_FLAG_CHECKED
72// determines whether the expander is collapsed or expanded.
73//
74// Typical expander rendering:
75//
76// ![](expanders.png)
77func RenderExpander(ContextVar *StyleContext, CrVar *cairo.Context, XVar float64, YVar float64, WidthVar float64, HeightVar float64) {
78
79	xRenderExpander(ContextVar.GoPointer(), CrVar, XVar, YVar, WidthVar, HeightVar)
80
81}
82
83var xRenderFocus func(uintptr, *cairo.Context, float64, float64, float64, float64)
84
85// Renders a focus indicator on the rectangle determined by @x, @y, @width, @height.
86//
87// Typical focus rendering:
88//
89// ![](focus.png)
90func RenderFocus(ContextVar *StyleContext, CrVar *cairo.Context, XVar float64, YVar float64, WidthVar float64, HeightVar float64) {
91
92	xRenderFocus(ContextVar.GoPointer(), CrVar, XVar, YVar, WidthVar, HeightVar)
93
94}
95
96var xRenderFrame func(uintptr, *cairo.Context, float64, float64, float64, float64)
97
98// Renders a frame around the rectangle defined by @x, @y, @width, @height.
99//
100// Examples of frame rendering, showing the effect of `border-image`,
101// `border-color`, `border-width`, `border-radius` and junctions:
102//
103// ![](frames.png)
104func RenderFrame(ContextVar *StyleContext, CrVar *cairo.Context, XVar float64, YVar float64, WidthVar float64, HeightVar float64) {
105
106	xRenderFrame(ContextVar.GoPointer(), CrVar, XVar, YVar, WidthVar, HeightVar)
107
108}
109
110var xRenderHandle func(uintptr, *cairo.Context, float64, float64, float64, float64)
111
112// Renders a handle (as in `GtkPaned` and `GtkWindow`’s resize grip),
113// in the rectangle determined by @x, @y, @width, @height.
114//
115// Handles rendered for the paned and grip classes:
116//
117// ![](handles.png)
118func RenderHandle(ContextVar *StyleContext, CrVar *cairo.Context, XVar float64, YVar float64, WidthVar float64, HeightVar float64) {
119
120	xRenderHandle(ContextVar.GoPointer(), CrVar, XVar, YVar, WidthVar, HeightVar)
121
122}
123
124var xRenderIcon func(uintptr, *cairo.Context, uintptr, float64, float64)
125
126// Renders the icon in @texture at the specified @x and @y coordinates.
127//
128// This function will render the icon in @texture at exactly its size,
129// regardless of scaling factors, which may not be appropriate when
130// drawing on displays with high pixel densities.
131func RenderIcon(ContextVar *StyleContext, CrVar *cairo.Context, TextureVar *gdk.Texture, XVar float64, YVar float64) {
132
133	xRenderIcon(ContextVar.GoPointer(), CrVar, TextureVar.GoPointer(), XVar, YVar)
134
135}
136
137var xRenderLayout func(uintptr, *cairo.Context, float64, float64, uintptr)
138
139// Renders @layout on the coordinates @x, @y
140func RenderLayout(ContextVar *StyleContext, CrVar *cairo.Context, XVar float64, YVar float64, LayoutVar *pango.Layout) {
141
142	xRenderLayout(ContextVar.GoPointer(), CrVar, XVar, YVar, LayoutVar.GoPointer())
143
144}
145
146var xRenderLine func(uintptr, *cairo.Context, float64, float64, float64, float64)
147
148// Renders a line from (x0, y0) to (x1, y1).
149func RenderLine(ContextVar *StyleContext, CrVar *cairo.Context, X0Var float64, Y0Var float64, X1Var float64, Y1Var float64) {
150
151	xRenderLine(ContextVar.GoPointer(), CrVar, X0Var, Y0Var, X1Var, Y1Var)
152
153}
154
155var xRenderOption func(uintptr, *cairo.Context, float64, float64, float64, float64)
156
157// Renders an option mark (as in a radio button), the %GTK_STATE_FLAG_CHECKED
158// state will determine whether the option is on or off, and
159// %GTK_STATE_FLAG_INCONSISTENT whether it should be marked as undefined.
160//
161// Typical option mark rendering:
162//
163// ![](options.png)
164func RenderOption(ContextVar *StyleContext, CrVar *cairo.Context, XVar float64, YVar float64, WidthVar float64, HeightVar float64) {
165
166	xRenderOption(ContextVar.GoPointer(), CrVar, XVar, YVar, WidthVar, HeightVar)
167
168}
169
170func init() {
171	core.SetPackageName("GTK", "gtk4")
172	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
173	var libs []uintptr
174	for _, libPath := range core.GetPaths("GTK") {
175		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
176		if err != nil {
177			panic(err)
178		}
179		libs = append(libs, lib)
180	}
181
182	core.PuregoSafeRegister(&xRenderActivity, libs, "gtk_render_activity")
183	core.PuregoSafeRegister(&xRenderArrow, libs, "gtk_render_arrow")
184	core.PuregoSafeRegister(&xRenderBackground, libs, "gtk_render_background")
185	core.PuregoSafeRegister(&xRenderCheck, libs, "gtk_render_check")
186	core.PuregoSafeRegister(&xRenderExpander, libs, "gtk_render_expander")
187	core.PuregoSafeRegister(&xRenderFocus, libs, "gtk_render_focus")
188	core.PuregoSafeRegister(&xRenderFrame, libs, "gtk_render_frame")
189	core.PuregoSafeRegister(&xRenderHandle, libs, "gtk_render_handle")
190	core.PuregoSafeRegister(&xRenderIcon, libs, "gtk_render_icon")
191	core.PuregoSafeRegister(&xRenderLayout, libs, "gtk_render_layout")
192	core.PuregoSafeRegister(&xRenderLine, libs, "gtk_render_line")
193	core.PuregoSafeRegister(&xRenderOption, libs, "gtk_render_option")
194
195}

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