v0.2.2 9100209

gbase64.go RawHistoryFolder

1// Package glib was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package glib
3
4import (
5	"github.com/ebitengine/purego"
6
7	"github.com/bnema/puregotk/pkg/core"
8)
9
10var xBase64Decode func(string, *uint) uintptr
11
12// Decode a sequence of Base-64 encoded text into binary data.  Note
13// that the returned binary data is not necessarily zero-terminated,
14// so it should not be used as a character string.
15func Base64Decode(TextVar string, OutLenVar *uint) uintptr {
16
17	cret := xBase64Decode(TextVar, OutLenVar)
18
19	return cret
20}
21
22var xBase64DecodeInplace func(*[]byte, *uint) byte
23
24// Decode a sequence of Base-64 encoded text into binary data
25// by overwriting the input data.
26func Base64DecodeInplace(TextVar *[]byte, OutLenVar *uint) byte {
27
28	cret := xBase64DecodeInplace(TextVar, OutLenVar)
29
30	return cret
31}
32
33var xBase64DecodeStep func([]byte, uint, *[]byte, *int, *uint) uint
34
35// Incrementally decode a sequence of binary data from its Base-64 stringified
36// representation. By calling this function multiple times you can convert
37// data in chunks to avoid having to have the full encoded data in memory.
38//
39// The output buffer must be large enough to fit all the data that will
40// be written to it. Since base64 encodes 3 bytes in 4 chars you need
41// at least: (@len / 4) * 3 + 3 bytes (+ 3 may be needed in case of non-zero
42// state).
43func Base64DecodeStep(InVar []byte, LenVar uint, OutVar *[]byte, StateVar *int, SaveVar *uint) uint {
44
45	cret := xBase64DecodeStep(InVar, LenVar, OutVar, StateVar, SaveVar)
46
47	return cret
48}
49
50var xBase64Encode func([]byte, uint) string
51
52// Encode a sequence of binary data into its Base-64 stringified
53// representation.
54func Base64Encode(DataVar []byte, LenVar uint) string {
55
56	cret := xBase64Encode(DataVar, LenVar)
57
58	return cret
59}
60
61var xBase64EncodeClose func(bool, *[]byte, *int, *int) uint
62
63// Flush the status from a sequence of calls to g_base64_encode_step().
64//
65// The output buffer must be large enough to fit all the data that will
66// be written to it. It will need up to 4 bytes, or up to 5 bytes if
67// line-breaking is enabled.
68//
69// The @out array will not be automatically nul-terminated.
70func Base64EncodeClose(BreakLinesVar bool, OutVar *[]byte, StateVar *int, SaveVar *int) uint {
71
72	cret := xBase64EncodeClose(BreakLinesVar, OutVar, StateVar, SaveVar)
73
74	return cret
75}
76
77var xBase64EncodeStep func([]byte, uint, bool, *[]byte, *int, *int) uint
78
79// Incrementally encode a sequence of binary data into its Base-64 stringified
80// representation. By calling this function multiple times you can convert
81// data in chunks to avoid having to have the full encoded data in memory.
82//
83// When all of the data has been converted you must call
84// g_base64_encode_close() to flush the saved state.
85//
86// The output buffer must be large enough to fit all the data that will
87// be written to it. Due to the way base64 encodes you will need
88// at least: (@len / 3 + 1) * 4 + 4 bytes (+ 4 may be needed in case of
89// non-zero state). If you enable line-breaking you will need at least:
90// ((@len / 3 + 1) * 4 + 4) / 76 + 1 bytes of extra space.
91//
92// @break_lines is typically used when putting base64-encoded data in emails.
93// It breaks the lines at 76 columns instead of putting all of the text on
94// the same line. This avoids problems with long lines in the email system.
95// Note however that it breaks the lines with `LF` characters, not
96// `CR LF` sequences, so the result cannot be passed directly to SMTP
97// or certain other protocols.
98func Base64EncodeStep(InVar []byte, LenVar uint, BreakLinesVar bool, OutVar *[]byte, StateVar *int, SaveVar *int) uint {
99
100	cret := xBase64EncodeStep(InVar, LenVar, BreakLinesVar, OutVar, StateVar, SaveVar)
101
102	return cret
103}
104
105func init() {
106	core.SetPackageName("GLIB", "glib-2.0")
107	core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0"})
108	var libs []uintptr
109	for _, libPath := range core.GetPaths("GLIB") {
110		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
111		if err != nil {
112			panic(err)
113		}
114		libs = append(libs, lib)
115	}
116
117	core.PuregoSafeRegister(&xBase64Decode, libs, "g_base64_decode")
118	core.PuregoSafeRegister(&xBase64DecodeInplace, libs, "g_base64_decode_inplace")
119	core.PuregoSafeRegister(&xBase64DecodeStep, libs, "g_base64_decode_step")
120	core.PuregoSafeRegister(&xBase64Encode, libs, "g_base64_encode")
121	core.PuregoSafeRegister(&xBase64EncodeClose, libs, "g_base64_encode_close")
122	core.PuregoSafeRegister(&xBase64EncodeStep, libs, "g_base64_encode_step")
123
124}

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