v0.2.1 c0399be

adw-action-row.go RawHistoryFolder

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 ActionRowClass struct {
18	_ structs.HostLayout
19
20	ParentClass PreferencesRowClass
21
22	xActivate uintptr
23
24	Padding [4]uintptr
25}
26
27func (x *ActionRowClass) GoPointer() uintptr {
28	return uintptr(unsafe.Pointer(x))
29}
30
31// OverrideActivate sets the "activate" callback function.
32// Activates the row to trigger its main action.
33func (x *ActionRowClass) OverrideActivate(cb func(*ActionRow)) {
34	if cb == nil {
35		x.xActivate = 0
36	} else {
37		x.xActivate = purego.NewCallback(func(SelfVarp uintptr) {
38			cb(ActionRowNewFromInternalPtr(SelfVarp))
39		})
40	}
41}
42
43// GetActivate gets the "activate" callback function.
44// Activates the row to trigger its main action.
45func (x *ActionRowClass) GetActivate() func(*ActionRow) {
46	if x.xActivate == 0 {
47		return nil
48	}
49	var rawCallback func(SelfVarp uintptr)
50	purego.RegisterFunc(&rawCallback, x.xActivate)
51	return func(SelfVar *ActionRow) {
52		rawCallback(SelfVar.GoPointer())
53	}
54}
55
56// A [class@Gtk.ListBoxRow] used to present actions.
57//
58// <picture>
59//
60//	<source srcset="action-row-dark.png" media="(prefers-color-scheme: dark)">
61//	<img src="action-row.png" alt="action-row">
62//
63// </picture>
64//
65// The `AdwActionRow` widget can have a title, a subtitle and an icon. The row
66// can receive additional widgets at its end, or prefix widgets at its start.
67//
68// It is convenient to present a preference and its related actions.
69//
70// `AdwActionRow` is unactivatable by default, giving it an activatable widget
71// will automatically make it activatable, but unsetting it won't change the
72// row's activatability.
73//
74// ## AdwActionRow as GtkBuildable
75//
76// The `AdwActionRow` implementation of the [iface@Gtk.Buildable] interface
77// supports adding a child at its end by specifying “suffix” or omitting the
78// “type” attribute of a <child> element.
79//
80// It also supports adding a child as a prefix widget by specifying “prefix” as
81// the “type” attribute of a <child> element.
82//
83// ## CSS nodes
84//
85// `AdwActionRow` has a main CSS node with name `row`.
86//
87// It contains the subnode `box.header` for its main horizontal box, and
88// `box.title` for the vertical box containing the title and subtitle labels.
89//
90// It contains subnodes `label.title` and `label.subtitle` representing
91// respectively the title label and subtitle label.
92//
93// ## Style classes
94//
95// `AdwActionRow` can use the [`.property`](style-classes.html#property-rows)
96// style class to emphasize the row subtitle instead of the row title, which is
97// useful for displaying read-only properties.
98//
99// <picture>
100//
101//	<source srcset="property-row-dark.png" media="(prefers-color-scheme: dark)">
102//	<img src="property-row.png" alt="property-row">
103//
104// </picture>
105//
106// When used together with the `.monospace` style class, only the subtitle
107// becomes monospace, not the title or any extra widgets.
108type ActionRow struct {
109	PreferencesRow
110}
111
112var xActionRowGLibType func() types.GType
113
114func ActionRowGLibType() types.GType {
115	return xActionRowGLibType()
116}
117
118func ActionRowNewFromInternalPtr(ptr uintptr) *ActionRow {
119	cls := &ActionRow{}
120	cls.Ptr = ptr
121	return cls
122}
123
124var xNewActionRow func() uintptr
125
126// Creates a new `AdwActionRow`.
127func NewActionRow() *ActionRow {
128	var cls *ActionRow
129
130	cret := xNewActionRow()
131
132	if cret == 0 {
133		return nil
134	}
135	gobject.IncreaseRef(cret)
136	cls = &ActionRow{}
137	cls.Ptr = cret
138	return cls
139}
140
141var xActionRowActivate func(uintptr)
142
143// Activates @self.
144func (x *ActionRow) Activate() {
145
146	xActionRowActivate(x.GoPointer())
147
148}
149
150var xActionRowAddPrefix func(uintptr, uintptr)
151
152// Adds a prefix widget to @self.
153func (x *ActionRow) AddPrefix(WidgetVar *gtk.Widget) {
154
155	xActionRowAddPrefix(x.GoPointer(), WidgetVar.GoPointer())
156
157}
158
159var xActionRowAddSuffix func(uintptr, uintptr)
160
161// Adds a suffix widget to @self.
162func (x *ActionRow) AddSuffix(WidgetVar *gtk.Widget) {
163
164	xActionRowAddSuffix(x.GoPointer(), WidgetVar.GoPointer())
165
166}
167
168var xActionRowGetActivatableWidget func(uintptr) uintptr
169
170// Gets the widget activated when @self is activated.
171func (x *ActionRow) GetActivatableWidget() *gtk.Widget {
172	var cls *gtk.Widget
173
174	cret := xActionRowGetActivatableWidget(x.GoPointer())
175
176	if cret == 0 {
177		return nil
178	}
179	gobject.IncreaseRef(cret)
180	cls = &gtk.Widget{}
181	cls.Ptr = cret
182	return cls
183}
184
185var xActionRowGetIconName func(uintptr) string
186
187// Gets the icon name for @self.
188func (x *ActionRow) GetIconName() string {
189
190	cret := xActionRowGetIconName(x.GoPointer())
191	return cret
192}
193
194var xActionRowGetSubtitle func(uintptr) string
195
196// Gets the subtitle for @self.
197func (x *ActionRow) GetSubtitle() string {
198
199	cret := xActionRowGetSubtitle(x.GoPointer())
200	return cret
201}
202
203var xActionRowGetSubtitleLines func(uintptr) int
204
205// Gets the number of lines at the end of which the subtitle label will be
206// ellipsized.
207func (x *ActionRow) GetSubtitleLines() int {
208
209	cret := xActionRowGetSubtitleLines(x.GoPointer())
210	return cret
211}
212
213var xActionRowGetSubtitleSelectable func(uintptr) bool
214
215// Gets whether the user can copy the subtitle from the label
216func (x *ActionRow) GetSubtitleSelectable() bool {
217
218	cret := xActionRowGetSubtitleSelectable(x.GoPointer())
219	return cret
220}
221
222var xActionRowGetTitleLines func(uintptr) int
223
224// Gets the number of lines at the end of which the title label will be
225// ellipsized.
226func (x *ActionRow) GetTitleLines() int {
227
228	cret := xActionRowGetTitleLines(x.GoPointer())
229	return cret
230}
231
232var xActionRowRemove func(uintptr, uintptr)
233
234// Removes a child from @self.
235func (x *ActionRow) Remove(WidgetVar *gtk.Widget) {
236
237	xActionRowRemove(x.GoPointer(), WidgetVar.GoPointer())
238
239}
240
241var xActionRowSetActivatableWidget func(uintptr, uintptr)
242
243// Sets the widget to activate when @self is activated.
244//
245// The row can be activated either by clicking on it, calling
246// [method@ActionRow.activate], or via mnemonics in the title.
247// See the [property@PreferencesRow:use-underline] property to enable mnemonics.
248//
249// The target widget will be activated by emitting the
250// [signal@Gtk.Widget::mnemonic-activate] signal on it.
251func (x *ActionRow) SetActivatableWidget(WidgetVar *gtk.Widget) {
252
253	xActionRowSetActivatableWidget(x.GoPointer(), WidgetVar.GoPointer())
254
255}
256
257var xActionRowSetIconName func(uintptr, uintptr)
258
259// Sets the icon name for @self.
260func (x *ActionRow) SetIconName(IconNameVar *string) {
261
262	IconNameVarPtr := core.GStrdupNullable(IconNameVar)
263	defer core.GFreeNullable(IconNameVarPtr)
264
265	xActionRowSetIconName(x.GoPointer(), IconNameVarPtr)
266
267}
268
269var xActionRowSetSubtitle func(uintptr, string)
270
271// Sets the subtitle for @self.
272//
273// The subtitle is interpreted as Pango markup unless
274// [property@PreferencesRow:use-markup] is set to `FALSE`.
275func (x *ActionRow) SetSubtitle(SubtitleVar string) {
276
277	xActionRowSetSubtitle(x.GoPointer(), SubtitleVar)
278
279}
280
281var xActionRowSetSubtitleLines func(uintptr, int)
282
283// Sets the number of lines at the end of which the subtitle label will be
284// ellipsized.
285//
286// If the value is 0, the number of lines won't be limited.
287func (x *ActionRow) SetSubtitleLines(SubtitleLinesVar int) {
288
289	xActionRowSetSubtitleLines(x.GoPointer(), SubtitleLinesVar)
290
291}
292
293var xActionRowSetSubtitleSelectable func(uintptr, bool)
294
295// Sets whether the user can copy the subtitle from the label
296//
297// See also [property@Gtk.Label:selectable].
298func (x *ActionRow) SetSubtitleSelectable(SubtitleSelectableVar bool) {
299
300	xActionRowSetSubtitleSelectable(x.GoPointer(), SubtitleSelectableVar)
301
302}
303
304var xActionRowSetTitleLines func(uintptr, int)
305
306// Sets the number of lines at the end of which the title label will be
307// ellipsized.
308//
309// If the value is 0, the number of lines won't be limited.
310func (x *ActionRow) SetTitleLines(TitleLinesVar int) {
311
312	xActionRowSetTitleLines(x.GoPointer(), TitleLinesVar)
313
314}
315
316func (c *ActionRow) GoPointer() uintptr {
317	if c == nil {
318		return 0
319	}
320	return c.Ptr
321}
322
323func (c *ActionRow) SetGoPointer(ptr uintptr) {
324	c.Ptr = ptr
325}
326
327// SetPropertyIconName sets the "icon-name" property.
328// The icon name for this row.
329func (x *ActionRow) SetPropertyIconName(value string) {
330	var v gobject.Value
331	v.Init(gobject.TypeStringVal)
332	v.SetString(&value)
333	x.SetProperty("icon-name", &v)
334}
335
336// GetPropertyIconName gets the "icon-name" property.
337// The icon name for this row.
338func (x *ActionRow) GetPropertyIconName() string {
339	var v gobject.Value
340	x.GetProperty("icon-name", &v)
341	return v.GetString()
342}
343
344// SetPropertySubtitle sets the "subtitle" property.
345// The subtitle for this row.
346//
347// The subtitle is interpreted as Pango markup unless
348// [property@PreferencesRow:use-markup] is set to `FALSE`.
349func (x *ActionRow) SetPropertySubtitle(value string) {
350	var v gobject.Value
351	v.Init(gobject.TypeStringVal)
352	v.SetString(&value)
353	x.SetProperty("subtitle", &v)
354}
355
356// GetPropertySubtitle gets the "subtitle" property.
357// The subtitle for this row.
358//
359// The subtitle is interpreted as Pango markup unless
360// [property@PreferencesRow:use-markup] is set to `FALSE`.
361func (x *ActionRow) GetPropertySubtitle() string {
362	var v gobject.Value
363	x.GetProperty("subtitle", &v)
364	return v.GetString()
365}
366
367// SetPropertySubtitleLines sets the "subtitle-lines" property.
368// The number of lines at the end of which the subtitle label will be
369// ellipsized.
370//
371// If the value is 0, the number of lines won't be limited.
372func (x *ActionRow) SetPropertySubtitleLines(value int) {
373	var v gobject.Value
374	v.Init(gobject.TypeIntVal)
375	v.SetInt(value)
376	x.SetProperty("subtitle-lines", &v)
377}
378
379// GetPropertySubtitleLines gets the "subtitle-lines" property.
380// The number of lines at the end of which the subtitle label will be
381// ellipsized.
382//
383// If the value is 0, the number of lines won't be limited.
384func (x *ActionRow) GetPropertySubtitleLines() int {
385	var v gobject.Value
386	x.GetProperty("subtitle-lines", &v)
387	return v.GetInt()
388}
389
390// SetPropertySubtitleSelectable sets the "subtitle-selectable" property.
391// Whether the user can copy the subtitle from the label.
392//
393// See also [property@Gtk.Label:selectable].
394func (x *ActionRow) SetPropertySubtitleSelectable(value bool) {
395	var v gobject.Value
396	v.Init(gobject.TypeBooleanVal)
397	v.SetBoolean(value)
398	x.SetProperty("subtitle-selectable", &v)
399}
400
401// GetPropertySubtitleSelectable gets the "subtitle-selectable" property.
402// Whether the user can copy the subtitle from the label.
403//
404// See also [property@Gtk.Label:selectable].
405func (x *ActionRow) GetPropertySubtitleSelectable() bool {
406	var v gobject.Value
407	x.GetProperty("subtitle-selectable", &v)
408	return v.GetBoolean()
409}
410
411// SetPropertyTitleLines sets the "title-lines" property.
412// The number of lines at the end of which the title label will be ellipsized.
413//
414// If the value is 0, the number of lines won't be limited.
415func (x *ActionRow) SetPropertyTitleLines(value int) {
416	var v gobject.Value
417	v.Init(gobject.TypeIntVal)
418	v.SetInt(value)
419	x.SetProperty("title-lines", &v)
420}
421
422// GetPropertyTitleLines gets the "title-lines" property.
423// The number of lines at the end of which the title label will be ellipsized.
424//
425// If the value is 0, the number of lines won't be limited.
426func (x *ActionRow) GetPropertyTitleLines() int {
427	var v gobject.Value
428	x.GetProperty("title-lines", &v)
429	return v.GetInt()
430}
431
432// This signal is emitted after the row has been activated.
433func (x *ActionRow) ConnectActivated(cb *func(ActionRow)) uint {
434	cbPtr := uintptr(unsafe.Pointer(cb))
435	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
436		handlerID := gobject.SignalConnect(x.GoPointer(), "activated", cbRefPtr)
437		glib.SaveHandlerMapping(handlerID, cbPtr)
438		return handlerID
439	}
440
441	fcb := func(clsPtr uintptr) {
442		fa := ActionRow{}
443		fa.Ptr = clsPtr
444		cbFn := *cb
445
446		cbFn(fa)
447
448	}
449	cbRefPtr := purego.NewCallback(fcb)
450	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
451	handlerID := gobject.SignalConnect(x.GoPointer(), "activated", cbRefPtr)
452	glib.SaveHandlerMapping(handlerID, cbPtr)
453	return handlerID
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 *ActionRow) 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 *ActionRow) 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 = &gtk.AccessibleBase{}
483	cls.Ptr = cret
484	return cls
485}
486
487// Retrieves the accessible role of an accessible object.
488func (x *ActionRow) 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 *ActionRow) 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 = &gtk.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 *ActionRow) 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 *ActionRow) 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 = &gtk.AccessibleBase{}
529	cls.Ptr = cret
530	return cls
531}
532
533// Retrieves the next accessible sibling of an accessible object
534func (x *ActionRow) 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 = &gtk.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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) GetActionName() string {
726
727	cret := gtk.XGtkActionableGetActionName(x.GoPointer())
728	return cret
729}
730
731// Gets the current target value of @actionable.
732func (x *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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 *ActionRow) 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(&xActionRowGLibType, libs, "adw_action_row_get_type")
833
834	core.PuregoSafeRegister(&xNewActionRow, libs, "adw_action_row_new")
835
836	core.PuregoSafeRegister(&xActionRowActivate, libs, "adw_action_row_activate")
837	core.PuregoSafeRegister(&xActionRowAddPrefix, libs, "adw_action_row_add_prefix")
838	core.PuregoSafeRegister(&xActionRowAddSuffix, libs, "adw_action_row_add_suffix")
839	core.PuregoSafeRegister(&xActionRowGetActivatableWidget, libs, "adw_action_row_get_activatable_widget")
840	core.PuregoSafeRegister(&xActionRowGetIconName, libs, "adw_action_row_get_icon_name")
841	core.PuregoSafeRegister(&xActionRowGetSubtitle, libs, "adw_action_row_get_subtitle")
842	core.PuregoSafeRegister(&xActionRowGetSubtitleLines, libs, "adw_action_row_get_subtitle_lines")
843	core.PuregoSafeRegister(&xActionRowGetSubtitleSelectable, libs, "adw_action_row_get_subtitle_selectable")
844	core.PuregoSafeRegister(&xActionRowGetTitleLines, libs, "adw_action_row_get_title_lines")
845	core.PuregoSafeRegister(&xActionRowRemove, libs, "adw_action_row_remove")
846	core.PuregoSafeRegister(&xActionRowSetActivatableWidget, libs, "adw_action_row_set_activatable_widget")
847	core.PuregoSafeRegister(&xActionRowSetIconName, libs, "adw_action_row_set_icon_name")
848	core.PuregoSafeRegister(&xActionRowSetSubtitle, libs, "adw_action_row_set_subtitle")
849	core.PuregoSafeRegister(&xActionRowSetSubtitleLines, libs, "adw_action_row_set_subtitle_lines")
850	core.PuregoSafeRegister(&xActionRowSetSubtitleSelectable, libs, "adw_action_row_set_subtitle_selectable")
851	core.PuregoSafeRegister(&xActionRowSetTitleLines, libs, "adw_action_row_set_title_lines")
852
853}

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