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 GridClass struct {
16 _ structs.HostLayout
17
18 ParentClass WidgetClass
19
20 Padding [8]uintptr
21}
22
23func (x *GridClass) GoPointer() uintptr {
24 return uintptr(unsafe.Pointer(x))
25}
26
27// Arranges its child widgets in rows and columns.
28//
29// <picture>
30//
31// <source srcset="grid-dark.png" media="(prefers-color-scheme: dark)">
32// <img alt="An example GtkGrid" src="grid.png">
33//
34// </picture>
35//
36// It supports arbitrary positions and horizontal/vertical spans.
37//
38// Children are added using [method@Gtk.Grid.attach]. They can span multiple
39// rows or columns. It is also possible to add a child next to an existing
40// child, using [method@Gtk.Grid.attach_next_to]. To remove a child from the
41// grid, use [method@Gtk.Grid.remove].
42//
43// The behaviour of `GtkGrid` when several children occupy the same grid
44// cell is undefined.
45//
46// # GtkGrid as GtkBuildable
47//
48// Every child in a `GtkGrid` has access to a custom [iface@Gtk.Buildable]
49// element, called `<layout>`. It can by used to specify a position in the
50// grid and optionally spans. All properties that can be used in the `<layout>`
51// element are implemented by [class@Gtk.GridLayoutChild].
52//
53// It is implemented by `GtkWidget` using [class@Gtk.LayoutManager].
54//
55// To showcase it, here is a simple example:
56//
57// ```xml
58// <object class="GtkGrid" id="my_grid">
59//
60// <child>
61// <object class="GtkButton" id="button1">
62// <property name="label">Button 1</property>
63// <layout>
64// <property name="column">0</property>
65// <property name="row">0</property>
66// </layout>
67// </object>
68// </child>
69// <child>
70// <object class="GtkButton" id="button2">
71// <property name="label">Button 2</property>
72// <layout>
73// <property name="column">1</property>
74// <property name="row">0</property>
75// </layout>
76// </object>
77// </child>
78// <child>
79// <object class="GtkButton" id="button3">
80// <property name="label">Button 3</property>
81// <layout>
82// <property name="column">2</property>
83// <property name="row">0</property>
84// <property name="row-span">2</property>
85// </layout>
86// </object>
87// </child>
88// <child>
89// <object class="GtkButton" id="button4">
90// <property name="label">Button 4</property>
91// <layout>
92// <property name="column">0</property>
93// <property name="row">1</property>
94// <property name="column-span">2</property>
95// </layout>
96// </object>
97// </child>
98//
99// </object>
100// ```
101//
102// It organizes the first two buttons side-by-side in one cell each.
103// The third button is in the last column but spans across two rows.
104// This is defined by the `row-span` property. The last button is
105// located in the second row and spans across two columns, which is
106// defined by the `column-span` property.
107//
108// # CSS nodes
109//
110// `GtkGrid` uses a single CSS node with name `grid`.
111//
112// # Accessibility
113//
114// Until GTK 4.10, `GtkGrid` used the [enum@Gtk.AccessibleRole.group] role.
115//
116// Starting from GTK 4.12, `GtkGrid` uses the [enum@Gtk.AccessibleRole.generic] role.
117type Grid struct {
118 Widget
119}
120
121var xGridGLibType func() types.GType
122
123func GridGLibType() types.GType {
124 return xGridGLibType()
125}
126
127func GridNewFromInternalPtr(ptr uintptr) *Grid {
128 cls := &Grid{}
129 cls.Ptr = ptr
130 return cls
131}
132
133var xNewGrid func() uintptr
134
135// Creates a new grid widget.
136func NewGrid() *Grid {
137 var cls *Grid
138
139 cret := xNewGrid()
140
141 if cret == 0 {
142 return nil
143 }
144 gobject.IncreaseRef(cret)
145 cls = &Grid{}
146 cls.Ptr = cret
147 return cls
148}
149
150var xGridAttach func(uintptr, uintptr, int, int, int, int)
151
152// Adds a widget to the grid.
153//
154// The position of @child is determined by @column and @row.
155// The number of “cells” that @child will occupy is determined
156// by @width and @height.
157func (x *Grid) Attach(ChildVar *Widget, ColumnVar int, RowVar int, WidthVar int, HeightVar int) {
158
159 xGridAttach(x.GoPointer(), ChildVar.GoPointer(), ColumnVar, RowVar, WidthVar, HeightVar)
160
161}
162
163var xGridAttachNextTo func(uintptr, uintptr, uintptr, PositionType, int, int)
164
165// Adds a widget to the grid.
166//
167// The widget is placed next to @sibling, on the side determined by
168// @side. When @sibling is %NULL, the widget is placed in row (for
169// left or right placement) or column 0 (for top or bottom placement),
170// at the end indicated by @side.
171//
172// Attaching widgets labeled `[1]`, `[2]`, `[3]` with `@sibling == %NULL` and
173// `@side == %GTK_POS_LEFT` yields a layout of `[3][2][1]`.
174func (x *Grid) AttachNextTo(ChildVar *Widget, SiblingVar *Widget, SideVar PositionType, WidthVar int, HeightVar int) {
175
176 xGridAttachNextTo(x.GoPointer(), ChildVar.GoPointer(), SiblingVar.GoPointer(), SideVar, WidthVar, HeightVar)
177
178}
179
180var xGridGetBaselineRow func(uintptr) int
181
182// Returns which row defines the global baseline of @grid.
183func (x *Grid) GetBaselineRow() int {
184
185 cret := xGridGetBaselineRow(x.GoPointer())
186 return cret
187}
188
189var xGridGetChildAt func(uintptr, int, int) uintptr
190
191// Gets the child of @grid whose area covers the grid
192// cell at @column, @row.
193func (x *Grid) GetChildAt(ColumnVar int, RowVar int) *Widget {
194 var cls *Widget
195
196 cret := xGridGetChildAt(x.GoPointer(), ColumnVar, RowVar)
197
198 if cret == 0 {
199 return nil
200 }
201 gobject.IncreaseRef(cret)
202 cls = &Widget{}
203 cls.Ptr = cret
204 return cls
205}
206
207var xGridGetColumnHomogeneous func(uintptr) bool
208
209// Returns whether all columns of @grid have the same width.
210func (x *Grid) GetColumnHomogeneous() bool {
211
212 cret := xGridGetColumnHomogeneous(x.GoPointer())
213 return cret
214}
215
216var xGridGetColumnSpacing func(uintptr) uint
217
218// Returns the amount of space between the columns of @grid.
219func (x *Grid) GetColumnSpacing() uint {
220
221 cret := xGridGetColumnSpacing(x.GoPointer())
222 return cret
223}
224
225var xGridGetRowBaselinePosition func(uintptr, int) BaselinePosition
226
227// Returns the baseline position of @row.
228//
229// See [method@Gtk.Grid.set_row_baseline_position].
230func (x *Grid) GetRowBaselinePosition(RowVar int) BaselinePosition {
231
232 cret := xGridGetRowBaselinePosition(x.GoPointer(), RowVar)
233 return cret
234}
235
236var xGridGetRowHomogeneous func(uintptr) bool
237
238// Returns whether all rows of @grid have the same height.
239func (x *Grid) GetRowHomogeneous() bool {
240
241 cret := xGridGetRowHomogeneous(x.GoPointer())
242 return cret
243}
244
245var xGridGetRowSpacing func(uintptr) uint
246
247// Returns the amount of space between the rows of @grid.
248func (x *Grid) GetRowSpacing() uint {
249
250 cret := xGridGetRowSpacing(x.GoPointer())
251 return cret
252}
253
254var xGridInsertColumn func(uintptr, int)
255
256// Inserts a column at the specified position.
257//
258// Children which are attached at or to the right of this position
259// are moved one column to the right. Children which span across this
260// position are grown to span the new column.
261func (x *Grid) InsertColumn(PositionVar int) {
262
263 xGridInsertColumn(x.GoPointer(), PositionVar)
264
265}
266
267var xGridInsertNextTo func(uintptr, uintptr, PositionType)
268
269// Inserts a row or column at the specified position.
270//
271// The new row or column is placed next to @sibling, on the side
272// determined by @side. If @side is %GTK_POS_TOP or %GTK_POS_BOTTOM,
273// a row is inserted. If @side is %GTK_POS_LEFT of %GTK_POS_RIGHT,
274// a column is inserted.
275func (x *Grid) InsertNextTo(SiblingVar *Widget, SideVar PositionType) {
276
277 xGridInsertNextTo(x.GoPointer(), SiblingVar.GoPointer(), SideVar)
278
279}
280
281var xGridInsertRow func(uintptr, int)
282
283// Inserts a row at the specified position.
284//
285// Children which are attached at or below this position
286// are moved one row down. Children which span across this
287// position are grown to span the new row.
288func (x *Grid) InsertRow(PositionVar int) {
289
290 xGridInsertRow(x.GoPointer(), PositionVar)
291
292}
293
294var xGridQueryChild func(uintptr, uintptr, *int, *int, *int, *int)
295
296// Queries the attach points and spans of @child inside the given `GtkGrid`.
297func (x *Grid) QueryChild(ChildVar *Widget, ColumnVar *int, RowVar *int, WidthVar *int, HeightVar *int) {
298
299 xGridQueryChild(x.GoPointer(), ChildVar.GoPointer(), ColumnVar, RowVar, WidthVar, HeightVar)
300
301}
302
303var xGridRemove func(uintptr, uintptr)
304
305// Removes a child from @grid.
306//
307// The child must have been added with
308// [method@Gtk.Grid.attach] or [method@Gtk.Grid.attach_next_to].
309func (x *Grid) Remove(ChildVar *Widget) {
310
311 xGridRemove(x.GoPointer(), ChildVar.GoPointer())
312
313}
314
315var xGridRemoveColumn func(uintptr, int)
316
317// Removes a column from the grid.
318//
319// Children that are placed in this column are removed,
320// spanning children that overlap this column have their
321// width reduced by one, and children after the column
322// are moved to the left.
323func (x *Grid) RemoveColumn(PositionVar int) {
324
325 xGridRemoveColumn(x.GoPointer(), PositionVar)
326
327}
328
329var xGridRemoveRow func(uintptr, int)
330
331// Removes a row from the grid.
332//
333// Children that are placed in this row are removed,
334// spanning children that overlap this row have their
335// height reduced by one, and children below the row
336// are moved up.
337func (x *Grid) RemoveRow(PositionVar int) {
338
339 xGridRemoveRow(x.GoPointer(), PositionVar)
340
341}
342
343var xGridSetBaselineRow func(uintptr, int)
344
345// Sets which row defines the global baseline for the entire grid.
346//
347// Each row in the grid can have its own local baseline, but only
348// one of those is global, meaning it will be the baseline in the
349// parent of the @grid.
350func (x *Grid) SetBaselineRow(RowVar int) {
351
352 xGridSetBaselineRow(x.GoPointer(), RowVar)
353
354}
355
356var xGridSetColumnHomogeneous func(uintptr, bool)
357
358// Sets whether all columns of @grid will have the same width.
359func (x *Grid) SetColumnHomogeneous(HomogeneousVar bool) {
360
361 xGridSetColumnHomogeneous(x.GoPointer(), HomogeneousVar)
362
363}
364
365var xGridSetColumnSpacing func(uintptr, uint)
366
367// Sets the amount of space between columns of @grid.
368func (x *Grid) SetColumnSpacing(SpacingVar uint) {
369
370 xGridSetColumnSpacing(x.GoPointer(), SpacingVar)
371
372}
373
374var xGridSetRowBaselinePosition func(uintptr, int, BaselinePosition)
375
376// Sets how the baseline should be positioned on @row of the
377// grid, in case that row is assigned more space than is requested.
378//
379// The default baseline position is %GTK_BASELINE_POSITION_CENTER.
380func (x *Grid) SetRowBaselinePosition(RowVar int, PosVar BaselinePosition) {
381
382 xGridSetRowBaselinePosition(x.GoPointer(), RowVar, PosVar)
383
384}
385
386var xGridSetRowHomogeneous func(uintptr, bool)
387
388// Sets whether all rows of @grid will have the same height.
389func (x *Grid) SetRowHomogeneous(HomogeneousVar bool) {
390
391 xGridSetRowHomogeneous(x.GoPointer(), HomogeneousVar)
392
393}
394
395var xGridSetRowSpacing func(uintptr, uint)
396
397// Sets the amount of space between rows of @grid.
398func (x *Grid) SetRowSpacing(SpacingVar uint) {
399
400 xGridSetRowSpacing(x.GoPointer(), SpacingVar)
401
402}
403
404func (c *Grid) GoPointer() uintptr {
405 if c == nil {
406 return 0
407 }
408 return c.Ptr
409}
410
411func (c *Grid) SetGoPointer(ptr uintptr) {
412 c.Ptr = ptr
413}
414
415// SetPropertyBaselineRow sets the "baseline-row" property.
416// The row to align to the baseline when valign is using baseline alignment.
417func (x *Grid) SetPropertyBaselineRow(value int) {
418 var v gobject.Value
419 v.Init(gobject.TypeIntVal)
420 v.SetInt(value)
421 x.SetProperty("baseline-row", &v)
422}
423
424// GetPropertyBaselineRow gets the "baseline-row" property.
425// The row to align to the baseline when valign is using baseline alignment.
426func (x *Grid) GetPropertyBaselineRow() int {
427 var v gobject.Value
428 x.GetProperty("baseline-row", &v)
429 return v.GetInt()
430}
431
432// SetPropertyColumnHomogeneous sets the "column-homogeneous" property.
433// If %TRUE, the columns are all the same width.
434func (x *Grid) SetPropertyColumnHomogeneous(value bool) {
435 var v gobject.Value
436 v.Init(gobject.TypeBooleanVal)
437 v.SetBoolean(value)
438 x.SetProperty("column-homogeneous", &v)
439}
440
441// GetPropertyColumnHomogeneous gets the "column-homogeneous" property.
442// If %TRUE, the columns are all the same width.
443func (x *Grid) GetPropertyColumnHomogeneous() bool {
444 var v gobject.Value
445 x.GetProperty("column-homogeneous", &v)
446 return v.GetBoolean()
447}
448
449// SetPropertyColumnSpacing sets the "column-spacing" property.
450// The amount of space between two consecutive columns.
451func (x *Grid) SetPropertyColumnSpacing(value int) {
452 var v gobject.Value
453 v.Init(gobject.TypeIntVal)
454 v.SetInt(value)
455 x.SetProperty("column-spacing", &v)
456}
457
458// GetPropertyColumnSpacing gets the "column-spacing" property.
459// The amount of space between two consecutive columns.
460func (x *Grid) GetPropertyColumnSpacing() int {
461 var v gobject.Value
462 x.GetProperty("column-spacing", &v)
463 return v.GetInt()
464}
465
466// SetPropertyRowHomogeneous sets the "row-homogeneous" property.
467// If %TRUE, the rows are all the same height.
468func (x *Grid) SetPropertyRowHomogeneous(value bool) {
469 var v gobject.Value
470 v.Init(gobject.TypeBooleanVal)
471 v.SetBoolean(value)
472 x.SetProperty("row-homogeneous", &v)
473}
474
475// GetPropertyRowHomogeneous gets the "row-homogeneous" property.
476// If %TRUE, the rows are all the same height.
477func (x *Grid) GetPropertyRowHomogeneous() bool {
478 var v gobject.Value
479 x.GetProperty("row-homogeneous", &v)
480 return v.GetBoolean()
481}
482
483// SetPropertyRowSpacing sets the "row-spacing" property.
484// The amount of space between two consecutive rows.
485func (x *Grid) SetPropertyRowSpacing(value int) {
486 var v gobject.Value
487 v.Init(gobject.TypeIntVal)
488 v.SetInt(value)
489 x.SetProperty("row-spacing", &v)
490}
491
492// GetPropertyRowSpacing gets the "row-spacing" property.
493// The amount of space between two consecutive rows.
494func (x *Grid) GetPropertyRowSpacing() int {
495 var v gobject.Value
496 x.GetProperty("row-spacing", &v)
497 return v.GetInt()
498}
499
500// Requests the user's screen reader to announce the given message.
501//
502// This kind of notification is useful for messages that
503// either have only a visual representation or that are not
504// exposed visually at all, e.g. a notification about a
505// successful operation.
506//
507// Also, by using this API, you can ensure that the message
508// does not interrupts the user's current screen reader output.
509func (x *Grid) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
510
511 XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
512
513}
514
515// Retrieves the accessible parent for an accessible object.
516//
517// This function returns `NULL` for top level widgets.
518func (x *Grid) GetAccessibleParent() *AccessibleBase {
519 var cls *AccessibleBase
520
521 cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
522
523 if cret == 0 {
524 return nil
525 }
526 cls = &AccessibleBase{}
527 cls.Ptr = cret
528 return cls
529}
530
531// Retrieves the accessible role of an accessible object.
532func (x *Grid) GetAccessibleRole() AccessibleRole {
533
534 cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
535 return cret
536}
537
538// Retrieves the implementation for the given accessible object.
539func (x *Grid) GetAtContext() *ATContext {
540 var cls *ATContext
541
542 cret := XGtkAccessibleGetAtContext(x.GoPointer())
543
544 if cret == 0 {
545 return nil
546 }
547 cls = &ATContext{}
548 cls.Ptr = cret
549 return cls
550}
551
552// Queries the coordinates and dimensions of this accessible
553//
554// This functionality can be overridden by `GtkAccessible`
555// implementations, e.g. to get the bounds from an ignored
556// child widget.
557func (x *Grid) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
558
559 cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
560 return cret
561}
562
563// Retrieves the first accessible child of an accessible object.
564func (x *Grid) GetFirstAccessibleChild() *AccessibleBase {
565 var cls *AccessibleBase
566
567 cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
568
569 if cret == 0 {
570 return nil
571 }
572 cls = &AccessibleBase{}
573 cls.Ptr = cret
574 return cls
575}
576
577// Retrieves the next accessible sibling of an accessible object
578func (x *Grid) GetNextAccessibleSibling() *AccessibleBase {
579 var cls *AccessibleBase
580
581 cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
582
583 if cret == 0 {
584 return nil
585 }
586 cls = &AccessibleBase{}
587 cls.Ptr = cret
588 return cls
589}
590
591// Queries a platform state, such as focus.
592//
593// This functionality can be overridden by `GtkAccessible`
594// implementations, e.g. to get platform state from an ignored
595// child widget, as is the case for `GtkText` wrappers.
596func (x *Grid) GetPlatformState(StateVar AccessiblePlatformState) bool {
597
598 cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
599 return cret
600}
601
602// Resets the accessible property to its default value.
603func (x *Grid) ResetProperty(PropertyVar AccessibleProperty) {
604
605 XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
606
607}
608
609// Resets the accessible relation to its default value.
610func (x *Grid) ResetRelation(RelationVar AccessibleRelation) {
611
612 XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
613
614}
615
616// Resets the accessible state to its default value.
617func (x *Grid) ResetState(StateVar AccessibleState) {
618
619 XGtkAccessibleResetState(x.GoPointer(), StateVar)
620
621}
622
623// Sets the parent and sibling of an accessible object.
624//
625// This function is meant to be used by accessible implementations that are
626// not part of the widget hierarchy, and but act as a logical bridge between
627// widgets. For instance, if a widget creates an object that holds metadata
628// for each child, and you want that object to implement the `GtkAccessible`
629// interface, you will use this function to ensure that the parent of each
630// child widget is the metadata object, and the parent of each metadata
631// object is the container widget.
632func (x *Grid) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
633
634 XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
635
636}
637
638// Updates the next accessible sibling.
639//
640// That might be useful when a new child of a custom accessible
641// is created, and it needs to be linked to a previous child.
642func (x *Grid) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
643
644 XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
645
646}
647
648// Informs ATs that the platform state has changed.
649//
650// This function should be used by `GtkAccessible` implementations that
651// have a platform state but are not widgets. Widgets handle platform
652// states automatically.
653func (x *Grid) UpdatePlatformState(StateVar AccessiblePlatformState) {
654
655 XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
656
657}
658
659// Updates a list of accessible properties.
660//
661// See the [enum@Gtk.AccessibleProperty] documentation for the
662// value types of accessible properties.
663//
664// This function should be called by `GtkWidget` types whenever
665// an accessible property change must be communicated to assistive
666// technologies.
667//
668// Example:
669// ```c
670// value = gtk_adjustment_get_value (adjustment);
671// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
672//
673// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
674// -1);
675//
676// ```
677func (x *Grid) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
678
679 XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
680
681}
682
683// Updates an array of accessible properties.
684//
685// This function should be called by `GtkWidget` types whenever an accessible
686// property change must be communicated to assistive technologies.
687//
688// This function is meant to be used by language bindings.
689func (x *Grid) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
690
691 XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
692
693}
694
695// Updates a list of accessible relations.
696//
697// This function should be called by `GtkWidget` types whenever an accessible
698// relation change must be communicated to assistive technologies.
699//
700// If the [enum@Gtk.AccessibleRelation] requires a list of references,
701// you should pass each reference individually, followed by `NULL`, e.g.
702//
703// ```c
704// gtk_accessible_update_relation (accessible,
705//
706// GTK_ACCESSIBLE_RELATION_CONTROLS,
707// ref1, NULL,
708// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
709// ref1, ref2, ref3, NULL,
710// -1);
711//
712// ```
713func (x *Grid) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
714
715 XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
716
717}
718
719// Updates an array of accessible relations.
720//
721// This function should be called by `GtkWidget` types whenever an accessible
722// relation change must be communicated to assistive technologies.
723//
724// This function is meant to be used by language bindings.
725func (x *Grid) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
726
727 XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
728
729}
730
731// Updates a list of accessible states.
732//
733// See the [enum@Gtk.AccessibleState] documentation for the
734// value types of accessible states.
735//
736// This function should be called by `GtkWidget` types whenever
737// an accessible state change must be communicated to assistive
738// technologies.
739//
740// Example:
741//
742// ```c
743// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
744// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
745//
746// GTK_ACCESSIBLE_STATE_CHECKED, value,
747// -1);
748//
749// ```
750func (x *Grid) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
751
752 XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
753
754}
755
756// Updates an array of accessible states.
757//
758// This function should be called by `GtkWidget` types whenever an accessible
759// state change must be communicated to assistive technologies.
760//
761// This function is meant to be used by language bindings.
762func (x *Grid) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
763
764 XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
765
766}
767
768// Gets the ID of the @buildable object.
769//
770// `GtkBuilder` sets the name based on the ID attribute
771// of the `<object>` tag used to construct the @buildable.
772func (x *Grid) GetBuildableId() string {
773
774 cret := XGtkBuildableGetBuildableId(x.GoPointer())
775 return cret
776}
777
778// Retrieves the orientation of the @orientable.
779func (x *Grid) GetOrientation() Orientation {
780
781 cret := XGtkOrientableGetOrientation(x.GoPointer())
782 return cret
783}
784
785// Sets the orientation of the @orientable.
786func (x *Grid) SetOrientation(OrientationVar Orientation) {
787
788 XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
789
790}
791
792func init() {
793 core.SetPackageName("GTK", "gtk4")
794 core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
795 var libs []uintptr
796 for _, libPath := range core.GetPaths("GTK") {
797 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
798 if err != nil {
799 panic(err)
800 }
801 libs = append(libs, lib)
802 }
803
804 core.PuregoSafeRegister(&xGridGLibType, libs, "gtk_grid_get_type")
805
806 core.PuregoSafeRegister(&xNewGrid, libs, "gtk_grid_new")
807
808 core.PuregoSafeRegister(&xGridAttach, libs, "gtk_grid_attach")
809 core.PuregoSafeRegister(&xGridAttachNextTo, libs, "gtk_grid_attach_next_to")
810 core.PuregoSafeRegister(&xGridGetBaselineRow, libs, "gtk_grid_get_baseline_row")
811 core.PuregoSafeRegister(&xGridGetChildAt, libs, "gtk_grid_get_child_at")
812 core.PuregoSafeRegister(&xGridGetColumnHomogeneous, libs, "gtk_grid_get_column_homogeneous")
813 core.PuregoSafeRegister(&xGridGetColumnSpacing, libs, "gtk_grid_get_column_spacing")
814 core.PuregoSafeRegister(&xGridGetRowBaselinePosition, libs, "gtk_grid_get_row_baseline_position")
815 core.PuregoSafeRegister(&xGridGetRowHomogeneous, libs, "gtk_grid_get_row_homogeneous")
816 core.PuregoSafeRegister(&xGridGetRowSpacing, libs, "gtk_grid_get_row_spacing")
817 core.PuregoSafeRegister(&xGridInsertColumn, libs, "gtk_grid_insert_column")
818 core.PuregoSafeRegister(&xGridInsertNextTo, libs, "gtk_grid_insert_next_to")
819 core.PuregoSafeRegister(&xGridInsertRow, libs, "gtk_grid_insert_row")
820 core.PuregoSafeRegister(&xGridQueryChild, libs, "gtk_grid_query_child")
821 core.PuregoSafeRegister(&xGridRemove, libs, "gtk_grid_remove")
822 core.PuregoSafeRegister(&xGridRemoveColumn, libs, "gtk_grid_remove_column")
823 core.PuregoSafeRegister(&xGridRemoveRow, libs, "gtk_grid_remove_row")
824 core.PuregoSafeRegister(&xGridSetBaselineRow, libs, "gtk_grid_set_baseline_row")
825 core.PuregoSafeRegister(&xGridSetColumnHomogeneous, libs, "gtk_grid_set_column_homogeneous")
826 core.PuregoSafeRegister(&xGridSetColumnSpacing, libs, "gtk_grid_set_column_spacing")
827 core.PuregoSafeRegister(&xGridSetRowBaselinePosition, libs, "gtk_grid_set_row_baseline_position")
828 core.PuregoSafeRegister(&xGridSetRowHomogeneous, libs, "gtk_grid_set_row_homogeneous")
829 core.PuregoSafeRegister(&xGridSetRowSpacing, libs, "gtk_grid_set_row_spacing")
830
831}