v0.2.1 c0399be

gtkshortcutmanager.go RawHistoryFolder

1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/v4/gobject/types"
11)
12
13// The list of functions that can be implemented for the `GtkShortcutManager`
14// interface.
15//
16// Note that no function is mandatory to implement, the default implementation
17// will work fine.
18type ShortcutManagerInterface struct {
19	_ structs.HostLayout
20
21	GIface uintptr
22
23	xAddController uintptr
24
25	xRemoveController uintptr
26}
27
28func (x *ShortcutManagerInterface) GoPointer() uintptr {
29	return uintptr(unsafe.Pointer(x))
30}
31
32// OverrideAddController sets the "add_controller" callback function.
33// Add a `GtkShortcutController` to be managed.
34func (x *ShortcutManagerInterface) OverrideAddController(cb func(ShortcutManager, *ShortcutController)) {
35	if cb == nil {
36		x.xAddController = 0
37	} else {
38		x.xAddController = purego.NewCallback(func(SelfVarp uintptr, ControllerVarp uintptr) {
39			cb(&ShortcutManagerBase{Ptr: SelfVarp}, ShortcutControllerNewFromInternalPtr(ControllerVarp))
40		})
41	}
42}
43
44// GetAddController gets the "add_controller" callback function.
45// Add a `GtkShortcutController` to be managed.
46func (x *ShortcutManagerInterface) GetAddController() func(ShortcutManager, *ShortcutController) {
47	if x.xAddController == 0 {
48		return nil
49	}
50	var rawCallback func(SelfVarp uintptr, ControllerVarp uintptr)
51	purego.RegisterFunc(&rawCallback, x.xAddController)
52	return func(SelfVar ShortcutManager, ControllerVar *ShortcutController) {
53		rawCallback(SelfVar.GoPointer(), ControllerVar.GoPointer())
54	}
55}
56
57// OverrideRemoveController sets the "remove_controller" callback function.
58// Remove a `GtkShortcutController` that had previously
59//
60//	been added
61func (x *ShortcutManagerInterface) OverrideRemoveController(cb func(ShortcutManager, *ShortcutController)) {
62	if cb == nil {
63		x.xRemoveController = 0
64	} else {
65		x.xRemoveController = purego.NewCallback(func(SelfVarp uintptr, ControllerVarp uintptr) {
66			cb(&ShortcutManagerBase{Ptr: SelfVarp}, ShortcutControllerNewFromInternalPtr(ControllerVarp))
67		})
68	}
69}
70
71// GetRemoveController gets the "remove_controller" callback function.
72// Remove a `GtkShortcutController` that had previously
73//
74//	been added
75func (x *ShortcutManagerInterface) GetRemoveController() func(ShortcutManager, *ShortcutController) {
76	if x.xRemoveController == 0 {
77		return nil
78	}
79	var rawCallback func(SelfVarp uintptr, ControllerVarp uintptr)
80	purego.RegisterFunc(&rawCallback, x.xRemoveController)
81	return func(SelfVar ShortcutManager, ControllerVar *ShortcutController) {
82		rawCallback(SelfVar.GoPointer(), ControllerVar.GoPointer())
83	}
84}
85
86// An interface that is used to implement shortcut scopes.
87//
88// This is important for [iface@Gtk.Native] widgets that have their
89// own surface, since the event controllers that are used to implement
90// managed and global scopes are limited to the same native.
91//
92// Examples for widgets implementing `GtkShortcutManager` are
93// [class@Gtk.Window] and [class@Gtk.Popover].
94//
95// Every widget that implements `GtkShortcutManager` will be used as a
96// `GTK_SHORTCUT_SCOPE_MANAGED`.
97type ShortcutManager interface {
98	GoPointer() uintptr
99	SetGoPointer(uintptr)
100}
101
102var xShortcutManagerGLibType func() types.GType
103
104func ShortcutManagerGLibType() types.GType {
105	return xShortcutManagerGLibType()
106}
107
108type ShortcutManagerBase struct {
109	Ptr uintptr
110}
111
112func (x *ShortcutManagerBase) GoPointer() uintptr {
113	if x == nil {
114		return 0
115	}
116	return x.Ptr
117}
118
119func (x *ShortcutManagerBase) SetGoPointer(ptr uintptr) {
120	x.Ptr = ptr
121}

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