v0.2.1 c0399be

pango-tabs.go RawHistoryFolder

1// Package pango was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package pango
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/gobject/types"
12)
13
14// A `PangoTabArray` contains an array of tab stops.
15//
16// `PangoTabArray` can be used to set tab stops in a `PangoLayout`.
17// Each tab stop has an alignment, a position, and optionally
18// a character to use as decimal point.
19type TabArray struct {
20	_ structs.HostLayout
21}
22
23var xTabArrayGLibType func() types.GType
24
25func TabArrayGLibType() types.GType {
26	return xTabArrayGLibType()
27}
28
29func (x *TabArray) GoPointer() uintptr {
30	return uintptr(unsafe.Pointer(x))
31}
32
33var xNewTabArray func(int, bool) *TabArray
34
35// Creates an array of @initial_size tab stops.
36//
37// Tab stops are specified in pixel units if @positions_in_pixels is %TRUE,
38// otherwise in Pango units. All stops are initially at position 0.
39func NewTabArray(InitialSizeVar int, PositionsInPixelsVar bool) *TabArray {
40
41	cret := xNewTabArray(InitialSizeVar, PositionsInPixelsVar)
42	return cret
43}
44
45var xNewTabArrayWithPositions func(int, bool, TabAlign, int, ...interface{}) *TabArray
46
47// Creates a `PangoTabArray` and allows you to specify the alignment
48// and position of each tab stop.
49//
50// You **must** provide an alignment and position for @size tab stops.
51func NewTabArrayWithPositions(SizeVar int, PositionsInPixelsVar bool, FirstAlignmentVar TabAlign, FirstPositionVar int, varArgs ...interface{}) *TabArray {
52
53	cret := xNewTabArrayWithPositions(SizeVar, PositionsInPixelsVar, FirstAlignmentVar, FirstPositionVar, varArgs...)
54	return cret
55}
56
57var xTabArrayCopy func(uintptr) *TabArray
58
59// Copies a `PangoTabArray`.
60func (x *TabArray) Copy() *TabArray {
61
62	cret := xTabArrayCopy(x.GoPointer())
63	return cret
64}
65
66var xTabArrayFree func(uintptr)
67
68// Frees a tab array and associated resources.
69func (x *TabArray) Free() {
70
71	xTabArrayFree(x.GoPointer())
72
73}
74
75var xTabArrayGetDecimalPoint func(uintptr, int) uint32
76
77// Gets the Unicode character to use as decimal point.
78//
79// This is only relevant for tabs with %PANGO_TAB_DECIMAL alignment,
80// which align content at the first occurrence of the decimal point
81// character.
82//
83// The default value of 0 means that Pango will use the
84// decimal point according to the current locale.
85func (x *TabArray) GetDecimalPoint(TabIndexVar int) uint32 {
86
87	cret := xTabArrayGetDecimalPoint(x.GoPointer(), TabIndexVar)
88	return cret
89}
90
91var xTabArrayGetPositionsInPixels func(uintptr) bool
92
93// Returns %TRUE if the tab positions are in pixels,
94// %FALSE if they are in Pango units.
95func (x *TabArray) GetPositionsInPixels() bool {
96
97	cret := xTabArrayGetPositionsInPixels(x.GoPointer())
98	return cret
99}
100
101var xTabArrayGetSize func(uintptr) int
102
103// Gets the number of tab stops in @tab_array.
104func (x *TabArray) GetSize() int {
105
106	cret := xTabArrayGetSize(x.GoPointer())
107	return cret
108}
109
110var xTabArrayGetTab func(uintptr, int, *TabAlign, *int)
111
112// Gets the alignment and position of a tab stop.
113func (x *TabArray) GetTab(TabIndexVar int, AlignmentVar *TabAlign, LocationVar *int) {
114
115	xTabArrayGetTab(x.GoPointer(), TabIndexVar, AlignmentVar, LocationVar)
116
117}
118
119var xTabArrayGetTabs func(uintptr, **TabAlign, *[]int)
120
121// If non-%NULL, @alignments and @locations are filled with allocated
122// arrays.
123//
124// The arrays are of length [method@Pango.TabArray.get_size].
125// You must free the returned array.
126func (x *TabArray) GetTabs(AlignmentsVar **TabAlign, LocationsVar *[]int) {
127
128	xTabArrayGetTabs(x.GoPointer(), AlignmentsVar, LocationsVar)
129
130}
131
132var xTabArrayResize func(uintptr, int)
133
134// Resizes a tab array.
135//
136// You must subsequently initialize any tabs
137// that were added as a result of growing the array.
138func (x *TabArray) Resize(NewSizeVar int) {
139
140	xTabArrayResize(x.GoPointer(), NewSizeVar)
141
142}
143
144var xTabArraySetDecimalPoint func(uintptr, int, uint32)
145
146// Sets the Unicode character to use as decimal point.
147//
148// This is only relevant for tabs with %PANGO_TAB_DECIMAL alignment,
149// which align content at the first occurrence of the decimal point
150// character.
151//
152// By default, Pango uses the decimal point according
153// to the current locale.
154func (x *TabArray) SetDecimalPoint(TabIndexVar int, DecimalPointVar uint32) {
155
156	xTabArraySetDecimalPoint(x.GoPointer(), TabIndexVar, DecimalPointVar)
157
158}
159
160var xTabArraySetPositionsInPixels func(uintptr, bool)
161
162// Sets whether positions in this array are specified in
163// pixels.
164func (x *TabArray) SetPositionsInPixels(PositionsInPixelsVar bool) {
165
166	xTabArraySetPositionsInPixels(x.GoPointer(), PositionsInPixelsVar)
167
168}
169
170var xTabArraySetTab func(uintptr, int, TabAlign, int)
171
172// Sets the alignment and location of a tab stop.
173func (x *TabArray) SetTab(TabIndexVar int, AlignmentVar TabAlign, LocationVar int) {
174
175	xTabArraySetTab(x.GoPointer(), TabIndexVar, AlignmentVar, LocationVar)
176
177}
178
179var xTabArraySort func(uintptr)
180
181// Utility function to ensure that the tab stops are in increasing order.
182func (x *TabArray) Sort() {
183
184	xTabArraySort(x.GoPointer())
185
186}
187
188var xTabArrayToString func(uintptr) string
189
190// Serializes a `PangoTabArray` to a string.
191//
192// In the resulting string, serialized tabs are separated by newlines or commas.
193//
194// Individual tabs are serialized to a string of the form
195//
196//	[ALIGNMENT:]POSITION[:DECIMAL_POINT]
197//
198// Where ALIGNMENT is one of _left_, _right_, _center_ or _decimal_, and
199// POSITION is the position of the tab, optionally followed by the unit _px_.
200// If ALIGNMENT is omitted, it defaults to _left_. If ALIGNMENT is _decimal_,
201// the DECIMAL_POINT character may be specified as a Unicode codepoint.
202//
203// Note that all tabs in the array must use the same unit.
204//
205// A typical example:
206//
207//	100px 200px center:300px right:400px
208func (x *TabArray) ToString() string {
209
210	cret := xTabArrayToString(x.GoPointer())
211	return cret
212}
213
214// `PangoTabAlign` specifies where the text appears relative to the tab stop
215// position.
216type TabAlign int
217
218var xTabAlignGLibType func() types.GType
219
220func TabAlignGLibType() types.GType {
221	return xTabAlignGLibType()
222}
223
224const (
225
226	// the text appears to the right of the tab stop position
227	TabLeftValue TabAlign = 0
228	// the text appears to the left of the tab stop position
229	//   until the available space is filled. Since: 1.50
230	TabRightValue TabAlign = 1
231	// the text is centered at the tab stop position
232	//   until the available space is filled. Since: 1.50
233	TabCenterValue TabAlign = 2
234	// text before the first occurrence of the decimal point
235	//   character appears to the left of the tab stop position (until the available
236	//   space is filled), the rest to the right. Since: 1.50
237	TabDecimalValue TabAlign = 3
238)
239
240var xTabArrayFromString func(string) *TabArray
241
242// Deserializes a `PangoTabArray` from a string.
243//
244// This is the counterpart to [method@Pango.TabArray.to_string].
245// See that functions for details about the format.
246func TabArrayFromString(TextVar string) *TabArray {
247
248	cret := xTabArrayFromString(TextVar)
249	return cret
250}
251
252func init() {
253	core.SetPackageName("PANGO", "pango")
254	core.SetSharedLibraries("PANGO", []string{"libpango-1.0.so.0"})
255	var libs []uintptr
256	for _, libPath := range core.GetPaths("PANGO") {
257		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
258		if err != nil {
259			panic(err)
260		}
261		libs = append(libs, lib)
262	}
263
264	core.PuregoSafeRegister(&xTabAlignGLibType, libs, "pango_tab_align_get_type")
265
266	core.PuregoSafeRegister(&xTabArrayFromString, libs, "pango_tab_array_from_string")
267
268	core.PuregoSafeRegister(&xTabArrayGLibType, libs, "pango_tab_array_get_type")
269
270	core.PuregoSafeRegister(&xNewTabArray, libs, "pango_tab_array_new")
271	core.PuregoSafeRegister(&xNewTabArrayWithPositions, libs, "pango_tab_array_new_with_positions")
272
273	core.PuregoSafeRegister(&xTabArrayCopy, libs, "pango_tab_array_copy")
274	core.PuregoSafeRegister(&xTabArrayFree, libs, "pango_tab_array_free")
275	core.PuregoSafeRegister(&xTabArrayGetDecimalPoint, libs, "pango_tab_array_get_decimal_point")
276	core.PuregoSafeRegister(&xTabArrayGetPositionsInPixels, libs, "pango_tab_array_get_positions_in_pixels")
277	core.PuregoSafeRegister(&xTabArrayGetSize, libs, "pango_tab_array_get_size")
278	core.PuregoSafeRegister(&xTabArrayGetTab, libs, "pango_tab_array_get_tab")
279	core.PuregoSafeRegister(&xTabArrayGetTabs, libs, "pango_tab_array_get_tabs")
280	core.PuregoSafeRegister(&xTabArrayResize, libs, "pango_tab_array_resize")
281	core.PuregoSafeRegister(&xTabArraySetDecimalPoint, libs, "pango_tab_array_set_decimal_point")
282	core.PuregoSafeRegister(&xTabArraySetPositionsInPixels, libs, "pango_tab_array_set_positions_in_pixels")
283	core.PuregoSafeRegister(&xTabArraySetTab, libs, "pango_tab_array_set_tab")
284	core.PuregoSafeRegister(&xTabArraySort, libs, "pango_tab_array_sort")
285	core.PuregoSafeRegister(&xTabArrayToString, libs, "pango_tab_array_to_string")
286
287}

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