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 PasswordEntryRowClass struct {
18 _ structs.HostLayout
19
20 ParentClass EntryRowClass
21}
22
23func (x *PasswordEntryRowClass) GoPointer() uintptr {
24 return uintptr(unsafe.Pointer(x))
25}
26
27// A [class@EntryRow] tailored for entering secrets.
28//
29// <picture>
30//
31// <source srcset="password-entry-row-dark.png" media="(prefers-color-scheme: dark)">
32// <img src="password-entry-row.png" alt="password-entry-row">
33//
34// </picture>
35//
36// It does not show its contents in clear text, does not allow to copy it to the
37// clipboard, and shows a warning when Caps Lock is engaged. If the underlying
38// platform allows it, `AdwPasswordEntryRow` will also place the text in a
39// non-pageable memory area, to avoid it being written out to disk by the
40// operating system.
41//
42// It offer a way to reveal the contents in clear text.
43//
44// ## CSS Nodes
45//
46// `AdwPasswordEntryRow` has a single CSS node with name `row` that carries
47// `.entry` and `.password` style classes.
48type PasswordEntryRow struct {
49 EntryRow
50}
51
52var xPasswordEntryRowGLibType func() types.GType
53
54func PasswordEntryRowGLibType() types.GType {
55 return xPasswordEntryRowGLibType()
56}
57
58func PasswordEntryRowNewFromInternalPtr(ptr uintptr) *PasswordEntryRow {
59 cls := &PasswordEntryRow{}
60 cls.Ptr = ptr
61 return cls
62}
63
64var xNewPasswordEntryRow func() uintptr
65
66// Creates a new `AdwPasswordEntryRow`.
67func NewPasswordEntryRow() *PasswordEntryRow {
68 var cls *PasswordEntryRow
69
70 cret := xNewPasswordEntryRow()
71
72 if cret == 0 {
73 return nil
74 }
75 gobject.IncreaseRef(cret)
76 cls = &PasswordEntryRow{}
77 cls.Ptr = cret
78 return cls
79}
80
81func (c *PasswordEntryRow) GoPointer() uintptr {
82 if c == nil {
83 return 0
84 }
85 return c.Ptr
86}
87
88func (c *PasswordEntryRow) SetGoPointer(ptr uintptr) {
89 c.Ptr = ptr
90}
91
92// Requests the user's screen reader to announce the given message.
93//
94// This kind of notification is useful for messages that
95// either have only a visual representation or that are not
96// exposed visually at all, e.g. a notification about a
97// successful operation.
98//
99// Also, by using this API, you can ensure that the message
100// does not interrupts the user's current screen reader output.
101func (x *PasswordEntryRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
102
103 gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
104
105}
106
107// Retrieves the accessible parent for an accessible object.
108//
109// This function returns `NULL` for top level widgets.
110func (x *PasswordEntryRow) GetAccessibleParent() *gtk.AccessibleBase {
111 var cls *gtk.AccessibleBase
112
113 cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
114
115 if cret == 0 {
116 return nil
117 }
118 cls = >k.AccessibleBase{}
119 cls.Ptr = cret
120 return cls
121}
122
123// Retrieves the accessible role of an accessible object.
124func (x *PasswordEntryRow) GetAccessibleRole() gtk.AccessibleRole {
125
126 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
127 return cret
128}
129
130// Retrieves the implementation for the given accessible object.
131func (x *PasswordEntryRow) GetAtContext() *gtk.ATContext {
132 var cls *gtk.ATContext
133
134 cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
135
136 if cret == 0 {
137 return nil
138 }
139 cls = >k.ATContext{}
140 cls.Ptr = cret
141 return cls
142}
143
144// Queries the coordinates and dimensions of this accessible
145//
146// This functionality can be overridden by `GtkAccessible`
147// implementations, e.g. to get the bounds from an ignored
148// child widget.
149func (x *PasswordEntryRow) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
150
151 cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
152 return cret
153}
154
155// Retrieves the first accessible child of an accessible object.
156func (x *PasswordEntryRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
157 var cls *gtk.AccessibleBase
158
159 cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
160
161 if cret == 0 {
162 return nil
163 }
164 cls = >k.AccessibleBase{}
165 cls.Ptr = cret
166 return cls
167}
168
169// Retrieves the next accessible sibling of an accessible object
170func (x *PasswordEntryRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
171 var cls *gtk.AccessibleBase
172
173 cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
174
175 if cret == 0 {
176 return nil
177 }
178 cls = >k.AccessibleBase{}
179 cls.Ptr = cret
180 return cls
181}
182
183// Queries a platform state, such as focus.
184//
185// This functionality can be overridden by `GtkAccessible`
186// implementations, e.g. to get platform state from an ignored
187// child widget, as is the case for `GtkText` wrappers.
188func (x *PasswordEntryRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
189
190 cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
191 return cret
192}
193
194// Resets the accessible property to its default value.
195func (x *PasswordEntryRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
196
197 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
198
199}
200
201// Resets the accessible relation to its default value.
202func (x *PasswordEntryRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
203
204 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
205
206}
207
208// Resets the accessible state to its default value.
209func (x *PasswordEntryRow) ResetState(StateVar gtk.AccessibleState) {
210
211 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
212
213}
214
215// Sets the parent and sibling of an accessible object.
216//
217// This function is meant to be used by accessible implementations that are
218// not part of the widget hierarchy, and but act as a logical bridge between
219// widgets. For instance, if a widget creates an object that holds metadata
220// for each child, and you want that object to implement the `GtkAccessible`
221// interface, you will use this function to ensure that the parent of each
222// child widget is the metadata object, and the parent of each metadata
223// object is the container widget.
224func (x *PasswordEntryRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
225
226 gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
227
228}
229
230// Updates the next accessible sibling.
231//
232// That might be useful when a new child of a custom accessible
233// is created, and it needs to be linked to a previous child.
234func (x *PasswordEntryRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
235
236 gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
237
238}
239
240// Informs ATs that the platform state has changed.
241//
242// This function should be used by `GtkAccessible` implementations that
243// have a platform state but are not widgets. Widgets handle platform
244// states automatically.
245func (x *PasswordEntryRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
246
247 gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
248
249}
250
251// Updates a list of accessible properties.
252//
253// See the [enum@Gtk.AccessibleProperty] documentation for the
254// value types of accessible properties.
255//
256// This function should be called by `GtkWidget` types whenever
257// an accessible property change must be communicated to assistive
258// technologies.
259//
260// Example:
261// ```c
262// value = gtk_adjustment_get_value (adjustment);
263// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
264//
265// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
266// -1);
267//
268// ```
269func (x *PasswordEntryRow) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
270
271 gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
272
273}
274
275// Updates an array of accessible properties.
276//
277// This function should be called by `GtkWidget` types whenever an accessible
278// property change must be communicated to assistive technologies.
279//
280// This function is meant to be used by language bindings.
281func (x *PasswordEntryRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
282
283 gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
284
285}
286
287// Updates a list of accessible relations.
288//
289// This function should be called by `GtkWidget` types whenever an accessible
290// relation change must be communicated to assistive technologies.
291//
292// If the [enum@Gtk.AccessibleRelation] requires a list of references,
293// you should pass each reference individually, followed by `NULL`, e.g.
294//
295// ```c
296// gtk_accessible_update_relation (accessible,
297//
298// GTK_ACCESSIBLE_RELATION_CONTROLS,
299// ref1, NULL,
300// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
301// ref1, ref2, ref3, NULL,
302// -1);
303//
304// ```
305func (x *PasswordEntryRow) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
306
307 gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
308
309}
310
311// Updates an array of accessible relations.
312//
313// This function should be called by `GtkWidget` types whenever an accessible
314// relation change must be communicated to assistive technologies.
315//
316// This function is meant to be used by language bindings.
317func (x *PasswordEntryRow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
318
319 gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
320
321}
322
323// Updates a list of accessible states.
324//
325// See the [enum@Gtk.AccessibleState] documentation for the
326// value types of accessible states.
327//
328// This function should be called by `GtkWidget` types whenever
329// an accessible state change must be communicated to assistive
330// technologies.
331//
332// Example:
333//
334// ```c
335// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
336// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
337//
338// GTK_ACCESSIBLE_STATE_CHECKED, value,
339// -1);
340//
341// ```
342func (x *PasswordEntryRow) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
343
344 gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
345
346}
347
348// Updates an array of accessible states.
349//
350// This function should be called by `GtkWidget` types whenever an accessible
351// state change must be communicated to assistive technologies.
352//
353// This function is meant to be used by language bindings.
354func (x *PasswordEntryRow) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
355
356 gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
357
358}
359
360// Gets the action name for @actionable.
361func (x *PasswordEntryRow) GetActionName() string {
362
363 cret := gtk.XGtkActionableGetActionName(x.GoPointer())
364 return cret
365}
366
367// Gets the current target value of @actionable.
368func (x *PasswordEntryRow) GetActionTargetValue() *glib.Variant {
369
370 cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
371 return cret
372}
373
374// Specifies the name of the action with which this widget should be
375// associated.
376//
377// If @action_name is %NULL then the widget will be unassociated from
378// any previous action.
379//
380// Usually this function is used when the widget is located (or will be
381// located) within the hierarchy of a `GtkApplicationWindow`.
382//
383// Names are of the form “win.save” or “app.quit” for actions on the
384// containing [class@ApplicationWindow] or its associated [class@Application],
385// respectively. This is the same form used for actions in the [class@Gio.Menu]
386// associated with the window.
387func (x *PasswordEntryRow) SetActionName(ActionNameVar *string) {
388
389 ActionNameVarPtr := core.GStrdupNullable(ActionNameVar)
390 defer core.GFreeNullable(ActionNameVarPtr)
391
392 gtk.XGtkActionableSetActionName(x.GoPointer(), ActionNameVarPtr)
393
394}
395
396// Sets the target of an actionable widget.
397//
398// This is a convenience function that calls [ctor@GLib.Variant.new] for
399// @format_string and uses the result to call
400// [method@Gtk.Actionable.set_action_target_value].
401//
402// If you are setting a string-valued target and want to set
403// the action name at the same time, you can use
404// [method@Gtk.Actionable.set_detailed_action_name].
405func (x *PasswordEntryRow) SetActionTarget(FormatStringVar string, varArgs ...interface{}) {
406
407 gtk.XGtkActionableSetActionTarget(x.GoPointer(), FormatStringVar, varArgs...)
408
409}
410
411// Sets the target value of an actionable widget.
412//
413// If @target_value is %NULL then the target value is unset.
414//
415// The target value has two purposes. First, it is used as the parameter
416// to activation of the action associated with the `GtkActionable` widget.
417// Second, it is used to determine if the widget should be rendered as
418// “active” — the widget is active if the state is equal to the given target.
419//
420// Consider the example of associating a set of buttons with a [iface@Gio.Action]
421// with string state in a typical “radio button” situation. Each button
422// will be associated with the same action, but with a different target
423// value for that action. Clicking on a particular button will activate
424// the action with the target of that button, which will typically cause
425// the action’s state to change to that value. Since the action’s state
426// is now equal to the target value of the button, the button will now
427// be rendered as active (and the other buttons, with different targets,
428// rendered inactive).
429func (x *PasswordEntryRow) SetActionTargetValue(TargetValueVar *glib.Variant) {
430
431 gtk.XGtkActionableSetActionTargetValue(x.GoPointer(), TargetValueVar)
432
433}
434
435// Sets the action-name and associated string target value of an
436// actionable widget.
437//
438// @detailed_action_name is a string in the format accepted by
439// [func@Gio.Action.parse_detailed_name].
440func (x *PasswordEntryRow) SetDetailedActionName(DetailedActionNameVar string) {
441
442 gtk.XGtkActionableSetDetailedActionName(x.GoPointer(), DetailedActionNameVar)
443
444}
445
446// Gets the ID of the @buildable object.
447//
448// `GtkBuilder` sets the name based on the ID attribute
449// of the `<object>` tag used to construct the @buildable.
450func (x *PasswordEntryRow) GetBuildableId() string {
451
452 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
453 return cret
454}
455
456// Retrieves the accessible platform state from the editable delegate.
457//
458// This is an helper function to retrieve the accessible state for
459// `GtkEditable` interface implementations using a delegate pattern.
460//
461// You should call this function in your editable widget implementation
462// of the [vfunc@Gtk.Accessible.get_platform_state] virtual function, for
463// instance:
464//
465// ```c
466// static void
467// accessible_interface_init (GtkAccessibleInterface *iface)
468//
469// {
470// iface->get_platform_state = your_editable_get_accessible_platform_state;
471// }
472//
473// static gboolean
474// your_editable_get_accessible_platform_state (GtkAccessible *accessible,
475//
476// GtkAccessiblePlatformState state)
477//
478// {
479// return gtk_editable_delegate_get_accessible_platform_state (GTK_EDITABLE (accessible), state);
480// }
481//
482// ```
483//
484// Note that the widget which is the delegate *must* be a direct child of
485// this widget, otherwise your implementation of [vfunc@Gtk.Accessible.get_platform_state]
486// might not even be called, as the platform change will originate from
487// the parent of the delegate, and, as a result, will not work properly.
488//
489// So, if you can't ensure the direct child condition, you should give the
490// delegate the %GTK_ACCESSIBLE_ROLE_TEXT_BOX role, or you can
491// change your tree to allow this function to work.
492func (x *PasswordEntryRow) DelegateGetAccessiblePlatformState(StateVar gtk.AccessiblePlatformState) bool {
493
494 cret := gtk.XGtkEditableDelegateGetAccessiblePlatformState(x.GoPointer(), StateVar)
495 return cret
496}
497
498// Deletes the currently selected text of the editable.
499//
500// This call doesn’t do anything if there is no selected text.
501func (x *PasswordEntryRow) DeleteSelection() {
502
503 gtk.XGtkEditableDeleteSelection(x.GoPointer())
504
505}
506
507// Deletes a sequence of characters.
508//
509// The characters that are deleted are those characters at positions
510// from @start_pos up to, but not including @end_pos. If @end_pos is
511// negative, then the characters deleted are those from @start_pos to
512// the end of the text.
513//
514// Note that the positions are specified in characters, not bytes.
515func (x *PasswordEntryRow) DeleteText(StartPosVar int, EndPosVar int) {
516
517 gtk.XGtkEditableDeleteText(x.GoPointer(), StartPosVar, EndPosVar)
518
519}
520
521// Undoes the setup done by [method@Gtk.Editable.init_delegate].
522//
523// This is a helper function that should be called from dispose,
524// before removing the delegate object.
525func (x *PasswordEntryRow) FinishDelegate() {
526
527 gtk.XGtkEditableFinishDelegate(x.GoPointer())
528
529}
530
531// Gets the alignment of the editable.
532func (x *PasswordEntryRow) GetAlignment() float32 {
533
534 cret := gtk.XGtkEditableGetAlignment(x.GoPointer())
535 return cret
536}
537
538// Retrieves a sequence of characters.
539//
540// The characters that are retrieved are those characters at positions
541// from @start_pos up to, but not including @end_pos. If @end_pos is negative,
542// then the characters retrieved are those characters from @start_pos to
543// the end of the text.
544//
545// Note that positions are specified in characters, not bytes.
546func (x *PasswordEntryRow) GetChars(StartPosVar int, EndPosVar int) string {
547
548 cret := gtk.XGtkEditableGetChars(x.GoPointer(), StartPosVar, EndPosVar)
549 return cret
550}
551
552// Gets the `GtkEditable` that @editable is delegating its
553// implementation to.
554//
555// Typically, the delegate is a [class@Gtk.Text] widget.
556func (x *PasswordEntryRow) GetDelegate() *gtk.EditableBase {
557 var cls *gtk.EditableBase
558
559 cret := gtk.XGtkEditableGetDelegate(x.GoPointer())
560
561 if cret == 0 {
562 return nil
563 }
564 gobject.IncreaseRef(cret)
565 cls = >k.EditableBase{}
566 cls.Ptr = cret
567 return cls
568}
569
570// Retrieves whether @editable is editable.
571func (x *PasswordEntryRow) GetEditable() bool {
572
573 cret := gtk.XGtkEditableGetEditable(x.GoPointer())
574 return cret
575}
576
577// Gets if undo/redo actions are enabled for @editable
578func (x *PasswordEntryRow) GetEnableUndo() bool {
579
580 cret := gtk.XGtkEditableGetEnableUndo(x.GoPointer())
581 return cret
582}
583
584// Retrieves the desired maximum width of @editable, in characters.
585func (x *PasswordEntryRow) GetMaxWidthChars() int {
586
587 cret := gtk.XGtkEditableGetMaxWidthChars(x.GoPointer())
588 return cret
589}
590
591// Retrieves the current position of the cursor relative
592// to the start of the content of the editable.
593//
594// Note that this position is in characters, not in bytes.
595func (x *PasswordEntryRow) GetPosition() int {
596
597 cret := gtk.XGtkEditableGetPosition(x.GoPointer())
598 return cret
599}
600
601// Retrieves the selection bound of the editable.
602//
603// @start_pos will be filled with the start of the selection and
604// @end_pos with end. If no text was selected both will be identical
605// and %FALSE will be returned.
606//
607// Note that positions are specified in characters, not bytes.
608func (x *PasswordEntryRow) GetSelectionBounds(StartPosVar *int, EndPosVar *int) bool {
609
610 cret := gtk.XGtkEditableGetSelectionBounds(x.GoPointer(), StartPosVar, EndPosVar)
611 return cret
612}
613
614// Retrieves the contents of @editable.
615//
616// The returned string is owned by GTK and must not be modified or freed.
617func (x *PasswordEntryRow) GetText() string {
618
619 cret := gtk.XGtkEditableGetText(x.GoPointer())
620 return cret
621}
622
623// Gets the number of characters of space reserved
624// for the contents of the editable.
625func (x *PasswordEntryRow) GetWidthChars() int {
626
627 cret := gtk.XGtkEditableGetWidthChars(x.GoPointer())
628 return cret
629}
630
631// Sets up a delegate for `GtkEditable`.
632//
633// This is assuming that the get_delegate vfunc in the `GtkEditable`
634// interface has been set up for the @editable's type.
635//
636// This is a helper function that should be called in instance init,
637// after creating the delegate object.
638func (x *PasswordEntryRow) InitDelegate() {
639
640 gtk.XGtkEditableInitDelegate(x.GoPointer())
641
642}
643
644// Inserts @length bytes of @text into the contents of the
645// widget, at position @position.
646//
647// Note that the position is in characters, not in bytes.
648// The function updates @position to point after the newly
649// inserted text.
650func (x *PasswordEntryRow) InsertText(TextVar string, LengthVar int, PositionVar int) {
651
652 gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar)
653
654}
655
656// Selects a region of text.
657//
658// The characters that are selected are those characters at positions
659// from @start_pos up to, but not including @end_pos. If @end_pos is
660// negative, then the characters selected are those characters from
661// @start_pos to the end of the text.
662//
663// Note that positions are specified in characters, not bytes.
664func (x *PasswordEntryRow) SelectRegion(StartPosVar int, EndPosVar int) {
665
666 gtk.XGtkEditableSelectRegion(x.GoPointer(), StartPosVar, EndPosVar)
667
668}
669
670// Sets the alignment for the contents of the editable.
671//
672// This controls the horizontal positioning of the contents when
673// the displayed text is shorter than the width of the editable.
674func (x *PasswordEntryRow) SetAlignment(XalignVar float32) {
675
676 gtk.XGtkEditableSetAlignment(x.GoPointer(), XalignVar)
677
678}
679
680// Determines if the user can edit the text in the editable widget.
681func (x *PasswordEntryRow) SetEditable(IsEditableVar bool) {
682
683 gtk.XGtkEditableSetEditable(x.GoPointer(), IsEditableVar)
684
685}
686
687// If enabled, changes to @editable will be saved for undo/redo
688// actions.
689//
690// This results in an additional copy of text changes and are not
691// stored in secure memory. As such, undo is forcefully disabled
692// when [property@Gtk.Text:visibility] is set to %FALSE.
693func (x *PasswordEntryRow) SetEnableUndo(EnableUndoVar bool) {
694
695 gtk.XGtkEditableSetEnableUndo(x.GoPointer(), EnableUndoVar)
696
697}
698
699// Sets the desired maximum width in characters of @editable.
700func (x *PasswordEntryRow) SetMaxWidthChars(NCharsVar int) {
701
702 gtk.XGtkEditableSetMaxWidthChars(x.GoPointer(), NCharsVar)
703
704}
705
706// Sets the cursor position in the editable to the given value.
707//
708// The cursor is displayed before the character with the given (base 0)
709// index in the contents of the editable. The value must be less than
710// or equal to the number of characters in the editable. A value of -1
711// indicates that the position should be set after the last character
712// of the editable. Note that @position is in characters, not in bytes.
713func (x *PasswordEntryRow) SetPosition(PositionVar int) {
714
715 gtk.XGtkEditableSetPosition(x.GoPointer(), PositionVar)
716
717}
718
719// Sets the text in the editable to the given value.
720//
721// This is replacing the current contents.
722func (x *PasswordEntryRow) SetText(TextVar string) {
723
724 gtk.XGtkEditableSetText(x.GoPointer(), TextVar)
725
726}
727
728// Changes the size request of the editable to be about the
729// right size for @n_chars characters.
730//
731// Note that it changes the size request, the size can still
732// be affected by how you pack the widget into containers.
733// If @n_chars is -1, the size reverts to the default size.
734func (x *PasswordEntryRow) SetWidthChars(NCharsVar int) {
735
736 gtk.XGtkEditableSetWidthChars(x.GoPointer(), NCharsVar)
737
738}
739
740func init() {
741 core.SetPackageName("ADW", "libadwaita-1")
742 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
743 var libs []uintptr
744 for _, libPath := range core.GetPaths("ADW") {
745 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
746 if err != nil {
747 panic(err)
748 }
749 libs = append(libs, lib)
750 }
751
752 core.PuregoSafeRegister(&xPasswordEntryRowGLibType, libs, "adw_password_entry_row_get_type")
753
754 core.PuregoSafeRegister(&xNewPasswordEntryRow, libs, "adw_password_entry_row_new")
755
756}