v0.2.1 c0399be

gtkentry.go RawHistoryFolder

1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
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/gdk"
12	"github.com/bnema/puregotk/v4/gio"
13	"github.com/bnema/puregotk/v4/glib"
14	"github.com/bnema/puregotk/v4/gobject"
15	"github.com/bnema/puregotk/v4/gobject/types"
16	"github.com/bnema/puregotk/v4/pango"
17)
18
19// Class structure for `GtkEntry`. All virtual functions have a default
20// implementation. Derived classes may set the virtual function pointers for the
21// signal handlers to %NULL, but must keep @get_text_area_size and
22// @get_frame_size non-%NULL; either use the default implementation, or provide
23// a custom one.
24type EntryClass struct {
25	_ structs.HostLayout
26
27	ParentClass WidgetClass
28
29	xActivate uintptr
30
31	Padding [8]uintptr
32}
33
34func (x *EntryClass) GoPointer() uintptr {
35	return uintptr(unsafe.Pointer(x))
36}
37
38// OverrideActivate sets the "activate" callback function.
39// Class handler for the `GtkEntry::activate` signal. The default
40//
41//	implementation activates the gtk.activate-default action.
42func (x *EntryClass) OverrideActivate(cb func(*Entry)) {
43	if cb == nil {
44		x.xActivate = 0
45	} else {
46		x.xActivate = purego.NewCallback(func(EntryVarp uintptr) {
47			cb(EntryNewFromInternalPtr(EntryVarp))
48		})
49	}
50}
51
52// GetActivate gets the "activate" callback function.
53// Class handler for the `GtkEntry::activate` signal. The default
54//
55//	implementation activates the gtk.activate-default action.
56func (x *EntryClass) GetActivate() func(*Entry) {
57	if x.xActivate == 0 {
58		return nil
59	}
60	var rawCallback func(EntryVarp uintptr)
61	purego.RegisterFunc(&rawCallback, x.xActivate)
62	return func(EntryVar *Entry) {
63		rawCallback(EntryVar.GoPointer())
64	}
65}
66
67// Specifies the side of the entry at which an icon is placed.
68type EntryIconPosition int
69
70var xEntryIconPositionGLibType func() types.GType
71
72func EntryIconPositionGLibType() types.GType {
73	return xEntryIconPositionGLibType()
74}
75
76const (
77
78	// At the beginning of the entry (depending on the text direction).
79	EntryIconPrimaryValue EntryIconPosition = 0
80	// At the end of the entry (depending on the text direction).
81	EntryIconSecondaryValue EntryIconPosition = 1
82)
83
84// A single-line text entry widget.
85//
86// <picture>
87//
88//	<source srcset="entry-dark.png" media="(prefers-color-scheme: dark)">
89//	<img alt="An example GtkEntry" src="entry.png">
90//
91// </picture>
92//
93// A fairly large set of key bindings are supported by default. If the
94// entered text is longer than the allocation of the widget, the widget
95// will scroll so that the cursor position is visible.
96//
97// When using an entry for passwords and other sensitive information, it
98// can be put into “password mode” using [method@Gtk.Entry.set_visibility].
99// In this mode, entered text is displayed using a “invisible” character.
100// By default, GTK picks the best invisible character that is available
101// in the current font, but it can be changed with
102// [method@Gtk.Entry.set_invisible_char].
103//
104// `GtkEntry` has the ability to display progress or activity
105// information behind the text. To make an entry display such information,
106// use [method@Gtk.Entry.set_progress_fraction] or
107// [method@Gtk.Entry.set_progress_pulse_step].
108//
109// Additionally, `GtkEntry` can show icons at either side of the entry.
110// These icons can be activatable by clicking, can be set up as drag source
111// and can have tooltips. To add an icon, use
112// [method@Gtk.Entry.set_icon_from_gicon] or one of the various other functions
113// that set an icon from an icon name or a paintable. To trigger an action when
114// the user clicks an icon, connect to the [signal@Gtk.Entry::icon-press] signal.
115// To allow DND operations from an icon, use
116// [method@Gtk.Entry.set_icon_drag_source]. To set a tooltip on an icon, use
117// [method@Gtk.Entry.set_icon_tooltip_text] or the corresponding function
118// for markup.
119//
120// Note that functionality or information that is only available by clicking
121// on an icon in an entry may not be accessible at all to users which are not
122// able to use a mouse or other pointing device. It is therefore recommended
123// that any such functionality should also be available by other means, e.g.
124// via the context menu of the entry.
125//
126// # CSS nodes
127//
128// ```
129// entry[.flat][.warning][.error]
130// ├── text[.readonly]
131// ├── image.left
132// ├── image.right
133// ╰── [progress[.pulse]]
134// ```
135//
136// `GtkEntry` has a main node with the name entry. Depending on the properties
137// of the entry, the style classes .read-only and .flat may appear. The style
138// classes .warning and .error may also be used with entries.
139//
140// When the entry shows icons, it adds subnodes with the name image and the
141// style class .left or .right, depending on where the icon appears.
142//
143// When the entry shows progress, it adds a subnode with the name progress.
144// The node has the style class .pulse when the shown progress is pulsing.
145//
146// For all the subnodes added to the text node in various situations,
147// see [class@Gtk.Text].
148//
149// # GtkEntry as GtkBuildable
150//
151// The `GtkEntry` implementation of the `GtkBuildable` interface supports a
152// custom `<attributes>` element, which supports any number of `<attribute>`
153// elements. The `<attribute>` element has attributes named “name“, “value“,
154// “start“ and “end“ and allows you to specify `PangoAttribute` values for
155// this label.
156//
157// An example of a UI definition fragment specifying Pango attributes:
158// ```xml
159// <object class="GtkEntry">
160//
161//	<attributes>
162//	  <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
163//	  <attribute name="background" value="red" start="5" end="10"/>
164//	</attributes>
165//
166// </object>
167// ```
168//
169// The start and end attributes specify the range of characters to which the
170// Pango attribute applies. If start and end are not specified, the attribute
171// is applied to the whole text. Note that specifying ranges does not make much
172// sense with translatable attributes. Use markup embedded in the translatable
173// content instead.
174//
175// # Accessibility
176//
177// `GtkEntry` uses the [enum@Gtk.AccessibleRole.text_box] role.
178type Entry struct {
179	Widget
180}
181
182var xEntryGLibType func() types.GType
183
184func EntryGLibType() types.GType {
185	return xEntryGLibType()
186}
187
188func EntryNewFromInternalPtr(ptr uintptr) *Entry {
189	cls := &Entry{}
190	cls.Ptr = ptr
191	return cls
192}
193
194var xNewEntry func() uintptr
195
196// Creates a new entry.
197func NewEntry() *Entry {
198	var cls *Entry
199
200	cret := xNewEntry()
201
202	if cret == 0 {
203		return nil
204	}
205	gobject.IncreaseRef(cret)
206	cls = &Entry{}
207	cls.Ptr = cret
208	return cls
209}
210
211var xNewEntryWithBuffer func(uintptr) uintptr
212
213// Creates a new entry with the specified text buffer.
214func NewEntryWithBuffer(BufferVar *EntryBuffer) *Entry {
215	var cls *Entry
216
217	cret := xNewEntryWithBuffer(BufferVar.GoPointer())
218
219	if cret == 0 {
220		return nil
221	}
222	gobject.IncreaseRef(cret)
223	cls = &Entry{}
224	cls.Ptr = cret
225	return cls
226}
227
228var xEntryGetActivatesDefault func(uintptr) bool
229
230// Retrieves the value set by gtk_entry_set_activates_default().
231func (x *Entry) GetActivatesDefault() bool {
232
233	cret := xEntryGetActivatesDefault(x.GoPointer())
234	return cret
235}
236
237var xEntryGetAlignment func(uintptr) float32
238
239// Gets the value set by gtk_entry_set_alignment().
240//
241// See also: [property@Gtk.Editable:xalign]
242func (x *Entry) GetAlignment() float32 {
243
244	cret := xEntryGetAlignment(x.GoPointer())
245	return cret
246}
247
248var xEntryGetAttributes func(uintptr) *pango.AttrList
249
250// Gets the attribute list of the `GtkEntry`.
251//
252// See [method@Gtk.Entry.set_attributes].
253func (x *Entry) GetAttributes() *pango.AttrList {
254
255	cret := xEntryGetAttributes(x.GoPointer())
256	return cret
257}
258
259var xEntryGetBuffer func(uintptr) uintptr
260
261// Get the `GtkEntryBuffer` object which holds the text for
262// this widget.
263func (x *Entry) GetBuffer() *EntryBuffer {
264	var cls *EntryBuffer
265
266	cret := xEntryGetBuffer(x.GoPointer())
267
268	if cret == 0 {
269		return nil
270	}
271	gobject.IncreaseRef(cret)
272	cls = &EntryBuffer{}
273	cls.Ptr = cret
274	return cls
275}
276
277var xEntryGetCompletion func(uintptr) uintptr
278
279// Returns the auxiliary completion object currently
280// in use by @entry.
281func (x *Entry) GetCompletion() *EntryCompletion {
282	var cls *EntryCompletion
283
284	cret := xEntryGetCompletion(x.GoPointer())
285
286	if cret == 0 {
287		return nil
288	}
289	gobject.IncreaseRef(cret)
290	cls = &EntryCompletion{}
291	cls.Ptr = cret
292	return cls
293}
294
295var xEntryGetCurrentIconDragSource func(uintptr) int
296
297// Returns the index of the icon which is the source of the
298// current  DND operation, or -1.
299func (x *Entry) GetCurrentIconDragSource() int {
300
301	cret := xEntryGetCurrentIconDragSource(x.GoPointer())
302	return cret
303}
304
305var xEntryGetExtraMenu func(uintptr) uintptr
306
307// Gets the menu model set with gtk_entry_set_extra_menu().
308func (x *Entry) GetExtraMenu() *gio.MenuModel {
309	var cls *gio.MenuModel
310
311	cret := xEntryGetExtraMenu(x.GoPointer())
312
313	if cret == 0 {
314		return nil
315	}
316	gobject.IncreaseRef(cret)
317	cls = &gio.MenuModel{}
318	cls.Ptr = cret
319	return cls
320}
321
322var xEntryGetHasFrame func(uintptr) bool
323
324// Gets the value set by gtk_entry_set_has_frame().
325func (x *Entry) GetHasFrame() bool {
326
327	cret := xEntryGetHasFrame(x.GoPointer())
328	return cret
329}
330
331var xEntryGetIconActivatable func(uintptr, EntryIconPosition) bool
332
333// Returns whether the icon is activatable.
334func (x *Entry) GetIconActivatable(IconPosVar EntryIconPosition) bool {
335
336	cret := xEntryGetIconActivatable(x.GoPointer(), IconPosVar)
337	return cret
338}
339
340var xEntryGetIconArea func(uintptr, EntryIconPosition, *gdk.Rectangle)
341
342// Gets the area where entry’s icon at @icon_pos is drawn.
343//
344// This function is useful when drawing something to the
345// entry in a draw callback.
346//
347// If the entry is not realized or has no icon at the given
348// position, @icon_area is filled with zeros. Otherwise,
349// @icon_area will be filled with the icon's allocation,
350// relative to @entry's allocation.
351func (x *Entry) GetIconArea(IconPosVar EntryIconPosition, IconAreaVar *gdk.Rectangle) {
352
353	xEntryGetIconArea(x.GoPointer(), IconPosVar, IconAreaVar)
354
355}
356
357var xEntryGetIconAtPos func(uintptr, int, int) int
358
359// Finds the icon at the given position and return its index.
360//
361// The position’s coordinates are relative to the @entry’s
362// top left corner. If @x, @y doesn’t lie inside an icon,
363// -1 is returned. This function is intended for use in a
364// [signal@Gtk.Widget::query-tooltip] signal handler.
365func (x *Entry) GetIconAtPos(XVar int, YVar int) int {
366
367	cret := xEntryGetIconAtPos(x.GoPointer(), XVar, YVar)
368	return cret
369}
370
371var xEntryGetIconGicon func(uintptr, EntryIconPosition) uintptr
372
373// Retrieves the `GIcon` used for the icon.
374//
375// %NULL will be returned if there is no icon or if the icon was
376// set by some other method (e.g., by `GdkPaintable` or icon name).
377func (x *Entry) GetIconGicon(IconPosVar EntryIconPosition) *gio.IconBase {
378	var cls *gio.IconBase
379
380	cret := xEntryGetIconGicon(x.GoPointer(), IconPosVar)
381
382	if cret == 0 {
383		return nil
384	}
385	gobject.IncreaseRef(cret)
386	cls = &gio.IconBase{}
387	cls.Ptr = cret
388	return cls
389}
390
391var xEntryGetIconName func(uintptr, EntryIconPosition) string
392
393// Retrieves the icon name used for the icon.
394//
395// %NULL is returned if there is no icon or if the icon was set
396// by some other method (e.g., by `GdkPaintable` or gicon).
397func (x *Entry) GetIconName(IconPosVar EntryIconPosition) string {
398
399	cret := xEntryGetIconName(x.GoPointer(), IconPosVar)
400	return cret
401}
402
403var xEntryGetIconPaintable func(uintptr, EntryIconPosition) uintptr
404
405// Retrieves the `GdkPaintable` used for the icon.
406//
407// If no `GdkPaintable` was used for the icon, %NULL is returned.
408func (x *Entry) GetIconPaintable(IconPosVar EntryIconPosition) *gdk.PaintableBase {
409	var cls *gdk.PaintableBase
410
411	cret := xEntryGetIconPaintable(x.GoPointer(), IconPosVar)
412
413	if cret == 0 {
414		return nil
415	}
416	gobject.IncreaseRef(cret)
417	cls = &gdk.PaintableBase{}
418	cls.Ptr = cret
419	return cls
420}
421
422var xEntryGetIconSensitive func(uintptr, EntryIconPosition) bool
423
424// Returns whether the icon appears sensitive or insensitive.
425func (x *Entry) GetIconSensitive(IconPosVar EntryIconPosition) bool {
426
427	cret := xEntryGetIconSensitive(x.GoPointer(), IconPosVar)
428	return cret
429}
430
431var xEntryGetIconStorageType func(uintptr, EntryIconPosition) ImageType
432
433// Gets the type of representation being used by the icon
434// to store image data.
435//
436// If the icon has no image data, the return value will
437// be %GTK_IMAGE_EMPTY.
438func (x *Entry) GetIconStorageType(IconPosVar EntryIconPosition) ImageType {
439
440	cret := xEntryGetIconStorageType(x.GoPointer(), IconPosVar)
441	return cret
442}
443
444var xEntryGetIconTooltipMarkup func(uintptr, EntryIconPosition) string
445
446// Gets the contents of the tooltip on the icon at the specified
447// position in @entry.
448func (x *Entry) GetIconTooltipMarkup(IconPosVar EntryIconPosition) string {
449
450	cret := xEntryGetIconTooltipMarkup(x.GoPointer(), IconPosVar)
451	return cret
452}
453
454var xEntryGetIconTooltipText func(uintptr, EntryIconPosition) string
455
456// Gets the contents of the tooltip on the icon at the specified
457// position in @entry.
458func (x *Entry) GetIconTooltipText(IconPosVar EntryIconPosition) string {
459
460	cret := xEntryGetIconTooltipText(x.GoPointer(), IconPosVar)
461	return cret
462}
463
464var xEntryGetInputHints func(uintptr) InputHints
465
466// Gets the input hints of this `GtkEntry`.
467func (x *Entry) GetInputHints() InputHints {
468
469	cret := xEntryGetInputHints(x.GoPointer())
470	return cret
471}
472
473var xEntryGetInputPurpose func(uintptr) InputPurpose
474
475// Gets the input purpose of the `GtkEntry`.
476func (x *Entry) GetInputPurpose() InputPurpose {
477
478	cret := xEntryGetInputPurpose(x.GoPointer())
479	return cret
480}
481
482var xEntryGetInvisibleChar func(uintptr) uint32
483
484// Retrieves the character displayed in place of the actual text
485// in “password mode”.
486func (x *Entry) GetInvisibleChar() uint32 {
487
488	cret := xEntryGetInvisibleChar(x.GoPointer())
489	return cret
490}
491
492var xEntryGetMaxLength func(uintptr) int
493
494// Retrieves the maximum allowed length of the text in @entry.
495//
496// See [method@Gtk.Entry.set_max_length].
497func (x *Entry) GetMaxLength() int {
498
499	cret := xEntryGetMaxLength(x.GoPointer())
500	return cret
501}
502
503var xEntryGetMenuEntryIconText func(uintptr, EntryIconPosition) string
504
505// Gets the text that will be used in the context menu of the `GtkEntry`
506// when the specified icon is activatable. Selecting this item in the menu
507// results, from all aspects, the same than clicking on the specified icon.
508// This greatly simplifies making accessible applications, because the icons
509// aren't focusable when using keyboard navigation. This is why Gtk recommends
510// to add the same action to the context menu.
511func (x *Entry) GetMenuEntryIconText(IconPosVar EntryIconPosition) string {
512
513	cret := xEntryGetMenuEntryIconText(x.GoPointer(), IconPosVar)
514	return cret
515}
516
517var xEntryGetOverwriteMode func(uintptr) bool
518
519// Gets whether the `GtkEntry` is in overwrite mode.
520func (x *Entry) GetOverwriteMode() bool {
521
522	cret := xEntryGetOverwriteMode(x.GoPointer())
523	return cret
524}
525
526var xEntryGetPlaceholderText func(uintptr) string
527
528// Retrieves the text that will be displayed when @entry
529// is empty and unfocused
530func (x *Entry) GetPlaceholderText() string {
531
532	cret := xEntryGetPlaceholderText(x.GoPointer())
533	return cret
534}
535
536var xEntryGetProgressFraction func(uintptr) float64
537
538// Returns the current fraction of the task that’s been completed.
539//
540// See [method@Gtk.Entry.set_progress_fraction].
541func (x *Entry) GetProgressFraction() float64 {
542
543	cret := xEntryGetProgressFraction(x.GoPointer())
544	return cret
545}
546
547var xEntryGetProgressPulseStep func(uintptr) float64
548
549// Retrieves the pulse step set with
550// gtk_entry_set_progress_pulse_step().
551func (x *Entry) GetProgressPulseStep() float64 {
552
553	cret := xEntryGetProgressPulseStep(x.GoPointer())
554	return cret
555}
556
557var xEntryGetTabs func(uintptr) *pango.TabArray
558
559// Gets the tabstops of the `GtkEntry`.
560//
561// See [method@Gtk.Entry.set_tabs].
562func (x *Entry) GetTabs() *pango.TabArray {
563
564	cret := xEntryGetTabs(x.GoPointer())
565	return cret
566}
567
568var xEntryGetTextLength func(uintptr) uint16
569
570// Retrieves the current length of the text in @entry.
571//
572// This is equivalent to getting @entry's `GtkEntryBuffer`
573// and calling [method@Gtk.EntryBuffer.get_length] on it.
574func (x *Entry) GetTextLength() uint16 {
575
576	cret := xEntryGetTextLength(x.GoPointer())
577	return cret
578}
579
580var xEntryGetVisibility func(uintptr) bool
581
582// Retrieves whether the text in @entry is visible.
583//
584// See [method@Gtk.Entry.set_visibility].
585func (x *Entry) GetVisibility() bool {
586
587	cret := xEntryGetVisibility(x.GoPointer())
588	return cret
589}
590
591var xEntryGrabFocusWithoutSelecting func(uintptr) bool
592
593// Causes @entry to have keyboard focus.
594//
595// It behaves like [method@Gtk.Widget.grab_focus], except that it doesn't
596// select the contents of the entry. You only want to call this on some
597// special entries which the user usually doesn't want to replace all text
598// in, such as search-as-you-type entries.
599func (x *Entry) GrabFocusWithoutSelecting() bool {
600
601	cret := xEntryGrabFocusWithoutSelecting(x.GoPointer())
602	return cret
603}
604
605var xEntryProgressPulse func(uintptr)
606
607// Indicates that some progress is made, but you don’t
608// know how much.
609//
610// Causes the entry’s progress indicator to enter “activity
611// mode”, where a block bounces back and forth. Each call to
612// gtk_entry_progress_pulse() causes the block to move by a
613// little bit (the amount of movement per pulse is determined
614// by [method@Gtk.Entry.set_progress_pulse_step]).
615func (x *Entry) ProgressPulse() {
616
617	xEntryProgressPulse(x.GoPointer())
618
619}
620
621var xEntryResetImContext func(uintptr)
622
623// Reset the input method context of the entry if needed.
624//
625// This can be necessary in the case where modifying the buffer
626// would confuse on-going input method behavior.
627func (x *Entry) ResetImContext() {
628
629	xEntryResetImContext(x.GoPointer())
630
631}
632
633var xEntrySetActivatesDefault func(uintptr, bool)
634
635// Sets whether pressing Enter in the @entry will activate the default
636// widget for the window containing the entry.
637//
638// This usually means that the dialog containing the entry will be closed,
639// since the default widget is usually one of the dialog buttons.
640func (x *Entry) SetActivatesDefault(SettingVar bool) {
641
642	xEntrySetActivatesDefault(x.GoPointer(), SettingVar)
643
644}
645
646var xEntrySetAlignment func(uintptr, float32)
647
648// Sets the alignment for the contents of the entry.
649//
650// This controls the horizontal positioning of the contents when
651// the displayed text is shorter than the width of the entry.
652//
653// See also: [property@Gtk.Editable:xalign]
654func (x *Entry) SetAlignment(XalignVar float32) {
655
656	xEntrySetAlignment(x.GoPointer(), XalignVar)
657
658}
659
660var xEntrySetAttributes func(uintptr, *pango.AttrList)
661
662// Sets a `PangoAttrList`.
663//
664// The attributes in the list are applied to the entry text.
665//
666// Since the attributes will be applied to text that changes
667// as the user types, it makes most sense to use attributes
668// with unlimited extent.
669func (x *Entry) SetAttributes(AttrsVar *pango.AttrList) {
670
671	xEntrySetAttributes(x.GoPointer(), AttrsVar)
672
673}
674
675var xEntrySetBuffer func(uintptr, uintptr)
676
677// Set the `GtkEntryBuffer` object which holds the text for
678// this widget.
679func (x *Entry) SetBuffer(BufferVar *EntryBuffer) {
680
681	xEntrySetBuffer(x.GoPointer(), BufferVar.GoPointer())
682
683}
684
685var xEntrySetCompletion func(uintptr, uintptr)
686
687// Sets @completion to be the auxiliary completion object
688// to use with @entry.
689//
690// All further configuration of the completion mechanism is
691// done on @completion using the `GtkEntryCompletion` API.
692// Completion is disabled if @completion is set to %NULL.
693func (x *Entry) SetCompletion(CompletionVar *EntryCompletion) {
694
695	xEntrySetCompletion(x.GoPointer(), CompletionVar.GoPointer())
696
697}
698
699var xEntrySetExtraMenu func(uintptr, uintptr)
700
701// Sets a menu model to add when constructing
702// the context menu for @entry.
703func (x *Entry) SetExtraMenu(ModelVar *gio.MenuModel) {
704
705	xEntrySetExtraMenu(x.GoPointer(), ModelVar.GoPointer())
706
707}
708
709var xEntrySetHasFrame func(uintptr, bool)
710
711// Sets whether the entry has a beveled frame around it.
712func (x *Entry) SetHasFrame(SettingVar bool) {
713
714	xEntrySetHasFrame(x.GoPointer(), SettingVar)
715
716}
717
718var xEntrySetIconActivatable func(uintptr, EntryIconPosition, bool)
719
720// Sets whether the icon is activatable.
721func (x *Entry) SetIconActivatable(IconPosVar EntryIconPosition, ActivatableVar bool) {
722
723	xEntrySetIconActivatable(x.GoPointer(), IconPosVar, ActivatableVar)
724
725}
726
727var xEntrySetIconDragSource func(uintptr, EntryIconPosition, uintptr, gdk.DragAction)
728
729// Sets up the icon at the given position as drag source.
730//
731// This makes it so that GTK will start a drag
732// operation when the user clicks and drags the icon.
733func (x *Entry) SetIconDragSource(IconPosVar EntryIconPosition, ProviderVar *gdk.ContentProvider, ActionsVar gdk.DragAction) {
734
735	xEntrySetIconDragSource(x.GoPointer(), IconPosVar, ProviderVar.GoPointer(), ActionsVar)
736
737}
738
739var xEntrySetIconFromGicon func(uintptr, EntryIconPosition, uintptr)
740
741// Sets the icon shown in the entry at the specified position
742// from the current icon theme.
743//
744// If the icon isn’t known, a “broken image” icon will be
745// displayed instead.
746//
747// If @icon is %NULL, no icon will be shown in the
748// specified position.
749func (x *Entry) SetIconFromGicon(IconPosVar EntryIconPosition, IconVar gio.Icon) {
750
751	xEntrySetIconFromGicon(x.GoPointer(), IconPosVar, IconVar.GoPointer())
752
753}
754
755var xEntrySetIconFromIconName func(uintptr, EntryIconPosition, uintptr)
756
757// Sets the icon shown in the entry at the specified position
758// from the current icon theme.
759//
760// If the icon name isn’t known, a “broken image” icon will be
761// displayed instead.
762//
763// If @icon_name is %NULL, no icon will be shown in the
764// specified position.
765func (x *Entry) SetIconFromIconName(IconPosVar EntryIconPosition, IconNameVar *string) {
766
767	IconNameVarPtr := core.GStrdupNullable(IconNameVar)
768	defer core.GFreeNullable(IconNameVarPtr)
769
770	xEntrySetIconFromIconName(x.GoPointer(), IconPosVar, IconNameVarPtr)
771
772}
773
774var xEntrySetIconFromPaintable func(uintptr, EntryIconPosition, uintptr)
775
776// Sets the icon shown in the specified position using a `GdkPaintable`.
777//
778// If @paintable is %NULL, no icon will be shown in the specified position.
779func (x *Entry) SetIconFromPaintable(IconPosVar EntryIconPosition, PaintableVar gdk.Paintable) {
780
781	xEntrySetIconFromPaintable(x.GoPointer(), IconPosVar, PaintableVar.GoPointer())
782
783}
784
785var xEntrySetIconSensitive func(uintptr, EntryIconPosition, bool)
786
787// Sets the sensitivity for the specified icon.
788func (x *Entry) SetIconSensitive(IconPosVar EntryIconPosition, SensitiveVar bool) {
789
790	xEntrySetIconSensitive(x.GoPointer(), IconPosVar, SensitiveVar)
791
792}
793
794var xEntrySetIconTooltipMarkup func(uintptr, EntryIconPosition, uintptr)
795
796// Sets @tooltip as the contents of the tooltip for the icon at
797// the specified position.
798//
799// @tooltip is assumed to be marked up with Pango Markup.
800//
801// Use %NULL for @tooltip to remove an existing tooltip.
802//
803// See also [method@Gtk.Widget.set_tooltip_markup] and
804// [method@Gtk.Entry.set_icon_tooltip_text].
805func (x *Entry) SetIconTooltipMarkup(IconPosVar EntryIconPosition, TooltipVar *string) {
806
807	TooltipVarPtr := core.GStrdupNullable(TooltipVar)
808	defer core.GFreeNullable(TooltipVarPtr)
809
810	xEntrySetIconTooltipMarkup(x.GoPointer(), IconPosVar, TooltipVarPtr)
811
812}
813
814var xEntrySetIconTooltipText func(uintptr, EntryIconPosition, uintptr)
815
816// Sets @tooltip as the contents of the tooltip for the icon
817// at the specified position.
818//
819// Use %NULL for @tooltip to remove an existing tooltip.
820//
821// See also [method@Gtk.Widget.set_tooltip_text] and
822// [method@Gtk.Entry.set_icon_tooltip_markup].
823//
824// If you unset the widget tooltip via
825// [method@Gtk.Widget.set_tooltip_text] or
826// [method@Gtk.Widget.set_tooltip_markup], this sets
827// [property@Gtk.Widget:has-tooltip] to %FALSE, which suppresses
828// icon tooltips too. You can resolve this by then calling
829// [method@Gtk.Widget.set_has_tooltip] to set
830// [property@Gtk.Widget:has-tooltip] back to %TRUE, or
831// setting at least one non-empty tooltip on any icon
832// achieves the same result.
833func (x *Entry) SetIconTooltipText(IconPosVar EntryIconPosition, TooltipVar *string) {
834
835	TooltipVarPtr := core.GStrdupNullable(TooltipVar)
836	defer core.GFreeNullable(TooltipVarPtr)
837
838	xEntrySetIconTooltipText(x.GoPointer(), IconPosVar, TooltipVarPtr)
839
840}
841
842var xEntrySetInputHints func(uintptr, InputHints)
843
844// Set additional hints which allow input methods to
845// fine-tune their behavior.
846func (x *Entry) SetInputHints(HintsVar InputHints) {
847
848	xEntrySetInputHints(x.GoPointer(), HintsVar)
849
850}
851
852var xEntrySetInputPurpose func(uintptr, InputPurpose)
853
854// Sets the input purpose which can be used by input methods
855// to adjust their behavior.
856func (x *Entry) SetInputPurpose(PurposeVar InputPurpose) {
857
858	xEntrySetInputPurpose(x.GoPointer(), PurposeVar)
859
860}
861
862var xEntrySetInvisibleChar func(uintptr, uint32)
863
864// Sets the character to use in place of the actual text
865// in “password mode”.
866//
867// See [method@Gtk.Entry.set_visibility] for how to enable
868// “password mode”.
869//
870// By default, GTK picks the best invisible char available in
871// the current font. If you set the invisible char to 0, then
872// the user will get no feedback at all; there will be no text
873// on the screen as they type.
874func (x *Entry) SetInvisibleChar(ChVar uint32) {
875
876	xEntrySetInvisibleChar(x.GoPointer(), ChVar)
877
878}
879
880var xEntrySetMaxLength func(uintptr, int)
881
882// Sets the maximum allowed length of the contents of the widget.
883//
884// If the current contents are longer than the given length, then
885// they will be truncated to fit. The length is in characters.
886//
887// This is equivalent to getting @entry's `GtkEntryBuffer` and
888// calling [method@Gtk.EntryBuffer.set_max_length] on it.
889func (x *Entry) SetMaxLength(MaxVar int) {
890
891	xEntrySetMaxLength(x.GoPointer(), MaxVar)
892
893}
894
895var xEntrySetMenuEntryIconText func(uintptr, EntryIconPosition, string)
896
897// Sets the text that will be used in the context menu of the `GtkEntry`
898// when the specified icon is activatable. Selecting this item in the menu
899// results, from all aspects, the same than clicking on the specified icon.
900// This greatly simplifies making accessible applications, because the icons
901// aren't focusable when using keyboard navigation. This is why Gtk recommends
902// to add the same action to the context menu.
903func (x *Entry) SetMenuEntryIconText(IconPosVar EntryIconPosition, TextVar string) {
904
905	xEntrySetMenuEntryIconText(x.GoPointer(), IconPosVar, TextVar)
906
907}
908
909var xEntrySetOverwriteMode func(uintptr, bool)
910
911// Sets whether the text is overwritten when typing in the `GtkEntry`.
912func (x *Entry) SetOverwriteMode(OverwriteVar bool) {
913
914	xEntrySetOverwriteMode(x.GoPointer(), OverwriteVar)
915
916}
917
918var xEntrySetPlaceholderText func(uintptr, uintptr)
919
920// Sets text to be displayed in @entry when it is empty.
921//
922// This can be used to give a visual hint of the expected
923// contents of the `GtkEntry`.
924func (x *Entry) SetPlaceholderText(TextVar *string) {
925
926	TextVarPtr := core.GStrdupNullable(TextVar)
927	defer core.GFreeNullable(TextVarPtr)
928
929	xEntrySetPlaceholderText(x.GoPointer(), TextVarPtr)
930
931}
932
933var xEntrySetProgressFraction func(uintptr, float64)
934
935// Causes the entry’s progress indicator to “fill in” the given
936// fraction of the bar.
937//
938// The fraction should be between 0.0 and 1.0, inclusive.
939func (x *Entry) SetProgressFraction(FractionVar float64) {
940
941	xEntrySetProgressFraction(x.GoPointer(), FractionVar)
942
943}
944
945var xEntrySetProgressPulseStep func(uintptr, float64)
946
947// Sets the fraction of total entry width to move the progress
948// bouncing block for each pulse.
949//
950// Use [method@Gtk.Entry.progress_pulse] to pulse
951// the progress.
952func (x *Entry) SetProgressPulseStep(FractionVar float64) {
953
954	xEntrySetProgressPulseStep(x.GoPointer(), FractionVar)
955
956}
957
958var xEntrySetTabs func(uintptr, *pango.TabArray)
959
960// Sets a `PangoTabArray`.
961//
962// The tabstops in the array are applied to the entry text.
963func (x *Entry) SetTabs(TabsVar *pango.TabArray) {
964
965	xEntrySetTabs(x.GoPointer(), TabsVar)
966
967}
968
969var xEntrySetVisibility func(uintptr, bool)
970
971// Sets whether the contents of the entry are visible or not.
972//
973// When visibility is set to %FALSE, characters are displayed
974// as the invisible char, and will also appear that way when
975// the text in the entry widget is copied elsewhere.
976//
977// By default, GTK picks the best invisible character available
978// in the current font, but it can be changed with
979// [method@Gtk.Entry.set_invisible_char].
980//
981// Note that you probably want to set [property@Gtk.Entry:input-purpose]
982// to %GTK_INPUT_PURPOSE_PASSWORD or %GTK_INPUT_PURPOSE_PIN to
983// inform input methods about the purpose of this entry,
984// in addition to setting visibility to %FALSE.
985func (x *Entry) SetVisibility(VisibleVar bool) {
986
987	xEntrySetVisibility(x.GoPointer(), VisibleVar)
988
989}
990
991var xEntryUnsetInvisibleChar func(uintptr)
992
993// Unsets the invisible char, so that the default invisible char
994// is used again. See [method@Gtk.Entry.set_invisible_char].
995func (x *Entry) UnsetInvisibleChar() {
996
997	xEntryUnsetInvisibleChar(x.GoPointer())
998
999}
1000
1001func (c *Entry) GoPointer() uintptr {
1002	if c == nil {
1003		return 0
1004	}
1005	return c.Ptr
1006}
1007
1008func (c *Entry) SetGoPointer(ptr uintptr) {
1009	c.Ptr = ptr
1010}
1011
1012// SetPropertyActivatesDefault sets the "activates-default" property.
1013// Whether to activate the default widget when Enter is pressed.
1014func (x *Entry) SetPropertyActivatesDefault(value bool) {
1015	var v gobject.Value
1016	v.Init(gobject.TypeBooleanVal)
1017	v.SetBoolean(value)
1018	x.SetProperty("activates-default", &v)
1019}
1020
1021// GetPropertyActivatesDefault gets the "activates-default" property.
1022// Whether to activate the default widget when Enter is pressed.
1023func (x *Entry) GetPropertyActivatesDefault() bool {
1024	var v gobject.Value
1025	x.GetProperty("activates-default", &v)
1026	return v.GetBoolean()
1027}
1028
1029// SetPropertyAttributes sets the "attributes" property.
1030// A list of Pango attributes to apply to the text of the entry.
1031//
1032// This is mainly useful to change the size or weight of the text.
1033//
1034// The `PangoAttribute`'s @start_index and @end_index must refer to the
1035// [class@Gtk.EntryBuffer] text, i.e. without the preedit string.
1036func (x *Entry) SetPropertyAttributes(value uintptr) {
1037	var v gobject.Value
1038	v.Init(gobject.TypePointerVal)
1039	v.SetPointer(value)
1040	x.SetProperty("attributes", &v)
1041}
1042
1043// GetPropertyAttributes gets the "attributes" property.
1044// A list of Pango attributes to apply to the text of the entry.
1045//
1046// This is mainly useful to change the size or weight of the text.
1047//
1048// The `PangoAttribute`'s @start_index and @end_index must refer to the
1049// [class@Gtk.EntryBuffer] text, i.e. without the preedit string.
1050func (x *Entry) GetPropertyAttributes() uintptr {
1051	var v gobject.Value
1052	x.GetProperty("attributes", &v)
1053	return v.GetPointer()
1054}
1055
1056// SetPropertyEnableEmojiCompletion sets the "enable-emoji-completion" property.
1057// Whether to suggest Emoji replacements for :-delimited names
1058// like `:heart:`.
1059func (x *Entry) SetPropertyEnableEmojiCompletion(value bool) {
1060	var v gobject.Value
1061	v.Init(gobject.TypeBooleanVal)
1062	v.SetBoolean(value)
1063	x.SetProperty("enable-emoji-completion", &v)
1064}
1065
1066// GetPropertyEnableEmojiCompletion gets the "enable-emoji-completion" property.
1067// Whether to suggest Emoji replacements for :-delimited names
1068// like `:heart:`.
1069func (x *Entry) GetPropertyEnableEmojiCompletion() bool {
1070	var v gobject.Value
1071	x.GetProperty("enable-emoji-completion", &v)
1072	return v.GetBoolean()
1073}
1074
1075// SetPropertyHasFrame sets the "has-frame" property.
1076// Whether the entry should draw a frame.
1077func (x *Entry) SetPropertyHasFrame(value bool) {
1078	var v gobject.Value
1079	v.Init(gobject.TypeBooleanVal)
1080	v.SetBoolean(value)
1081	x.SetProperty("has-frame", &v)
1082}
1083
1084// GetPropertyHasFrame gets the "has-frame" property.
1085// Whether the entry should draw a frame.
1086func (x *Entry) GetPropertyHasFrame() bool {
1087	var v gobject.Value
1088	x.GetProperty("has-frame", &v)
1089	return v.GetBoolean()
1090}
1091
1092// SetPropertyImModule sets the "im-module" property.
1093// Which IM (input method) module should be used for this entry.
1094//
1095// See [class@Gtk.IMContext].
1096//
1097// Setting this to a non-%NULL value overrides the system-wide IM
1098// module setting. See the GtkSettings [property@Gtk.Settings:gtk-im-module]
1099// property.
1100func (x *Entry) SetPropertyImModule(value string) {
1101	var v gobject.Value
1102	v.Init(gobject.TypeStringVal)
1103	v.SetString(&value)
1104	x.SetProperty("im-module", &v)
1105}
1106
1107// GetPropertyImModule gets the "im-module" property.
1108// Which IM (input method) module should be used for this entry.
1109//
1110// See [class@Gtk.IMContext].
1111//
1112// Setting this to a non-%NULL value overrides the system-wide IM
1113// module setting. See the GtkSettings [property@Gtk.Settings:gtk-im-module]
1114// property.
1115func (x *Entry) GetPropertyImModule() string {
1116	var v gobject.Value
1117	x.GetProperty("im-module", &v)
1118	return v.GetString()
1119}
1120
1121// SetPropertyInvisibleChar sets the "invisible-char" property.
1122// The character to use when masking entry contents (“password mode”).
1123func (x *Entry) SetPropertyInvisibleChar(value uint) {
1124	var v gobject.Value
1125	v.Init(gobject.TypeUintVal)
1126	v.SetUint(value)
1127	x.SetProperty("invisible-char", &v)
1128}
1129
1130// GetPropertyInvisibleChar gets the "invisible-char" property.
1131// The character to use when masking entry contents (“password mode”).
1132func (x *Entry) GetPropertyInvisibleChar() uint {
1133	var v gobject.Value
1134	x.GetProperty("invisible-char", &v)
1135	return v.GetUint()
1136}
1137
1138// SetPropertyInvisibleCharSet sets the "invisible-char-set" property.
1139// Whether the invisible char has been set for the `GtkEntry`.
1140func (x *Entry) SetPropertyInvisibleCharSet(value bool) {
1141	var v gobject.Value
1142	v.Init(gobject.TypeBooleanVal)
1143	v.SetBoolean(value)
1144	x.SetProperty("invisible-char-set", &v)
1145}
1146
1147// GetPropertyInvisibleCharSet gets the "invisible-char-set" property.
1148// Whether the invisible char has been set for the `GtkEntry`.
1149func (x *Entry) GetPropertyInvisibleCharSet() bool {
1150	var v gobject.Value
1151	x.GetProperty("invisible-char-set", &v)
1152	return v.GetBoolean()
1153}
1154
1155// SetPropertyMaxLength sets the "max-length" property.
1156// Maximum number of characters for this entry.
1157func (x *Entry) SetPropertyMaxLength(value int) {
1158	var v gobject.Value
1159	v.Init(gobject.TypeIntVal)
1160	v.SetInt(value)
1161	x.SetProperty("max-length", &v)
1162}
1163
1164// GetPropertyMaxLength gets the "max-length" property.
1165// Maximum number of characters for this entry.
1166func (x *Entry) GetPropertyMaxLength() int {
1167	var v gobject.Value
1168	x.GetProperty("max-length", &v)
1169	return v.GetInt()
1170}
1171
1172// SetPropertyMenuEntryIconPrimaryText sets the "menu-entry-icon-primary-text" property.
1173// Text for an item in the context menu to activate the primary icon action.
1174//
1175// When the primary icon is activatable and this property has been set, a new entry
1176// in the context menu of this GtkEntry will appear with this text. Selecting that
1177// menu entry will result in the primary icon being activated, exactly in the same way
1178// as it would be activated from a mouse click.
1179//
1180// This simplifies adding accessibility support to applications using activatable
1181// icons. The activatable icons aren't focusable when navigating the interface with
1182// the keyboard This is why Gtk recommends to also add those actions in the context
1183// menu. This set of methods greatly simplifies this, by adding a menu item that, when
1184// enabled, calls the same callback than clicking on the icon.
1185func (x *Entry) SetPropertyMenuEntryIconPrimaryText(value string) {
1186	var v gobject.Value
1187	v.Init(gobject.TypeStringVal)
1188	v.SetString(&value)
1189	x.SetProperty("menu-entry-icon-primary-text", &v)
1190}
1191
1192// GetPropertyMenuEntryIconPrimaryText gets the "menu-entry-icon-primary-text" property.
1193// Text for an item in the context menu to activate the primary icon action.
1194//
1195// When the primary icon is activatable and this property has been set, a new entry
1196// in the context menu of this GtkEntry will appear with this text. Selecting that
1197// menu entry will result in the primary icon being activated, exactly in the same way
1198// as it would be activated from a mouse click.
1199//
1200// This simplifies adding accessibility support to applications using activatable
1201// icons. The activatable icons aren't focusable when navigating the interface with
1202// the keyboard This is why Gtk recommends to also add those actions in the context
1203// menu. This set of methods greatly simplifies this, by adding a menu item that, when
1204// enabled, calls the same callback than clicking on the icon.
1205func (x *Entry) GetPropertyMenuEntryIconPrimaryText() string {
1206	var v gobject.Value
1207	x.GetProperty("menu-entry-icon-primary-text", &v)
1208	return v.GetString()
1209}
1210
1211// SetPropertyMenuEntryIconSecondaryText sets the "menu-entry-icon-secondary-text" property.
1212// Text for an item in the context menu to activate the secondary icon action.
1213//
1214// When the primary icon is activatable and this property has been set, a new entry
1215// in the context menu of this GtkEntry will appear with this text. Selecting that
1216// menu entry will result in the primary icon being activated, exactly in the same way
1217// as it would be activated from a mouse click.
1218//
1219// This simplifies adding accessibility support to applications using activatable
1220// icons. The activatable icons aren't focusable when navigating the interface with
1221// the keyboard This is why Gtk recommends to also add those actions in the context
1222// menu. This set of methods greatly simplifies this, by adding a menu item that, when
1223// enabled, calls the same callback than clicking on the icon.
1224func (x *Entry) SetPropertyMenuEntryIconSecondaryText(value string) {
1225	var v gobject.Value
1226	v.Init(gobject.TypeStringVal)
1227	v.SetString(&value)
1228	x.SetProperty("menu-entry-icon-secondary-text", &v)
1229}
1230
1231// GetPropertyMenuEntryIconSecondaryText gets the "menu-entry-icon-secondary-text" property.
1232// Text for an item in the context menu to activate the secondary icon action.
1233//
1234// When the primary icon is activatable and this property has been set, a new entry
1235// in the context menu of this GtkEntry will appear with this text. Selecting that
1236// menu entry will result in the primary icon being activated, exactly in the same way
1237// as it would be activated from a mouse click.
1238//
1239// This simplifies adding accessibility support to applications using activatable
1240// icons. The activatable icons aren't focusable when navigating the interface with
1241// the keyboard This is why Gtk recommends to also add those actions in the context
1242// menu. This set of methods greatly simplifies this, by adding a menu item that, when
1243// enabled, calls the same callback than clicking on the icon.
1244func (x *Entry) GetPropertyMenuEntryIconSecondaryText() string {
1245	var v gobject.Value
1246	x.GetProperty("menu-entry-icon-secondary-text", &v)
1247	return v.GetString()
1248}
1249
1250// SetPropertyOverwriteMode sets the "overwrite-mode" property.
1251// If text is overwritten when typing in the `GtkEntry`.
1252func (x *Entry) SetPropertyOverwriteMode(value bool) {
1253	var v gobject.Value
1254	v.Init(gobject.TypeBooleanVal)
1255	v.SetBoolean(value)
1256	x.SetProperty("overwrite-mode", &v)
1257}
1258
1259// GetPropertyOverwriteMode gets the "overwrite-mode" property.
1260// If text is overwritten when typing in the `GtkEntry`.
1261func (x *Entry) GetPropertyOverwriteMode() bool {
1262	var v gobject.Value
1263	x.GetProperty("overwrite-mode", &v)
1264	return v.GetBoolean()
1265}
1266
1267// SetPropertyPlaceholderText sets the "placeholder-text" property.
1268// The text that will be displayed in the `GtkEntry` when it is empty
1269// and unfocused.
1270func (x *Entry) SetPropertyPlaceholderText(value string) {
1271	var v gobject.Value
1272	v.Init(gobject.TypeStringVal)
1273	v.SetString(&value)
1274	x.SetProperty("placeholder-text", &v)
1275}
1276
1277// GetPropertyPlaceholderText gets the "placeholder-text" property.
1278// The text that will be displayed in the `GtkEntry` when it is empty
1279// and unfocused.
1280func (x *Entry) GetPropertyPlaceholderText() string {
1281	var v gobject.Value
1282	x.GetProperty("placeholder-text", &v)
1283	return v.GetString()
1284}
1285
1286// SetPropertyPrimaryIconActivatable sets the "primary-icon-activatable" property.
1287// Whether the primary icon is activatable.
1288//
1289// GTK emits the [signal@Gtk.Entry::icon-press] and
1290// [signal@Gtk.Entry::icon-release] signals only on sensitive,
1291// activatable icons.
1292//
1293// Sensitive, but non-activatable icons can be used for purely
1294// informational purposes.
1295func (x *Entry) SetPropertyPrimaryIconActivatable(value bool) {
1296	var v gobject.Value
1297	v.Init(gobject.TypeBooleanVal)
1298	v.SetBoolean(value)
1299	x.SetProperty("primary-icon-activatable", &v)
1300}
1301
1302// GetPropertyPrimaryIconActivatable gets the "primary-icon-activatable" property.
1303// Whether the primary icon is activatable.
1304//
1305// GTK emits the [signal@Gtk.Entry::icon-press] and
1306// [signal@Gtk.Entry::icon-release] signals only on sensitive,
1307// activatable icons.
1308//
1309// Sensitive, but non-activatable icons can be used for purely
1310// informational purposes.
1311func (x *Entry) GetPropertyPrimaryIconActivatable() bool {
1312	var v gobject.Value
1313	x.GetProperty("primary-icon-activatable", &v)
1314	return v.GetBoolean()
1315}
1316
1317// SetPropertyPrimaryIconName sets the "primary-icon-name" property.
1318// The icon name to use for the primary icon for the entry.
1319func (x *Entry) SetPropertyPrimaryIconName(value string) {
1320	var v gobject.Value
1321	v.Init(gobject.TypeStringVal)
1322	v.SetString(&value)
1323	x.SetProperty("primary-icon-name", &v)
1324}
1325
1326// GetPropertyPrimaryIconName gets the "primary-icon-name" property.
1327// The icon name to use for the primary icon for the entry.
1328func (x *Entry) GetPropertyPrimaryIconName() string {
1329	var v gobject.Value
1330	x.GetProperty("primary-icon-name", &v)
1331	return v.GetString()
1332}
1333
1334// SetPropertyPrimaryIconSensitive sets the "primary-icon-sensitive" property.
1335// Whether the primary icon is sensitive.
1336//
1337// An insensitive icon appears grayed out. GTK does not emit the
1338// [signal@Gtk.Entry::icon-press] and [signal@Gtk.Entry::icon-release]
1339// signals and does not allow DND from insensitive icons.
1340//
1341// An icon should be set insensitive if the action that would trigger
1342// when clicked is currently not available.
1343func (x *Entry) SetPropertyPrimaryIconSensitive(value bool) {
1344	var v gobject.Value
1345	v.Init(gobject.TypeBooleanVal)
1346	v.SetBoolean(value)
1347	x.SetProperty("primary-icon-sensitive", &v)
1348}
1349
1350// GetPropertyPrimaryIconSensitive gets the "primary-icon-sensitive" property.
1351// Whether the primary icon is sensitive.
1352//
1353// An insensitive icon appears grayed out. GTK does not emit the
1354// [signal@Gtk.Entry::icon-press] and [signal@Gtk.Entry::icon-release]
1355// signals and does not allow DND from insensitive icons.
1356//
1357// An icon should be set insensitive if the action that would trigger
1358// when clicked is currently not available.
1359func (x *Entry) GetPropertyPrimaryIconSensitive() bool {
1360	var v gobject.Value
1361	x.GetProperty("primary-icon-sensitive", &v)
1362	return v.GetBoolean()
1363}
1364
1365// SetPropertyPrimaryIconTooltipMarkup sets the "primary-icon-tooltip-markup" property.
1366// The contents of the tooltip on the primary icon, with markup.
1367//
1368// Also see [method@Gtk.Entry.set_icon_tooltip_markup].
1369func (x *Entry) SetPropertyPrimaryIconTooltipMarkup(value string) {
1370	var v gobject.Value
1371	v.Init(gobject.TypeStringVal)
1372	v.SetString(&value)
1373	x.SetProperty("primary-icon-tooltip-markup", &v)
1374}
1375
1376// GetPropertyPrimaryIconTooltipMarkup gets the "primary-icon-tooltip-markup" property.
1377// The contents of the tooltip on the primary icon, with markup.
1378//
1379// Also see [method@Gtk.Entry.set_icon_tooltip_markup].
1380func (x *Entry) GetPropertyPrimaryIconTooltipMarkup() string {
1381	var v gobject.Value
1382	x.GetProperty("primary-icon-tooltip-markup", &v)
1383	return v.GetString()
1384}
1385
1386// SetPropertyPrimaryIconTooltipText sets the "primary-icon-tooltip-text" property.
1387// The contents of the tooltip on the primary icon.
1388//
1389// Also see [method@Gtk.Entry.set_icon_tooltip_text].
1390func (x *Entry) SetPropertyPrimaryIconTooltipText(value string) {
1391	var v gobject.Value
1392	v.Init(gobject.TypeStringVal)
1393	v.SetString(&value)
1394	x.SetProperty("primary-icon-tooltip-text", &v)
1395}
1396
1397// GetPropertyPrimaryIconTooltipText gets the "primary-icon-tooltip-text" property.
1398// The contents of the tooltip on the primary icon.
1399//
1400// Also see [method@Gtk.Entry.set_icon_tooltip_text].
1401func (x *Entry) GetPropertyPrimaryIconTooltipText() string {
1402	var v gobject.Value
1403	x.GetProperty("primary-icon-tooltip-text", &v)
1404	return v.GetString()
1405}
1406
1407// SetPropertyProgressFraction sets the "progress-fraction" property.
1408// The current fraction of the task that's been completed.
1409func (x *Entry) SetPropertyProgressFraction(value float64) {
1410	var v gobject.Value
1411	v.Init(gobject.TypeDoubleVal)
1412	v.SetDouble(value)
1413	x.SetProperty("progress-fraction", &v)
1414}
1415
1416// GetPropertyProgressFraction gets the "progress-fraction" property.
1417// The current fraction of the task that's been completed.
1418func (x *Entry) GetPropertyProgressFraction() float64 {
1419	var v gobject.Value
1420	x.GetProperty("progress-fraction", &v)
1421	return v.GetDouble()
1422}
1423
1424// SetPropertyProgressPulseStep sets the "progress-pulse-step" property.
1425// The fraction of total entry width to move the progress
1426// bouncing block for each pulse.
1427//
1428// See [method@Gtk.Entry.progress_pulse].
1429func (x *Entry) SetPropertyProgressPulseStep(value float64) {
1430	var v gobject.Value
1431	v.Init(gobject.TypeDoubleVal)
1432	v.SetDouble(value)
1433	x.SetProperty("progress-pulse-step", &v)
1434}
1435
1436// GetPropertyProgressPulseStep gets the "progress-pulse-step" property.
1437// The fraction of total entry width to move the progress
1438// bouncing block for each pulse.
1439//
1440// See [method@Gtk.Entry.progress_pulse].
1441func (x *Entry) GetPropertyProgressPulseStep() float64 {
1442	var v gobject.Value
1443	x.GetProperty("progress-pulse-step", &v)
1444	return v.GetDouble()
1445}
1446
1447// GetPropertyScrollOffset gets the "scroll-offset" property.
1448// Number of pixels of the entry scrolled off the screen to the left.
1449func (x *Entry) GetPropertyScrollOffset() int {
1450	var v gobject.Value
1451	x.GetProperty("scroll-offset", &v)
1452	return v.GetInt()
1453}
1454
1455// SetPropertySecondaryIconActivatable sets the "secondary-icon-activatable" property.
1456// Whether the secondary icon is activatable.
1457//
1458// GTK emits the [signal@Gtk.Entry::icon-press] and
1459// [signal@Gtk.Entry::icon-release] signals only on sensitive,
1460// activatable icons.
1461//
1462// Sensitive, but non-activatable icons can be used for purely
1463// informational purposes.
1464func (x *Entry) SetPropertySecondaryIconActivatable(value bool) {
1465	var v gobject.Value
1466	v.Init(gobject.TypeBooleanVal)
1467	v.SetBoolean(value)
1468	x.SetProperty("secondary-icon-activatable", &v)
1469}
1470
1471// GetPropertySecondaryIconActivatable gets the "secondary-icon-activatable" property.
1472// Whether the secondary icon is activatable.
1473//
1474// GTK emits the [signal@Gtk.Entry::icon-press] and
1475// [signal@Gtk.Entry::icon-release] signals only on sensitive,
1476// activatable icons.
1477//
1478// Sensitive, but non-activatable icons can be used for purely
1479// informational purposes.
1480func (x *Entry) GetPropertySecondaryIconActivatable() bool {
1481	var v gobject.Value
1482	x.GetProperty("secondary-icon-activatable", &v)
1483	return v.GetBoolean()
1484}
1485
1486// SetPropertySecondaryIconName sets the "secondary-icon-name" property.
1487// The icon name to use for the secondary icon for the entry.
1488func (x *Entry) SetPropertySecondaryIconName(value string) {
1489	var v gobject.Value
1490	v.Init(gobject.TypeStringVal)
1491	v.SetString(&value)
1492	x.SetProperty("secondary-icon-name", &v)
1493}
1494
1495// GetPropertySecondaryIconName gets the "secondary-icon-name" property.
1496// The icon name to use for the secondary icon for the entry.
1497func (x *Entry) GetPropertySecondaryIconName() string {
1498	var v gobject.Value
1499	x.GetProperty("secondary-icon-name", &v)
1500	return v.GetString()
1501}
1502
1503// SetPropertySecondaryIconSensitive sets the "secondary-icon-sensitive" property.
1504// Whether the secondary icon is sensitive.
1505//
1506// An insensitive icon appears grayed out. GTK does not emit the
1507// [signal@Gtk.Entry::icon-press[ and [signal@Gtk.Entry::icon-release]
1508// signals and does not allow DND from insensitive icons.
1509//
1510// An icon should be set insensitive if the action that would trigger
1511// when clicked is currently not available.
1512func (x *Entry) SetPropertySecondaryIconSensitive(value bool) {
1513	var v gobject.Value
1514	v.Init(gobject.TypeBooleanVal)
1515	v.SetBoolean(value)
1516	x.SetProperty("secondary-icon-sensitive", &v)
1517}
1518
1519// GetPropertySecondaryIconSensitive gets the "secondary-icon-sensitive" property.
1520// Whether the secondary icon is sensitive.
1521//
1522// An insensitive icon appears grayed out. GTK does not emit the
1523// [signal@Gtk.Entry::icon-press[ and [signal@Gtk.Entry::icon-release]
1524// signals and does not allow DND from insensitive icons.
1525//
1526// An icon should be set insensitive if the action that would trigger
1527// when clicked is currently not available.
1528func (x *Entry) GetPropertySecondaryIconSensitive() bool {
1529	var v gobject.Value
1530	x.GetProperty("secondary-icon-sensitive", &v)
1531	return v.GetBoolean()
1532}
1533
1534// SetPropertySecondaryIconTooltipMarkup sets the "secondary-icon-tooltip-markup" property.
1535// The contents of the tooltip on the secondary icon, with markup.
1536//
1537// Also see [method@Gtk.Entry.set_icon_tooltip_markup].
1538func (x *Entry) SetPropertySecondaryIconTooltipMarkup(value string) {
1539	var v gobject.Value
1540	v.Init(gobject.TypeStringVal)
1541	v.SetString(&value)
1542	x.SetProperty("secondary-icon-tooltip-markup", &v)
1543}
1544
1545// GetPropertySecondaryIconTooltipMarkup gets the "secondary-icon-tooltip-markup" property.
1546// The contents of the tooltip on the secondary icon, with markup.
1547//
1548// Also see [method@Gtk.Entry.set_icon_tooltip_markup].
1549func (x *Entry) GetPropertySecondaryIconTooltipMarkup() string {
1550	var v gobject.Value
1551	x.GetProperty("secondary-icon-tooltip-markup", &v)
1552	return v.GetString()
1553}
1554
1555// SetPropertySecondaryIconTooltipText sets the "secondary-icon-tooltip-text" property.
1556// The contents of the tooltip on the secondary icon.
1557//
1558// Also see [method@Gtk.Entry.set_icon_tooltip_text].
1559func (x *Entry) SetPropertySecondaryIconTooltipText(value string) {
1560	var v gobject.Value
1561	v.Init(gobject.TypeStringVal)
1562	v.SetString(&value)
1563	x.SetProperty("secondary-icon-tooltip-text", &v)
1564}
1565
1566// GetPropertySecondaryIconTooltipText gets the "secondary-icon-tooltip-text" property.
1567// The contents of the tooltip on the secondary icon.
1568//
1569// Also see [method@Gtk.Entry.set_icon_tooltip_text].
1570func (x *Entry) GetPropertySecondaryIconTooltipText() string {
1571	var v gobject.Value
1572	x.GetProperty("secondary-icon-tooltip-text", &v)
1573	return v.GetString()
1574}
1575
1576// SetPropertyShowEmojiIcon sets the "show-emoji-icon" property.
1577// Whether the entry will show an Emoji icon in the secondary icon position
1578// to open the Emoji chooser.
1579func (x *Entry) SetPropertyShowEmojiIcon(value bool) {
1580	var v gobject.Value
1581	v.Init(gobject.TypeBooleanVal)
1582	v.SetBoolean(value)
1583	x.SetProperty("show-emoji-icon", &v)
1584}
1585
1586// GetPropertyShowEmojiIcon gets the "show-emoji-icon" property.
1587// Whether the entry will show an Emoji icon in the secondary icon position
1588// to open the Emoji chooser.
1589func (x *Entry) GetPropertyShowEmojiIcon() bool {
1590	var v gobject.Value
1591	x.GetProperty("show-emoji-icon", &v)
1592	return v.GetBoolean()
1593}
1594
1595// SetPropertyTabs sets the "tabs" property.
1596// A list of tabstops to apply to the text of the entry.
1597func (x *Entry) SetPropertyTabs(value uintptr) {
1598	var v gobject.Value
1599	v.Init(gobject.TypePointerVal)
1600	v.SetPointer(value)
1601	x.SetProperty("tabs", &v)
1602}
1603
1604// GetPropertyTabs gets the "tabs" property.
1605// A list of tabstops to apply to the text of the entry.
1606func (x *Entry) GetPropertyTabs() uintptr {
1607	var v gobject.Value
1608	x.GetProperty("tabs", &v)
1609	return v.GetPointer()
1610}
1611
1612// GetPropertyTextLength gets the "text-length" property.
1613// The length of the text in the `GtkEntry`.
1614func (x *Entry) GetPropertyTextLength() uint {
1615	var v gobject.Value
1616	x.GetProperty("text-length", &v)
1617	return v.GetUint()
1618}
1619
1620// SetPropertyTruncateMultiline sets the "truncate-multiline" property.
1621// When %TRUE, pasted multi-line text is truncated to the first line.
1622func (x *Entry) SetPropertyTruncateMultiline(value bool) {
1623	var v gobject.Value
1624	v.Init(gobject.TypeBooleanVal)
1625	v.SetBoolean(value)
1626	x.SetProperty("truncate-multiline", &v)
1627}
1628
1629// GetPropertyTruncateMultiline gets the "truncate-multiline" property.
1630// When %TRUE, pasted multi-line text is truncated to the first line.
1631func (x *Entry) GetPropertyTruncateMultiline() bool {
1632	var v gobject.Value
1633	x.GetProperty("truncate-multiline", &v)
1634	return v.GetBoolean()
1635}
1636
1637// SetPropertyVisibility sets the "visibility" property.
1638// Whether the entry should show the “invisible char” instead of the
1639// actual text (“password mode”).
1640func (x *Entry) SetPropertyVisibility(value bool) {
1641	var v gobject.Value
1642	v.Init(gobject.TypeBooleanVal)
1643	v.SetBoolean(value)
1644	x.SetProperty("visibility", &v)
1645}
1646
1647// GetPropertyVisibility gets the "visibility" property.
1648// Whether the entry should show the “invisible char” instead of the
1649// actual text (“password mode”).
1650func (x *Entry) GetPropertyVisibility() bool {
1651	var v gobject.Value
1652	x.GetProperty("visibility", &v)
1653	return v.GetBoolean()
1654}
1655
1656// Emitted when the entry is activated.
1657//
1658// The keybindings for this signal are all forms of the Enter key.
1659func (x *Entry) ConnectActivate(cb *func(Entry)) uint {
1660	cbPtr := uintptr(unsafe.Pointer(cb))
1661	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1662		handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr)
1663		glib.SaveHandlerMapping(handlerID, cbPtr)
1664		return handlerID
1665	}
1666
1667	fcb := func(clsPtr uintptr) {
1668		fa := Entry{}
1669		fa.Ptr = clsPtr
1670		cbFn := *cb
1671
1672		cbFn(fa)
1673
1674	}
1675	cbRefPtr := purego.NewCallback(fcb)
1676	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1677	handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr)
1678	glib.SaveHandlerMapping(handlerID, cbPtr)
1679	return handlerID
1680}
1681
1682// Emitted when an activatable icon is clicked.
1683func (x *Entry) ConnectIconPress(cb *func(Entry, EntryIconPosition)) uint {
1684	cbPtr := uintptr(unsafe.Pointer(cb))
1685	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1686		handlerID := gobject.SignalConnect(x.GoPointer(), "icon-press", cbRefPtr)
1687		glib.SaveHandlerMapping(handlerID, cbPtr)
1688		return handlerID
1689	}
1690
1691	fcb := func(clsPtr uintptr, IconPosVarp EntryIconPosition) {
1692		fa := Entry{}
1693		fa.Ptr = clsPtr
1694		cbFn := *cb
1695
1696		cbFn(fa, IconPosVarp)
1697
1698	}
1699	cbRefPtr := purego.NewCallback(fcb)
1700	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1701	handlerID := gobject.SignalConnect(x.GoPointer(), "icon-press", cbRefPtr)
1702	glib.SaveHandlerMapping(handlerID, cbPtr)
1703	return handlerID
1704}
1705
1706// Emitted on the button release from a mouse click
1707// over an activatable icon.
1708func (x *Entry) ConnectIconRelease(cb *func(Entry, EntryIconPosition)) uint {
1709	cbPtr := uintptr(unsafe.Pointer(cb))
1710	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1711		handlerID := gobject.SignalConnect(x.GoPointer(), "icon-release", cbRefPtr)
1712		glib.SaveHandlerMapping(handlerID, cbPtr)
1713		return handlerID
1714	}
1715
1716	fcb := func(clsPtr uintptr, IconPosVarp EntryIconPosition) {
1717		fa := Entry{}
1718		fa.Ptr = clsPtr
1719		cbFn := *cb
1720
1721		cbFn(fa, IconPosVarp)
1722
1723	}
1724	cbRefPtr := purego.NewCallback(fcb)
1725	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1726	handlerID := gobject.SignalConnect(x.GoPointer(), "icon-release", cbRefPtr)
1727	glib.SaveHandlerMapping(handlerID, cbPtr)
1728	return handlerID
1729}
1730
1731// Requests the user's screen reader to announce the given message.
1732//
1733// This kind of notification is useful for messages that
1734// either have only a visual representation or that are not
1735// exposed visually at all, e.g. a notification about a
1736// successful operation.
1737//
1738// Also, by using this API, you can ensure that the message
1739// does not interrupts the user's current screen reader output.
1740func (x *Entry) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
1741
1742	XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
1743
1744}
1745
1746// Retrieves the accessible parent for an accessible object.
1747//
1748// This function returns `NULL` for top level widgets.
1749func (x *Entry) GetAccessibleParent() *AccessibleBase {
1750	var cls *AccessibleBase
1751
1752	cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
1753
1754	if cret == 0 {
1755		return nil
1756	}
1757	cls = &AccessibleBase{}
1758	cls.Ptr = cret
1759	return cls
1760}
1761
1762// Retrieves the accessible role of an accessible object.
1763func (x *Entry) GetAccessibleRole() AccessibleRole {
1764
1765	cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
1766	return cret
1767}
1768
1769// Retrieves the implementation for the given accessible object.
1770func (x *Entry) GetAtContext() *ATContext {
1771	var cls *ATContext
1772
1773	cret := XGtkAccessibleGetAtContext(x.GoPointer())
1774
1775	if cret == 0 {
1776		return nil
1777	}
1778	cls = &ATContext{}
1779	cls.Ptr = cret
1780	return cls
1781}
1782
1783// Queries the coordinates and dimensions of this accessible
1784//
1785// This functionality can be overridden by `GtkAccessible`
1786// implementations, e.g. to get the bounds from an ignored
1787// child widget.
1788func (x *Entry) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
1789
1790	cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
1791	return cret
1792}
1793
1794// Retrieves the first accessible child of an accessible object.
1795func (x *Entry) GetFirstAccessibleChild() *AccessibleBase {
1796	var cls *AccessibleBase
1797
1798	cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
1799
1800	if cret == 0 {
1801		return nil
1802	}
1803	cls = &AccessibleBase{}
1804	cls.Ptr = cret
1805	return cls
1806}
1807
1808// Retrieves the next accessible sibling of an accessible object
1809func (x *Entry) GetNextAccessibleSibling() *AccessibleBase {
1810	var cls *AccessibleBase
1811
1812	cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
1813
1814	if cret == 0 {
1815		return nil
1816	}
1817	cls = &AccessibleBase{}
1818	cls.Ptr = cret
1819	return cls
1820}
1821
1822// Queries a platform state, such as focus.
1823//
1824// This functionality can be overridden by `GtkAccessible`
1825// implementations, e.g. to get platform state from an ignored
1826// child widget, as is the case for `GtkText` wrappers.
1827func (x *Entry) GetPlatformState(StateVar AccessiblePlatformState) bool {
1828
1829	cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
1830	return cret
1831}
1832
1833// Resets the accessible property to its default value.
1834func (x *Entry) ResetProperty(PropertyVar AccessibleProperty) {
1835
1836	XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
1837
1838}
1839
1840// Resets the accessible relation to its default value.
1841func (x *Entry) ResetRelation(RelationVar AccessibleRelation) {
1842
1843	XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
1844
1845}
1846
1847// Resets the accessible state to its default value.
1848func (x *Entry) ResetState(StateVar AccessibleState) {
1849
1850	XGtkAccessibleResetState(x.GoPointer(), StateVar)
1851
1852}
1853
1854// Sets the parent and sibling of an accessible object.
1855//
1856// This function is meant to be used by accessible implementations that are
1857// not part of the widget hierarchy, and but act as a logical bridge between
1858// widgets. For instance, if a widget creates an object that holds metadata
1859// for each child, and you want that object to implement the `GtkAccessible`
1860// interface, you will use this function to ensure that the parent of each
1861// child widget is the metadata object, and the parent of each metadata
1862// object is the container widget.
1863func (x *Entry) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
1864
1865	XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
1866
1867}
1868
1869// Updates the next accessible sibling.
1870//
1871// That might be useful when a new child of a custom accessible
1872// is created, and it needs to be linked to a previous child.
1873func (x *Entry) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
1874
1875	XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
1876
1877}
1878
1879// Informs ATs that the platform state has changed.
1880//
1881// This function should be used by `GtkAccessible` implementations that
1882// have a platform state but are not widgets. Widgets handle platform
1883// states automatically.
1884func (x *Entry) UpdatePlatformState(StateVar AccessiblePlatformState) {
1885
1886	XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
1887
1888}
1889
1890// Updates a list of accessible properties.
1891//
1892// See the [enum@Gtk.AccessibleProperty] documentation for the
1893// value types of accessible properties.
1894//
1895// This function should be called by `GtkWidget` types whenever
1896// an accessible property change must be communicated to assistive
1897// technologies.
1898//
1899// Example:
1900// ```c
1901// value = gtk_adjustment_get_value (adjustment);
1902// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
1903//
1904//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
1905//	-1);
1906//
1907// ```
1908func (x *Entry) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
1909
1910	XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
1911
1912}
1913
1914// Updates an array of accessible properties.
1915//
1916// This function should be called by `GtkWidget` types whenever an accessible
1917// property change must be communicated to assistive technologies.
1918//
1919// This function is meant to be used by language bindings.
1920func (x *Entry) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
1921
1922	XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
1923
1924}
1925
1926// Updates a list of accessible relations.
1927//
1928// This function should be called by `GtkWidget` types whenever an accessible
1929// relation change must be communicated to assistive technologies.
1930//
1931// If the [enum@Gtk.AccessibleRelation] requires a list of references,
1932// you should pass each reference individually, followed by `NULL`, e.g.
1933//
1934// ```c
1935// gtk_accessible_update_relation (accessible,
1936//
1937//	GTK_ACCESSIBLE_RELATION_CONTROLS,
1938//	  ref1, NULL,
1939//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
1940//	  ref1, ref2, ref3, NULL,
1941//	-1);
1942//
1943// ```
1944func (x *Entry) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
1945
1946	XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
1947
1948}
1949
1950// Updates an array of accessible relations.
1951//
1952// This function should be called by `GtkWidget` types whenever an accessible
1953// relation change must be communicated to assistive technologies.
1954//
1955// This function is meant to be used by language bindings.
1956func (x *Entry) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
1957
1958	XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
1959
1960}
1961
1962// Updates a list of accessible states.
1963//
1964// See the [enum@Gtk.AccessibleState] documentation for the
1965// value types of accessible states.
1966//
1967// This function should be called by `GtkWidget` types whenever
1968// an accessible state change must be communicated to assistive
1969// technologies.
1970//
1971// Example:
1972//
1973// ```c
1974// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
1975// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
1976//
1977//	GTK_ACCESSIBLE_STATE_CHECKED, value,
1978//	-1);
1979//
1980// ```
1981func (x *Entry) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
1982
1983	XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
1984
1985}
1986
1987// Updates an array of accessible states.
1988//
1989// This function should be called by `GtkWidget` types whenever an accessible
1990// state change must be communicated to assistive technologies.
1991//
1992// This function is meant to be used by language bindings.
1993func (x *Entry) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
1994
1995	XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
1996
1997}
1998
1999// Gets the ID of the @buildable object.
2000//
2001// `GtkBuilder` sets the name based on the ID attribute
2002// of the `<object>` tag used to construct the @buildable.
2003func (x *Entry) GetBuildableId() string {
2004
2005	cret := XGtkBuildableGetBuildableId(x.GoPointer())
2006	return cret
2007}
2008
2009// Emits the `GtkCellEditable::editing-done` signal.
2010func (x *Entry) EditingDone() {
2011
2012	XGtkCellEditableEditingDone(x.GoPointer())
2013
2014}
2015
2016// Emits the `GtkCellEditable::remove-widget` signal.
2017func (x *Entry) RemoveWidget() {
2018
2019	XGtkCellEditableRemoveWidget(x.GoPointer())
2020
2021}
2022
2023// Begins editing on a @cell_editable.
2024//
2025// The `GtkCellRenderer` for the cell creates and returns a `GtkCellEditable` from
2026// gtk_cell_renderer_start_editing(), configured for the `GtkCellRenderer` type.
2027//
2028// gtk_cell_editable_start_editing() can then set up @cell_editable suitably for
2029// editing a cell, e.g. making the Esc key emit `GtkCellEditable::editing-done`.
2030//
2031// Note that the @cell_editable is created on-demand for the current edit; its
2032// lifetime is temporary and does not persist across other edits and/or cells.
2033func (x *Entry) StartEditing(EventVar *gdk.Event) {
2034
2035	XGtkCellEditableStartEditing(x.GoPointer(), EventVar.GoPointer())
2036
2037}
2038
2039// Retrieves the accessible platform state from the editable delegate.
2040//
2041// This is an helper function to retrieve the accessible state for
2042// `GtkEditable` interface implementations using a delegate pattern.
2043//
2044// You should call this function in your editable widget implementation
2045// of the [vfunc@Gtk.Accessible.get_platform_state] virtual function, for
2046// instance:
2047//
2048// ```c
2049// static void
2050// accessible_interface_init (GtkAccessibleInterface *iface)
2051//
2052//	{
2053//	  iface->get_platform_state = your_editable_get_accessible_platform_state;
2054//	}
2055//
2056// static gboolean
2057// your_editable_get_accessible_platform_state (GtkAccessible *accessible,
2058//
2059//	GtkAccessiblePlatformState state)
2060//
2061//	{
2062//	  return gtk_editable_delegate_get_accessible_platform_state (GTK_EDITABLE (accessible), state);
2063//	}
2064//
2065// ```
2066//
2067// Note that the widget which is the delegate *must* be a direct child of
2068// this widget, otherwise your implementation of [vfunc@Gtk.Accessible.get_platform_state]
2069// might not even be called, as the platform change will originate from
2070// the parent of the delegate, and, as a result, will not work properly.
2071//
2072// So, if you can't ensure the direct child condition, you should give the
2073// delegate the %GTK_ACCESSIBLE_ROLE_TEXT_BOX role, or you can
2074// change your tree to allow this function to work.
2075func (x *Entry) DelegateGetAccessiblePlatformState(StateVar AccessiblePlatformState) bool {
2076
2077	cret := XGtkEditableDelegateGetAccessiblePlatformState(x.GoPointer(), StateVar)
2078	return cret
2079}
2080
2081// Deletes the currently selected text of the editable.
2082//
2083// This call doesn’t do anything if there is no selected text.
2084func (x *Entry) DeleteSelection() {
2085
2086	XGtkEditableDeleteSelection(x.GoPointer())
2087
2088}
2089
2090// Deletes a sequence of characters.
2091//
2092// The characters that are deleted are those characters at positions
2093// from @start_pos up to, but not including @end_pos. If @end_pos is
2094// negative, then the characters deleted are those from @start_pos to
2095// the end of the text.
2096//
2097// Note that the positions are specified in characters, not bytes.
2098func (x *Entry) DeleteText(StartPosVar int, EndPosVar int) {
2099
2100	XGtkEditableDeleteText(x.GoPointer(), StartPosVar, EndPosVar)
2101
2102}
2103
2104// Undoes the setup done by [method@Gtk.Editable.init_delegate].
2105//
2106// This is a helper function that should be called from dispose,
2107// before removing the delegate object.
2108func (x *Entry) FinishDelegate() {
2109
2110	XGtkEditableFinishDelegate(x.GoPointer())
2111
2112}
2113
2114// Retrieves a sequence of characters.
2115//
2116// The characters that are retrieved are those characters at positions
2117// from @start_pos up to, but not including @end_pos. If @end_pos is negative,
2118// then the characters retrieved are those characters from @start_pos to
2119// the end of the text.
2120//
2121// Note that positions are specified in characters, not bytes.
2122func (x *Entry) GetChars(StartPosVar int, EndPosVar int) string {
2123
2124	cret := XGtkEditableGetChars(x.GoPointer(), StartPosVar, EndPosVar)
2125	return cret
2126}
2127
2128// Gets the `GtkEditable` that @editable is delegating its
2129// implementation to.
2130//
2131// Typically, the delegate is a [class@Gtk.Text] widget.
2132func (x *Entry) GetDelegate() *EditableBase {
2133	var cls *EditableBase
2134
2135	cret := XGtkEditableGetDelegate(x.GoPointer())
2136
2137	if cret == 0 {
2138		return nil
2139	}
2140	gobject.IncreaseRef(cret)
2141	cls = &EditableBase{}
2142	cls.Ptr = cret
2143	return cls
2144}
2145
2146// Retrieves whether @editable is editable.
2147func (x *Entry) GetEditable() bool {
2148
2149	cret := XGtkEditableGetEditable(x.GoPointer())
2150	return cret
2151}
2152
2153// Gets if undo/redo actions are enabled for @editable
2154func (x *Entry) GetEnableUndo() bool {
2155
2156	cret := XGtkEditableGetEnableUndo(x.GoPointer())
2157	return cret
2158}
2159
2160// Retrieves the desired maximum width of @editable, in characters.
2161func (x *Entry) GetMaxWidthChars() int {
2162
2163	cret := XGtkEditableGetMaxWidthChars(x.GoPointer())
2164	return cret
2165}
2166
2167// Retrieves the current position of the cursor relative
2168// to the start of the content of the editable.
2169//
2170// Note that this position is in characters, not in bytes.
2171func (x *Entry) GetPosition() int {
2172
2173	cret := XGtkEditableGetPosition(x.GoPointer())
2174	return cret
2175}
2176
2177// Retrieves the selection bound of the editable.
2178//
2179// @start_pos will be filled with the start of the selection and
2180// @end_pos with end. If no text was selected both will be identical
2181// and %FALSE will be returned.
2182//
2183// Note that positions are specified in characters, not bytes.
2184func (x *Entry) GetSelectionBounds(StartPosVar *int, EndPosVar *int) bool {
2185
2186	cret := XGtkEditableGetSelectionBounds(x.GoPointer(), StartPosVar, EndPosVar)
2187	return cret
2188}
2189
2190// Retrieves the contents of @editable.
2191//
2192// The returned string is owned by GTK and must not be modified or freed.
2193func (x *Entry) GetText() string {
2194
2195	cret := XGtkEditableGetText(x.GoPointer())
2196	return cret
2197}
2198
2199// Gets the number of characters of space reserved
2200// for the contents of the editable.
2201func (x *Entry) GetWidthChars() int {
2202
2203	cret := XGtkEditableGetWidthChars(x.GoPointer())
2204	return cret
2205}
2206
2207// Sets up a delegate for `GtkEditable`.
2208//
2209// This is assuming that the get_delegate vfunc in the `GtkEditable`
2210// interface has been set up for the @editable's type.
2211//
2212// This is a helper function that should be called in instance init,
2213// after creating the delegate object.
2214func (x *Entry) InitDelegate() {
2215
2216	XGtkEditableInitDelegate(x.GoPointer())
2217
2218}
2219
2220// Inserts @length bytes of @text into the contents of the
2221// widget, at position @position.
2222//
2223// Note that the position is in characters, not in bytes.
2224// The function updates @position to point after the newly
2225// inserted text.
2226func (x *Entry) InsertText(TextVar string, LengthVar int, PositionVar int) {
2227
2228	XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar)
2229
2230}
2231
2232// Selects a region of text.
2233//
2234// The characters that are selected are those characters at positions
2235// from @start_pos up to, but not including @end_pos. If @end_pos is
2236// negative, then the characters selected are those characters from
2237// @start_pos to  the end of the text.
2238//
2239// Note that positions are specified in characters, not bytes.
2240func (x *Entry) SelectRegion(StartPosVar int, EndPosVar int) {
2241
2242	XGtkEditableSelectRegion(x.GoPointer(), StartPosVar, EndPosVar)
2243
2244}
2245
2246// Determines if the user can edit the text in the editable widget.
2247func (x *Entry) SetEditable(IsEditableVar bool) {
2248
2249	XGtkEditableSetEditable(x.GoPointer(), IsEditableVar)
2250
2251}
2252
2253// If enabled, changes to @editable will be saved for undo/redo
2254// actions.
2255//
2256// This results in an additional copy of text changes and are not
2257// stored in secure memory. As such, undo is forcefully disabled
2258// when [property@Gtk.Text:visibility] is set to %FALSE.
2259func (x *Entry) SetEnableUndo(EnableUndoVar bool) {
2260
2261	XGtkEditableSetEnableUndo(x.GoPointer(), EnableUndoVar)
2262
2263}
2264
2265// Sets the desired maximum width in characters of @editable.
2266func (x *Entry) SetMaxWidthChars(NCharsVar int) {
2267
2268	XGtkEditableSetMaxWidthChars(x.GoPointer(), NCharsVar)
2269
2270}
2271
2272// Sets the cursor position in the editable to the given value.
2273//
2274// The cursor is displayed before the character with the given (base 0)
2275// index in the contents of the editable. The value must be less than
2276// or equal to the number of characters in the editable. A value of -1
2277// indicates that the position should be set after the last character
2278// of the editable. Note that @position is in characters, not in bytes.
2279func (x *Entry) SetPosition(PositionVar int) {
2280
2281	XGtkEditableSetPosition(x.GoPointer(), PositionVar)
2282
2283}
2284
2285// Sets the text in the editable to the given value.
2286//
2287// This is replacing the current contents.
2288func (x *Entry) SetText(TextVar string) {
2289
2290	XGtkEditableSetText(x.GoPointer(), TextVar)
2291
2292}
2293
2294// Changes the size request of the editable to be about the
2295// right size for @n_chars characters.
2296//
2297// Note that it changes the size request, the size can still
2298// be affected by how you pack the widget into containers.
2299// If @n_chars is -1, the size reverts to the default size.
2300func (x *Entry) SetWidthChars(NCharsVar int) {
2301
2302	XGtkEditableSetWidthChars(x.GoPointer(), NCharsVar)
2303
2304}
2305
2306func init() {
2307	core.SetPackageName("GTK", "gtk4")
2308	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
2309	var libs []uintptr
2310	for _, libPath := range core.GetPaths("GTK") {
2311		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
2312		if err != nil {
2313			panic(err)
2314		}
2315		libs = append(libs, lib)
2316	}
2317
2318	core.PuregoSafeRegister(&xEntryIconPositionGLibType, libs, "gtk_entry_icon_position_get_type")
2319
2320	core.PuregoSafeRegister(&xEntryGLibType, libs, "gtk_entry_get_type")
2321
2322	core.PuregoSafeRegister(&xNewEntry, libs, "gtk_entry_new")
2323	core.PuregoSafeRegister(&xNewEntryWithBuffer, libs, "gtk_entry_new_with_buffer")
2324
2325	core.PuregoSafeRegister(&xEntryGetActivatesDefault, libs, "gtk_entry_get_activates_default")
2326	core.PuregoSafeRegister(&xEntryGetAlignment, libs, "gtk_entry_get_alignment")
2327	core.PuregoSafeRegister(&xEntryGetAttributes, libs, "gtk_entry_get_attributes")
2328	core.PuregoSafeRegister(&xEntryGetBuffer, libs, "gtk_entry_get_buffer")
2329	core.PuregoSafeRegister(&xEntryGetCompletion, libs, "gtk_entry_get_completion")
2330	core.PuregoSafeRegister(&xEntryGetCurrentIconDragSource, libs, "gtk_entry_get_current_icon_drag_source")
2331	core.PuregoSafeRegister(&xEntryGetExtraMenu, libs, "gtk_entry_get_extra_menu")
2332	core.PuregoSafeRegister(&xEntryGetHasFrame, libs, "gtk_entry_get_has_frame")
2333	core.PuregoSafeRegister(&xEntryGetIconActivatable, libs, "gtk_entry_get_icon_activatable")
2334	core.PuregoSafeRegister(&xEntryGetIconArea, libs, "gtk_entry_get_icon_area")
2335	core.PuregoSafeRegister(&xEntryGetIconAtPos, libs, "gtk_entry_get_icon_at_pos")
2336	core.PuregoSafeRegister(&xEntryGetIconGicon, libs, "gtk_entry_get_icon_gicon")
2337	core.PuregoSafeRegister(&xEntryGetIconName, libs, "gtk_entry_get_icon_name")
2338	core.PuregoSafeRegister(&xEntryGetIconPaintable, libs, "gtk_entry_get_icon_paintable")
2339	core.PuregoSafeRegister(&xEntryGetIconSensitive, libs, "gtk_entry_get_icon_sensitive")
2340	core.PuregoSafeRegister(&xEntryGetIconStorageType, libs, "gtk_entry_get_icon_storage_type")
2341	core.PuregoSafeRegister(&xEntryGetIconTooltipMarkup, libs, "gtk_entry_get_icon_tooltip_markup")
2342	core.PuregoSafeRegister(&xEntryGetIconTooltipText, libs, "gtk_entry_get_icon_tooltip_text")
2343	core.PuregoSafeRegister(&xEntryGetInputHints, libs, "gtk_entry_get_input_hints")
2344	core.PuregoSafeRegister(&xEntryGetInputPurpose, libs, "gtk_entry_get_input_purpose")
2345	core.PuregoSafeRegister(&xEntryGetInvisibleChar, libs, "gtk_entry_get_invisible_char")
2346	core.PuregoSafeRegister(&xEntryGetMaxLength, libs, "gtk_entry_get_max_length")
2347	core.PuregoSafeRegister(&xEntryGetMenuEntryIconText, libs, "gtk_entry_get_menu_entry_icon_text")
2348	core.PuregoSafeRegister(&xEntryGetOverwriteMode, libs, "gtk_entry_get_overwrite_mode")
2349	core.PuregoSafeRegister(&xEntryGetPlaceholderText, libs, "gtk_entry_get_placeholder_text")
2350	core.PuregoSafeRegister(&xEntryGetProgressFraction, libs, "gtk_entry_get_progress_fraction")
2351	core.PuregoSafeRegister(&xEntryGetProgressPulseStep, libs, "gtk_entry_get_progress_pulse_step")
2352	core.PuregoSafeRegister(&xEntryGetTabs, libs, "gtk_entry_get_tabs")
2353	core.PuregoSafeRegister(&xEntryGetTextLength, libs, "gtk_entry_get_text_length")
2354	core.PuregoSafeRegister(&xEntryGetVisibility, libs, "gtk_entry_get_visibility")
2355	core.PuregoSafeRegister(&xEntryGrabFocusWithoutSelecting, libs, "gtk_entry_grab_focus_without_selecting")
2356	core.PuregoSafeRegister(&xEntryProgressPulse, libs, "gtk_entry_progress_pulse")
2357	core.PuregoSafeRegister(&xEntryResetImContext, libs, "gtk_entry_reset_im_context")
2358	core.PuregoSafeRegister(&xEntrySetActivatesDefault, libs, "gtk_entry_set_activates_default")
2359	core.PuregoSafeRegister(&xEntrySetAlignment, libs, "gtk_entry_set_alignment")
2360	core.PuregoSafeRegister(&xEntrySetAttributes, libs, "gtk_entry_set_attributes")
2361	core.PuregoSafeRegister(&xEntrySetBuffer, libs, "gtk_entry_set_buffer")
2362	core.PuregoSafeRegister(&xEntrySetCompletion, libs, "gtk_entry_set_completion")
2363	core.PuregoSafeRegister(&xEntrySetExtraMenu, libs, "gtk_entry_set_extra_menu")
2364	core.PuregoSafeRegister(&xEntrySetHasFrame, libs, "gtk_entry_set_has_frame")
2365	core.PuregoSafeRegister(&xEntrySetIconActivatable, libs, "gtk_entry_set_icon_activatable")
2366	core.PuregoSafeRegister(&xEntrySetIconDragSource, libs, "gtk_entry_set_icon_drag_source")
2367	core.PuregoSafeRegister(&xEntrySetIconFromGicon, libs, "gtk_entry_set_icon_from_gicon")
2368	core.PuregoSafeRegister(&xEntrySetIconFromIconName, libs, "gtk_entry_set_icon_from_icon_name")
2369	core.PuregoSafeRegister(&xEntrySetIconFromPaintable, libs, "gtk_entry_set_icon_from_paintable")
2370	core.PuregoSafeRegister(&xEntrySetIconSensitive, libs, "gtk_entry_set_icon_sensitive")
2371	core.PuregoSafeRegister(&xEntrySetIconTooltipMarkup, libs, "gtk_entry_set_icon_tooltip_markup")
2372	core.PuregoSafeRegister(&xEntrySetIconTooltipText, libs, "gtk_entry_set_icon_tooltip_text")
2373	core.PuregoSafeRegister(&xEntrySetInputHints, libs, "gtk_entry_set_input_hints")
2374	core.PuregoSafeRegister(&xEntrySetInputPurpose, libs, "gtk_entry_set_input_purpose")
2375	core.PuregoSafeRegister(&xEntrySetInvisibleChar, libs, "gtk_entry_set_invisible_char")
2376	core.PuregoSafeRegister(&xEntrySetMaxLength, libs, "gtk_entry_set_max_length")
2377	core.PuregoSafeRegister(&xEntrySetMenuEntryIconText, libs, "gtk_entry_set_menu_entry_icon_text")
2378	core.PuregoSafeRegister(&xEntrySetOverwriteMode, libs, "gtk_entry_set_overwrite_mode")
2379	core.PuregoSafeRegister(&xEntrySetPlaceholderText, libs, "gtk_entry_set_placeholder_text")
2380	core.PuregoSafeRegister(&xEntrySetProgressFraction, libs, "gtk_entry_set_progress_fraction")
2381	core.PuregoSafeRegister(&xEntrySetProgressPulseStep, libs, "gtk_entry_set_progress_pulse_step")
2382	core.PuregoSafeRegister(&xEntrySetTabs, libs, "gtk_entry_set_tabs")
2383	core.PuregoSafeRegister(&xEntrySetVisibility, libs, "gtk_entry_set_visibility")
2384	core.PuregoSafeRegister(&xEntryUnsetInvisibleChar, libs, "gtk_entry_unset_invisible_char")
2385
2386}

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