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/glib"
12 "github.com/bnema/puregotk/v4/gobject"
13 "github.com/bnema/puregotk/v4/gobject/types"
14)
15
16// Type of the callback passed to gtk_tree_model_foreach() to
17// iterate over the rows in a tree model.
18type TreeModelForeachFunc func(uintptr, *TreePath, *TreeIter, uintptr) bool
19
20// The `GtkTreeIter` is the primary structure
21// for accessing a `GtkTreeModel`. Models are expected to put a unique
22// integer in the @stamp member, and put
23// model-specific data in the three @user_data
24// members.
25type TreeIter struct {
26 _ structs.HostLayout
27
28 Stamp int
29
30 UserData uintptr
31
32 UserData2 uintptr
33
34 UserData3 uintptr
35}
36
37var xTreeIterGLibType func() types.GType
38
39func TreeIterGLibType() types.GType {
40 return xTreeIterGLibType()
41}
42
43func (x *TreeIter) GoPointer() uintptr {
44 return uintptr(unsafe.Pointer(x))
45}
46
47var xTreeIterCopy func(uintptr) *TreeIter
48
49// Creates a dynamically allocated tree iterator as a copy of @iter.
50//
51// This function is not intended for use in applications,
52// because you can just copy the structs by value
53// (`GtkTreeIter new_iter = iter;`).
54// You must free this iter with gtk_tree_iter_free().
55func (x *TreeIter) Copy() *TreeIter {
56
57 cret := xTreeIterCopy(x.GoPointer())
58 return cret
59}
60
61var xTreeIterFree func(uintptr)
62
63// Frees an iterator that has been allocated by gtk_tree_iter_copy().
64//
65// This function is mainly used for language bindings.
66func (x *TreeIter) Free() {
67
68 xTreeIterFree(x.GoPointer())
69
70}
71
72type TreeModelIface struct {
73 _ structs.HostLayout
74
75 GIface uintptr
76
77 xRowChanged uintptr
78
79 xRowInserted uintptr
80
81 xRowHasChildToggled uintptr
82
83 xRowDeleted uintptr
84
85 xRowsReordered uintptr
86
87 xGetFlags uintptr
88
89 xGetNColumns uintptr
90
91 xGetColumnType uintptr
92
93 xGetIter uintptr
94
95 xGetPath uintptr
96
97 xGetValue uintptr
98
99 xIterNext uintptr
100
101 xIterPrevious uintptr
102
103 xIterChildren uintptr
104
105 xIterHasChild uintptr
106
107 xIterNChildren uintptr
108
109 xIterNthChild uintptr
110
111 xIterParent uintptr
112
113 xRefNode uintptr
114
115 xUnrefNode uintptr
116}
117
118func (x *TreeModelIface) GoPointer() uintptr {
119 return uintptr(unsafe.Pointer(x))
120}
121
122// OverrideRowChanged sets the "row_changed" callback function.
123// Signal emitted when a row in the model has changed.
124func (x *TreeModelIface) OverrideRowChanged(cb func(TreeModel, *TreePath, *TreeIter)) {
125 if cb == nil {
126 x.xRowChanged = 0
127 } else {
128 x.xRowChanged = purego.NewCallback(func(TreeModelVarp uintptr, PathVarp *TreePath, IterVarp *TreeIter) {
129 cb(&TreeModelBase{Ptr: TreeModelVarp}, PathVarp, IterVarp)
130 })
131 }
132}
133
134// GetRowChanged gets the "row_changed" callback function.
135// Signal emitted when a row in the model has changed.
136func (x *TreeModelIface) GetRowChanged() func(TreeModel, *TreePath, *TreeIter) {
137 if x.xRowChanged == 0 {
138 return nil
139 }
140 var rawCallback func(TreeModelVarp uintptr, PathVarp *TreePath, IterVarp *TreeIter)
141 purego.RegisterFunc(&rawCallback, x.xRowChanged)
142 return func(TreeModelVar TreeModel, PathVar *TreePath, IterVar *TreeIter) {
143 rawCallback(TreeModelVar.GoPointer(), PathVar, IterVar)
144 }
145}
146
147// OverrideRowInserted sets the "row_inserted" callback function.
148// Signal emitted when a new row has been inserted in
149//
150// the model.
151func (x *TreeModelIface) OverrideRowInserted(cb func(TreeModel, *TreePath, *TreeIter)) {
152 if cb == nil {
153 x.xRowInserted = 0
154 } else {
155 x.xRowInserted = purego.NewCallback(func(TreeModelVarp uintptr, PathVarp *TreePath, IterVarp *TreeIter) {
156 cb(&TreeModelBase{Ptr: TreeModelVarp}, PathVarp, IterVarp)
157 })
158 }
159}
160
161// GetRowInserted gets the "row_inserted" callback function.
162// Signal emitted when a new row has been inserted in
163//
164// the model.
165func (x *TreeModelIface) GetRowInserted() func(TreeModel, *TreePath, *TreeIter) {
166 if x.xRowInserted == 0 {
167 return nil
168 }
169 var rawCallback func(TreeModelVarp uintptr, PathVarp *TreePath, IterVarp *TreeIter)
170 purego.RegisterFunc(&rawCallback, x.xRowInserted)
171 return func(TreeModelVar TreeModel, PathVar *TreePath, IterVar *TreeIter) {
172 rawCallback(TreeModelVar.GoPointer(), PathVar, IterVar)
173 }
174}
175
176// OverrideRowHasChildToggled sets the "row_has_child_toggled" callback function.
177// Signal emitted when a row has gotten the
178//
179// first child row or lost its last child row.
180func (x *TreeModelIface) OverrideRowHasChildToggled(cb func(TreeModel, *TreePath, *TreeIter)) {
181 if cb == nil {
182 x.xRowHasChildToggled = 0
183 } else {
184 x.xRowHasChildToggled = purego.NewCallback(func(TreeModelVarp uintptr, PathVarp *TreePath, IterVarp *TreeIter) {
185 cb(&TreeModelBase{Ptr: TreeModelVarp}, PathVarp, IterVarp)
186 })
187 }
188}
189
190// GetRowHasChildToggled gets the "row_has_child_toggled" callback function.
191// Signal emitted when a row has gotten the
192//
193// first child row or lost its last child row.
194func (x *TreeModelIface) GetRowHasChildToggled() func(TreeModel, *TreePath, *TreeIter) {
195 if x.xRowHasChildToggled == 0 {
196 return nil
197 }
198 var rawCallback func(TreeModelVarp uintptr, PathVarp *TreePath, IterVarp *TreeIter)
199 purego.RegisterFunc(&rawCallback, x.xRowHasChildToggled)
200 return func(TreeModelVar TreeModel, PathVar *TreePath, IterVar *TreeIter) {
201 rawCallback(TreeModelVar.GoPointer(), PathVar, IterVar)
202 }
203}
204
205// OverrideRowDeleted sets the "row_deleted" callback function.
206// Signal emitted when a row has been deleted.
207func (x *TreeModelIface) OverrideRowDeleted(cb func(TreeModel, *TreePath)) {
208 if cb == nil {
209 x.xRowDeleted = 0
210 } else {
211 x.xRowDeleted = purego.NewCallback(func(TreeModelVarp uintptr, PathVarp *TreePath) {
212 cb(&TreeModelBase{Ptr: TreeModelVarp}, PathVarp)
213 })
214 }
215}
216
217// GetRowDeleted gets the "row_deleted" callback function.
218// Signal emitted when a row has been deleted.
219func (x *TreeModelIface) GetRowDeleted() func(TreeModel, *TreePath) {
220 if x.xRowDeleted == 0 {
221 return nil
222 }
223 var rawCallback func(TreeModelVarp uintptr, PathVarp *TreePath)
224 purego.RegisterFunc(&rawCallback, x.xRowDeleted)
225 return func(TreeModelVar TreeModel, PathVar *TreePath) {
226 rawCallback(TreeModelVar.GoPointer(), PathVar)
227 }
228}
229
230// OverrideRowsReordered sets the "rows_reordered" callback function.
231// Signal emitted when the children of a node in the
232//
233// GtkTreeModel have been reordered.
234func (x *TreeModelIface) OverrideRowsReordered(cb func(TreeModel, *TreePath, *TreeIter, int)) {
235 if cb == nil {
236 x.xRowsReordered = 0
237 } else {
238 x.xRowsReordered = purego.NewCallback(func(TreeModelVarp uintptr, PathVarp *TreePath, IterVarp *TreeIter, NewOrderVarp int) {
239 cb(&TreeModelBase{Ptr: TreeModelVarp}, PathVarp, IterVarp, NewOrderVarp)
240 })
241 }
242}
243
244// GetRowsReordered gets the "rows_reordered" callback function.
245// Signal emitted when the children of a node in the
246//
247// GtkTreeModel have been reordered.
248func (x *TreeModelIface) GetRowsReordered() func(TreeModel, *TreePath, *TreeIter, int) {
249 if x.xRowsReordered == 0 {
250 return nil
251 }
252 var rawCallback func(TreeModelVarp uintptr, PathVarp *TreePath, IterVarp *TreeIter, NewOrderVarp int)
253 purego.RegisterFunc(&rawCallback, x.xRowsReordered)
254 return func(TreeModelVar TreeModel, PathVar *TreePath, IterVar *TreeIter, NewOrderVar int) {
255 rawCallback(TreeModelVar.GoPointer(), PathVar, IterVar, NewOrderVar)
256 }
257}
258
259// OverrideGetFlags sets the "get_flags" callback function.
260// Get `GtkTreeModelFlags` supported by this interface.
261func (x *TreeModelIface) OverrideGetFlags(cb func(TreeModel) TreeModelFlags) {
262 if cb == nil {
263 x.xGetFlags = 0
264 } else {
265 x.xGetFlags = purego.NewCallback(func(TreeModelVarp uintptr) TreeModelFlags {
266 return cb(&TreeModelBase{Ptr: TreeModelVarp})
267 })
268 }
269}
270
271// GetGetFlags gets the "get_flags" callback function.
272// Get `GtkTreeModelFlags` supported by this interface.
273func (x *TreeModelIface) GetGetFlags() func(TreeModel) TreeModelFlags {
274 if x.xGetFlags == 0 {
275 return nil
276 }
277 var rawCallback func(TreeModelVarp uintptr) TreeModelFlags
278 purego.RegisterFunc(&rawCallback, x.xGetFlags)
279 return func(TreeModelVar TreeModel) TreeModelFlags {
280 return rawCallback(TreeModelVar.GoPointer())
281 }
282}
283
284// OverrideGetNColumns sets the "get_n_columns" callback function.
285// Get the number of columns supported by the model.
286func (x *TreeModelIface) OverrideGetNColumns(cb func(TreeModel) int) {
287 if cb == nil {
288 x.xGetNColumns = 0
289 } else {
290 x.xGetNColumns = purego.NewCallback(func(TreeModelVarp uintptr) int {
291 return cb(&TreeModelBase{Ptr: TreeModelVarp})
292 })
293 }
294}
295
296// GetGetNColumns gets the "get_n_columns" callback function.
297// Get the number of columns supported by the model.
298func (x *TreeModelIface) GetGetNColumns() func(TreeModel) int {
299 if x.xGetNColumns == 0 {
300 return nil
301 }
302 var rawCallback func(TreeModelVarp uintptr) int
303 purego.RegisterFunc(&rawCallback, x.xGetNColumns)
304 return func(TreeModelVar TreeModel) int {
305 return rawCallback(TreeModelVar.GoPointer())
306 }
307}
308
309// OverrideGetColumnType sets the "get_column_type" callback function.
310// Get the type of the column.
311func (x *TreeModelIface) OverrideGetColumnType(cb func(TreeModel, int) types.GType) {
312 if cb == nil {
313 x.xGetColumnType = 0
314 } else {
315 x.xGetColumnType = purego.NewCallback(func(TreeModelVarp uintptr, IndexVarp int) types.GType {
316 return cb(&TreeModelBase{Ptr: TreeModelVarp}, IndexVarp)
317 })
318 }
319}
320
321// GetGetColumnType gets the "get_column_type" callback function.
322// Get the type of the column.
323func (x *TreeModelIface) GetGetColumnType() func(TreeModel, int) types.GType {
324 if x.xGetColumnType == 0 {
325 return nil
326 }
327 var rawCallback func(TreeModelVarp uintptr, IndexVarp int) types.GType
328 purego.RegisterFunc(&rawCallback, x.xGetColumnType)
329 return func(TreeModelVar TreeModel, IndexVar int) types.GType {
330 return rawCallback(TreeModelVar.GoPointer(), IndexVar)
331 }
332}
333
334// OverrideGetIter sets the "get_iter" callback function.
335// Sets iter to a valid iterator pointing to path.
336func (x *TreeModelIface) OverrideGetIter(cb func(TreeModel, *TreeIter, *TreePath) bool) {
337 if cb == nil {
338 x.xGetIter = 0
339 } else {
340 x.xGetIter = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter, PathVarp *TreePath) bool {
341 return cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp, PathVarp)
342 })
343 }
344}
345
346// GetGetIter gets the "get_iter" callback function.
347// Sets iter to a valid iterator pointing to path.
348func (x *TreeModelIface) GetGetIter() func(TreeModel, *TreeIter, *TreePath) bool {
349 if x.xGetIter == 0 {
350 return nil
351 }
352 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter, PathVarp *TreePath) bool
353 purego.RegisterFunc(&rawCallback, x.xGetIter)
354 return func(TreeModelVar TreeModel, IterVar *TreeIter, PathVar *TreePath) bool {
355 return rawCallback(TreeModelVar.GoPointer(), IterVar, PathVar)
356 }
357}
358
359// OverrideGetPath sets the "get_path" callback function.
360// Gets a newly-created `GtkTreePath` referenced by iter.
361func (x *TreeModelIface) OverrideGetPath(cb func(TreeModel, *TreeIter) *TreePath) {
362 if cb == nil {
363 x.xGetPath = 0
364 } else {
365 x.xGetPath = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter) *TreePath {
366 return cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp)
367 })
368 }
369}
370
371// GetGetPath gets the "get_path" callback function.
372// Gets a newly-created `GtkTreePath` referenced by iter.
373func (x *TreeModelIface) GetGetPath() func(TreeModel, *TreeIter) *TreePath {
374 if x.xGetPath == 0 {
375 return nil
376 }
377 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter) *TreePath
378 purego.RegisterFunc(&rawCallback, x.xGetPath)
379 return func(TreeModelVar TreeModel, IterVar *TreeIter) *TreePath {
380 return rawCallback(TreeModelVar.GoPointer(), IterVar)
381 }
382}
383
384// OverrideGetValue sets the "get_value" callback function.
385// Initializes and sets value to that at column.
386func (x *TreeModelIface) OverrideGetValue(cb func(TreeModel, *TreeIter, int, *gobject.Value)) {
387 if cb == nil {
388 x.xGetValue = 0
389 } else {
390 x.xGetValue = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter, ColumnVarp int, ValueVarp *gobject.Value) {
391 cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp, ColumnVarp, ValueVarp)
392 })
393 }
394}
395
396// GetGetValue gets the "get_value" callback function.
397// Initializes and sets value to that at column.
398func (x *TreeModelIface) GetGetValue() func(TreeModel, *TreeIter, int, *gobject.Value) {
399 if x.xGetValue == 0 {
400 return nil
401 }
402 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter, ColumnVarp int, ValueVarp *gobject.Value)
403 purego.RegisterFunc(&rawCallback, x.xGetValue)
404 return func(TreeModelVar TreeModel, IterVar *TreeIter, ColumnVar int, ValueVar *gobject.Value) {
405 rawCallback(TreeModelVar.GoPointer(), IterVar, ColumnVar, ValueVar)
406 }
407}
408
409// OverrideIterNext sets the "iter_next" callback function.
410// Sets iter to point to the node following it at the
411//
412// current level.
413func (x *TreeModelIface) OverrideIterNext(cb func(TreeModel, *TreeIter) bool) {
414 if cb == nil {
415 x.xIterNext = 0
416 } else {
417 x.xIterNext = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter) bool {
418 return cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp)
419 })
420 }
421}
422
423// GetIterNext gets the "iter_next" callback function.
424// Sets iter to point to the node following it at the
425//
426// current level.
427func (x *TreeModelIface) GetIterNext() func(TreeModel, *TreeIter) bool {
428 if x.xIterNext == 0 {
429 return nil
430 }
431 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter) bool
432 purego.RegisterFunc(&rawCallback, x.xIterNext)
433 return func(TreeModelVar TreeModel, IterVar *TreeIter) bool {
434 return rawCallback(TreeModelVar.GoPointer(), IterVar)
435 }
436}
437
438// OverrideIterPrevious sets the "iter_previous" callback function.
439// Sets iter to point to the previous node at the
440//
441// current level.
442func (x *TreeModelIface) OverrideIterPrevious(cb func(TreeModel, *TreeIter) bool) {
443 if cb == nil {
444 x.xIterPrevious = 0
445 } else {
446 x.xIterPrevious = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter) bool {
447 return cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp)
448 })
449 }
450}
451
452// GetIterPrevious gets the "iter_previous" callback function.
453// Sets iter to point to the previous node at the
454//
455// current level.
456func (x *TreeModelIface) GetIterPrevious() func(TreeModel, *TreeIter) bool {
457 if x.xIterPrevious == 0 {
458 return nil
459 }
460 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter) bool
461 purego.RegisterFunc(&rawCallback, x.xIterPrevious)
462 return func(TreeModelVar TreeModel, IterVar *TreeIter) bool {
463 return rawCallback(TreeModelVar.GoPointer(), IterVar)
464 }
465}
466
467// OverrideIterChildren sets the "iter_children" callback function.
468// Sets iter to point to the first child of parent.
469func (x *TreeModelIface) OverrideIterChildren(cb func(TreeModel, *TreeIter, *TreeIter) bool) {
470 if cb == nil {
471 x.xIterChildren = 0
472 } else {
473 x.xIterChildren = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter, ParentVarp *TreeIter) bool {
474 return cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp, ParentVarp)
475 })
476 }
477}
478
479// GetIterChildren gets the "iter_children" callback function.
480// Sets iter to point to the first child of parent.
481func (x *TreeModelIface) GetIterChildren() func(TreeModel, *TreeIter, *TreeIter) bool {
482 if x.xIterChildren == 0 {
483 return nil
484 }
485 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter, ParentVarp *TreeIter) bool
486 purego.RegisterFunc(&rawCallback, x.xIterChildren)
487 return func(TreeModelVar TreeModel, IterVar *TreeIter, ParentVar *TreeIter) bool {
488 return rawCallback(TreeModelVar.GoPointer(), IterVar, ParentVar)
489 }
490}
491
492// OverrideIterHasChild sets the "iter_has_child" callback function.
493// %TRUE if iter has children, %FALSE otherwise.
494func (x *TreeModelIface) OverrideIterHasChild(cb func(TreeModel, *TreeIter) bool) {
495 if cb == nil {
496 x.xIterHasChild = 0
497 } else {
498 x.xIterHasChild = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter) bool {
499 return cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp)
500 })
501 }
502}
503
504// GetIterHasChild gets the "iter_has_child" callback function.
505// %TRUE if iter has children, %FALSE otherwise.
506func (x *TreeModelIface) GetIterHasChild() func(TreeModel, *TreeIter) bool {
507 if x.xIterHasChild == 0 {
508 return nil
509 }
510 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter) bool
511 purego.RegisterFunc(&rawCallback, x.xIterHasChild)
512 return func(TreeModelVar TreeModel, IterVar *TreeIter) bool {
513 return rawCallback(TreeModelVar.GoPointer(), IterVar)
514 }
515}
516
517// OverrideIterNChildren sets the "iter_n_children" callback function.
518// Gets the number of children that iter has.
519func (x *TreeModelIface) OverrideIterNChildren(cb func(TreeModel, *TreeIter) int) {
520 if cb == nil {
521 x.xIterNChildren = 0
522 } else {
523 x.xIterNChildren = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter) int {
524 return cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp)
525 })
526 }
527}
528
529// GetIterNChildren gets the "iter_n_children" callback function.
530// Gets the number of children that iter has.
531func (x *TreeModelIface) GetIterNChildren() func(TreeModel, *TreeIter) int {
532 if x.xIterNChildren == 0 {
533 return nil
534 }
535 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter) int
536 purego.RegisterFunc(&rawCallback, x.xIterNChildren)
537 return func(TreeModelVar TreeModel, IterVar *TreeIter) int {
538 return rawCallback(TreeModelVar.GoPointer(), IterVar)
539 }
540}
541
542// OverrideIterNthChild sets the "iter_nth_child" callback function.
543// Sets iter to be the child of parent, using the
544//
545// given index.
546func (x *TreeModelIface) OverrideIterNthChild(cb func(TreeModel, *TreeIter, *TreeIter, int) bool) {
547 if cb == nil {
548 x.xIterNthChild = 0
549 } else {
550 x.xIterNthChild = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter, ParentVarp *TreeIter, NVarp int) bool {
551 return cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp, ParentVarp, NVarp)
552 })
553 }
554}
555
556// GetIterNthChild gets the "iter_nth_child" callback function.
557// Sets iter to be the child of parent, using the
558//
559// given index.
560func (x *TreeModelIface) GetIterNthChild() func(TreeModel, *TreeIter, *TreeIter, int) bool {
561 if x.xIterNthChild == 0 {
562 return nil
563 }
564 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter, ParentVarp *TreeIter, NVarp int) bool
565 purego.RegisterFunc(&rawCallback, x.xIterNthChild)
566 return func(TreeModelVar TreeModel, IterVar *TreeIter, ParentVar *TreeIter, NVar int) bool {
567 return rawCallback(TreeModelVar.GoPointer(), IterVar, ParentVar, NVar)
568 }
569}
570
571// OverrideIterParent sets the "iter_parent" callback function.
572// Sets iter to be the parent of child.
573func (x *TreeModelIface) OverrideIterParent(cb func(TreeModel, *TreeIter, *TreeIter) bool) {
574 if cb == nil {
575 x.xIterParent = 0
576 } else {
577 x.xIterParent = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter, ChildVarp *TreeIter) bool {
578 return cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp, ChildVarp)
579 })
580 }
581}
582
583// GetIterParent gets the "iter_parent" callback function.
584// Sets iter to be the parent of child.
585func (x *TreeModelIface) GetIterParent() func(TreeModel, *TreeIter, *TreeIter) bool {
586 if x.xIterParent == 0 {
587 return nil
588 }
589 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter, ChildVarp *TreeIter) bool
590 purego.RegisterFunc(&rawCallback, x.xIterParent)
591 return func(TreeModelVar TreeModel, IterVar *TreeIter, ChildVar *TreeIter) bool {
592 return rawCallback(TreeModelVar.GoPointer(), IterVar, ChildVar)
593 }
594}
595
596// OverrideRefNode sets the "ref_node" callback function.
597// Lets the tree ref the node.
598func (x *TreeModelIface) OverrideRefNode(cb func(TreeModel, *TreeIter)) {
599 if cb == nil {
600 x.xRefNode = 0
601 } else {
602 x.xRefNode = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter) {
603 cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp)
604 })
605 }
606}
607
608// GetRefNode gets the "ref_node" callback function.
609// Lets the tree ref the node.
610func (x *TreeModelIface) GetRefNode() func(TreeModel, *TreeIter) {
611 if x.xRefNode == 0 {
612 return nil
613 }
614 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter)
615 purego.RegisterFunc(&rawCallback, x.xRefNode)
616 return func(TreeModelVar TreeModel, IterVar *TreeIter) {
617 rawCallback(TreeModelVar.GoPointer(), IterVar)
618 }
619}
620
621// OverrideUnrefNode sets the "unref_node" callback function.
622// Lets the tree unref the node.
623func (x *TreeModelIface) OverrideUnrefNode(cb func(TreeModel, *TreeIter)) {
624 if cb == nil {
625 x.xUnrefNode = 0
626 } else {
627 x.xUnrefNode = purego.NewCallback(func(TreeModelVarp uintptr, IterVarp *TreeIter) {
628 cb(&TreeModelBase{Ptr: TreeModelVarp}, IterVarp)
629 })
630 }
631}
632
633// GetUnrefNode gets the "unref_node" callback function.
634// Lets the tree unref the node.
635func (x *TreeModelIface) GetUnrefNode() func(TreeModel, *TreeIter) {
636 if x.xUnrefNode == 0 {
637 return nil
638 }
639 var rawCallback func(TreeModelVarp uintptr, IterVarp *TreeIter)
640 purego.RegisterFunc(&rawCallback, x.xUnrefNode)
641 return func(TreeModelVar TreeModel, IterVar *TreeIter) {
642 rawCallback(TreeModelVar.GoPointer(), IterVar)
643 }
644}
645
646// An opaque structure representing a path to a row in a model.
647type TreePath struct {
648 _ structs.HostLayout
649}
650
651var xTreePathGLibType func() types.GType
652
653func TreePathGLibType() types.GType {
654 return xTreePathGLibType()
655}
656
657func (x *TreePath) GoPointer() uintptr {
658 return uintptr(unsafe.Pointer(x))
659}
660
661var xNewTreePath func() *TreePath
662
663// Creates a new `GtkTreePath`
664// This refers to a row.
665func NewTreePath() *TreePath {
666
667 cret := xNewTreePath()
668 return cret
669}
670
671var xNewTreePathFirst func() *TreePath
672
673// Creates a new `GtkTreePath`.
674//
675// The string representation of this path is “0”.
676func NewTreePathFirst() *TreePath {
677
678 cret := xNewTreePathFirst()
679 return cret
680}
681
682var xNewTreePathFromIndices func(int, ...interface{}) *TreePath
683
684// Creates a new path with @first_index and @varargs as indices.
685func NewTreePathFromIndices(FirstIndexVar int, varArgs ...interface{}) *TreePath {
686
687 cret := xNewTreePathFromIndices(FirstIndexVar, varArgs...)
688 return cret
689}
690
691var xNewTreePathFromIndicesv func([]int, uint) *TreePath
692
693// Creates a new path with the given @indices array of @length.
694func NewTreePathFromIndicesv(IndicesVar []int, LengthVar uint) *TreePath {
695
696 cret := xNewTreePathFromIndicesv(IndicesVar, LengthVar)
697 return cret
698}
699
700var xNewTreePathFromString func(string) *TreePath
701
702// Creates a new `GtkTreePath` initialized to @path.
703//
704// @path is expected to be a colon separated list of numbers.
705// For example, the string “10:4:0” would create a path of depth
706// 3 pointing to the 11th child of the root node, the 5th
707// child of that 11th child, and the 1st child of that 5th child.
708// If an invalid path string is passed in, %NULL is returned.
709func NewTreePathFromString(PathVar string) *TreePath {
710
711 cret := xNewTreePathFromString(PathVar)
712 return cret
713}
714
715var xTreePathAppendIndex func(uintptr, int)
716
717// Appends a new index to a path.
718//
719// As a result, the depth of the path is increased.
720func (x *TreePath) AppendIndex(IndexVar int) {
721
722 xTreePathAppendIndex(x.GoPointer(), IndexVar)
723
724}
725
726var xTreePathCompare func(uintptr, *TreePath) int
727
728// Compares two paths.
729//
730// If @a appears before @b in a tree, then -1 is returned.
731// If @b appears before @a, then 1 is returned.
732// If the two nodes are equal, then 0 is returned.
733func (x *TreePath) Compare(BVar *TreePath) int {
734
735 cret := xTreePathCompare(x.GoPointer(), BVar)
736 return cret
737}
738
739var xTreePathCopy func(uintptr) *TreePath
740
741// Creates a new `GtkTreePath` as a copy of @path.
742func (x *TreePath) Copy() *TreePath {
743
744 cret := xTreePathCopy(x.GoPointer())
745 return cret
746}
747
748var xTreePathDown func(uintptr)
749
750// Moves @path to point to the first child of the current path.
751func (x *TreePath) Down() {
752
753 xTreePathDown(x.GoPointer())
754
755}
756
757var xTreePathFree func(uintptr)
758
759// Frees @path. If @path is %NULL, it simply returns.
760func (x *TreePath) Free() {
761
762 xTreePathFree(x.GoPointer())
763
764}
765
766var xTreePathGetDepth func(uintptr) int
767
768// Returns the current depth of @path.
769func (x *TreePath) GetDepth() int {
770
771 cret := xTreePathGetDepth(x.GoPointer())
772 return cret
773}
774
775var xTreePathGetIndices func(uintptr) int
776
777// Returns the current indices of @path.
778//
779// This is an array of integers, each representing a node in a tree.
780// This value should not be freed.
781//
782// The length of the array can be obtained with gtk_tree_path_get_depth().
783func (x *TreePath) GetIndices() int {
784
785 cret := xTreePathGetIndices(x.GoPointer())
786 return cret
787}
788
789var xTreePathGetIndicesWithDepth func(uintptr, *int) uintptr
790
791// Returns the current indices of @path.
792//
793// This is an array of integers, each representing a node in a tree.
794// It also returns the number of elements in the array.
795// The array should not be freed.
796func (x *TreePath) GetIndicesWithDepth(DepthVar *int) uintptr {
797
798 cret := xTreePathGetIndicesWithDepth(x.GoPointer(), DepthVar)
799 return cret
800}
801
802var xTreePathIsAncestor func(uintptr, *TreePath) bool
803
804// Returns %TRUE if @descendant is a descendant of @path.
805func (x *TreePath) IsAncestor(DescendantVar *TreePath) bool {
806
807 cret := xTreePathIsAncestor(x.GoPointer(), DescendantVar)
808 return cret
809}
810
811var xTreePathIsDescendant func(uintptr, *TreePath) bool
812
813// Returns %TRUE if @path is a descendant of @ancestor.
814func (x *TreePath) IsDescendant(AncestorVar *TreePath) bool {
815
816 cret := xTreePathIsDescendant(x.GoPointer(), AncestorVar)
817 return cret
818}
819
820var xTreePathNext func(uintptr)
821
822// Moves the @path to point to the next node at the current depth.
823func (x *TreePath) Next() {
824
825 xTreePathNext(x.GoPointer())
826
827}
828
829var xTreePathPrependIndex func(uintptr, int)
830
831// Prepends a new index to a path.
832//
833// As a result, the depth of the path is increased.
834func (x *TreePath) PrependIndex(IndexVar int) {
835
836 xTreePathPrependIndex(x.GoPointer(), IndexVar)
837
838}
839
840var xTreePathPrev func(uintptr) bool
841
842// Moves the @path to point to the previous node at the
843// current depth, if it exists.
844func (x *TreePath) Prev() bool {
845
846 cret := xTreePathPrev(x.GoPointer())
847 return cret
848}
849
850var xTreePathToString func(uintptr) string
851
852// Generates a string representation of the path.
853//
854// This string is a “:” separated list of numbers.
855// For example, “4:10:0:3” would be an acceptable
856// return value for this string. If the path has
857// depth 0, %NULL is returned.
858func (x *TreePath) ToString() string {
859
860 cret := xTreePathToString(x.GoPointer())
861 return cret
862}
863
864var xTreePathUp func(uintptr) bool
865
866// Moves the @path to point to its parent node, if it has a parent.
867func (x *TreePath) Up() bool {
868
869 cret := xTreePathUp(x.GoPointer())
870 return cret
871}
872
873// A GtkTreeRowReference tracks model changes so that it always refers to the
874// same row (a `GtkTreePath` refers to a position, not a fixed row). Create a
875// new GtkTreeRowReference with gtk_tree_row_reference_new().
876type TreeRowReference struct {
877 _ structs.HostLayout
878}
879
880var xTreeRowReferenceGLibType func() types.GType
881
882func TreeRowReferenceGLibType() types.GType {
883 return xTreeRowReferenceGLibType()
884}
885
886func (x *TreeRowReference) GoPointer() uintptr {
887 return uintptr(unsafe.Pointer(x))
888}
889
890var xNewTreeRowReference func(uintptr, *TreePath) *TreeRowReference
891
892// Creates a row reference based on @path.
893//
894// This reference will keep pointing to the node pointed to
895// by @path, so long as it exists. Any changes that occur on @model are
896// propagated, and the path is updated appropriately. If
897// @path isn’t a valid path in @model, then %NULL is returned.
898func NewTreeRowReference(ModelVar TreeModel, PathVar *TreePath) *TreeRowReference {
899
900 cret := xNewTreeRowReference(ModelVar.GoPointer(), PathVar)
901 return cret
902}
903
904var xNewTreeRowReferenceProxy func(uintptr, uintptr, *TreePath) *TreeRowReference
905
906// You do not need to use this function.
907//
908// Creates a row reference based on @path.
909//
910// This reference will keep pointing to the node pointed to
911// by @path, so long as it exists. If @path isn’t a valid
912// path in @model, then %NULL is returned. However, unlike
913// references created with gtk_tree_row_reference_new(), it
914// does not listen to the model for changes. The creator of
915// the row reference must do this explicitly using
916// gtk_tree_row_reference_inserted(), gtk_tree_row_reference_deleted(),
917// gtk_tree_row_reference_reordered().
918//
919// These functions must be called exactly once per proxy when the
920// corresponding signal on the model is emitted. This single call
921// updates all row references for that proxy. Since built-in GTK
922// objects like `GtkTreeView` already use this mechanism internally,
923// using them as the proxy object will produce unpredictable results.
924// Further more, passing the same object as @model and @proxy
925// doesn’t work for reasons of internal implementation.
926//
927// This type of row reference is primarily meant by structures that
928// need to carefully monitor exactly when a row reference updates
929// itself, and is not generally needed by most applications.
930func NewTreeRowReferenceProxy(ProxyVar *gobject.Object, ModelVar TreeModel, PathVar *TreePath) *TreeRowReference {
931
932 cret := xNewTreeRowReferenceProxy(ProxyVar.GoPointer(), ModelVar.GoPointer(), PathVar)
933 return cret
934}
935
936var xTreeRowReferenceCopy func(uintptr) *TreeRowReference
937
938// Copies a `GtkTreeRowReference`.
939func (x *TreeRowReference) Copy() *TreeRowReference {
940
941 cret := xTreeRowReferenceCopy(x.GoPointer())
942 return cret
943}
944
945var xTreeRowReferenceFree func(uintptr)
946
947// Free’s @reference. @reference may be %NULL
948func (x *TreeRowReference) Free() {
949
950 xTreeRowReferenceFree(x.GoPointer())
951
952}
953
954var xTreeRowReferenceGetModel func(uintptr) uintptr
955
956// Returns the model that the row reference is monitoring.
957func (x *TreeRowReference) GetModel() *TreeModelBase {
958 var cls *TreeModelBase
959
960 cret := xTreeRowReferenceGetModel(x.GoPointer())
961
962 if cret == 0 {
963 return nil
964 }
965 gobject.IncreaseRef(cret)
966 cls = &TreeModelBase{}
967 cls.Ptr = cret
968 return cls
969}
970
971var xTreeRowReferenceGetPath func(uintptr) *TreePath
972
973// Returns a path that the row reference currently points to,
974// or %NULL if the path pointed to is no longer valid.
975func (x *TreeRowReference) GetPath() *TreePath {
976
977 cret := xTreeRowReferenceGetPath(x.GoPointer())
978 return cret
979}
980
981var xTreeRowReferenceValid func(uintptr) bool
982
983// Returns %TRUE if the @reference is non-%NULL and refers to
984// a current valid path.
985func (x *TreeRowReference) Valid() bool {
986
987 cret := xTreeRowReferenceValid(x.GoPointer())
988 return cret
989}
990
991// The tree interface used by GtkTreeView
992//
993// The `GtkTreeModel` interface defines a generic tree interface for
994// use by the `GtkTreeView` widget. It is an abstract interface, and
995// is designed to be usable with any appropriate data structure. The
996// programmer just has to implement this interface on their own data
997// type for it to be viewable by a `GtkTreeView` widget.
998//
999// The model is represented as a hierarchical tree of strongly-typed,
1000// columned data. In other words, the model can be seen as a tree where
1001// every node has different values depending on which column is being
1002// queried. The type of data found in a column is determined by using
1003// the GType system (ie. %G_TYPE_INT, %GTK_TYPE_BUTTON, %G_TYPE_POINTER,
1004// etc). The types are homogeneous per column across all nodes. It is
1005// important to note that this interface only provides a way of examining
1006// a model and observing changes. The implementation of each individual
1007// model decides how and if changes are made.
1008//
1009// In order to make life simpler for programmers who do not need to
1010// write their own specialized model, two generic models are provided
1011// — the `GtkTreeStore` and the `GtkListStore`. To use these, the
1012// developer simply pushes data into these models as necessary. These
1013// models provide the data structure as well as all appropriate tree
1014// interfaces. As a result, implementing drag and drop, sorting, and
1015// storing data is trivial. For the vast majority of trees and lists,
1016// these two models are sufficient.
1017//
1018// Models are accessed on a node/column level of granularity. One can
1019// query for the value of a model at a certain node and a certain
1020// column on that node. There are two structures used to reference a
1021// particular node in a model. They are the [struct@Gtk.TreePath] and
1022// the [struct@Gtk.TreeIter] (“iter” is short for iterator). Most of the
1023// interface consists of operations on a [struct@Gtk.TreeIter].
1024//
1025// A path is essentially a potential node. It is a location on a model
1026// that may or may not actually correspond to a node on a specific
1027// model. A [struct@Gtk.TreePath] can be converted into either an
1028// array of unsigned integers or a string. The string form is a list
1029// of numbers separated by a colon. Each number refers to the offset
1030// at that level. Thus, the path `0` refers to the root
1031// node and the path `2:4` refers to the fifth child of
1032// the third node.
1033//
1034// By contrast, a [struct@Gtk.TreeIter] is a reference to a specific node on
1035// a specific model. It is a generic struct with an integer and three
1036// generic pointers. These are filled in by the model in a model-specific
1037// way. One can convert a path to an iterator by calling
1038// gtk_tree_model_get_iter(). These iterators are the primary way
1039// of accessing a model and are similar to the iterators used by
1040// `GtkTextBuffer`. They are generally statically allocated on the
1041// stack and only used for a short time. The model interface defines
1042// a set of operations using them for navigating the model.
1043//
1044// It is expected that models fill in the iterator with private data.
1045// For example, the `GtkListStore` model, which is internally a simple
1046// linked list, stores a list node in one of the pointers. The
1047// `GtkTreeModel`Sort stores an array and an offset in two of the
1048// pointers. Additionally, there is an integer field. This field is
1049// generally filled with a unique stamp per model. This stamp is for
1050// catching errors resulting from using invalid iterators with a model.
1051//
1052// The lifecycle of an iterator can be a little confusing at first.
1053// Iterators are expected to always be valid for as long as the model
1054// is unchanged (and doesn’t emit a signal). The model is considered
1055// to own all outstanding iterators and nothing needs to be done to
1056// free them from the user’s point of view. Additionally, some models
1057// guarantee that an iterator is valid for as long as the node it refers
1058// to is valid (most notably the `GtkTreeStore` and `GtkListStore`).
1059// Although generally uninteresting, as one always has to allow for
1060// the case where iterators do not persist beyond a signal, some very
1061// important performance enhancements were made in the sort model.
1062// As a result, the %GTK_TREE_MODEL_ITERS_PERSIST flag was added to
1063// indicate this behavior.
1064//
1065// To help show some common operation of a model, some examples are
1066// provided. The first example shows three ways of getting the iter at
1067// the location `3:2:5`. While the first method shown is
1068// easier, the second is much more common, as you often get paths from
1069// callbacks.
1070//
1071// ## Acquiring a `GtkTreeIter`
1072//
1073// ```c
1074// // Three ways of getting the iter pointing to the location
1075// GtkTreePath *path;
1076// GtkTreeIter iter;
1077// GtkTreeIter parent_iter;
1078//
1079// // get the iterator from a string
1080// gtk_tree_model_get_iter_from_string (model,
1081//
1082// &iter,
1083// "3:2:5");
1084//
1085// // get the iterator from a path
1086// path = gtk_tree_path_new_from_string ("3:2:5");
1087// gtk_tree_model_get_iter (model, &iter, path);
1088// gtk_tree_path_free (path);
1089//
1090// // walk the tree to find the iterator
1091// gtk_tree_model_iter_nth_child (model, &iter,
1092//
1093// NULL, 3);
1094//
1095// parent_iter = iter;
1096// gtk_tree_model_iter_nth_child (model, &iter,
1097//
1098// &parent_iter, 2);
1099//
1100// parent_iter = iter;
1101// gtk_tree_model_iter_nth_child (model, &iter,
1102//
1103// &parent_iter, 5);
1104//
1105// ```
1106//
1107// This second example shows a quick way of iterating through a list
1108// and getting a string and an integer from each row. The
1109// populate_model() function used below is not
1110// shown, as it is specific to the `GtkListStore`. For information on
1111// how to write such a function, see the `GtkListStore` documentation.
1112//
1113// ## Reading data from a `GtkTreeModel`
1114//
1115// ```c
1116// enum
1117//
1118// {
1119// STRING_COLUMN,
1120// INT_COLUMN,
1121// N_COLUMNS
1122// };
1123//
1124// ...
1125//
1126// GtkTreeModel *list_store;
1127// GtkTreeIter iter;
1128// gboolean valid;
1129// int row_count = 0;
1130//
1131// // make a new list_store
1132// list_store = gtk_list_store_new (N_COLUMNS,
1133//
1134// G_TYPE_STRING,
1135// G_TYPE_INT);
1136//
1137// // Fill the list store with data
1138// populate_model (list_store);
1139//
1140// // Get the first iter in the list, check it is valid and walk
1141// // through the list, reading each row.
1142//
1143// valid = gtk_tree_model_get_iter_first (list_store,
1144//
1145// &iter);
1146//
1147// while (valid)
1148//
1149// {
1150// char *str_data;
1151// int int_data;
1152//
1153// // Make sure you terminate calls to gtk_tree_model_get() with a “-1” value
1154// gtk_tree_model_get (list_store, &iter,
1155// STRING_COLUMN, &str_data,
1156// INT_COLUMN, &int_data,
1157// -1);
1158//
1159// // Do something with the data
1160// g_print ("Row %d: (%s,%d)\n",
1161// row_count, str_data, int_data);
1162// g_free (str_data);
1163//
1164// valid = gtk_tree_model_iter_next (list_store,
1165// &iter);
1166// row_count++;
1167// }
1168//
1169// ```
1170//
1171// The `GtkTreeModel` interface contains two methods for reference
1172// counting: gtk_tree_model_ref_node() and gtk_tree_model_unref_node().
1173// These two methods are optional to implement. The reference counting
1174// is meant as a way for views to let models know when nodes are being
1175// displayed. `GtkTreeView` will take a reference on a node when it is
1176// visible, which means the node is either in the toplevel or expanded.
1177// Being displayed does not mean that the node is currently directly
1178// visible to the user in the viewport. Based on this reference counting
1179// scheme a caching model, for example, can decide whether or not to cache
1180// a node based on the reference count. A file-system based model would
1181// not want to keep the entire file hierarchy in memory, but just the
1182// folders that are currently expanded in every current view.
1183//
1184// When working with reference counting, the following rules must be taken
1185// into account:
1186//
1187// - Never take a reference on a node without owning a reference on its parent.
1188// This means that all parent nodes of a referenced node must be referenced
1189// as well.
1190//
1191// - Outstanding references on a deleted node are not released. This is not
1192// possible because the node has already been deleted by the time the
1193// row-deleted signal is received.
1194//
1195// - Models are not obligated to emit a signal on rows of which none of its
1196// siblings are referenced. To phrase this differently, signals are only
1197// required for levels in which nodes are referenced. For the root level
1198// however, signals must be emitted at all times (however the root level
1199// is always referenced when any view is attached).
1200type TreeModel interface {
1201 GoPointer() uintptr
1202 SetGoPointer(uintptr)
1203 FilterNew(RootVar *TreePath) *TreeModelBase
1204 Foreach(FuncVar *TreeModelForeachFunc, UserDataVar uintptr)
1205 Get(IterVar *TreeIter, varArgs ...interface{})
1206 GetColumnType(IndexVar int) types.GType
1207 GetFlags() TreeModelFlags
1208 GetIter(IterVar *TreeIter, PathVar *TreePath) bool
1209 GetIterFirst(IterVar *TreeIter) bool
1210 GetIterFromString(IterVar *TreeIter, PathStringVar string) bool
1211 GetNColumns() int
1212 GetPath(IterVar *TreeIter) *TreePath
1213 GetStringFromIter(IterVar *TreeIter) string
1214 GetValist(IterVar *TreeIter, VarArgsVar []interface{})
1215 GetValue(IterVar *TreeIter, ColumnVar int, ValueVar *gobject.Value)
1216 IterChildren(IterVar *TreeIter, ParentVar *TreeIter) bool
1217 IterHasChild(IterVar *TreeIter) bool
1218 IterNChildren(IterVar *TreeIter) int
1219 IterNext(IterVar *TreeIter) bool
1220 IterNthChild(IterVar *TreeIter, ParentVar *TreeIter, NVar int) bool
1221 IterParent(IterVar *TreeIter, ChildVar *TreeIter) bool
1222 IterPrevious(IterVar *TreeIter) bool
1223 RefNode(IterVar *TreeIter)
1224 RowChanged(PathVar *TreePath, IterVar *TreeIter)
1225 RowDeleted(PathVar *TreePath)
1226 RowHasChildToggled(PathVar *TreePath, IterVar *TreeIter)
1227 RowInserted(PathVar *TreePath, IterVar *TreeIter)
1228 RowsReordered(PathVar *TreePath, IterVar *TreeIter, NewOrderVar int)
1229 RowsReorderedWithLength(PathVar *TreePath, IterVar *TreeIter, NewOrderVar []int, LengthVar int)
1230 UnrefNode(IterVar *TreeIter)
1231}
1232
1233var xTreeModelGLibType func() types.GType
1234
1235func TreeModelGLibType() types.GType {
1236 return xTreeModelGLibType()
1237}
1238
1239type TreeModelBase struct {
1240 Ptr uintptr
1241}
1242
1243func (x *TreeModelBase) GoPointer() uintptr {
1244 if x == nil {
1245 return 0
1246 }
1247 return x.Ptr
1248}
1249
1250func (x *TreeModelBase) SetGoPointer(ptr uintptr) {
1251 x.Ptr = ptr
1252}
1253
1254// Creates a new `GtkTreeModel`, with @child_model as the child_model
1255// and @root as the virtual root.
1256func (x *TreeModelBase) FilterNew(RootVar *TreePath) *TreeModelBase {
1257 var cls *TreeModelBase
1258
1259 cret := XGtkTreeModelFilterNew(x.GoPointer(), RootVar)
1260
1261 if cret == 0 {
1262 return nil
1263 }
1264 cls = &TreeModelBase{}
1265 cls.Ptr = cret
1266 return cls
1267}
1268
1269// Calls @func on each node in model in a depth-first fashion.
1270//
1271// If @func returns %TRUE, then the tree ceases to be walked,
1272// and gtk_tree_model_foreach() returns.
1273func (x *TreeModelBase) Foreach(FuncVar *TreeModelForeachFunc, UserDataVar uintptr) {
1274
1275 XGtkTreeModelForeach(x.GoPointer(), glib.NewCallback(FuncVar), UserDataVar)
1276
1277}
1278
1279// Gets the value of one or more cells in the row referenced by @iter.
1280//
1281// The variable argument list should contain integer column numbers,
1282// each column number followed by a place to store the value being
1283// retrieved. The list is terminated by a -1. For example, to get a
1284// value from column 0 with type %G_TYPE_STRING, you would
1285// write: `gtk_tree_model_get (model, iter, 0, &place_string_here, -1)`,
1286// where `place_string_here` is a #gchararray
1287// to be filled with the string.
1288//
1289// Returned values with type %G_TYPE_OBJECT have to be unreferenced,
1290// values with type %G_TYPE_STRING or %G_TYPE_BOXED have to be freed.
1291// Other values are passed by value.
1292func (x *TreeModelBase) Get(IterVar *TreeIter, varArgs ...interface{}) {
1293
1294 XGtkTreeModelGet(x.GoPointer(), IterVar, varArgs...)
1295
1296}
1297
1298// Returns the type of the column.
1299func (x *TreeModelBase) GetColumnType(IndexVar int) types.GType {
1300
1301 cret := XGtkTreeModelGetColumnType(x.GoPointer(), IndexVar)
1302 return cret
1303}
1304
1305// Returns a set of flags supported by this interface.
1306//
1307// The flags are a bitwise combination of `GtkTreeModel`Flags.
1308// The flags supported should not change during the lifetime
1309// of the @tree_model.
1310func (x *TreeModelBase) GetFlags() TreeModelFlags {
1311
1312 cret := XGtkTreeModelGetFlags(x.GoPointer())
1313 return cret
1314}
1315
1316// Sets @iter to a valid iterator pointing to @path.
1317//
1318// If @path does not exist, @iter is set to an invalid
1319// iterator and %FALSE is returned.
1320func (x *TreeModelBase) GetIter(IterVar *TreeIter, PathVar *TreePath) bool {
1321
1322 cret := XGtkTreeModelGetIter(x.GoPointer(), IterVar, PathVar)
1323 return cret
1324}
1325
1326// Initializes @iter with the first iterator in the tree
1327// (the one at the path "0").
1328//
1329// Returns %FALSE if the tree is empty, %TRUE otherwise.
1330func (x *TreeModelBase) GetIterFirst(IterVar *TreeIter) bool {
1331
1332 cret := XGtkTreeModelGetIterFirst(x.GoPointer(), IterVar)
1333 return cret
1334}
1335
1336// Sets @iter to a valid iterator pointing to @path_string, if it
1337// exists.
1338//
1339// Otherwise, @iter is left invalid and %FALSE is returned.
1340func (x *TreeModelBase) GetIterFromString(IterVar *TreeIter, PathStringVar string) bool {
1341
1342 cret := XGtkTreeModelGetIterFromString(x.GoPointer(), IterVar, PathStringVar)
1343 return cret
1344}
1345
1346// Returns the number of columns supported by @tree_model.
1347func (x *TreeModelBase) GetNColumns() int {
1348
1349 cret := XGtkTreeModelGetNColumns(x.GoPointer())
1350 return cret
1351}
1352
1353// Returns a newly-created `GtkTreePath` referenced by @iter.
1354//
1355// This path should be freed with gtk_tree_path_free().
1356func (x *TreeModelBase) GetPath(IterVar *TreeIter) *TreePath {
1357
1358 cret := XGtkTreeModelGetPath(x.GoPointer(), IterVar)
1359 return cret
1360}
1361
1362// Generates a string representation of the iter.
1363//
1364// This string is a “:” separated list of numbers.
1365// For example, “4:10:0:3” would be an acceptable
1366// return value for this string.
1367func (x *TreeModelBase) GetStringFromIter(IterVar *TreeIter) string {
1368
1369 cret := XGtkTreeModelGetStringFromIter(x.GoPointer(), IterVar)
1370 return cret
1371}
1372
1373// Gets the value of one or more cells in the row referenced by @iter.
1374//
1375// See [method@Gtk.TreeModel.get], this version takes a va_list
1376// for language bindings to use.
1377func (x *TreeModelBase) GetValist(IterVar *TreeIter, VarArgsVar []interface{}) {
1378
1379 XGtkTreeModelGetValist(x.GoPointer(), IterVar, VarArgsVar)
1380
1381}
1382
1383// Initializes and sets @value to that at @column.
1384//
1385// When done with @value, g_value_unset() needs to be called
1386// to free any allocated memory.
1387func (x *TreeModelBase) GetValue(IterVar *TreeIter, ColumnVar int, ValueVar *gobject.Value) {
1388
1389 XGtkTreeModelGetValue(x.GoPointer(), IterVar, ColumnVar, ValueVar)
1390
1391}
1392
1393// Sets @iter to point to the first child of @parent.
1394//
1395// If @parent has no children, %FALSE is returned and @iter is
1396// set to be invalid. @parent will remain a valid node after this
1397// function has been called.
1398//
1399// If @parent is %NULL returns the first node, equivalent to
1400// `gtk_tree_model_get_iter_first (tree_model, iter);`
1401func (x *TreeModelBase) IterChildren(IterVar *TreeIter, ParentVar *TreeIter) bool {
1402
1403 cret := XGtkTreeModelIterChildren(x.GoPointer(), IterVar, ParentVar)
1404 return cret
1405}
1406
1407// Returns %TRUE if @iter has children, %FALSE otherwise.
1408func (x *TreeModelBase) IterHasChild(IterVar *TreeIter) bool {
1409
1410 cret := XGtkTreeModelIterHasChild(x.GoPointer(), IterVar)
1411 return cret
1412}
1413
1414// Returns the number of children that @iter has.
1415//
1416// As a special case, if @iter is %NULL, then the number
1417// of toplevel nodes is returned.
1418func (x *TreeModelBase) IterNChildren(IterVar *TreeIter) int {
1419
1420 cret := XGtkTreeModelIterNChildren(x.GoPointer(), IterVar)
1421 return cret
1422}
1423
1424// Sets @iter to point to the node following it at the current level.
1425//
1426// If there is no next @iter, %FALSE is returned and @iter is set
1427// to be invalid.
1428func (x *TreeModelBase) IterNext(IterVar *TreeIter) bool {
1429
1430 cret := XGtkTreeModelIterNext(x.GoPointer(), IterVar)
1431 return cret
1432}
1433
1434// Sets @iter to be the child of @parent, using the given index.
1435//
1436// The first index is 0. If @n is too big, or @parent has no children,
1437// @iter is set to an invalid iterator and %FALSE is returned. @parent
1438// will remain a valid node after this function has been called. As a
1439// special case, if @parent is %NULL, then the @n-th root node
1440// is set.
1441func (x *TreeModelBase) IterNthChild(IterVar *TreeIter, ParentVar *TreeIter, NVar int) bool {
1442
1443 cret := XGtkTreeModelIterNthChild(x.GoPointer(), IterVar, ParentVar, NVar)
1444 return cret
1445}
1446
1447// Sets @iter to be the parent of @child.
1448//
1449// If @child is at the toplevel, and doesn’t have a parent, then
1450// @iter is set to an invalid iterator and %FALSE is returned.
1451// @child will remain a valid node after this function has been
1452// called.
1453//
1454// @iter will be initialized before the lookup is performed, so @child
1455// and @iter cannot point to the same memory location.
1456func (x *TreeModelBase) IterParent(IterVar *TreeIter, ChildVar *TreeIter) bool {
1457
1458 cret := XGtkTreeModelIterParent(x.GoPointer(), IterVar, ChildVar)
1459 return cret
1460}
1461
1462// Sets @iter to point to the previous node at the current level.
1463//
1464// If there is no previous @iter, %FALSE is returned and @iter is
1465// set to be invalid.
1466func (x *TreeModelBase) IterPrevious(IterVar *TreeIter) bool {
1467
1468 cret := XGtkTreeModelIterPrevious(x.GoPointer(), IterVar)
1469 return cret
1470}
1471
1472// Lets the tree ref the node.
1473//
1474// This is an optional method for models to implement.
1475// To be more specific, models may ignore this call as it exists
1476// primarily for performance reasons.
1477//
1478// This function is primarily meant as a way for views to let
1479// caching models know when nodes are being displayed (and hence,
1480// whether or not to cache that node). Being displayed means a node
1481// is in an expanded branch, regardless of whether the node is currently
1482// visible in the viewport. For example, a file-system based model
1483// would not want to keep the entire file-hierarchy in memory,
1484// just the sections that are currently being displayed by
1485// every current view.
1486//
1487// A model should be expected to be able to get an iter independent
1488// of its reffed state.
1489func (x *TreeModelBase) RefNode(IterVar *TreeIter) {
1490
1491 XGtkTreeModelRefNode(x.GoPointer(), IterVar)
1492
1493}
1494
1495// Emits the ::row-changed signal on @tree_model.
1496//
1497// See [signal@Gtk.TreeModel::row-changed].
1498func (x *TreeModelBase) RowChanged(PathVar *TreePath, IterVar *TreeIter) {
1499
1500 XGtkTreeModelRowChanged(x.GoPointer(), PathVar, IterVar)
1501
1502}
1503
1504// Emits the ::row-deleted signal on @tree_model.
1505//
1506// See [signal@Gtk.TreeModel::row-deleted].
1507//
1508// This should be called by models after a row has been removed.
1509// The location pointed to by @path should be the location that
1510// the row previously was at. It may not be a valid location anymore.
1511//
1512// Nodes that are deleted are not unreffed, this means that any
1513// outstanding references on the deleted node should not be released.
1514func (x *TreeModelBase) RowDeleted(PathVar *TreePath) {
1515
1516 XGtkTreeModelRowDeleted(x.GoPointer(), PathVar)
1517
1518}
1519
1520// Emits the ::row-has-child-toggled signal on @tree_model.
1521//
1522// See [signal@Gtk.TreeModel::row-has-child-toggled].
1523//
1524// This should be called by models after the child
1525// state of a node changes.
1526func (x *TreeModelBase) RowHasChildToggled(PathVar *TreePath, IterVar *TreeIter) {
1527
1528 XGtkTreeModelRowHasChildToggled(x.GoPointer(), PathVar, IterVar)
1529
1530}
1531
1532// Emits the ::row-inserted signal on @tree_model.
1533//
1534// See [signal@Gtk.TreeModel::row-inserted].
1535func (x *TreeModelBase) RowInserted(PathVar *TreePath, IterVar *TreeIter) {
1536
1537 XGtkTreeModelRowInserted(x.GoPointer(), PathVar, IterVar)
1538
1539}
1540
1541// Emits the ::rows-reordered signal on @tree_model.
1542//
1543// See [signal@Gtk.TreeModel::rows-reordered].
1544//
1545// This should be called by models when their rows have been
1546// reordered.
1547func (x *TreeModelBase) RowsReordered(PathVar *TreePath, IterVar *TreeIter, NewOrderVar int) {
1548
1549 XGtkTreeModelRowsReordered(x.GoPointer(), PathVar, IterVar, NewOrderVar)
1550
1551}
1552
1553// Emits the ::rows-reordered signal on @tree_model.
1554//
1555// See [signal@Gtk.TreeModel::rows-reordered].
1556//
1557// This should be called by models when their rows have been
1558// reordered.
1559func (x *TreeModelBase) RowsReorderedWithLength(PathVar *TreePath, IterVar *TreeIter, NewOrderVar []int, LengthVar int) {
1560
1561 XGtkTreeModelRowsReorderedWithLength(x.GoPointer(), PathVar, IterVar, NewOrderVar, LengthVar)
1562
1563}
1564
1565// Lets the tree unref the node.
1566//
1567// This is an optional method for models to implement.
1568// To be more specific, models may ignore this call as it exists
1569// primarily for performance reasons. For more information on what
1570// this means, see gtk_tree_model_ref_node().
1571//
1572// Please note that nodes that are deleted are not unreffed.
1573func (x *TreeModelBase) UnrefNode(IterVar *TreeIter) {
1574
1575 XGtkTreeModelUnrefNode(x.GoPointer(), IterVar)
1576
1577}
1578
1579var XGtkTreeModelFilterNew func(uintptr, *TreePath) uintptr
1580var XGtkTreeModelForeach func(uintptr, uintptr, uintptr)
1581var XGtkTreeModelGet func(uintptr, *TreeIter, ...interface{})
1582var XGtkTreeModelGetColumnType func(uintptr, int) types.GType
1583var XGtkTreeModelGetFlags func(uintptr) TreeModelFlags
1584var XGtkTreeModelGetIter func(uintptr, *TreeIter, *TreePath) bool
1585var XGtkTreeModelGetIterFirst func(uintptr, *TreeIter) bool
1586var XGtkTreeModelGetIterFromString func(uintptr, *TreeIter, string) bool
1587var XGtkTreeModelGetNColumns func(uintptr) int
1588var XGtkTreeModelGetPath func(uintptr, *TreeIter) *TreePath
1589var XGtkTreeModelGetStringFromIter func(uintptr, *TreeIter) string
1590var XGtkTreeModelGetValist func(uintptr, *TreeIter, []interface{})
1591var XGtkTreeModelGetValue func(uintptr, *TreeIter, int, *gobject.Value)
1592var XGtkTreeModelIterChildren func(uintptr, *TreeIter, *TreeIter) bool
1593var XGtkTreeModelIterHasChild func(uintptr, *TreeIter) bool
1594var XGtkTreeModelIterNChildren func(uintptr, *TreeIter) int
1595var XGtkTreeModelIterNext func(uintptr, *TreeIter) bool
1596var XGtkTreeModelIterNthChild func(uintptr, *TreeIter, *TreeIter, int) bool
1597var XGtkTreeModelIterParent func(uintptr, *TreeIter, *TreeIter) bool
1598var XGtkTreeModelIterPrevious func(uintptr, *TreeIter) bool
1599var XGtkTreeModelRefNode func(uintptr, *TreeIter)
1600var XGtkTreeModelRowChanged func(uintptr, *TreePath, *TreeIter)
1601var XGtkTreeModelRowDeleted func(uintptr, *TreePath)
1602var XGtkTreeModelRowHasChildToggled func(uintptr, *TreePath, *TreeIter)
1603var XGtkTreeModelRowInserted func(uintptr, *TreePath, *TreeIter)
1604var XGtkTreeModelRowsReordered func(uintptr, *TreePath, *TreeIter, int)
1605var XGtkTreeModelRowsReorderedWithLength func(uintptr, *TreePath, *TreeIter, []int, int)
1606var XGtkTreeModelUnrefNode func(uintptr, *TreeIter)
1607
1608// These flags indicate various properties of a `GtkTreeModel`.
1609//
1610// They are returned by [method@Gtk.TreeModel.get_flags], and must be
1611// static for the lifetime of the object. A more complete description
1612// of %GTK_TREE_MODEL_ITERS_PERSIST can be found in the overview of
1613// this section.
1614type TreeModelFlags int
1615
1616var xTreeModelFlagsGLibType func() types.GType
1617
1618func TreeModelFlagsGLibType() types.GType {
1619 return xTreeModelFlagsGLibType()
1620}
1621
1622const (
1623
1624 // iterators survive all signals
1625 // emitted by the tree
1626 TreeModelItersPersistValue TreeModelFlags = 1
1627 // the model is a list only, and never
1628 // has children
1629 TreeModelListOnlyValue TreeModelFlags = 2
1630)
1631
1632var xTreeRowReferenceDeleted func(uintptr, *TreePath)
1633
1634// Lets a set of row reference created by
1635// gtk_tree_row_reference_new_proxy() know that the
1636// model emitted the ::row-deleted signal.
1637func TreeRowReferenceDeleted(ProxyVar *gobject.Object, PathVar *TreePath) {
1638
1639 xTreeRowReferenceDeleted(ProxyVar.GoPointer(), PathVar)
1640
1641}
1642
1643var xTreeRowReferenceInserted func(uintptr, *TreePath)
1644
1645// Lets a set of row reference created by
1646// gtk_tree_row_reference_new_proxy() know that the
1647// model emitted the ::row-inserted signal.
1648func TreeRowReferenceInserted(ProxyVar *gobject.Object, PathVar *TreePath) {
1649
1650 xTreeRowReferenceInserted(ProxyVar.GoPointer(), PathVar)
1651
1652}
1653
1654var xTreeRowReferenceReordered func(uintptr, *TreePath, *TreeIter, []int)
1655
1656// Lets a set of row reference created by
1657// gtk_tree_row_reference_new_proxy() know that the
1658// model emitted the ::rows-reordered signal.
1659func TreeRowReferenceReordered(ProxyVar *gobject.Object, PathVar *TreePath, IterVar *TreeIter, NewOrderVar []int) {
1660
1661 xTreeRowReferenceReordered(ProxyVar.GoPointer(), PathVar, IterVar, NewOrderVar)
1662
1663}
1664
1665func init() {
1666 core.SetPackageName("GTK", "gtk4")
1667 core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
1668 var libs []uintptr
1669 for _, libPath := range core.GetPaths("GTK") {
1670 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
1671 if err != nil {
1672 panic(err)
1673 }
1674 libs = append(libs, lib)
1675 }
1676
1677 core.PuregoSafeRegister(&xTreeModelFlagsGLibType, libs, "gtk_tree_model_flags_get_type")
1678
1679 core.PuregoSafeRegister(&xTreeRowReferenceDeleted, libs, "gtk_tree_row_reference_deleted")
1680 core.PuregoSafeRegister(&xTreeRowReferenceInserted, libs, "gtk_tree_row_reference_inserted")
1681 core.PuregoSafeRegister(&xTreeRowReferenceReordered, libs, "gtk_tree_row_reference_reordered")
1682
1683 core.PuregoSafeRegister(&xTreeIterGLibType, libs, "gtk_tree_iter_get_type")
1684
1685 core.PuregoSafeRegister(&xTreeIterCopy, libs, "gtk_tree_iter_copy")
1686 core.PuregoSafeRegister(&xTreeIterFree, libs, "gtk_tree_iter_free")
1687
1688 core.PuregoSafeRegister(&xTreePathGLibType, libs, "gtk_tree_path_get_type")
1689
1690 core.PuregoSafeRegister(&xNewTreePath, libs, "gtk_tree_path_new")
1691 core.PuregoSafeRegister(&xNewTreePathFirst, libs, "gtk_tree_path_new_first")
1692 core.PuregoSafeRegister(&xNewTreePathFromIndices, libs, "gtk_tree_path_new_from_indices")
1693 core.PuregoSafeRegister(&xNewTreePathFromIndicesv, libs, "gtk_tree_path_new_from_indicesv")
1694 core.PuregoSafeRegister(&xNewTreePathFromString, libs, "gtk_tree_path_new_from_string")
1695
1696 core.PuregoSafeRegister(&xTreePathAppendIndex, libs, "gtk_tree_path_append_index")
1697 core.PuregoSafeRegister(&xTreePathCompare, libs, "gtk_tree_path_compare")
1698 core.PuregoSafeRegister(&xTreePathCopy, libs, "gtk_tree_path_copy")
1699 core.PuregoSafeRegister(&xTreePathDown, libs, "gtk_tree_path_down")
1700 core.PuregoSafeRegister(&xTreePathFree, libs, "gtk_tree_path_free")
1701 core.PuregoSafeRegister(&xTreePathGetDepth, libs, "gtk_tree_path_get_depth")
1702 core.PuregoSafeRegister(&xTreePathGetIndices, libs, "gtk_tree_path_get_indices")
1703 core.PuregoSafeRegister(&xTreePathGetIndicesWithDepth, libs, "gtk_tree_path_get_indices_with_depth")
1704 core.PuregoSafeRegister(&xTreePathIsAncestor, libs, "gtk_tree_path_is_ancestor")
1705 core.PuregoSafeRegister(&xTreePathIsDescendant, libs, "gtk_tree_path_is_descendant")
1706 core.PuregoSafeRegister(&xTreePathNext, libs, "gtk_tree_path_next")
1707 core.PuregoSafeRegister(&xTreePathPrependIndex, libs, "gtk_tree_path_prepend_index")
1708 core.PuregoSafeRegister(&xTreePathPrev, libs, "gtk_tree_path_prev")
1709 core.PuregoSafeRegister(&xTreePathToString, libs, "gtk_tree_path_to_string")
1710 core.PuregoSafeRegister(&xTreePathUp, libs, "gtk_tree_path_up")
1711
1712 core.PuregoSafeRegister(&xTreeRowReferenceGLibType, libs, "gtk_tree_row_reference_get_type")
1713
1714 core.PuregoSafeRegister(&xNewTreeRowReference, libs, "gtk_tree_row_reference_new")
1715 core.PuregoSafeRegister(&xNewTreeRowReferenceProxy, libs, "gtk_tree_row_reference_new_proxy")
1716
1717 core.PuregoSafeRegister(&xTreeRowReferenceCopy, libs, "gtk_tree_row_reference_copy")
1718 core.PuregoSafeRegister(&xTreeRowReferenceFree, libs, "gtk_tree_row_reference_free")
1719 core.PuregoSafeRegister(&xTreeRowReferenceGetModel, libs, "gtk_tree_row_reference_get_model")
1720 core.PuregoSafeRegister(&xTreeRowReferenceGetPath, libs, "gtk_tree_row_reference_get_path")
1721 core.PuregoSafeRegister(&xTreeRowReferenceValid, libs, "gtk_tree_row_reference_valid")
1722
1723 core.PuregoSafeRegister(&xTreeModelGLibType, libs, "gtk_tree_model_get_type")
1724
1725 core.PuregoSafeRegister(&XGtkTreeModelFilterNew, libs, "gtk_tree_model_filter_new")
1726 core.PuregoSafeRegister(&XGtkTreeModelForeach, libs, "gtk_tree_model_foreach")
1727 core.PuregoSafeRegister(&XGtkTreeModelGet, libs, "gtk_tree_model_get")
1728 core.PuregoSafeRegister(&XGtkTreeModelGetColumnType, libs, "gtk_tree_model_get_column_type")
1729 core.PuregoSafeRegister(&XGtkTreeModelGetFlags, libs, "gtk_tree_model_get_flags")
1730 core.PuregoSafeRegister(&XGtkTreeModelGetIter, libs, "gtk_tree_model_get_iter")
1731 core.PuregoSafeRegister(&XGtkTreeModelGetIterFirst, libs, "gtk_tree_model_get_iter_first")
1732 core.PuregoSafeRegister(&XGtkTreeModelGetIterFromString, libs, "gtk_tree_model_get_iter_from_string")
1733 core.PuregoSafeRegister(&XGtkTreeModelGetNColumns, libs, "gtk_tree_model_get_n_columns")
1734 core.PuregoSafeRegister(&XGtkTreeModelGetPath, libs, "gtk_tree_model_get_path")
1735 core.PuregoSafeRegister(&XGtkTreeModelGetStringFromIter, libs, "gtk_tree_model_get_string_from_iter")
1736 core.PuregoSafeRegister(&XGtkTreeModelGetValist, libs, "gtk_tree_model_get_valist")
1737 core.PuregoSafeRegister(&XGtkTreeModelGetValue, libs, "gtk_tree_model_get_value")
1738 core.PuregoSafeRegister(&XGtkTreeModelIterChildren, libs, "gtk_tree_model_iter_children")
1739 core.PuregoSafeRegister(&XGtkTreeModelIterHasChild, libs, "gtk_tree_model_iter_has_child")
1740 core.PuregoSafeRegister(&XGtkTreeModelIterNChildren, libs, "gtk_tree_model_iter_n_children")
1741 core.PuregoSafeRegister(&XGtkTreeModelIterNext, libs, "gtk_tree_model_iter_next")
1742 core.PuregoSafeRegister(&XGtkTreeModelIterNthChild, libs, "gtk_tree_model_iter_nth_child")
1743 core.PuregoSafeRegister(&XGtkTreeModelIterParent, libs, "gtk_tree_model_iter_parent")
1744 core.PuregoSafeRegister(&XGtkTreeModelIterPrevious, libs, "gtk_tree_model_iter_previous")
1745 core.PuregoSafeRegister(&XGtkTreeModelRefNode, libs, "gtk_tree_model_ref_node")
1746 core.PuregoSafeRegister(&XGtkTreeModelRowChanged, libs, "gtk_tree_model_row_changed")
1747 core.PuregoSafeRegister(&XGtkTreeModelRowDeleted, libs, "gtk_tree_model_row_deleted")
1748 core.PuregoSafeRegister(&XGtkTreeModelRowHasChildToggled, libs, "gtk_tree_model_row_has_child_toggled")
1749 core.PuregoSafeRegister(&XGtkTreeModelRowInserted, libs, "gtk_tree_model_row_inserted")
1750 core.PuregoSafeRegister(&XGtkTreeModelRowsReordered, libs, "gtk_tree_model_rows_reordered")
1751 core.PuregoSafeRegister(&XGtkTreeModelRowsReorderedWithLength, libs, "gtk_tree_model_rows_reordered_with_length")
1752 core.PuregoSafeRegister(&XGtkTreeModelUnrefNode, libs, "gtk_tree_model_unref_node")
1753
1754}