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/glib"
12 "github.com/bnema/puregotk/v4/gobject"
13 "github.com/bnema/puregotk/v4/gobject/types"
14 "github.com/bnema/puregotk/v4/gtk"
15)
16
17type ExpanderRowClass struct {
18 _ structs.HostLayout
19
20 ParentClass PreferencesRowClass
21
22 Padding [4]uintptr
23}
24
25func (x *ExpanderRowClass) GoPointer() uintptr {
26 return uintptr(unsafe.Pointer(x))
27}
28
29// A [class@Gtk.ListBoxRow] used to reveal widgets.
30//
31// <picture>
32//
33// <source srcset="expander-row-dark.png" media="(prefers-color-scheme: dark)">
34// <img src="expander-row.png" alt="expander-row">
35//
36// </picture>
37//
38// The `AdwExpanderRow` widget allows the user to reveal or hide widgets below
39// it. It also allows the user to enable the expansion of the row, allowing to
40// disable all that the row contains.
41//
42// ## AdwExpanderRow as GtkBuildable
43//
44// The `AdwExpanderRow` implementation of the [iface@Gtk.Buildable] interface
45// supports adding a child as an suffix widget by specifying “suffix” as the
46// “type” attribute of a <child> element.
47//
48// It also supports adding it as a prefix widget by specifying “prefix” as the
49// “type” attribute of a <child> element.
50//
51// ## CSS nodes
52//
53// `AdwExpanderRow` has a main CSS node with name `row` and the `.expander`
54// style class. It has the `.empty` style class when it contains no children.
55//
56// It contains the subnodes `row.header` for its main embedded row,
57// `list.nested` for the list it can expand, and `image.expander-row-arrow` for
58// its arrow.
59//
60// ## Style classes
61//
62// `AdwExpanderRow` can use the [`.`](style-classes.html#property-rows)
63// style class to emphasize the row subtitle instead of the row title, which is
64// useful for displaying read-only properties.
65//
66// When used together with the `.monospace` style class, only the subtitle
67// becomes monospace, not the title or any extra widgets.
68type ExpanderRow struct {
69 PreferencesRow
70}
71
72var xExpanderRowGLibType func() types.GType
73
74func ExpanderRowGLibType() types.GType {
75 return xExpanderRowGLibType()
76}
77
78func ExpanderRowNewFromInternalPtr(ptr uintptr) *ExpanderRow {
79 cls := &ExpanderRow{}
80 cls.Ptr = ptr
81 return cls
82}
83
84var xNewExpanderRow func() uintptr
85
86// Creates a new `AdwExpanderRow`.
87func NewExpanderRow() *ExpanderRow {
88 var cls *ExpanderRow
89
90 cret := xNewExpanderRow()
91
92 if cret == 0 {
93 return nil
94 }
95 gobject.IncreaseRef(cret)
96 cls = &ExpanderRow{}
97 cls.Ptr = cret
98 return cls
99}
100
101var xExpanderRowAddAction func(uintptr, uintptr)
102
103// Adds an action widget to @self.
104func (x *ExpanderRow) AddAction(WidgetVar *gtk.Widget) {
105
106 xExpanderRowAddAction(x.GoPointer(), WidgetVar.GoPointer())
107
108}
109
110var xExpanderRowAddPrefix func(uintptr, uintptr)
111
112// Adds a prefix widget to @self.
113func (x *ExpanderRow) AddPrefix(WidgetVar *gtk.Widget) {
114
115 xExpanderRowAddPrefix(x.GoPointer(), WidgetVar.GoPointer())
116
117}
118
119var xExpanderRowAddRow func(uintptr, uintptr)
120
121// Adds a widget to @self.
122//
123// The widget will appear in the expanding list below @self.
124func (x *ExpanderRow) AddRow(ChildVar *gtk.Widget) {
125
126 xExpanderRowAddRow(x.GoPointer(), ChildVar.GoPointer())
127
128}
129
130var xExpanderRowAddSuffix func(uintptr, uintptr)
131
132// Adds an suffix widget to @self.
133func (x *ExpanderRow) AddSuffix(WidgetVar *gtk.Widget) {
134
135 xExpanderRowAddSuffix(x.GoPointer(), WidgetVar.GoPointer())
136
137}
138
139var xExpanderRowGetEnableExpansion func(uintptr) bool
140
141// Gets whether the expansion of @self is enabled.
142func (x *ExpanderRow) GetEnableExpansion() bool {
143
144 cret := xExpanderRowGetEnableExpansion(x.GoPointer())
145 return cret
146}
147
148var xExpanderRowGetExpanded func(uintptr) bool
149
150// Gets whether @self is expanded.
151func (x *ExpanderRow) GetExpanded() bool {
152
153 cret := xExpanderRowGetExpanded(x.GoPointer())
154 return cret
155}
156
157var xExpanderRowGetIconName func(uintptr) string
158
159// Gets the icon name for @self.
160func (x *ExpanderRow) GetIconName() string {
161
162 cret := xExpanderRowGetIconName(x.GoPointer())
163 return cret
164}
165
166var xExpanderRowGetShowEnableSwitch func(uintptr) bool
167
168// Gets whether the switch enabling the expansion of @self is visible.
169func (x *ExpanderRow) GetShowEnableSwitch() bool {
170
171 cret := xExpanderRowGetShowEnableSwitch(x.GoPointer())
172 return cret
173}
174
175var xExpanderRowGetSubtitle func(uintptr) string
176
177// Gets the subtitle for @self.
178func (x *ExpanderRow) GetSubtitle() string {
179
180 cret := xExpanderRowGetSubtitle(x.GoPointer())
181 return cret
182}
183
184var xExpanderRowGetSubtitleLines func(uintptr) int
185
186// Gets the number of lines at the end of which the subtitle label will be
187// ellipsized.
188func (x *ExpanderRow) GetSubtitleLines() int {
189
190 cret := xExpanderRowGetSubtitleLines(x.GoPointer())
191 return cret
192}
193
194var xExpanderRowGetTitleLines func(uintptr) int
195
196// Gets the number of lines at the end of which the title label will be
197// ellipsized.
198func (x *ExpanderRow) GetTitleLines() int {
199
200 cret := xExpanderRowGetTitleLines(x.GoPointer())
201 return cret
202}
203
204var xExpanderRowRemove func(uintptr, uintptr)
205
206// Removes a child from @self.
207func (x *ExpanderRow) Remove(ChildVar *gtk.Widget) {
208
209 xExpanderRowRemove(x.GoPointer(), ChildVar.GoPointer())
210
211}
212
213var xExpanderRowSetEnableExpansion func(uintptr, bool)
214
215// Sets whether the expansion of @self is enabled.
216func (x *ExpanderRow) SetEnableExpansion(EnableExpansionVar bool) {
217
218 xExpanderRowSetEnableExpansion(x.GoPointer(), EnableExpansionVar)
219
220}
221
222var xExpanderRowSetExpanded func(uintptr, bool)
223
224// Sets whether @self is expanded.
225func (x *ExpanderRow) SetExpanded(ExpandedVar bool) {
226
227 xExpanderRowSetExpanded(x.GoPointer(), ExpandedVar)
228
229}
230
231var xExpanderRowSetIconName func(uintptr, uintptr)
232
233// Sets the icon name for @self.
234func (x *ExpanderRow) SetIconName(IconNameVar *string) {
235
236 IconNameVarPtr := core.GStrdupNullable(IconNameVar)
237 defer core.GFreeNullable(IconNameVarPtr)
238
239 xExpanderRowSetIconName(x.GoPointer(), IconNameVarPtr)
240
241}
242
243var xExpanderRowSetShowEnableSwitch func(uintptr, bool)
244
245// Sets whether the switch enabling the expansion of @self is visible.
246func (x *ExpanderRow) SetShowEnableSwitch(ShowEnableSwitchVar bool) {
247
248 xExpanderRowSetShowEnableSwitch(x.GoPointer(), ShowEnableSwitchVar)
249
250}
251
252var xExpanderRowSetSubtitle func(uintptr, string)
253
254// Sets the subtitle for @self.
255//
256// The subtitle is interpreted as Pango markup unless
257// [property@PreferencesRow:use-markup] is set to `FALSE`.
258func (x *ExpanderRow) SetSubtitle(SubtitleVar string) {
259
260 xExpanderRowSetSubtitle(x.GoPointer(), SubtitleVar)
261
262}
263
264var xExpanderRowSetSubtitleLines func(uintptr, int)
265
266// Sets the number of lines at the end of which the subtitle label will be
267// ellipsized.
268//
269// If the value is 0, the number of lines won't be limited.
270func (x *ExpanderRow) SetSubtitleLines(SubtitleLinesVar int) {
271
272 xExpanderRowSetSubtitleLines(x.GoPointer(), SubtitleLinesVar)
273
274}
275
276var xExpanderRowSetTitleLines func(uintptr, int)
277
278// Sets the number of lines at the end of which the title label will be
279// ellipsized.
280//
281// If the value is 0, the number of lines won't be limited.
282func (x *ExpanderRow) SetTitleLines(TitleLinesVar int) {
283
284 xExpanderRowSetTitleLines(x.GoPointer(), TitleLinesVar)
285
286}
287
288func (c *ExpanderRow) GoPointer() uintptr {
289 if c == nil {
290 return 0
291 }
292 return c.Ptr
293}
294
295func (c *ExpanderRow) SetGoPointer(ptr uintptr) {
296 c.Ptr = ptr
297}
298
299// SetPropertyEnableExpansion sets the "enable-expansion" property.
300// Whether expansion is enabled.
301func (x *ExpanderRow) SetPropertyEnableExpansion(value bool) {
302 var v gobject.Value
303 v.Init(gobject.TypeBooleanVal)
304 v.SetBoolean(value)
305 x.SetProperty("enable-expansion", &v)
306}
307
308// GetPropertyEnableExpansion gets the "enable-expansion" property.
309// Whether expansion is enabled.
310func (x *ExpanderRow) GetPropertyEnableExpansion() bool {
311 var v gobject.Value
312 x.GetProperty("enable-expansion", &v)
313 return v.GetBoolean()
314}
315
316// SetPropertyExpanded sets the "expanded" property.
317// Whether the row is expanded.
318func (x *ExpanderRow) SetPropertyExpanded(value bool) {
319 var v gobject.Value
320 v.Init(gobject.TypeBooleanVal)
321 v.SetBoolean(value)
322 x.SetProperty("expanded", &v)
323}
324
325// GetPropertyExpanded gets the "expanded" property.
326// Whether the row is expanded.
327func (x *ExpanderRow) GetPropertyExpanded() bool {
328 var v gobject.Value
329 x.GetProperty("expanded", &v)
330 return v.GetBoolean()
331}
332
333// SetPropertyIconName sets the "icon-name" property.
334// The icon name for this row.
335func (x *ExpanderRow) SetPropertyIconName(value string) {
336 var v gobject.Value
337 v.Init(gobject.TypeStringVal)
338 v.SetString(&value)
339 x.SetProperty("icon-name", &v)
340}
341
342// GetPropertyIconName gets the "icon-name" property.
343// The icon name for this row.
344func (x *ExpanderRow) GetPropertyIconName() string {
345 var v gobject.Value
346 x.GetProperty("icon-name", &v)
347 return v.GetString()
348}
349
350// SetPropertyShowEnableSwitch sets the "show-enable-switch" property.
351// Whether the switch enabling the expansion is visible.
352func (x *ExpanderRow) SetPropertyShowEnableSwitch(value bool) {
353 var v gobject.Value
354 v.Init(gobject.TypeBooleanVal)
355 v.SetBoolean(value)
356 x.SetProperty("show-enable-switch", &v)
357}
358
359// GetPropertyShowEnableSwitch gets the "show-enable-switch" property.
360// Whether the switch enabling the expansion is visible.
361func (x *ExpanderRow) GetPropertyShowEnableSwitch() bool {
362 var v gobject.Value
363 x.GetProperty("show-enable-switch", &v)
364 return v.GetBoolean()
365}
366
367// SetPropertySubtitle sets the "subtitle" property.
368// The subtitle for this row.
369//
370// The subtitle is interpreted as Pango markup unless
371// [property@PreferencesRow:use-markup] is set to `FALSE`.
372func (x *ExpanderRow) SetPropertySubtitle(value string) {
373 var v gobject.Value
374 v.Init(gobject.TypeStringVal)
375 v.SetString(&value)
376 x.SetProperty("subtitle", &v)
377}
378
379// GetPropertySubtitle gets the "subtitle" property.
380// The subtitle for this row.
381//
382// The subtitle is interpreted as Pango markup unless
383// [property@PreferencesRow:use-markup] is set to `FALSE`.
384func (x *ExpanderRow) GetPropertySubtitle() string {
385 var v gobject.Value
386 x.GetProperty("subtitle", &v)
387 return v.GetString()
388}
389
390// SetPropertySubtitleLines sets the "subtitle-lines" property.
391// The number of lines at the end of which the subtitle label will be
392// ellipsized.
393//
394// If the value is 0, the number of lines won't be limited.
395func (x *ExpanderRow) SetPropertySubtitleLines(value int) {
396 var v gobject.Value
397 v.Init(gobject.TypeIntVal)
398 v.SetInt(value)
399 x.SetProperty("subtitle-lines", &v)
400}
401
402// GetPropertySubtitleLines gets the "subtitle-lines" property.
403// The number of lines at the end of which the subtitle label will be
404// ellipsized.
405//
406// If the value is 0, the number of lines won't be limited.
407func (x *ExpanderRow) GetPropertySubtitleLines() int {
408 var v gobject.Value
409 x.GetProperty("subtitle-lines", &v)
410 return v.GetInt()
411}
412
413// SetPropertyTitleLines sets the "title-lines" property.
414// The number of lines at the end of which the title label will be ellipsized.
415//
416// If the value is 0, the number of lines won't be limited.
417func (x *ExpanderRow) SetPropertyTitleLines(value int) {
418 var v gobject.Value
419 v.Init(gobject.TypeIntVal)
420 v.SetInt(value)
421 x.SetProperty("title-lines", &v)
422}
423
424// GetPropertyTitleLines gets the "title-lines" property.
425// The number of lines at the end of which the title label will be ellipsized.
426//
427// If the value is 0, the number of lines won't be limited.
428func (x *ExpanderRow) GetPropertyTitleLines() int {
429 var v gobject.Value
430 x.GetProperty("title-lines", &v)
431 return v.GetInt()
432}
433
434// Requests the user's screen reader to announce the given message.
435//
436// This kind of notification is useful for messages that
437// either have only a visual representation or that are not
438// exposed visually at all, e.g. a notification about a
439// successful operation.
440//
441// Also, by using this API, you can ensure that the message
442// does not interrupts the user's current screen reader output.
443func (x *ExpanderRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
444
445 gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
446
447}
448
449// Retrieves the accessible parent for an accessible object.
450//
451// This function returns `NULL` for top level widgets.
452func (x *ExpanderRow) GetAccessibleParent() *gtk.AccessibleBase {
453 var cls *gtk.AccessibleBase
454
455 cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
456
457 if cret == 0 {
458 return nil
459 }
460 cls = >k.AccessibleBase{}
461 cls.Ptr = cret
462 return cls
463}
464
465// Retrieves the accessible role of an accessible object.
466func (x *ExpanderRow) GetAccessibleRole() gtk.AccessibleRole {
467
468 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
469 return cret
470}
471
472// Retrieves the implementation for the given accessible object.
473func (x *ExpanderRow) GetAtContext() *gtk.ATContext {
474 var cls *gtk.ATContext
475
476 cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
477
478 if cret == 0 {
479 return nil
480 }
481 cls = >k.ATContext{}
482 cls.Ptr = cret
483 return cls
484}
485
486// Queries the coordinates and dimensions of this accessible
487//
488// This functionality can be overridden by `GtkAccessible`
489// implementations, e.g. to get the bounds from an ignored
490// child widget.
491func (x *ExpanderRow) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
492
493 cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
494 return cret
495}
496
497// Retrieves the first accessible child of an accessible object.
498func (x *ExpanderRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
499 var cls *gtk.AccessibleBase
500
501 cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
502
503 if cret == 0 {
504 return nil
505 }
506 cls = >k.AccessibleBase{}
507 cls.Ptr = cret
508 return cls
509}
510
511// Retrieves the next accessible sibling of an accessible object
512func (x *ExpanderRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
513 var cls *gtk.AccessibleBase
514
515 cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
516
517 if cret == 0 {
518 return nil
519 }
520 cls = >k.AccessibleBase{}
521 cls.Ptr = cret
522 return cls
523}
524
525// Queries a platform state, such as focus.
526//
527// This functionality can be overridden by `GtkAccessible`
528// implementations, e.g. to get platform state from an ignored
529// child widget, as is the case for `GtkText` wrappers.
530func (x *ExpanderRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
531
532 cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
533 return cret
534}
535
536// Resets the accessible property to its default value.
537func (x *ExpanderRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
538
539 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
540
541}
542
543// Resets the accessible relation to its default value.
544func (x *ExpanderRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
545
546 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
547
548}
549
550// Resets the accessible state to its default value.
551func (x *ExpanderRow) ResetState(StateVar gtk.AccessibleState) {
552
553 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
554
555}
556
557// Sets the parent and sibling of an accessible object.
558//
559// This function is meant to be used by accessible implementations that are
560// not part of the widget hierarchy, and but act as a logical bridge between
561// widgets. For instance, if a widget creates an object that holds metadata
562// for each child, and you want that object to implement the `GtkAccessible`
563// interface, you will use this function to ensure that the parent of each
564// child widget is the metadata object, and the parent of each metadata
565// object is the container widget.
566func (x *ExpanderRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
567
568 gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
569
570}
571
572// Updates the next accessible sibling.
573//
574// That might be useful when a new child of a custom accessible
575// is created, and it needs to be linked to a previous child.
576func (x *ExpanderRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
577
578 gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
579
580}
581
582// Informs ATs that the platform state has changed.
583//
584// This function should be used by `GtkAccessible` implementations that
585// have a platform state but are not widgets. Widgets handle platform
586// states automatically.
587func (x *ExpanderRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
588
589 gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
590
591}
592
593// Updates a list of accessible properties.
594//
595// See the [enum@Gtk.AccessibleProperty] documentation for the
596// value types of accessible properties.
597//
598// This function should be called by `GtkWidget` types whenever
599// an accessible property change must be communicated to assistive
600// technologies.
601//
602// Example:
603// ```c
604// value = gtk_adjustment_get_value (adjustment);
605// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
606//
607// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
608// -1);
609//
610// ```
611func (x *ExpanderRow) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
612
613 gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
614
615}
616
617// Updates an array of accessible properties.
618//
619// This function should be called by `GtkWidget` types whenever an accessible
620// property change must be communicated to assistive technologies.
621//
622// This function is meant to be used by language bindings.
623func (x *ExpanderRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
624
625 gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
626
627}
628
629// Updates a list of accessible relations.
630//
631// This function should be called by `GtkWidget` types whenever an accessible
632// relation change must be communicated to assistive technologies.
633//
634// If the [enum@Gtk.AccessibleRelation] requires a list of references,
635// you should pass each reference individually, followed by `NULL`, e.g.
636//
637// ```c
638// gtk_accessible_update_relation (accessible,
639//
640// GTK_ACCESSIBLE_RELATION_CONTROLS,
641// ref1, NULL,
642// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
643// ref1, ref2, ref3, NULL,
644// -1);
645//
646// ```
647func (x *ExpanderRow) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
648
649 gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
650
651}
652
653// Updates an array of accessible relations.
654//
655// This function should be called by `GtkWidget` types whenever an accessible
656// relation change must be communicated to assistive technologies.
657//
658// This function is meant to be used by language bindings.
659func (x *ExpanderRow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
660
661 gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
662
663}
664
665// Updates a list of accessible states.
666//
667// See the [enum@Gtk.AccessibleState] documentation for the
668// value types of accessible states.
669//
670// This function should be called by `GtkWidget` types whenever
671// an accessible state change must be communicated to assistive
672// technologies.
673//
674// Example:
675//
676// ```c
677// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
678// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
679//
680// GTK_ACCESSIBLE_STATE_CHECKED, value,
681// -1);
682//
683// ```
684func (x *ExpanderRow) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
685
686 gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
687
688}
689
690// Updates an array of accessible states.
691//
692// This function should be called by `GtkWidget` types whenever an accessible
693// state change must be communicated to assistive technologies.
694//
695// This function is meant to be used by language bindings.
696func (x *ExpanderRow) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
697
698 gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
699
700}
701
702// Gets the action name for @actionable.
703func (x *ExpanderRow) GetActionName() string {
704
705 cret := gtk.XGtkActionableGetActionName(x.GoPointer())
706 return cret
707}
708
709// Gets the current target value of @actionable.
710func (x *ExpanderRow) GetActionTargetValue() *glib.Variant {
711
712 cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
713 return cret
714}
715
716// Specifies the name of the action with which this widget should be
717// associated.
718//
719// If @action_name is %NULL then the widget will be unassociated from
720// any previous action.
721//
722// Usually this function is used when the widget is located (or will be
723// located) within the hierarchy of a `GtkApplicationWindow`.
724//
725// Names are of the form “win.save” or “app.quit” for actions on the
726// containing [class@ApplicationWindow] or its associated [class@Application],
727// respectively. This is the same form used for actions in the [class@Gio.Menu]
728// associated with the window.
729func (x *ExpanderRow) SetActionName(ActionNameVar *string) {
730
731 ActionNameVarPtr := core.GStrdupNullable(ActionNameVar)
732 defer core.GFreeNullable(ActionNameVarPtr)
733
734 gtk.XGtkActionableSetActionName(x.GoPointer(), ActionNameVarPtr)
735
736}
737
738// Sets the target of an actionable widget.
739//
740// This is a convenience function that calls [ctor@GLib.Variant.new] for
741// @format_string and uses the result to call
742// [method@Gtk.Actionable.set_action_target_value].
743//
744// If you are setting a string-valued target and want to set
745// the action name at the same time, you can use
746// [method@Gtk.Actionable.set_detailed_action_name].
747func (x *ExpanderRow) SetActionTarget(FormatStringVar string, varArgs ...interface{}) {
748
749 gtk.XGtkActionableSetActionTarget(x.GoPointer(), FormatStringVar, varArgs...)
750
751}
752
753// Sets the target value of an actionable widget.
754//
755// If @target_value is %NULL then the target value is unset.
756//
757// The target value has two purposes. First, it is used as the parameter
758// to activation of the action associated with the `GtkActionable` widget.
759// Second, it is used to determine if the widget should be rendered as
760// “active” — the widget is active if the state is equal to the given target.
761//
762// Consider the example of associating a set of buttons with a [iface@Gio.Action]
763// with string state in a typical “radio button” situation. Each button
764// will be associated with the same action, but with a different target
765// value for that action. Clicking on a particular button will activate
766// the action with the target of that button, which will typically cause
767// the action’s state to change to that value. Since the action’s state
768// is now equal to the target value of the button, the button will now
769// be rendered as active (and the other buttons, with different targets,
770// rendered inactive).
771func (x *ExpanderRow) SetActionTargetValue(TargetValueVar *glib.Variant) {
772
773 gtk.XGtkActionableSetActionTargetValue(x.GoPointer(), TargetValueVar)
774
775}
776
777// Sets the action-name and associated string target value of an
778// actionable widget.
779//
780// @detailed_action_name is a string in the format accepted by
781// [func@Gio.Action.parse_detailed_name].
782func (x *ExpanderRow) SetDetailedActionName(DetailedActionNameVar string) {
783
784 gtk.XGtkActionableSetDetailedActionName(x.GoPointer(), DetailedActionNameVar)
785
786}
787
788// Gets the ID of the @buildable object.
789//
790// `GtkBuilder` sets the name based on the ID attribute
791// of the `<object>` tag used to construct the @buildable.
792func (x *ExpanderRow) GetBuildableId() string {
793
794 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
795 return cret
796}
797
798func init() {
799 core.SetPackageName("ADW", "libadwaita-1")
800 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
801 var libs []uintptr
802 for _, libPath := range core.GetPaths("ADW") {
803 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
804 if err != nil {
805 panic(err)
806 }
807 libs = append(libs, lib)
808 }
809
810 core.PuregoSafeRegister(&xExpanderRowGLibType, libs, "adw_expander_row_get_type")
811
812 core.PuregoSafeRegister(&xNewExpanderRow, libs, "adw_expander_row_new")
813
814 core.PuregoSafeRegister(&xExpanderRowAddAction, libs, "adw_expander_row_add_action")
815 core.PuregoSafeRegister(&xExpanderRowAddPrefix, libs, "adw_expander_row_add_prefix")
816 core.PuregoSafeRegister(&xExpanderRowAddRow, libs, "adw_expander_row_add_row")
817 core.PuregoSafeRegister(&xExpanderRowAddSuffix, libs, "adw_expander_row_add_suffix")
818 core.PuregoSafeRegister(&xExpanderRowGetEnableExpansion, libs, "adw_expander_row_get_enable_expansion")
819 core.PuregoSafeRegister(&xExpanderRowGetExpanded, libs, "adw_expander_row_get_expanded")
820 core.PuregoSafeRegister(&xExpanderRowGetIconName, libs, "adw_expander_row_get_icon_name")
821 core.PuregoSafeRegister(&xExpanderRowGetShowEnableSwitch, libs, "adw_expander_row_get_show_enable_switch")
822 core.PuregoSafeRegister(&xExpanderRowGetSubtitle, libs, "adw_expander_row_get_subtitle")
823 core.PuregoSafeRegister(&xExpanderRowGetSubtitleLines, libs, "adw_expander_row_get_subtitle_lines")
824 core.PuregoSafeRegister(&xExpanderRowGetTitleLines, libs, "adw_expander_row_get_title_lines")
825 core.PuregoSafeRegister(&xExpanderRowRemove, libs, "adw_expander_row_remove")
826 core.PuregoSafeRegister(&xExpanderRowSetEnableExpansion, libs, "adw_expander_row_set_enable_expansion")
827 core.PuregoSafeRegister(&xExpanderRowSetExpanded, libs, "adw_expander_row_set_expanded")
828 core.PuregoSafeRegister(&xExpanderRowSetIconName, libs, "adw_expander_row_set_icon_name")
829 core.PuregoSafeRegister(&xExpanderRowSetShowEnableSwitch, libs, "adw_expander_row_set_show_enable_switch")
830 core.PuregoSafeRegister(&xExpanderRowSetSubtitle, libs, "adw_expander_row_set_subtitle")
831 core.PuregoSafeRegister(&xExpanderRowSetSubtitleLines, libs, "adw_expander_row_set_subtitle_lines")
832 core.PuregoSafeRegister(&xExpanderRowSetTitleLines, libs, "adw_expander_row_set_title_lines")
833
834}