gtk4/auto/
entry.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4#![allow(deprecated)]
5
6use crate::{
7    ffi, Accessible, AccessibleRole, Align, Buildable, CellEditable, ConstraintTarget, Editable,
8    EntryBuffer, EntryCompletion, EntryIconPosition, ImageType, InputHints, InputPurpose,
9    LayoutManager, Overflow, Widget,
10};
11use glib::{
12    object::ObjectType as _,
13    prelude::*,
14    signal::{connect_raw, SignalHandlerId},
15    translate::*,
16};
17use std::boxed::Box as Box_;
18
19glib::wrapper! {
20    /// [`Entry`][crate::Entry] is a single line text entry widget.
21    ///
22    /// ![An example GtkEntry](entry.png)
23    ///
24    /// A fairly large set of key bindings are supported by default. If the
25    /// entered text is longer than the allocation of the widget, the widget
26    /// will scroll so that the cursor position is visible.
27    ///
28    /// When using an entry for passwords and other sensitive information, it
29    /// can be put into “password mode” using [`EntryExt::set_visibility()`][crate::prelude::EntryExt::set_visibility()].
30    /// In this mode, entered text is displayed using a “invisible” character.
31    /// By default, GTK picks the best invisible character that is available
32    /// in the current font, but it can be changed with
33    /// [`EntryExt::set_invisible_char()`][crate::prelude::EntryExt::set_invisible_char()].
34    ///
35    /// [`Entry`][crate::Entry] has the ability to display progress or activity
36    /// information behind the text. To make an entry display such information,
37    /// use [`EntryExt::set_progress_fraction()`][crate::prelude::EntryExt::set_progress_fraction()] or
38    /// [`EntryExt::set_progress_pulse_step()`][crate::prelude::EntryExt::set_progress_pulse_step()].
39    ///
40    /// Additionally, [`Entry`][crate::Entry] can show icons at either side of the entry.
41    /// These icons can be activatable by clicking, can be set up as drag source
42    /// and can have tooltips. To add an icon, use
43    /// [`EntryExt::set_icon_from_gicon()`][crate::prelude::EntryExt::set_icon_from_gicon()] or one of the various other functions
44    /// that set an icon from an icon name or a paintable. To trigger an action when
45    /// the user clicks an icon, connect to the [`icon-press`][struct@crate::Entry#icon-press] signal.
46    /// To allow DND operations from an icon, use
47    /// [`EntryExt::set_icon_drag_source()`][crate::prelude::EntryExt::set_icon_drag_source()]. To set a tooltip on an icon, use
48    /// [`EntryExt::set_icon_tooltip_text()`][crate::prelude::EntryExt::set_icon_tooltip_text()] or the corresponding function
49    /// for markup.
50    ///
51    /// Note that functionality or information that is only available by clicking
52    /// on an icon in an entry may not be accessible at all to users which are not
53    /// able to use a mouse or other pointing device. It is therefore recommended
54    /// that any such functionality should also be available by other means, e.g.
55    /// via the context menu of the entry.
56    ///
57    /// # CSS nodes
58    ///
59    /// ```text
60    /// entry[.flat][.warning][.error]
61    /// ├── text[.readonly]
62    /// ├── image.left
63    /// ├── image.right
64    /// ╰── [progress[.pulse]]
65    /// ```
66    ///
67    /// [`Entry`][crate::Entry] has a main node with the name entry. Depending on the properties
68    /// of the entry, the style classes .read-only and .flat may appear. The style
69    /// classes .warning and .error may also be used with entries.
70    ///
71    /// When the entry shows icons, it adds subnodes with the name image and the
72    /// style class .left or .right, depending on where the icon appears.
73    ///
74    /// When the entry shows progress, it adds a subnode with the name progress.
75    /// The node has the style class .pulse when the shown progress is pulsing.
76    ///
77    /// For all the subnodes added to the text node in various situations,
78    /// see [`Text`][crate::Text].
79    ///
80    /// # GtkEntry as GtkBuildable
81    ///
82    /// The [`Entry`][crate::Entry] implementation of the [`Buildable`][crate::Buildable] interface supports a
83    /// custom `<attributes>` element, which supports any number of `<attribute>`
84    /// elements. The `<attribute>` element has attributes named “name“, “value“,
85    /// “start“ and “end“ and allows you to specify `PangoAttribute` values for
86    /// this label.
87    ///
88    /// An example of a UI definition fragment specifying Pango attributes:
89    /// ```xml
90    /// <object class="GtkEntry">
91    ///   <attributes>
92    ///     <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
93    ///     <attribute name="background" value="red" start="5" end="10"/>
94    ///   </attributes>
95    /// </object>
96    /// ```
97    ///
98    /// The start and end attributes specify the range of characters to which the
99    /// Pango attribute applies. If start and end are not specified, the attribute
100    /// is applied to the whole text. Note that specifying ranges does not make much
101    /// sense with translatable attributes. Use markup embedded in the translatable
102    /// content instead.
103    ///
104    /// # Accessibility
105    ///
106    /// [`Entry`][crate::Entry] uses the [`AccessibleRole::TextBox`][crate::AccessibleRole::TextBox] role.
107    ///
108    /// ## Properties
109    ///
110    ///
111    /// #### `activates-default`
112    ///  Whether to activate the default widget when Enter is pressed.
113    ///
114    /// Readable | Writeable
115    ///
116    ///
117    /// #### `attributes`
118    ///  A list of Pango attributes to apply to the text of the entry.
119    ///
120    /// This is mainly useful to change the size or weight of the text.
121    ///
122    /// The `PangoAttribute`'s @start_index and @end_index must refer to the
123    /// [`EntryBuffer`][crate::EntryBuffer] text, i.e. without the preedit string.
124    ///
125    /// Readable | Writeable
126    ///
127    ///
128    /// #### `buffer`
129    ///  The buffer object which actually stores the text.
130    ///
131    /// Readable | Writeable | Construct
132    ///
133    ///
134    /// #### `completion`
135    ///  The auxiliary completion object to use with the entry.
136    ///
137    /// Readable | Writeable
138    ///
139    ///
140    /// #### `enable-emoji-completion`
141    ///  Whether to suggest Emoji replacements for :-delimited names
142    /// like `:heart:`.
143    ///
144    /// Readable | Writeable
145    ///
146    ///
147    /// #### `extra-menu`
148    ///  A menu model whose contents will be appended to the context menu.
149    ///
150    /// Readable | Writeable
151    ///
152    ///
153    /// #### `has-frame`
154    ///  Whether the entry should draw a frame.
155    ///
156    /// Readable | Writeable
157    ///
158    ///
159    /// #### `im-module`
160    ///  Which IM (input method) module should be used for this entry.
161    ///
162    /// See [`IMContext`][crate::IMContext].
163    ///
164    /// Setting this to a non-[`None`] value overrides the system-wide IM
165    /// module setting. See the GtkSettings [`gtk-im-module`][struct@crate::Settings#gtk-im-module]
166    /// property.
167    ///
168    /// Readable | Writeable
169    ///
170    ///
171    /// #### `input-hints`
172    ///  Additional hints that allow input methods to fine-tune their behavior.
173    ///
174    /// Also see [`input-purpose`][struct@crate::Entry#input-purpose]
175    ///
176    /// Readable | Writeable
177    ///
178    ///
179    /// #### `input-purpose`
180    ///  The purpose of this text field.
181    ///
182    /// This property can be used by on-screen keyboards and other input
183    /// methods to adjust their behaviour.
184    ///
185    /// Note that setting the purpose to [`InputPurpose::Password`][crate::InputPurpose::Password] or
186    /// [`InputPurpose::Pin`][crate::InputPurpose::Pin] is independent from setting
187    /// [`visibility`][struct@crate::Entry#visibility].
188    ///
189    /// Readable | Writeable
190    ///
191    ///
192    /// #### `invisible-char`
193    ///  The character to use when masking entry contents (“password mode”).
194    ///
195    /// Readable | Writeable
196    ///
197    ///
198    /// #### `invisible-char-set`
199    ///  Whether the invisible char has been set for the [`Entry`][crate::Entry].
200    ///
201    /// Readable | Writeable
202    ///
203    ///
204    /// #### `max-length`
205    ///  Maximum number of characters for this entry.
206    ///
207    /// Readable | Writeable
208    ///
209    ///
210    /// #### `overwrite-mode`
211    ///  If text is overwritten when typing in the [`Entry`][crate::Entry].
212    ///
213    /// Readable | Writeable
214    ///
215    ///
216    /// #### `placeholder-text`
217    ///  The text that will be displayed in the [`Entry`][crate::Entry] when it is empty
218    /// and unfocused.
219    ///
220    /// Readable | Writeable
221    ///
222    ///
223    /// #### `primary-icon-activatable`
224    ///  Whether the primary icon is activatable.
225    ///
226    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
227    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
228    /// activatable icons.
229    ///
230    /// Sensitive, but non-activatable icons can be used for purely
231    /// informational purposes.
232    ///
233    /// Readable | Writeable
234    ///
235    ///
236    /// #### `primary-icon-gicon`
237    ///  The `GIcon` to use for the primary icon for the entry.
238    ///
239    /// Readable | Writeable
240    ///
241    ///
242    /// #### `primary-icon-name`
243    ///  The icon name to use for the primary icon for the entry.
244    ///
245    /// Readable | Writeable
246    ///
247    ///
248    /// #### `primary-icon-paintable`
249    ///  A [`gdk::Paintable`][crate::gdk::Paintable] to use as the primary icon for the entry.
250    ///
251    /// Readable | Writeable
252    ///
253    ///
254    /// #### `primary-icon-sensitive`
255    ///  Whether the primary icon is sensitive.
256    ///
257    /// An insensitive icon appears grayed out. GTK does not emit the
258    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
259    /// signals and does not allow DND from insensitive icons.
260    ///
261    /// An icon should be set insensitive if the action that would trigger
262    /// when clicked is currently not available.
263    ///
264    /// Readable | Writeable
265    ///
266    ///
267    /// #### `primary-icon-storage-type`
268    ///  The representation which is used for the primary icon of the entry.
269    ///
270    /// Readable
271    ///
272    ///
273    /// #### `primary-icon-tooltip-markup`
274    ///  The contents of the tooltip on the primary icon, with markup.
275    ///
276    /// Also see [`EntryExt::set_icon_tooltip_markup()`][crate::prelude::EntryExt::set_icon_tooltip_markup()].
277    ///
278    /// Readable | Writeable
279    ///
280    ///
281    /// #### `primary-icon-tooltip-text`
282    ///  The contents of the tooltip on the primary icon.
283    ///
284    /// Also see [`EntryExt::set_icon_tooltip_text()`][crate::prelude::EntryExt::set_icon_tooltip_text()].
285    ///
286    /// Readable | Writeable
287    ///
288    ///
289    /// #### `progress-fraction`
290    ///  The current fraction of the task that's been completed.
291    ///
292    /// Readable | Writeable
293    ///
294    ///
295    /// #### `progress-pulse-step`
296    ///  The fraction of total entry width to move the progress
297    /// bouncing block for each pulse.
298    ///
299    /// See [`EntryExt::progress_pulse()`][crate::prelude::EntryExt::progress_pulse()].
300    ///
301    /// Readable | Writeable
302    ///
303    ///
304    /// #### `scroll-offset`
305    ///  Number of pixels of the entry scrolled off the screen to the left.
306    ///
307    /// Readable
308    ///
309    ///
310    /// #### `secondary-icon-activatable`
311    ///  Whether the secondary icon is activatable.
312    ///
313    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
314    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
315    /// activatable icons.
316    ///
317    /// Sensitive, but non-activatable icons can be used for purely
318    /// informational purposes.
319    ///
320    /// Readable | Writeable
321    ///
322    ///
323    /// #### `secondary-icon-gicon`
324    ///  The `GIcon` to use for the secondary icon for the entry.
325    ///
326    /// Readable | Writeable
327    ///
328    ///
329    /// #### `secondary-icon-name`
330    ///  The icon name to use for the secondary icon for the entry.
331    ///
332    /// Readable | Writeable
333    ///
334    ///
335    /// #### `secondary-icon-paintable`
336    ///  A [`gdk::Paintable`][crate::gdk::Paintable] to use as the secondary icon for the entry.
337    ///
338    /// Readable | Writeable
339    ///
340    ///
341    /// #### `secondary-icon-sensitive`
342    ///  Whether the secondary icon is sensitive.
343    ///
344    /// An insensitive icon appears grayed out. GTK does not emit the
345    /// [`icon-press`][struct@crate::Entry#icon-press][ and [`icon-release`][struct@crate::Entry#icon-release]
346    /// signals and does not allow DND from insensitive icons.
347    ///
348    /// An icon should be set insensitive if the action that would trigger
349    /// when clicked is currently not available.
350    ///
351    /// Readable | Writeable
352    ///
353    ///
354    /// #### `secondary-icon-storage-type`
355    ///  The representation which is used for the secondary icon of the entry.
356    ///
357    /// Readable
358    ///
359    ///
360    /// #### `secondary-icon-tooltip-markup`
361    ///  The contents of the tooltip on the secondary icon, with markup.
362    ///
363    /// Also see [`EntryExt::set_icon_tooltip_markup()`][crate::prelude::EntryExt::set_icon_tooltip_markup()].
364    ///
365    /// Readable | Writeable
366    ///
367    ///
368    /// #### `secondary-icon-tooltip-text`
369    ///  The contents of the tooltip on the secondary icon.
370    ///
371    /// Also see [`EntryExt::set_icon_tooltip_text()`][crate::prelude::EntryExt::set_icon_tooltip_text()].
372    ///
373    /// Readable | Writeable
374    ///
375    ///
376    /// #### `show-emoji-icon`
377    ///  Whether the entry will show an Emoji icon in the secondary icon position
378    /// to open the Emoji chooser.
379    ///
380    /// Readable | Writeable
381    ///
382    ///
383    /// #### `tabs`
384    ///  A list of tabstops to apply to the text of the entry.
385    ///
386    /// Readable | Writeable
387    ///
388    ///
389    /// #### `text-length`
390    ///  The length of the text in the [`Entry`][crate::Entry].
391    ///
392    /// Readable
393    ///
394    ///
395    /// #### `truncate-multiline`
396    ///  When [`true`], pasted multi-line text is truncated to the first line.
397    ///
398    /// Readable | Writeable
399    ///
400    ///
401    /// #### `visibility`
402    ///  Whether the entry should show the “invisible char” instead of the
403    /// actual text (“password mode”).
404    ///
405    /// Readable | Writeable
406    /// <details><summary><h4>Widget</h4></summary>
407    ///
408    ///
409    /// #### `can-focus`
410    ///  Whether the widget or any of its descendents can accept
411    /// the input focus.
412    ///
413    /// This property is meant to be set by widget implementations,
414    /// typically in their instance init function.
415    ///
416    /// Readable | Writeable
417    ///
418    ///
419    /// #### `can-target`
420    ///  Whether the widget can receive pointer events.
421    ///
422    /// Readable | Writeable
423    ///
424    ///
425    /// #### `css-classes`
426    ///  A list of css classes applied to this widget.
427    ///
428    /// Readable | Writeable
429    ///
430    ///
431    /// #### `css-name`
432    ///  The name of this widget in the CSS tree.
433    ///
434    /// This property is meant to be set by widget implementations,
435    /// typically in their instance init function.
436    ///
437    /// Readable | Writeable | Construct Only
438    ///
439    ///
440    /// #### `cursor`
441    ///  The cursor used by @widget.
442    ///
443    /// Readable | Writeable
444    ///
445    ///
446    /// #### `focus-on-click`
447    ///  Whether the widget should grab focus when it is clicked with the mouse.
448    ///
449    /// This property is only relevant for widgets that can take focus.
450    ///
451    /// Readable | Writeable
452    ///
453    ///
454    /// #### `focusable`
455    ///  Whether this widget itself will accept the input focus.
456    ///
457    /// Readable | Writeable
458    ///
459    ///
460    /// #### `halign`
461    ///  How to distribute horizontal space if widget gets extra space.
462    ///
463    /// Readable | Writeable
464    ///
465    ///
466    /// #### `has-default`
467    ///  Whether the widget is the default widget.
468    ///
469    /// Readable
470    ///
471    ///
472    /// #### `has-focus`
473    ///  Whether the widget has the input focus.
474    ///
475    /// Readable
476    ///
477    ///
478    /// #### `has-tooltip`
479    ///  Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
480    /// signal on @widget.
481    ///
482    /// A true value indicates that @widget can have a tooltip, in this case
483    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
484    /// determine whether it will provide a tooltip or not.
485    ///
486    /// Readable | Writeable
487    ///
488    ///
489    /// #### `height-request`
490    ///  Overrides for height request of the widget.
491    ///
492    /// If this is -1, the natural request will be used.
493    ///
494    /// Readable | Writeable
495    ///
496    ///
497    /// #### `hexpand`
498    ///  Whether to expand horizontally.
499    ///
500    /// Readable | Writeable
501    ///
502    ///
503    /// #### `hexpand-set`
504    ///  Whether to use the `hexpand` property.
505    ///
506    /// Readable | Writeable
507    ///
508    ///
509    /// #### `layout-manager`
510    ///  The [`LayoutManager`][crate::LayoutManager] instance to use to compute
511    /// the preferred size of the widget, and allocate its children.
512    ///
513    /// This property is meant to be set by widget implementations,
514    /// typically in their instance init function.
515    ///
516    /// Readable | Writeable
517    ///
518    ///
519    /// #### `limit-events`
520    ///  Makes this widget act like a modal dialog, with respect to
521    /// event delivery.
522    ///
523    /// Global event controllers will not handle events with targets
524    /// inside the widget, unless they are set up to ignore propagation
525    /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
526    ///
527    /// Readable | Writeable
528    ///
529    ///
530    /// #### `margin-bottom`
531    ///  Margin on bottom side of widget.
532    ///
533    /// This property adds margin outside of the widget's normal size
534    /// request, the margin will be added in addition to the size from
535    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
536    ///
537    /// Readable | Writeable
538    ///
539    ///
540    /// #### `margin-end`
541    ///  Margin on end of widget, horizontally.
542    ///
543    /// This property supports left-to-right and right-to-left text
544    /// directions.
545    ///
546    /// This property adds margin outside of the widget's normal size
547    /// request, the margin will be added in addition to the size from
548    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
549    ///
550    /// Readable | Writeable
551    ///
552    ///
553    /// #### `margin-start`
554    ///  Margin on start of widget, horizontally.
555    ///
556    /// This property supports left-to-right and right-to-left text
557    /// directions.
558    ///
559    /// This property adds margin outside of the widget's normal size
560    /// request, the margin will be added in addition to the size from
561    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
562    ///
563    /// Readable | Writeable
564    ///
565    ///
566    /// #### `margin-top`
567    ///  Margin on top side of widget.
568    ///
569    /// This property adds margin outside of the widget's normal size
570    /// request, the margin will be added in addition to the size from
571    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
572    ///
573    /// Readable | Writeable
574    ///
575    ///
576    /// #### `name`
577    ///  The name of the widget.
578    ///
579    /// Readable | Writeable
580    ///
581    ///
582    /// #### `opacity`
583    ///  The requested opacity of the widget.
584    ///
585    /// Readable | Writeable
586    ///
587    ///
588    /// #### `overflow`
589    ///  How content outside the widget's content area is treated.
590    ///
591    /// This property is meant to be set by widget implementations,
592    /// typically in their instance init function.
593    ///
594    /// Readable | Writeable
595    ///
596    ///
597    /// #### `parent`
598    ///  The parent widget of this widget.
599    ///
600    /// Readable
601    ///
602    ///
603    /// #### `receives-default`
604    ///  Whether the widget will receive the default action when it is focused.
605    ///
606    /// Readable | Writeable
607    ///
608    ///
609    /// #### `root`
610    ///  The [`Root`][crate::Root] widget of the widget tree containing this widget.
611    ///
612    /// This will be `NULL` if the widget is not contained in a root widget.
613    ///
614    /// Readable
615    ///
616    ///
617    /// #### `scale-factor`
618    ///  The scale factor of the widget.
619    ///
620    /// Readable
621    ///
622    ///
623    /// #### `sensitive`
624    ///  Whether the widget responds to input.
625    ///
626    /// Readable | Writeable
627    ///
628    ///
629    /// #### `tooltip-markup`
630    ///  Sets the text of tooltip to be the given string, which is marked up
631    /// with Pango markup.
632    ///
633    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
634    ///
635    /// This is a convenience property which will take care of getting the
636    /// tooltip shown if the given string is not `NULL`:
637    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
638    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
639    /// the default signal handler.
640    ///
641    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
642    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
643    ///
644    /// Readable | Writeable
645    ///
646    ///
647    /// #### `tooltip-text`
648    ///  Sets the text of tooltip to be the given string.
649    ///
650    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
651    ///
652    /// This is a convenience property which will take care of getting the
653    /// tooltip shown if the given string is not `NULL`:
654    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
655    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
656    /// the default signal handler.
657    ///
658    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
659    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
660    ///
661    /// Readable | Writeable
662    ///
663    ///
664    /// #### `valign`
665    ///  How to distribute vertical space if widget gets extra space.
666    ///
667    /// Readable | Writeable
668    ///
669    ///
670    /// #### `vexpand`
671    ///  Whether to expand vertically.
672    ///
673    /// Readable | Writeable
674    ///
675    ///
676    /// #### `vexpand-set`
677    ///  Whether to use the `vexpand` property.
678    ///
679    /// Readable | Writeable
680    ///
681    ///
682    /// #### `visible`
683    ///  Whether the widget is visible.
684    ///
685    /// Readable | Writeable
686    ///
687    ///
688    /// #### `width-request`
689    ///  Overrides for width request of the widget.
690    ///
691    /// If this is -1, the natural request will be used.
692    ///
693    /// Readable | Writeable
694    /// </details>
695    /// <details><summary><h4>Accessible</h4></summary>
696    ///
697    ///
698    /// #### `accessible-role`
699    ///  The accessible role of the given [`Accessible`][crate::Accessible] implementation.
700    ///
701    /// The accessible role cannot be changed once set.
702    ///
703    /// Readable | Writeable
704    /// </details>
705    /// <details><summary><h4>CellEditable</h4></summary>
706    ///
707    ///
708    /// #### `editing-canceled`
709    ///  Indicates whether editing on the cell has been canceled.
710    ///
711    /// Readable | Writeable
712    /// </details>
713    /// <details><summary><h4>Editable</h4></summary>
714    ///
715    ///
716    /// #### `cursor-position`
717    ///  The current position of the insertion cursor in chars.
718    ///
719    /// Readable
720    ///
721    ///
722    /// #### `editable`
723    ///  Whether the entry contents can be edited.
724    ///
725    /// Readable | Writeable
726    ///
727    ///
728    /// #### `enable-undo`
729    ///  If undo/redo should be enabled for the editable.
730    ///
731    /// Readable | Writeable
732    ///
733    ///
734    /// #### `max-width-chars`
735    ///  The desired maximum width of the entry, in characters.
736    ///
737    /// Readable | Writeable
738    ///
739    ///
740    /// #### `selection-bound`
741    ///  The position of the opposite end of the selection from the cursor in chars.
742    ///
743    /// Readable
744    ///
745    ///
746    /// #### `text`
747    ///  The contents of the entry.
748    ///
749    /// Readable | Writeable
750    ///
751    ///
752    /// #### `width-chars`
753    ///  Number of characters to leave space for in the entry.
754    ///
755    /// Readable | Writeable
756    ///
757    ///
758    /// #### `xalign`
759    ///  The horizontal alignment, from 0 (left) to 1 (right).
760    ///
761    /// Reversed for RTL layouts.
762    ///
763    /// Readable | Writeable
764    /// </details>
765    ///
766    /// ## Signals
767    ///
768    ///
769    /// #### `activate`
770    ///  Emitted when the entry is activated.
771    ///
772    /// The keybindings for this signal are all forms of the Enter key.
773    ///
774    /// Action
775    ///
776    ///
777    /// #### `icon-press`
778    ///  Emitted when an activatable icon is clicked.
779    ///
780    ///
781    ///
782    ///
783    /// #### `icon-release`
784    ///  Emitted on the button release from a mouse click
785    /// over an activatable icon.
786    ///
787    ///
788    /// <details><summary><h4>Widget</h4></summary>
789    ///
790    ///
791    /// #### `destroy`
792    ///  Signals that all holders of a reference to the widget should release
793    /// the reference that they hold.
794    ///
795    /// May result in finalization of the widget if all references are released.
796    ///
797    /// This signal is not suitable for saving widget state.
798    ///
799    ///
800    ///
801    ///
802    /// #### `direction-changed`
803    ///  Emitted when the text direction of a widget changes.
804    ///
805    ///
806    ///
807    ///
808    /// #### `hide`
809    ///  Emitted when @widget is hidden.
810    ///
811    ///
812    ///
813    ///
814    /// #### `keynav-failed`
815    ///  Emitted if keyboard navigation fails.
816    ///
817    /// See [`WidgetExt::keynav_failed()`][crate::prelude::WidgetExt::keynav_failed()] for details.
818    ///
819    ///
820    ///
821    ///
822    /// #### `map`
823    ///  Emitted when @widget is going to be mapped.
824    ///
825    /// A widget is mapped when the widget is visible (which is controlled with
826    /// [`visible`][struct@crate::Widget#visible]) and all its parents up to the toplevel widget
827    /// are also visible.
828    ///
829    /// The `::map` signal can be used to determine whether a widget will be drawn,
830    /// for instance it can resume an animation that was stopped during the
831    /// emission of [`unmap`][struct@crate::Widget#unmap].
832    ///
833    ///
834    ///
835    ///
836    /// #### `mnemonic-activate`
837    ///  Emitted when a widget is activated via a mnemonic.
838    ///
839    /// The default handler for this signal activates @widget if @group_cycling
840    /// is false, or just makes @widget grab focus if @group_cycling is true.
841    ///
842    ///
843    ///
844    ///
845    /// #### `move-focus`
846    ///  Emitted when the focus is moved.
847    ///
848    /// The `::move-focus` signal is a [keybinding signal](class.SignalAction.html).
849    ///
850    /// The default bindings for this signal are <kbd>Tab</kbd> to move forward,
851    /// and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.
852    ///
853    /// Action
854    ///
855    ///
856    /// #### `query-tooltip`
857    ///  Emitted when the widget’s tooltip is about to be shown.
858    ///
859    /// This happens when the [`has-tooltip`][struct@crate::Widget#has-tooltip] property
860    /// is true and the hover timeout has expired with the cursor hovering
861    /// above @widget; or emitted when @widget got focus in keyboard mode.
862    ///
863    /// Using the given coordinates, the signal handler should determine
864    /// whether a tooltip should be shown for @widget. If this is the case
865    /// true should be returned, false otherwise. Note that if @keyboard_mode
866    /// is true, the values of @x and @y are undefined and should not be used.
867    ///
868    /// The signal handler is free to manipulate @tooltip with the therefore
869    /// destined function calls.
870    ///
871    ///
872    ///
873    ///
874    /// #### `realize`
875    ///  Emitted when @widget is associated with a [`gdk::Surface`][crate::gdk::Surface].
876    ///
877    /// This means that [`WidgetExt::realize()`][crate::prelude::WidgetExt::realize()] has been called
878    /// or the widget has been mapped (that is, it is going to be drawn).
879    ///
880    ///
881    ///
882    ///
883    /// #### `show`
884    ///  Emitted when @widget is shown.
885    ///
886    ///
887    ///
888    ///
889    /// #### `state-flags-changed`
890    ///  Emitted when the widget state changes.
891    ///
892    /// See [`WidgetExt::state_flags()`][crate::prelude::WidgetExt::state_flags()].
893    ///
894    ///
895    ///
896    ///
897    /// #### `unmap`
898    ///  Emitted when @widget is going to be unmapped.
899    ///
900    /// A widget is unmapped when either it or any of its parents up to the
901    /// toplevel widget have been set as hidden.
902    ///
903    /// As `::unmap` indicates that a widget will not be shown any longer,
904    /// it can be used to, for example, stop an animation on the widget.
905    ///
906    ///
907    ///
908    ///
909    /// #### `unrealize`
910    ///  Emitted when the [`gdk::Surface`][crate::gdk::Surface] associated with @widget is destroyed.
911    ///
912    /// This means that [`WidgetExt::unrealize()`][crate::prelude::WidgetExt::unrealize()] has been called
913    /// or the widget has been unmapped (that is, it is going to be hidden).
914    ///
915    ///
916    /// </details>
917    /// <details><summary><h4>CellEditable</h4></summary>
918    ///
919    ///
920    /// #### `editing-done`
921    ///  This signal is a sign for the cell renderer to update its
922    /// value from the @cell_editable.
923    ///
924    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
925    /// emitting this signal when they are done editing, e.g.
926    /// [`Entry`][crate::Entry] emits this signal when the user presses Enter. Typical things to
927    /// do in a handler for ::editing-done are to capture the edited value,
928    /// disconnect the @cell_editable from signals on the [`CellRenderer`][crate::CellRenderer], etc.
929    ///
930    /// gtk_cell_editable_editing_done() is a convenience method
931    /// for emitting `GtkCellEditable::editing-done`.
932    ///
933    ///
934    ///
935    ///
936    /// #### `remove-widget`
937    ///  This signal is meant to indicate that the cell is finished
938    /// editing, and the @cell_editable widget is being removed and may
939    /// subsequently be destroyed.
940    ///
941    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
942    /// emitting this signal when they are done editing. It must
943    /// be emitted after the `GtkCellEditable::editing-done` signal,
944    /// to give the cell renderer a chance to update the cell's value
945    /// before the widget is removed.
946    ///
947    /// gtk_cell_editable_remove_widget() is a convenience method
948    /// for emitting `GtkCellEditable::remove-widget`.
949    ///
950    ///
951    /// </details>
952    /// <details><summary><h4>Editable</h4></summary>
953    ///
954    ///
955    /// #### `changed`
956    ///  Emitted at the end of a single user-visible operation on the
957    /// contents.
958    ///
959    /// E.g., a paste operation that replaces the contents of the
960    /// selection will cause only one signal emission (even though it
961    /// is implemented by first deleting the selection, then inserting
962    /// the new content, and may cause multiple ::notify::text signals
963    /// to be emitted).
964    ///
965    ///
966    ///
967    ///
968    /// #### `delete-text`
969    ///  Emitted when text is deleted from the widget by the user.
970    ///
971    /// The default handler for this signal will normally be responsible for
972    /// deleting the text, so by connecting to this signal and then stopping
973    /// the signal with g_signal_stop_emission(), it is possible to modify the
974    /// range of deleted text, or prevent it from being deleted entirely.
975    ///
976    /// The @start_pos and @end_pos parameters are interpreted as for
977    /// [`EditableExt::delete_text()`][crate::prelude::EditableExt::delete_text()].
978    ///
979    ///
980    ///
981    ///
982    /// #### `insert-text`
983    ///  Emitted when text is inserted into the widget by the user.
984    ///
985    /// The default handler for this signal will normally be responsible
986    /// for inserting the text, so by connecting to this signal and then
987    /// stopping the signal with g_signal_stop_emission(), it is possible
988    /// to modify the inserted text, or prevent it from being inserted entirely.
989    ///
990    ///
991    /// </details>
992    ///
993    /// # Implements
994    ///
995    /// [`EntryExt`][trait@crate::prelude::EntryExt], [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`AccessibleExt`][trait@crate::prelude::AccessibleExt], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`ConstraintTargetExt`][trait@crate::prelude::ConstraintTargetExt], [`CellEditableExt`][trait@crate::prelude::CellEditableExt], [`EditableExt`][trait@crate::prelude::EditableExt], [`EntryExtManual`][trait@crate::prelude::EntryExtManual], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`AccessibleExtManual`][trait@crate::prelude::AccessibleExtManual], [`EditableExtManual`][trait@crate::prelude::EditableExtManual]
996    #[doc(alias = "GtkEntry")]
997    pub struct Entry(Object<ffi::GtkEntry, ffi::GtkEntryClass>) @extends Widget, @implements Accessible, Buildable, ConstraintTarget, CellEditable, Editable;
998
999    match fn {
1000        type_ => || ffi::gtk_entry_get_type(),
1001    }
1002}
1003
1004impl Entry {
1005    pub const NONE: Option<&'static Entry> = None;
1006
1007    /// Creates a new entry.
1008    ///
1009    /// # Returns
1010    ///
1011    /// a new [`Entry`][crate::Entry].
1012    #[doc(alias = "gtk_entry_new")]
1013    pub fn new() -> Entry {
1014        assert_initialized_main_thread!();
1015        unsafe { Widget::from_glib_none(ffi::gtk_entry_new()).unsafe_cast() }
1016    }
1017
1018    /// Creates a new entry with the specified text buffer.
1019    /// ## `buffer`
1020    /// The buffer to use for the new [`Entry`][crate::Entry].
1021    ///
1022    /// # Returns
1023    ///
1024    /// a new [`Entry`][crate::Entry]
1025    #[doc(alias = "gtk_entry_new_with_buffer")]
1026    #[doc(alias = "new_with_buffer")]
1027    pub fn with_buffer(buffer: &impl IsA<EntryBuffer>) -> Entry {
1028        skip_assert_initialized!();
1029        unsafe {
1030            Widget::from_glib_none(ffi::gtk_entry_new_with_buffer(
1031                buffer.as_ref().to_glib_none().0,
1032            ))
1033            .unsafe_cast()
1034        }
1035    }
1036
1037    // rustdoc-stripper-ignore-next
1038    /// Creates a new builder-pattern struct instance to construct [`Entry`] objects.
1039    ///
1040    /// This method returns an instance of [`EntryBuilder`](crate::builders::EntryBuilder) which can be used to create [`Entry`] objects.
1041    pub fn builder() -> EntryBuilder {
1042        EntryBuilder::new()
1043    }
1044}
1045
1046impl Default for Entry {
1047    fn default() -> Self {
1048        Self::new()
1049    }
1050}
1051
1052// rustdoc-stripper-ignore-next
1053/// A [builder-pattern] type to construct [`Entry`] objects.
1054///
1055/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
1056#[must_use = "The builder must be built to be used"]
1057pub struct EntryBuilder {
1058    builder: glib::object::ObjectBuilder<'static, Entry>,
1059}
1060
1061impl EntryBuilder {
1062    fn new() -> Self {
1063        Self {
1064            builder: glib::object::Object::builder(),
1065        }
1066    }
1067
1068    /// Whether to activate the default widget when Enter is pressed.
1069    pub fn activates_default(self, activates_default: bool) -> Self {
1070        Self {
1071            builder: self
1072                .builder
1073                .property("activates-default", activates_default),
1074        }
1075    }
1076
1077    /// A list of Pango attributes to apply to the text of the entry.
1078    ///
1079    /// This is mainly useful to change the size or weight of the text.
1080    ///
1081    /// The `PangoAttribute`'s @start_index and @end_index must refer to the
1082    /// [`EntryBuffer`][crate::EntryBuffer] text, i.e. without the preedit string.
1083    pub fn attributes(self, attributes: &pango::AttrList) -> Self {
1084        Self {
1085            builder: self.builder.property("attributes", attributes.clone()),
1086        }
1087    }
1088
1089    /// The buffer object which actually stores the text.
1090    pub fn buffer(self, buffer: &impl IsA<EntryBuffer>) -> Self {
1091        Self {
1092            builder: self.builder.property("buffer", buffer.clone().upcast()),
1093        }
1094    }
1095
1096    /// The auxiliary completion object to use with the entry.
1097    /// GtkEntryCompletion will be removed in GTK 5.
1098    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1099    pub fn completion(self, completion: &EntryCompletion) -> Self {
1100        Self {
1101            builder: self.builder.property("completion", completion.clone()),
1102        }
1103    }
1104
1105    /// Whether to suggest Emoji replacements for :-delimited names
1106    /// like `:heart:`.
1107    pub fn enable_emoji_completion(self, enable_emoji_completion: bool) -> Self {
1108        Self {
1109            builder: self
1110                .builder
1111                .property("enable-emoji-completion", enable_emoji_completion),
1112        }
1113    }
1114
1115    /// A menu model whose contents will be appended to the context menu.
1116    pub fn extra_menu(self, extra_menu: &impl IsA<gio::MenuModel>) -> Self {
1117        Self {
1118            builder: self
1119                .builder
1120                .property("extra-menu", extra_menu.clone().upcast()),
1121        }
1122    }
1123
1124    /// Whether the entry should draw a frame.
1125    pub fn has_frame(self, has_frame: bool) -> Self {
1126        Self {
1127            builder: self.builder.property("has-frame", has_frame),
1128        }
1129    }
1130
1131    /// Which IM (input method) module should be used for this entry.
1132    ///
1133    /// See [`IMContext`][crate::IMContext].
1134    ///
1135    /// Setting this to a non-[`None`] value overrides the system-wide IM
1136    /// module setting. See the GtkSettings [`gtk-im-module`][struct@crate::Settings#gtk-im-module]
1137    /// property.
1138    pub fn im_module(self, im_module: impl Into<glib::GString>) -> Self {
1139        Self {
1140            builder: self.builder.property("im-module", im_module.into()),
1141        }
1142    }
1143
1144    /// Additional hints that allow input methods to fine-tune their behavior.
1145    ///
1146    /// Also see [`input-purpose`][struct@crate::Entry#input-purpose]
1147    pub fn input_hints(self, input_hints: InputHints) -> Self {
1148        Self {
1149            builder: self.builder.property("input-hints", input_hints),
1150        }
1151    }
1152
1153    /// The purpose of this text field.
1154    ///
1155    /// This property can be used by on-screen keyboards and other input
1156    /// methods to adjust their behaviour.
1157    ///
1158    /// Note that setting the purpose to [`InputPurpose::Password`][crate::InputPurpose::Password] or
1159    /// [`InputPurpose::Pin`][crate::InputPurpose::Pin] is independent from setting
1160    /// [`visibility`][struct@crate::Entry#visibility].
1161    pub fn input_purpose(self, input_purpose: InputPurpose) -> Self {
1162        Self {
1163            builder: self.builder.property("input-purpose", input_purpose),
1164        }
1165    }
1166
1167    /// The character to use when masking entry contents (“password mode”).
1168    pub fn invisible_char(self, invisible_char: u32) -> Self {
1169        Self {
1170            builder: self.builder.property("invisible-char", invisible_char),
1171        }
1172    }
1173
1174    /// Whether the invisible char has been set for the [`Entry`][crate::Entry].
1175    pub fn invisible_char_set(self, invisible_char_set: bool) -> Self {
1176        Self {
1177            builder: self
1178                .builder
1179                .property("invisible-char-set", invisible_char_set),
1180        }
1181    }
1182
1183    /// Maximum number of characters for this entry.
1184    pub fn max_length(self, max_length: i32) -> Self {
1185        Self {
1186            builder: self.builder.property("max-length", max_length),
1187        }
1188    }
1189
1190    /// If text is overwritten when typing in the [`Entry`][crate::Entry].
1191    pub fn overwrite_mode(self, overwrite_mode: bool) -> Self {
1192        Self {
1193            builder: self.builder.property("overwrite-mode", overwrite_mode),
1194        }
1195    }
1196
1197    /// The text that will be displayed in the [`Entry`][crate::Entry] when it is empty
1198    /// and unfocused.
1199    pub fn placeholder_text(self, placeholder_text: impl Into<glib::GString>) -> Self {
1200        Self {
1201            builder: self
1202                .builder
1203                .property("placeholder-text", placeholder_text.into()),
1204        }
1205    }
1206
1207    /// Whether the primary icon is activatable.
1208    ///
1209    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
1210    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
1211    /// activatable icons.
1212    ///
1213    /// Sensitive, but non-activatable icons can be used for purely
1214    /// informational purposes.
1215    pub fn primary_icon_activatable(self, primary_icon_activatable: bool) -> Self {
1216        Self {
1217            builder: self
1218                .builder
1219                .property("primary-icon-activatable", primary_icon_activatable),
1220        }
1221    }
1222
1223    /// The `GIcon` to use for the primary icon for the entry.
1224    pub fn primary_icon_gicon(self, primary_icon_gicon: &impl IsA<gio::Icon>) -> Self {
1225        Self {
1226            builder: self
1227                .builder
1228                .property("primary-icon-gicon", primary_icon_gicon.clone().upcast()),
1229        }
1230    }
1231
1232    /// The icon name to use for the primary icon for the entry.
1233    pub fn primary_icon_name(self, primary_icon_name: impl Into<glib::GString>) -> Self {
1234        Self {
1235            builder: self
1236                .builder
1237                .property("primary-icon-name", primary_icon_name.into()),
1238        }
1239    }
1240
1241    /// A [`gdk::Paintable`][crate::gdk::Paintable] to use as the primary icon for the entry.
1242    pub fn primary_icon_paintable(self, primary_icon_paintable: &impl IsA<gdk::Paintable>) -> Self {
1243        Self {
1244            builder: self.builder.property(
1245                "primary-icon-paintable",
1246                primary_icon_paintable.clone().upcast(),
1247            ),
1248        }
1249    }
1250
1251    /// Whether the primary icon is sensitive.
1252    ///
1253    /// An insensitive icon appears grayed out. GTK does not emit the
1254    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
1255    /// signals and does not allow DND from insensitive icons.
1256    ///
1257    /// An icon should be set insensitive if the action that would trigger
1258    /// when clicked is currently not available.
1259    pub fn primary_icon_sensitive(self, primary_icon_sensitive: bool) -> Self {
1260        Self {
1261            builder: self
1262                .builder
1263                .property("primary-icon-sensitive", primary_icon_sensitive),
1264        }
1265    }
1266
1267    /// The contents of the tooltip on the primary icon, with markup.
1268    ///
1269    /// Also see [`EntryExt::set_icon_tooltip_markup()`][crate::prelude::EntryExt::set_icon_tooltip_markup()].
1270    pub fn primary_icon_tooltip_markup(
1271        self,
1272        primary_icon_tooltip_markup: impl Into<glib::GString>,
1273    ) -> Self {
1274        Self {
1275            builder: self.builder.property(
1276                "primary-icon-tooltip-markup",
1277                primary_icon_tooltip_markup.into(),
1278            ),
1279        }
1280    }
1281
1282    /// The contents of the tooltip on the primary icon.
1283    ///
1284    /// Also see [`EntryExt::set_icon_tooltip_text()`][crate::prelude::EntryExt::set_icon_tooltip_text()].
1285    pub fn primary_icon_tooltip_text(
1286        self,
1287        primary_icon_tooltip_text: impl Into<glib::GString>,
1288    ) -> Self {
1289        Self {
1290            builder: self.builder.property(
1291                "primary-icon-tooltip-text",
1292                primary_icon_tooltip_text.into(),
1293            ),
1294        }
1295    }
1296
1297    /// The current fraction of the task that's been completed.
1298    pub fn progress_fraction(self, progress_fraction: f64) -> Self {
1299        Self {
1300            builder: self
1301                .builder
1302                .property("progress-fraction", progress_fraction),
1303        }
1304    }
1305
1306    /// The fraction of total entry width to move the progress
1307    /// bouncing block for each pulse.
1308    ///
1309    /// See [`EntryExt::progress_pulse()`][crate::prelude::EntryExt::progress_pulse()].
1310    pub fn progress_pulse_step(self, progress_pulse_step: f64) -> Self {
1311        Self {
1312            builder: self
1313                .builder
1314                .property("progress-pulse-step", progress_pulse_step),
1315        }
1316    }
1317
1318    /// Whether the secondary icon is activatable.
1319    ///
1320    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
1321    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
1322    /// activatable icons.
1323    ///
1324    /// Sensitive, but non-activatable icons can be used for purely
1325    /// informational purposes.
1326    pub fn secondary_icon_activatable(self, secondary_icon_activatable: bool) -> Self {
1327        Self {
1328            builder: self
1329                .builder
1330                .property("secondary-icon-activatable", secondary_icon_activatable),
1331        }
1332    }
1333
1334    /// The `GIcon` to use for the secondary icon for the entry.
1335    pub fn secondary_icon_gicon(self, secondary_icon_gicon: &impl IsA<gio::Icon>) -> Self {
1336        Self {
1337            builder: self.builder.property(
1338                "secondary-icon-gicon",
1339                secondary_icon_gicon.clone().upcast(),
1340            ),
1341        }
1342    }
1343
1344    /// The icon name to use for the secondary icon for the entry.
1345    pub fn secondary_icon_name(self, secondary_icon_name: impl Into<glib::GString>) -> Self {
1346        Self {
1347            builder: self
1348                .builder
1349                .property("secondary-icon-name", secondary_icon_name.into()),
1350        }
1351    }
1352
1353    /// A [`gdk::Paintable`][crate::gdk::Paintable] to use as the secondary icon for the entry.
1354    pub fn secondary_icon_paintable(
1355        self,
1356        secondary_icon_paintable: &impl IsA<gdk::Paintable>,
1357    ) -> Self {
1358        Self {
1359            builder: self.builder.property(
1360                "secondary-icon-paintable",
1361                secondary_icon_paintable.clone().upcast(),
1362            ),
1363        }
1364    }
1365
1366    /// Whether the secondary icon is sensitive.
1367    ///
1368    /// An insensitive icon appears grayed out. GTK does not emit the
1369    /// [`icon-press`][struct@crate::Entry#icon-press][ and [`icon-release`][struct@crate::Entry#icon-release]
1370    /// signals and does not allow DND from insensitive icons.
1371    ///
1372    /// An icon should be set insensitive if the action that would trigger
1373    /// when clicked is currently not available.
1374    pub fn secondary_icon_sensitive(self, secondary_icon_sensitive: bool) -> Self {
1375        Self {
1376            builder: self
1377                .builder
1378                .property("secondary-icon-sensitive", secondary_icon_sensitive),
1379        }
1380    }
1381
1382    /// The contents of the tooltip on the secondary icon, with markup.
1383    ///
1384    /// Also see [`EntryExt::set_icon_tooltip_markup()`][crate::prelude::EntryExt::set_icon_tooltip_markup()].
1385    pub fn secondary_icon_tooltip_markup(
1386        self,
1387        secondary_icon_tooltip_markup: impl Into<glib::GString>,
1388    ) -> Self {
1389        Self {
1390            builder: self.builder.property(
1391                "secondary-icon-tooltip-markup",
1392                secondary_icon_tooltip_markup.into(),
1393            ),
1394        }
1395    }
1396
1397    /// The contents of the tooltip on the secondary icon.
1398    ///
1399    /// Also see [`EntryExt::set_icon_tooltip_text()`][crate::prelude::EntryExt::set_icon_tooltip_text()].
1400    pub fn secondary_icon_tooltip_text(
1401        self,
1402        secondary_icon_tooltip_text: impl Into<glib::GString>,
1403    ) -> Self {
1404        Self {
1405            builder: self.builder.property(
1406                "secondary-icon-tooltip-text",
1407                secondary_icon_tooltip_text.into(),
1408            ),
1409        }
1410    }
1411
1412    /// Whether the entry will show an Emoji icon in the secondary icon position
1413    /// to open the Emoji chooser.
1414    pub fn show_emoji_icon(self, show_emoji_icon: bool) -> Self {
1415        Self {
1416            builder: self.builder.property("show-emoji-icon", show_emoji_icon),
1417        }
1418    }
1419
1420    /// A list of tabstops to apply to the text of the entry.
1421    pub fn tabs(self, tabs: &pango::TabArray) -> Self {
1422        Self {
1423            builder: self.builder.property("tabs", tabs),
1424        }
1425    }
1426
1427    /// When [`true`], pasted multi-line text is truncated to the first line.
1428    pub fn truncate_multiline(self, truncate_multiline: bool) -> Self {
1429        Self {
1430            builder: self
1431                .builder
1432                .property("truncate-multiline", truncate_multiline),
1433        }
1434    }
1435
1436    /// Whether the entry should show the “invisible char” instead of the
1437    /// actual text (“password mode”).
1438    pub fn visibility(self, visibility: bool) -> Self {
1439        Self {
1440            builder: self.builder.property("visibility", visibility),
1441        }
1442    }
1443
1444    /// Whether the widget or any of its descendents can accept
1445    /// the input focus.
1446    ///
1447    /// This property is meant to be set by widget implementations,
1448    /// typically in their instance init function.
1449    pub fn can_focus(self, can_focus: bool) -> Self {
1450        Self {
1451            builder: self.builder.property("can-focus", can_focus),
1452        }
1453    }
1454
1455    /// Whether the widget can receive pointer events.
1456    pub fn can_target(self, can_target: bool) -> Self {
1457        Self {
1458            builder: self.builder.property("can-target", can_target),
1459        }
1460    }
1461
1462    /// A list of css classes applied to this widget.
1463    pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
1464        Self {
1465            builder: self.builder.property("css-classes", css_classes.into()),
1466        }
1467    }
1468
1469    /// The name of this widget in the CSS tree.
1470    ///
1471    /// This property is meant to be set by widget implementations,
1472    /// typically in their instance init function.
1473    pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
1474        Self {
1475            builder: self.builder.property("css-name", css_name.into()),
1476        }
1477    }
1478
1479    /// The cursor used by @widget.
1480    pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
1481        Self {
1482            builder: self.builder.property("cursor", cursor.clone()),
1483        }
1484    }
1485
1486    /// Whether the widget should grab focus when it is clicked with the mouse.
1487    ///
1488    /// This property is only relevant for widgets that can take focus.
1489    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
1490        Self {
1491            builder: self.builder.property("focus-on-click", focus_on_click),
1492        }
1493    }
1494
1495    /// Whether this widget itself will accept the input focus.
1496    pub fn focusable(self, focusable: bool) -> Self {
1497        Self {
1498            builder: self.builder.property("focusable", focusable),
1499        }
1500    }
1501
1502    /// How to distribute horizontal space if widget gets extra space.
1503    pub fn halign(self, halign: Align) -> Self {
1504        Self {
1505            builder: self.builder.property("halign", halign),
1506        }
1507    }
1508
1509    /// Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
1510    /// signal on @widget.
1511    ///
1512    /// A true value indicates that @widget can have a tooltip, in this case
1513    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
1514    /// determine whether it will provide a tooltip or not.
1515    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
1516        Self {
1517            builder: self.builder.property("has-tooltip", has_tooltip),
1518        }
1519    }
1520
1521    /// Overrides for height request of the widget.
1522    ///
1523    /// If this is -1, the natural request will be used.
1524    pub fn height_request(self, height_request: i32) -> Self {
1525        Self {
1526            builder: self.builder.property("height-request", height_request),
1527        }
1528    }
1529
1530    /// Whether to expand horizontally.
1531    pub fn hexpand(self, hexpand: bool) -> Self {
1532        Self {
1533            builder: self.builder.property("hexpand", hexpand),
1534        }
1535    }
1536
1537    /// Whether to use the `hexpand` property.
1538    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
1539        Self {
1540            builder: self.builder.property("hexpand-set", hexpand_set),
1541        }
1542    }
1543
1544    /// The [`LayoutManager`][crate::LayoutManager] instance to use to compute
1545    /// the preferred size of the widget, and allocate its children.
1546    ///
1547    /// This property is meant to be set by widget implementations,
1548    /// typically in their instance init function.
1549    pub fn layout_manager(self, layout_manager: &impl IsA<LayoutManager>) -> Self {
1550        Self {
1551            builder: self
1552                .builder
1553                .property("layout-manager", layout_manager.clone().upcast()),
1554        }
1555    }
1556
1557    /// Makes this widget act like a modal dialog, with respect to
1558    /// event delivery.
1559    ///
1560    /// Global event controllers will not handle events with targets
1561    /// inside the widget, unless they are set up to ignore propagation
1562    /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
1563    #[cfg(feature = "v4_18")]
1564    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
1565    pub fn limit_events(self, limit_events: bool) -> Self {
1566        Self {
1567            builder: self.builder.property("limit-events", limit_events),
1568        }
1569    }
1570
1571    /// Margin on bottom side of widget.
1572    ///
1573    /// This property adds margin outside of the widget's normal size
1574    /// request, the margin will be added in addition to the size from
1575    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1576    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
1577        Self {
1578            builder: self.builder.property("margin-bottom", margin_bottom),
1579        }
1580    }
1581
1582    /// Margin on end of widget, horizontally.
1583    ///
1584    /// This property supports left-to-right and right-to-left text
1585    /// directions.
1586    ///
1587    /// This property adds margin outside of the widget's normal size
1588    /// request, the margin will be added in addition to the size from
1589    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1590    pub fn margin_end(self, margin_end: i32) -> Self {
1591        Self {
1592            builder: self.builder.property("margin-end", margin_end),
1593        }
1594    }
1595
1596    /// Margin on start of widget, horizontally.
1597    ///
1598    /// This property supports left-to-right and right-to-left text
1599    /// directions.
1600    ///
1601    /// This property adds margin outside of the widget's normal size
1602    /// request, the margin will be added in addition to the size from
1603    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1604    pub fn margin_start(self, margin_start: i32) -> Self {
1605        Self {
1606            builder: self.builder.property("margin-start", margin_start),
1607        }
1608    }
1609
1610    /// Margin on top side of widget.
1611    ///
1612    /// This property adds margin outside of the widget's normal size
1613    /// request, the margin will be added in addition to the size from
1614    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
1615    pub fn margin_top(self, margin_top: i32) -> Self {
1616        Self {
1617            builder: self.builder.property("margin-top", margin_top),
1618        }
1619    }
1620
1621    /// The name of the widget.
1622    pub fn name(self, name: impl Into<glib::GString>) -> Self {
1623        Self {
1624            builder: self.builder.property("name", name.into()),
1625        }
1626    }
1627
1628    /// The requested opacity of the widget.
1629    pub fn opacity(self, opacity: f64) -> Self {
1630        Self {
1631            builder: self.builder.property("opacity", opacity),
1632        }
1633    }
1634
1635    /// How content outside the widget's content area is treated.
1636    ///
1637    /// This property is meant to be set by widget implementations,
1638    /// typically in their instance init function.
1639    pub fn overflow(self, overflow: Overflow) -> Self {
1640        Self {
1641            builder: self.builder.property("overflow", overflow),
1642        }
1643    }
1644
1645    /// Whether the widget will receive the default action when it is focused.
1646    pub fn receives_default(self, receives_default: bool) -> Self {
1647        Self {
1648            builder: self.builder.property("receives-default", receives_default),
1649        }
1650    }
1651
1652    /// Whether the widget responds to input.
1653    pub fn sensitive(self, sensitive: bool) -> Self {
1654        Self {
1655            builder: self.builder.property("sensitive", sensitive),
1656        }
1657    }
1658
1659    /// Sets the text of tooltip to be the given string, which is marked up
1660    /// with Pango markup.
1661    ///
1662    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
1663    ///
1664    /// This is a convenience property which will take care of getting the
1665    /// tooltip shown if the given string is not `NULL`:
1666    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
1667    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
1668    /// the default signal handler.
1669    ///
1670    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
1671    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
1672    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
1673        Self {
1674            builder: self
1675                .builder
1676                .property("tooltip-markup", tooltip_markup.into()),
1677        }
1678    }
1679
1680    /// Sets the text of tooltip to be the given string.
1681    ///
1682    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
1683    ///
1684    /// This is a convenience property which will take care of getting the
1685    /// tooltip shown if the given string is not `NULL`:
1686    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
1687    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
1688    /// the default signal handler.
1689    ///
1690    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
1691    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
1692    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
1693        Self {
1694            builder: self.builder.property("tooltip-text", tooltip_text.into()),
1695        }
1696    }
1697
1698    /// How to distribute vertical space if widget gets extra space.
1699    pub fn valign(self, valign: Align) -> Self {
1700        Self {
1701            builder: self.builder.property("valign", valign),
1702        }
1703    }
1704
1705    /// Whether to expand vertically.
1706    pub fn vexpand(self, vexpand: bool) -> Self {
1707        Self {
1708            builder: self.builder.property("vexpand", vexpand),
1709        }
1710    }
1711
1712    /// Whether to use the `vexpand` property.
1713    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
1714        Self {
1715            builder: self.builder.property("vexpand-set", vexpand_set),
1716        }
1717    }
1718
1719    /// Whether the widget is visible.
1720    pub fn visible(self, visible: bool) -> Self {
1721        Self {
1722            builder: self.builder.property("visible", visible),
1723        }
1724    }
1725
1726    /// Overrides for width request of the widget.
1727    ///
1728    /// If this is -1, the natural request will be used.
1729    pub fn width_request(self, width_request: i32) -> Self {
1730        Self {
1731            builder: self.builder.property("width-request", width_request),
1732        }
1733    }
1734
1735    /// The accessible role of the given [`Accessible`][crate::Accessible] implementation.
1736    ///
1737    /// The accessible role cannot be changed once set.
1738    pub fn accessible_role(self, accessible_role: AccessibleRole) -> Self {
1739        Self {
1740            builder: self.builder.property("accessible-role", accessible_role),
1741        }
1742    }
1743
1744    /// Indicates whether editing on the cell has been canceled.
1745    pub fn editing_canceled(self, editing_canceled: bool) -> Self {
1746        Self {
1747            builder: self.builder.property("editing-canceled", editing_canceled),
1748        }
1749    }
1750
1751    /// Whether the entry contents can be edited.
1752    pub fn editable(self, editable: bool) -> Self {
1753        Self {
1754            builder: self.builder.property("editable", editable),
1755        }
1756    }
1757
1758    /// If undo/redo should be enabled for the editable.
1759    pub fn enable_undo(self, enable_undo: bool) -> Self {
1760        Self {
1761            builder: self.builder.property("enable-undo", enable_undo),
1762        }
1763    }
1764
1765    /// The desired maximum width of the entry, in characters.
1766    pub fn max_width_chars(self, max_width_chars: i32) -> Self {
1767        Self {
1768            builder: self.builder.property("max-width-chars", max_width_chars),
1769        }
1770    }
1771
1772    /// The contents of the entry.
1773    pub fn text(self, text: impl Into<glib::GString>) -> Self {
1774        Self {
1775            builder: self.builder.property("text", text.into()),
1776        }
1777    }
1778
1779    /// Number of characters to leave space for in the entry.
1780    pub fn width_chars(self, width_chars: i32) -> Self {
1781        Self {
1782            builder: self.builder.property("width-chars", width_chars),
1783        }
1784    }
1785
1786    /// The horizontal alignment, from 0 (left) to 1 (right).
1787    ///
1788    /// Reversed for RTL layouts.
1789    pub fn xalign(self, xalign: f32) -> Self {
1790        Self {
1791            builder: self.builder.property("xalign", xalign),
1792        }
1793    }
1794
1795    // rustdoc-stripper-ignore-next
1796    /// Build the [`Entry`].
1797    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
1798    pub fn build(self) -> Entry {
1799        assert_initialized_main_thread!();
1800        self.builder.build()
1801    }
1802}
1803
1804/// Trait containing all [`struct@Entry`] methods.
1805///
1806/// # Implementors
1807///
1808/// [`Entry`][struct@crate::Entry]
1809pub trait EntryExt: IsA<Entry> + 'static {
1810    /// Retrieves the value set by gtk_entry_set_activates_default().
1811    ///
1812    /// # Returns
1813    ///
1814    /// [`true`] if the entry will activate the default widget
1815    #[doc(alias = "gtk_entry_get_activates_default")]
1816    #[doc(alias = "get_activates_default")]
1817    #[doc(alias = "activates-default")]
1818    fn activates_default(&self) -> bool {
1819        unsafe {
1820            from_glib(ffi::gtk_entry_get_activates_default(
1821                self.as_ref().to_glib_none().0,
1822            ))
1823        }
1824    }
1825
1826    /// Gets the value set by gtk_entry_set_alignment().
1827    ///
1828    /// See also: [`xalign`][struct@crate::Editable#xalign]
1829    ///
1830    /// # Returns
1831    ///
1832    /// the alignment
1833    #[doc(alias = "gtk_entry_get_alignment")]
1834    #[doc(alias = "get_alignment")]
1835    fn alignment(&self) -> f32 {
1836        unsafe { ffi::gtk_entry_get_alignment(self.as_ref().to_glib_none().0) }
1837    }
1838
1839    /// Gets the attribute list of the [`Entry`][crate::Entry].
1840    ///
1841    /// See [`set_attributes()`][Self::set_attributes()].
1842    ///
1843    /// # Returns
1844    ///
1845    /// the attribute list
1846    #[doc(alias = "gtk_entry_get_attributes")]
1847    #[doc(alias = "get_attributes")]
1848    fn attributes(&self) -> Option<pango::AttrList> {
1849        unsafe {
1850            from_glib_none(ffi::gtk_entry_get_attributes(
1851                self.as_ref().to_glib_none().0,
1852            ))
1853        }
1854    }
1855
1856    /// Get the [`EntryBuffer`][crate::EntryBuffer] object which holds the text for
1857    /// this widget.
1858    ///
1859    /// # Returns
1860    ///
1861    /// A [`EntryBuffer`][crate::EntryBuffer] object.
1862    #[doc(alias = "gtk_entry_get_buffer")]
1863    #[doc(alias = "get_buffer")]
1864    fn buffer(&self) -> EntryBuffer {
1865        unsafe { from_glib_none(ffi::gtk_entry_get_buffer(self.as_ref().to_glib_none().0)) }
1866    }
1867
1868    /// Returns the auxiliary completion object currently
1869    /// in use by @self.
1870    ///
1871    /// # Deprecated since 4.10
1872    ///
1873    /// GtkEntryCompletion will be removed in GTK 5.
1874    ///
1875    /// # Returns
1876    ///
1877    /// The auxiliary
1878    ///   completion object currently in use by @self
1879    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1880    #[allow(deprecated)]
1881    #[doc(alias = "gtk_entry_get_completion")]
1882    #[doc(alias = "get_completion")]
1883    fn completion(&self) -> Option<EntryCompletion> {
1884        unsafe {
1885            from_glib_none(ffi::gtk_entry_get_completion(
1886                self.as_ref().to_glib_none().0,
1887            ))
1888        }
1889    }
1890
1891    /// Returns the index of the icon which is the source of the
1892    /// current  DND operation, or -1.
1893    ///
1894    /// # Returns
1895    ///
1896    /// index of the icon which is the source of the
1897    ///   current DND operation, or -1.
1898    #[doc(alias = "gtk_entry_get_current_icon_drag_source")]
1899    #[doc(alias = "get_current_icon_drag_source")]
1900    fn current_icon_drag_source(&self) -> i32 {
1901        unsafe { ffi::gtk_entry_get_current_icon_drag_source(self.as_ref().to_glib_none().0) }
1902    }
1903
1904    /// Gets the menu model set with gtk_entry_set_extra_menu().
1905    ///
1906    /// # Returns
1907    ///
1908    /// the menu model
1909    #[doc(alias = "gtk_entry_get_extra_menu")]
1910    #[doc(alias = "get_extra_menu")]
1911    #[doc(alias = "extra-menu")]
1912    fn extra_menu(&self) -> Option<gio::MenuModel> {
1913        unsafe {
1914            from_glib_none(ffi::gtk_entry_get_extra_menu(
1915                self.as_ref().to_glib_none().0,
1916            ))
1917        }
1918    }
1919
1920    /// Gets the value set by gtk_entry_set_has_frame().
1921    ///
1922    /// # Returns
1923    ///
1924    /// whether the entry has a beveled frame
1925    #[doc(alias = "gtk_entry_get_has_frame")]
1926    #[doc(alias = "get_has_frame")]
1927    #[doc(alias = "has-frame")]
1928    fn has_frame(&self) -> bool {
1929        unsafe { from_glib(ffi::gtk_entry_get_has_frame(self.as_ref().to_glib_none().0)) }
1930    }
1931
1932    /// Returns whether the icon is activatable.
1933    /// ## `icon_pos`
1934    /// Icon position
1935    ///
1936    /// # Returns
1937    ///
1938    /// [`true`] if the icon is activatable.
1939    #[doc(alias = "gtk_entry_get_icon_activatable")]
1940    #[doc(alias = "get_icon_activatable")]
1941    fn icon_is_activatable(&self, icon_pos: EntryIconPosition) -> bool {
1942        unsafe {
1943            from_glib(ffi::gtk_entry_get_icon_activatable(
1944                self.as_ref().to_glib_none().0,
1945                icon_pos.into_glib(),
1946            ))
1947        }
1948    }
1949
1950    /// Gets the area where entry’s icon at @icon_pos is drawn.
1951    ///
1952    /// This function is useful when drawing something to the
1953    /// entry in a draw callback.
1954    ///
1955    /// If the entry is not realized or has no icon at the given
1956    /// position, @icon_area is filled with zeros. Otherwise,
1957    /// @icon_area will be filled with the icon's allocation,
1958    /// relative to @self's allocation.
1959    /// ## `icon_pos`
1960    /// Icon position
1961    ///
1962    /// # Returns
1963    ///
1964    ///
1965    /// ## `icon_area`
1966    /// Return location for the icon’s area
1967    #[doc(alias = "gtk_entry_get_icon_area")]
1968    #[doc(alias = "get_icon_area")]
1969    fn icon_area(&self, icon_pos: EntryIconPosition) -> gdk::Rectangle {
1970        unsafe {
1971            let mut icon_area = gdk::Rectangle::uninitialized();
1972            ffi::gtk_entry_get_icon_area(
1973                self.as_ref().to_glib_none().0,
1974                icon_pos.into_glib(),
1975                icon_area.to_glib_none_mut().0,
1976            );
1977            icon_area
1978        }
1979    }
1980
1981    /// Finds the icon at the given position and return its index.
1982    ///
1983    /// The position’s coordinates are relative to the @self’s
1984    /// top left corner. If @x, @y doesn’t lie inside an icon,
1985    /// -1 is returned. This function is intended for use in a
1986    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] signal handler.
1987    /// ## `x`
1988    /// the x coordinate of the position to find, relative to @self
1989    /// ## `y`
1990    /// the y coordinate of the position to find, relative to @self
1991    ///
1992    /// # Returns
1993    ///
1994    /// the index of the icon at the given position, or -1
1995    #[doc(alias = "gtk_entry_get_icon_at_pos")]
1996    #[doc(alias = "get_icon_at_pos")]
1997    fn icon_at_pos(&self, x: i32, y: i32) -> i32 {
1998        unsafe { ffi::gtk_entry_get_icon_at_pos(self.as_ref().to_glib_none().0, x, y) }
1999    }
2000
2001    /// Retrieves the `GIcon` used for the icon.
2002    ///
2003    /// [`None`] will be returned if there is no icon or if the icon was
2004    /// set by some other method (e.g., by [`gdk::Paintable`][crate::gdk::Paintable] or icon name).
2005    /// ## `icon_pos`
2006    /// Icon position
2007    ///
2008    /// # Returns
2009    ///
2010    /// A `GIcon`
2011    #[doc(alias = "gtk_entry_get_icon_gicon")]
2012    #[doc(alias = "get_icon_gicon")]
2013    fn icon_gicon(&self, icon_pos: EntryIconPosition) -> Option<gio::Icon> {
2014        unsafe {
2015            from_glib_none(ffi::gtk_entry_get_icon_gicon(
2016                self.as_ref().to_glib_none().0,
2017                icon_pos.into_glib(),
2018            ))
2019        }
2020    }
2021
2022    /// Retrieves the icon name used for the icon.
2023    ///
2024    /// [`None`] is returned if there is no icon or if the icon was set
2025    /// by some other method (e.g., by [`gdk::Paintable`][crate::gdk::Paintable] or gicon).
2026    /// ## `icon_pos`
2027    /// Icon position
2028    ///
2029    /// # Returns
2030    ///
2031    /// An icon name
2032    #[doc(alias = "gtk_entry_get_icon_name")]
2033    #[doc(alias = "get_icon_name")]
2034    fn icon_name(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
2035        unsafe {
2036            from_glib_none(ffi::gtk_entry_get_icon_name(
2037                self.as_ref().to_glib_none().0,
2038                icon_pos.into_glib(),
2039            ))
2040        }
2041    }
2042
2043    /// Retrieves the [`gdk::Paintable`][crate::gdk::Paintable] used for the icon.
2044    ///
2045    /// If no [`gdk::Paintable`][crate::gdk::Paintable] was used for the icon, [`None`] is returned.
2046    /// ## `icon_pos`
2047    /// Icon position
2048    ///
2049    /// # Returns
2050    ///
2051    /// A [`gdk::Paintable`][crate::gdk::Paintable]
2052    ///   if no icon is set for this position or the icon set is not
2053    ///   a [`gdk::Paintable`][crate::gdk::Paintable].
2054    #[doc(alias = "gtk_entry_get_icon_paintable")]
2055    #[doc(alias = "get_icon_paintable")]
2056    fn icon_paintable(&self, icon_pos: EntryIconPosition) -> Option<gdk::Paintable> {
2057        unsafe {
2058            from_glib_none(ffi::gtk_entry_get_icon_paintable(
2059                self.as_ref().to_glib_none().0,
2060                icon_pos.into_glib(),
2061            ))
2062        }
2063    }
2064
2065    /// Returns whether the icon appears sensitive or insensitive.
2066    /// ## `icon_pos`
2067    /// Icon position
2068    ///
2069    /// # Returns
2070    ///
2071    /// [`true`] if the icon is sensitive.
2072    #[doc(alias = "gtk_entry_get_icon_sensitive")]
2073    #[doc(alias = "get_icon_sensitive")]
2074    fn icon_is_sensitive(&self, icon_pos: EntryIconPosition) -> bool {
2075        unsafe {
2076            from_glib(ffi::gtk_entry_get_icon_sensitive(
2077                self.as_ref().to_glib_none().0,
2078                icon_pos.into_glib(),
2079            ))
2080        }
2081    }
2082
2083    /// Gets the type of representation being used by the icon
2084    /// to store image data.
2085    ///
2086    /// If the icon has no image data, the return value will
2087    /// be [`ImageType::Empty`][crate::ImageType::Empty].
2088    /// ## `icon_pos`
2089    /// Icon position
2090    ///
2091    /// # Returns
2092    ///
2093    /// image representation being used
2094    #[doc(alias = "gtk_entry_get_icon_storage_type")]
2095    #[doc(alias = "get_icon_storage_type")]
2096    fn icon_storage_type(&self, icon_pos: EntryIconPosition) -> ImageType {
2097        unsafe {
2098            from_glib(ffi::gtk_entry_get_icon_storage_type(
2099                self.as_ref().to_glib_none().0,
2100                icon_pos.into_glib(),
2101            ))
2102        }
2103    }
2104
2105    /// Gets the contents of the tooltip on the icon at the specified
2106    /// position in @self.
2107    /// ## `icon_pos`
2108    /// the icon position
2109    ///
2110    /// # Returns
2111    ///
2112    /// the tooltip text
2113    #[doc(alias = "gtk_entry_get_icon_tooltip_markup")]
2114    #[doc(alias = "get_icon_tooltip_markup")]
2115    fn icon_tooltip_markup(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
2116        unsafe {
2117            from_glib_full(ffi::gtk_entry_get_icon_tooltip_markup(
2118                self.as_ref().to_glib_none().0,
2119                icon_pos.into_glib(),
2120            ))
2121        }
2122    }
2123
2124    /// Gets the contents of the tooltip on the icon at the specified
2125    /// position in @self.
2126    /// ## `icon_pos`
2127    /// the icon position
2128    ///
2129    /// # Returns
2130    ///
2131    /// the tooltip text
2132    #[doc(alias = "gtk_entry_get_icon_tooltip_text")]
2133    #[doc(alias = "get_icon_tooltip_text")]
2134    fn icon_tooltip_text(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
2135        unsafe {
2136            from_glib_full(ffi::gtk_entry_get_icon_tooltip_text(
2137                self.as_ref().to_glib_none().0,
2138                icon_pos.into_glib(),
2139            ))
2140        }
2141    }
2142
2143    /// Gets the input hints of this [`Entry`][crate::Entry].
2144    ///
2145    /// # Returns
2146    ///
2147    /// the input hints
2148    #[doc(alias = "gtk_entry_get_input_hints")]
2149    #[doc(alias = "get_input_hints")]
2150    #[doc(alias = "input-hints")]
2151    fn input_hints(&self) -> InputHints {
2152        unsafe {
2153            from_glib(ffi::gtk_entry_get_input_hints(
2154                self.as_ref().to_glib_none().0,
2155            ))
2156        }
2157    }
2158
2159    /// Gets the input purpose of the [`Entry`][crate::Entry].
2160    ///
2161    /// # Returns
2162    ///
2163    /// the input purpose
2164    #[doc(alias = "gtk_entry_get_input_purpose")]
2165    #[doc(alias = "get_input_purpose")]
2166    #[doc(alias = "input-purpose")]
2167    fn input_purpose(&self) -> InputPurpose {
2168        unsafe {
2169            from_glib(ffi::gtk_entry_get_input_purpose(
2170                self.as_ref().to_glib_none().0,
2171            ))
2172        }
2173    }
2174
2175    /// Retrieves the maximum allowed length of the text in @self.
2176    ///
2177    /// See [`set_max_length()`][Self::set_max_length()].
2178    ///
2179    /// # Returns
2180    ///
2181    /// the maximum allowed number of characters
2182    ///   in [`Entry`][crate::Entry], or 0 if there is no maximum.
2183    #[doc(alias = "gtk_entry_get_max_length")]
2184    #[doc(alias = "get_max_length")]
2185    #[doc(alias = "max-length")]
2186    fn max_length(&self) -> i32 {
2187        unsafe { ffi::gtk_entry_get_max_length(self.as_ref().to_glib_none().0) }
2188    }
2189
2190    /// Gets whether the [`Entry`][crate::Entry] is in overwrite mode.
2191    ///
2192    /// # Returns
2193    ///
2194    /// whether the text is overwritten when typing.
2195    #[doc(alias = "gtk_entry_get_overwrite_mode")]
2196    #[doc(alias = "get_overwrite_mode")]
2197    #[doc(alias = "overwrite-mode")]
2198    fn is_overwrite_mode(&self) -> bool {
2199        unsafe {
2200            from_glib(ffi::gtk_entry_get_overwrite_mode(
2201                self.as_ref().to_glib_none().0,
2202            ))
2203        }
2204    }
2205
2206    /// Retrieves the text that will be displayed when @self
2207    /// is empty and unfocused
2208    ///
2209    /// # Returns
2210    ///
2211    /// a pointer to the
2212    ///   placeholder text as a string. This string points to
2213    ///   internally allocated storage in the widget and must
2214    ///   not be freed, modified or stored. If no placeholder
2215    ///   text has been set, [`None`] will be returned.
2216    #[doc(alias = "gtk_entry_get_placeholder_text")]
2217    #[doc(alias = "get_placeholder_text")]
2218    #[doc(alias = "placeholder-text")]
2219    fn placeholder_text(&self) -> Option<glib::GString> {
2220        unsafe {
2221            from_glib_none(ffi::gtk_entry_get_placeholder_text(
2222                self.as_ref().to_glib_none().0,
2223            ))
2224        }
2225    }
2226
2227    /// Returns the current fraction of the task that’s been completed.
2228    ///
2229    /// See [`set_progress_fraction()`][Self::set_progress_fraction()].
2230    ///
2231    /// # Returns
2232    ///
2233    /// a fraction from 0.0 to 1.0
2234    #[doc(alias = "gtk_entry_get_progress_fraction")]
2235    #[doc(alias = "get_progress_fraction")]
2236    #[doc(alias = "progress-fraction")]
2237    fn progress_fraction(&self) -> f64 {
2238        unsafe { ffi::gtk_entry_get_progress_fraction(self.as_ref().to_glib_none().0) }
2239    }
2240
2241    /// Retrieves the pulse step set with
2242    /// gtk_entry_set_progress_pulse_step().
2243    ///
2244    /// # Returns
2245    ///
2246    /// a fraction from 0.0 to 1.0
2247    #[doc(alias = "gtk_entry_get_progress_pulse_step")]
2248    #[doc(alias = "get_progress_pulse_step")]
2249    #[doc(alias = "progress-pulse-step")]
2250    fn progress_pulse_step(&self) -> f64 {
2251        unsafe { ffi::gtk_entry_get_progress_pulse_step(self.as_ref().to_glib_none().0) }
2252    }
2253
2254    /// Gets the tabstops of the [`Entry`][crate::Entry].
2255    ///
2256    /// See [`set_tabs()`][Self::set_tabs()].
2257    ///
2258    /// # Returns
2259    ///
2260    /// the tabstops
2261    #[doc(alias = "gtk_entry_get_tabs")]
2262    #[doc(alias = "get_tabs")]
2263    fn tabs(&self) -> Option<pango::TabArray> {
2264        unsafe { from_glib_none(ffi::gtk_entry_get_tabs(self.as_ref().to_glib_none().0)) }
2265    }
2266
2267    /// Retrieves the current length of the text in @self.
2268    ///
2269    /// This is equivalent to getting @self's [`EntryBuffer`][crate::EntryBuffer]
2270    /// and calling [`EntryBufferExtManual::length()`][crate::prelude::EntryBufferExtManual::length()] on it.
2271    ///
2272    /// # Returns
2273    ///
2274    /// the current number of characters
2275    ///   in [`Entry`][crate::Entry], or 0 if there are none.
2276    #[doc(alias = "gtk_entry_get_text_length")]
2277    #[doc(alias = "get_text_length")]
2278    #[doc(alias = "text-length")]
2279    fn text_length(&self) -> u16 {
2280        unsafe { ffi::gtk_entry_get_text_length(self.as_ref().to_glib_none().0) }
2281    }
2282
2283    /// Retrieves whether the text in @self is visible.
2284    ///
2285    /// See [`set_visibility()`][Self::set_visibility()].
2286    ///
2287    /// # Returns
2288    ///
2289    /// [`true`] if the text is currently visible
2290    #[doc(alias = "gtk_entry_get_visibility")]
2291    #[doc(alias = "get_visibility")]
2292    #[doc(alias = "visibility")]
2293    fn is_visible(&self) -> bool {
2294        unsafe {
2295            from_glib(ffi::gtk_entry_get_visibility(
2296                self.as_ref().to_glib_none().0,
2297            ))
2298        }
2299    }
2300
2301    /// Causes @self to have keyboard focus.
2302    ///
2303    /// It behaves like [`WidgetExt::grab_focus()`][crate::prelude::WidgetExt::grab_focus()], except that it doesn't
2304    /// select the contents of the entry. You only want to call this on some
2305    /// special entries which the user usually doesn't want to replace all text
2306    /// in, such as search-as-you-type entries.
2307    ///
2308    /// # Returns
2309    ///
2310    /// [`true`] if focus is now inside @self_
2311    #[doc(alias = "gtk_entry_grab_focus_without_selecting")]
2312    fn grab_focus_without_selecting(&self) -> bool {
2313        unsafe {
2314            from_glib(ffi::gtk_entry_grab_focus_without_selecting(
2315                self.as_ref().to_glib_none().0,
2316            ))
2317        }
2318    }
2319
2320    /// Indicates that some progress is made, but you don’t
2321    /// know how much.
2322    ///
2323    /// Causes the entry’s progress indicator to enter “activity
2324    /// mode”, where a block bounces back and forth. Each call to
2325    /// gtk_entry_progress_pulse() causes the block to move by a
2326    /// little bit (the amount of movement per pulse is determined
2327    /// by [`set_progress_pulse_step()`][Self::set_progress_pulse_step()]).
2328    #[doc(alias = "gtk_entry_progress_pulse")]
2329    fn progress_pulse(&self) {
2330        unsafe {
2331            ffi::gtk_entry_progress_pulse(self.as_ref().to_glib_none().0);
2332        }
2333    }
2334
2335    /// Reset the input method context of the entry if needed.
2336    ///
2337    /// This can be necessary in the case where modifying the buffer
2338    /// would confuse on-going input method behavior.
2339    #[doc(alias = "gtk_entry_reset_im_context")]
2340    fn reset_im_context(&self) {
2341        unsafe {
2342            ffi::gtk_entry_reset_im_context(self.as_ref().to_glib_none().0);
2343        }
2344    }
2345
2346    /// Sets whether pressing Enter in the @self will activate the default
2347    /// widget for the window containing the entry.
2348    ///
2349    /// This usually means that the dialog containing the entry will be closed,
2350    /// since the default widget is usually one of the dialog buttons.
2351    /// ## `setting`
2352    /// [`true`] to activate window’s default widget on Enter keypress
2353    #[doc(alias = "gtk_entry_set_activates_default")]
2354    #[doc(alias = "activates-default")]
2355    fn set_activates_default(&self, setting: bool) {
2356        unsafe {
2357            ffi::gtk_entry_set_activates_default(
2358                self.as_ref().to_glib_none().0,
2359                setting.into_glib(),
2360            );
2361        }
2362    }
2363
2364    /// Sets the alignment for the contents of the entry.
2365    ///
2366    /// This controls the horizontal positioning of the contents when
2367    /// the displayed text is shorter than the width of the entry.
2368    ///
2369    /// See also: [`xalign`][struct@crate::Editable#xalign]
2370    /// ## `xalign`
2371    /// The horizontal alignment, from 0 (left) to 1 (right).
2372    ///   Reversed for RTL layouts
2373    #[doc(alias = "gtk_entry_set_alignment")]
2374    fn set_alignment(&self, xalign: f32) {
2375        unsafe {
2376            ffi::gtk_entry_set_alignment(self.as_ref().to_glib_none().0, xalign);
2377        }
2378    }
2379
2380    /// Sets a [`pango::AttrList`][crate::pango::AttrList].
2381    ///
2382    /// The attributes in the list are applied to the entry text.
2383    ///
2384    /// Since the attributes will be applied to text that changes
2385    /// as the user types, it makes most sense to use attributes
2386    /// with unlimited extent.
2387    /// ## `attrs`
2388    /// a [`pango::AttrList`][crate::pango::AttrList]
2389    #[doc(alias = "gtk_entry_set_attributes")]
2390    #[doc(alias = "attributes")]
2391    fn set_attributes(&self, attrs: &pango::AttrList) {
2392        unsafe {
2393            ffi::gtk_entry_set_attributes(self.as_ref().to_glib_none().0, attrs.to_glib_none().0);
2394        }
2395    }
2396
2397    /// Set the [`EntryBuffer`][crate::EntryBuffer] object which holds the text for
2398    /// this widget.
2399    /// ## `buffer`
2400    /// a [`EntryBuffer`][crate::EntryBuffer]
2401    #[doc(alias = "gtk_entry_set_buffer")]
2402    #[doc(alias = "buffer")]
2403    fn set_buffer(&self, buffer: &impl IsA<EntryBuffer>) {
2404        unsafe {
2405            ffi::gtk_entry_set_buffer(
2406                self.as_ref().to_glib_none().0,
2407                buffer.as_ref().to_glib_none().0,
2408            );
2409        }
2410    }
2411
2412    /// Sets @completion to be the auxiliary completion object
2413    /// to use with @self.
2414    ///
2415    /// All further configuration of the completion mechanism is
2416    /// done on @completion using the [`EntryCompletion`][crate::EntryCompletion] API.
2417    /// Completion is disabled if @completion is set to [`None`].
2418    ///
2419    /// # Deprecated since 4.10
2420    ///
2421    /// GtkEntryCompletion will be removed in GTK 5.
2422    /// ## `completion`
2423    /// The [`EntryCompletion`][crate::EntryCompletion]
2424    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2425    #[allow(deprecated)]
2426    #[doc(alias = "gtk_entry_set_completion")]
2427    #[doc(alias = "completion")]
2428    fn set_completion(&self, completion: Option<&EntryCompletion>) {
2429        unsafe {
2430            ffi::gtk_entry_set_completion(
2431                self.as_ref().to_glib_none().0,
2432                completion.to_glib_none().0,
2433            );
2434        }
2435    }
2436
2437    /// Sets a menu model to add when constructing
2438    /// the context menu for @self.
2439    /// ## `model`
2440    /// a `GMenuModel`
2441    #[doc(alias = "gtk_entry_set_extra_menu")]
2442    #[doc(alias = "extra-menu")]
2443    fn set_extra_menu(&self, model: Option<&impl IsA<gio::MenuModel>>) {
2444        unsafe {
2445            ffi::gtk_entry_set_extra_menu(
2446                self.as_ref().to_glib_none().0,
2447                model.map(|p| p.as_ref()).to_glib_none().0,
2448            );
2449        }
2450    }
2451
2452    /// Sets whether the entry has a beveled frame around it.
2453    /// ## `setting`
2454    /// new value
2455    #[doc(alias = "gtk_entry_set_has_frame")]
2456    #[doc(alias = "has-frame")]
2457    fn set_has_frame(&self, setting: bool) {
2458        unsafe {
2459            ffi::gtk_entry_set_has_frame(self.as_ref().to_glib_none().0, setting.into_glib());
2460        }
2461    }
2462
2463    /// Sets whether the icon is activatable.
2464    /// ## `icon_pos`
2465    /// Icon position
2466    /// ## `activatable`
2467    /// [`true`] if the icon should be activatable
2468    #[doc(alias = "gtk_entry_set_icon_activatable")]
2469    fn set_icon_activatable(&self, icon_pos: EntryIconPosition, activatable: bool) {
2470        unsafe {
2471            ffi::gtk_entry_set_icon_activatable(
2472                self.as_ref().to_glib_none().0,
2473                icon_pos.into_glib(),
2474                activatable.into_glib(),
2475            );
2476        }
2477    }
2478
2479    /// Sets up the icon at the given position as drag source.
2480    ///
2481    /// This makes it so that GTK will start a drag
2482    /// operation when the user clicks and drags the icon.
2483    /// ## `icon_pos`
2484    /// icon position
2485    /// ## `provider`
2486    /// a [`gdk::ContentProvider`][crate::gdk::ContentProvider]
2487    /// ## `actions`
2488    /// a bitmask of the allowed drag actions
2489    #[doc(alias = "gtk_entry_set_icon_drag_source")]
2490    fn set_icon_drag_source(
2491        &self,
2492        icon_pos: EntryIconPosition,
2493        provider: &impl IsA<gdk::ContentProvider>,
2494        actions: gdk::DragAction,
2495    ) {
2496        unsafe {
2497            ffi::gtk_entry_set_icon_drag_source(
2498                self.as_ref().to_glib_none().0,
2499                icon_pos.into_glib(),
2500                provider.as_ref().to_glib_none().0,
2501                actions.into_glib(),
2502            );
2503        }
2504    }
2505
2506    /// Sets the icon shown in the entry at the specified position
2507    /// from the current icon theme.
2508    ///
2509    /// If the icon isn’t known, a “broken image” icon will be
2510    /// displayed instead.
2511    ///
2512    /// If @icon is [`None`], no icon will be shown in the
2513    /// specified position.
2514    /// ## `icon_pos`
2515    /// The position at which to set the icon
2516    /// ## `icon`
2517    /// The icon to set
2518    #[doc(alias = "gtk_entry_set_icon_from_gicon")]
2519    fn set_icon_from_gicon(&self, icon_pos: EntryIconPosition, icon: Option<&impl IsA<gio::Icon>>) {
2520        unsafe {
2521            ffi::gtk_entry_set_icon_from_gicon(
2522                self.as_ref().to_glib_none().0,
2523                icon_pos.into_glib(),
2524                icon.map(|p| p.as_ref()).to_glib_none().0,
2525            );
2526        }
2527    }
2528
2529    /// Sets the icon shown in the entry at the specified position
2530    /// from the current icon theme.
2531    ///
2532    /// If the icon name isn’t known, a “broken image” icon will be
2533    /// displayed instead.
2534    ///
2535    /// If @icon_name is [`None`], no icon will be shown in the
2536    /// specified position.
2537    /// ## `icon_pos`
2538    /// The position at which to set the icon
2539    /// ## `icon_name`
2540    /// An icon name
2541    #[doc(alias = "gtk_entry_set_icon_from_icon_name")]
2542    fn set_icon_from_icon_name(&self, icon_pos: EntryIconPosition, icon_name: Option<&str>) {
2543        unsafe {
2544            ffi::gtk_entry_set_icon_from_icon_name(
2545                self.as_ref().to_glib_none().0,
2546                icon_pos.into_glib(),
2547                icon_name.to_glib_none().0,
2548            );
2549        }
2550    }
2551
2552    /// Sets the icon shown in the specified position using a [`gdk::Paintable`][crate::gdk::Paintable].
2553    ///
2554    /// If @paintable is [`None`], no icon will be shown in the specified position.
2555    /// ## `icon_pos`
2556    /// Icon position
2557    /// ## `paintable`
2558    /// A [`gdk::Paintable`][crate::gdk::Paintable]
2559    #[doc(alias = "gtk_entry_set_icon_from_paintable")]
2560    fn set_icon_from_paintable(
2561        &self,
2562        icon_pos: EntryIconPosition,
2563        paintable: Option<&impl IsA<gdk::Paintable>>,
2564    ) {
2565        unsafe {
2566            ffi::gtk_entry_set_icon_from_paintable(
2567                self.as_ref().to_glib_none().0,
2568                icon_pos.into_glib(),
2569                paintable.map(|p| p.as_ref()).to_glib_none().0,
2570            );
2571        }
2572    }
2573
2574    /// Sets the sensitivity for the specified icon.
2575    /// ## `icon_pos`
2576    /// Icon position
2577    /// ## `sensitive`
2578    /// Specifies whether the icon should appear
2579    ///   sensitive or insensitive
2580    #[doc(alias = "gtk_entry_set_icon_sensitive")]
2581    fn set_icon_sensitive(&self, icon_pos: EntryIconPosition, sensitive: bool) {
2582        unsafe {
2583            ffi::gtk_entry_set_icon_sensitive(
2584                self.as_ref().to_glib_none().0,
2585                icon_pos.into_glib(),
2586                sensitive.into_glib(),
2587            );
2588        }
2589    }
2590
2591    /// Sets @tooltip as the contents of the tooltip for the icon at
2592    /// the specified position.
2593    ///
2594    /// @tooltip is assumed to be marked up with Pango Markup.
2595    ///
2596    /// Use [`None`] for @tooltip to remove an existing tooltip.
2597    ///
2598    /// See also [`WidgetExt::set_tooltip_markup()`][crate::prelude::WidgetExt::set_tooltip_markup()] and
2599    /// [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
2600    /// ## `icon_pos`
2601    /// the icon position
2602    /// ## `tooltip`
2603    /// the contents of the tooltip for the icon
2604    #[doc(alias = "gtk_entry_set_icon_tooltip_markup")]
2605    fn set_icon_tooltip_markup(&self, icon_pos: EntryIconPosition, tooltip: Option<&str>) {
2606        unsafe {
2607            ffi::gtk_entry_set_icon_tooltip_markup(
2608                self.as_ref().to_glib_none().0,
2609                icon_pos.into_glib(),
2610                tooltip.to_glib_none().0,
2611            );
2612        }
2613    }
2614
2615    /// Sets @tooltip as the contents of the tooltip for the icon
2616    /// at the specified position.
2617    ///
2618    /// Use [`None`] for @tooltip to remove an existing tooltip.
2619    ///
2620    /// See also [`WidgetExt::set_tooltip_text()`][crate::prelude::WidgetExt::set_tooltip_text()] and
2621    /// [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
2622    ///
2623    /// If you unset the widget tooltip via
2624    /// [`WidgetExt::set_tooltip_text()`][crate::prelude::WidgetExt::set_tooltip_text()] or
2625    /// [`WidgetExt::set_tooltip_markup()`][crate::prelude::WidgetExt::set_tooltip_markup()], this sets
2626    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] to [`false`], which suppresses
2627    /// icon tooltips too. You can resolve this by then calling
2628    /// [`WidgetExt::set_has_tooltip()`][crate::prelude::WidgetExt::set_has_tooltip()] to set
2629    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] back to [`true`], or
2630    /// setting at least one non-empty tooltip on any icon
2631    /// achieves the same result.
2632    /// ## `icon_pos`
2633    /// the icon position
2634    /// ## `tooltip`
2635    /// the contents of the tooltip for the icon
2636    #[doc(alias = "gtk_entry_set_icon_tooltip_text")]
2637    fn set_icon_tooltip_text(&self, icon_pos: EntryIconPosition, tooltip: Option<&str>) {
2638        unsafe {
2639            ffi::gtk_entry_set_icon_tooltip_text(
2640                self.as_ref().to_glib_none().0,
2641                icon_pos.into_glib(),
2642                tooltip.to_glib_none().0,
2643            );
2644        }
2645    }
2646
2647    /// Set additional hints which allow input methods to
2648    /// fine-tune their behavior.
2649    /// ## `hints`
2650    /// the hints
2651    #[doc(alias = "gtk_entry_set_input_hints")]
2652    #[doc(alias = "input-hints")]
2653    fn set_input_hints(&self, hints: InputHints) {
2654        unsafe {
2655            ffi::gtk_entry_set_input_hints(self.as_ref().to_glib_none().0, hints.into_glib());
2656        }
2657    }
2658
2659    /// Sets the input purpose which can be used by input methods
2660    /// to adjust their behavior.
2661    /// ## `purpose`
2662    /// the purpose
2663    #[doc(alias = "gtk_entry_set_input_purpose")]
2664    #[doc(alias = "input-purpose")]
2665    fn set_input_purpose(&self, purpose: InputPurpose) {
2666        unsafe {
2667            ffi::gtk_entry_set_input_purpose(self.as_ref().to_glib_none().0, purpose.into_glib());
2668        }
2669    }
2670
2671    /// Sets the character to use in place of the actual text
2672    /// in “password mode”.
2673    ///
2674    /// See [`set_visibility()`][Self::set_visibility()] for how to enable
2675    /// “password mode”.
2676    ///
2677    /// By default, GTK picks the best invisible char available in
2678    /// the current font. If you set the invisible char to 0, then
2679    /// the user will get no feedback at all; there will be no text
2680    /// on the screen as they type.
2681    /// ## `ch`
2682    /// a Unicode character
2683    #[doc(alias = "gtk_entry_set_invisible_char")]
2684    #[doc(alias = "invisible-char")]
2685    fn set_invisible_char(&self, ch: Option<char>) {
2686        unsafe {
2687            ffi::gtk_entry_set_invisible_char(self.as_ref().to_glib_none().0, ch.into_glib());
2688        }
2689    }
2690
2691    /// Sets the maximum allowed length of the contents of the widget.
2692    ///
2693    /// If the current contents are longer than the given length, then
2694    /// they will be truncated to fit. The length is in characters.
2695    ///
2696    /// This is equivalent to getting @self's [`EntryBuffer`][crate::EntryBuffer] and
2697    /// calling [`EntryBufferExtManual::set_max_length()`][crate::prelude::EntryBufferExtManual::set_max_length()] on it.
2698    /// ## `max`
2699    /// the maximum length of the entry, or 0 for no maximum.
2700    ///   (other than the maximum length of entries.) The value passed in will
2701    ///   be clamped to the range 0-65536.
2702    #[doc(alias = "gtk_entry_set_max_length")]
2703    #[doc(alias = "max-length")]
2704    fn set_max_length(&self, max: i32) {
2705        unsafe {
2706            ffi::gtk_entry_set_max_length(self.as_ref().to_glib_none().0, max);
2707        }
2708    }
2709
2710    /// Sets whether the text is overwritten when typing in the [`Entry`][crate::Entry].
2711    /// ## `overwrite`
2712    /// new value
2713    #[doc(alias = "gtk_entry_set_overwrite_mode")]
2714    #[doc(alias = "overwrite-mode")]
2715    fn set_overwrite_mode(&self, overwrite: bool) {
2716        unsafe {
2717            ffi::gtk_entry_set_overwrite_mode(
2718                self.as_ref().to_glib_none().0,
2719                overwrite.into_glib(),
2720            );
2721        }
2722    }
2723
2724    /// Sets text to be displayed in @self when it is empty.
2725    ///
2726    /// This can be used to give a visual hint of the expected
2727    /// contents of the [`Entry`][crate::Entry].
2728    /// ## `text`
2729    /// a string to be displayed when @self is empty and unfocused
2730    #[doc(alias = "gtk_entry_set_placeholder_text")]
2731    #[doc(alias = "placeholder-text")]
2732    fn set_placeholder_text(&self, text: Option<&str>) {
2733        unsafe {
2734            ffi::gtk_entry_set_placeholder_text(
2735                self.as_ref().to_glib_none().0,
2736                text.to_glib_none().0,
2737            );
2738        }
2739    }
2740
2741    /// Causes the entry’s progress indicator to “fill in” the given
2742    /// fraction of the bar.
2743    ///
2744    /// The fraction should be between 0.0 and 1.0, inclusive.
2745    /// ## `fraction`
2746    /// fraction of the task that’s been completed
2747    #[doc(alias = "gtk_entry_set_progress_fraction")]
2748    #[doc(alias = "progress-fraction")]
2749    fn set_progress_fraction(&self, fraction: f64) {
2750        unsafe {
2751            ffi::gtk_entry_set_progress_fraction(self.as_ref().to_glib_none().0, fraction);
2752        }
2753    }
2754
2755    /// Sets the fraction of total entry width to move the progress
2756    /// bouncing block for each pulse.
2757    ///
2758    /// Use [`progress_pulse()`][Self::progress_pulse()] to pulse
2759    /// the progress.
2760    /// ## `fraction`
2761    /// fraction between 0.0 and 1.0
2762    #[doc(alias = "gtk_entry_set_progress_pulse_step")]
2763    #[doc(alias = "progress-pulse-step")]
2764    fn set_progress_pulse_step(&self, fraction: f64) {
2765        unsafe {
2766            ffi::gtk_entry_set_progress_pulse_step(self.as_ref().to_glib_none().0, fraction);
2767        }
2768    }
2769
2770    /// Sets a [`pango::TabArray`][crate::pango::TabArray].
2771    ///
2772    /// The tabstops in the array are applied to the entry text.
2773    /// ## `tabs`
2774    /// a [`pango::TabArray`][crate::pango::TabArray]
2775    #[doc(alias = "gtk_entry_set_tabs")]
2776    #[doc(alias = "tabs")]
2777    fn set_tabs(&self, tabs: Option<&pango::TabArray>) {
2778        unsafe {
2779            ffi::gtk_entry_set_tabs(
2780                self.as_ref().to_glib_none().0,
2781                mut_override(tabs.to_glib_none().0),
2782            );
2783        }
2784    }
2785
2786    /// Sets whether the contents of the entry are visible or not.
2787    ///
2788    /// When visibility is set to [`false`], characters are displayed
2789    /// as the invisible char, and will also appear that way when
2790    /// the text in the entry widget is copied elsewhere.
2791    ///
2792    /// By default, GTK picks the best invisible character available
2793    /// in the current font, but it can be changed with
2794    /// [`set_invisible_char()`][Self::set_invisible_char()].
2795    ///
2796    /// Note that you probably want to set [`input-purpose`][struct@crate::Entry#input-purpose]
2797    /// to [`InputPurpose::Password`][crate::InputPurpose::Password] or [`InputPurpose::Pin`][crate::InputPurpose::Pin] to
2798    /// inform input methods about the purpose of this entry,
2799    /// in addition to setting visibility to [`false`].
2800    /// ## `visible`
2801    /// [`true`] if the contents of the entry are displayed as plaintext
2802    #[doc(alias = "gtk_entry_set_visibility")]
2803    #[doc(alias = "visibility")]
2804    fn set_visibility(&self, visible: bool) {
2805        unsafe {
2806            ffi::gtk_entry_set_visibility(self.as_ref().to_glib_none().0, visible.into_glib());
2807        }
2808    }
2809
2810    /// Unsets the invisible char, so that the default invisible char
2811    /// is used again. See [`set_invisible_char()`][Self::set_invisible_char()].
2812    #[doc(alias = "gtk_entry_unset_invisible_char")]
2813    fn unset_invisible_char(&self) {
2814        unsafe {
2815            ffi::gtk_entry_unset_invisible_char(self.as_ref().to_glib_none().0);
2816        }
2817    }
2818
2819    /// Whether to suggest Emoji replacements for :-delimited names
2820    /// like `:heart:`.
2821    #[doc(alias = "enable-emoji-completion")]
2822    fn enables_emoji_completion(&self) -> bool {
2823        ObjectExt::property(self.as_ref(), "enable-emoji-completion")
2824    }
2825
2826    /// Whether to suggest Emoji replacements for :-delimited names
2827    /// like `:heart:`.
2828    #[doc(alias = "enable-emoji-completion")]
2829    fn set_enable_emoji_completion(&self, enable_emoji_completion: bool) {
2830        ObjectExt::set_property(
2831            self.as_ref(),
2832            "enable-emoji-completion",
2833            enable_emoji_completion,
2834        )
2835    }
2836
2837    /// Which IM (input method) module should be used for this entry.
2838    ///
2839    /// See [`IMContext`][crate::IMContext].
2840    ///
2841    /// Setting this to a non-[`None`] value overrides the system-wide IM
2842    /// module setting. See the GtkSettings [`gtk-im-module`][struct@crate::Settings#gtk-im-module]
2843    /// property.
2844    #[doc(alias = "im-module")]
2845    fn im_module(&self) -> Option<glib::GString> {
2846        ObjectExt::property(self.as_ref(), "im-module")
2847    }
2848
2849    /// Which IM (input method) module should be used for this entry.
2850    ///
2851    /// See [`IMContext`][crate::IMContext].
2852    ///
2853    /// Setting this to a non-[`None`] value overrides the system-wide IM
2854    /// module setting. See the GtkSettings [`gtk-im-module`][struct@crate::Settings#gtk-im-module]
2855    /// property.
2856    #[doc(alias = "im-module")]
2857    fn set_im_module(&self, im_module: Option<&str>) {
2858        ObjectExt::set_property(self.as_ref(), "im-module", im_module)
2859    }
2860
2861    /// Whether the invisible char has been set for the [`Entry`][crate::Entry].
2862    #[doc(alias = "invisible-char-set")]
2863    fn is_invisible_char_set(&self) -> bool {
2864        ObjectExt::property(self.as_ref(), "invisible-char-set")
2865    }
2866
2867    /// Whether the primary icon is activatable.
2868    ///
2869    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
2870    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
2871    /// activatable icons.
2872    ///
2873    /// Sensitive, but non-activatable icons can be used for purely
2874    /// informational purposes.
2875    #[doc(alias = "primary-icon-activatable")]
2876    fn is_primary_icon_activatable(&self) -> bool {
2877        ObjectExt::property(self.as_ref(), "primary-icon-activatable")
2878    }
2879
2880    /// Whether the primary icon is activatable.
2881    ///
2882    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
2883    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
2884    /// activatable icons.
2885    ///
2886    /// Sensitive, but non-activatable icons can be used for purely
2887    /// informational purposes.
2888    #[doc(alias = "primary-icon-activatable")]
2889    fn set_primary_icon_activatable(&self, primary_icon_activatable: bool) {
2890        ObjectExt::set_property(
2891            self.as_ref(),
2892            "primary-icon-activatable",
2893            primary_icon_activatable,
2894        )
2895    }
2896
2897    /// The `GIcon` to use for the primary icon for the entry.
2898    #[doc(alias = "primary-icon-gicon")]
2899    fn primary_icon_gicon(&self) -> Option<gio::Icon> {
2900        ObjectExt::property(self.as_ref(), "primary-icon-gicon")
2901    }
2902
2903    /// The `GIcon` to use for the primary icon for the entry.
2904    #[doc(alias = "primary-icon-gicon")]
2905    fn set_primary_icon_gicon<P: IsA<gio::Icon>>(&self, primary_icon_gicon: Option<&P>) {
2906        ObjectExt::set_property(self.as_ref(), "primary-icon-gicon", primary_icon_gicon)
2907    }
2908
2909    /// The icon name to use for the primary icon for the entry.
2910    #[doc(alias = "primary-icon-name")]
2911    fn primary_icon_name(&self) -> Option<glib::GString> {
2912        ObjectExt::property(self.as_ref(), "primary-icon-name")
2913    }
2914
2915    /// The icon name to use for the primary icon for the entry.
2916    #[doc(alias = "primary-icon-name")]
2917    fn set_primary_icon_name(&self, primary_icon_name: Option<&str>) {
2918        ObjectExt::set_property(self.as_ref(), "primary-icon-name", primary_icon_name)
2919    }
2920
2921    /// A [`gdk::Paintable`][crate::gdk::Paintable] to use as the primary icon for the entry.
2922    #[doc(alias = "primary-icon-paintable")]
2923    fn primary_icon_paintable(&self) -> Option<gdk::Paintable> {
2924        ObjectExt::property(self.as_ref(), "primary-icon-paintable")
2925    }
2926
2927    /// A [`gdk::Paintable`][crate::gdk::Paintable] to use as the primary icon for the entry.
2928    #[doc(alias = "primary-icon-paintable")]
2929    fn set_primary_icon_paintable<P: IsA<gdk::Paintable>>(
2930        &self,
2931        primary_icon_paintable: Option<&P>,
2932    ) {
2933        ObjectExt::set_property(
2934            self.as_ref(),
2935            "primary-icon-paintable",
2936            primary_icon_paintable,
2937        )
2938    }
2939
2940    /// Whether the primary icon is sensitive.
2941    ///
2942    /// An insensitive icon appears grayed out. GTK does not emit the
2943    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
2944    /// signals and does not allow DND from insensitive icons.
2945    ///
2946    /// An icon should be set insensitive if the action that would trigger
2947    /// when clicked is currently not available.
2948    #[doc(alias = "primary-icon-sensitive")]
2949    fn is_primary_icon_sensitive(&self) -> bool {
2950        ObjectExt::property(self.as_ref(), "primary-icon-sensitive")
2951    }
2952
2953    /// Whether the primary icon is sensitive.
2954    ///
2955    /// An insensitive icon appears grayed out. GTK does not emit the
2956    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
2957    /// signals and does not allow DND from insensitive icons.
2958    ///
2959    /// An icon should be set insensitive if the action that would trigger
2960    /// when clicked is currently not available.
2961    #[doc(alias = "primary-icon-sensitive")]
2962    fn set_primary_icon_sensitive(&self, primary_icon_sensitive: bool) {
2963        ObjectExt::set_property(
2964            self.as_ref(),
2965            "primary-icon-sensitive",
2966            primary_icon_sensitive,
2967        )
2968    }
2969
2970    /// The representation which is used for the primary icon of the entry.
2971    #[doc(alias = "primary-icon-storage-type")]
2972    fn primary_icon_storage_type(&self) -> ImageType {
2973        ObjectExt::property(self.as_ref(), "primary-icon-storage-type")
2974    }
2975
2976    /// The contents of the tooltip on the primary icon, with markup.
2977    ///
2978    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
2979    #[doc(alias = "primary-icon-tooltip-markup")]
2980    fn primary_icon_tooltip_markup(&self) -> Option<glib::GString> {
2981        ObjectExt::property(self.as_ref(), "primary-icon-tooltip-markup")
2982    }
2983
2984    /// The contents of the tooltip on the primary icon, with markup.
2985    ///
2986    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
2987    #[doc(alias = "primary-icon-tooltip-markup")]
2988    fn set_primary_icon_tooltip_markup(&self, primary_icon_tooltip_markup: Option<&str>) {
2989        ObjectExt::set_property(
2990            self.as_ref(),
2991            "primary-icon-tooltip-markup",
2992            primary_icon_tooltip_markup,
2993        )
2994    }
2995
2996    /// The contents of the tooltip on the primary icon.
2997    ///
2998    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
2999    #[doc(alias = "primary-icon-tooltip-text")]
3000    fn primary_icon_tooltip_text(&self) -> Option<glib::GString> {
3001        ObjectExt::property(self.as_ref(), "primary-icon-tooltip-text")
3002    }
3003
3004    /// The contents of the tooltip on the primary icon.
3005    ///
3006    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
3007    #[doc(alias = "primary-icon-tooltip-text")]
3008    fn set_primary_icon_tooltip_text(&self, primary_icon_tooltip_text: Option<&str>) {
3009        ObjectExt::set_property(
3010            self.as_ref(),
3011            "primary-icon-tooltip-text",
3012            primary_icon_tooltip_text,
3013        )
3014    }
3015
3016    /// Number of pixels of the entry scrolled off the screen to the left.
3017    #[doc(alias = "scroll-offset")]
3018    fn scroll_offset(&self) -> i32 {
3019        ObjectExt::property(self.as_ref(), "scroll-offset")
3020    }
3021
3022    /// Whether the secondary icon is activatable.
3023    ///
3024    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
3025    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
3026    /// activatable icons.
3027    ///
3028    /// Sensitive, but non-activatable icons can be used for purely
3029    /// informational purposes.
3030    #[doc(alias = "secondary-icon-activatable")]
3031    fn is_secondary_icon_activatable(&self) -> bool {
3032        ObjectExt::property(self.as_ref(), "secondary-icon-activatable")
3033    }
3034
3035    /// Whether the secondary icon is activatable.
3036    ///
3037    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
3038    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
3039    /// activatable icons.
3040    ///
3041    /// Sensitive, but non-activatable icons can be used for purely
3042    /// informational purposes.
3043    #[doc(alias = "secondary-icon-activatable")]
3044    fn set_secondary_icon_activatable(&self, secondary_icon_activatable: bool) {
3045        ObjectExt::set_property(
3046            self.as_ref(),
3047            "secondary-icon-activatable",
3048            secondary_icon_activatable,
3049        )
3050    }
3051
3052    /// The `GIcon` to use for the secondary icon for the entry.
3053    #[doc(alias = "secondary-icon-gicon")]
3054    fn secondary_icon_gicon(&self) -> Option<gio::Icon> {
3055        ObjectExt::property(self.as_ref(), "secondary-icon-gicon")
3056    }
3057
3058    /// The `GIcon` to use for the secondary icon for the entry.
3059    #[doc(alias = "secondary-icon-gicon")]
3060    fn set_secondary_icon_gicon<P: IsA<gio::Icon>>(&self, secondary_icon_gicon: Option<&P>) {
3061        ObjectExt::set_property(self.as_ref(), "secondary-icon-gicon", secondary_icon_gicon)
3062    }
3063
3064    /// The icon name to use for the secondary icon for the entry.
3065    #[doc(alias = "secondary-icon-name")]
3066    fn secondary_icon_name(&self) -> Option<glib::GString> {
3067        ObjectExt::property(self.as_ref(), "secondary-icon-name")
3068    }
3069
3070    /// The icon name to use for the secondary icon for the entry.
3071    #[doc(alias = "secondary-icon-name")]
3072    fn set_secondary_icon_name(&self, secondary_icon_name: Option<&str>) {
3073        ObjectExt::set_property(self.as_ref(), "secondary-icon-name", secondary_icon_name)
3074    }
3075
3076    /// A [`gdk::Paintable`][crate::gdk::Paintable] to use as the secondary icon for the entry.
3077    #[doc(alias = "secondary-icon-paintable")]
3078    fn secondary_icon_paintable(&self) -> Option<gdk::Paintable> {
3079        ObjectExt::property(self.as_ref(), "secondary-icon-paintable")
3080    }
3081
3082    /// A [`gdk::Paintable`][crate::gdk::Paintable] to use as the secondary icon for the entry.
3083    #[doc(alias = "secondary-icon-paintable")]
3084    fn set_secondary_icon_paintable<P: IsA<gdk::Paintable>>(
3085        &self,
3086        secondary_icon_paintable: Option<&P>,
3087    ) {
3088        ObjectExt::set_property(
3089            self.as_ref(),
3090            "secondary-icon-paintable",
3091            secondary_icon_paintable,
3092        )
3093    }
3094
3095    /// Whether the secondary icon is sensitive.
3096    ///
3097    /// An insensitive icon appears grayed out. GTK does not emit the
3098    /// [`icon-press`][struct@crate::Entry#icon-press][ and [`icon-release`][struct@crate::Entry#icon-release]
3099    /// signals and does not allow DND from insensitive icons.
3100    ///
3101    /// An icon should be set insensitive if the action that would trigger
3102    /// when clicked is currently not available.
3103    #[doc(alias = "secondary-icon-sensitive")]
3104    fn is_secondary_icon_sensitive(&self) -> bool {
3105        ObjectExt::property(self.as_ref(), "secondary-icon-sensitive")
3106    }
3107
3108    /// Whether the secondary icon is sensitive.
3109    ///
3110    /// An insensitive icon appears grayed out. GTK does not emit the
3111    /// [`icon-press`][struct@crate::Entry#icon-press][ and [`icon-release`][struct@crate::Entry#icon-release]
3112    /// signals and does not allow DND from insensitive icons.
3113    ///
3114    /// An icon should be set insensitive if the action that would trigger
3115    /// when clicked is currently not available.
3116    #[doc(alias = "secondary-icon-sensitive")]
3117    fn set_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool) {
3118        ObjectExt::set_property(
3119            self.as_ref(),
3120            "secondary-icon-sensitive",
3121            secondary_icon_sensitive,
3122        )
3123    }
3124
3125    /// The representation which is used for the secondary icon of the entry.
3126    #[doc(alias = "secondary-icon-storage-type")]
3127    fn secondary_icon_storage_type(&self) -> ImageType {
3128        ObjectExt::property(self.as_ref(), "secondary-icon-storage-type")
3129    }
3130
3131    /// The contents of the tooltip on the secondary icon, with markup.
3132    ///
3133    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
3134    #[doc(alias = "secondary-icon-tooltip-markup")]
3135    fn secondary_icon_tooltip_markup(&self) -> Option<glib::GString> {
3136        ObjectExt::property(self.as_ref(), "secondary-icon-tooltip-markup")
3137    }
3138
3139    /// The contents of the tooltip on the secondary icon, with markup.
3140    ///
3141    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
3142    #[doc(alias = "secondary-icon-tooltip-markup")]
3143    fn set_secondary_icon_tooltip_markup(&self, secondary_icon_tooltip_markup: Option<&str>) {
3144        ObjectExt::set_property(
3145            self.as_ref(),
3146            "secondary-icon-tooltip-markup",
3147            secondary_icon_tooltip_markup,
3148        )
3149    }
3150
3151    /// The contents of the tooltip on the secondary icon.
3152    ///
3153    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
3154    #[doc(alias = "secondary-icon-tooltip-text")]
3155    fn secondary_icon_tooltip_text(&self) -> Option<glib::GString> {
3156        ObjectExt::property(self.as_ref(), "secondary-icon-tooltip-text")
3157    }
3158
3159    /// The contents of the tooltip on the secondary icon.
3160    ///
3161    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
3162    #[doc(alias = "secondary-icon-tooltip-text")]
3163    fn set_secondary_icon_tooltip_text(&self, secondary_icon_tooltip_text: Option<&str>) {
3164        ObjectExt::set_property(
3165            self.as_ref(),
3166            "secondary-icon-tooltip-text",
3167            secondary_icon_tooltip_text,
3168        )
3169    }
3170
3171    /// Whether the entry will show an Emoji icon in the secondary icon position
3172    /// to open the Emoji chooser.
3173    #[doc(alias = "show-emoji-icon")]
3174    fn shows_emoji_icon(&self) -> bool {
3175        ObjectExt::property(self.as_ref(), "show-emoji-icon")
3176    }
3177
3178    /// Whether the entry will show an Emoji icon in the secondary icon position
3179    /// to open the Emoji chooser.
3180    #[doc(alias = "show-emoji-icon")]
3181    fn set_show_emoji_icon(&self, show_emoji_icon: bool) {
3182        ObjectExt::set_property(self.as_ref(), "show-emoji-icon", show_emoji_icon)
3183    }
3184
3185    /// When [`true`], pasted multi-line text is truncated to the first line.
3186    #[doc(alias = "truncate-multiline")]
3187    fn must_truncate_multiline(&self) -> bool {
3188        ObjectExt::property(self.as_ref(), "truncate-multiline")
3189    }
3190
3191    /// When [`true`], pasted multi-line text is truncated to the first line.
3192    #[doc(alias = "truncate-multiline")]
3193    fn set_truncate_multiline(&self, truncate_multiline: bool) {
3194        ObjectExt::set_property(self.as_ref(), "truncate-multiline", truncate_multiline)
3195    }
3196
3197    /// Emitted when the entry is activated.
3198    ///
3199    /// The keybindings for this signal are all forms of the Enter key.
3200    #[doc(alias = "activate")]
3201    fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3202        unsafe extern "C" fn activate_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3203            this: *mut ffi::GtkEntry,
3204            f: glib::ffi::gpointer,
3205        ) {
3206            let f: &F = &*(f as *const F);
3207            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3208        }
3209        unsafe {
3210            let f: Box_<F> = Box_::new(f);
3211            connect_raw(
3212                self.as_ptr() as *mut _,
3213                c"activate".as_ptr() as *const _,
3214                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3215                    activate_trampoline::<Self, F> as *const (),
3216                )),
3217                Box_::into_raw(f),
3218            )
3219        }
3220    }
3221
3222    fn emit_activate(&self) {
3223        self.emit_by_name::<()>("activate", &[]);
3224    }
3225
3226    /// Emitted when an activatable icon is clicked.
3227    /// ## `icon_pos`
3228    /// The position of the clicked icon
3229    #[doc(alias = "icon-press")]
3230    fn connect_icon_press<F: Fn(&Self, EntryIconPosition) + 'static>(
3231        &self,
3232        f: F,
3233    ) -> SignalHandlerId {
3234        unsafe extern "C" fn icon_press_trampoline<
3235            P: IsA<Entry>,
3236            F: Fn(&P, EntryIconPosition) + 'static,
3237        >(
3238            this: *mut ffi::GtkEntry,
3239            icon_pos: ffi::GtkEntryIconPosition,
3240            f: glib::ffi::gpointer,
3241        ) {
3242            let f: &F = &*(f as *const F);
3243            f(
3244                Entry::from_glib_borrow(this).unsafe_cast_ref(),
3245                from_glib(icon_pos),
3246            )
3247        }
3248        unsafe {
3249            let f: Box_<F> = Box_::new(f);
3250            connect_raw(
3251                self.as_ptr() as *mut _,
3252                c"icon-press".as_ptr() as *const _,
3253                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3254                    icon_press_trampoline::<Self, F> as *const (),
3255                )),
3256                Box_::into_raw(f),
3257            )
3258        }
3259    }
3260
3261    /// Emitted on the button release from a mouse click
3262    /// over an activatable icon.
3263    /// ## `icon_pos`
3264    /// The position of the clicked icon
3265    #[doc(alias = "icon-release")]
3266    fn connect_icon_release<F: Fn(&Self, EntryIconPosition) + 'static>(
3267        &self,
3268        f: F,
3269    ) -> SignalHandlerId {
3270        unsafe extern "C" fn icon_release_trampoline<
3271            P: IsA<Entry>,
3272            F: Fn(&P, EntryIconPosition) + 'static,
3273        >(
3274            this: *mut ffi::GtkEntry,
3275            icon_pos: ffi::GtkEntryIconPosition,
3276            f: glib::ffi::gpointer,
3277        ) {
3278            let f: &F = &*(f as *const F);
3279            f(
3280                Entry::from_glib_borrow(this).unsafe_cast_ref(),
3281                from_glib(icon_pos),
3282            )
3283        }
3284        unsafe {
3285            let f: Box_<F> = Box_::new(f);
3286            connect_raw(
3287                self.as_ptr() as *mut _,
3288                c"icon-release".as_ptr() as *const _,
3289                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3290                    icon_release_trampoline::<Self, F> as *const (),
3291                )),
3292                Box_::into_raw(f),
3293            )
3294        }
3295    }
3296
3297    #[doc(alias = "activates-default")]
3298    fn connect_activates_default_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3299        unsafe extern "C" fn notify_activates_default_trampoline<
3300            P: IsA<Entry>,
3301            F: Fn(&P) + 'static,
3302        >(
3303            this: *mut ffi::GtkEntry,
3304            _param_spec: glib::ffi::gpointer,
3305            f: glib::ffi::gpointer,
3306        ) {
3307            let f: &F = &*(f as *const F);
3308            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3309        }
3310        unsafe {
3311            let f: Box_<F> = Box_::new(f);
3312            connect_raw(
3313                self.as_ptr() as *mut _,
3314                c"notify::activates-default".as_ptr() as *const _,
3315                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3316                    notify_activates_default_trampoline::<Self, F> as *const (),
3317                )),
3318                Box_::into_raw(f),
3319            )
3320        }
3321    }
3322
3323    #[doc(alias = "attributes")]
3324    fn connect_attributes_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3325        unsafe extern "C" fn notify_attributes_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3326            this: *mut ffi::GtkEntry,
3327            _param_spec: glib::ffi::gpointer,
3328            f: glib::ffi::gpointer,
3329        ) {
3330            let f: &F = &*(f as *const F);
3331            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3332        }
3333        unsafe {
3334            let f: Box_<F> = Box_::new(f);
3335            connect_raw(
3336                self.as_ptr() as *mut _,
3337                c"notify::attributes".as_ptr() as *const _,
3338                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3339                    notify_attributes_trampoline::<Self, F> as *const (),
3340                )),
3341                Box_::into_raw(f),
3342            )
3343        }
3344    }
3345
3346    #[doc(alias = "buffer")]
3347    fn connect_buffer_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3348        unsafe extern "C" fn notify_buffer_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3349            this: *mut ffi::GtkEntry,
3350            _param_spec: glib::ffi::gpointer,
3351            f: glib::ffi::gpointer,
3352        ) {
3353            let f: &F = &*(f as *const F);
3354            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3355        }
3356        unsafe {
3357            let f: Box_<F> = Box_::new(f);
3358            connect_raw(
3359                self.as_ptr() as *mut _,
3360                c"notify::buffer".as_ptr() as *const _,
3361                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3362                    notify_buffer_trampoline::<Self, F> as *const (),
3363                )),
3364                Box_::into_raw(f),
3365            )
3366        }
3367    }
3368
3369    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3370    #[doc(alias = "completion")]
3371    fn connect_completion_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3372        unsafe extern "C" fn notify_completion_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3373            this: *mut ffi::GtkEntry,
3374            _param_spec: glib::ffi::gpointer,
3375            f: glib::ffi::gpointer,
3376        ) {
3377            let f: &F = &*(f as *const F);
3378            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3379        }
3380        unsafe {
3381            let f: Box_<F> = Box_::new(f);
3382            connect_raw(
3383                self.as_ptr() as *mut _,
3384                c"notify::completion".as_ptr() as *const _,
3385                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3386                    notify_completion_trampoline::<Self, F> as *const (),
3387                )),
3388                Box_::into_raw(f),
3389            )
3390        }
3391    }
3392
3393    #[doc(alias = "enable-emoji-completion")]
3394    fn connect_enable_emoji_completion_notify<F: Fn(&Self) + 'static>(
3395        &self,
3396        f: F,
3397    ) -> SignalHandlerId {
3398        unsafe extern "C" fn notify_enable_emoji_completion_trampoline<
3399            P: IsA<Entry>,
3400            F: Fn(&P) + 'static,
3401        >(
3402            this: *mut ffi::GtkEntry,
3403            _param_spec: glib::ffi::gpointer,
3404            f: glib::ffi::gpointer,
3405        ) {
3406            let f: &F = &*(f as *const F);
3407            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3408        }
3409        unsafe {
3410            let f: Box_<F> = Box_::new(f);
3411            connect_raw(
3412                self.as_ptr() as *mut _,
3413                c"notify::enable-emoji-completion".as_ptr() as *const _,
3414                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3415                    notify_enable_emoji_completion_trampoline::<Self, F> as *const (),
3416                )),
3417                Box_::into_raw(f),
3418            )
3419        }
3420    }
3421
3422    #[doc(alias = "extra-menu")]
3423    fn connect_extra_menu_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3424        unsafe extern "C" fn notify_extra_menu_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3425            this: *mut ffi::GtkEntry,
3426            _param_spec: glib::ffi::gpointer,
3427            f: glib::ffi::gpointer,
3428        ) {
3429            let f: &F = &*(f as *const F);
3430            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3431        }
3432        unsafe {
3433            let f: Box_<F> = Box_::new(f);
3434            connect_raw(
3435                self.as_ptr() as *mut _,
3436                c"notify::extra-menu".as_ptr() as *const _,
3437                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3438                    notify_extra_menu_trampoline::<Self, F> as *const (),
3439                )),
3440                Box_::into_raw(f),
3441            )
3442        }
3443    }
3444
3445    #[doc(alias = "has-frame")]
3446    fn connect_has_frame_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3447        unsafe extern "C" fn notify_has_frame_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3448            this: *mut ffi::GtkEntry,
3449            _param_spec: glib::ffi::gpointer,
3450            f: glib::ffi::gpointer,
3451        ) {
3452            let f: &F = &*(f as *const F);
3453            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3454        }
3455        unsafe {
3456            let f: Box_<F> = Box_::new(f);
3457            connect_raw(
3458                self.as_ptr() as *mut _,
3459                c"notify::has-frame".as_ptr() as *const _,
3460                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3461                    notify_has_frame_trampoline::<Self, F> as *const (),
3462                )),
3463                Box_::into_raw(f),
3464            )
3465        }
3466    }
3467
3468    #[doc(alias = "im-module")]
3469    fn connect_im_module_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3470        unsafe extern "C" fn notify_im_module_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3471            this: *mut ffi::GtkEntry,
3472            _param_spec: glib::ffi::gpointer,
3473            f: glib::ffi::gpointer,
3474        ) {
3475            let f: &F = &*(f as *const F);
3476            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3477        }
3478        unsafe {
3479            let f: Box_<F> = Box_::new(f);
3480            connect_raw(
3481                self.as_ptr() as *mut _,
3482                c"notify::im-module".as_ptr() as *const _,
3483                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3484                    notify_im_module_trampoline::<Self, F> as *const (),
3485                )),
3486                Box_::into_raw(f),
3487            )
3488        }
3489    }
3490
3491    #[doc(alias = "input-hints")]
3492    fn connect_input_hints_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3493        unsafe extern "C" fn notify_input_hints_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3494            this: *mut ffi::GtkEntry,
3495            _param_spec: glib::ffi::gpointer,
3496            f: glib::ffi::gpointer,
3497        ) {
3498            let f: &F = &*(f as *const F);
3499            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3500        }
3501        unsafe {
3502            let f: Box_<F> = Box_::new(f);
3503            connect_raw(
3504                self.as_ptr() as *mut _,
3505                c"notify::input-hints".as_ptr() as *const _,
3506                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3507                    notify_input_hints_trampoline::<Self, F> as *const (),
3508                )),
3509                Box_::into_raw(f),
3510            )
3511        }
3512    }
3513
3514    #[doc(alias = "input-purpose")]
3515    fn connect_input_purpose_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3516        unsafe extern "C" fn notify_input_purpose_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3517            this: *mut ffi::GtkEntry,
3518            _param_spec: glib::ffi::gpointer,
3519            f: glib::ffi::gpointer,
3520        ) {
3521            let f: &F = &*(f as *const F);
3522            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3523        }
3524        unsafe {
3525            let f: Box_<F> = Box_::new(f);
3526            connect_raw(
3527                self.as_ptr() as *mut _,
3528                c"notify::input-purpose".as_ptr() as *const _,
3529                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3530                    notify_input_purpose_trampoline::<Self, F> as *const (),
3531                )),
3532                Box_::into_raw(f),
3533            )
3534        }
3535    }
3536
3537    #[doc(alias = "invisible-char")]
3538    fn connect_invisible_char_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3539        unsafe extern "C" fn notify_invisible_char_trampoline<
3540            P: IsA<Entry>,
3541            F: Fn(&P) + 'static,
3542        >(
3543            this: *mut ffi::GtkEntry,
3544            _param_spec: glib::ffi::gpointer,
3545            f: glib::ffi::gpointer,
3546        ) {
3547            let f: &F = &*(f as *const F);
3548            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3549        }
3550        unsafe {
3551            let f: Box_<F> = Box_::new(f);
3552            connect_raw(
3553                self.as_ptr() as *mut _,
3554                c"notify::invisible-char".as_ptr() as *const _,
3555                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3556                    notify_invisible_char_trampoline::<Self, F> as *const (),
3557                )),
3558                Box_::into_raw(f),
3559            )
3560        }
3561    }
3562
3563    #[doc(alias = "invisible-char-set")]
3564    fn connect_invisible_char_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3565        unsafe extern "C" fn notify_invisible_char_set_trampoline<
3566            P: IsA<Entry>,
3567            F: Fn(&P) + 'static,
3568        >(
3569            this: *mut ffi::GtkEntry,
3570            _param_spec: glib::ffi::gpointer,
3571            f: glib::ffi::gpointer,
3572        ) {
3573            let f: &F = &*(f as *const F);
3574            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3575        }
3576        unsafe {
3577            let f: Box_<F> = Box_::new(f);
3578            connect_raw(
3579                self.as_ptr() as *mut _,
3580                c"notify::invisible-char-set".as_ptr() as *const _,
3581                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3582                    notify_invisible_char_set_trampoline::<Self, F> as *const (),
3583                )),
3584                Box_::into_raw(f),
3585            )
3586        }
3587    }
3588
3589    #[doc(alias = "max-length")]
3590    fn connect_max_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3591        unsafe extern "C" fn notify_max_length_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3592            this: *mut ffi::GtkEntry,
3593            _param_spec: glib::ffi::gpointer,
3594            f: glib::ffi::gpointer,
3595        ) {
3596            let f: &F = &*(f as *const F);
3597            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3598        }
3599        unsafe {
3600            let f: Box_<F> = Box_::new(f);
3601            connect_raw(
3602                self.as_ptr() as *mut _,
3603                c"notify::max-length".as_ptr() as *const _,
3604                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3605                    notify_max_length_trampoline::<Self, F> as *const (),
3606                )),
3607                Box_::into_raw(f),
3608            )
3609        }
3610    }
3611
3612    #[doc(alias = "overwrite-mode")]
3613    fn connect_overwrite_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3614        unsafe extern "C" fn notify_overwrite_mode_trampoline<
3615            P: IsA<Entry>,
3616            F: Fn(&P) + 'static,
3617        >(
3618            this: *mut ffi::GtkEntry,
3619            _param_spec: glib::ffi::gpointer,
3620            f: glib::ffi::gpointer,
3621        ) {
3622            let f: &F = &*(f as *const F);
3623            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3624        }
3625        unsafe {
3626            let f: Box_<F> = Box_::new(f);
3627            connect_raw(
3628                self.as_ptr() as *mut _,
3629                c"notify::overwrite-mode".as_ptr() as *const _,
3630                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3631                    notify_overwrite_mode_trampoline::<Self, F> as *const (),
3632                )),
3633                Box_::into_raw(f),
3634            )
3635        }
3636    }
3637
3638    #[doc(alias = "placeholder-text")]
3639    fn connect_placeholder_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3640        unsafe extern "C" fn notify_placeholder_text_trampoline<
3641            P: IsA<Entry>,
3642            F: Fn(&P) + 'static,
3643        >(
3644            this: *mut ffi::GtkEntry,
3645            _param_spec: glib::ffi::gpointer,
3646            f: glib::ffi::gpointer,
3647        ) {
3648            let f: &F = &*(f as *const F);
3649            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3650        }
3651        unsafe {
3652            let f: Box_<F> = Box_::new(f);
3653            connect_raw(
3654                self.as_ptr() as *mut _,
3655                c"notify::placeholder-text".as_ptr() as *const _,
3656                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3657                    notify_placeholder_text_trampoline::<Self, F> as *const (),
3658                )),
3659                Box_::into_raw(f),
3660            )
3661        }
3662    }
3663
3664    #[doc(alias = "primary-icon-activatable")]
3665    fn connect_primary_icon_activatable_notify<F: Fn(&Self) + 'static>(
3666        &self,
3667        f: F,
3668    ) -> SignalHandlerId {
3669        unsafe extern "C" fn notify_primary_icon_activatable_trampoline<
3670            P: IsA<Entry>,
3671            F: Fn(&P) + 'static,
3672        >(
3673            this: *mut ffi::GtkEntry,
3674            _param_spec: glib::ffi::gpointer,
3675            f: glib::ffi::gpointer,
3676        ) {
3677            let f: &F = &*(f as *const F);
3678            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3679        }
3680        unsafe {
3681            let f: Box_<F> = Box_::new(f);
3682            connect_raw(
3683                self.as_ptr() as *mut _,
3684                c"notify::primary-icon-activatable".as_ptr() as *const _,
3685                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3686                    notify_primary_icon_activatable_trampoline::<Self, F> as *const (),
3687                )),
3688                Box_::into_raw(f),
3689            )
3690        }
3691    }
3692
3693    #[doc(alias = "primary-icon-gicon")]
3694    fn connect_primary_icon_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3695        unsafe extern "C" fn notify_primary_icon_gicon_trampoline<
3696            P: IsA<Entry>,
3697            F: Fn(&P) + 'static,
3698        >(
3699            this: *mut ffi::GtkEntry,
3700            _param_spec: glib::ffi::gpointer,
3701            f: glib::ffi::gpointer,
3702        ) {
3703            let f: &F = &*(f as *const F);
3704            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3705        }
3706        unsafe {
3707            let f: Box_<F> = Box_::new(f);
3708            connect_raw(
3709                self.as_ptr() as *mut _,
3710                c"notify::primary-icon-gicon".as_ptr() as *const _,
3711                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3712                    notify_primary_icon_gicon_trampoline::<Self, F> as *const (),
3713                )),
3714                Box_::into_raw(f),
3715            )
3716        }
3717    }
3718
3719    #[doc(alias = "primary-icon-name")]
3720    fn connect_primary_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3721        unsafe extern "C" fn notify_primary_icon_name_trampoline<
3722            P: IsA<Entry>,
3723            F: Fn(&P) + 'static,
3724        >(
3725            this: *mut ffi::GtkEntry,
3726            _param_spec: glib::ffi::gpointer,
3727            f: glib::ffi::gpointer,
3728        ) {
3729            let f: &F = &*(f as *const F);
3730            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3731        }
3732        unsafe {
3733            let f: Box_<F> = Box_::new(f);
3734            connect_raw(
3735                self.as_ptr() as *mut _,
3736                c"notify::primary-icon-name".as_ptr() as *const _,
3737                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3738                    notify_primary_icon_name_trampoline::<Self, F> as *const (),
3739                )),
3740                Box_::into_raw(f),
3741            )
3742        }
3743    }
3744
3745    #[doc(alias = "primary-icon-paintable")]
3746    fn connect_primary_icon_paintable_notify<F: Fn(&Self) + 'static>(
3747        &self,
3748        f: F,
3749    ) -> SignalHandlerId {
3750        unsafe extern "C" fn notify_primary_icon_paintable_trampoline<
3751            P: IsA<Entry>,
3752            F: Fn(&P) + 'static,
3753        >(
3754            this: *mut ffi::GtkEntry,
3755            _param_spec: glib::ffi::gpointer,
3756            f: glib::ffi::gpointer,
3757        ) {
3758            let f: &F = &*(f as *const F);
3759            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3760        }
3761        unsafe {
3762            let f: Box_<F> = Box_::new(f);
3763            connect_raw(
3764                self.as_ptr() as *mut _,
3765                c"notify::primary-icon-paintable".as_ptr() as *const _,
3766                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3767                    notify_primary_icon_paintable_trampoline::<Self, F> as *const (),
3768                )),
3769                Box_::into_raw(f),
3770            )
3771        }
3772    }
3773
3774    #[doc(alias = "primary-icon-sensitive")]
3775    fn connect_primary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
3776        &self,
3777        f: F,
3778    ) -> SignalHandlerId {
3779        unsafe extern "C" fn notify_primary_icon_sensitive_trampoline<
3780            P: IsA<Entry>,
3781            F: Fn(&P) + 'static,
3782        >(
3783            this: *mut ffi::GtkEntry,
3784            _param_spec: glib::ffi::gpointer,
3785            f: glib::ffi::gpointer,
3786        ) {
3787            let f: &F = &*(f as *const F);
3788            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3789        }
3790        unsafe {
3791            let f: Box_<F> = Box_::new(f);
3792            connect_raw(
3793                self.as_ptr() as *mut _,
3794                c"notify::primary-icon-sensitive".as_ptr() as *const _,
3795                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3796                    notify_primary_icon_sensitive_trampoline::<Self, F> as *const (),
3797                )),
3798                Box_::into_raw(f),
3799            )
3800        }
3801    }
3802
3803    #[doc(alias = "primary-icon-storage-type")]
3804    fn connect_primary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
3805        &self,
3806        f: F,
3807    ) -> SignalHandlerId {
3808        unsafe extern "C" fn notify_primary_icon_storage_type_trampoline<
3809            P: IsA<Entry>,
3810            F: Fn(&P) + 'static,
3811        >(
3812            this: *mut ffi::GtkEntry,
3813            _param_spec: glib::ffi::gpointer,
3814            f: glib::ffi::gpointer,
3815        ) {
3816            let f: &F = &*(f as *const F);
3817            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3818        }
3819        unsafe {
3820            let f: Box_<F> = Box_::new(f);
3821            connect_raw(
3822                self.as_ptr() as *mut _,
3823                c"notify::primary-icon-storage-type".as_ptr() as *const _,
3824                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3825                    notify_primary_icon_storage_type_trampoline::<Self, F> as *const (),
3826                )),
3827                Box_::into_raw(f),
3828            )
3829        }
3830    }
3831
3832    #[doc(alias = "primary-icon-tooltip-markup")]
3833    fn connect_primary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
3834        &self,
3835        f: F,
3836    ) -> SignalHandlerId {
3837        unsafe extern "C" fn notify_primary_icon_tooltip_markup_trampoline<
3838            P: IsA<Entry>,
3839            F: Fn(&P) + 'static,
3840        >(
3841            this: *mut ffi::GtkEntry,
3842            _param_spec: glib::ffi::gpointer,
3843            f: glib::ffi::gpointer,
3844        ) {
3845            let f: &F = &*(f as *const F);
3846            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3847        }
3848        unsafe {
3849            let f: Box_<F> = Box_::new(f);
3850            connect_raw(
3851                self.as_ptr() as *mut _,
3852                c"notify::primary-icon-tooltip-markup".as_ptr() as *const _,
3853                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3854                    notify_primary_icon_tooltip_markup_trampoline::<Self, F> as *const (),
3855                )),
3856                Box_::into_raw(f),
3857            )
3858        }
3859    }
3860
3861    #[doc(alias = "primary-icon-tooltip-text")]
3862    fn connect_primary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
3863        &self,
3864        f: F,
3865    ) -> SignalHandlerId {
3866        unsafe extern "C" fn notify_primary_icon_tooltip_text_trampoline<
3867            P: IsA<Entry>,
3868            F: Fn(&P) + 'static,
3869        >(
3870            this: *mut ffi::GtkEntry,
3871            _param_spec: glib::ffi::gpointer,
3872            f: glib::ffi::gpointer,
3873        ) {
3874            let f: &F = &*(f as *const F);
3875            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3876        }
3877        unsafe {
3878            let f: Box_<F> = Box_::new(f);
3879            connect_raw(
3880                self.as_ptr() as *mut _,
3881                c"notify::primary-icon-tooltip-text".as_ptr() as *const _,
3882                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3883                    notify_primary_icon_tooltip_text_trampoline::<Self, F> as *const (),
3884                )),
3885                Box_::into_raw(f),
3886            )
3887        }
3888    }
3889
3890    #[doc(alias = "progress-fraction")]
3891    fn connect_progress_fraction_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3892        unsafe extern "C" fn notify_progress_fraction_trampoline<
3893            P: IsA<Entry>,
3894            F: Fn(&P) + 'static,
3895        >(
3896            this: *mut ffi::GtkEntry,
3897            _param_spec: glib::ffi::gpointer,
3898            f: glib::ffi::gpointer,
3899        ) {
3900            let f: &F = &*(f as *const F);
3901            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3902        }
3903        unsafe {
3904            let f: Box_<F> = Box_::new(f);
3905            connect_raw(
3906                self.as_ptr() as *mut _,
3907                c"notify::progress-fraction".as_ptr() as *const _,
3908                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3909                    notify_progress_fraction_trampoline::<Self, F> as *const (),
3910                )),
3911                Box_::into_raw(f),
3912            )
3913        }
3914    }
3915
3916    #[doc(alias = "progress-pulse-step")]
3917    fn connect_progress_pulse_step_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3918        unsafe extern "C" fn notify_progress_pulse_step_trampoline<
3919            P: IsA<Entry>,
3920            F: Fn(&P) + 'static,
3921        >(
3922            this: *mut ffi::GtkEntry,
3923            _param_spec: glib::ffi::gpointer,
3924            f: glib::ffi::gpointer,
3925        ) {
3926            let f: &F = &*(f as *const F);
3927            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3928        }
3929        unsafe {
3930            let f: Box_<F> = Box_::new(f);
3931            connect_raw(
3932                self.as_ptr() as *mut _,
3933                c"notify::progress-pulse-step".as_ptr() as *const _,
3934                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3935                    notify_progress_pulse_step_trampoline::<Self, F> as *const (),
3936                )),
3937                Box_::into_raw(f),
3938            )
3939        }
3940    }
3941
3942    #[doc(alias = "scroll-offset")]
3943    fn connect_scroll_offset_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3944        unsafe extern "C" fn notify_scroll_offset_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3945            this: *mut ffi::GtkEntry,
3946            _param_spec: glib::ffi::gpointer,
3947            f: glib::ffi::gpointer,
3948        ) {
3949            let f: &F = &*(f as *const F);
3950            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3951        }
3952        unsafe {
3953            let f: Box_<F> = Box_::new(f);
3954            connect_raw(
3955                self.as_ptr() as *mut _,
3956                c"notify::scroll-offset".as_ptr() as *const _,
3957                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3958                    notify_scroll_offset_trampoline::<Self, F> as *const (),
3959                )),
3960                Box_::into_raw(f),
3961            )
3962        }
3963    }
3964
3965    #[doc(alias = "secondary-icon-activatable")]
3966    fn connect_secondary_icon_activatable_notify<F: Fn(&Self) + 'static>(
3967        &self,
3968        f: F,
3969    ) -> SignalHandlerId {
3970        unsafe extern "C" fn notify_secondary_icon_activatable_trampoline<
3971            P: IsA<Entry>,
3972            F: Fn(&P) + 'static,
3973        >(
3974            this: *mut ffi::GtkEntry,
3975            _param_spec: glib::ffi::gpointer,
3976            f: glib::ffi::gpointer,
3977        ) {
3978            let f: &F = &*(f as *const F);
3979            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3980        }
3981        unsafe {
3982            let f: Box_<F> = Box_::new(f);
3983            connect_raw(
3984                self.as_ptr() as *mut _,
3985                c"notify::secondary-icon-activatable".as_ptr() as *const _,
3986                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3987                    notify_secondary_icon_activatable_trampoline::<Self, F> as *const (),
3988                )),
3989                Box_::into_raw(f),
3990            )
3991        }
3992    }
3993
3994    #[doc(alias = "secondary-icon-gicon")]
3995    fn connect_secondary_icon_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3996        unsafe extern "C" fn notify_secondary_icon_gicon_trampoline<
3997            P: IsA<Entry>,
3998            F: Fn(&P) + 'static,
3999        >(
4000            this: *mut ffi::GtkEntry,
4001            _param_spec: glib::ffi::gpointer,
4002            f: glib::ffi::gpointer,
4003        ) {
4004            let f: &F = &*(f as *const F);
4005            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4006        }
4007        unsafe {
4008            let f: Box_<F> = Box_::new(f);
4009            connect_raw(
4010                self.as_ptr() as *mut _,
4011                c"notify::secondary-icon-gicon".as_ptr() as *const _,
4012                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4013                    notify_secondary_icon_gicon_trampoline::<Self, F> as *const (),
4014                )),
4015                Box_::into_raw(f),
4016            )
4017        }
4018    }
4019
4020    #[doc(alias = "secondary-icon-name")]
4021    fn connect_secondary_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4022        unsafe extern "C" fn notify_secondary_icon_name_trampoline<
4023            P: IsA<Entry>,
4024            F: Fn(&P) + 'static,
4025        >(
4026            this: *mut ffi::GtkEntry,
4027            _param_spec: glib::ffi::gpointer,
4028            f: glib::ffi::gpointer,
4029        ) {
4030            let f: &F = &*(f as *const F);
4031            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4032        }
4033        unsafe {
4034            let f: Box_<F> = Box_::new(f);
4035            connect_raw(
4036                self.as_ptr() as *mut _,
4037                c"notify::secondary-icon-name".as_ptr() as *const _,
4038                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4039                    notify_secondary_icon_name_trampoline::<Self, F> as *const (),
4040                )),
4041                Box_::into_raw(f),
4042            )
4043        }
4044    }
4045
4046    #[doc(alias = "secondary-icon-paintable")]
4047    fn connect_secondary_icon_paintable_notify<F: Fn(&Self) + 'static>(
4048        &self,
4049        f: F,
4050    ) -> SignalHandlerId {
4051        unsafe extern "C" fn notify_secondary_icon_paintable_trampoline<
4052            P: IsA<Entry>,
4053            F: Fn(&P) + 'static,
4054        >(
4055            this: *mut ffi::GtkEntry,
4056            _param_spec: glib::ffi::gpointer,
4057            f: glib::ffi::gpointer,
4058        ) {
4059            let f: &F = &*(f as *const F);
4060            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4061        }
4062        unsafe {
4063            let f: Box_<F> = Box_::new(f);
4064            connect_raw(
4065                self.as_ptr() as *mut _,
4066                c"notify::secondary-icon-paintable".as_ptr() as *const _,
4067                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4068                    notify_secondary_icon_paintable_trampoline::<Self, F> as *const (),
4069                )),
4070                Box_::into_raw(f),
4071            )
4072        }
4073    }
4074
4075    #[doc(alias = "secondary-icon-sensitive")]
4076    fn connect_secondary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
4077        &self,
4078        f: F,
4079    ) -> SignalHandlerId {
4080        unsafe extern "C" fn notify_secondary_icon_sensitive_trampoline<
4081            P: IsA<Entry>,
4082            F: Fn(&P) + 'static,
4083        >(
4084            this: *mut ffi::GtkEntry,
4085            _param_spec: glib::ffi::gpointer,
4086            f: glib::ffi::gpointer,
4087        ) {
4088            let f: &F = &*(f as *const F);
4089            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4090        }
4091        unsafe {
4092            let f: Box_<F> = Box_::new(f);
4093            connect_raw(
4094                self.as_ptr() as *mut _,
4095                c"notify::secondary-icon-sensitive".as_ptr() as *const _,
4096                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4097                    notify_secondary_icon_sensitive_trampoline::<Self, F> as *const (),
4098                )),
4099                Box_::into_raw(f),
4100            )
4101        }
4102    }
4103
4104    #[doc(alias = "secondary-icon-storage-type")]
4105    fn connect_secondary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
4106        &self,
4107        f: F,
4108    ) -> SignalHandlerId {
4109        unsafe extern "C" fn notify_secondary_icon_storage_type_trampoline<
4110            P: IsA<Entry>,
4111            F: Fn(&P) + 'static,
4112        >(
4113            this: *mut ffi::GtkEntry,
4114            _param_spec: glib::ffi::gpointer,
4115            f: glib::ffi::gpointer,
4116        ) {
4117            let f: &F = &*(f as *const F);
4118            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4119        }
4120        unsafe {
4121            let f: Box_<F> = Box_::new(f);
4122            connect_raw(
4123                self.as_ptr() as *mut _,
4124                c"notify::secondary-icon-storage-type".as_ptr() as *const _,
4125                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4126                    notify_secondary_icon_storage_type_trampoline::<Self, F> as *const (),
4127                )),
4128                Box_::into_raw(f),
4129            )
4130        }
4131    }
4132
4133    #[doc(alias = "secondary-icon-tooltip-markup")]
4134    fn connect_secondary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
4135        &self,
4136        f: F,
4137    ) -> SignalHandlerId {
4138        unsafe extern "C" fn notify_secondary_icon_tooltip_markup_trampoline<
4139            P: IsA<Entry>,
4140            F: Fn(&P) + 'static,
4141        >(
4142            this: *mut ffi::GtkEntry,
4143            _param_spec: glib::ffi::gpointer,
4144            f: glib::ffi::gpointer,
4145        ) {
4146            let f: &F = &*(f as *const F);
4147            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4148        }
4149        unsafe {
4150            let f: Box_<F> = Box_::new(f);
4151            connect_raw(
4152                self.as_ptr() as *mut _,
4153                c"notify::secondary-icon-tooltip-markup".as_ptr() as *const _,
4154                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4155                    notify_secondary_icon_tooltip_markup_trampoline::<Self, F> as *const (),
4156                )),
4157                Box_::into_raw(f),
4158            )
4159        }
4160    }
4161
4162    #[doc(alias = "secondary-icon-tooltip-text")]
4163    fn connect_secondary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
4164        &self,
4165        f: F,
4166    ) -> SignalHandlerId {
4167        unsafe extern "C" fn notify_secondary_icon_tooltip_text_trampoline<
4168            P: IsA<Entry>,
4169            F: Fn(&P) + 'static,
4170        >(
4171            this: *mut ffi::GtkEntry,
4172            _param_spec: glib::ffi::gpointer,
4173            f: glib::ffi::gpointer,
4174        ) {
4175            let f: &F = &*(f as *const F);
4176            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4177        }
4178        unsafe {
4179            let f: Box_<F> = Box_::new(f);
4180            connect_raw(
4181                self.as_ptr() as *mut _,
4182                c"notify::secondary-icon-tooltip-text".as_ptr() as *const _,
4183                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4184                    notify_secondary_icon_tooltip_text_trampoline::<Self, F> as *const (),
4185                )),
4186                Box_::into_raw(f),
4187            )
4188        }
4189    }
4190
4191    #[doc(alias = "show-emoji-icon")]
4192    fn connect_show_emoji_icon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4193        unsafe extern "C" fn notify_show_emoji_icon_trampoline<
4194            P: IsA<Entry>,
4195            F: Fn(&P) + 'static,
4196        >(
4197            this: *mut ffi::GtkEntry,
4198            _param_spec: glib::ffi::gpointer,
4199            f: glib::ffi::gpointer,
4200        ) {
4201            let f: &F = &*(f as *const F);
4202            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4203        }
4204        unsafe {
4205            let f: Box_<F> = Box_::new(f);
4206            connect_raw(
4207                self.as_ptr() as *mut _,
4208                c"notify::show-emoji-icon".as_ptr() as *const _,
4209                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4210                    notify_show_emoji_icon_trampoline::<Self, F> as *const (),
4211                )),
4212                Box_::into_raw(f),
4213            )
4214        }
4215    }
4216
4217    #[doc(alias = "tabs")]
4218    fn connect_tabs_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4219        unsafe extern "C" fn notify_tabs_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4220            this: *mut ffi::GtkEntry,
4221            _param_spec: glib::ffi::gpointer,
4222            f: glib::ffi::gpointer,
4223        ) {
4224            let f: &F = &*(f as *const F);
4225            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4226        }
4227        unsafe {
4228            let f: Box_<F> = Box_::new(f);
4229            connect_raw(
4230                self.as_ptr() as *mut _,
4231                c"notify::tabs".as_ptr() as *const _,
4232                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4233                    notify_tabs_trampoline::<Self, F> as *const (),
4234                )),
4235                Box_::into_raw(f),
4236            )
4237        }
4238    }
4239
4240    #[doc(alias = "text-length")]
4241    fn connect_text_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4242        unsafe extern "C" fn notify_text_length_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4243            this: *mut ffi::GtkEntry,
4244            _param_spec: glib::ffi::gpointer,
4245            f: glib::ffi::gpointer,
4246        ) {
4247            let f: &F = &*(f as *const F);
4248            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4249        }
4250        unsafe {
4251            let f: Box_<F> = Box_::new(f);
4252            connect_raw(
4253                self.as_ptr() as *mut _,
4254                c"notify::text-length".as_ptr() as *const _,
4255                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4256                    notify_text_length_trampoline::<Self, F> as *const (),
4257                )),
4258                Box_::into_raw(f),
4259            )
4260        }
4261    }
4262
4263    #[doc(alias = "truncate-multiline")]
4264    fn connect_truncate_multiline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4265        unsafe extern "C" fn notify_truncate_multiline_trampoline<
4266            P: IsA<Entry>,
4267            F: Fn(&P) + 'static,
4268        >(
4269            this: *mut ffi::GtkEntry,
4270            _param_spec: glib::ffi::gpointer,
4271            f: glib::ffi::gpointer,
4272        ) {
4273            let f: &F = &*(f as *const F);
4274            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4275        }
4276        unsafe {
4277            let f: Box_<F> = Box_::new(f);
4278            connect_raw(
4279                self.as_ptr() as *mut _,
4280                c"notify::truncate-multiline".as_ptr() as *const _,
4281                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4282                    notify_truncate_multiline_trampoline::<Self, F> as *const (),
4283                )),
4284                Box_::into_raw(f),
4285            )
4286        }
4287    }
4288
4289    #[doc(alias = "visibility")]
4290    fn connect_visibility_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4291        unsafe extern "C" fn notify_visibility_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4292            this: *mut ffi::GtkEntry,
4293            _param_spec: glib::ffi::gpointer,
4294            f: glib::ffi::gpointer,
4295        ) {
4296            let f: &F = &*(f as *const F);
4297            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4298        }
4299        unsafe {
4300            let f: Box_<F> = Box_::new(f);
4301            connect_raw(
4302                self.as_ptr() as *mut _,
4303                c"notify::visibility".as_ptr() as *const _,
4304                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4305                    notify_visibility_trampoline::<Self, F> as *const (),
4306                )),
4307                Box_::into_raw(f),
4308            )
4309        }
4310    }
4311}
4312
4313impl<O: IsA<Entry>> EntryExt for O {}