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/gio"
12 "github.com/bnema/puregotk/v4/glib"
13 "github.com/bnema/puregotk/v4/gobject"
14 "github.com/bnema/puregotk/v4/gobject/types"
15)
16
17// Called for list boxes that are bound to a `GListModel` with
18// gtk_list_box_bind_model() for each item that gets added to the model.
19//
20// If the widget returned is not a #GtkListBoxRow widget, then the widget
21// will be inserted as the child of an intermediate #GtkListBoxRow.
22type ListBoxCreateWidgetFunc func(uintptr, uintptr) uintptr
23
24// Will be called whenever the row changes or is added and lets you control
25// if the row should be visible or not.
26type ListBoxFilterFunc func(uintptr, uintptr) bool
27
28// A function used by gtk_list_box_selected_foreach().
29//
30// It will be called on every selected child of the @box.
31type ListBoxForeachFunc func(uintptr, uintptr, uintptr)
32
33// Compare two rows to determine which should be first.
34type ListBoxSortFunc func(uintptr, uintptr, uintptr) int
35
36// Whenever @row changes or which row is before @row changes this
37// is called, which lets you update the header on @row.
38//
39// You may remove or set a new one via [method@Gtk.ListBoxRow.set_header]
40// or just change the state of the current header widget.
41type ListBoxUpdateHeaderFunc func(uintptr, uintptr, uintptr)
42
43type ListBoxRowClass struct {
44 _ structs.HostLayout
45
46 ParentClass WidgetClass
47
48 xActivate uintptr
49
50 Padding [8]uintptr
51}
52
53func (x *ListBoxRowClass) GoPointer() uintptr {
54 return uintptr(unsafe.Pointer(x))
55}
56
57// OverrideActivate sets the "activate" callback function.
58func (x *ListBoxRowClass) OverrideActivate(cb func(*ListBoxRow)) {
59 if cb == nil {
60 x.xActivate = 0
61 } else {
62 x.xActivate = purego.NewCallback(func(RowVarp uintptr) {
63 cb(ListBoxRowNewFromInternalPtr(RowVarp))
64 })
65 }
66}
67
68// GetActivate gets the "activate" callback function.
69func (x *ListBoxRowClass) GetActivate() func(*ListBoxRow) {
70 if x.xActivate == 0 {
71 return nil
72 }
73 var rawCallback func(RowVarp uintptr)
74 purego.RegisterFunc(&rawCallback, x.xActivate)
75 return func(RowVar *ListBoxRow) {
76 rawCallback(RowVar.GoPointer())
77 }
78}
79
80// Shows a vertical list.
81//
82// <picture>
83//
84// <source srcset="list-box-dark.png" media="(prefers-color-scheme: dark)">
85// <img alt="An example GtkListBox" src="list-box.png">
86//
87// </picture>
88//
89// A `GtkListBox` only contains `GtkListBoxRow` children. These rows can
90// by dynamically sorted and filtered, and headers can be added dynamically
91// depending on the row content. It also allows keyboard and mouse navigation
92// and selection like a typical list.
93//
94// Using `GtkListBox` is often an alternative to `GtkTreeView`, especially
95// when the list contents has a more complicated layout than what is allowed
96// by a `GtkCellRenderer`, or when the contents is interactive (i.e. has a
97// button in it).
98//
99// Although a `GtkListBox` must have only `GtkListBoxRow` children, you can
100// add any kind of widget to it via [method@Gtk.ListBox.prepend],
101// [method@Gtk.ListBox.append] and [method@Gtk.ListBox.insert] and a
102// `GtkListBoxRow` widget will automatically be inserted between the list
103// and the widget.
104//
105// `GtkListBoxRows` can be marked as activatable or selectable. If a row is
106// activatable, [signal@Gtk.ListBox::row-activated] will be emitted for it when
107// the user tries to activate it. If it is selectable, the row will be marked
108// as selected when the user tries to select it.
109//
110// # GtkListBox as GtkBuildable
111//
112// The `GtkListBox` implementation of the `GtkBuildable` interface supports
113// setting a child as the placeholder by specifying “placeholder” as the “type”
114// attribute of a `<child>` element. See [method@Gtk.ListBox.set_placeholder]
115// for info.
116//
117// # Shortcuts and Gestures
118//
119// The following signals have default keybindings:
120//
121// - [signal@Gtk.ListBox::move-cursor]
122// - [signal@Gtk.ListBox::select-all]
123// - [signal@Gtk.ListBox::toggle-cursor-row]
124// - [signal@Gtk.ListBox::unselect-all]
125//
126// # CSS nodes
127//
128// ```
129// list[.separators][.rich-list][.navigation-sidebar][.boxed-list]
130// ╰── row[.activatable]
131// ```
132//
133// `GtkListBox` uses a single CSS node named list. It may carry the .separators
134// style class, when the [property@Gtk.ListBox:show-separators] property is set.
135// Each `GtkListBoxRow` uses a single CSS node named row. The row nodes get the
136// .activatable style class added when appropriate.
137//
138// It may also carry the .boxed-list style class. In this case, the list will be
139// automatically surrounded by a frame and have separators.
140//
141// The main list node may also carry style classes to select
142// the style of [list presentation](section-list-widget.html#list-styles):
143// .rich-list, .navigation-sidebar or .data-table.
144//
145// # Accessibility
146//
147// `GtkListBox` uses the [enum@Gtk.AccessibleRole.list] role and `GtkListBoxRow` uses
148// the [enum@Gtk.AccessibleRole.list_item] role.
149type ListBox struct {
150 Widget
151}
152
153var xListBoxGLibType func() types.GType
154
155func ListBoxGLibType() types.GType {
156 return xListBoxGLibType()
157}
158
159func ListBoxNewFromInternalPtr(ptr uintptr) *ListBox {
160 cls := &ListBox{}
161 cls.Ptr = ptr
162 return cls
163}
164
165var xNewListBox func() uintptr
166
167// Creates a new `GtkListBox` container.
168func NewListBox() *ListBox {
169 var cls *ListBox
170
171 cret := xNewListBox()
172
173 if cret == 0 {
174 return nil
175 }
176 gobject.IncreaseRef(cret)
177 cls = &ListBox{}
178 cls.Ptr = cret
179 return cls
180}
181
182var xListBoxAppend func(uintptr, uintptr)
183
184// Append a widget to the list.
185//
186// If a sort function is set, the widget will
187// actually be inserted at the calculated position.
188func (x *ListBox) Append(ChildVar *Widget) {
189
190 xListBoxAppend(x.GoPointer(), ChildVar.GoPointer())
191
192}
193
194var xListBoxBindModel func(uintptr, uintptr, uintptr, uintptr, uintptr)
195
196// Binds @model to @box.
197//
198// If @box was already bound to a model, that previous binding is
199// destroyed.
200//
201// The contents of @box are cleared and then filled with widgets that
202// represent items from @model. @box is updated whenever @model changes.
203// If @model is %NULL, @box is left empty.
204//
205// It is undefined to add or remove widgets directly (for example, with
206// [method@Gtk.ListBox.insert]) while @box is bound to a model.
207//
208// Note that using a model is incompatible with the filtering and sorting
209// functionality in `GtkListBox`. When using a model, filtering and sorting
210// should be implemented by the model.
211func (x *ListBox) BindModel(ModelVar gio.ListModel, CreateWidgetFuncVar *ListBoxCreateWidgetFunc, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) {
212
213 var CreateWidgetFuncVarRef uintptr
214 if CreateWidgetFuncVar != nil {
215 CreateWidgetFuncVarPtr := uintptr(unsafe.Pointer(CreateWidgetFuncVar))
216 if cbRefPtr, ok := glib.GetCallback(CreateWidgetFuncVarPtr); ok {
217 CreateWidgetFuncVarRef = cbRefPtr
218 } else {
219 fcb := func(arg0 uintptr, arg1 uintptr) uintptr {
220 cbFn := *CreateWidgetFuncVar
221 return cbFn(arg0, arg1)
222 }
223 CreateWidgetFuncVarRef = purego.NewCallback(fcb)
224 glib.SaveCallbackWithClosure(CreateWidgetFuncVarPtr, CreateWidgetFuncVarRef, CreateWidgetFuncVar)
225 }
226 }
227
228 var UserDataFreeFuncVarRef uintptr
229 if UserDataFreeFuncVar != nil {
230 UserDataFreeFuncVarPtr := uintptr(unsafe.Pointer(UserDataFreeFuncVar))
231 if cbRefPtr, ok := glib.GetCallback(UserDataFreeFuncVarPtr); ok {
232 UserDataFreeFuncVarRef = cbRefPtr
233 } else {
234 fcb := func(arg0 uintptr) {
235 cbFn := *UserDataFreeFuncVar
236 cbFn(arg0)
237 }
238 UserDataFreeFuncVarRef = purego.NewCallback(fcb)
239 glib.SaveCallbackWithClosure(UserDataFreeFuncVarPtr, UserDataFreeFuncVarRef, UserDataFreeFuncVar)
240 }
241 }
242
243 xListBoxBindModel(x.GoPointer(), ModelVar.GoPointer(), CreateWidgetFuncVarRef, UserDataVar, UserDataFreeFuncVarRef)
244
245}
246
247var xListBoxDragHighlightRow func(uintptr, uintptr)
248
249// Add a drag highlight to a row.
250//
251// This is a helper function for implementing DnD onto a `GtkListBox`.
252// The passed in @row will be highlighted by setting the
253// %GTK_STATE_FLAG_DROP_ACTIVE state and any previously highlighted
254// row will be unhighlighted.
255//
256// The row will also be unhighlighted when the widget gets
257// a drag leave event.
258func (x *ListBox) DragHighlightRow(RowVar *ListBoxRow) {
259
260 xListBoxDragHighlightRow(x.GoPointer(), RowVar.GoPointer())
261
262}
263
264var xListBoxDragUnhighlightRow func(uintptr)
265
266// If a row has previously been highlighted via gtk_list_box_drag_highlight_row(),
267// it will have the highlight removed.
268func (x *ListBox) DragUnhighlightRow() {
269
270 xListBoxDragUnhighlightRow(x.GoPointer())
271
272}
273
274var xListBoxGetActivateOnSingleClick func(uintptr) bool
275
276// Returns whether rows activate on single clicks.
277func (x *ListBox) GetActivateOnSingleClick() bool {
278
279 cret := xListBoxGetActivateOnSingleClick(x.GoPointer())
280 return cret
281}
282
283var xListBoxGetAdjustment func(uintptr) uintptr
284
285// Gets the adjustment (if any) that the widget uses to
286// for vertical scrolling.
287func (x *ListBox) GetAdjustment() *Adjustment {
288 var cls *Adjustment
289
290 cret := xListBoxGetAdjustment(x.GoPointer())
291
292 if cret == 0 {
293 return nil
294 }
295 gobject.IncreaseRef(cret)
296 cls = &Adjustment{}
297 cls.Ptr = cret
298 return cls
299}
300
301var xListBoxGetRowAtIndex func(uintptr, int) uintptr
302
303// Gets the n-th child in the list (not counting headers).
304//
305// If @index_ is negative or larger than the number of items in the
306// list, %NULL is returned.
307func (x *ListBox) GetRowAtIndex(IndexVar int) *ListBoxRow {
308 var cls *ListBoxRow
309
310 cret := xListBoxGetRowAtIndex(x.GoPointer(), IndexVar)
311
312 if cret == 0 {
313 return nil
314 }
315 gobject.IncreaseRef(cret)
316 cls = &ListBoxRow{}
317 cls.Ptr = cret
318 return cls
319}
320
321var xListBoxGetRowAtY func(uintptr, int) uintptr
322
323// Gets the row at the @y position.
324func (x *ListBox) GetRowAtY(YVar int) *ListBoxRow {
325 var cls *ListBoxRow
326
327 cret := xListBoxGetRowAtY(x.GoPointer(), YVar)
328
329 if cret == 0 {
330 return nil
331 }
332 gobject.IncreaseRef(cret)
333 cls = &ListBoxRow{}
334 cls.Ptr = cret
335 return cls
336}
337
338var xListBoxGetSelectedRow func(uintptr) uintptr
339
340// Gets the selected row, or %NULL if no rows are selected.
341//
342// Note that the box may allow multiple selection, in which
343// case you should use [method@Gtk.ListBox.selected_foreach] to
344// find all selected rows.
345func (x *ListBox) GetSelectedRow() *ListBoxRow {
346 var cls *ListBoxRow
347
348 cret := xListBoxGetSelectedRow(x.GoPointer())
349
350 if cret == 0 {
351 return nil
352 }
353 gobject.IncreaseRef(cret)
354 cls = &ListBoxRow{}
355 cls.Ptr = cret
356 return cls
357}
358
359var xListBoxGetSelectedRows func(uintptr) *glib.List
360
361// Creates a list of all selected children.
362func (x *ListBox) GetSelectedRows() *glib.List {
363
364 cret := xListBoxGetSelectedRows(x.GoPointer())
365 return cret
366}
367
368var xListBoxGetSelectionMode func(uintptr) SelectionMode
369
370// Gets the selection mode of the listbox.
371func (x *ListBox) GetSelectionMode() SelectionMode {
372
373 cret := xListBoxGetSelectionMode(x.GoPointer())
374 return cret
375}
376
377var xListBoxGetShowSeparators func(uintptr) bool
378
379// Returns whether the list box should show separators
380// between rows.
381func (x *ListBox) GetShowSeparators() bool {
382
383 cret := xListBoxGetShowSeparators(x.GoPointer())
384 return cret
385}
386
387var xListBoxGetTabBehavior func(uintptr) ListTabBehavior
388
389// Returns the behavior of the <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keys.
390func (x *ListBox) GetTabBehavior() ListTabBehavior {
391
392 cret := xListBoxGetTabBehavior(x.GoPointer())
393 return cret
394}
395
396var xListBoxInsert func(uintptr, uintptr, int)
397
398// Insert the @child into the @box at @position.
399//
400// If a sort function is
401// set, the widget will actually be inserted at the calculated position.
402//
403// If @position is -1, or larger than the total number of items in the
404// @box, then the @child will be appended to the end.
405func (x *ListBox) Insert(ChildVar *Widget, PositionVar int) {
406
407 xListBoxInsert(x.GoPointer(), ChildVar.GoPointer(), PositionVar)
408
409}
410
411var xListBoxInvalidateFilter func(uintptr)
412
413// Update the filtering for all rows.
414//
415// Call this when result
416// of the filter function on the @box is changed due
417// to an external factor. For instance, this would be used
418// if the filter function just looked for a specific search
419// string and the entry with the search string has changed.
420func (x *ListBox) InvalidateFilter() {
421
422 xListBoxInvalidateFilter(x.GoPointer())
423
424}
425
426var xListBoxInvalidateHeaders func(uintptr)
427
428// Update the separators for all rows.
429//
430// Call this when result
431// of the header function on the @box is changed due
432// to an external factor.
433func (x *ListBox) InvalidateHeaders() {
434
435 xListBoxInvalidateHeaders(x.GoPointer())
436
437}
438
439var xListBoxInvalidateSort func(uintptr)
440
441// Update the sorting for all rows.
442//
443// Call this when result
444// of the sort function on the @box is changed due
445// to an external factor.
446func (x *ListBox) InvalidateSort() {
447
448 xListBoxInvalidateSort(x.GoPointer())
449
450}
451
452var xListBoxPrepend func(uintptr, uintptr)
453
454// Prepend a widget to the list.
455//
456// If a sort function is set, the widget will
457// actually be inserted at the calculated position.
458func (x *ListBox) Prepend(ChildVar *Widget) {
459
460 xListBoxPrepend(x.GoPointer(), ChildVar.GoPointer())
461
462}
463
464var xListBoxRemove func(uintptr, uintptr)
465
466// Removes a child from @box.
467func (x *ListBox) Remove(ChildVar *Widget) {
468
469 xListBoxRemove(x.GoPointer(), ChildVar.GoPointer())
470
471}
472
473var xListBoxRemoveAll func(uintptr)
474
475// Removes all rows from @box.
476//
477// This function does nothing if @box is backed by a model.
478func (x *ListBox) RemoveAll() {
479
480 xListBoxRemoveAll(x.GoPointer())
481
482}
483
484var xListBoxSelectAll func(uintptr)
485
486// Select all children of @box, if the selection mode allows it.
487func (x *ListBox) SelectAll() {
488
489 xListBoxSelectAll(x.GoPointer())
490
491}
492
493var xListBoxSelectRow func(uintptr, uintptr)
494
495// Make @row the currently selected row.
496func (x *ListBox) SelectRow(RowVar *ListBoxRow) {
497
498 xListBoxSelectRow(x.GoPointer(), RowVar.GoPointer())
499
500}
501
502var xListBoxSelectedForeach func(uintptr, uintptr, uintptr)
503
504// Calls a function for each selected child.
505//
506// Note that the selection cannot be modified from within this function.
507func (x *ListBox) SelectedForeach(FuncVar *ListBoxForeachFunc, DataVar uintptr) {
508
509 var FuncVarRef uintptr
510 if FuncVar != nil {
511 FuncVarPtr := uintptr(unsafe.Pointer(FuncVar))
512 if cbRefPtr, ok := glib.GetCallback(FuncVarPtr); ok {
513 FuncVarRef = cbRefPtr
514 } else {
515 fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
516 cbFn := *FuncVar
517 cbFn(arg0, arg1, arg2)
518 }
519 FuncVarRef = purego.NewCallback(fcb)
520 glib.SaveCallbackWithClosure(FuncVarPtr, FuncVarRef, FuncVar)
521 }
522 }
523
524 xListBoxSelectedForeach(x.GoPointer(), FuncVarRef, DataVar)
525
526}
527
528var xListBoxSetActivateOnSingleClick func(uintptr, bool)
529
530// If @single is %TRUE, rows will be activated when you click on them,
531// otherwise you need to double-click.
532func (x *ListBox) SetActivateOnSingleClick(SingleVar bool) {
533
534 xListBoxSetActivateOnSingleClick(x.GoPointer(), SingleVar)
535
536}
537
538var xListBoxSetAdjustment func(uintptr, uintptr)
539
540// Sets the adjustment (if any) that the widget uses to
541// for vertical scrolling.
542//
543// For instance, this is used to get the page size for
544// PageUp/Down key handling.
545//
546// In the normal case when the @box is packed inside
547// a `GtkScrolledWindow` the adjustment from that will
548// be picked up automatically, so there is no need
549// to manually do that.
550func (x *ListBox) SetAdjustment(AdjustmentVar *Adjustment) {
551
552 xListBoxSetAdjustment(x.GoPointer(), AdjustmentVar.GoPointer())
553
554}
555
556var xListBoxSetFilterFunc func(uintptr, uintptr, uintptr, uintptr)
557
558// By setting a filter function on the @box one can decide dynamically which
559// of the rows to show.
560//
561// For instance, to implement a search function on a list that
562// filters the original list to only show the matching rows.
563//
564// The @filter_func will be called for each row after the call, and
565// it will continue to be called each time a row changes (via
566// [method@Gtk.ListBoxRow.changed]) or when [method@Gtk.ListBox.invalidate_filter]
567// is called.
568//
569// Note that using a filter function is incompatible with using a model
570// (see [method@Gtk.ListBox.bind_model]).
571func (x *ListBox) SetFilterFunc(FilterFuncVar *ListBoxFilterFunc, UserDataVar uintptr, DestroyVar *glib.DestroyNotify) {
572
573 var FilterFuncVarRef uintptr
574 if FilterFuncVar != nil {
575 FilterFuncVarPtr := uintptr(unsafe.Pointer(FilterFuncVar))
576 if cbRefPtr, ok := glib.GetCallback(FilterFuncVarPtr); ok {
577 FilterFuncVarRef = cbRefPtr
578 } else {
579 fcb := func(arg0 uintptr, arg1 uintptr) bool {
580 cbFn := *FilterFuncVar
581 return cbFn(arg0, arg1)
582 }
583 FilterFuncVarRef = purego.NewCallback(fcb)
584 glib.SaveCallbackWithClosure(FilterFuncVarPtr, FilterFuncVarRef, FilterFuncVar)
585 }
586 }
587
588 var DestroyVarRef uintptr
589 if DestroyVar != nil {
590 DestroyVarPtr := uintptr(unsafe.Pointer(DestroyVar))
591 if cbRefPtr, ok := glib.GetCallback(DestroyVarPtr); ok {
592 DestroyVarRef = cbRefPtr
593 } else {
594 fcb := func(arg0 uintptr) {
595 cbFn := *DestroyVar
596 cbFn(arg0)
597 }
598 DestroyVarRef = purego.NewCallback(fcb)
599 glib.SaveCallbackWithClosure(DestroyVarPtr, DestroyVarRef, DestroyVar)
600 }
601 }
602
603 xListBoxSetFilterFunc(x.GoPointer(), FilterFuncVarRef, UserDataVar, DestroyVarRef)
604
605}
606
607var xListBoxSetHeaderFunc func(uintptr, uintptr, uintptr, uintptr)
608
609// Sets a header function.
610//
611// By setting a header function on the @box one can dynamically add headers
612// in front of rows, depending on the contents of the row and its position
613// in the list.
614//
615// For instance, one could use it to add headers in front of the first item
616// of a new kind, in a list sorted by the kind.
617//
618// The @update_header can look at the current header widget using
619// [method@Gtk.ListBoxRow.get_header] and either update the state of the widget
620// as needed, or set a new one using [method@Gtk.ListBoxRow.set_header]. If no
621// header is needed, set the header to %NULL.
622//
623// Note that you may get many calls @update_header to this for a particular
624// row when e.g. changing things that don’t affect the header. In this case
625// it is important for performance to not blindly replace an existing header
626// with an identical one.
627//
628// The @update_header function will be called for each row after the call,
629// and it will continue to be called each time a row changes (via
630// [method@Gtk.ListBoxRow.changed]) and when the row before changes (either
631// by [method@Gtk.ListBoxRow.changed] on the previous row, or when the previous
632// row becomes a different row). It is also called for all rows when
633// [method@Gtk.ListBox.invalidate_headers] is called.
634func (x *ListBox) SetHeaderFunc(UpdateHeaderVar *ListBoxUpdateHeaderFunc, UserDataVar uintptr, DestroyVar *glib.DestroyNotify) {
635
636 var UpdateHeaderVarRef uintptr
637 if UpdateHeaderVar != nil {
638 UpdateHeaderVarPtr := uintptr(unsafe.Pointer(UpdateHeaderVar))
639 if cbRefPtr, ok := glib.GetCallback(UpdateHeaderVarPtr); ok {
640 UpdateHeaderVarRef = cbRefPtr
641 } else {
642 fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
643 cbFn := *UpdateHeaderVar
644 cbFn(arg0, arg1, arg2)
645 }
646 UpdateHeaderVarRef = purego.NewCallback(fcb)
647 glib.SaveCallbackWithClosure(UpdateHeaderVarPtr, UpdateHeaderVarRef, UpdateHeaderVar)
648 }
649 }
650
651 var DestroyVarRef uintptr
652 if DestroyVar != nil {
653 DestroyVarPtr := uintptr(unsafe.Pointer(DestroyVar))
654 if cbRefPtr, ok := glib.GetCallback(DestroyVarPtr); ok {
655 DestroyVarRef = cbRefPtr
656 } else {
657 fcb := func(arg0 uintptr) {
658 cbFn := *DestroyVar
659 cbFn(arg0)
660 }
661 DestroyVarRef = purego.NewCallback(fcb)
662 glib.SaveCallbackWithClosure(DestroyVarPtr, DestroyVarRef, DestroyVar)
663 }
664 }
665
666 xListBoxSetHeaderFunc(x.GoPointer(), UpdateHeaderVarRef, UserDataVar, DestroyVarRef)
667
668}
669
670var xListBoxSetPlaceholder func(uintptr, uintptr)
671
672// Sets the placeholder widget that is shown in the list when
673// it doesn't display any visible children.
674func (x *ListBox) SetPlaceholder(PlaceholderVar *Widget) {
675
676 xListBoxSetPlaceholder(x.GoPointer(), PlaceholderVar.GoPointer())
677
678}
679
680var xListBoxSetSelectionMode func(uintptr, SelectionMode)
681
682// Sets how selection works in the listbox.
683func (x *ListBox) SetSelectionMode(ModeVar SelectionMode) {
684
685 xListBoxSetSelectionMode(x.GoPointer(), ModeVar)
686
687}
688
689var xListBoxSetShowSeparators func(uintptr, bool)
690
691// Sets whether the list box should show separators
692// between rows.
693func (x *ListBox) SetShowSeparators(ShowSeparatorsVar bool) {
694
695 xListBoxSetShowSeparators(x.GoPointer(), ShowSeparatorsVar)
696
697}
698
699var xListBoxSetSortFunc func(uintptr, uintptr, uintptr, uintptr)
700
701// Sets a sort function.
702//
703// By setting a sort function on the @box one can dynamically reorder
704// the rows of the list, based on the contents of the rows.
705//
706// The @sort_func will be called for each row after the call, and will
707// continue to be called each time a row changes (via
708// [method@Gtk.ListBoxRow.changed]) and when [method@Gtk.ListBox.invalidate_sort]
709// is called.
710//
711// Note that using a sort function is incompatible with using a model
712// (see [method@Gtk.ListBox.bind_model]).
713func (x *ListBox) SetSortFunc(SortFuncVar *ListBoxSortFunc, UserDataVar uintptr, DestroyVar *glib.DestroyNotify) {
714
715 var SortFuncVarRef uintptr
716 if SortFuncVar != nil {
717 SortFuncVarPtr := uintptr(unsafe.Pointer(SortFuncVar))
718 if cbRefPtr, ok := glib.GetCallback(SortFuncVarPtr); ok {
719 SortFuncVarRef = cbRefPtr
720 } else {
721 fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) int {
722 cbFn := *SortFuncVar
723 return cbFn(arg0, arg1, arg2)
724 }
725 SortFuncVarRef = purego.NewCallback(fcb)
726 glib.SaveCallbackWithClosure(SortFuncVarPtr, SortFuncVarRef, SortFuncVar)
727 }
728 }
729
730 var DestroyVarRef uintptr
731 if DestroyVar != nil {
732 DestroyVarPtr := uintptr(unsafe.Pointer(DestroyVar))
733 if cbRefPtr, ok := glib.GetCallback(DestroyVarPtr); ok {
734 DestroyVarRef = cbRefPtr
735 } else {
736 fcb := func(arg0 uintptr) {
737 cbFn := *DestroyVar
738 cbFn(arg0)
739 }
740 DestroyVarRef = purego.NewCallback(fcb)
741 glib.SaveCallbackWithClosure(DestroyVarPtr, DestroyVarRef, DestroyVar)
742 }
743 }
744
745 xListBoxSetSortFunc(x.GoPointer(), SortFuncVarRef, UserDataVar, DestroyVarRef)
746
747}
748
749var xListBoxSetTabBehavior func(uintptr, ListTabBehavior)
750
751// Sets the behavior of the <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> keys.
752func (x *ListBox) SetTabBehavior(BehaviorVar ListTabBehavior) {
753
754 xListBoxSetTabBehavior(x.GoPointer(), BehaviorVar)
755
756}
757
758var xListBoxUnselectAll func(uintptr)
759
760// Unselect all children of @box, if the selection mode allows it.
761func (x *ListBox) UnselectAll() {
762
763 xListBoxUnselectAll(x.GoPointer())
764
765}
766
767var xListBoxUnselectRow func(uintptr, uintptr)
768
769// Unselects a single row of @box, if the selection mode allows it.
770func (x *ListBox) UnselectRow(RowVar *ListBoxRow) {
771
772 xListBoxUnselectRow(x.GoPointer(), RowVar.GoPointer())
773
774}
775
776func (c *ListBox) GoPointer() uintptr {
777 if c == nil {
778 return 0
779 }
780 return c.Ptr
781}
782
783func (c *ListBox) SetGoPointer(ptr uintptr) {
784 c.Ptr = ptr
785}
786
787// SetPropertyAcceptUnpairedRelease sets the "accept-unpaired-release" property.
788// Whether to accept unpaired release events.
789func (x *ListBox) SetPropertyAcceptUnpairedRelease(value bool) {
790 var v gobject.Value
791 v.Init(gobject.TypeBooleanVal)
792 v.SetBoolean(value)
793 x.SetProperty("accept-unpaired-release", &v)
794}
795
796// GetPropertyAcceptUnpairedRelease gets the "accept-unpaired-release" property.
797// Whether to accept unpaired release events.
798func (x *ListBox) GetPropertyAcceptUnpairedRelease() bool {
799 var v gobject.Value
800 x.GetProperty("accept-unpaired-release", &v)
801 return v.GetBoolean()
802}
803
804// SetPropertyActivateOnSingleClick sets the "activate-on-single-click" property.
805// Determines whether children can be activated with a single
806// click, or require a double-click.
807func (x *ListBox) SetPropertyActivateOnSingleClick(value bool) {
808 var v gobject.Value
809 v.Init(gobject.TypeBooleanVal)
810 v.SetBoolean(value)
811 x.SetProperty("activate-on-single-click", &v)
812}
813
814// GetPropertyActivateOnSingleClick gets the "activate-on-single-click" property.
815// Determines whether children can be activated with a single
816// click, or require a double-click.
817func (x *ListBox) GetPropertyActivateOnSingleClick() bool {
818 var v gobject.Value
819 x.GetProperty("activate-on-single-click", &v)
820 return v.GetBoolean()
821}
822
823// SetPropertyShowSeparators sets the "show-separators" property.
824// Whether to show separators between rows.
825func (x *ListBox) SetPropertyShowSeparators(value bool) {
826 var v gobject.Value
827 v.Init(gobject.TypeBooleanVal)
828 v.SetBoolean(value)
829 x.SetProperty("show-separators", &v)
830}
831
832// GetPropertyShowSeparators gets the "show-separators" property.
833// Whether to show separators between rows.
834func (x *ListBox) GetPropertyShowSeparators() bool {
835 var v gobject.Value
836 x.GetProperty("show-separators", &v)
837 return v.GetBoolean()
838}
839
840// Emitted when the cursor row is activated.
841func (x *ListBox) ConnectActivateCursorRow(cb *func(ListBox)) uint {
842 cbPtr := uintptr(unsafe.Pointer(cb))
843 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
844 handlerID := gobject.SignalConnect(x.GoPointer(), "activate-cursor-row", cbRefPtr)
845 glib.SaveHandlerMapping(handlerID, cbPtr)
846 return handlerID
847 }
848
849 fcb := func(clsPtr uintptr) {
850 fa := ListBox{}
851 fa.Ptr = clsPtr
852 cbFn := *cb
853
854 cbFn(fa)
855
856 }
857 cbRefPtr := purego.NewCallback(fcb)
858 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
859 handlerID := gobject.SignalConnect(x.GoPointer(), "activate-cursor-row", cbRefPtr)
860 glib.SaveHandlerMapping(handlerID, cbPtr)
861 return handlerID
862}
863
864// Emitted when the user initiates a cursor movement.
865//
866// The default bindings for this signal come in two variants, the variant with
867// the Shift modifier extends the selection, the variant without the Shift
868// modifier does not. There are too many key combinations to list them all
869// here.
870//
871// - <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd>
872// move by individual children
873// - <kbd>Home</kbd>, <kbd>End</kbd> move to the ends of the box
874// - <kbd>PgUp</kbd>, <kbd>PgDn</kbd> move vertically by pages
875func (x *ListBox) ConnectMoveCursor(cb *func(ListBox, MovementStep, int, bool, bool)) uint {
876 cbPtr := uintptr(unsafe.Pointer(cb))
877 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
878 handlerID := gobject.SignalConnect(x.GoPointer(), "move-cursor", cbRefPtr)
879 glib.SaveHandlerMapping(handlerID, cbPtr)
880 return handlerID
881 }
882
883 fcb := func(clsPtr uintptr, StepVarp MovementStep, CountVarp int, ExtendVarp bool, ModifyVarp bool) {
884 fa := ListBox{}
885 fa.Ptr = clsPtr
886 cbFn := *cb
887
888 cbFn(fa, StepVarp, CountVarp, ExtendVarp, ModifyVarp)
889
890 }
891 cbRefPtr := purego.NewCallback(fcb)
892 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
893 handlerID := gobject.SignalConnect(x.GoPointer(), "move-cursor", cbRefPtr)
894 glib.SaveHandlerMapping(handlerID, cbPtr)
895 return handlerID
896}
897
898// Emitted when a row has been activated by the user.
899func (x *ListBox) ConnectRowActivated(cb *func(ListBox, uintptr)) uint {
900 cbPtr := uintptr(unsafe.Pointer(cb))
901 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
902 handlerID := gobject.SignalConnect(x.GoPointer(), "row-activated", cbRefPtr)
903 glib.SaveHandlerMapping(handlerID, cbPtr)
904 return handlerID
905 }
906
907 fcb := func(clsPtr uintptr, RowVarp uintptr) {
908 fa := ListBox{}
909 fa.Ptr = clsPtr
910 cbFn := *cb
911
912 cbFn(fa, RowVarp)
913
914 }
915 cbRefPtr := purego.NewCallback(fcb)
916 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
917 handlerID := gobject.SignalConnect(x.GoPointer(), "row-activated", cbRefPtr)
918 glib.SaveHandlerMapping(handlerID, cbPtr)
919 return handlerID
920}
921
922// Emitted when a new row is selected, or (with a %NULL @row)
923// when the selection is cleared.
924//
925// When the @box is using %GTK_SELECTION_MULTIPLE, this signal will not
926// give you the full picture of selection changes, and you should use
927// the [signal@Gtk.ListBox::selected-rows-changed] signal instead.
928func (x *ListBox) ConnectRowSelected(cb *func(ListBox, uintptr)) uint {
929 cbPtr := uintptr(unsafe.Pointer(cb))
930 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
931 handlerID := gobject.SignalConnect(x.GoPointer(), "row-selected", cbRefPtr)
932 glib.SaveHandlerMapping(handlerID, cbPtr)
933 return handlerID
934 }
935
936 fcb := func(clsPtr uintptr, RowVarp uintptr) {
937 fa := ListBox{}
938 fa.Ptr = clsPtr
939 cbFn := *cb
940
941 cbFn(fa, RowVarp)
942
943 }
944 cbRefPtr := purego.NewCallback(fcb)
945 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
946 handlerID := gobject.SignalConnect(x.GoPointer(), "row-selected", cbRefPtr)
947 glib.SaveHandlerMapping(handlerID, cbPtr)
948 return handlerID
949}
950
951// Emitted to select all children of the box, if the selection
952// mode permits it.
953//
954// This is a [keybinding signal](class.SignalAction.html).
955//
956// The default binding for this signal is <kbd>Ctrl</kbd>-<kbd>a</kbd>.
957func (x *ListBox) ConnectSelectAll(cb *func(ListBox)) uint {
958 cbPtr := uintptr(unsafe.Pointer(cb))
959 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
960 handlerID := gobject.SignalConnect(x.GoPointer(), "select-all", cbRefPtr)
961 glib.SaveHandlerMapping(handlerID, cbPtr)
962 return handlerID
963 }
964
965 fcb := func(clsPtr uintptr) {
966 fa := ListBox{}
967 fa.Ptr = clsPtr
968 cbFn := *cb
969
970 cbFn(fa)
971
972 }
973 cbRefPtr := purego.NewCallback(fcb)
974 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
975 handlerID := gobject.SignalConnect(x.GoPointer(), "select-all", cbRefPtr)
976 glib.SaveHandlerMapping(handlerID, cbPtr)
977 return handlerID
978}
979
980// Emitted when the set of selected rows changes.
981func (x *ListBox) ConnectSelectedRowsChanged(cb *func(ListBox)) uint {
982 cbPtr := uintptr(unsafe.Pointer(cb))
983 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
984 handlerID := gobject.SignalConnect(x.GoPointer(), "selected-rows-changed", cbRefPtr)
985 glib.SaveHandlerMapping(handlerID, cbPtr)
986 return handlerID
987 }
988
989 fcb := func(clsPtr uintptr) {
990 fa := ListBox{}
991 fa.Ptr = clsPtr
992 cbFn := *cb
993
994 cbFn(fa)
995
996 }
997 cbRefPtr := purego.NewCallback(fcb)
998 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
999 handlerID := gobject.SignalConnect(x.GoPointer(), "selected-rows-changed", cbRefPtr)
1000 glib.SaveHandlerMapping(handlerID, cbPtr)
1001 return handlerID
1002}
1003
1004// Emitted when the cursor row is toggled.
1005//
1006// The default bindings for this signal is <kbd>Ctrl</kbd>+<kbd>␣</kbd>.
1007func (x *ListBox) ConnectToggleCursorRow(cb *func(ListBox)) uint {
1008 cbPtr := uintptr(unsafe.Pointer(cb))
1009 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1010 handlerID := gobject.SignalConnect(x.GoPointer(), "toggle-cursor-row", cbRefPtr)
1011 glib.SaveHandlerMapping(handlerID, cbPtr)
1012 return handlerID
1013 }
1014
1015 fcb := func(clsPtr uintptr) {
1016 fa := ListBox{}
1017 fa.Ptr = clsPtr
1018 cbFn := *cb
1019
1020 cbFn(fa)
1021
1022 }
1023 cbRefPtr := purego.NewCallback(fcb)
1024 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1025 handlerID := gobject.SignalConnect(x.GoPointer(), "toggle-cursor-row", cbRefPtr)
1026 glib.SaveHandlerMapping(handlerID, cbPtr)
1027 return handlerID
1028}
1029
1030// Emitted to unselect all children of the box, if the selection
1031// mode permits it.
1032//
1033// This is a [keybinding signal](class.SignalAction.html).
1034//
1035// The default binding for this signal is
1036// <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>a</kbd>.
1037func (x *ListBox) ConnectUnselectAll(cb *func(ListBox)) uint {
1038 cbPtr := uintptr(unsafe.Pointer(cb))
1039 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1040 handlerID := gobject.SignalConnect(x.GoPointer(), "unselect-all", cbRefPtr)
1041 glib.SaveHandlerMapping(handlerID, cbPtr)
1042 return handlerID
1043 }
1044
1045 fcb := func(clsPtr uintptr) {
1046 fa := ListBox{}
1047 fa.Ptr = clsPtr
1048 cbFn := *cb
1049
1050 cbFn(fa)
1051
1052 }
1053 cbRefPtr := purego.NewCallback(fcb)
1054 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1055 handlerID := gobject.SignalConnect(x.GoPointer(), "unselect-all", cbRefPtr)
1056 glib.SaveHandlerMapping(handlerID, cbPtr)
1057 return handlerID
1058}
1059
1060// Requests the user's screen reader to announce the given message.
1061//
1062// This kind of notification is useful for messages that
1063// either have only a visual representation or that are not
1064// exposed visually at all, e.g. a notification about a
1065// successful operation.
1066//
1067// Also, by using this API, you can ensure that the message
1068// does not interrupts the user's current screen reader output.
1069func (x *ListBox) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
1070
1071 XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
1072
1073}
1074
1075// Retrieves the accessible parent for an accessible object.
1076//
1077// This function returns `NULL` for top level widgets.
1078func (x *ListBox) GetAccessibleParent() *AccessibleBase {
1079 var cls *AccessibleBase
1080
1081 cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
1082
1083 if cret == 0 {
1084 return nil
1085 }
1086 cls = &AccessibleBase{}
1087 cls.Ptr = cret
1088 return cls
1089}
1090
1091// Retrieves the accessible role of an accessible object.
1092func (x *ListBox) GetAccessibleRole() AccessibleRole {
1093
1094 cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
1095 return cret
1096}
1097
1098// Retrieves the implementation for the given accessible object.
1099func (x *ListBox) GetAtContext() *ATContext {
1100 var cls *ATContext
1101
1102 cret := XGtkAccessibleGetAtContext(x.GoPointer())
1103
1104 if cret == 0 {
1105 return nil
1106 }
1107 cls = &ATContext{}
1108 cls.Ptr = cret
1109 return cls
1110}
1111
1112// Queries the coordinates and dimensions of this accessible
1113//
1114// This functionality can be overridden by `GtkAccessible`
1115// implementations, e.g. to get the bounds from an ignored
1116// child widget.
1117func (x *ListBox) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
1118
1119 cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
1120 return cret
1121}
1122
1123// Retrieves the first accessible child of an accessible object.
1124func (x *ListBox) GetFirstAccessibleChild() *AccessibleBase {
1125 var cls *AccessibleBase
1126
1127 cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
1128
1129 if cret == 0 {
1130 return nil
1131 }
1132 cls = &AccessibleBase{}
1133 cls.Ptr = cret
1134 return cls
1135}
1136
1137// Retrieves the next accessible sibling of an accessible object
1138func (x *ListBox) GetNextAccessibleSibling() *AccessibleBase {
1139 var cls *AccessibleBase
1140
1141 cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
1142
1143 if cret == 0 {
1144 return nil
1145 }
1146 cls = &AccessibleBase{}
1147 cls.Ptr = cret
1148 return cls
1149}
1150
1151// Queries a platform state, such as focus.
1152//
1153// This functionality can be overridden by `GtkAccessible`
1154// implementations, e.g. to get platform state from an ignored
1155// child widget, as is the case for `GtkText` wrappers.
1156func (x *ListBox) GetPlatformState(StateVar AccessiblePlatformState) bool {
1157
1158 cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
1159 return cret
1160}
1161
1162// Resets the accessible property to its default value.
1163func (x *ListBox) ResetProperty(PropertyVar AccessibleProperty) {
1164
1165 XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
1166
1167}
1168
1169// Resets the accessible relation to its default value.
1170func (x *ListBox) ResetRelation(RelationVar AccessibleRelation) {
1171
1172 XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
1173
1174}
1175
1176// Resets the accessible state to its default value.
1177func (x *ListBox) ResetState(StateVar AccessibleState) {
1178
1179 XGtkAccessibleResetState(x.GoPointer(), StateVar)
1180
1181}
1182
1183// Sets the parent and sibling of an accessible object.
1184//
1185// This function is meant to be used by accessible implementations that are
1186// not part of the widget hierarchy, and but act as a logical bridge between
1187// widgets. For instance, if a widget creates an object that holds metadata
1188// for each child, and you want that object to implement the `GtkAccessible`
1189// interface, you will use this function to ensure that the parent of each
1190// child widget is the metadata object, and the parent of each metadata
1191// object is the container widget.
1192func (x *ListBox) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
1193
1194 XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
1195
1196}
1197
1198// Updates the next accessible sibling.
1199//
1200// That might be useful when a new child of a custom accessible
1201// is created, and it needs to be linked to a previous child.
1202func (x *ListBox) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
1203
1204 XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
1205
1206}
1207
1208// Informs ATs that the platform state has changed.
1209//
1210// This function should be used by `GtkAccessible` implementations that
1211// have a platform state but are not widgets. Widgets handle platform
1212// states automatically.
1213func (x *ListBox) UpdatePlatformState(StateVar AccessiblePlatformState) {
1214
1215 XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
1216
1217}
1218
1219// Updates a list of accessible properties.
1220//
1221// See the [enum@Gtk.AccessibleProperty] documentation for the
1222// value types of accessible properties.
1223//
1224// This function should be called by `GtkWidget` types whenever
1225// an accessible property change must be communicated to assistive
1226// technologies.
1227//
1228// Example:
1229// ```c
1230// value = gtk_adjustment_get_value (adjustment);
1231// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
1232//
1233// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
1234// -1);
1235//
1236// ```
1237func (x *ListBox) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
1238
1239 XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
1240
1241}
1242
1243// Updates an array of accessible properties.
1244//
1245// This function should be called by `GtkWidget` types whenever an accessible
1246// property change must be communicated to assistive technologies.
1247//
1248// This function is meant to be used by language bindings.
1249func (x *ListBox) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
1250
1251 XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
1252
1253}
1254
1255// Updates a list of accessible relations.
1256//
1257// This function should be called by `GtkWidget` types whenever an accessible
1258// relation change must be communicated to assistive technologies.
1259//
1260// If the [enum@Gtk.AccessibleRelation] requires a list of references,
1261// you should pass each reference individually, followed by `NULL`, e.g.
1262//
1263// ```c
1264// gtk_accessible_update_relation (accessible,
1265//
1266// GTK_ACCESSIBLE_RELATION_CONTROLS,
1267// ref1, NULL,
1268// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
1269// ref1, ref2, ref3, NULL,
1270// -1);
1271//
1272// ```
1273func (x *ListBox) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
1274
1275 XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
1276
1277}
1278
1279// Updates an array of accessible relations.
1280//
1281// This function should be called by `GtkWidget` types whenever an accessible
1282// relation change must be communicated to assistive technologies.
1283//
1284// This function is meant to be used by language bindings.
1285func (x *ListBox) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
1286
1287 XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
1288
1289}
1290
1291// Updates a list of accessible states.
1292//
1293// See the [enum@Gtk.AccessibleState] documentation for the
1294// value types of accessible states.
1295//
1296// This function should be called by `GtkWidget` types whenever
1297// an accessible state change must be communicated to assistive
1298// technologies.
1299//
1300// Example:
1301//
1302// ```c
1303// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
1304// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
1305//
1306// GTK_ACCESSIBLE_STATE_CHECKED, value,
1307// -1);
1308//
1309// ```
1310func (x *ListBox) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
1311
1312 XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
1313
1314}
1315
1316// Updates an array of accessible states.
1317//
1318// This function should be called by `GtkWidget` types whenever an accessible
1319// state change must be communicated to assistive technologies.
1320//
1321// This function is meant to be used by language bindings.
1322func (x *ListBox) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
1323
1324 XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
1325
1326}
1327
1328// Gets the ID of the @buildable object.
1329//
1330// `GtkBuilder` sets the name based on the ID attribute
1331// of the `<object>` tag used to construct the @buildable.
1332func (x *ListBox) GetBuildableId() string {
1333
1334 cret := XGtkBuildableGetBuildableId(x.GoPointer())
1335 return cret
1336}
1337
1338// The kind of widget that can be added to a `GtkListBox`.
1339//
1340// [class@Gtk.ListBox] will automatically wrap its children in a `GtkListboxRow`
1341// when necessary.
1342type ListBoxRow struct {
1343 Widget
1344}
1345
1346var xListBoxRowGLibType func() types.GType
1347
1348func ListBoxRowGLibType() types.GType {
1349 return xListBoxRowGLibType()
1350}
1351
1352func ListBoxRowNewFromInternalPtr(ptr uintptr) *ListBoxRow {
1353 cls := &ListBoxRow{}
1354 cls.Ptr = ptr
1355 return cls
1356}
1357
1358var xNewListBoxRow func() uintptr
1359
1360// Creates a new `GtkListBoxRow`.
1361func NewListBoxRow() *ListBoxRow {
1362 var cls *ListBoxRow
1363
1364 cret := xNewListBoxRow()
1365
1366 if cret == 0 {
1367 return nil
1368 }
1369 gobject.IncreaseRef(cret)
1370 cls = &ListBoxRow{}
1371 cls.Ptr = cret
1372 return cls
1373}
1374
1375var xListBoxRowChanged func(uintptr)
1376
1377// Marks @row as changed, causing any state that depends on this
1378// to be updated.
1379//
1380// This affects sorting, filtering and headers.
1381//
1382// Note that calls to this method must be in sync with the data
1383// used for the row functions. For instance, if the list is
1384// mirroring some external data set, and *two* rows changed in the
1385// external data set then when you call gtk_list_box_row_changed()
1386// on the first row the sort function must only read the new data
1387// for the first of the two changed rows, otherwise the resorting
1388// of the rows will be wrong.
1389//
1390// This generally means that if you don’t fully control the data
1391// model you have to duplicate the data that affects the listbox
1392// row functions into the row widgets themselves. Another alternative
1393// is to call [method@Gtk.ListBox.invalidate_sort] on any model change,
1394// but that is more expensive.
1395func (x *ListBoxRow) Changed() {
1396
1397 xListBoxRowChanged(x.GoPointer())
1398
1399}
1400
1401var xListBoxRowGetActivatable func(uintptr) bool
1402
1403// Gets whether the row is activatable.
1404func (x *ListBoxRow) GetActivatable() bool {
1405
1406 cret := xListBoxRowGetActivatable(x.GoPointer())
1407 return cret
1408}
1409
1410var xListBoxRowGetChild func(uintptr) uintptr
1411
1412// Gets the child widget of @row.
1413func (x *ListBoxRow) GetChild() *Widget {
1414 var cls *Widget
1415
1416 cret := xListBoxRowGetChild(x.GoPointer())
1417
1418 if cret == 0 {
1419 return nil
1420 }
1421 gobject.IncreaseRef(cret)
1422 cls = &Widget{}
1423 cls.Ptr = cret
1424 return cls
1425}
1426
1427var xListBoxRowGetHeader func(uintptr) uintptr
1428
1429// Returns the current header of the @row.
1430//
1431// This can be used
1432// in a [callback@Gtk.ListBoxUpdateHeaderFunc] to see if
1433// there is a header set already, and if so to update
1434// the state of it.
1435func (x *ListBoxRow) GetHeader() *Widget {
1436 var cls *Widget
1437
1438 cret := xListBoxRowGetHeader(x.GoPointer())
1439
1440 if cret == 0 {
1441 return nil
1442 }
1443 gobject.IncreaseRef(cret)
1444 cls = &Widget{}
1445 cls.Ptr = cret
1446 return cls
1447}
1448
1449var xListBoxRowGetIndex func(uintptr) int
1450
1451// Gets the current index of the @row in its `GtkListBox` container.
1452func (x *ListBoxRow) GetIndex() int {
1453
1454 cret := xListBoxRowGetIndex(x.GoPointer())
1455 return cret
1456}
1457
1458var xListBoxRowGetSelectable func(uintptr) bool
1459
1460// Gets whether the row can be selected.
1461func (x *ListBoxRow) GetSelectable() bool {
1462
1463 cret := xListBoxRowGetSelectable(x.GoPointer())
1464 return cret
1465}
1466
1467var xListBoxRowIsSelected func(uintptr) bool
1468
1469// Returns whether the child is currently selected in its
1470// `GtkListBox` container.
1471func (x *ListBoxRow) IsSelected() bool {
1472
1473 cret := xListBoxRowIsSelected(x.GoPointer())
1474 return cret
1475}
1476
1477var xListBoxRowSetActivatable func(uintptr, bool)
1478
1479// Set whether the row is activatable.
1480func (x *ListBoxRow) SetActivatable(ActivatableVar bool) {
1481
1482 xListBoxRowSetActivatable(x.GoPointer(), ActivatableVar)
1483
1484}
1485
1486var xListBoxRowSetChild func(uintptr, uintptr)
1487
1488// Sets the child widget of @self.
1489func (x *ListBoxRow) SetChild(ChildVar *Widget) {
1490
1491 xListBoxRowSetChild(x.GoPointer(), ChildVar.GoPointer())
1492
1493}
1494
1495var xListBoxRowSetHeader func(uintptr, uintptr)
1496
1497// Sets the current header of the @row.
1498//
1499// This is only allowed to be called
1500// from a [callback@Gtk.ListBoxUpdateHeaderFunc].
1501// It will replace any existing header in the row,
1502// and be shown in front of the row in the listbox.
1503func (x *ListBoxRow) SetHeader(HeaderVar *Widget) {
1504
1505 xListBoxRowSetHeader(x.GoPointer(), HeaderVar.GoPointer())
1506
1507}
1508
1509var xListBoxRowSetSelectable func(uintptr, bool)
1510
1511// Set whether the row can be selected.
1512func (x *ListBoxRow) SetSelectable(SelectableVar bool) {
1513
1514 xListBoxRowSetSelectable(x.GoPointer(), SelectableVar)
1515
1516}
1517
1518func (c *ListBoxRow) GoPointer() uintptr {
1519 if c == nil {
1520 return 0
1521 }
1522 return c.Ptr
1523}
1524
1525func (c *ListBoxRow) SetGoPointer(ptr uintptr) {
1526 c.Ptr = ptr
1527}
1528
1529// SetPropertyActivatable sets the "activatable" property.
1530// Determines whether the ::row-activated
1531// signal will be emitted for this row.
1532func (x *ListBoxRow) SetPropertyActivatable(value bool) {
1533 var v gobject.Value
1534 v.Init(gobject.TypeBooleanVal)
1535 v.SetBoolean(value)
1536 x.SetProperty("activatable", &v)
1537}
1538
1539// GetPropertyActivatable gets the "activatable" property.
1540// Determines whether the ::row-activated
1541// signal will be emitted for this row.
1542func (x *ListBoxRow) GetPropertyActivatable() bool {
1543 var v gobject.Value
1544 x.GetProperty("activatable", &v)
1545 return v.GetBoolean()
1546}
1547
1548// SetPropertySelectable sets the "selectable" property.
1549// Determines whether this row can be selected.
1550func (x *ListBoxRow) SetPropertySelectable(value bool) {
1551 var v gobject.Value
1552 v.Init(gobject.TypeBooleanVal)
1553 v.SetBoolean(value)
1554 x.SetProperty("selectable", &v)
1555}
1556
1557// GetPropertySelectable gets the "selectable" property.
1558// Determines whether this row can be selected.
1559func (x *ListBoxRow) GetPropertySelectable() bool {
1560 var v gobject.Value
1561 x.GetProperty("selectable", &v)
1562 return v.GetBoolean()
1563}
1564
1565// This is a keybinding signal, which will cause this row to be activated.
1566//
1567// If you want to be notified when the user activates a row (by key or not),
1568// use the [signal@Gtk.ListBox::row-activated] signal on the row’s parent
1569// `GtkListBox`.
1570func (x *ListBoxRow) ConnectActivate(cb *func(ListBoxRow)) uint {
1571 cbPtr := uintptr(unsafe.Pointer(cb))
1572 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1573 handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr)
1574 glib.SaveHandlerMapping(handlerID, cbPtr)
1575 return handlerID
1576 }
1577
1578 fcb := func(clsPtr uintptr) {
1579 fa := ListBoxRow{}
1580 fa.Ptr = clsPtr
1581 cbFn := *cb
1582
1583 cbFn(fa)
1584
1585 }
1586 cbRefPtr := purego.NewCallback(fcb)
1587 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1588 handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr)
1589 glib.SaveHandlerMapping(handlerID, cbPtr)
1590 return handlerID
1591}
1592
1593// Requests the user's screen reader to announce the given message.
1594//
1595// This kind of notification is useful for messages that
1596// either have only a visual representation or that are not
1597// exposed visually at all, e.g. a notification about a
1598// successful operation.
1599//
1600// Also, by using this API, you can ensure that the message
1601// does not interrupts the user's current screen reader output.
1602func (x *ListBoxRow) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
1603
1604 XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
1605
1606}
1607
1608// Retrieves the accessible parent for an accessible object.
1609//
1610// This function returns `NULL` for top level widgets.
1611func (x *ListBoxRow) GetAccessibleParent() *AccessibleBase {
1612 var cls *AccessibleBase
1613
1614 cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
1615
1616 if cret == 0 {
1617 return nil
1618 }
1619 cls = &AccessibleBase{}
1620 cls.Ptr = cret
1621 return cls
1622}
1623
1624// Retrieves the accessible role of an accessible object.
1625func (x *ListBoxRow) GetAccessibleRole() AccessibleRole {
1626
1627 cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
1628 return cret
1629}
1630
1631// Retrieves the implementation for the given accessible object.
1632func (x *ListBoxRow) GetAtContext() *ATContext {
1633 var cls *ATContext
1634
1635 cret := XGtkAccessibleGetAtContext(x.GoPointer())
1636
1637 if cret == 0 {
1638 return nil
1639 }
1640 cls = &ATContext{}
1641 cls.Ptr = cret
1642 return cls
1643}
1644
1645// Queries the coordinates and dimensions of this accessible
1646//
1647// This functionality can be overridden by `GtkAccessible`
1648// implementations, e.g. to get the bounds from an ignored
1649// child widget.
1650func (x *ListBoxRow) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
1651
1652 cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
1653 return cret
1654}
1655
1656// Retrieves the first accessible child of an accessible object.
1657func (x *ListBoxRow) GetFirstAccessibleChild() *AccessibleBase {
1658 var cls *AccessibleBase
1659
1660 cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
1661
1662 if cret == 0 {
1663 return nil
1664 }
1665 cls = &AccessibleBase{}
1666 cls.Ptr = cret
1667 return cls
1668}
1669
1670// Retrieves the next accessible sibling of an accessible object
1671func (x *ListBoxRow) GetNextAccessibleSibling() *AccessibleBase {
1672 var cls *AccessibleBase
1673
1674 cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
1675
1676 if cret == 0 {
1677 return nil
1678 }
1679 cls = &AccessibleBase{}
1680 cls.Ptr = cret
1681 return cls
1682}
1683
1684// Queries a platform state, such as focus.
1685//
1686// This functionality can be overridden by `GtkAccessible`
1687// implementations, e.g. to get platform state from an ignored
1688// child widget, as is the case for `GtkText` wrappers.
1689func (x *ListBoxRow) GetPlatformState(StateVar AccessiblePlatformState) bool {
1690
1691 cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
1692 return cret
1693}
1694
1695// Resets the accessible property to its default value.
1696func (x *ListBoxRow) ResetProperty(PropertyVar AccessibleProperty) {
1697
1698 XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
1699
1700}
1701
1702// Resets the accessible relation to its default value.
1703func (x *ListBoxRow) ResetRelation(RelationVar AccessibleRelation) {
1704
1705 XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
1706
1707}
1708
1709// Resets the accessible state to its default value.
1710func (x *ListBoxRow) ResetState(StateVar AccessibleState) {
1711
1712 XGtkAccessibleResetState(x.GoPointer(), StateVar)
1713
1714}
1715
1716// Sets the parent and sibling of an accessible object.
1717//
1718// This function is meant to be used by accessible implementations that are
1719// not part of the widget hierarchy, and but act as a logical bridge between
1720// widgets. For instance, if a widget creates an object that holds metadata
1721// for each child, and you want that object to implement the `GtkAccessible`
1722// interface, you will use this function to ensure that the parent of each
1723// child widget is the metadata object, and the parent of each metadata
1724// object is the container widget.
1725func (x *ListBoxRow) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
1726
1727 XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
1728
1729}
1730
1731// Updates the next accessible sibling.
1732//
1733// That might be useful when a new child of a custom accessible
1734// is created, and it needs to be linked to a previous child.
1735func (x *ListBoxRow) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
1736
1737 XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
1738
1739}
1740
1741// Informs ATs that the platform state has changed.
1742//
1743// This function should be used by `GtkAccessible` implementations that
1744// have a platform state but are not widgets. Widgets handle platform
1745// states automatically.
1746func (x *ListBoxRow) UpdatePlatformState(StateVar AccessiblePlatformState) {
1747
1748 XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
1749
1750}
1751
1752// Updates a list of accessible properties.
1753//
1754// See the [enum@Gtk.AccessibleProperty] documentation for the
1755// value types of accessible properties.
1756//
1757// This function should be called by `GtkWidget` types whenever
1758// an accessible property change must be communicated to assistive
1759// technologies.
1760//
1761// Example:
1762// ```c
1763// value = gtk_adjustment_get_value (adjustment);
1764// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
1765//
1766// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
1767// -1);
1768//
1769// ```
1770func (x *ListBoxRow) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
1771
1772 XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
1773
1774}
1775
1776// Updates an array of accessible properties.
1777//
1778// This function should be called by `GtkWidget` types whenever an accessible
1779// property change must be communicated to assistive technologies.
1780//
1781// This function is meant to be used by language bindings.
1782func (x *ListBoxRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
1783
1784 XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
1785
1786}
1787
1788// Updates a list of accessible relations.
1789//
1790// This function should be called by `GtkWidget` types whenever an accessible
1791// relation change must be communicated to assistive technologies.
1792//
1793// If the [enum@Gtk.AccessibleRelation] requires a list of references,
1794// you should pass each reference individually, followed by `NULL`, e.g.
1795//
1796// ```c
1797// gtk_accessible_update_relation (accessible,
1798//
1799// GTK_ACCESSIBLE_RELATION_CONTROLS,
1800// ref1, NULL,
1801// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
1802// ref1, ref2, ref3, NULL,
1803// -1);
1804//
1805// ```
1806func (x *ListBoxRow) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
1807
1808 XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
1809
1810}
1811
1812// Updates an array of accessible relations.
1813//
1814// This function should be called by `GtkWidget` types whenever an accessible
1815// relation change must be communicated to assistive technologies.
1816//
1817// This function is meant to be used by language bindings.
1818func (x *ListBoxRow) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
1819
1820 XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
1821
1822}
1823
1824// Updates a list of accessible states.
1825//
1826// See the [enum@Gtk.AccessibleState] documentation for the
1827// value types of accessible states.
1828//
1829// This function should be called by `GtkWidget` types whenever
1830// an accessible state change must be communicated to assistive
1831// technologies.
1832//
1833// Example:
1834//
1835// ```c
1836// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
1837// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
1838//
1839// GTK_ACCESSIBLE_STATE_CHECKED, value,
1840// -1);
1841//
1842// ```
1843func (x *ListBoxRow) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
1844
1845 XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
1846
1847}
1848
1849// Updates an array of accessible states.
1850//
1851// This function should be called by `GtkWidget` types whenever an accessible
1852// state change must be communicated to assistive technologies.
1853//
1854// This function is meant to be used by language bindings.
1855func (x *ListBoxRow) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
1856
1857 XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
1858
1859}
1860
1861// Gets the action name for @actionable.
1862func (x *ListBoxRow) GetActionName() string {
1863
1864 cret := XGtkActionableGetActionName(x.GoPointer())
1865 return cret
1866}
1867
1868// Gets the current target value of @actionable.
1869func (x *ListBoxRow) GetActionTargetValue() *glib.Variant {
1870
1871 cret := XGtkActionableGetActionTargetValue(x.GoPointer())
1872 return cret
1873}
1874
1875// Specifies the name of the action with which this widget should be
1876// associated.
1877//
1878// If @action_name is %NULL then the widget will be unassociated from
1879// any previous action.
1880//
1881// Usually this function is used when the widget is located (or will be
1882// located) within the hierarchy of a `GtkApplicationWindow`.
1883//
1884// Names are of the form “win.save” or “app.quit” for actions on the
1885// containing [class@ApplicationWindow] or its associated [class@Application],
1886// respectively. This is the same form used for actions in the [class@Gio.Menu]
1887// associated with the window.
1888func (x *ListBoxRow) SetActionName(ActionNameVar *string) {
1889
1890 ActionNameVarPtr := core.GStrdupNullable(ActionNameVar)
1891 defer core.GFreeNullable(ActionNameVarPtr)
1892
1893 XGtkActionableSetActionName(x.GoPointer(), ActionNameVarPtr)
1894
1895}
1896
1897// Sets the target of an actionable widget.
1898//
1899// This is a convenience function that calls [ctor@GLib.Variant.new] for
1900// @format_string and uses the result to call
1901// [method@Gtk.Actionable.set_action_target_value].
1902//
1903// If you are setting a string-valued target and want to set
1904// the action name at the same time, you can use
1905// [method@Gtk.Actionable.set_detailed_action_name].
1906func (x *ListBoxRow) SetActionTarget(FormatStringVar string, varArgs ...interface{}) {
1907
1908 XGtkActionableSetActionTarget(x.GoPointer(), FormatStringVar, varArgs...)
1909
1910}
1911
1912// Sets the target value of an actionable widget.
1913//
1914// If @target_value is %NULL then the target value is unset.
1915//
1916// The target value has two purposes. First, it is used as the parameter
1917// to activation of the action associated with the `GtkActionable` widget.
1918// Second, it is used to determine if the widget should be rendered as
1919// “active” — the widget is active if the state is equal to the given target.
1920//
1921// Consider the example of associating a set of buttons with a [iface@Gio.Action]
1922// with string state in a typical “radio button” situation. Each button
1923// will be associated with the same action, but with a different target
1924// value for that action. Clicking on a particular button will activate
1925// the action with the target of that button, which will typically cause
1926// the action’s state to change to that value. Since the action’s state
1927// is now equal to the target value of the button, the button will now
1928// be rendered as active (and the other buttons, with different targets,
1929// rendered inactive).
1930func (x *ListBoxRow) SetActionTargetValue(TargetValueVar *glib.Variant) {
1931
1932 XGtkActionableSetActionTargetValue(x.GoPointer(), TargetValueVar)
1933
1934}
1935
1936// Sets the action-name and associated string target value of an
1937// actionable widget.
1938//
1939// @detailed_action_name is a string in the format accepted by
1940// [func@Gio.Action.parse_detailed_name].
1941func (x *ListBoxRow) SetDetailedActionName(DetailedActionNameVar string) {
1942
1943 XGtkActionableSetDetailedActionName(x.GoPointer(), DetailedActionNameVar)
1944
1945}
1946
1947// Gets the ID of the @buildable object.
1948//
1949// `GtkBuilder` sets the name based on the ID attribute
1950// of the `<object>` tag used to construct the @buildable.
1951func (x *ListBoxRow) GetBuildableId() string {
1952
1953 cret := XGtkBuildableGetBuildableId(x.GoPointer())
1954 return cret
1955}
1956
1957func init() {
1958 core.SetPackageName("GTK", "gtk4")
1959 core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
1960 var libs []uintptr
1961 for _, libPath := range core.GetPaths("GTK") {
1962 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
1963 if err != nil {
1964 panic(err)
1965 }
1966 libs = append(libs, lib)
1967 }
1968
1969 core.PuregoSafeRegister(&xListBoxGLibType, libs, "gtk_list_box_get_type")
1970
1971 core.PuregoSafeRegister(&xNewListBox, libs, "gtk_list_box_new")
1972
1973 core.PuregoSafeRegister(&xListBoxAppend, libs, "gtk_list_box_append")
1974 core.PuregoSafeRegister(&xListBoxBindModel, libs, "gtk_list_box_bind_model")
1975 core.PuregoSafeRegister(&xListBoxDragHighlightRow, libs, "gtk_list_box_drag_highlight_row")
1976 core.PuregoSafeRegister(&xListBoxDragUnhighlightRow, libs, "gtk_list_box_drag_unhighlight_row")
1977 core.PuregoSafeRegister(&xListBoxGetActivateOnSingleClick, libs, "gtk_list_box_get_activate_on_single_click")
1978 core.PuregoSafeRegister(&xListBoxGetAdjustment, libs, "gtk_list_box_get_adjustment")
1979 core.PuregoSafeRegister(&xListBoxGetRowAtIndex, libs, "gtk_list_box_get_row_at_index")
1980 core.PuregoSafeRegister(&xListBoxGetRowAtY, libs, "gtk_list_box_get_row_at_y")
1981 core.PuregoSafeRegister(&xListBoxGetSelectedRow, libs, "gtk_list_box_get_selected_row")
1982 core.PuregoSafeRegister(&xListBoxGetSelectedRows, libs, "gtk_list_box_get_selected_rows")
1983 core.PuregoSafeRegister(&xListBoxGetSelectionMode, libs, "gtk_list_box_get_selection_mode")
1984 core.PuregoSafeRegister(&xListBoxGetShowSeparators, libs, "gtk_list_box_get_show_separators")
1985 core.PuregoSafeRegister(&xListBoxGetTabBehavior, libs, "gtk_list_box_get_tab_behavior")
1986 core.PuregoSafeRegister(&xListBoxInsert, libs, "gtk_list_box_insert")
1987 core.PuregoSafeRegister(&xListBoxInvalidateFilter, libs, "gtk_list_box_invalidate_filter")
1988 core.PuregoSafeRegister(&xListBoxInvalidateHeaders, libs, "gtk_list_box_invalidate_headers")
1989 core.PuregoSafeRegister(&xListBoxInvalidateSort, libs, "gtk_list_box_invalidate_sort")
1990 core.PuregoSafeRegister(&xListBoxPrepend, libs, "gtk_list_box_prepend")
1991 core.PuregoSafeRegister(&xListBoxRemove, libs, "gtk_list_box_remove")
1992 core.PuregoSafeRegister(&xListBoxRemoveAll, libs, "gtk_list_box_remove_all")
1993 core.PuregoSafeRegister(&xListBoxSelectAll, libs, "gtk_list_box_select_all")
1994 core.PuregoSafeRegister(&xListBoxSelectRow, libs, "gtk_list_box_select_row")
1995 core.PuregoSafeRegister(&xListBoxSelectedForeach, libs, "gtk_list_box_selected_foreach")
1996 core.PuregoSafeRegister(&xListBoxSetActivateOnSingleClick, libs, "gtk_list_box_set_activate_on_single_click")
1997 core.PuregoSafeRegister(&xListBoxSetAdjustment, libs, "gtk_list_box_set_adjustment")
1998 core.PuregoSafeRegister(&xListBoxSetFilterFunc, libs, "gtk_list_box_set_filter_func")
1999 core.PuregoSafeRegister(&xListBoxSetHeaderFunc, libs, "gtk_list_box_set_header_func")
2000 core.PuregoSafeRegister(&xListBoxSetPlaceholder, libs, "gtk_list_box_set_placeholder")
2001 core.PuregoSafeRegister(&xListBoxSetSelectionMode, libs, "gtk_list_box_set_selection_mode")
2002 core.PuregoSafeRegister(&xListBoxSetShowSeparators, libs, "gtk_list_box_set_show_separators")
2003 core.PuregoSafeRegister(&xListBoxSetSortFunc, libs, "gtk_list_box_set_sort_func")
2004 core.PuregoSafeRegister(&xListBoxSetTabBehavior, libs, "gtk_list_box_set_tab_behavior")
2005 core.PuregoSafeRegister(&xListBoxUnselectAll, libs, "gtk_list_box_unselect_all")
2006 core.PuregoSafeRegister(&xListBoxUnselectRow, libs, "gtk_list_box_unselect_row")
2007
2008 core.PuregoSafeRegister(&xListBoxRowGLibType, libs, "gtk_list_box_row_get_type")
2009
2010 core.PuregoSafeRegister(&xNewListBoxRow, libs, "gtk_list_box_row_new")
2011
2012 core.PuregoSafeRegister(&xListBoxRowChanged, libs, "gtk_list_box_row_changed")
2013 core.PuregoSafeRegister(&xListBoxRowGetActivatable, libs, "gtk_list_box_row_get_activatable")
2014 core.PuregoSafeRegister(&xListBoxRowGetChild, libs, "gtk_list_box_row_get_child")
2015 core.PuregoSafeRegister(&xListBoxRowGetHeader, libs, "gtk_list_box_row_get_header")
2016 core.PuregoSafeRegister(&xListBoxRowGetIndex, libs, "gtk_list_box_row_get_index")
2017 core.PuregoSafeRegister(&xListBoxRowGetSelectable, libs, "gtk_list_box_row_get_selectable")
2018 core.PuregoSafeRegister(&xListBoxRowIsSelected, libs, "gtk_list_box_row_is_selected")
2019 core.PuregoSafeRegister(&xListBoxRowSetActivatable, libs, "gtk_list_box_row_set_activatable")
2020 core.PuregoSafeRegister(&xListBoxRowSetChild, libs, "gtk_list_box_row_set_child")
2021 core.PuregoSafeRegister(&xListBoxRowSetHeader, libs, "gtk_list_box_row_set_header")
2022 core.PuregoSafeRegister(&xListBoxRowSetSelectable, libs, "gtk_list_box_row_set_selectable")
2023
2024}