v0.2.1 c0399be

pango-markup.go RawHistoryFolder

1// Package pango was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package pango
3
4import (
5	"github.com/ebitengine/purego"
6
7	"github.com/bnema/puregotk/pkg/core"
8	"github.com/bnema/puregotk/v4/glib"
9)
10
11var xMarkupParserFinish func(*glib.MarkupParseContext, **AttrList, *string, *uint32, **glib.Error) bool
12
13// Finishes parsing markup.
14//
15// After feeding a Pango markup parser some data with [method@GLib.MarkupParseContext.parse],
16// use this function to get the list of attributes and text out of the
17// markup. This function will not free @context, use [method@GLib.MarkupParseContext.free]
18// to do so.
19func MarkupParserFinish(ContextVar *glib.MarkupParseContext, AttrListVar **AttrList, TextVar *string, AccelCharVar *uint32) (bool, error) {
20	var cerr *glib.Error
21
22	cret := xMarkupParserFinish(ContextVar, AttrListVar, TextVar, AccelCharVar, &cerr)
23	if cerr == nil {
24		return cret, nil
25	}
26	return cret, cerr
27
28}
29
30var xMarkupParserNew func(uint32) *glib.MarkupParseContext
31
32// Incrementally parses marked-up text to create a plain-text string
33// and an attribute list.
34//
35// See the [Pango Markup](pango_markup.html) docs for details about the
36// supported markup.
37//
38// If @accel_marker is nonzero, the given character will mark the
39// character following it as an accelerator. For example, @accel_marker
40// might be an ampersand or underscore. All characters marked
41// as an accelerator will receive a %PANGO_UNDERLINE_LOW attribute,
42// and the first character so marked will be returned in @accel_char,
43// when calling [func@markup_parser_finish]. Two @accel_marker characters
44// following each other produce a single literal @accel_marker character.
45//
46// To feed markup to the parser, use [method@GLib.MarkupParseContext.parse]
47// on the returned [struct@GLib.MarkupParseContext]. When done with feeding markup
48// to the parser, use [func@markup_parser_finish] to get the data out
49// of it, and then use [method@GLib.MarkupParseContext.free] to free it.
50//
51// This function is designed for applications that read Pango markup
52// from streams. To simply parse a string containing Pango markup,
53// the [func@Pango.parse_markup] API is recommended instead.
54func MarkupParserNew(AccelMarkerVar uint32) *glib.MarkupParseContext {
55
56	cret := xMarkupParserNew(AccelMarkerVar)
57	return cret
58}
59
60var xParseMarkup func(string, int, uint32, **AttrList, *string, *uint32, **glib.Error) bool
61
62// Parses marked-up text to create a plain-text string and an attribute list.
63//
64// See the [Pango Markup](pango_markup.html) docs for details about the
65// supported markup.
66//
67// If @accel_marker is nonzero, the given character will mark the
68// character following it as an accelerator. For example, @accel_marker
69// might be an ampersand or underscore. All characters marked
70// as an accelerator will receive a %PANGO_UNDERLINE_LOW attribute,
71// and the first character so marked will be returned in @accel_char.
72// Two @accel_marker characters following each other produce a single
73// literal @accel_marker character.
74//
75// To parse a stream of pango markup incrementally, use [func@markup_parser_new].
76//
77// If any error happens, none of the output arguments are touched except
78// for @error.
79func ParseMarkup(MarkupTextVar string, LengthVar int, AccelMarkerVar uint32, AttrListVar **AttrList, TextVar *string, AccelCharVar *uint32) (bool, error) {
80	var cerr *glib.Error
81
82	cret := xParseMarkup(MarkupTextVar, LengthVar, AccelMarkerVar, AttrListVar, TextVar, AccelCharVar, &cerr)
83	if cerr == nil {
84		return cret, nil
85	}
86	return cret, cerr
87
88}
89
90func init() {
91	core.SetPackageName("PANGO", "pango")
92	core.SetSharedLibraries("PANGO", []string{"libpango-1.0.so.0"})
93	var libs []uintptr
94	for _, libPath := range core.GetPaths("PANGO") {
95		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
96		if err != nil {
97			panic(err)
98		}
99		libs = append(libs, lib)
100	}
101
102	core.PuregoSafeRegister(&xMarkupParserFinish, libs, "pango_markup_parser_finish")
103	core.PuregoSafeRegister(&xMarkupParserNew, libs, "pango_markup_parser_new")
104	core.PuregoSafeRegister(&xParseMarkup, libs, "pango_parse_markup")
105
106}

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