v0.2.2 9100209

adw-entry-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	"github.com/bnema/puregotk/v4/pango"
16)
17
18type EntryRowClass struct {
19	_ structs.HostLayout
20
21	ParentClass PreferencesRowClass
22}
23
24func (x *EntryRowClass) GoPointer() uintptr {
25	return uintptr(unsafe.Pointer(x))
26}
27
28// A [class@Gtk.ListBoxRow] with an embedded text entry.
29//
30// <picture>
31//
32//	<source srcset="entry-row-dark.png" media="(prefers-color-scheme: dark)">
33//	<img src="entry-row.png" alt="entry-row">
34//
35// </picture>
36//
37// `AdwEntryRow` has a title that doubles as placeholder text. It shows an icon
38// indicating that it's editable and can receive additional widgets before or
39// after the editable part.
40//
41// If [property@EntryRow:show-apply-button] is set to `TRUE`, `AdwEntryRow` can
42// show an apply button when editing its contents. This can be useful if
43// changing its contents can result in an expensive operation, such as network
44// activity.
45//
46// `AdwEntryRow` provides only minimal API and should be used with the
47// [iface@Gtk.Editable] API.
48//
49// See also [class@PasswordEntryRow].
50//
51// ## AdwEntryRow as GtkBuildable
52//
53// The `AdwEntryRow` implementation of the [iface@Gtk.Buildable] interface
54// supports adding a child at its end by specifying “suffix” or omitting the
55// “type” attribute of a <child> element.
56//
57// It also supports adding a child as a prefix widget by specifying “prefix” as
58// the “type” attribute of a <child> element.
59//
60// ## CSS nodes
61//
62// `AdwEntryRow` has a single CSS node with name `row` and the `.entry` style
63// class.
64type EntryRow struct {
65	PreferencesRow
66}
67
68var xEntryRowGLibType func() types.GType
69
70func EntryRowGLibType() types.GType {
71	return xEntryRowGLibType()
72}
73
74func EntryRowNewFromInternalPtr(ptr uintptr) *EntryRow {
75	cls := &EntryRow{}
76	cls.Ptr = ptr
77	return cls
78}
79
80var xNewEntryRow func() uintptr
81
82// Creates a new `AdwEntryRow`.
83func NewEntryRow() *EntryRow {
84	var cls *EntryRow
85
86	cret := xNewEntryRow()
87
88	if cret == 0 {
89		return nil
90	}
91	gobject.IncreaseRef(cret)
92	cls = &EntryRow{}
93	cls.Ptr = cret
94	return cls
95}
96
97var xEntryRowAddPrefix func(uintptr, uintptr)
98
99// Adds a prefix widget to @self.
100func (x *EntryRow) AddPrefix(WidgetVar *gtk.Widget) {
101
102	xEntryRowAddPrefix(x.GoPointer(), WidgetVar.GoPointer())
103
104}
105
106var xEntryRowAddSuffix func(uintptr, uintptr)
107
108// Adds a suffix widget to @self.
109func (x *EntryRow) AddSuffix(WidgetVar *gtk.Widget) {
110
111	xEntryRowAddSuffix(x.GoPointer(), WidgetVar.GoPointer())
112
113}
114
115var xEntryRowGetActivatesDefault func(uintptr) bool
116
117// Gets whether activating the embedded entry can activate the default widget.
118func (x *EntryRow) GetActivatesDefault() bool {
119
120	cret := xEntryRowGetActivatesDefault(x.GoPointer())
121	return cret
122}
123
124var xEntryRowGetAttributes func(uintptr) *pango.AttrList
125
126// Gets Pango attributes applied to the text of the embedded entry.
127func (x *EntryRow) GetAttributes() *pango.AttrList {
128
129	cret := xEntryRowGetAttributes(x.GoPointer())
130	return cret
131}
132
133var xEntryRowGetEnableEmojiCompletion func(uintptr) bool
134
135// Gets whether to suggest emoji replacements on @self.
136func (x *EntryRow) GetEnableEmojiCompletion() bool {
137
138	cret := xEntryRowGetEnableEmojiCompletion(x.GoPointer())
139	return cret
140}
141
142var xEntryRowGetInputHints func(uintptr) gtk.InputHints
143
144// Gets the additional input hints of @self.
145func (x *EntryRow) GetInputHints() gtk.InputHints {
146
147	cret := xEntryRowGetInputHints(x.GoPointer())
148	return cret
149}
150
151var xEntryRowGetInputPurpose func(uintptr) gtk.InputPurpose
152
153// Gets the input purpose of @self.
154func (x *EntryRow) GetInputPurpose() gtk.InputPurpose {
155
156	cret := xEntryRowGetInputPurpose(x.GoPointer())
157	return cret
158}
159
160var xEntryRowGetMaxLength func(uintptr) int
161
162// Retrieves the maximum length of the entry.
163func (x *EntryRow) GetMaxLength() int {
164
165	cret := xEntryRowGetMaxLength(x.GoPointer())
166	return cret
167}
168
169var xEntryRowGetShowApplyButton func(uintptr) bool
170
171// Gets whether @self can show the apply button.
172func (x *EntryRow) GetShowApplyButton() bool {
173
174	cret := xEntryRowGetShowApplyButton(x.GoPointer())
175	return cret
176}
177
178var xEntryRowGetTextLength func(uintptr) uint
179
180// Retrieves the current length of the text in @self.
181func (x *EntryRow) GetTextLength() uint {
182
183	cret := xEntryRowGetTextLength(x.GoPointer())
184	return cret
185}
186
187var xEntryRowGrabFocusWithoutSelecting func(uintptr) bool
188
189// Causes @self to have keyboard focus without selecting the text.
190//
191// See [method@Gtk.Text.grab_focus_without_selecting] for more information.
192func (x *EntryRow) GrabFocusWithoutSelecting() bool {
193
194	cret := xEntryRowGrabFocusWithoutSelecting(x.GoPointer())
195	return cret
196}
197
198var xEntryRowRemove func(uintptr, uintptr)
199
200// Removes a child from @self.
201func (x *EntryRow) Remove(WidgetVar *gtk.Widget) {
202
203	xEntryRowRemove(x.GoPointer(), WidgetVar.GoPointer())
204
205}
206
207var xEntryRowSetActivatesDefault func(uintptr, bool)
208
209// Sets whether activating the embedded entry can activate the default widget.
210func (x *EntryRow) SetActivatesDefault(ActivatesVar bool) {
211
212	xEntryRowSetActivatesDefault(x.GoPointer(), ActivatesVar)
213
214}
215
216var xEntryRowSetAttributes func(uintptr, *pango.AttrList)
217
218// Sets Pango attributes to apply to the text of the embedded entry.
219//
220// The [struct@Pango.Attribute]'s `start_index` and `end_index` must refer to
221// the [class@Gtk.EntryBuffer] text, i.e. without the preedit string.
222func (x *EntryRow) SetAttributes(AttributesVar *pango.AttrList) {
223
224	xEntryRowSetAttributes(x.GoPointer(), AttributesVar)
225
226}
227
228var xEntryRowSetEnableEmojiCompletion func(uintptr, bool)
229
230// Sets whether to suggest emoji replacements on @self.
231//
232// Emoji replacement is done with :-delimited names, like `:heart:`.
233func (x *EntryRow) SetEnableEmojiCompletion(EnableEmojiCompletionVar bool) {
234
235	xEntryRowSetEnableEmojiCompletion(x.GoPointer(), EnableEmojiCompletionVar)
236
237}
238
239var xEntryRowSetInputHints func(uintptr, gtk.InputHints)
240
241// Set additional input hints for @self.
242//
243// Input hints allow input methods to fine-tune their behavior.
244//
245// See also: [property@AdwEntryRow:input-purpose]
246func (x *EntryRow) SetInputHints(HintsVar gtk.InputHints) {
247
248	xEntryRowSetInputHints(x.GoPointer(), HintsVar)
249
250}
251
252var xEntryRowSetInputPurpose func(uintptr, gtk.InputPurpose)
253
254// Sets the input purpose of @self.
255//
256// The input purpose can be used by input methods to adjust their behavior.
257func (x *EntryRow) SetInputPurpose(PurposeVar gtk.InputPurpose) {
258
259	xEntryRowSetInputPurpose(x.GoPointer(), PurposeVar)
260
261}
262
263var xEntryRowSetMaxLength func(uintptr, int)
264
265// Sets the maximum length of the entry.
266func (x *EntryRow) SetMaxLength(MaxLengthVar int) {
267
268	xEntryRowSetMaxLength(x.GoPointer(), MaxLengthVar)
269
270}
271
272var xEntryRowSetShowApplyButton func(uintptr, bool)
273
274// Sets whether @self can show the apply button.
275//
276// When set to `TRUE`, typing text in the entry will reveal an apply button.
277// Clicking it or pressing the <kbd>Enter</kbd> key will hide the button and
278// emit the [signal@EntryRow::apply] signal.
279//
280// This is useful if changing the entry contents can trigger an expensive
281// operation, e.g. network activity, to avoid triggering it after typing every
282// character.
283func (x *EntryRow) SetShowApplyButton(ShowApplyButtonVar bool) {
284
285	xEntryRowSetShowApplyButton(x.GoPointer(), ShowApplyButtonVar)
286
287}
288
289func (c *EntryRow) GoPointer() uintptr {
290	if c == nil {
291		return 0
292	}
293	return c.Ptr
294}
295
296func (c *EntryRow) SetGoPointer(ptr uintptr) {
297	c.Ptr = ptr
298}
299
300// SetPropertyActivatesDefault sets the "activates-default" property.
301// Whether activating the embedded entry can activate the default widget.
302func (x *EntryRow) SetPropertyActivatesDefault(value bool) {
303	var v gobject.Value
304	v.Init(gobject.TypeBooleanVal)
305	v.SetBoolean(value)
306	x.SetProperty("activates-default", &v)
307}
308
309// GetPropertyActivatesDefault gets the "activates-default" property.
310// Whether activating the embedded entry can activate the default widget.
311func (x *EntryRow) GetPropertyActivatesDefault() bool {
312	var v gobject.Value
313	x.GetProperty("activates-default", &v)
314	return v.GetBoolean()
315}
316
317// SetPropertyAttributes sets the "attributes" property.
318// A list of Pango attributes to apply to the text of the embedded entry.
319//
320// The [struct@Pango.Attribute]'s `start_index` and `end_index` must refer to
321// the [class@Gtk.EntryBuffer] text, i.e. without the preedit string.
322func (x *EntryRow) SetPropertyAttributes(value uintptr) {
323	var v gobject.Value
324	v.Init(gobject.TypePointerVal)
325	v.SetPointer(value)
326	x.SetProperty("attributes", &v)
327}
328
329// GetPropertyAttributes gets the "attributes" property.
330// A list of Pango attributes to apply to the text of the embedded entry.
331//
332// The [struct@Pango.Attribute]'s `start_index` and `end_index` must refer to
333// the [class@Gtk.EntryBuffer] text, i.e. without the preedit string.
334func (x *EntryRow) GetPropertyAttributes() uintptr {
335	var v gobject.Value
336	x.GetProperty("attributes", &v)
337	return v.GetPointer()
338}
339
340// SetPropertyEnableEmojiCompletion sets the "enable-emoji-completion" property.
341// Whether to suggest emoji replacements on the entry row.
342//
343// Emoji replacement is done with :-delimited names, like `:heart:`.
344func (x *EntryRow) SetPropertyEnableEmojiCompletion(value bool) {
345	var v gobject.Value
346	v.Init(gobject.TypeBooleanVal)
347	v.SetBoolean(value)
348	x.SetProperty("enable-emoji-completion", &v)
349}
350
351// GetPropertyEnableEmojiCompletion gets the "enable-emoji-completion" property.
352// Whether to suggest emoji replacements on the entry row.
353//
354// Emoji replacement is done with :-delimited names, like `:heart:`.
355func (x *EntryRow) GetPropertyEnableEmojiCompletion() bool {
356	var v gobject.Value
357	x.GetProperty("enable-emoji-completion", &v)
358	return v.GetBoolean()
359}
360
361// SetPropertyMaxLength sets the "max-length" property.
362// Maximum number of characters for the entry.
363func (x *EntryRow) SetPropertyMaxLength(value int) {
364	var v gobject.Value
365	v.Init(gobject.TypeIntVal)
366	v.SetInt(value)
367	x.SetProperty("max-length", &v)
368}
369
370// GetPropertyMaxLength gets the "max-length" property.
371// Maximum number of characters for the entry.
372func (x *EntryRow) GetPropertyMaxLength() int {
373	var v gobject.Value
374	x.GetProperty("max-length", &v)
375	return v.GetInt()
376}
377
378// SetPropertyShowApplyButton sets the "show-apply-button" property.
379// Whether to show the apply button.
380//
381// When set to `TRUE`, typing text in the entry will reveal an apply button.
382// Clicking it or pressing the <kbd>Enter</kbd> key will hide the button and
383// emit the [signal@EntryRow::apply] signal.
384//
385// This is useful if changing the entry contents can trigger an expensive
386// operation, e.g. network activity, to avoid triggering it after typing every
387// character.
388func (x *EntryRow) SetPropertyShowApplyButton(value bool) {
389	var v gobject.Value
390	v.Init(gobject.TypeBooleanVal)
391	v.SetBoolean(value)
392	x.SetProperty("show-apply-button", &v)
393}
394
395// GetPropertyShowApplyButton gets the "show-apply-button" property.
396// Whether to show the apply button.
397//
398// When set to `TRUE`, typing text in the entry will reveal an apply button.
399// Clicking it or pressing the <kbd>Enter</kbd> key will hide the button and
400// emit the [signal@EntryRow::apply] signal.
401//
402// This is useful if changing the entry contents can trigger an expensive
403// operation, e.g. network activity, to avoid triggering it after typing every
404// character.
405func (x *EntryRow) GetPropertyShowApplyButton() bool {
406	var v gobject.Value
407	x.GetProperty("show-apply-button", &v)
408	return v.GetBoolean()
409}
410
411// GetPropertyTextLength gets the "text-length" property.
412// The length of the text in the entry row.
413func (x *EntryRow) GetPropertyTextLength() uint {
414	var v gobject.Value
415	x.GetProperty("text-length", &v)
416	return v.GetUint()
417}
418
419// Emitted when the apply button is pressed.
420//
421// See [property@EntryRow:show-apply-button].
422func (x *EntryRow) ConnectApply(cb *func(EntryRow)) uint {
423	cbPtr := uintptr(unsafe.Pointer(cb))
424	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
425		handlerID := gobject.SignalConnect(x.GoPointer(), "apply", cbRefPtr)
426		glib.SaveHandlerMapping(handlerID, cbPtr)
427		return handlerID
428	}
429
430	fcb := func(clsPtr uintptr) {
431		fa := EntryRow{}
432		fa.Ptr = clsPtr
433		cbFn := *cb
434
435		cbFn(fa)
436
437	}
438	cbRefPtr := purego.NewCallback(fcb)
439	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
440	handlerID := gobject.SignalConnect(x.GoPointer(), "apply", cbRefPtr)
441	glib.SaveHandlerMapping(handlerID, cbPtr)
442	return handlerID
443}
444
445// Emitted when the embedded entry is activated.
446func (x *EntryRow) ConnectEntryActivated(cb *func(EntryRow)) uint {
447	cbPtr := uintptr(unsafe.Pointer(cb))
448	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
449		handlerID := gobject.SignalConnect(x.GoPointer(), "entry-activated", cbRefPtr)
450		glib.SaveHandlerMapping(handlerID, cbPtr)
451		return handlerID
452	}
453
454	fcb := func(clsPtr uintptr) {
455		fa := EntryRow{}
456		fa.Ptr = clsPtr
457		cbFn := *cb
458
459		cbFn(fa)
460
461	}
462	cbRefPtr := purego.NewCallback(fcb)
463	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
464	handlerID := gobject.SignalConnect(x.GoPointer(), "entry-activated", cbRefPtr)
465	glib.SaveHandlerMapping(handlerID, cbPtr)
466	return handlerID
467}
468
469// Requests the user's screen reader to announce the given message.
470//
471// This kind of notification is useful for messages that
472// either have only a visual representation or that are not
473// exposed visually at all, e.g. a notification about a
474// successful operation.
475//
476// Also, by using this API, you can ensure that the message
477// does not interrupts the user's current screen reader output.
478func (x *EntryRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
479
480	gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
481
482}
483
484// Retrieves the accessible parent for an accessible object.
485//
486// This function returns `NULL` for top level widgets.
487func (x *EntryRow) GetAccessibleParent() *gtk.AccessibleBase {
488	var cls *gtk.AccessibleBase
489
490	cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
491
492	if cret == 0 {
493		return nil
494	}
495	cls = &gtk.AccessibleBase{}
496	cls.Ptr = cret
497	return cls
498}
499
500// Retrieves the accessible role of an accessible object.
501func (x *EntryRow) GetAccessibleRole() gtk.AccessibleRole {
502
503	cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
504	return cret
505}
506
507// Retrieves the implementation for the given accessible object.
508func (x *EntryRow) GetAtContext() *gtk.ATContext {
509	var cls *gtk.ATContext
510
511	cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
512
513	if cret == 0 {
514		return nil
515	}
516	cls = &gtk.ATContext{}
517	cls.Ptr = cret
518	return cls
519}
520
521// Queries the coordinates and dimensions of this accessible
522//
523// This functionality can be overridden by `GtkAccessible`
524// implementations, e.g. to get the bounds from an ignored
525// child widget.
526func (x *EntryRow) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
527
528	cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
529	return cret
530}
531
532// Retrieves the first accessible child of an accessible object.
533func (x *EntryRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
534	var cls *gtk.AccessibleBase
535
536	cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
537
538	if cret == 0 {
539		return nil
540	}
541	cls = &gtk.AccessibleBase{}
542	cls.Ptr = cret
543	return cls
544}
545
546// Retrieves the next accessible sibling of an accessible object
547func (x *EntryRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
548	var cls *gtk.AccessibleBase
549
550	cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
551
552	if cret == 0 {
553		return nil
554	}
555	cls = &gtk.AccessibleBase{}
556	cls.Ptr = cret
557	return cls
558}
559
560// Queries a platform state, such as focus.
561//
562// This functionality can be overridden by `GtkAccessible`
563// implementations, e.g. to get platform state from an ignored
564// child widget, as is the case for `GtkText` wrappers.
565func (x *EntryRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
566
567	cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
568	return cret
569}
570
571// Resets the accessible property to its default value.
572func (x *EntryRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
573
574	gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
575
576}
577
578// Resets the accessible relation to its default value.
579func (x *EntryRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
580
581	gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
582
583}
584
585// Resets the accessible state to its default value.
586func (x *EntryRow) ResetState(StateVar gtk.AccessibleState) {
587
588	gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
589
590}
591
592// Sets the parent and sibling of an accessible object.
593//
594// This function is meant to be used by accessible implementations that are
595// not part of the widget hierarchy, and but act as a logical bridge between
596// widgets. For instance, if a widget creates an object that holds metadata
597// for each child, and you want that object to implement the `GtkAccessible`
598// interface, you will use this function to ensure that the parent of each
599// child widget is the metadata object, and the parent of each metadata
600// object is the container widget.
601func (x *EntryRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
602
603	gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
604
605}
606
607// Updates the next accessible sibling.
608//
609// That might be useful when a new child of a custom accessible
610// is created, and it needs to be linked to a previous child.
611func (x *EntryRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
612
613	gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
614
615}
616
617// Informs ATs that the platform state has changed.
618//
619// This function should be used by `GtkAccessible` implementations that
620// have a platform state but are not widgets. Widgets handle platform
621// states automatically.
622func (x *EntryRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
623
624	gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
625
626}
627
628// Updates a list of accessible properties.
629//
630// See the [enum@Gtk.AccessibleProperty] documentation for the
631// value types of accessible properties.
632//
633// This function should be called by `GtkWidget` types whenever
634// an accessible property change must be communicated to assistive
635// technologies.
636//
637// Example:
638// ```c
639// value = gtk_adjustment_get_value (adjustment);
640// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
641//
642//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
643//	-1);
644//
645// ```
646func (x *EntryRow) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
647
648	gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
649
650}
651
652// Updates an array of accessible properties.
653//
654// This function should be called by `GtkWidget` types whenever an accessible
655// property change must be communicated to assistive technologies.
656//
657// This function is meant to be used by language bindings.
658func (x *EntryRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
659
660	gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
661
662}
663
664// Updates a list of accessible relations.
665//
666// This function should be called by `GtkWidget` types whenever an accessible
667// relation change must be communicated to assistive technologies.
668//
669// If the [enum@Gtk.AccessibleRelation] requires a list of references,
670// you should pass each reference individually, followed by `NULL`, e.g.
671//
672// ```c
673// gtk_accessible_update_relation (accessible,
674//
675//	GTK_ACCESSIBLE_RELATION_CONTROLS,
676//	  ref1, NULL,
677//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
678//	  ref1, ref2, ref3, NULL,
679//	-1);
680//
681// ```
682func (x *EntryRow) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
683
684	gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
685
686}
687
688// Updates an array of accessible relations.
689//
690// This function should be called by `GtkWidget` types whenever an accessible
691// relation change must be communicated to assistive technologies.
692//
693// This function is meant to be used by language bindings.
694func (x *EntryRow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
695
696	gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
697
698}
699
700// Updates a list of accessible states.
701//
702// See the [enum@Gtk.AccessibleState] documentation for the
703// value types of accessible states.
704//
705// This function should be called by `GtkWidget` types whenever
706// an accessible state change must be communicated to assistive
707// technologies.
708//
709// Example:
710//
711// ```c
712// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
713// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
714//
715//	GTK_ACCESSIBLE_STATE_CHECKED, value,
716//	-1);
717//
718// ```
719func (x *EntryRow) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
720
721	gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
722
723}
724
725// Updates an array of accessible states.
726//
727// This function should be called by `GtkWidget` types whenever an accessible
728// state change must be communicated to assistive technologies.
729//
730// This function is meant to be used by language bindings.
731func (x *EntryRow) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
732
733	gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
734
735}
736
737// Gets the action name for @actionable.
738func (x *EntryRow) GetActionName() string {
739
740	cret := gtk.XGtkActionableGetActionName(x.GoPointer())
741	return cret
742}
743
744// Gets the current target value of @actionable.
745func (x *EntryRow) GetActionTargetValue() *glib.Variant {
746
747	cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
748	return cret
749}
750
751// Specifies the name of the action with which this widget should be
752// associated.
753//
754// If @action_name is %NULL then the widget will be unassociated from
755// any previous action.
756//
757// Usually this function is used when the widget is located (or will be
758// located) within the hierarchy of a `GtkApplicationWindow`.
759//
760// Names are of the form “win.save” or “app.quit” for actions on the
761// containing [class@ApplicationWindow] or its associated [class@Application],
762// respectively. This is the same form used for actions in the [class@Gio.Menu]
763// associated with the window.
764func (x *EntryRow) SetActionName(ActionNameVar *string) {
765
766	ActionNameVarPtr := core.GStrdupNullable(ActionNameVar)
767	defer core.GFreeNullable(ActionNameVarPtr)
768
769	gtk.XGtkActionableSetActionName(x.GoPointer(), ActionNameVarPtr)
770
771}
772
773// Sets the target of an actionable widget.
774//
775// This is a convenience function that calls [ctor@GLib.Variant.new] for
776// @format_string and uses the result to call
777// [method@Gtk.Actionable.set_action_target_value].
778//
779// If you are setting a string-valued target and want to set
780// the action name at the same time, you can use
781// [method@Gtk.Actionable.set_detailed_action_name].
782func (x *EntryRow) SetActionTarget(FormatStringVar string, varArgs ...interface{}) {
783
784	gtk.XGtkActionableSetActionTarget(x.GoPointer(), FormatStringVar, varArgs...)
785
786}
787
788// Sets the target value of an actionable widget.
789//
790// If @target_value is %NULL then the target value is unset.
791//
792// The target value has two purposes. First, it is used as the parameter
793// to activation of the action associated with the `GtkActionable` widget.
794// Second, it is used to determine if the widget should be rendered as
795// “active” — the widget is active if the state is equal to the given target.
796//
797// Consider the example of associating a set of buttons with a [iface@Gio.Action]
798// with string state in a typical “radio button” situation. Each button
799// will be associated with the same action, but with a different target
800// value for that action. Clicking on a particular button will activate
801// the action with the target of that button, which will typically cause
802// the action’s state to change to that value. Since the action’s state
803// is now equal to the target value of the button, the button will now
804// be rendered as active (and the other buttons, with different targets,
805// rendered inactive).
806func (x *EntryRow) SetActionTargetValue(TargetValueVar *glib.Variant) {
807
808	gtk.XGtkActionableSetActionTargetValue(x.GoPointer(), TargetValueVar)
809
810}
811
812// Sets the action-name and associated string target value of an
813// actionable widget.
814//
815// @detailed_action_name is a string in the format accepted by
816// [func@Gio.Action.parse_detailed_name].
817func (x *EntryRow) SetDetailedActionName(DetailedActionNameVar string) {
818
819	gtk.XGtkActionableSetDetailedActionName(x.GoPointer(), DetailedActionNameVar)
820
821}
822
823// Gets the ID of the @buildable object.
824//
825// `GtkBuilder` sets the name based on the ID attribute
826// of the `<object>` tag used to construct the @buildable.
827func (x *EntryRow) GetBuildableId() string {
828
829	cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
830	return cret
831}
832
833// Retrieves the accessible platform state from the editable delegate.
834//
835// This is an helper function to retrieve the accessible state for
836// `GtkEditable` interface implementations using a delegate pattern.
837//
838// You should call this function in your editable widget implementation
839// of the [vfunc@Gtk.Accessible.get_platform_state] virtual function, for
840// instance:
841//
842// ```c
843// static void
844// accessible_interface_init (GtkAccessibleInterface *iface)
845//
846//	{
847//	  iface->get_platform_state = your_editable_get_accessible_platform_state;
848//	}
849//
850// static gboolean
851// your_editable_get_accessible_platform_state (GtkAccessible *accessible,
852//
853//	GtkAccessiblePlatformState state)
854//
855//	{
856//	  return gtk_editable_delegate_get_accessible_platform_state (GTK_EDITABLE (accessible), state);
857//	}
858//
859// ```
860//
861// Note that the widget which is the delegate *must* be a direct child of
862// this widget, otherwise your implementation of [vfunc@Gtk.Accessible.get_platform_state]
863// might not even be called, as the platform change will originate from
864// the parent of the delegate, and, as a result, will not work properly.
865//
866// So, if you can't ensure the direct child condition, you should give the
867// delegate the %GTK_ACCESSIBLE_ROLE_TEXT_BOX role, or you can
868// change your tree to allow this function to work.
869func (x *EntryRow) DelegateGetAccessiblePlatformState(StateVar gtk.AccessiblePlatformState) bool {
870
871	cret := gtk.XGtkEditableDelegateGetAccessiblePlatformState(x.GoPointer(), StateVar)
872	return cret
873}
874
875// Deletes the currently selected text of the editable.
876//
877// This call doesn’t do anything if there is no selected text.
878func (x *EntryRow) DeleteSelection() {
879
880	gtk.XGtkEditableDeleteSelection(x.GoPointer())
881
882}
883
884// Deletes a sequence of characters.
885//
886// The characters that are deleted are those characters at positions
887// from @start_pos up to, but not including @end_pos. If @end_pos is
888// negative, then the characters deleted are those from @start_pos to
889// the end of the text.
890//
891// Note that the positions are specified in characters, not bytes.
892func (x *EntryRow) DeleteText(StartPosVar int, EndPosVar int) {
893
894	gtk.XGtkEditableDeleteText(x.GoPointer(), StartPosVar, EndPosVar)
895
896}
897
898// Undoes the setup done by [method@Gtk.Editable.init_delegate].
899//
900// This is a helper function that should be called from dispose,
901// before removing the delegate object.
902func (x *EntryRow) FinishDelegate() {
903
904	gtk.XGtkEditableFinishDelegate(x.GoPointer())
905
906}
907
908// Gets the alignment of the editable.
909func (x *EntryRow) GetAlignment() float32 {
910
911	cret := gtk.XGtkEditableGetAlignment(x.GoPointer())
912	return cret
913}
914
915// Retrieves a sequence of characters.
916//
917// The characters that are retrieved are those characters at positions
918// from @start_pos up to, but not including @end_pos. If @end_pos is negative,
919// then the characters retrieved are those characters from @start_pos to
920// the end of the text.
921//
922// Note that positions are specified in characters, not bytes.
923func (x *EntryRow) GetChars(StartPosVar int, EndPosVar int) string {
924
925	cret := gtk.XGtkEditableGetChars(x.GoPointer(), StartPosVar, EndPosVar)
926	return cret
927}
928
929// Gets the `GtkEditable` that @editable is delegating its
930// implementation to.
931//
932// Typically, the delegate is a [class@Gtk.Text] widget.
933func (x *EntryRow) GetDelegate() *gtk.EditableBase {
934	var cls *gtk.EditableBase
935
936	cret := gtk.XGtkEditableGetDelegate(x.GoPointer())
937
938	if cret == 0 {
939		return nil
940	}
941	gobject.IncreaseRef(cret)
942	cls = &gtk.EditableBase{}
943	cls.Ptr = cret
944	return cls
945}
946
947// Retrieves whether @editable is editable.
948func (x *EntryRow) GetEditable() bool {
949
950	cret := gtk.XGtkEditableGetEditable(x.GoPointer())
951	return cret
952}
953
954// Gets if undo/redo actions are enabled for @editable
955func (x *EntryRow) GetEnableUndo() bool {
956
957	cret := gtk.XGtkEditableGetEnableUndo(x.GoPointer())
958	return cret
959}
960
961// Retrieves the desired maximum width of @editable, in characters.
962func (x *EntryRow) GetMaxWidthChars() int {
963
964	cret := gtk.XGtkEditableGetMaxWidthChars(x.GoPointer())
965	return cret
966}
967
968// Retrieves the current position of the cursor relative
969// to the start of the content of the editable.
970//
971// Note that this position is in characters, not in bytes.
972func (x *EntryRow) GetPosition() int {
973
974	cret := gtk.XGtkEditableGetPosition(x.GoPointer())
975	return cret
976}
977
978// Retrieves the selection bound of the editable.
979//
980// @start_pos will be filled with the start of the selection and
981// @end_pos with end. If no text was selected both will be identical
982// and %FALSE will be returned.
983//
984// Note that positions are specified in characters, not bytes.
985func (x *EntryRow) GetSelectionBounds(StartPosVar *int, EndPosVar *int) bool {
986
987	cret := gtk.XGtkEditableGetSelectionBounds(x.GoPointer(), StartPosVar, EndPosVar)
988	return cret
989}
990
991// Retrieves the contents of @editable.
992//
993// The returned string is owned by GTK and must not be modified or freed.
994func (x *EntryRow) GetText() string {
995
996	cret := gtk.XGtkEditableGetText(x.GoPointer())
997	return cret
998}
999
1000// Gets the number of characters of space reserved
1001// for the contents of the editable.
1002func (x *EntryRow) GetWidthChars() int {
1003
1004	cret := gtk.XGtkEditableGetWidthChars(x.GoPointer())
1005	return cret
1006}
1007
1008// Sets up a delegate for `GtkEditable`.
1009//
1010// This is assuming that the get_delegate vfunc in the `GtkEditable`
1011// interface has been set up for the @editable's type.
1012//
1013// This is a helper function that should be called in instance init,
1014// after creating the delegate object.
1015func (x *EntryRow) InitDelegate() {
1016
1017	gtk.XGtkEditableInitDelegate(x.GoPointer())
1018
1019}
1020
1021// Inserts @length bytes of @text into the contents of the
1022// widget, at position @position.
1023//
1024// Note that the position is in characters, not in bytes.
1025// The function updates @position to point after the newly
1026// inserted text.
1027func (x *EntryRow) InsertText(TextVar string, LengthVar int, PositionVar *int) {
1028
1029	gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar)
1030
1031}
1032
1033// Selects a region of text.
1034//
1035// The characters that are selected are those characters at positions
1036// from @start_pos up to, but not including @end_pos. If @end_pos is
1037// negative, then the characters selected are those characters from
1038// @start_pos to  the end of the text.
1039//
1040// Note that positions are specified in characters, not bytes.
1041func (x *EntryRow) SelectRegion(StartPosVar int, EndPosVar int) {
1042
1043	gtk.XGtkEditableSelectRegion(x.GoPointer(), StartPosVar, EndPosVar)
1044
1045}
1046
1047// Sets the alignment for the contents of the editable.
1048//
1049// This controls the horizontal positioning of the contents when
1050// the displayed text is shorter than the width of the editable.
1051func (x *EntryRow) SetAlignment(XalignVar float32) {
1052
1053	gtk.XGtkEditableSetAlignment(x.GoPointer(), XalignVar)
1054
1055}
1056
1057// Determines if the user can edit the text in the editable widget.
1058func (x *EntryRow) SetEditable(IsEditableVar bool) {
1059
1060	gtk.XGtkEditableSetEditable(x.GoPointer(), IsEditableVar)
1061
1062}
1063
1064// If enabled, changes to @editable will be saved for undo/redo
1065// actions.
1066//
1067// This results in an additional copy of text changes and are not
1068// stored in secure memory. As such, undo is forcefully disabled
1069// when [property@Gtk.Text:visibility] is set to %FALSE.
1070func (x *EntryRow) SetEnableUndo(EnableUndoVar bool) {
1071
1072	gtk.XGtkEditableSetEnableUndo(x.GoPointer(), EnableUndoVar)
1073
1074}
1075
1076// Sets the desired maximum width in characters of @editable.
1077func (x *EntryRow) SetMaxWidthChars(NCharsVar int) {
1078
1079	gtk.XGtkEditableSetMaxWidthChars(x.GoPointer(), NCharsVar)
1080
1081}
1082
1083// Sets the cursor position in the editable to the given value.
1084//
1085// The cursor is displayed before the character with the given (base 0)
1086// index in the contents of the editable. The value must be less than
1087// or equal to the number of characters in the editable. A value of -1
1088// indicates that the position should be set after the last character
1089// of the editable. Note that @position is in characters, not in bytes.
1090func (x *EntryRow) SetPosition(PositionVar int) {
1091
1092	gtk.XGtkEditableSetPosition(x.GoPointer(), PositionVar)
1093
1094}
1095
1096// Sets the text in the editable to the given value.
1097//
1098// This is replacing the current contents.
1099func (x *EntryRow) SetText(TextVar string) {
1100
1101	gtk.XGtkEditableSetText(x.GoPointer(), TextVar)
1102
1103}
1104
1105// Changes the size request of the editable to be about the
1106// right size for @n_chars characters.
1107//
1108// Note that it changes the size request, the size can still
1109// be affected by how you pack the widget into containers.
1110// If @n_chars is -1, the size reverts to the default size.
1111func (x *EntryRow) SetWidthChars(NCharsVar int) {
1112
1113	gtk.XGtkEditableSetWidthChars(x.GoPointer(), NCharsVar)
1114
1115}
1116
1117func init() {
1118	core.SetPackageName("ADW", "libadwaita-1")
1119	core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
1120	var libs []uintptr
1121	for _, libPath := range core.GetPaths("ADW") {
1122		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
1123		if err != nil {
1124			panic(err)
1125		}
1126		libs = append(libs, lib)
1127	}
1128
1129	core.PuregoSafeRegister(&xEntryRowGLibType, libs, "adw_entry_row_get_type")
1130
1131	core.PuregoSafeRegister(&xNewEntryRow, libs, "adw_entry_row_new")
1132
1133	core.PuregoSafeRegister(&xEntryRowAddPrefix, libs, "adw_entry_row_add_prefix")
1134	core.PuregoSafeRegister(&xEntryRowAddSuffix, libs, "adw_entry_row_add_suffix")
1135	core.PuregoSafeRegister(&xEntryRowGetActivatesDefault, libs, "adw_entry_row_get_activates_default")
1136	core.PuregoSafeRegister(&xEntryRowGetAttributes, libs, "adw_entry_row_get_attributes")
1137	core.PuregoSafeRegister(&xEntryRowGetEnableEmojiCompletion, libs, "adw_entry_row_get_enable_emoji_completion")
1138	core.PuregoSafeRegister(&xEntryRowGetInputHints, libs, "adw_entry_row_get_input_hints")
1139	core.PuregoSafeRegister(&xEntryRowGetInputPurpose, libs, "adw_entry_row_get_input_purpose")
1140	core.PuregoSafeRegister(&xEntryRowGetMaxLength, libs, "adw_entry_row_get_max_length")
1141	core.PuregoSafeRegister(&xEntryRowGetShowApplyButton, libs, "adw_entry_row_get_show_apply_button")
1142	core.PuregoSafeRegister(&xEntryRowGetTextLength, libs, "adw_entry_row_get_text_length")
1143	core.PuregoSafeRegister(&xEntryRowGrabFocusWithoutSelecting, libs, "adw_entry_row_grab_focus_without_selecting")
1144	core.PuregoSafeRegister(&xEntryRowRemove, libs, "adw_entry_row_remove")
1145	core.PuregoSafeRegister(&xEntryRowSetActivatesDefault, libs, "adw_entry_row_set_activates_default")
1146	core.PuregoSafeRegister(&xEntryRowSetAttributes, libs, "adw_entry_row_set_attributes")
1147	core.PuregoSafeRegister(&xEntryRowSetEnableEmojiCompletion, libs, "adw_entry_row_set_enable_emoji_completion")
1148	core.PuregoSafeRegister(&xEntryRowSetInputHints, libs, "adw_entry_row_set_input_hints")
1149	core.PuregoSafeRegister(&xEntryRowSetInputPurpose, libs, "adw_entry_row_set_input_purpose")
1150	core.PuregoSafeRegister(&xEntryRowSetMaxLength, libs, "adw_entry_row_set_max_length")
1151	core.PuregoSafeRegister(&xEntryRowSetShowApplyButton, libs, "adw_entry_row_set_show_apply_button")
1152
1153}

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