v0.2.1 c0399be

gtkcombobox.go RawHistoryFolder

1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/gdk"
12	"github.com/bnema/puregotk/v4/glib"
13	"github.com/bnema/puregotk/v4/gobject"
14	"github.com/bnema/puregotk/v4/gobject/types"
15)
16
17type ComboBoxClass struct {
18	_ structs.HostLayout
19
20	ParentClass WidgetClass
21
22	xChanged uintptr
23
24	xFormatEntryText uintptr
25
26	xActivate uintptr
27
28	Padding [7]uintptr
29}
30
31func (x *ComboBoxClass) GoPointer() uintptr {
32	return uintptr(unsafe.Pointer(x))
33}
34
35// OverrideChanged sets the "changed" callback function.
36// Signal is emitted when the active item is changed.
37func (x *ComboBoxClass) OverrideChanged(cb func(*ComboBox)) {
38	if cb == nil {
39		x.xChanged = 0
40	} else {
41		x.xChanged = purego.NewCallback(func(ComboBoxVarp uintptr) {
42			cb(ComboBoxNewFromInternalPtr(ComboBoxVarp))
43		})
44	}
45}
46
47// GetChanged gets the "changed" callback function.
48// Signal is emitted when the active item is changed.
49func (x *ComboBoxClass) GetChanged() func(*ComboBox) {
50	if x.xChanged == 0 {
51		return nil
52	}
53	var rawCallback func(ComboBoxVarp uintptr)
54	purego.RegisterFunc(&rawCallback, x.xChanged)
55	return func(ComboBoxVar *ComboBox) {
56		rawCallback(ComboBoxVar.GoPointer())
57	}
58}
59
60// OverrideFormatEntryText sets the "format_entry_text" callback function.
61// Signal which allows you to change how the text
62//
63//	displayed in a combo box’s entry is displayed.
64func (x *ComboBoxClass) OverrideFormatEntryText(cb func(*ComboBox, string) string) {
65	if cb == nil {
66		x.xFormatEntryText = 0
67	} else {
68		x.xFormatEntryText = purego.NewCallback(func(ComboBoxVarp uintptr, PathVarp string) string {
69			return cb(ComboBoxNewFromInternalPtr(ComboBoxVarp), PathVarp)
70		})
71	}
72}
73
74// GetFormatEntryText gets the "format_entry_text" callback function.
75// Signal which allows you to change how the text
76//
77//	displayed in a combo box’s entry is displayed.
78func (x *ComboBoxClass) GetFormatEntryText() func(*ComboBox, string) string {
79	if x.xFormatEntryText == 0 {
80		return nil
81	}
82	var rawCallback func(ComboBoxVarp uintptr, PathVarp string) string
83	purego.RegisterFunc(&rawCallback, x.xFormatEntryText)
84	return func(ComboBoxVar *ComboBox, PathVar string) string {
85		return rawCallback(ComboBoxVar.GoPointer(), PathVar)
86	}
87}
88
89// OverrideActivate sets the "activate" callback function.
90func (x *ComboBoxClass) OverrideActivate(cb func(*ComboBox)) {
91	if cb == nil {
92		x.xActivate = 0
93	} else {
94		x.xActivate = purego.NewCallback(func(ComboBoxVarp uintptr) {
95			cb(ComboBoxNewFromInternalPtr(ComboBoxVarp))
96		})
97	}
98}
99
100// GetActivate gets the "activate" callback function.
101func (x *ComboBoxClass) GetActivate() func(*ComboBox) {
102	if x.xActivate == 0 {
103		return nil
104	}
105	var rawCallback func(ComboBoxVarp uintptr)
106	purego.RegisterFunc(&rawCallback, x.xActivate)
107	return func(ComboBoxVar *ComboBox) {
108		rawCallback(ComboBoxVar.GoPointer())
109	}
110}
111
112// A `GtkComboBox` is a widget that allows the user to choose from a list of
113// valid choices.
114//
115// <picture>
116//
117//	<source srcset="combo-box-dark.png" media="(prefers-color-scheme: dark)">
118//	<img alt="An example GtkComboBox" src="combo-box.png">
119//
120// </picture>
121//
122// The `GtkComboBox` displays the selected choice; when activated, the
123// `GtkComboBox` displays a popup which allows the user to make a new choice.
124//
125// The `GtkComboBox` uses the model-view pattern; the list of valid choices
126// is specified in the form of a tree model, and the display of the choices
127// can be adapted to the data in the model by using cell renderers, as you
128// would in a tree view. This is possible since `GtkComboBox` implements the
129// [iface@Gtk.CellLayout] interface. The tree model holding the valid
130// choices is not restricted to a flat list, it can be a real tree, and the
131// popup will reflect the tree structure.
132//
133// To allow the user to enter values not in the model, the
134// [property@Gtk.ComboBox:has-entry] property allows the `GtkComboBox` to
135// contain a [class@Gtk.Entry]. This entry can be accessed by calling
136// [method@Gtk.ComboBox.get_child] on the combo box.
137//
138// For a simple list of textual choices, the model-view API of `GtkComboBox`
139// can be a bit overwhelming. In this case, [class@Gtk.ComboBoxText] offers
140// a simple alternative. Both `GtkComboBox` and `GtkComboBoxText` can contain
141// an entry.
142//
143// ## CSS nodes
144//
145// ```
146// combobox
147// ├── box.linked
148// │   ╰── button.combo
149// │       ╰── box
150// │           ├── cellview
151// │           ╰── arrow
152// ╰── window.popup
153// ```
154//
155// A normal combobox contains a box with the .linked class, a button
156// with the .combo class and inside those buttons, there are a cellview and
157// an arrow.
158//
159// ```
160// combobox
161// ├── box.linked
162// │   ├── entry.combo
163// │   ╰── button.combo
164// │       ╰── box
165// │           ╰── arrow
166// ╰── window.popup
167// ```
168//
169// A `GtkComboBox` with an entry has a single CSS node with name combobox.
170// It contains a box with the .linked class. That box contains an entry and
171// a button, both with the .combo class added. The button also contains another
172// node with name arrow.
173//
174// ## Accessibility
175//
176// `GtkComboBox` uses the [enum@Gtk.AccessibleRole.combo_box] role.
177type ComboBox struct {
178	Widget
179}
180
181var xComboBoxGLibType func() types.GType
182
183func ComboBoxGLibType() types.GType {
184	return xComboBoxGLibType()
185}
186
187func ComboBoxNewFromInternalPtr(ptr uintptr) *ComboBox {
188	cls := &ComboBox{}
189	cls.Ptr = ptr
190	return cls
191}
192
193var xNewComboBox func() uintptr
194
195// Creates a new empty `GtkComboBox`.
196func NewComboBox() *ComboBox {
197	var cls *ComboBox
198
199	cret := xNewComboBox()
200
201	if cret == 0 {
202		return nil
203	}
204	gobject.IncreaseRef(cret)
205	cls = &ComboBox{}
206	cls.Ptr = cret
207	return cls
208}
209
210var xNewComboBoxWithEntry func() uintptr
211
212// Creates a new empty `GtkComboBox` with an entry.
213//
214// In order to use a combo box with entry, you need to tell it
215// which column of the model contains the text for the entry
216// by calling [method@Gtk.ComboBox.set_entry_text_column].
217func NewComboBoxWithEntry() *ComboBox {
218	var cls *ComboBox
219
220	cret := xNewComboBoxWithEntry()
221
222	if cret == 0 {
223		return nil
224	}
225	gobject.IncreaseRef(cret)
226	cls = &ComboBox{}
227	cls.Ptr = cret
228	return cls
229}
230
231var xNewComboBoxWithModel func(uintptr) uintptr
232
233// Creates a new `GtkComboBox` with a model.
234func NewComboBoxWithModel(ModelVar TreeModel) *ComboBox {
235	var cls *ComboBox
236
237	cret := xNewComboBoxWithModel(ModelVar.GoPointer())
238
239	if cret == 0 {
240		return nil
241	}
242	gobject.IncreaseRef(cret)
243	cls = &ComboBox{}
244	cls.Ptr = cret
245	return cls
246}
247
248var xNewComboBoxWithModelAndEntry func(uintptr) uintptr
249
250// Creates a new empty `GtkComboBox` with an entry and a model.
251//
252// See also [ctor@Gtk.ComboBox.new_with_entry].
253func NewComboBoxWithModelAndEntry(ModelVar TreeModel) *ComboBox {
254	var cls *ComboBox
255
256	cret := xNewComboBoxWithModelAndEntry(ModelVar.GoPointer())
257
258	if cret == 0 {
259		return nil
260	}
261	gobject.IncreaseRef(cret)
262	cls = &ComboBox{}
263	cls.Ptr = cret
264	return cls
265}
266
267var xComboBoxGetActive func(uintptr) int
268
269// Returns the index of the currently active item.
270//
271// If the model is a non-flat treemodel, and the active item is not
272// an immediate child of the root of the tree, this function returns
273// `gtk_tree_path_get_indices (path)[0]`, where `path` is the
274// [struct@Gtk.TreePath] of the active item.
275func (x *ComboBox) GetActive() int {
276
277	cret := xComboBoxGetActive(x.GoPointer())
278	return cret
279}
280
281var xComboBoxGetActiveId func(uintptr) string
282
283// Returns the ID of the active row of @combo_box.
284//
285// This value is taken from the active row and the column specified
286// by the [property@Gtk.ComboBox:id-column] property of @combo_box
287// (see [method@Gtk.ComboBox.set_id_column]).
288//
289// The returned value is an interned string which means that you can
290// compare the pointer by value to other interned strings and that you
291// must not free it.
292//
293// If the [property@Gtk.ComboBox:id-column] property of @combo_box is
294// not set, or if no row is active, or if the active row has a %NULL
295// ID value, then %NULL is returned.
296func (x *ComboBox) GetActiveId() string {
297
298	cret := xComboBoxGetActiveId(x.GoPointer())
299	return cret
300}
301
302var xComboBoxGetActiveIter func(uintptr, *TreeIter) bool
303
304// Sets @iter to point to the currently active item.
305//
306// If no item is active, @iter is left unchanged.
307func (x *ComboBox) GetActiveIter(IterVar *TreeIter) bool {
308
309	cret := xComboBoxGetActiveIter(x.GoPointer(), IterVar)
310	return cret
311}
312
313var xComboBoxGetButtonSensitivity func(uintptr) SensitivityType
314
315// Returns whether the combo box sets the dropdown button
316// sensitive or not when there are no items in the model.
317func (x *ComboBox) GetButtonSensitivity() SensitivityType {
318
319	cret := xComboBoxGetButtonSensitivity(x.GoPointer())
320	return cret
321}
322
323var xComboBoxGetChild func(uintptr) uintptr
324
325// Gets the child widget of @combo_box.
326func (x *ComboBox) GetChild() *Widget {
327	var cls *Widget
328
329	cret := xComboBoxGetChild(x.GoPointer())
330
331	if cret == 0 {
332		return nil
333	}
334	gobject.IncreaseRef(cret)
335	cls = &Widget{}
336	cls.Ptr = cret
337	return cls
338}
339
340var xComboBoxGetEntryTextColumn func(uintptr) int
341
342// Returns the column which @combo_box is using to get the strings
343// from to display in the internal entry.
344func (x *ComboBox) GetEntryTextColumn() int {
345
346	cret := xComboBoxGetEntryTextColumn(x.GoPointer())
347	return cret
348}
349
350var xComboBoxGetHasEntry func(uintptr) bool
351
352// Returns whether the combo box has an entry.
353func (x *ComboBox) GetHasEntry() bool {
354
355	cret := xComboBoxGetHasEntry(x.GoPointer())
356	return cret
357}
358
359var xComboBoxGetIdColumn func(uintptr) int
360
361// Returns the column which @combo_box is using to get string IDs
362// for values from.
363func (x *ComboBox) GetIdColumn() int {
364
365	cret := xComboBoxGetIdColumn(x.GoPointer())
366	return cret
367}
368
369var xComboBoxGetModel func(uintptr) uintptr
370
371// Returns the `GtkTreeModel` of @combo_box.
372func (x *ComboBox) GetModel() *TreeModelBase {
373	var cls *TreeModelBase
374
375	cret := xComboBoxGetModel(x.GoPointer())
376
377	if cret == 0 {
378		return nil
379	}
380	gobject.IncreaseRef(cret)
381	cls = &TreeModelBase{}
382	cls.Ptr = cret
383	return cls
384}
385
386var xComboBoxGetPopupFixedWidth func(uintptr) bool
387
388// Gets whether the popup uses a fixed width.
389func (x *ComboBox) GetPopupFixedWidth() bool {
390
391	cret := xComboBoxGetPopupFixedWidth(x.GoPointer())
392	return cret
393}
394
395var xComboBoxGetRowSeparatorFunc func(uintptr) uintptr
396
397// Returns the current row separator function.
398func (x *ComboBox) GetRowSeparatorFunc() uintptr {
399
400	cret := xComboBoxGetRowSeparatorFunc(x.GoPointer())
401	return cret
402}
403
404var xComboBoxPopdown func(uintptr)
405
406// Hides the menu or dropdown list of @combo_box.
407//
408// This function is mostly intended for use by accessibility technologies;
409// applications should have little use for it.
410func (x *ComboBox) Popdown() {
411
412	xComboBoxPopdown(x.GoPointer())
413
414}
415
416var xComboBoxPopup func(uintptr)
417
418// Pops up the menu or dropdown list of @combo_box.
419//
420// This function is mostly intended for use by accessibility technologies;
421// applications should have little use for it.
422//
423// Before calling this, @combo_box must be mapped, or nothing will happen.
424func (x *ComboBox) Popup() {
425
426	xComboBoxPopup(x.GoPointer())
427
428}
429
430var xComboBoxPopupForDevice func(uintptr, uintptr)
431
432// Pops up the menu of @combo_box.
433//
434// Note that currently this does not do anything with the device, as it was
435// previously only used for list-mode combo boxes, and those were removed
436// in GTK 4. However, it is retained in case similar functionality is added
437// back later.
438func (x *ComboBox) PopupForDevice(DeviceVar *gdk.Device) {
439
440	xComboBoxPopupForDevice(x.GoPointer(), DeviceVar.GoPointer())
441
442}
443
444var xComboBoxSetActive func(uintptr, int)
445
446// Sets the active item of @combo_box to be the item at @index.
447func (x *ComboBox) SetActive(IndexVar int) {
448
449	xComboBoxSetActive(x.GoPointer(), IndexVar)
450
451}
452
453var xComboBoxSetActiveId func(uintptr, uintptr) bool
454
455// Changes the active row of @combo_box to the one that has an ID equal to
456// @active_id.
457//
458// If @active_id is %NULL, the active row is unset. Rows having
459// a %NULL ID string cannot be made active by this function.
460//
461// If the [property@Gtk.ComboBox:id-column] property of @combo_box is
462// unset or if no row has the given ID then the function does nothing
463// and returns %FALSE.
464func (x *ComboBox) SetActiveId(ActiveIdVar *string) bool {
465
466	ActiveIdVarPtr := core.GStrdupNullable(ActiveIdVar)
467	defer core.GFreeNullable(ActiveIdVarPtr)
468
469	cret := xComboBoxSetActiveId(x.GoPointer(), ActiveIdVarPtr)
470	return cret
471}
472
473var xComboBoxSetActiveIter func(uintptr, *TreeIter)
474
475// Sets the current active item to be the one referenced by @iter.
476//
477// If @iter is %NULL, the active item is unset.
478func (x *ComboBox) SetActiveIter(IterVar *TreeIter) {
479
480	xComboBoxSetActiveIter(x.GoPointer(), IterVar)
481
482}
483
484var xComboBoxSetButtonSensitivity func(uintptr, SensitivityType)
485
486// Sets whether the dropdown button of the combo box should update
487// its sensitivity depending on the model contents.
488func (x *ComboBox) SetButtonSensitivity(SensitivityVar SensitivityType) {
489
490	xComboBoxSetButtonSensitivity(x.GoPointer(), SensitivityVar)
491
492}
493
494var xComboBoxSetChild func(uintptr, uintptr)
495
496// Sets the child widget of @combo_box.
497func (x *ComboBox) SetChild(ChildVar *Widget) {
498
499	xComboBoxSetChild(x.GoPointer(), ChildVar.GoPointer())
500
501}
502
503var xComboBoxSetEntryTextColumn func(uintptr, int)
504
505// Sets the model column which @combo_box should use to get strings
506// from to be @text_column.
507//
508// For this column no separate
509// [class@Gtk.CellRenderer] is needed.
510//
511// The column @text_column in the model of @combo_box must be of
512// type %G_TYPE_STRING.
513//
514// This is only relevant if @combo_box has been created with
515// [property@Gtk.ComboBox:has-entry] as %TRUE.
516func (x *ComboBox) SetEntryTextColumn(TextColumnVar int) {
517
518	xComboBoxSetEntryTextColumn(x.GoPointer(), TextColumnVar)
519
520}
521
522var xComboBoxSetIdColumn func(uintptr, int)
523
524// Sets the model column which @combo_box should use to get string IDs
525// for values from.
526//
527// The column @id_column in the model of @combo_box must be of type
528// %G_TYPE_STRING.
529func (x *ComboBox) SetIdColumn(IdColumnVar int) {
530
531	xComboBoxSetIdColumn(x.GoPointer(), IdColumnVar)
532
533}
534
535var xComboBoxSetModel func(uintptr, uintptr)
536
537// Sets the model used by @combo_box to be @model.
538//
539// Will unset a previously set model (if applicable). If model is %NULL,
540// then it will unset the model.
541//
542// Note that this function does not clear the cell renderers, you have to
543// call [method@Gtk.CellLayout.clear] yourself if you need to set up different
544// cell renderers for the new model.
545func (x *ComboBox) SetModel(ModelVar TreeModel) {
546
547	xComboBoxSetModel(x.GoPointer(), ModelVar.GoPointer())
548
549}
550
551var xComboBoxSetPopupFixedWidth func(uintptr, bool)
552
553// Specifies whether the popup’s width should be a fixed width.
554//
555// If @fixed is %TRUE, the popup's width is set to match the
556// allocated width of the combo box.
557func (x *ComboBox) SetPopupFixedWidth(FixedVar bool) {
558
559	xComboBoxSetPopupFixedWidth(x.GoPointer(), FixedVar)
560
561}
562
563var xComboBoxSetRowSeparatorFunc func(uintptr, uintptr, uintptr, uintptr)
564
565// Sets the row separator function, which is used to determine
566// whether a row should be drawn as a separator.
567//
568// If the row separator function is %NULL, no separators are drawn.
569// This is the default value.
570func (x *ComboBox) SetRowSeparatorFunc(FuncVar *TreeViewRowSeparatorFunc, DataVar uintptr, DestroyVar *glib.DestroyNotify) {
571
572	var FuncVarRef uintptr
573	if FuncVar != nil {
574		FuncVarPtr := uintptr(unsafe.Pointer(FuncVar))
575		if cbRefPtr, ok := glib.GetCallback(FuncVarPtr); ok {
576			FuncVarRef = cbRefPtr
577		} else {
578			fcb := func(arg0 uintptr, arg1 *TreeIter, arg2 uintptr) bool {
579				cbFn := *FuncVar
580				return cbFn(arg0, arg1, arg2)
581			}
582			FuncVarRef = purego.NewCallback(fcb)
583			glib.SaveCallbackWithClosure(FuncVarPtr, FuncVarRef, FuncVar)
584		}
585	}
586
587	var DestroyVarRef uintptr
588	if DestroyVar != nil {
589		DestroyVarPtr := uintptr(unsafe.Pointer(DestroyVar))
590		if cbRefPtr, ok := glib.GetCallback(DestroyVarPtr); ok {
591			DestroyVarRef = cbRefPtr
592		} else {
593			fcb := func(arg0 uintptr) {
594				cbFn := *DestroyVar
595				cbFn(arg0)
596			}
597			DestroyVarRef = purego.NewCallback(fcb)
598			glib.SaveCallbackWithClosure(DestroyVarPtr, DestroyVarRef, DestroyVar)
599		}
600	}
601
602	xComboBoxSetRowSeparatorFunc(x.GoPointer(), FuncVarRef, DataVar, DestroyVarRef)
603
604}
605
606func (c *ComboBox) GoPointer() uintptr {
607	if c == nil {
608		return 0
609	}
610	return c.Ptr
611}
612
613func (c *ComboBox) SetGoPointer(ptr uintptr) {
614	c.Ptr = ptr
615}
616
617// SetPropertyActive sets the "active" property.
618// The item which is currently active.
619//
620// If the model is a non-flat treemodel, and the active item is not an
621// immediate child of the root of the tree, this property has the value
622// `gtk_tree_path_get_indices (path)[0]`, where `path` is the
623// [struct@Gtk.TreePath] of the active item.
624func (x *ComboBox) SetPropertyActive(value int) {
625	var v gobject.Value
626	v.Init(gobject.TypeIntVal)
627	v.SetInt(value)
628	x.SetProperty("active", &v)
629}
630
631// GetPropertyActive gets the "active" property.
632// The item which is currently active.
633//
634// If the model is a non-flat treemodel, and the active item is not an
635// immediate child of the root of the tree, this property has the value
636// `gtk_tree_path_get_indices (path)[0]`, where `path` is the
637// [struct@Gtk.TreePath] of the active item.
638func (x *ComboBox) GetPropertyActive() int {
639	var v gobject.Value
640	x.GetProperty("active", &v)
641	return v.GetInt()
642}
643
644// SetPropertyActiveId sets the "active-id" property.
645// The value of the ID column of the active row.
646func (x *ComboBox) SetPropertyActiveId(value string) {
647	var v gobject.Value
648	v.Init(gobject.TypeStringVal)
649	v.SetString(&value)
650	x.SetProperty("active-id", &v)
651}
652
653// GetPropertyActiveId gets the "active-id" property.
654// The value of the ID column of the active row.
655func (x *ComboBox) GetPropertyActiveId() string {
656	var v gobject.Value
657	x.GetProperty("active-id", &v)
658	return v.GetString()
659}
660
661// SetPropertyEntryTextColumn sets the "entry-text-column" property.
662// The model column to associate with strings from the entry.
663//
664// This is property only relevant if the combo was created with
665// [property@Gtk.ComboBox:has-entry] is %TRUE.
666func (x *ComboBox) SetPropertyEntryTextColumn(value int) {
667	var v gobject.Value
668	v.Init(gobject.TypeIntVal)
669	v.SetInt(value)
670	x.SetProperty("entry-text-column", &v)
671}
672
673// GetPropertyEntryTextColumn gets the "entry-text-column" property.
674// The model column to associate with strings from the entry.
675//
676// This is property only relevant if the combo was created with
677// [property@Gtk.ComboBox:has-entry] is %TRUE.
678func (x *ComboBox) GetPropertyEntryTextColumn() int {
679	var v gobject.Value
680	x.GetProperty("entry-text-column", &v)
681	return v.GetInt()
682}
683
684// SetPropertyHasEntry sets the "has-entry" property.
685// Whether the combo box has an entry.
686func (x *ComboBox) SetPropertyHasEntry(value bool) {
687	var v gobject.Value
688	v.Init(gobject.TypeBooleanVal)
689	v.SetBoolean(value)
690	x.SetProperty("has-entry", &v)
691}
692
693// GetPropertyHasEntry gets the "has-entry" property.
694// Whether the combo box has an entry.
695func (x *ComboBox) GetPropertyHasEntry() bool {
696	var v gobject.Value
697	x.GetProperty("has-entry", &v)
698	return v.GetBoolean()
699}
700
701// SetPropertyHasFrame sets the "has-frame" property.
702// The `has-frame` property controls whether a frame is drawn around the entry.
703func (x *ComboBox) SetPropertyHasFrame(value bool) {
704	var v gobject.Value
705	v.Init(gobject.TypeBooleanVal)
706	v.SetBoolean(value)
707	x.SetProperty("has-frame", &v)
708}
709
710// GetPropertyHasFrame gets the "has-frame" property.
711// The `has-frame` property controls whether a frame is drawn around the entry.
712func (x *ComboBox) GetPropertyHasFrame() bool {
713	var v gobject.Value
714	x.GetProperty("has-frame", &v)
715	return v.GetBoolean()
716}
717
718// SetPropertyIdColumn sets the "id-column" property.
719// The model column that provides string IDs for the values
720// in the model, if != -1.
721func (x *ComboBox) SetPropertyIdColumn(value int) {
722	var v gobject.Value
723	v.Init(gobject.TypeIntVal)
724	v.SetInt(value)
725	x.SetProperty("id-column", &v)
726}
727
728// GetPropertyIdColumn gets the "id-column" property.
729// The model column that provides string IDs for the values
730// in the model, if != -1.
731func (x *ComboBox) GetPropertyIdColumn() int {
732	var v gobject.Value
733	x.GetProperty("id-column", &v)
734	return v.GetInt()
735}
736
737// SetPropertyPopupFixedWidth sets the "popup-fixed-width" property.
738// Whether the popup's width should be a fixed width matching the
739// allocated width of the combo box.
740func (x *ComboBox) SetPropertyPopupFixedWidth(value bool) {
741	var v gobject.Value
742	v.Init(gobject.TypeBooleanVal)
743	v.SetBoolean(value)
744	x.SetProperty("popup-fixed-width", &v)
745}
746
747// GetPropertyPopupFixedWidth gets the "popup-fixed-width" property.
748// Whether the popup's width should be a fixed width matching the
749// allocated width of the combo box.
750func (x *ComboBox) GetPropertyPopupFixedWidth() bool {
751	var v gobject.Value
752	x.GetProperty("popup-fixed-width", &v)
753	return v.GetBoolean()
754}
755
756// GetPropertyPopupShown gets the "popup-shown" property.
757// Whether the combo boxes dropdown is popped up.
758//
759// Note that this property is mainly useful, because
760// it allows you to connect to notify::popup-shown.
761func (x *ComboBox) GetPropertyPopupShown() bool {
762	var v gobject.Value
763	x.GetProperty("popup-shown", &v)
764	return v.GetBoolean()
765}
766
767// Emitted to when the combo box is activated.
768//
769// The `::activate` signal on `GtkComboBox` is an action signal and
770// emitting it causes the combo box to pop up its dropdown.
771func (x *ComboBox) ConnectActivate(cb *func(ComboBox)) uint {
772	cbPtr := uintptr(unsafe.Pointer(cb))
773	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
774		handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr)
775		glib.SaveHandlerMapping(handlerID, cbPtr)
776		return handlerID
777	}
778
779	fcb := func(clsPtr uintptr) {
780		fa := ComboBox{}
781		fa.Ptr = clsPtr
782		cbFn := *cb
783
784		cbFn(fa)
785
786	}
787	cbRefPtr := purego.NewCallback(fcb)
788	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
789	handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr)
790	glib.SaveHandlerMapping(handlerID, cbPtr)
791	return handlerID
792}
793
794// Emitted when the active item is changed.
795//
796// The can be due to the user selecting a different item from the list,
797// or due to a call to [method@Gtk.ComboBox.set_active_iter]. It will
798// also be emitted while typing into the entry of a combo box with an entry.
799func (x *ComboBox) ConnectChanged(cb *func(ComboBox)) uint {
800	cbPtr := uintptr(unsafe.Pointer(cb))
801	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
802		handlerID := gobject.SignalConnect(x.GoPointer(), "changed", cbRefPtr)
803		glib.SaveHandlerMapping(handlerID, cbPtr)
804		return handlerID
805	}
806
807	fcb := func(clsPtr uintptr) {
808		fa := ComboBox{}
809		fa.Ptr = clsPtr
810		cbFn := *cb
811
812		cbFn(fa)
813
814	}
815	cbRefPtr := purego.NewCallback(fcb)
816	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
817	handlerID := gobject.SignalConnect(x.GoPointer(), "changed", cbRefPtr)
818	glib.SaveHandlerMapping(handlerID, cbPtr)
819	return handlerID
820}
821
822// Emitted to allow changing how the text in a combo box's entry is displayed.
823//
824// See [property@Gtk.ComboBox:has-entry].
825//
826// Connect a signal handler which returns an allocated string representing
827// @path. That string will then be used to set the text in the combo box's
828// entry. The default signal handler uses the text from the
829// [property@Gtk.ComboBox:entry-text-column] model column.
830//
831// Here's an example signal handler which fetches data from the model and
832// displays it in the entry.
833// ```c
834// static char *
835// format_entry_text_callback (GtkComboBox *combo,
836//
837//	const char *path,
838//	gpointer     user_data)
839//
840//	{
841//	  GtkTreeIter iter;
842//	  GtkTreeModel model;
843//	  double       value;
844//
845//	  model = gtk_combo_box_get_model (combo);
846//
847//	  gtk_tree_model_get_iter_from_string (model, &iter, path);
848//	  gtk_tree_model_get (model, &iter,
849//	                      THE_DOUBLE_VALUE_COLUMN, &value,
850//	                      -1);
851//
852//	  return g_strdup_printf ("%g", value);
853//	}
854//
855// ```
856func (x *ComboBox) ConnectFormatEntryText(cb *func(ComboBox, string) string) uint {
857	cbPtr := uintptr(unsafe.Pointer(cb))
858	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
859		handlerID := gobject.SignalConnect(x.GoPointer(), "format-entry-text", cbRefPtr)
860		glib.SaveHandlerMapping(handlerID, cbPtr)
861		return handlerID
862	}
863
864	fcb := func(clsPtr uintptr, PathVarp uintptr) string {
865		fa := ComboBox{}
866		fa.Ptr = clsPtr
867		cbFn := *cb
868
869		return cbFn(fa, core.GoString(PathVarp))
870
871	}
872	cbRefPtr := purego.NewCallback(fcb)
873	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
874	handlerID := gobject.SignalConnect(x.GoPointer(), "format-entry-text", cbRefPtr)
875	glib.SaveHandlerMapping(handlerID, cbPtr)
876	return handlerID
877}
878
879// Emitted to move the active selection.
880//
881// This is an [keybinding signal](class.SignalAction.html).
882func (x *ComboBox) ConnectMoveActive(cb *func(ComboBox, ScrollType)) uint {
883	cbPtr := uintptr(unsafe.Pointer(cb))
884	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
885		handlerID := gobject.SignalConnect(x.GoPointer(), "move-active", cbRefPtr)
886		glib.SaveHandlerMapping(handlerID, cbPtr)
887		return handlerID
888	}
889
890	fcb := func(clsPtr uintptr, ScrollTypeVarp ScrollType) {
891		fa := ComboBox{}
892		fa.Ptr = clsPtr
893		cbFn := *cb
894
895		cbFn(fa, ScrollTypeVarp)
896
897	}
898	cbRefPtr := purego.NewCallback(fcb)
899	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
900	handlerID := gobject.SignalConnect(x.GoPointer(), "move-active", cbRefPtr)
901	glib.SaveHandlerMapping(handlerID, cbPtr)
902	return handlerID
903}
904
905// Emitted to popdown the combo box list.
906//
907// This is an [keybinding signal](class.SignalAction.html).
908//
909// The default bindings for this signal are Alt+Up and Escape.
910func (x *ComboBox) ConnectPopdown(cb *func(ComboBox) bool) uint {
911	cbPtr := uintptr(unsafe.Pointer(cb))
912	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
913		handlerID := gobject.SignalConnect(x.GoPointer(), "popdown", cbRefPtr)
914		glib.SaveHandlerMapping(handlerID, cbPtr)
915		return handlerID
916	}
917
918	fcb := func(clsPtr uintptr) bool {
919		fa := ComboBox{}
920		fa.Ptr = clsPtr
921		cbFn := *cb
922
923		return cbFn(fa)
924
925	}
926	cbRefPtr := purego.NewCallback(fcb)
927	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
928	handlerID := gobject.SignalConnect(x.GoPointer(), "popdown", cbRefPtr)
929	glib.SaveHandlerMapping(handlerID, cbPtr)
930	return handlerID
931}
932
933// Emitted to popup the combo box list.
934//
935// This is an [keybinding signal](class.SignalAction.html).
936//
937// The default binding for this signal is Alt+Down.
938func (x *ComboBox) ConnectPopup(cb *func(ComboBox)) uint {
939	cbPtr := uintptr(unsafe.Pointer(cb))
940	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
941		handlerID := gobject.SignalConnect(x.GoPointer(), "popup", cbRefPtr)
942		glib.SaveHandlerMapping(handlerID, cbPtr)
943		return handlerID
944	}
945
946	fcb := func(clsPtr uintptr) {
947		fa := ComboBox{}
948		fa.Ptr = clsPtr
949		cbFn := *cb
950
951		cbFn(fa)
952
953	}
954	cbRefPtr := purego.NewCallback(fcb)
955	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
956	handlerID := gobject.SignalConnect(x.GoPointer(), "popup", cbRefPtr)
957	glib.SaveHandlerMapping(handlerID, cbPtr)
958	return handlerID
959}
960
961// Requests the user's screen reader to announce the given message.
962//
963// This kind of notification is useful for messages that
964// either have only a visual representation or that are not
965// exposed visually at all, e.g. a notification about a
966// successful operation.
967//
968// Also, by using this API, you can ensure that the message
969// does not interrupts the user's current screen reader output.
970func (x *ComboBox) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
971
972	XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
973
974}
975
976// Retrieves the accessible parent for an accessible object.
977//
978// This function returns `NULL` for top level widgets.
979func (x *ComboBox) GetAccessibleParent() *AccessibleBase {
980	var cls *AccessibleBase
981
982	cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
983
984	if cret == 0 {
985		return nil
986	}
987	cls = &AccessibleBase{}
988	cls.Ptr = cret
989	return cls
990}
991
992// Retrieves the accessible role of an accessible object.
993func (x *ComboBox) GetAccessibleRole() AccessibleRole {
994
995	cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
996	return cret
997}
998
999// Retrieves the implementation for the given accessible object.
1000func (x *ComboBox) GetAtContext() *ATContext {
1001	var cls *ATContext
1002
1003	cret := XGtkAccessibleGetAtContext(x.GoPointer())
1004
1005	if cret == 0 {
1006		return nil
1007	}
1008	cls = &ATContext{}
1009	cls.Ptr = cret
1010	return cls
1011}
1012
1013// Queries the coordinates and dimensions of this accessible
1014//
1015// This functionality can be overridden by `GtkAccessible`
1016// implementations, e.g. to get the bounds from an ignored
1017// child widget.
1018func (x *ComboBox) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
1019
1020	cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
1021	return cret
1022}
1023
1024// Retrieves the first accessible child of an accessible object.
1025func (x *ComboBox) GetFirstAccessibleChild() *AccessibleBase {
1026	var cls *AccessibleBase
1027
1028	cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
1029
1030	if cret == 0 {
1031		return nil
1032	}
1033	cls = &AccessibleBase{}
1034	cls.Ptr = cret
1035	return cls
1036}
1037
1038// Retrieves the next accessible sibling of an accessible object
1039func (x *ComboBox) GetNextAccessibleSibling() *AccessibleBase {
1040	var cls *AccessibleBase
1041
1042	cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
1043
1044	if cret == 0 {
1045		return nil
1046	}
1047	cls = &AccessibleBase{}
1048	cls.Ptr = cret
1049	return cls
1050}
1051
1052// Queries a platform state, such as focus.
1053//
1054// This functionality can be overridden by `GtkAccessible`
1055// implementations, e.g. to get platform state from an ignored
1056// child widget, as is the case for `GtkText` wrappers.
1057func (x *ComboBox) GetPlatformState(StateVar AccessiblePlatformState) bool {
1058
1059	cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
1060	return cret
1061}
1062
1063// Resets the accessible property to its default value.
1064func (x *ComboBox) ResetProperty(PropertyVar AccessibleProperty) {
1065
1066	XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
1067
1068}
1069
1070// Resets the accessible relation to its default value.
1071func (x *ComboBox) ResetRelation(RelationVar AccessibleRelation) {
1072
1073	XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
1074
1075}
1076
1077// Resets the accessible state to its default value.
1078func (x *ComboBox) ResetState(StateVar AccessibleState) {
1079
1080	XGtkAccessibleResetState(x.GoPointer(), StateVar)
1081
1082}
1083
1084// Sets the parent and sibling of an accessible object.
1085//
1086// This function is meant to be used by accessible implementations that are
1087// not part of the widget hierarchy, and but act as a logical bridge between
1088// widgets. For instance, if a widget creates an object that holds metadata
1089// for each child, and you want that object to implement the `GtkAccessible`
1090// interface, you will use this function to ensure that the parent of each
1091// child widget is the metadata object, and the parent of each metadata
1092// object is the container widget.
1093func (x *ComboBox) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
1094
1095	XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
1096
1097}
1098
1099// Updates the next accessible sibling.
1100//
1101// That might be useful when a new child of a custom accessible
1102// is created, and it needs to be linked to a previous child.
1103func (x *ComboBox) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
1104
1105	XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
1106
1107}
1108
1109// Informs ATs that the platform state has changed.
1110//
1111// This function should be used by `GtkAccessible` implementations that
1112// have a platform state but are not widgets. Widgets handle platform
1113// states automatically.
1114func (x *ComboBox) UpdatePlatformState(StateVar AccessiblePlatformState) {
1115
1116	XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
1117
1118}
1119
1120// Updates a list of accessible properties.
1121//
1122// See the [enum@Gtk.AccessibleProperty] documentation for the
1123// value types of accessible properties.
1124//
1125// This function should be called by `GtkWidget` types whenever
1126// an accessible property change must be communicated to assistive
1127// technologies.
1128//
1129// Example:
1130// ```c
1131// value = gtk_adjustment_get_value (adjustment);
1132// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
1133//
1134//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
1135//	-1);
1136//
1137// ```
1138func (x *ComboBox) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
1139
1140	XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
1141
1142}
1143
1144// Updates an array of accessible properties.
1145//
1146// This function should be called by `GtkWidget` types whenever an accessible
1147// property change must be communicated to assistive technologies.
1148//
1149// This function is meant to be used by language bindings.
1150func (x *ComboBox) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
1151
1152	XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
1153
1154}
1155
1156// Updates a list of accessible relations.
1157//
1158// This function should be called by `GtkWidget` types whenever an accessible
1159// relation change must be communicated to assistive technologies.
1160//
1161// If the [enum@Gtk.AccessibleRelation] requires a list of references,
1162// you should pass each reference individually, followed by `NULL`, e.g.
1163//
1164// ```c
1165// gtk_accessible_update_relation (accessible,
1166//
1167//	GTK_ACCESSIBLE_RELATION_CONTROLS,
1168//	  ref1, NULL,
1169//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
1170//	  ref1, ref2, ref3, NULL,
1171//	-1);
1172//
1173// ```
1174func (x *ComboBox) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
1175
1176	XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
1177
1178}
1179
1180// Updates an array of accessible relations.
1181//
1182// This function should be called by `GtkWidget` types whenever an accessible
1183// relation change must be communicated to assistive technologies.
1184//
1185// This function is meant to be used by language bindings.
1186func (x *ComboBox) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
1187
1188	XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
1189
1190}
1191
1192// Updates a list of accessible states.
1193//
1194// See the [enum@Gtk.AccessibleState] documentation for the
1195// value types of accessible states.
1196//
1197// This function should be called by `GtkWidget` types whenever
1198// an accessible state change must be communicated to assistive
1199// technologies.
1200//
1201// Example:
1202//
1203// ```c
1204// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
1205// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
1206//
1207//	GTK_ACCESSIBLE_STATE_CHECKED, value,
1208//	-1);
1209//
1210// ```
1211func (x *ComboBox) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
1212
1213	XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
1214
1215}
1216
1217// Updates an array of accessible states.
1218//
1219// This function should be called by `GtkWidget` types whenever an accessible
1220// state change must be communicated to assistive technologies.
1221//
1222// This function is meant to be used by language bindings.
1223func (x *ComboBox) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
1224
1225	XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
1226
1227}
1228
1229// Gets the ID of the @buildable object.
1230//
1231// `GtkBuilder` sets the name based on the ID attribute
1232// of the `<object>` tag used to construct the @buildable.
1233func (x *ComboBox) GetBuildableId() string {
1234
1235	cret := XGtkBuildableGetBuildableId(x.GoPointer())
1236	return cret
1237}
1238
1239// Emits the `GtkCellEditable::editing-done` signal.
1240func (x *ComboBox) EditingDone() {
1241
1242	XGtkCellEditableEditingDone(x.GoPointer())
1243
1244}
1245
1246// Emits the `GtkCellEditable::remove-widget` signal.
1247func (x *ComboBox) RemoveWidget() {
1248
1249	XGtkCellEditableRemoveWidget(x.GoPointer())
1250
1251}
1252
1253// Begins editing on a @cell_editable.
1254//
1255// The `GtkCellRenderer` for the cell creates and returns a `GtkCellEditable` from
1256// gtk_cell_renderer_start_editing(), configured for the `GtkCellRenderer` type.
1257//
1258// gtk_cell_editable_start_editing() can then set up @cell_editable suitably for
1259// editing a cell, e.g. making the Esc key emit `GtkCellEditable::editing-done`.
1260//
1261// Note that the @cell_editable is created on-demand for the current edit; its
1262// lifetime is temporary and does not persist across other edits and/or cells.
1263func (x *ComboBox) StartEditing(EventVar *gdk.Event) {
1264
1265	XGtkCellEditableStartEditing(x.GoPointer(), EventVar.GoPointer())
1266
1267}
1268
1269// Adds an attribute mapping to the list in @cell_layout.
1270//
1271// The @column is the column of the model to get a value from, and the
1272// @attribute is the property on @cell to be set from that value. So for
1273// example if column 2 of the model contains strings, you could have the
1274// “text” attribute of a `GtkCellRendererText` get its values from column 2.
1275// In this context "attribute" and "property" are used interchangeably.
1276func (x *ComboBox) AddAttribute(CellVar *CellRenderer, AttributeVar string, ColumnVar int) {
1277
1278	XGtkCellLayoutAddAttribute(x.GoPointer(), CellVar.GoPointer(), AttributeVar, ColumnVar)
1279
1280}
1281
1282// Unsets all the mappings on all renderers on @cell_layout and
1283// removes all renderers from @cell_layout.
1284func (x *ComboBox) Clear() {
1285
1286	XGtkCellLayoutClear(x.GoPointer())
1287
1288}
1289
1290// Clears all existing attributes previously set with
1291// gtk_cell_layout_set_attributes().
1292func (x *ComboBox) ClearAttributes(CellVar *CellRenderer) {
1293
1294	XGtkCellLayoutClearAttributes(x.GoPointer(), CellVar.GoPointer())
1295
1296}
1297
1298// Returns the underlying `GtkCellArea` which might be @cell_layout
1299// if called on a `GtkCellArea` or might be %NULL if no `GtkCellArea`
1300// is used by @cell_layout.
1301func (x *ComboBox) GetArea() *CellArea {
1302	var cls *CellArea
1303
1304	cret := XGtkCellLayoutGetArea(x.GoPointer())
1305
1306	if cret == 0 {
1307		return nil
1308	}
1309	gobject.IncreaseRef(cret)
1310	cls = &CellArea{}
1311	cls.Ptr = cret
1312	return cls
1313}
1314
1315// Returns the cell renderers which have been added to @cell_layout.
1316func (x *ComboBox) GetCells() *glib.List {
1317
1318	cret := XGtkCellLayoutGetCells(x.GoPointer())
1319	return cret
1320}
1321
1322// Adds the @cell to the end of @cell_layout. If @expand is %FALSE, then the
1323// @cell is allocated no more space than it needs. Any unused space is
1324// divided evenly between cells for which @expand is %TRUE.
1325//
1326// Note that reusing the same cell renderer is not supported.
1327func (x *ComboBox) PackEnd(CellVar *CellRenderer, ExpandVar bool) {
1328
1329	XGtkCellLayoutPackEnd(x.GoPointer(), CellVar.GoPointer(), ExpandVar)
1330
1331}
1332
1333// Packs the @cell into the beginning of @cell_layout. If @expand is %FALSE,
1334// then the @cell is allocated no more space than it needs. Any unused space
1335// is divided evenly between cells for which @expand is %TRUE.
1336//
1337// Note that reusing the same cell renderer is not supported.
1338func (x *ComboBox) PackStart(CellVar *CellRenderer, ExpandVar bool) {
1339
1340	XGtkCellLayoutPackStart(x.GoPointer(), CellVar.GoPointer(), ExpandVar)
1341
1342}
1343
1344// Re-inserts @cell at @position.
1345//
1346// Note that @cell has already to be packed into @cell_layout
1347// for this to function properly.
1348func (x *ComboBox) Reorder(CellVar *CellRenderer, PositionVar int) {
1349
1350	XGtkCellLayoutReorder(x.GoPointer(), CellVar.GoPointer(), PositionVar)
1351
1352}
1353
1354// Sets the attributes in the parameter list as the attributes
1355// of @cell_layout.
1356//
1357// See [method@Gtk.CellLayout.add_attribute] for more details.
1358//
1359// The attributes should be in attribute/column order, as in
1360// gtk_cell_layout_add_attribute(). All existing attributes are
1361// removed, and replaced with the new attributes.
1362func (x *ComboBox) SetAttributes(CellVar *CellRenderer, varArgs ...interface{}) {
1363
1364	XGtkCellLayoutSetAttributes(x.GoPointer(), CellVar.GoPointer(), varArgs...)
1365
1366}
1367
1368// Sets the `GtkCellLayout`DataFunc to use for @cell_layout.
1369//
1370// This function is used instead of the standard attributes mapping
1371// for setting the column value, and should set the value of @cell_layout’s
1372// cell renderer(s) as appropriate.
1373//
1374// @func may be %NULL to remove a previously set function.
1375func (x *ComboBox) SetCellDataFunc(CellVar *CellRenderer, FuncVar *CellLayoutDataFunc, FuncDataVar uintptr, DestroyVar *glib.DestroyNotify) {
1376
1377	XGtkCellLayoutSetCellDataFunc(x.GoPointer(), CellVar.GoPointer(), glib.NewCallbackNullable(FuncVar), FuncDataVar, glib.NewCallback(DestroyVar))
1378
1379}
1380
1381func init() {
1382	core.SetPackageName("GTK", "gtk4")
1383	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
1384	var libs []uintptr
1385	for _, libPath := range core.GetPaths("GTK") {
1386		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
1387		if err != nil {
1388			panic(err)
1389		}
1390		libs = append(libs, lib)
1391	}
1392
1393	core.PuregoSafeRegister(&xComboBoxGLibType, libs, "gtk_combo_box_get_type")
1394
1395	core.PuregoSafeRegister(&xNewComboBox, libs, "gtk_combo_box_new")
1396	core.PuregoSafeRegister(&xNewComboBoxWithEntry, libs, "gtk_combo_box_new_with_entry")
1397	core.PuregoSafeRegister(&xNewComboBoxWithModel, libs, "gtk_combo_box_new_with_model")
1398	core.PuregoSafeRegister(&xNewComboBoxWithModelAndEntry, libs, "gtk_combo_box_new_with_model_and_entry")
1399
1400	core.PuregoSafeRegister(&xComboBoxGetActive, libs, "gtk_combo_box_get_active")
1401	core.PuregoSafeRegister(&xComboBoxGetActiveId, libs, "gtk_combo_box_get_active_id")
1402	core.PuregoSafeRegister(&xComboBoxGetActiveIter, libs, "gtk_combo_box_get_active_iter")
1403	core.PuregoSafeRegister(&xComboBoxGetButtonSensitivity, libs, "gtk_combo_box_get_button_sensitivity")
1404	core.PuregoSafeRegister(&xComboBoxGetChild, libs, "gtk_combo_box_get_child")
1405	core.PuregoSafeRegister(&xComboBoxGetEntryTextColumn, libs, "gtk_combo_box_get_entry_text_column")
1406	core.PuregoSafeRegister(&xComboBoxGetHasEntry, libs, "gtk_combo_box_get_has_entry")
1407	core.PuregoSafeRegister(&xComboBoxGetIdColumn, libs, "gtk_combo_box_get_id_column")
1408	core.PuregoSafeRegister(&xComboBoxGetModel, libs, "gtk_combo_box_get_model")
1409	core.PuregoSafeRegister(&xComboBoxGetPopupFixedWidth, libs, "gtk_combo_box_get_popup_fixed_width")
1410	core.PuregoSafeRegister(&xComboBoxGetRowSeparatorFunc, libs, "gtk_combo_box_get_row_separator_func")
1411	core.PuregoSafeRegister(&xComboBoxPopdown, libs, "gtk_combo_box_popdown")
1412	core.PuregoSafeRegister(&xComboBoxPopup, libs, "gtk_combo_box_popup")
1413	core.PuregoSafeRegister(&xComboBoxPopupForDevice, libs, "gtk_combo_box_popup_for_device")
1414	core.PuregoSafeRegister(&xComboBoxSetActive, libs, "gtk_combo_box_set_active")
1415	core.PuregoSafeRegister(&xComboBoxSetActiveId, libs, "gtk_combo_box_set_active_id")
1416	core.PuregoSafeRegister(&xComboBoxSetActiveIter, libs, "gtk_combo_box_set_active_iter")
1417	core.PuregoSafeRegister(&xComboBoxSetButtonSensitivity, libs, "gtk_combo_box_set_button_sensitivity")
1418	core.PuregoSafeRegister(&xComboBoxSetChild, libs, "gtk_combo_box_set_child")
1419	core.PuregoSafeRegister(&xComboBoxSetEntryTextColumn, libs, "gtk_combo_box_set_entry_text_column")
1420	core.PuregoSafeRegister(&xComboBoxSetIdColumn, libs, "gtk_combo_box_set_id_column")
1421	core.PuregoSafeRegister(&xComboBoxSetModel, libs, "gtk_combo_box_set_model")
1422	core.PuregoSafeRegister(&xComboBoxSetPopupFixedWidth, libs, "gtk_combo_box_set_popup_fixed_width")
1423	core.PuregoSafeRegister(&xComboBoxSetRowSeparatorFunc, libs, "gtk_combo_box_set_row_separator_func")
1424
1425}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close