v0.2.1 c0399be

gtkbitset.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/pkg/core"
11	"github.com/bnema/puregotk/v4/gobject/types"
12)
13
14// Iterates over the elements of a [struct@Gtk.Bitset].
15//
16// `GtkBitSetIter is an opaque, stack-allocated struct.
17//
18// Before a `GtkBitsetIter` can be used, it needs to be initialized with
19// [func@Gtk.BitsetIter.init_first], [func@Gtk.BitsetIter.init_last]
20// or [func@Gtk.BitsetIter.init_at].
21type BitsetIter struct {
22	_ structs.HostLayout
23
24	PrivateData [10]uintptr
25}
26
27var xBitsetIterGLibType func() types.GType
28
29func BitsetIterGLibType() types.GType {
30	return xBitsetIterGLibType()
31}
32
33func (x *BitsetIter) GoPointer() uintptr {
34	return uintptr(unsafe.Pointer(x))
35}
36
37var xBitsetIterGetValue func(uintptr) uint
38
39// Gets the current value that @iter points to.
40//
41// If @iter is not valid and [method@Gtk.BitsetIter.is_valid]
42// returns %FALSE, this function returns 0.
43func (x *BitsetIter) GetValue() uint {
44
45	cret := xBitsetIterGetValue(x.GoPointer())
46	return cret
47}
48
49var xBitsetIterIsValid func(uintptr) bool
50
51// Checks if @iter points to a valid value.
52func (x *BitsetIter) IsValid() bool {
53
54	cret := xBitsetIterIsValid(x.GoPointer())
55	return cret
56}
57
58var xBitsetIterNext func(uintptr, *uint) bool
59
60// Moves @iter to the next value in the set.
61//
62// If it was already pointing to the last value in the set,
63// %FALSE is returned and @iter is invalidated.
64func (x *BitsetIter) Next(ValueVar *uint) bool {
65
66	cret := xBitsetIterNext(x.GoPointer(), ValueVar)
67	return cret
68}
69
70var xBitsetIterPrevious func(uintptr, *uint) bool
71
72// Moves @iter to the previous value in the set.
73//
74// If it was already pointing to the first value in the set,
75// %FALSE is returned and @iter is invalidated.
76func (x *BitsetIter) Previous(ValueVar *uint) bool {
77
78	cret := xBitsetIterPrevious(x.GoPointer(), ValueVar)
79	return cret
80}
81
82var xBitsetIterInitAt func(*BitsetIter, *Bitset, uint, *uint) bool
83
84// Initializes @iter to point to @target.
85//
86// If @target is not found, finds the next value after it.
87// If no value >= @target exists in @set, this function returns %FALSE.
88func BitsetIterInitAt(IterVar *BitsetIter, SetVar *Bitset, TargetVar uint, ValueVar *uint) bool {
89
90	cret := xBitsetIterInitAt(IterVar, SetVar, TargetVar, ValueVar)
91	return cret
92}
93
94var xBitsetIterInitFirst func(*BitsetIter, *Bitset, *uint) bool
95
96// Initializes an iterator for @set and points it to the first
97// value in @set.
98//
99// If @set is empty, %FALSE is returned and @value is set to %G_MAXUINT.
100func BitsetIterInitFirst(IterVar *BitsetIter, SetVar *Bitset, ValueVar *uint) bool {
101
102	cret := xBitsetIterInitFirst(IterVar, SetVar, ValueVar)
103	return cret
104}
105
106var xBitsetIterInitLast func(*BitsetIter, *Bitset, *uint) bool
107
108// Initializes an iterator for @set and points it to the last
109// value in @set.
110//
111// If @set is empty, %FALSE is returned.
112func BitsetIterInitLast(IterVar *BitsetIter, SetVar *Bitset, ValueVar *uint) bool {
113
114	cret := xBitsetIterInitLast(IterVar, SetVar, ValueVar)
115	return cret
116}
117
118func init() {
119	core.SetPackageName("GTK", "gtk4")
120	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
121	var libs []uintptr
122	for _, libPath := range core.GetPaths("GTK") {
123		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
124		if err != nil {
125			panic(err)
126		}
127		libs = append(libs, lib)
128	}
129
130	core.PuregoSafeRegister(&xBitsetIterInitAt, libs, "gtk_bitset_iter_init_at")
131	core.PuregoSafeRegister(&xBitsetIterInitFirst, libs, "gtk_bitset_iter_init_first")
132	core.PuregoSafeRegister(&xBitsetIterInitLast, libs, "gtk_bitset_iter_init_last")
133
134	core.PuregoSafeRegister(&xBitsetIterGLibType, libs, "gtk_bitset_iter_get_type")
135
136	core.PuregoSafeRegister(&xBitsetIterGetValue, libs, "gtk_bitset_iter_get_value")
137	core.PuregoSafeRegister(&xBitsetIterIsValid, libs, "gtk_bitset_iter_is_valid")
138	core.PuregoSafeRegister(&xBitsetIterNext, libs, "gtk_bitset_iter_next")
139	core.PuregoSafeRegister(&xBitsetIterPrevious, libs, "gtk_bitset_iter_previous")
140
141}

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