v0.2.1 c0399be

gtkcenterlayout.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 CenterLayoutClass struct {
16	_ structs.HostLayout
17
18	ParentClass LayoutManagerClass
19}
20
21func (x *CenterLayoutClass) GoPointer() uintptr {
22	return uintptr(unsafe.Pointer(x))
23}
24
25// Manages up to three children.
26//
27// The start widget is allocated at the start of the layout (left in
28// left-to-right locales and right in right-to-left ones), and the end
29// widget at the end.
30//
31// The center widget is centered regarding the full width of the layout's.
32type CenterLayout struct {
33	LayoutManager
34}
35
36var xCenterLayoutGLibType func() types.GType
37
38func CenterLayoutGLibType() types.GType {
39	return xCenterLayoutGLibType()
40}
41
42func CenterLayoutNewFromInternalPtr(ptr uintptr) *CenterLayout {
43	cls := &CenterLayout{}
44	cls.Ptr = ptr
45	return cls
46}
47
48var xNewCenterLayout func() uintptr
49
50// Creates a new `GtkCenterLayout`.
51func NewCenterLayout() *CenterLayout {
52	var cls *CenterLayout
53
54	cret := xNewCenterLayout()
55
56	if cret == 0 {
57		return nil
58	}
59	cls = &CenterLayout{}
60	cls.Ptr = cret
61	return cls
62}
63
64var xCenterLayoutGetBaselinePosition func(uintptr) BaselinePosition
65
66// Returns the baseline position of the layout.
67func (x *CenterLayout) GetBaselinePosition() BaselinePosition {
68
69	cret := xCenterLayoutGetBaselinePosition(x.GoPointer())
70	return cret
71}
72
73var xCenterLayoutGetCenterWidget func(uintptr) uintptr
74
75// Returns the center widget of the layout.
76func (x *CenterLayout) GetCenterWidget() *Widget {
77	var cls *Widget
78
79	cret := xCenterLayoutGetCenterWidget(x.GoPointer())
80
81	if cret == 0 {
82		return nil
83	}
84	gobject.IncreaseRef(cret)
85	cls = &Widget{}
86	cls.Ptr = cret
87	return cls
88}
89
90var xCenterLayoutGetEndWidget func(uintptr) uintptr
91
92// Returns the end widget of the layout.
93func (x *CenterLayout) GetEndWidget() *Widget {
94	var cls *Widget
95
96	cret := xCenterLayoutGetEndWidget(x.GoPointer())
97
98	if cret == 0 {
99		return nil
100	}
101	gobject.IncreaseRef(cret)
102	cls = &Widget{}
103	cls.Ptr = cret
104	return cls
105}
106
107var xCenterLayoutGetOrientation func(uintptr) Orientation
108
109// Gets the current orienration of the layout manager.
110func (x *CenterLayout) GetOrientation() Orientation {
111
112	cret := xCenterLayoutGetOrientation(x.GoPointer())
113	return cret
114}
115
116var xCenterLayoutGetShrinkCenterLast func(uintptr) bool
117
118// Gets whether @self shrinks the center widget after other children.
119func (x *CenterLayout) GetShrinkCenterLast() bool {
120
121	cret := xCenterLayoutGetShrinkCenterLast(x.GoPointer())
122	return cret
123}
124
125var xCenterLayoutGetStartWidget func(uintptr) uintptr
126
127// Returns the start widget of the layout.
128func (x *CenterLayout) GetStartWidget() *Widget {
129	var cls *Widget
130
131	cret := xCenterLayoutGetStartWidget(x.GoPointer())
132
133	if cret == 0 {
134		return nil
135	}
136	gobject.IncreaseRef(cret)
137	cls = &Widget{}
138	cls.Ptr = cret
139	return cls
140}
141
142var xCenterLayoutSetBaselinePosition func(uintptr, BaselinePosition)
143
144// Sets the new baseline position of @self
145func (x *CenterLayout) SetBaselinePosition(BaselinePositionVar BaselinePosition) {
146
147	xCenterLayoutSetBaselinePosition(x.GoPointer(), BaselinePositionVar)
148
149}
150
151var xCenterLayoutSetCenterWidget func(uintptr, uintptr)
152
153// Sets the new center widget of @self.
154//
155// To remove the existing center widget, pass %NULL.
156func (x *CenterLayout) SetCenterWidget(WidgetVar *Widget) {
157
158	xCenterLayoutSetCenterWidget(x.GoPointer(), WidgetVar.GoPointer())
159
160}
161
162var xCenterLayoutSetEndWidget func(uintptr, uintptr)
163
164// Sets the new end widget of @self.
165//
166// To remove the existing center widget, pass %NULL.
167func (x *CenterLayout) SetEndWidget(WidgetVar *Widget) {
168
169	xCenterLayoutSetEndWidget(x.GoPointer(), WidgetVar.GoPointer())
170
171}
172
173var xCenterLayoutSetOrientation func(uintptr, Orientation)
174
175// Sets the orientation of @self.
176func (x *CenterLayout) SetOrientation(OrientationVar Orientation) {
177
178	xCenterLayoutSetOrientation(x.GoPointer(), OrientationVar)
179
180}
181
182var xCenterLayoutSetShrinkCenterLast func(uintptr, bool)
183
184// Sets whether to shrink the center widget after other children.
185//
186// By default, when there's no space to give all three children their
187// natural widths, the start and end widgets start shrinking and the
188// center child keeps natural width until they reach minimum width.
189//
190// If set to `FALSE`, start and end widgets keep natural width and the
191// center widget starts shrinking instead.
192func (x *CenterLayout) SetShrinkCenterLast(ShrinkCenterLastVar bool) {
193
194	xCenterLayoutSetShrinkCenterLast(x.GoPointer(), ShrinkCenterLastVar)
195
196}
197
198var xCenterLayoutSetStartWidget func(uintptr, uintptr)
199
200// Sets the new start widget of @self.
201//
202// To remove the existing start widget, pass %NULL.
203func (x *CenterLayout) SetStartWidget(WidgetVar *Widget) {
204
205	xCenterLayoutSetStartWidget(x.GoPointer(), WidgetVar.GoPointer())
206
207}
208
209func (c *CenterLayout) GoPointer() uintptr {
210	if c == nil {
211		return 0
212	}
213	return c.Ptr
214}
215
216func (c *CenterLayout) SetGoPointer(ptr uintptr) {
217	c.Ptr = ptr
218}
219
220// SetPropertyShrinkCenterLast sets the "shrink-center-last" property.
221// Whether to shrink the center widget after other children.
222//
223// By default, when there's no space to give all three children their
224// natural widths, the start and end widgets start shrinking and the
225// center child keeps natural width until they reach minimum width.
226//
227// If set to `FALSE`, start and end widgets keep natural width and the
228// center widget starts shrinking instead.
229func (x *CenterLayout) SetPropertyShrinkCenterLast(value bool) {
230	var v gobject.Value
231	v.Init(gobject.TypeBooleanVal)
232	v.SetBoolean(value)
233	x.SetProperty("shrink-center-last", &v)
234}
235
236// GetPropertyShrinkCenterLast gets the "shrink-center-last" property.
237// Whether to shrink the center widget after other children.
238//
239// By default, when there's no space to give all three children their
240// natural widths, the start and end widgets start shrinking and the
241// center child keeps natural width until they reach minimum width.
242//
243// If set to `FALSE`, start and end widgets keep natural width and the
244// center widget starts shrinking instead.
245func (x *CenterLayout) GetPropertyShrinkCenterLast() bool {
246	var v gobject.Value
247	x.GetProperty("shrink-center-last", &v)
248	return v.GetBoolean()
249}
250
251func init() {
252	core.SetPackageName("GTK", "gtk4")
253	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
254	var libs []uintptr
255	for _, libPath := range core.GetPaths("GTK") {
256		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
257		if err != nil {
258			panic(err)
259		}
260		libs = append(libs, lib)
261	}
262
263	core.PuregoSafeRegister(&xCenterLayoutGLibType, libs, "gtk_center_layout_get_type")
264
265	core.PuregoSafeRegister(&xNewCenterLayout, libs, "gtk_center_layout_new")
266
267	core.PuregoSafeRegister(&xCenterLayoutGetBaselinePosition, libs, "gtk_center_layout_get_baseline_position")
268	core.PuregoSafeRegister(&xCenterLayoutGetCenterWidget, libs, "gtk_center_layout_get_center_widget")
269	core.PuregoSafeRegister(&xCenterLayoutGetEndWidget, libs, "gtk_center_layout_get_end_widget")
270	core.PuregoSafeRegister(&xCenterLayoutGetOrientation, libs, "gtk_center_layout_get_orientation")
271	core.PuregoSafeRegister(&xCenterLayoutGetShrinkCenterLast, libs, "gtk_center_layout_get_shrink_center_last")
272	core.PuregoSafeRegister(&xCenterLayoutGetStartWidget, libs, "gtk_center_layout_get_start_widget")
273	core.PuregoSafeRegister(&xCenterLayoutSetBaselinePosition, libs, "gtk_center_layout_set_baseline_position")
274	core.PuregoSafeRegister(&xCenterLayoutSetCenterWidget, libs, "gtk_center_layout_set_center_widget")
275	core.PuregoSafeRegister(&xCenterLayoutSetEndWidget, libs, "gtk_center_layout_set_end_widget")
276	core.PuregoSafeRegister(&xCenterLayoutSetOrientation, libs, "gtk_center_layout_set_orientation")
277	core.PuregoSafeRegister(&xCenterLayoutSetShrinkCenterLast, libs, "gtk_center_layout_set_shrink_center_last")
278	core.PuregoSafeRegister(&xCenterLayoutSetStartWidget, libs, "gtk_center_layout_set_start_widget")
279
280}

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