v0.2.1 c0399be

pango-language.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)
9
10var xLanguageFromString func(uintptr) *Language
11
12// Convert a language tag to a `PangoLanguage`.
13//
14// The language tag must be in a RFC-3066 format. `PangoLanguage` pointers
15// can be efficiently copied (copy the pointer) and compared with other
16// language tags (compare the pointer.)
17//
18// This function first canonicalizes the string by converting it to
19// lowercase, mapping '_' to '-', and stripping all characters other
20// than letters and '-'.
21//
22// Use [func@Pango.Language.get_default] if you want to get the
23// `PangoLanguage` for the current locale of the process.
24func LanguageFromString(LanguageVar *string) *Language {
25
26	LanguageVarPtr := core.GStrdupNullable(LanguageVar)
27	defer core.GFreeNullable(LanguageVarPtr)
28
29	cret := xLanguageFromString(LanguageVarPtr)
30	return cret
31}
32
33var xLanguageGetDefault func() *Language
34
35// Returns the `PangoLanguage` for the current locale of the process.
36//
37// On Unix systems, this is the return value is derived from
38// `setlocale (LC_CTYPE, NULL)`, and the user can
39// affect this through the environment variables LC_ALL, LC_CTYPE or
40// LANG (checked in that order). The locale string typically is in
41// the form lang_COUNTRY, where lang is an ISO-639 language code, and
42// COUNTRY is an ISO-3166 country code. For instance, sv_FI for
43// Swedish as written in Finland or pt_BR for Portuguese as written in
44// Brazil.
45//
46// On Windows, the C library does not use any such environment
47// variables, and setting them won't affect the behavior of functions
48// like ctime(). The user sets the locale through the Regional Options
49// in the Control Panel. The C library (in the setlocale() function)
50// does not use country and language codes, but country and language
51// names spelled out in English.
52// However, this function does check the above environment
53// variables, and does return a Unix-style locale string based on
54// either said environment variables or the thread's current locale.
55//
56// Your application should call `setlocale(LC_ALL, "")` for the user
57// settings to take effect. GTK does this in its initialization
58// functions automatically (by calling gtk_set_locale()).
59// See the setlocale() manpage for more details.
60//
61// Note that the default language can change over the life of an application.
62//
63// Also note that this function will not do the right thing if you
64// use per-thread locales with uselocale(). In that case, you should
65// just call pango_language_from_string() yourself.
66func LanguageGetDefault() *Language {
67
68	cret := xLanguageGetDefault()
69	return cret
70}
71
72var xLanguageGetPreferred func() uintptr
73
74// Returns the list of languages that the user prefers.
75//
76// The list is specified by the `PANGO_LANGUAGE` or `LANGUAGE`
77// environment variables, in order of preference. Note that this
78// list does not necessarily include the language returned by
79// [func@Pango.Language.get_default].
80//
81// When choosing language-specific resources, such as the sample
82// text returned by [method@Pango.Language.get_sample_string],
83// you should first try the default language, followed by the
84// languages returned by this function.
85func LanguageGetPreferred() uintptr {
86
87	cret := xLanguageGetPreferred()
88	return cret
89}
90
91func init() {
92	core.SetPackageName("PANGO", "pango")
93	core.SetSharedLibraries("PANGO", []string{"libpango-1.0.so.0"})
94	var libs []uintptr
95	for _, libPath := range core.GetPaths("PANGO") {
96		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
97		if err != nil {
98			panic(err)
99		}
100		libs = append(libs, lib)
101	}
102
103	core.PuregoSafeRegister(&xLanguageFromString, libs, "pango_language_from_string")
104	core.PuregoSafeRegister(&xLanguageGetDefault, libs, "pango_language_get_default")
105	core.PuregoSafeRegister(&xLanguageGetPreferred, libs, "pango_language_get_preferred")
106
107}

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