v0.2.1 c0399be

gtktestutils.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)
9
10var xTestInit func(int, []string, ...interface{})
11
12// This function is used to initialize a GTK test program.
13//
14// It will in turn call g_test_init() and gtk_init() to properly
15// initialize the testing framework and graphical toolkit. It’ll
16// also set the program’s locale to “C”. This is done to make test
17// program environments as deterministic as possible.
18//
19// Like gtk_init() and g_test_init(), any known arguments will be
20// processed and stripped from @argc and @argv.
21func TestInit(ArgcpVar int, ArgvpVar []string, varArgs ...interface{}) {
22
23	xTestInit(ArgcpVar, ArgvpVar, varArgs...)
24
25}
26
27var xTestListAllTypes func(*uint) uintptr
28
29// Return the type ids that have been registered after
30// calling gtk_test_register_all_types().
31func TestListAllTypes(NTypesVar *uint) uintptr {
32
33	cret := xTestListAllTypes(NTypesVar)
34	return cret
35}
36
37var xTestRegisterAllTypes func()
38
39// Force registration of all core GTK object types.
40//
41// This allows to refer to any of those object types via
42// g_type_from_name() after calling this function.
43func TestRegisterAllTypes() {
44
45	xTestRegisterAllTypes()
46
47}
48
49var xTestWidgetWaitForDraw func(uintptr)
50
51// Enters the main loop and waits for @widget to be “drawn”.
52//
53// In this context that means it waits for the frame clock of
54// @widget to have run a full styling, layout and drawing cycle.
55//
56// This function is intended to be used for syncing with actions that
57// depend on @widget relayouting or on interaction with the display
58// server.
59func TestWidgetWaitForDraw(WidgetVar *Widget) {
60
61	xTestWidgetWaitForDraw(WidgetVar.GoPointer())
62
63}
64
65func init() {
66	core.SetPackageName("GTK", "gtk4")
67	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
68	var libs []uintptr
69	for _, libPath := range core.GetPaths("GTK") {
70		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
71		if err != nil {
72			panic(err)
73		}
74		libs = append(libs, lib)
75	}
76
77	core.PuregoSafeRegister(&xTestInit, libs, "gtk_test_init")
78	core.PuregoSafeRegister(&xTestListAllTypes, libs, "gtk_test_list_all_types")
79	core.PuregoSafeRegister(&xTestRegisterAllTypes, libs, "gtk_test_register_all_types")
80	core.PuregoSafeRegister(&xTestWidgetWaitForDraw, libs, "gtk_test_widget_wait_for_draw")
81
82}

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