1// Package adw was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package adw
3
4import (
5 "structs"
6 "unsafe"
7
8 "github.com/ebitengine/purego"
9
10 "github.com/bnema/puregotk/pkg/core"
11 "github.com/bnema/puregotk/v4/gio"
12 "github.com/bnema/puregotk/v4/glib"
13 "github.com/bnema/puregotk/v4/gobject"
14 "github.com/bnema/puregotk/v4/gobject/types"
15 "github.com/bnema/puregotk/v4/gtk"
16)
17
18type ComboRowClass struct {
19 _ structs.HostLayout
20
21 ParentClass ActionRowClass
22
23 Padding [4]uintptr
24}
25
26func (x *ComboRowClass) GoPointer() uintptr {
27 return uintptr(unsafe.Pointer(x))
28}
29
30// A [class@Gtk.ListBoxRow] used to choose from a list of items.
31//
32// <picture>
33//
34// <source srcset="combo-row-dark.png" media="(prefers-color-scheme: dark)">
35// <img src="combo-row.png" alt="combo-row">
36//
37// </picture>
38//
39// The `AdwComboRow` widget allows the user to choose from a list of valid
40// choices. The row displays the selected choice. When activated, the row
41// displays a popover which allows the user to make a new choice.
42//
43// Example of an `AdwComboRow` UI definition:
44// ```xml
45// <object class="AdwComboRow">
46//
47// <property name="title" translatable="yes">Combo Row</property>
48// <property name="model">
49// <object class="GtkStringList">
50// <items>
51// <item translatable="yes">Foo</item>
52// <item translatable="yes">Bar</item>
53// <item translatable="yes">Baz</item>
54// </items>
55// </object>
56// </property>
57//
58// </object>
59// ```
60//
61// The [property@ComboRow:selected] and [property@ComboRow:selected-item]
62// properties can be used to keep track of the selected item and react to their
63// changes.
64//
65// `AdwComboRow` mirrors [class@Gtk.DropDown], see that widget for details.
66//
67// `AdwComboRow` is [property@Gtk.ListBoxRow:activatable] if a model is set.
68//
69// ## CSS nodes
70//
71// `AdwComboRow` has a main CSS node with name `row` and the `.combo` style
72// class.
73//
74// Its popover has the node named `popover` with the `.menu` style class, it
75// contains a [class@Gtk.ScrolledWindow], which in turn contains a
76// [class@Gtk.ListView], both are accessible via their regular nodes.
77//
78// ## Accessibility
79//
80// `AdwComboRow` uses the `GTK_ACCESSIBLE_ROLE_COMBO_BOX` role.
81type ComboRow struct {
82 ActionRow
83}
84
85var xComboRowGLibType func() types.GType
86
87func ComboRowGLibType() types.GType {
88 return xComboRowGLibType()
89}
90
91func ComboRowNewFromInternalPtr(ptr uintptr) *ComboRow {
92 cls := &ComboRow{}
93 cls.Ptr = ptr
94 return cls
95}
96
97var xNewComboRow func() uintptr
98
99// Creates a new `AdwComboRow`.
100func NewComboRow() *ComboRow {
101 var cls *ComboRow
102
103 cret := xNewComboRow()
104
105 if cret == 0 {
106 return nil
107 }
108 gobject.IncreaseRef(cret)
109 cls = &ComboRow{}
110 cls.Ptr = cret
111 return cls
112}
113
114var xComboRowGetEnableSearch func(uintptr) bool
115
116// Gets whether search is enabled.
117//
118// If set to `TRUE`, a search entry will be shown in the popup that
119// allows to search for items in the list.
120//
121// Search requires [property@ComboRow:expression] to be set.
122func (x *ComboRow) GetEnableSearch() bool {
123
124 cret := xComboRowGetEnableSearch(x.GoPointer())
125 return cret
126}
127
128var xComboRowGetExpression func(uintptr) uintptr
129
130// Gets the expression used to obtain strings from items.
131func (x *ComboRow) GetExpression() *gtk.Expression {
132 var cls *gtk.Expression
133
134 cret := xComboRowGetExpression(x.GoPointer())
135
136 if cret == 0 {
137 return nil
138 }
139 gobject.IncreaseRef(cret)
140 cls = >k.Expression{}
141 cls.Ptr = cret
142 return cls
143}
144
145var xComboRowGetFactory func(uintptr) uintptr
146
147// Gets the factory for populating list items.
148func (x *ComboRow) GetFactory() *gtk.ListItemFactory {
149 var cls *gtk.ListItemFactory
150
151 cret := xComboRowGetFactory(x.GoPointer())
152
153 if cret == 0 {
154 return nil
155 }
156 gobject.IncreaseRef(cret)
157 cls = >k.ListItemFactory{}
158 cls.Ptr = cret
159 return cls
160}
161
162var xComboRowGetHeaderFactory func(uintptr) uintptr
163
164// Gets the factory that's currently used to create header widgets for the popup.
165func (x *ComboRow) GetHeaderFactory() *gtk.ListItemFactory {
166 var cls *gtk.ListItemFactory
167
168 cret := xComboRowGetHeaderFactory(x.GoPointer())
169
170 if cret == 0 {
171 return nil
172 }
173 gobject.IncreaseRef(cret)
174 cls = >k.ListItemFactory{}
175 cls.Ptr = cret
176 return cls
177}
178
179var xComboRowGetListFactory func(uintptr) uintptr
180
181// Gets the factory for populating list items in the popup.
182func (x *ComboRow) GetListFactory() *gtk.ListItemFactory {
183 var cls *gtk.ListItemFactory
184
185 cret := xComboRowGetListFactory(x.GoPointer())
186
187 if cret == 0 {
188 return nil
189 }
190 gobject.IncreaseRef(cret)
191 cls = >k.ListItemFactory{}
192 cls.Ptr = cret
193 return cls
194}
195
196var xComboRowGetModel func(uintptr) uintptr
197
198// Gets the model that provides the displayed items.
199func (x *ComboRow) GetModel() *gio.ListModelBase {
200 var cls *gio.ListModelBase
201
202 cret := xComboRowGetModel(x.GoPointer())
203
204 if cret == 0 {
205 return nil
206 }
207 gobject.IncreaseRef(cret)
208 cls = &gio.ListModelBase{}
209 cls.Ptr = cret
210 return cls
211}
212
213var xComboRowGetSearchMatchMode func(uintptr) gtk.StringFilterMatchMode
214
215// Returns the match mode that the search filter is using.
216func (x *ComboRow) GetSearchMatchMode() gtk.StringFilterMatchMode {
217
218 cret := xComboRowGetSearchMatchMode(x.GoPointer())
219 return cret
220}
221
222var xComboRowGetSelected func(uintptr) uint
223
224// Gets the position of the selected item.
225func (x *ComboRow) GetSelected() uint {
226
227 cret := xComboRowGetSelected(x.GoPointer())
228 return cret
229}
230
231var xComboRowGetSelectedItem func(uintptr) uintptr
232
233// Gets the selected item.
234func (x *ComboRow) GetSelectedItem() *gobject.Object {
235 var cls *gobject.Object
236
237 cret := xComboRowGetSelectedItem(x.GoPointer())
238
239 if cret == 0 {
240 return nil
241 }
242 gobject.IncreaseRef(cret)
243 cls = &gobject.Object{}
244 cls.Ptr = cret
245 return cls
246}
247
248var xComboRowGetUseSubtitle func(uintptr) bool
249
250// Gets whether to use the current value as the subtitle.
251func (x *ComboRow) GetUseSubtitle() bool {
252
253 cret := xComboRowGetUseSubtitle(x.GoPointer())
254 return cret
255}
256
257var xComboRowSetEnableSearch func(uintptr, bool)
258
259// Sets whether to enable search.
260//
261// If set to `TRUE`, a search entry will be shown in the popup that
262// allows to search for items in the list.
263//
264// Search requires [property@ComboRow:expression] to be set.
265func (x *ComboRow) SetEnableSearch(EnableSearchVar bool) {
266
267 xComboRowSetEnableSearch(x.GoPointer(), EnableSearchVar)
268
269}
270
271var xComboRowSetExpression func(uintptr, uintptr)
272
273// Sets the expression used to obtain strings from items.
274//
275// The expression must have a value type of `G_TYPE_STRING`.
276//
277// It's used to bind strings to labels produced by the default factory if
278// [property@ComboRow:factory] is not set, or when
279// [property@ComboRow:use-subtitle] is set to `TRUE`.
280func (x *ComboRow) SetExpression(ExpressionVar *gtk.Expression) {
281
282 xComboRowSetExpression(x.GoPointer(), ExpressionVar.GoPointer())
283
284}
285
286var xComboRowSetFactory func(uintptr, uintptr)
287
288// Sets the factory for populating list items.
289//
290// This factory is always used for the item in the row. It is also used for
291// items in the popup unless [property@ComboRow:list-factory] is set.
292func (x *ComboRow) SetFactory(FactoryVar *gtk.ListItemFactory) {
293
294 xComboRowSetFactory(x.GoPointer(), FactoryVar.GoPointer())
295
296}
297
298var xComboRowSetHeaderFactory func(uintptr, uintptr)
299
300// Sets the factory to use for creating header widgets for the popup.
301func (x *ComboRow) SetHeaderFactory(FactoryVar *gtk.ListItemFactory) {
302
303 xComboRowSetHeaderFactory(x.GoPointer(), FactoryVar.GoPointer())
304
305}
306
307var xComboRowSetListFactory func(uintptr, uintptr)
308
309// Sets the factory for populating list items in the popup.
310//
311// If this is not set, [property@ComboRow:factory] is used.
312func (x *ComboRow) SetListFactory(FactoryVar *gtk.ListItemFactory) {
313
314 xComboRowSetListFactory(x.GoPointer(), FactoryVar.GoPointer())
315
316}
317
318var xComboRowSetModel func(uintptr, uintptr)
319
320// Sets the model that provides the displayed items.
321func (x *ComboRow) SetModel(ModelVar gio.ListModel) {
322
323 xComboRowSetModel(x.GoPointer(), ModelVar.GoPointer())
324
325}
326
327var xComboRowSetSearchMatchMode func(uintptr, gtk.StringFilterMatchMode)
328
329// Sets the match mode for the search filter.
330func (x *ComboRow) SetSearchMatchMode(SearchMatchModeVar gtk.StringFilterMatchMode) {
331
332 xComboRowSetSearchMatchMode(x.GoPointer(), SearchMatchModeVar)
333
334}
335
336var xComboRowSetSelected func(uintptr, uint)
337
338// Selects the item at the given position.
339func (x *ComboRow) SetSelected(PositionVar uint) {
340
341 xComboRowSetSelected(x.GoPointer(), PositionVar)
342
343}
344
345var xComboRowSetUseSubtitle func(uintptr, bool)
346
347// Sets whether to use the current value as the subtitle.
348//
349// If you use a custom list item factory, you will need to give the row a
350// name conversion expression with [property@ComboRow:expression].
351//
352// If set to `TRUE`, you should not access [property@ActionRow:subtitle].
353//
354// The subtitle is interpreted as Pango markup if
355// [property@PreferencesRow:use-markup] is set to `TRUE`.
356func (x *ComboRow) SetUseSubtitle(UseSubtitleVar bool) {
357
358 xComboRowSetUseSubtitle(x.GoPointer(), UseSubtitleVar)
359
360}
361
362func (c *ComboRow) GoPointer() uintptr {
363 if c == nil {
364 return 0
365 }
366 return c.Ptr
367}
368
369func (c *ComboRow) SetGoPointer(ptr uintptr) {
370 c.Ptr = ptr
371}
372
373// SetPropertyEnableSearch sets the "enable-search" property.
374// Whether to show a search entry in the popup.
375//
376// If set to `TRUE`, a search entry will be shown in the popup that
377// allows to search for items in the list.
378//
379// Search requires [property@ComboRow:expression] to be set.
380func (x *ComboRow) SetPropertyEnableSearch(value bool) {
381 var v gobject.Value
382 v.Init(gobject.TypeBooleanVal)
383 v.SetBoolean(value)
384 x.SetProperty("enable-search", &v)
385}
386
387// GetPropertyEnableSearch gets the "enable-search" property.
388// Whether to show a search entry in the popup.
389//
390// If set to `TRUE`, a search entry will be shown in the popup that
391// allows to search for items in the list.
392//
393// Search requires [property@ComboRow:expression] to be set.
394func (x *ComboRow) GetPropertyEnableSearch() bool {
395 var v gobject.Value
396 x.GetProperty("enable-search", &v)
397 return v.GetBoolean()
398}
399
400// SetPropertySelected sets the "selected" property.
401// The position of the selected item.
402//
403// If no item is selected, the property has the value
404// [const@Gtk.INVALID_LIST_POSITION]
405func (x *ComboRow) SetPropertySelected(value uint) {
406 var v gobject.Value
407 v.Init(gobject.TypeUintVal)
408 v.SetUint(value)
409 x.SetProperty("selected", &v)
410}
411
412// GetPropertySelected gets the "selected" property.
413// The position of the selected item.
414//
415// If no item is selected, the property has the value
416// [const@Gtk.INVALID_LIST_POSITION]
417func (x *ComboRow) GetPropertySelected() uint {
418 var v gobject.Value
419 x.GetProperty("selected", &v)
420 return v.GetUint()
421}
422
423// SetPropertyUseSubtitle sets the "use-subtitle" property.
424// Whether to use the current value as the subtitle.
425//
426// If you use a custom list item factory, you will need to give the row a
427// name conversion expression with [property@ComboRow:expression].
428//
429// If set to `TRUE`, you should not access [property@ActionRow:subtitle].
430//
431// The subtitle is interpreted as Pango markup if
432// [property@PreferencesRow:use-markup] is set to `TRUE`.
433func (x *ComboRow) SetPropertyUseSubtitle(value bool) {
434 var v gobject.Value
435 v.Init(gobject.TypeBooleanVal)
436 v.SetBoolean(value)
437 x.SetProperty("use-subtitle", &v)
438}
439
440// GetPropertyUseSubtitle gets the "use-subtitle" property.
441// Whether to use the current value as the subtitle.
442//
443// If you use a custom list item factory, you will need to give the row a
444// name conversion expression with [property@ComboRow:expression].
445//
446// If set to `TRUE`, you should not access [property@ActionRow:subtitle].
447//
448// The subtitle is interpreted as Pango markup if
449// [property@PreferencesRow:use-markup] is set to `TRUE`.
450func (x *ComboRow) GetPropertyUseSubtitle() bool {
451 var v gobject.Value
452 x.GetProperty("use-subtitle", &v)
453 return v.GetBoolean()
454}
455
456// Requests the user's screen reader to announce the given message.
457//
458// This kind of notification is useful for messages that
459// either have only a visual representation or that are not
460// exposed visually at all, e.g. a notification about a
461// successful operation.
462//
463// Also, by using this API, you can ensure that the message
464// does not interrupts the user's current screen reader output.
465func (x *ComboRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
466
467 gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
468
469}
470
471// Retrieves the accessible parent for an accessible object.
472//
473// This function returns `NULL` for top level widgets.
474func (x *ComboRow) GetAccessibleParent() *gtk.AccessibleBase {
475 var cls *gtk.AccessibleBase
476
477 cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
478
479 if cret == 0 {
480 return nil
481 }
482 cls = >k.AccessibleBase{}
483 cls.Ptr = cret
484 return cls
485}
486
487// Retrieves the accessible role of an accessible object.
488func (x *ComboRow) GetAccessibleRole() gtk.AccessibleRole {
489
490 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
491 return cret
492}
493
494// Retrieves the implementation for the given accessible object.
495func (x *ComboRow) GetAtContext() *gtk.ATContext {
496 var cls *gtk.ATContext
497
498 cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
499
500 if cret == 0 {
501 return nil
502 }
503 cls = >k.ATContext{}
504 cls.Ptr = cret
505 return cls
506}
507
508// Queries the coordinates and dimensions of this accessible
509//
510// This functionality can be overridden by `GtkAccessible`
511// implementations, e.g. to get the bounds from an ignored
512// child widget.
513func (x *ComboRow) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
514
515 cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
516 return cret
517}
518
519// Retrieves the first accessible child of an accessible object.
520func (x *ComboRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
521 var cls *gtk.AccessibleBase
522
523 cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
524
525 if cret == 0 {
526 return nil
527 }
528 cls = >k.AccessibleBase{}
529 cls.Ptr = cret
530 return cls
531}
532
533// Retrieves the next accessible sibling of an accessible object
534func (x *ComboRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
535 var cls *gtk.AccessibleBase
536
537 cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
538
539 if cret == 0 {
540 return nil
541 }
542 cls = >k.AccessibleBase{}
543 cls.Ptr = cret
544 return cls
545}
546
547// Queries a platform state, such as focus.
548//
549// This functionality can be overridden by `GtkAccessible`
550// implementations, e.g. to get platform state from an ignored
551// child widget, as is the case for `GtkText` wrappers.
552func (x *ComboRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
553
554 cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
555 return cret
556}
557
558// Resets the accessible property to its default value.
559func (x *ComboRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
560
561 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
562
563}
564
565// Resets the accessible relation to its default value.
566func (x *ComboRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
567
568 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
569
570}
571
572// Resets the accessible state to its default value.
573func (x *ComboRow) ResetState(StateVar gtk.AccessibleState) {
574
575 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
576
577}
578
579// Sets the parent and sibling of an accessible object.
580//
581// This function is meant to be used by accessible implementations that are
582// not part of the widget hierarchy, and but act as a logical bridge between
583// widgets. For instance, if a widget creates an object that holds metadata
584// for each child, and you want that object to implement the `GtkAccessible`
585// interface, you will use this function to ensure that the parent of each
586// child widget is the metadata object, and the parent of each metadata
587// object is the container widget.
588func (x *ComboRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
589
590 gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
591
592}
593
594// Updates the next accessible sibling.
595//
596// That might be useful when a new child of a custom accessible
597// is created, and it needs to be linked to a previous child.
598func (x *ComboRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
599
600 gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
601
602}
603
604// Informs ATs that the platform state has changed.
605//
606// This function should be used by `GtkAccessible` implementations that
607// have a platform state but are not widgets. Widgets handle platform
608// states automatically.
609func (x *ComboRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
610
611 gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
612
613}
614
615// Updates a list of accessible properties.
616//
617// See the [enum@Gtk.AccessibleProperty] documentation for the
618// value types of accessible properties.
619//
620// This function should be called by `GtkWidget` types whenever
621// an accessible property change must be communicated to assistive
622// technologies.
623//
624// Example:
625// ```c
626// value = gtk_adjustment_get_value (adjustment);
627// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
628//
629// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
630// -1);
631//
632// ```
633func (x *ComboRow) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
634
635 gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
636
637}
638
639// Updates an array of accessible properties.
640//
641// This function should be called by `GtkWidget` types whenever an accessible
642// property change must be communicated to assistive technologies.
643//
644// This function is meant to be used by language bindings.
645func (x *ComboRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
646
647 gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
648
649}
650
651// Updates a list of accessible relations.
652//
653// This function should be called by `GtkWidget` types whenever an accessible
654// relation change must be communicated to assistive technologies.
655//
656// If the [enum@Gtk.AccessibleRelation] requires a list of references,
657// you should pass each reference individually, followed by `NULL`, e.g.
658//
659// ```c
660// gtk_accessible_update_relation (accessible,
661//
662// GTK_ACCESSIBLE_RELATION_CONTROLS,
663// ref1, NULL,
664// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
665// ref1, ref2, ref3, NULL,
666// -1);
667//
668// ```
669func (x *ComboRow) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
670
671 gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
672
673}
674
675// Updates an array of accessible relations.
676//
677// This function should be called by `GtkWidget` types whenever an accessible
678// relation change must be communicated to assistive technologies.
679//
680// This function is meant to be used by language bindings.
681func (x *ComboRow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
682
683 gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
684
685}
686
687// Updates a list of accessible states.
688//
689// See the [enum@Gtk.AccessibleState] documentation for the
690// value types of accessible states.
691//
692// This function should be called by `GtkWidget` types whenever
693// an accessible state change must be communicated to assistive
694// technologies.
695//
696// Example:
697//
698// ```c
699// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
700// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
701//
702// GTK_ACCESSIBLE_STATE_CHECKED, value,
703// -1);
704//
705// ```
706func (x *ComboRow) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
707
708 gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
709
710}
711
712// Updates an array of accessible states.
713//
714// This function should be called by `GtkWidget` types whenever an accessible
715// state change must be communicated to assistive technologies.
716//
717// This function is meant to be used by language bindings.
718func (x *ComboRow) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
719
720 gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
721
722}
723
724// Gets the action name for @actionable.
725func (x *ComboRow) GetActionName() string {
726
727 cret := gtk.XGtkActionableGetActionName(x.GoPointer())
728 return cret
729}
730
731// Gets the current target value of @actionable.
732func (x *ComboRow) GetActionTargetValue() *glib.Variant {
733
734 cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
735 return cret
736}
737
738// Specifies the name of the action with which this widget should be
739// associated.
740//
741// If @action_name is %NULL then the widget will be unassociated from
742// any previous action.
743//
744// Usually this function is used when the widget is located (or will be
745// located) within the hierarchy of a `GtkApplicationWindow`.
746//
747// Names are of the form “win.save” or “app.quit” for actions on the
748// containing [class@ApplicationWindow] or its associated [class@Application],
749// respectively. This is the same form used for actions in the [class@Gio.Menu]
750// associated with the window.
751func (x *ComboRow) SetActionName(ActionNameVar *string) {
752
753 ActionNameVarPtr := core.GStrdupNullable(ActionNameVar)
754 defer core.GFreeNullable(ActionNameVarPtr)
755
756 gtk.XGtkActionableSetActionName(x.GoPointer(), ActionNameVarPtr)
757
758}
759
760// Sets the target of an actionable widget.
761//
762// This is a convenience function that calls [ctor@GLib.Variant.new] for
763// @format_string and uses the result to call
764// [method@Gtk.Actionable.set_action_target_value].
765//
766// If you are setting a string-valued target and want to set
767// the action name at the same time, you can use
768// [method@Gtk.Actionable.set_detailed_action_name].
769func (x *ComboRow) SetActionTarget(FormatStringVar string, varArgs ...interface{}) {
770
771 gtk.XGtkActionableSetActionTarget(x.GoPointer(), FormatStringVar, varArgs...)
772
773}
774
775// Sets the target value of an actionable widget.
776//
777// If @target_value is %NULL then the target value is unset.
778//
779// The target value has two purposes. First, it is used as the parameter
780// to activation of the action associated with the `GtkActionable` widget.
781// Second, it is used to determine if the widget should be rendered as
782// “active” — the widget is active if the state is equal to the given target.
783//
784// Consider the example of associating a set of buttons with a [iface@Gio.Action]
785// with string state in a typical “radio button” situation. Each button
786// will be associated with the same action, but with a different target
787// value for that action. Clicking on a particular button will activate
788// the action with the target of that button, which will typically cause
789// the action’s state to change to that value. Since the action’s state
790// is now equal to the target value of the button, the button will now
791// be rendered as active (and the other buttons, with different targets,
792// rendered inactive).
793func (x *ComboRow) SetActionTargetValue(TargetValueVar *glib.Variant) {
794
795 gtk.XGtkActionableSetActionTargetValue(x.GoPointer(), TargetValueVar)
796
797}
798
799// Sets the action-name and associated string target value of an
800// actionable widget.
801//
802// @detailed_action_name is a string in the format accepted by
803// [func@Gio.Action.parse_detailed_name].
804func (x *ComboRow) SetDetailedActionName(DetailedActionNameVar string) {
805
806 gtk.XGtkActionableSetDetailedActionName(x.GoPointer(), DetailedActionNameVar)
807
808}
809
810// Gets the ID of the @buildable object.
811//
812// `GtkBuilder` sets the name based on the ID attribute
813// of the `<object>` tag used to construct the @buildable.
814func (x *ComboRow) GetBuildableId() string {
815
816 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
817 return cret
818}
819
820func init() {
821 core.SetPackageName("ADW", "libadwaita-1")
822 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
823 var libs []uintptr
824 for _, libPath := range core.GetPaths("ADW") {
825 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
826 if err != nil {
827 panic(err)
828 }
829 libs = append(libs, lib)
830 }
831
832 core.PuregoSafeRegister(&xComboRowGLibType, libs, "adw_combo_row_get_type")
833
834 core.PuregoSafeRegister(&xNewComboRow, libs, "adw_combo_row_new")
835
836 core.PuregoSafeRegister(&xComboRowGetEnableSearch, libs, "adw_combo_row_get_enable_search")
837 core.PuregoSafeRegister(&xComboRowGetExpression, libs, "adw_combo_row_get_expression")
838 core.PuregoSafeRegister(&xComboRowGetFactory, libs, "adw_combo_row_get_factory")
839 core.PuregoSafeRegister(&xComboRowGetHeaderFactory, libs, "adw_combo_row_get_header_factory")
840 core.PuregoSafeRegister(&xComboRowGetListFactory, libs, "adw_combo_row_get_list_factory")
841 core.PuregoSafeRegister(&xComboRowGetModel, libs, "adw_combo_row_get_model")
842 core.PuregoSafeRegister(&xComboRowGetSearchMatchMode, libs, "adw_combo_row_get_search_match_mode")
843 core.PuregoSafeRegister(&xComboRowGetSelected, libs, "adw_combo_row_get_selected")
844 core.PuregoSafeRegister(&xComboRowGetSelectedItem, libs, "adw_combo_row_get_selected_item")
845 core.PuregoSafeRegister(&xComboRowGetUseSubtitle, libs, "adw_combo_row_get_use_subtitle")
846 core.PuregoSafeRegister(&xComboRowSetEnableSearch, libs, "adw_combo_row_set_enable_search")
847 core.PuregoSafeRegister(&xComboRowSetExpression, libs, "adw_combo_row_set_expression")
848 core.PuregoSafeRegister(&xComboRowSetFactory, libs, "adw_combo_row_set_factory")
849 core.PuregoSafeRegister(&xComboRowSetHeaderFactory, libs, "adw_combo_row_set_header_factory")
850 core.PuregoSafeRegister(&xComboRowSetListFactory, libs, "adw_combo_row_set_list_factory")
851 core.PuregoSafeRegister(&xComboRowSetModel, libs, "adw_combo_row_set_model")
852 core.PuregoSafeRegister(&xComboRowSetSearchMatchMode, libs, "adw_combo_row_set_search_match_mode")
853 core.PuregoSafeRegister(&xComboRowSetSelected, libs, "adw_combo_row_set_selected")
854 core.PuregoSafeRegister(&xComboRowSetUseSubtitle, libs, "adw_combo_row_set_use_subtitle")
855
856}