v0.2.1 c0399be

gtkshow.go RawHistoryFolder

1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
3
4import (
5	"unsafe"
6
7	"github.com/ebitengine/purego"
8
9	"github.com/bnema/puregotk/pkg/core"
10	"github.com/bnema/puregotk/v4/gio"
11	"github.com/bnema/puregotk/v4/glib"
12)
13
14var xShowUri func(uintptr, string, uint32)
15
16// This function launches the default application for showing
17// a given uri, or shows an error dialog if that fails.
18func ShowUri(ParentVar *Window, UriVar string, TimestampVar uint32) {
19
20	xShowUri(ParentVar.GoPointer(), UriVar, TimestampVar)
21
22}
23
24var xShowUriFull func(uintptr, string, uint32, uintptr, uintptr, uintptr)
25
26// This function launches the default application for showing
27// a given uri.
28//
29// The @callback will be called when the launch is completed.
30//
31// This is the recommended call to be used as it passes information
32// necessary for sandbox helpers to parent their dialogs properly.
33func ShowUriFull(ParentVar *Window, UriVar string, TimestampVar uint32, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) {
34
35	var CallbackVarRef uintptr
36	if CallbackVar != nil {
37		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
38		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
39			CallbackVarRef = cbRefPtr
40		} else {
41			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
42				cbFn := *CallbackVar
43				cbFn(arg0, arg1, arg2)
44			}
45			CallbackVarRef = purego.NewCallback(fcb)
46			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
47		}
48	}
49
50	xShowUriFull(ParentVar.GoPointer(), UriVar, TimestampVar, CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
51
52}
53
54var xShowUriFullFinish func(uintptr, uintptr, **glib.Error) bool
55
56// Finishes the gtk_show_uri() call and returns the result
57// of the operation.
58func ShowUriFullFinish(ParentVar *Window, ResultVar gio.AsyncResult) (bool, error) {
59	var cerr *glib.Error
60
61	cret := xShowUriFullFinish(ParentVar.GoPointer(), ResultVar.GoPointer(), &cerr)
62	if cerr == nil {
63		return cret, nil
64	}
65	return cret, cerr
66
67}
68
69func init() {
70	core.SetPackageName("GTK", "gtk4")
71	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
72	var libs []uintptr
73	for _, libPath := range core.GetPaths("GTK") {
74		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
75		if err != nil {
76			panic(err)
77		}
78		libs = append(libs, lib)
79	}
80
81	core.PuregoSafeRegister(&xShowUri, libs, "gtk_show_uri")
82	core.PuregoSafeRegister(&xShowUriFull, libs, "gtk_show_uri_full")
83	core.PuregoSafeRegister(&xShowUriFullFinish, libs, "gtk_show_uri_full_finish")
84
85}

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