v0.2.1 c0399be

gtkconstraintguide.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 ConstraintGuideClass struct {
16	_ structs.HostLayout
17
18	ParentClass gobject.ObjectClass
19}
20
21func (x *ConstraintGuideClass) GoPointer() uintptr {
22	return uintptr(unsafe.Pointer(x))
23}
24
25// An invisible layout element in a `GtkConstraintLayout`.
26//
27// The `GtkConstraintLayout` treats guides like widgets. They
28// can be used as the source or target of a `GtkConstraint`.
29//
30// Guides have a minimum, maximum and natural size. Depending
31// on the constraints that are applied, they can act like a
32// guideline that widgets can be aligned to, or like *flexible
33// space*.
34//
35// Unlike a `GtkWidget`, a `GtkConstraintGuide` will not be drawn.
36type ConstraintGuide struct {
37	gobject.Object
38}
39
40var xConstraintGuideGLibType func() types.GType
41
42func ConstraintGuideGLibType() types.GType {
43	return xConstraintGuideGLibType()
44}
45
46func ConstraintGuideNewFromInternalPtr(ptr uintptr) *ConstraintGuide {
47	cls := &ConstraintGuide{}
48	cls.Ptr = ptr
49	return cls
50}
51
52var xNewConstraintGuide func() uintptr
53
54// Creates a new `GtkConstraintGuide` object.
55func NewConstraintGuide() *ConstraintGuide {
56	var cls *ConstraintGuide
57
58	cret := xNewConstraintGuide()
59
60	if cret == 0 {
61		return nil
62	}
63	cls = &ConstraintGuide{}
64	cls.Ptr = cret
65	return cls
66}
67
68var xConstraintGuideGetMaxSize func(uintptr, *int, *int)
69
70// Gets the maximum size of @guide.
71func (x *ConstraintGuide) GetMaxSize(WidthVar *int, HeightVar *int) {
72
73	xConstraintGuideGetMaxSize(x.GoPointer(), WidthVar, HeightVar)
74
75}
76
77var xConstraintGuideGetMinSize func(uintptr, *int, *int)
78
79// Gets the minimum size of @guide.
80func (x *ConstraintGuide) GetMinSize(WidthVar *int, HeightVar *int) {
81
82	xConstraintGuideGetMinSize(x.GoPointer(), WidthVar, HeightVar)
83
84}
85
86var xConstraintGuideGetName func(uintptr) string
87
88// Retrieves the name set using gtk_constraint_guide_set_name().
89func (x *ConstraintGuide) GetName() string {
90
91	cret := xConstraintGuideGetName(x.GoPointer())
92	return cret
93}
94
95var xConstraintGuideGetNatSize func(uintptr, *int, *int)
96
97// Gets the natural size of @guide.
98func (x *ConstraintGuide) GetNatSize(WidthVar *int, HeightVar *int) {
99
100	xConstraintGuideGetNatSize(x.GoPointer(), WidthVar, HeightVar)
101
102}
103
104var xConstraintGuideGetStrength func(uintptr) ConstraintStrength
105
106// Retrieves the strength set using gtk_constraint_guide_set_strength().
107func (x *ConstraintGuide) GetStrength() ConstraintStrength {
108
109	cret := xConstraintGuideGetStrength(x.GoPointer())
110	return cret
111}
112
113var xConstraintGuideSetMaxSize func(uintptr, int, int)
114
115// Sets the maximum size of @guide.
116//
117// If @guide is attached to a `GtkConstraintLayout`,
118// the constraints will be updated to reflect the new size.
119func (x *ConstraintGuide) SetMaxSize(WidthVar int, HeightVar int) {
120
121	xConstraintGuideSetMaxSize(x.GoPointer(), WidthVar, HeightVar)
122
123}
124
125var xConstraintGuideSetMinSize func(uintptr, int, int)
126
127// Sets the minimum size of @guide.
128//
129// If @guide is attached to a `GtkConstraintLayout`,
130// the constraints will be updated to reflect the new size.
131func (x *ConstraintGuide) SetMinSize(WidthVar int, HeightVar int) {
132
133	xConstraintGuideSetMinSize(x.GoPointer(), WidthVar, HeightVar)
134
135}
136
137var xConstraintGuideSetName func(uintptr, uintptr)
138
139// Sets a name for the given `GtkConstraintGuide`.
140//
141// The name is useful for debugging purposes.
142func (x *ConstraintGuide) SetName(NameVar *string) {
143
144	NameVarPtr := core.GStrdupNullable(NameVar)
145	defer core.GFreeNullable(NameVarPtr)
146
147	xConstraintGuideSetName(x.GoPointer(), NameVarPtr)
148
149}
150
151var xConstraintGuideSetNatSize func(uintptr, int, int)
152
153// Sets the natural size of @guide.
154//
155// If @guide is attached to a `GtkConstraintLayout`,
156// the constraints will be updated to reflect the new size.
157func (x *ConstraintGuide) SetNatSize(WidthVar int, HeightVar int) {
158
159	xConstraintGuideSetNatSize(x.GoPointer(), WidthVar, HeightVar)
160
161}
162
163var xConstraintGuideSetStrength func(uintptr, ConstraintStrength)
164
165// Sets the strength of the constraint on the natural size of the
166// given `GtkConstraintGuide`.
167func (x *ConstraintGuide) SetStrength(StrengthVar ConstraintStrength) {
168
169	xConstraintGuideSetStrength(x.GoPointer(), StrengthVar)
170
171}
172
173func (c *ConstraintGuide) GoPointer() uintptr {
174	if c == nil {
175		return 0
176	}
177	return c.Ptr
178}
179
180func (c *ConstraintGuide) SetGoPointer(ptr uintptr) {
181	c.Ptr = ptr
182}
183
184// SetPropertyMaxHeight sets the "max-height" property.
185// The maximum height of the guide.
186func (x *ConstraintGuide) SetPropertyMaxHeight(value int) {
187	var v gobject.Value
188	v.Init(gobject.TypeIntVal)
189	v.SetInt(value)
190	x.SetProperty("max-height", &v)
191}
192
193// GetPropertyMaxHeight gets the "max-height" property.
194// The maximum height of the guide.
195func (x *ConstraintGuide) GetPropertyMaxHeight() int {
196	var v gobject.Value
197	x.GetProperty("max-height", &v)
198	return v.GetInt()
199}
200
201// SetPropertyMaxWidth sets the "max-width" property.
202// The maximum width of the guide.
203func (x *ConstraintGuide) SetPropertyMaxWidth(value int) {
204	var v gobject.Value
205	v.Init(gobject.TypeIntVal)
206	v.SetInt(value)
207	x.SetProperty("max-width", &v)
208}
209
210// GetPropertyMaxWidth gets the "max-width" property.
211// The maximum width of the guide.
212func (x *ConstraintGuide) GetPropertyMaxWidth() int {
213	var v gobject.Value
214	x.GetProperty("max-width", &v)
215	return v.GetInt()
216}
217
218// SetPropertyMinHeight sets the "min-height" property.
219// The minimum height of the guide.
220func (x *ConstraintGuide) SetPropertyMinHeight(value int) {
221	var v gobject.Value
222	v.Init(gobject.TypeIntVal)
223	v.SetInt(value)
224	x.SetProperty("min-height", &v)
225}
226
227// GetPropertyMinHeight gets the "min-height" property.
228// The minimum height of the guide.
229func (x *ConstraintGuide) GetPropertyMinHeight() int {
230	var v gobject.Value
231	x.GetProperty("min-height", &v)
232	return v.GetInt()
233}
234
235// SetPropertyMinWidth sets the "min-width" property.
236// The minimum width of the guide.
237func (x *ConstraintGuide) SetPropertyMinWidth(value int) {
238	var v gobject.Value
239	v.Init(gobject.TypeIntVal)
240	v.SetInt(value)
241	x.SetProperty("min-width", &v)
242}
243
244// GetPropertyMinWidth gets the "min-width" property.
245// The minimum width of the guide.
246func (x *ConstraintGuide) GetPropertyMinWidth() int {
247	var v gobject.Value
248	x.GetProperty("min-width", &v)
249	return v.GetInt()
250}
251
252// SetPropertyName sets the "name" property.
253// A name that identifies the `GtkConstraintGuide`, for debugging.
254func (x *ConstraintGuide) SetPropertyName(value string) {
255	var v gobject.Value
256	v.Init(gobject.TypeStringVal)
257	v.SetString(&value)
258	x.SetProperty("name", &v)
259}
260
261// GetPropertyName gets the "name" property.
262// A name that identifies the `GtkConstraintGuide`, for debugging.
263func (x *ConstraintGuide) GetPropertyName() string {
264	var v gobject.Value
265	x.GetProperty("name", &v)
266	return v.GetString()
267}
268
269// SetPropertyNatHeight sets the "nat-height" property.
270// The preferred, or natural, height of the guide.
271func (x *ConstraintGuide) SetPropertyNatHeight(value int) {
272	var v gobject.Value
273	v.Init(gobject.TypeIntVal)
274	v.SetInt(value)
275	x.SetProperty("nat-height", &v)
276}
277
278// GetPropertyNatHeight gets the "nat-height" property.
279// The preferred, or natural, height of the guide.
280func (x *ConstraintGuide) GetPropertyNatHeight() int {
281	var v gobject.Value
282	x.GetProperty("nat-height", &v)
283	return v.GetInt()
284}
285
286// SetPropertyNatWidth sets the "nat-width" property.
287// The preferred, or natural, width of the guide.
288func (x *ConstraintGuide) SetPropertyNatWidth(value int) {
289	var v gobject.Value
290	v.Init(gobject.TypeIntVal)
291	v.SetInt(value)
292	x.SetProperty("nat-width", &v)
293}
294
295// GetPropertyNatWidth gets the "nat-width" property.
296// The preferred, or natural, width of the guide.
297func (x *ConstraintGuide) GetPropertyNatWidth() int {
298	var v gobject.Value
299	x.GetProperty("nat-width", &v)
300	return v.GetInt()
301}
302
303func init() {
304	core.SetPackageName("GTK", "gtk4")
305	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
306	var libs []uintptr
307	for _, libPath := range core.GetPaths("GTK") {
308		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
309		if err != nil {
310			panic(err)
311		}
312		libs = append(libs, lib)
313	}
314
315	core.PuregoSafeRegister(&xConstraintGuideGLibType, libs, "gtk_constraint_guide_get_type")
316
317	core.PuregoSafeRegister(&xNewConstraintGuide, libs, "gtk_constraint_guide_new")
318
319	core.PuregoSafeRegister(&xConstraintGuideGetMaxSize, libs, "gtk_constraint_guide_get_max_size")
320	core.PuregoSafeRegister(&xConstraintGuideGetMinSize, libs, "gtk_constraint_guide_get_min_size")
321	core.PuregoSafeRegister(&xConstraintGuideGetName, libs, "gtk_constraint_guide_get_name")
322	core.PuregoSafeRegister(&xConstraintGuideGetNatSize, libs, "gtk_constraint_guide_get_nat_size")
323	core.PuregoSafeRegister(&xConstraintGuideGetStrength, libs, "gtk_constraint_guide_get_strength")
324	core.PuregoSafeRegister(&xConstraintGuideSetMaxSize, libs, "gtk_constraint_guide_set_max_size")
325	core.PuregoSafeRegister(&xConstraintGuideSetMinSize, libs, "gtk_constraint_guide_set_min_size")
326	core.PuregoSafeRegister(&xConstraintGuideSetName, libs, "gtk_constraint_guide_set_name")
327	core.PuregoSafeRegister(&xConstraintGuideSetNatSize, libs, "gtk_constraint_guide_set_nat_size")
328	core.PuregoSafeRegister(&xConstraintGuideSetStrength, libs, "gtk_constraint_guide_set_strength")
329
330}

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