v0.2.1 c0399be

gtkboolfilter.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"
12	"github.com/bnema/puregotk/v4/gobject/types"
13)
14
15type BoolFilterClass struct {
16	_ structs.HostLayout
17
18	ParentClass FilterClass
19}
20
21func (x *BoolFilterClass) GoPointer() uintptr {
22	return uintptr(unsafe.Pointer(x))
23}
24
25// Evaluates a boolean expression to determine whether to include items.
26type BoolFilter struct {
27	Filter
28}
29
30var xBoolFilterGLibType func() types.GType
31
32func BoolFilterGLibType() types.GType {
33	return xBoolFilterGLibType()
34}
35
36func BoolFilterNewFromInternalPtr(ptr uintptr) *BoolFilter {
37	cls := &BoolFilter{}
38	cls.Ptr = ptr
39	return cls
40}
41
42var xNewBoolFilter func(uintptr) uintptr
43
44// Creates a new bool filter.
45func NewBoolFilter(ExpressionVar *Expression) *BoolFilter {
46	var cls *BoolFilter
47
48	cret := xNewBoolFilter(ExpressionVar.GoPointer())
49
50	if cret == 0 {
51		return nil
52	}
53	cls = &BoolFilter{}
54	cls.Ptr = cret
55	return cls
56}
57
58var xBoolFilterGetExpression func(uintptr) uintptr
59
60// Gets the expression that the filter evaluates for
61// each item.
62func (x *BoolFilter) GetExpression() *Expression {
63	var cls *Expression
64
65	cret := xBoolFilterGetExpression(x.GoPointer())
66
67	if cret == 0 {
68		return nil
69	}
70	gobject.IncreaseRef(cret)
71	cls = &Expression{}
72	cls.Ptr = cret
73	return cls
74}
75
76var xBoolFilterGetInvert func(uintptr) bool
77
78// Returns whether the filter inverts the expression.
79func (x *BoolFilter) GetInvert() bool {
80
81	cret := xBoolFilterGetInvert(x.GoPointer())
82	return cret
83}
84
85var xBoolFilterSetExpression func(uintptr, uintptr)
86
87// Sets the expression that the filter uses to check if items
88// should be filtered.
89//
90// The expression must have a value type of `G_TYPE_BOOLEAN`.
91func (x *BoolFilter) SetExpression(ExpressionVar *Expression) {
92
93	xBoolFilterSetExpression(x.GoPointer(), ExpressionVar.GoPointer())
94
95}
96
97var xBoolFilterSetInvert func(uintptr, bool)
98
99// Sets whether the filter should invert the expression.
100func (x *BoolFilter) SetInvert(InvertVar bool) {
101
102	xBoolFilterSetInvert(x.GoPointer(), InvertVar)
103
104}
105
106func (c *BoolFilter) GoPointer() uintptr {
107	if c == nil {
108		return 0
109	}
110	return c.Ptr
111}
112
113func (c *BoolFilter) SetGoPointer(ptr uintptr) {
114	c.Ptr = ptr
115}
116
117// SetPropertyInvert sets the "invert" property.
118// If the expression result should be inverted.
119func (x *BoolFilter) SetPropertyInvert(value bool) {
120	var v gobject.Value
121	v.Init(gobject.TypeBooleanVal)
122	v.SetBoolean(value)
123	x.SetProperty("invert", &v)
124}
125
126// GetPropertyInvert gets the "invert" property.
127// If the expression result should be inverted.
128func (x *BoolFilter) GetPropertyInvert() bool {
129	var v gobject.Value
130	x.GetProperty("invert", &v)
131	return v.GetBoolean()
132}
133
134func init() {
135	core.SetPackageName("GTK", "gtk4")
136	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
137	var libs []uintptr
138	for _, libPath := range core.GetPaths("GTK") {
139		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
140		if err != nil {
141			panic(err)
142		}
143		libs = append(libs, lib)
144	}
145
146	core.PuregoSafeRegister(&xBoolFilterGLibType, libs, "gtk_bool_filter_get_type")
147
148	core.PuregoSafeRegister(&xNewBoolFilter, libs, "gtk_bool_filter_new")
149
150	core.PuregoSafeRegister(&xBoolFilterGetExpression, libs, "gtk_bool_filter_get_expression")
151	core.PuregoSafeRegister(&xBoolFilterGetInvert, libs, "gtk_bool_filter_get_invert")
152	core.PuregoSafeRegister(&xBoolFilterSetExpression, libs, "gtk_bool_filter_set_expression")
153	core.PuregoSafeRegister(&xBoolFilterSetInvert, libs, "gtk_bool_filter_set_invert")
154
155}

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