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
1804mod sealed {
1805    pub trait Sealed {}
1806    impl<T: super::IsA<super::Entry>> Sealed for T {}
1807}
1808
1809/// Trait containing all [`struct@Entry`] methods.
1810///
1811/// # Implementors
1812///
1813/// [`Entry`][struct@crate::Entry]
1814pub trait EntryExt: IsA<Entry> + sealed::Sealed + 'static {
1815    /// Retrieves the value set by gtk_entry_set_activates_default().
1816    ///
1817    /// # Returns
1818    ///
1819    /// [`true`] if the entry will activate the default widget
1820    #[doc(alias = "gtk_entry_get_activates_default")]
1821    #[doc(alias = "get_activates_default")]
1822    #[doc(alias = "activates-default")]
1823    fn activates_default(&self) -> bool {
1824        unsafe {
1825            from_glib(ffi::gtk_entry_get_activates_default(
1826                self.as_ref().to_glib_none().0,
1827            ))
1828        }
1829    }
1830
1831    /// Gets the value set by gtk_entry_set_alignment().
1832    ///
1833    /// See also: [`xalign`][struct@crate::Editable#xalign]
1834    ///
1835    /// # Returns
1836    ///
1837    /// the alignment
1838    #[doc(alias = "gtk_entry_get_alignment")]
1839    #[doc(alias = "get_alignment")]
1840    fn alignment(&self) -> f32 {
1841        unsafe { ffi::gtk_entry_get_alignment(self.as_ref().to_glib_none().0) }
1842    }
1843
1844    /// Gets the attribute list of the [`Entry`][crate::Entry].
1845    ///
1846    /// See [`set_attributes()`][Self::set_attributes()].
1847    ///
1848    /// # Returns
1849    ///
1850    /// the attribute list
1851    #[doc(alias = "gtk_entry_get_attributes")]
1852    #[doc(alias = "get_attributes")]
1853    fn attributes(&self) -> Option<pango::AttrList> {
1854        unsafe {
1855            from_glib_none(ffi::gtk_entry_get_attributes(
1856                self.as_ref().to_glib_none().0,
1857            ))
1858        }
1859    }
1860
1861    /// Get the [`EntryBuffer`][crate::EntryBuffer] object which holds the text for
1862    /// this widget.
1863    ///
1864    /// # Returns
1865    ///
1866    /// A [`EntryBuffer`][crate::EntryBuffer] object.
1867    #[doc(alias = "gtk_entry_get_buffer")]
1868    #[doc(alias = "get_buffer")]
1869    fn buffer(&self) -> EntryBuffer {
1870        unsafe { from_glib_none(ffi::gtk_entry_get_buffer(self.as_ref().to_glib_none().0)) }
1871    }
1872
1873    /// Returns the auxiliary completion object currently
1874    /// in use by @self.
1875    ///
1876    /// # Deprecated since 4.10
1877    ///
1878    /// GtkEntryCompletion will be removed in GTK 5.
1879    ///
1880    /// # Returns
1881    ///
1882    /// The auxiliary
1883    ///   completion object currently in use by @self
1884    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1885    #[allow(deprecated)]
1886    #[doc(alias = "gtk_entry_get_completion")]
1887    #[doc(alias = "get_completion")]
1888    fn completion(&self) -> Option<EntryCompletion> {
1889        unsafe {
1890            from_glib_none(ffi::gtk_entry_get_completion(
1891                self.as_ref().to_glib_none().0,
1892            ))
1893        }
1894    }
1895
1896    /// Returns the index of the icon which is the source of the
1897    /// current  DND operation, or -1.
1898    ///
1899    /// # Returns
1900    ///
1901    /// index of the icon which is the source of the
1902    ///   current DND operation, or -1.
1903    #[doc(alias = "gtk_entry_get_current_icon_drag_source")]
1904    #[doc(alias = "get_current_icon_drag_source")]
1905    fn current_icon_drag_source(&self) -> i32 {
1906        unsafe { ffi::gtk_entry_get_current_icon_drag_source(self.as_ref().to_glib_none().0) }
1907    }
1908
1909    /// Gets the menu model set with gtk_entry_set_extra_menu().
1910    ///
1911    /// # Returns
1912    ///
1913    /// the menu model
1914    #[doc(alias = "gtk_entry_get_extra_menu")]
1915    #[doc(alias = "get_extra_menu")]
1916    #[doc(alias = "extra-menu")]
1917    fn extra_menu(&self) -> Option<gio::MenuModel> {
1918        unsafe {
1919            from_glib_none(ffi::gtk_entry_get_extra_menu(
1920                self.as_ref().to_glib_none().0,
1921            ))
1922        }
1923    }
1924
1925    /// Gets the value set by gtk_entry_set_has_frame().
1926    ///
1927    /// # Returns
1928    ///
1929    /// whether the entry has a beveled frame
1930    #[doc(alias = "gtk_entry_get_has_frame")]
1931    #[doc(alias = "get_has_frame")]
1932    #[doc(alias = "has-frame")]
1933    fn has_frame(&self) -> bool {
1934        unsafe { from_glib(ffi::gtk_entry_get_has_frame(self.as_ref().to_glib_none().0)) }
1935    }
1936
1937    /// Returns whether the icon is activatable.
1938    /// ## `icon_pos`
1939    /// Icon position
1940    ///
1941    /// # Returns
1942    ///
1943    /// [`true`] if the icon is activatable.
1944    #[doc(alias = "gtk_entry_get_icon_activatable")]
1945    #[doc(alias = "get_icon_activatable")]
1946    fn icon_is_activatable(&self, icon_pos: EntryIconPosition) -> bool {
1947        unsafe {
1948            from_glib(ffi::gtk_entry_get_icon_activatable(
1949                self.as_ref().to_glib_none().0,
1950                icon_pos.into_glib(),
1951            ))
1952        }
1953    }
1954
1955    /// Gets the area where entry’s icon at @icon_pos is drawn.
1956    ///
1957    /// This function is useful when drawing something to the
1958    /// entry in a draw callback.
1959    ///
1960    /// If the entry is not realized or has no icon at the given
1961    /// position, @icon_area is filled with zeros. Otherwise,
1962    /// @icon_area will be filled with the icon's allocation,
1963    /// relative to @self's allocation.
1964    /// ## `icon_pos`
1965    /// Icon position
1966    ///
1967    /// # Returns
1968    ///
1969    ///
1970    /// ## `icon_area`
1971    /// Return location for the icon’s area
1972    #[doc(alias = "gtk_entry_get_icon_area")]
1973    #[doc(alias = "get_icon_area")]
1974    fn icon_area(&self, icon_pos: EntryIconPosition) -> gdk::Rectangle {
1975        unsafe {
1976            let mut icon_area = gdk::Rectangle::uninitialized();
1977            ffi::gtk_entry_get_icon_area(
1978                self.as_ref().to_glib_none().0,
1979                icon_pos.into_glib(),
1980                icon_area.to_glib_none_mut().0,
1981            );
1982            icon_area
1983        }
1984    }
1985
1986    /// Finds the icon at the given position and return its index.
1987    ///
1988    /// The position’s coordinates are relative to the @self’s
1989    /// top left corner. If @x, @y doesn’t lie inside an icon,
1990    /// -1 is returned. This function is intended for use in a
1991    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] signal handler.
1992    /// ## `x`
1993    /// the x coordinate of the position to find, relative to @self
1994    /// ## `y`
1995    /// the y coordinate of the position to find, relative to @self
1996    ///
1997    /// # Returns
1998    ///
1999    /// the index of the icon at the given position, or -1
2000    #[doc(alias = "gtk_entry_get_icon_at_pos")]
2001    #[doc(alias = "get_icon_at_pos")]
2002    fn icon_at_pos(&self, x: i32, y: i32) -> i32 {
2003        unsafe { ffi::gtk_entry_get_icon_at_pos(self.as_ref().to_glib_none().0, x, y) }
2004    }
2005
2006    /// Retrieves the `GIcon` used for the icon.
2007    ///
2008    /// [`None`] will be returned if there is no icon or if the icon was
2009    /// set by some other method (e.g., by [`gdk::Paintable`][crate::gdk::Paintable] or icon name).
2010    /// ## `icon_pos`
2011    /// Icon position
2012    ///
2013    /// # Returns
2014    ///
2015    /// A `GIcon`
2016    #[doc(alias = "gtk_entry_get_icon_gicon")]
2017    #[doc(alias = "get_icon_gicon")]
2018    fn icon_gicon(&self, icon_pos: EntryIconPosition) -> Option<gio::Icon> {
2019        unsafe {
2020            from_glib_none(ffi::gtk_entry_get_icon_gicon(
2021                self.as_ref().to_glib_none().0,
2022                icon_pos.into_glib(),
2023            ))
2024        }
2025    }
2026
2027    /// Retrieves the icon name used for the icon.
2028    ///
2029    /// [`None`] is returned if there is no icon or if the icon was set
2030    /// by some other method (e.g., by [`gdk::Paintable`][crate::gdk::Paintable] or gicon).
2031    /// ## `icon_pos`
2032    /// Icon position
2033    ///
2034    /// # Returns
2035    ///
2036    /// An icon name
2037    #[doc(alias = "gtk_entry_get_icon_name")]
2038    #[doc(alias = "get_icon_name")]
2039    fn icon_name(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
2040        unsafe {
2041            from_glib_none(ffi::gtk_entry_get_icon_name(
2042                self.as_ref().to_glib_none().0,
2043                icon_pos.into_glib(),
2044            ))
2045        }
2046    }
2047
2048    /// Retrieves the [`gdk::Paintable`][crate::gdk::Paintable] used for the icon.
2049    ///
2050    /// If no [`gdk::Paintable`][crate::gdk::Paintable] was used for the icon, [`None`] is returned.
2051    /// ## `icon_pos`
2052    /// Icon position
2053    ///
2054    /// # Returns
2055    ///
2056    /// A [`gdk::Paintable`][crate::gdk::Paintable]
2057    ///   if no icon is set for this position or the icon set is not
2058    ///   a [`gdk::Paintable`][crate::gdk::Paintable].
2059    #[doc(alias = "gtk_entry_get_icon_paintable")]
2060    #[doc(alias = "get_icon_paintable")]
2061    fn icon_paintable(&self, icon_pos: EntryIconPosition) -> Option<gdk::Paintable> {
2062        unsafe {
2063            from_glib_none(ffi::gtk_entry_get_icon_paintable(
2064                self.as_ref().to_glib_none().0,
2065                icon_pos.into_glib(),
2066            ))
2067        }
2068    }
2069
2070    /// Returns whether the icon appears sensitive or insensitive.
2071    /// ## `icon_pos`
2072    /// Icon position
2073    ///
2074    /// # Returns
2075    ///
2076    /// [`true`] if the icon is sensitive.
2077    #[doc(alias = "gtk_entry_get_icon_sensitive")]
2078    #[doc(alias = "get_icon_sensitive")]
2079    fn icon_is_sensitive(&self, icon_pos: EntryIconPosition) -> bool {
2080        unsafe {
2081            from_glib(ffi::gtk_entry_get_icon_sensitive(
2082                self.as_ref().to_glib_none().0,
2083                icon_pos.into_glib(),
2084            ))
2085        }
2086    }
2087
2088    /// Gets the type of representation being used by the icon
2089    /// to store image data.
2090    ///
2091    /// If the icon has no image data, the return value will
2092    /// be [`ImageType::Empty`][crate::ImageType::Empty].
2093    /// ## `icon_pos`
2094    /// Icon position
2095    ///
2096    /// # Returns
2097    ///
2098    /// image representation being used
2099    #[doc(alias = "gtk_entry_get_icon_storage_type")]
2100    #[doc(alias = "get_icon_storage_type")]
2101    fn icon_storage_type(&self, icon_pos: EntryIconPosition) -> ImageType {
2102        unsafe {
2103            from_glib(ffi::gtk_entry_get_icon_storage_type(
2104                self.as_ref().to_glib_none().0,
2105                icon_pos.into_glib(),
2106            ))
2107        }
2108    }
2109
2110    /// Gets the contents of the tooltip on the icon at the specified
2111    /// position in @self.
2112    /// ## `icon_pos`
2113    /// the icon position
2114    ///
2115    /// # Returns
2116    ///
2117    /// the tooltip text
2118    #[doc(alias = "gtk_entry_get_icon_tooltip_markup")]
2119    #[doc(alias = "get_icon_tooltip_markup")]
2120    fn icon_tooltip_markup(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
2121        unsafe {
2122            from_glib_full(ffi::gtk_entry_get_icon_tooltip_markup(
2123                self.as_ref().to_glib_none().0,
2124                icon_pos.into_glib(),
2125            ))
2126        }
2127    }
2128
2129    /// Gets the contents of the tooltip on the icon at the specified
2130    /// position in @self.
2131    /// ## `icon_pos`
2132    /// the icon position
2133    ///
2134    /// # Returns
2135    ///
2136    /// the tooltip text
2137    #[doc(alias = "gtk_entry_get_icon_tooltip_text")]
2138    #[doc(alias = "get_icon_tooltip_text")]
2139    fn icon_tooltip_text(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
2140        unsafe {
2141            from_glib_full(ffi::gtk_entry_get_icon_tooltip_text(
2142                self.as_ref().to_glib_none().0,
2143                icon_pos.into_glib(),
2144            ))
2145        }
2146    }
2147
2148    /// Gets the input hints of this [`Entry`][crate::Entry].
2149    ///
2150    /// # Returns
2151    ///
2152    /// the input hints
2153    #[doc(alias = "gtk_entry_get_input_hints")]
2154    #[doc(alias = "get_input_hints")]
2155    #[doc(alias = "input-hints")]
2156    fn input_hints(&self) -> InputHints {
2157        unsafe {
2158            from_glib(ffi::gtk_entry_get_input_hints(
2159                self.as_ref().to_glib_none().0,
2160            ))
2161        }
2162    }
2163
2164    /// Gets the input purpose of the [`Entry`][crate::Entry].
2165    ///
2166    /// # Returns
2167    ///
2168    /// the input purpose
2169    #[doc(alias = "gtk_entry_get_input_purpose")]
2170    #[doc(alias = "get_input_purpose")]
2171    #[doc(alias = "input-purpose")]
2172    fn input_purpose(&self) -> InputPurpose {
2173        unsafe {
2174            from_glib(ffi::gtk_entry_get_input_purpose(
2175                self.as_ref().to_glib_none().0,
2176            ))
2177        }
2178    }
2179
2180    /// Retrieves the maximum allowed length of the text in @self.
2181    ///
2182    /// See [`set_max_length()`][Self::set_max_length()].
2183    ///
2184    /// # Returns
2185    ///
2186    /// the maximum allowed number of characters
2187    ///   in [`Entry`][crate::Entry], or 0 if there is no maximum.
2188    #[doc(alias = "gtk_entry_get_max_length")]
2189    #[doc(alias = "get_max_length")]
2190    #[doc(alias = "max-length")]
2191    fn max_length(&self) -> i32 {
2192        unsafe { ffi::gtk_entry_get_max_length(self.as_ref().to_glib_none().0) }
2193    }
2194
2195    /// Gets whether the [`Entry`][crate::Entry] is in overwrite mode.
2196    ///
2197    /// # Returns
2198    ///
2199    /// whether the text is overwritten when typing.
2200    #[doc(alias = "gtk_entry_get_overwrite_mode")]
2201    #[doc(alias = "get_overwrite_mode")]
2202    #[doc(alias = "overwrite-mode")]
2203    fn is_overwrite_mode(&self) -> bool {
2204        unsafe {
2205            from_glib(ffi::gtk_entry_get_overwrite_mode(
2206                self.as_ref().to_glib_none().0,
2207            ))
2208        }
2209    }
2210
2211    /// Retrieves the text that will be displayed when @self
2212    /// is empty and unfocused
2213    ///
2214    /// # Returns
2215    ///
2216    /// a pointer to the
2217    ///   placeholder text as a string. This string points to
2218    ///   internally allocated storage in the widget and must
2219    ///   not be freed, modified or stored. If no placeholder
2220    ///   text has been set, [`None`] will be returned.
2221    #[doc(alias = "gtk_entry_get_placeholder_text")]
2222    #[doc(alias = "get_placeholder_text")]
2223    #[doc(alias = "placeholder-text")]
2224    fn placeholder_text(&self) -> Option<glib::GString> {
2225        unsafe {
2226            from_glib_none(ffi::gtk_entry_get_placeholder_text(
2227                self.as_ref().to_glib_none().0,
2228            ))
2229        }
2230    }
2231
2232    /// Returns the current fraction of the task that’s been completed.
2233    ///
2234    /// See [`set_progress_fraction()`][Self::set_progress_fraction()].
2235    ///
2236    /// # Returns
2237    ///
2238    /// a fraction from 0.0 to 1.0
2239    #[doc(alias = "gtk_entry_get_progress_fraction")]
2240    #[doc(alias = "get_progress_fraction")]
2241    #[doc(alias = "progress-fraction")]
2242    fn progress_fraction(&self) -> f64 {
2243        unsafe { ffi::gtk_entry_get_progress_fraction(self.as_ref().to_glib_none().0) }
2244    }
2245
2246    /// Retrieves the pulse step set with
2247    /// gtk_entry_set_progress_pulse_step().
2248    ///
2249    /// # Returns
2250    ///
2251    /// a fraction from 0.0 to 1.0
2252    #[doc(alias = "gtk_entry_get_progress_pulse_step")]
2253    #[doc(alias = "get_progress_pulse_step")]
2254    #[doc(alias = "progress-pulse-step")]
2255    fn progress_pulse_step(&self) -> f64 {
2256        unsafe { ffi::gtk_entry_get_progress_pulse_step(self.as_ref().to_glib_none().0) }
2257    }
2258
2259    /// Gets the tabstops of the [`Entry`][crate::Entry].
2260    ///
2261    /// See [`set_tabs()`][Self::set_tabs()].
2262    ///
2263    /// # Returns
2264    ///
2265    /// the tabstops
2266    #[doc(alias = "gtk_entry_get_tabs")]
2267    #[doc(alias = "get_tabs")]
2268    fn tabs(&self) -> Option<pango::TabArray> {
2269        unsafe { from_glib_none(ffi::gtk_entry_get_tabs(self.as_ref().to_glib_none().0)) }
2270    }
2271
2272    /// Retrieves the current length of the text in @self.
2273    ///
2274    /// This is equivalent to getting @self's [`EntryBuffer`][crate::EntryBuffer]
2275    /// and calling [`EntryBufferExtManual::length()`][crate::prelude::EntryBufferExtManual::length()] on it.
2276    ///
2277    /// # Returns
2278    ///
2279    /// the current number of characters
2280    ///   in [`Entry`][crate::Entry], or 0 if there are none.
2281    #[doc(alias = "gtk_entry_get_text_length")]
2282    #[doc(alias = "get_text_length")]
2283    #[doc(alias = "text-length")]
2284    fn text_length(&self) -> u16 {
2285        unsafe { ffi::gtk_entry_get_text_length(self.as_ref().to_glib_none().0) }
2286    }
2287
2288    /// Retrieves whether the text in @self is visible.
2289    ///
2290    /// See [`set_visibility()`][Self::set_visibility()].
2291    ///
2292    /// # Returns
2293    ///
2294    /// [`true`] if the text is currently visible
2295    #[doc(alias = "gtk_entry_get_visibility")]
2296    #[doc(alias = "get_visibility")]
2297    #[doc(alias = "visibility")]
2298    fn is_visible(&self) -> bool {
2299        unsafe {
2300            from_glib(ffi::gtk_entry_get_visibility(
2301                self.as_ref().to_glib_none().0,
2302            ))
2303        }
2304    }
2305
2306    /// Causes @self to have keyboard focus.
2307    ///
2308    /// It behaves like [`WidgetExt::grab_focus()`][crate::prelude::WidgetExt::grab_focus()], except that it doesn't
2309    /// select the contents of the entry. You only want to call this on some
2310    /// special entries which the user usually doesn't want to replace all text
2311    /// in, such as search-as-you-type entries.
2312    ///
2313    /// # Returns
2314    ///
2315    /// [`true`] if focus is now inside @self_
2316    #[doc(alias = "gtk_entry_grab_focus_without_selecting")]
2317    fn grab_focus_without_selecting(&self) -> bool {
2318        unsafe {
2319            from_glib(ffi::gtk_entry_grab_focus_without_selecting(
2320                self.as_ref().to_glib_none().0,
2321            ))
2322        }
2323    }
2324
2325    /// Indicates that some progress is made, but you don’t
2326    /// know how much.
2327    ///
2328    /// Causes the entry’s progress indicator to enter “activity
2329    /// mode”, where a block bounces back and forth. Each call to
2330    /// gtk_entry_progress_pulse() causes the block to move by a
2331    /// little bit (the amount of movement per pulse is determined
2332    /// by [`set_progress_pulse_step()`][Self::set_progress_pulse_step()]).
2333    #[doc(alias = "gtk_entry_progress_pulse")]
2334    fn progress_pulse(&self) {
2335        unsafe {
2336            ffi::gtk_entry_progress_pulse(self.as_ref().to_glib_none().0);
2337        }
2338    }
2339
2340    /// Reset the input method context of the entry if needed.
2341    ///
2342    /// This can be necessary in the case where modifying the buffer
2343    /// would confuse on-going input method behavior.
2344    #[doc(alias = "gtk_entry_reset_im_context")]
2345    fn reset_im_context(&self) {
2346        unsafe {
2347            ffi::gtk_entry_reset_im_context(self.as_ref().to_glib_none().0);
2348        }
2349    }
2350
2351    /// Sets whether pressing Enter in the @self will activate the default
2352    /// widget for the window containing the entry.
2353    ///
2354    /// This usually means that the dialog containing the entry will be closed,
2355    /// since the default widget is usually one of the dialog buttons.
2356    /// ## `setting`
2357    /// [`true`] to activate window’s default widget on Enter keypress
2358    #[doc(alias = "gtk_entry_set_activates_default")]
2359    #[doc(alias = "activates-default")]
2360    fn set_activates_default(&self, setting: bool) {
2361        unsafe {
2362            ffi::gtk_entry_set_activates_default(
2363                self.as_ref().to_glib_none().0,
2364                setting.into_glib(),
2365            );
2366        }
2367    }
2368
2369    /// Sets the alignment for the contents of the entry.
2370    ///
2371    /// This controls the horizontal positioning of the contents when
2372    /// the displayed text is shorter than the width of the entry.
2373    ///
2374    /// See also: [`xalign`][struct@crate::Editable#xalign]
2375    /// ## `xalign`
2376    /// The horizontal alignment, from 0 (left) to 1 (right).
2377    ///   Reversed for RTL layouts
2378    #[doc(alias = "gtk_entry_set_alignment")]
2379    fn set_alignment(&self, xalign: f32) {
2380        unsafe {
2381            ffi::gtk_entry_set_alignment(self.as_ref().to_glib_none().0, xalign);
2382        }
2383    }
2384
2385    /// Sets a [`pango::AttrList`][crate::pango::AttrList].
2386    ///
2387    /// The attributes in the list are applied to the entry text.
2388    ///
2389    /// Since the attributes will be applied to text that changes
2390    /// as the user types, it makes most sense to use attributes
2391    /// with unlimited extent.
2392    /// ## `attrs`
2393    /// a [`pango::AttrList`][crate::pango::AttrList]
2394    #[doc(alias = "gtk_entry_set_attributes")]
2395    #[doc(alias = "attributes")]
2396    fn set_attributes(&self, attrs: &pango::AttrList) {
2397        unsafe {
2398            ffi::gtk_entry_set_attributes(self.as_ref().to_glib_none().0, attrs.to_glib_none().0);
2399        }
2400    }
2401
2402    /// Set the [`EntryBuffer`][crate::EntryBuffer] object which holds the text for
2403    /// this widget.
2404    /// ## `buffer`
2405    /// a [`EntryBuffer`][crate::EntryBuffer]
2406    #[doc(alias = "gtk_entry_set_buffer")]
2407    #[doc(alias = "buffer")]
2408    fn set_buffer(&self, buffer: &impl IsA<EntryBuffer>) {
2409        unsafe {
2410            ffi::gtk_entry_set_buffer(
2411                self.as_ref().to_glib_none().0,
2412                buffer.as_ref().to_glib_none().0,
2413            );
2414        }
2415    }
2416
2417    /// Sets @completion to be the auxiliary completion object
2418    /// to use with @self.
2419    ///
2420    /// All further configuration of the completion mechanism is
2421    /// done on @completion using the [`EntryCompletion`][crate::EntryCompletion] API.
2422    /// Completion is disabled if @completion is set to [`None`].
2423    ///
2424    /// # Deprecated since 4.10
2425    ///
2426    /// GtkEntryCompletion will be removed in GTK 5.
2427    /// ## `completion`
2428    /// The [`EntryCompletion`][crate::EntryCompletion]
2429    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
2430    #[allow(deprecated)]
2431    #[doc(alias = "gtk_entry_set_completion")]
2432    #[doc(alias = "completion")]
2433    fn set_completion(&self, completion: Option<&EntryCompletion>) {
2434        unsafe {
2435            ffi::gtk_entry_set_completion(
2436                self.as_ref().to_glib_none().0,
2437                completion.to_glib_none().0,
2438            );
2439        }
2440    }
2441
2442    /// Sets a menu model to add when constructing
2443    /// the context menu for @self.
2444    /// ## `model`
2445    /// a `GMenuModel`
2446    #[doc(alias = "gtk_entry_set_extra_menu")]
2447    #[doc(alias = "extra-menu")]
2448    fn set_extra_menu(&self, model: Option<&impl IsA<gio::MenuModel>>) {
2449        unsafe {
2450            ffi::gtk_entry_set_extra_menu(
2451                self.as_ref().to_glib_none().0,
2452                model.map(|p| p.as_ref()).to_glib_none().0,
2453            );
2454        }
2455    }
2456
2457    /// Sets whether the entry has a beveled frame around it.
2458    /// ## `setting`
2459    /// new value
2460    #[doc(alias = "gtk_entry_set_has_frame")]
2461    #[doc(alias = "has-frame")]
2462    fn set_has_frame(&self, setting: bool) {
2463        unsafe {
2464            ffi::gtk_entry_set_has_frame(self.as_ref().to_glib_none().0, setting.into_glib());
2465        }
2466    }
2467
2468    /// Sets whether the icon is activatable.
2469    /// ## `icon_pos`
2470    /// Icon position
2471    /// ## `activatable`
2472    /// [`true`] if the icon should be activatable
2473    #[doc(alias = "gtk_entry_set_icon_activatable")]
2474    fn set_icon_activatable(&self, icon_pos: EntryIconPosition, activatable: bool) {
2475        unsafe {
2476            ffi::gtk_entry_set_icon_activatable(
2477                self.as_ref().to_glib_none().0,
2478                icon_pos.into_glib(),
2479                activatable.into_glib(),
2480            );
2481        }
2482    }
2483
2484    /// Sets up the icon at the given position as drag source.
2485    ///
2486    /// This makes it so that GTK will start a drag
2487    /// operation when the user clicks and drags the icon.
2488    /// ## `icon_pos`
2489    /// icon position
2490    /// ## `provider`
2491    /// a [`gdk::ContentProvider`][crate::gdk::ContentProvider]
2492    /// ## `actions`
2493    /// a bitmask of the allowed drag actions
2494    #[doc(alias = "gtk_entry_set_icon_drag_source")]
2495    fn set_icon_drag_source(
2496        &self,
2497        icon_pos: EntryIconPosition,
2498        provider: &impl IsA<gdk::ContentProvider>,
2499        actions: gdk::DragAction,
2500    ) {
2501        unsafe {
2502            ffi::gtk_entry_set_icon_drag_source(
2503                self.as_ref().to_glib_none().0,
2504                icon_pos.into_glib(),
2505                provider.as_ref().to_glib_none().0,
2506                actions.into_glib(),
2507            );
2508        }
2509    }
2510
2511    /// Sets the icon shown in the entry at the specified position
2512    /// from the current icon theme.
2513    ///
2514    /// If the icon isn’t known, a “broken image” icon will be
2515    /// displayed instead.
2516    ///
2517    /// If @icon is [`None`], no icon will be shown in the
2518    /// specified position.
2519    /// ## `icon_pos`
2520    /// The position at which to set the icon
2521    /// ## `icon`
2522    /// The icon to set
2523    #[doc(alias = "gtk_entry_set_icon_from_gicon")]
2524    fn set_icon_from_gicon(&self, icon_pos: EntryIconPosition, icon: Option<&impl IsA<gio::Icon>>) {
2525        unsafe {
2526            ffi::gtk_entry_set_icon_from_gicon(
2527                self.as_ref().to_glib_none().0,
2528                icon_pos.into_glib(),
2529                icon.map(|p| p.as_ref()).to_glib_none().0,
2530            );
2531        }
2532    }
2533
2534    /// Sets the icon shown in the entry at the specified position
2535    /// from the current icon theme.
2536    ///
2537    /// If the icon name isn’t known, a “broken image” icon will be
2538    /// displayed instead.
2539    ///
2540    /// If @icon_name is [`None`], no icon will be shown in the
2541    /// specified position.
2542    /// ## `icon_pos`
2543    /// The position at which to set the icon
2544    /// ## `icon_name`
2545    /// An icon name
2546    #[doc(alias = "gtk_entry_set_icon_from_icon_name")]
2547    fn set_icon_from_icon_name(&self, icon_pos: EntryIconPosition, icon_name: Option<&str>) {
2548        unsafe {
2549            ffi::gtk_entry_set_icon_from_icon_name(
2550                self.as_ref().to_glib_none().0,
2551                icon_pos.into_glib(),
2552                icon_name.to_glib_none().0,
2553            );
2554        }
2555    }
2556
2557    /// Sets the icon shown in the specified position using a [`gdk::Paintable`][crate::gdk::Paintable].
2558    ///
2559    /// If @paintable is [`None`], no icon will be shown in the specified position.
2560    /// ## `icon_pos`
2561    /// Icon position
2562    /// ## `paintable`
2563    /// A [`gdk::Paintable`][crate::gdk::Paintable]
2564    #[doc(alias = "gtk_entry_set_icon_from_paintable")]
2565    fn set_icon_from_paintable(
2566        &self,
2567        icon_pos: EntryIconPosition,
2568        paintable: Option<&impl IsA<gdk::Paintable>>,
2569    ) {
2570        unsafe {
2571            ffi::gtk_entry_set_icon_from_paintable(
2572                self.as_ref().to_glib_none().0,
2573                icon_pos.into_glib(),
2574                paintable.map(|p| p.as_ref()).to_glib_none().0,
2575            );
2576        }
2577    }
2578
2579    /// Sets the sensitivity for the specified icon.
2580    /// ## `icon_pos`
2581    /// Icon position
2582    /// ## `sensitive`
2583    /// Specifies whether the icon should appear
2584    ///   sensitive or insensitive
2585    #[doc(alias = "gtk_entry_set_icon_sensitive")]
2586    fn set_icon_sensitive(&self, icon_pos: EntryIconPosition, sensitive: bool) {
2587        unsafe {
2588            ffi::gtk_entry_set_icon_sensitive(
2589                self.as_ref().to_glib_none().0,
2590                icon_pos.into_glib(),
2591                sensitive.into_glib(),
2592            );
2593        }
2594    }
2595
2596    /// Sets @tooltip as the contents of the tooltip for the icon at
2597    /// the specified position.
2598    ///
2599    /// @tooltip is assumed to be marked up with Pango Markup.
2600    ///
2601    /// Use [`None`] for @tooltip to remove an existing tooltip.
2602    ///
2603    /// See also [`WidgetExt::set_tooltip_markup()`][crate::prelude::WidgetExt::set_tooltip_markup()] and
2604    /// [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
2605    /// ## `icon_pos`
2606    /// the icon position
2607    /// ## `tooltip`
2608    /// the contents of the tooltip for the icon
2609    #[doc(alias = "gtk_entry_set_icon_tooltip_markup")]
2610    fn set_icon_tooltip_markup(&self, icon_pos: EntryIconPosition, tooltip: Option<&str>) {
2611        unsafe {
2612            ffi::gtk_entry_set_icon_tooltip_markup(
2613                self.as_ref().to_glib_none().0,
2614                icon_pos.into_glib(),
2615                tooltip.to_glib_none().0,
2616            );
2617        }
2618    }
2619
2620    /// Sets @tooltip as the contents of the tooltip for the icon
2621    /// at the specified position.
2622    ///
2623    /// Use [`None`] for @tooltip to remove an existing tooltip.
2624    ///
2625    /// See also [`WidgetExt::set_tooltip_text()`][crate::prelude::WidgetExt::set_tooltip_text()] and
2626    /// [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
2627    ///
2628    /// If you unset the widget tooltip via
2629    /// [`WidgetExt::set_tooltip_text()`][crate::prelude::WidgetExt::set_tooltip_text()] or
2630    /// [`WidgetExt::set_tooltip_markup()`][crate::prelude::WidgetExt::set_tooltip_markup()], this sets
2631    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] to [`false`], which suppresses
2632    /// icon tooltips too. You can resolve this by then calling
2633    /// [`WidgetExt::set_has_tooltip()`][crate::prelude::WidgetExt::set_has_tooltip()] to set
2634    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] back to [`true`], or
2635    /// setting at least one non-empty tooltip on any icon
2636    /// achieves the same result.
2637    /// ## `icon_pos`
2638    /// the icon position
2639    /// ## `tooltip`
2640    /// the contents of the tooltip for the icon
2641    #[doc(alias = "gtk_entry_set_icon_tooltip_text")]
2642    fn set_icon_tooltip_text(&self, icon_pos: EntryIconPosition, tooltip: Option<&str>) {
2643        unsafe {
2644            ffi::gtk_entry_set_icon_tooltip_text(
2645                self.as_ref().to_glib_none().0,
2646                icon_pos.into_glib(),
2647                tooltip.to_glib_none().0,
2648            );
2649        }
2650    }
2651
2652    /// Set additional hints which allow input methods to
2653    /// fine-tune their behavior.
2654    /// ## `hints`
2655    /// the hints
2656    #[doc(alias = "gtk_entry_set_input_hints")]
2657    #[doc(alias = "input-hints")]
2658    fn set_input_hints(&self, hints: InputHints) {
2659        unsafe {
2660            ffi::gtk_entry_set_input_hints(self.as_ref().to_glib_none().0, hints.into_glib());
2661        }
2662    }
2663
2664    /// Sets the input purpose which can be used by input methods
2665    /// to adjust their behavior.
2666    /// ## `purpose`
2667    /// the purpose
2668    #[doc(alias = "gtk_entry_set_input_purpose")]
2669    #[doc(alias = "input-purpose")]
2670    fn set_input_purpose(&self, purpose: InputPurpose) {
2671        unsafe {
2672            ffi::gtk_entry_set_input_purpose(self.as_ref().to_glib_none().0, purpose.into_glib());
2673        }
2674    }
2675
2676    /// Sets the character to use in place of the actual text
2677    /// in “password mode”.
2678    ///
2679    /// See [`set_visibility()`][Self::set_visibility()] for how to enable
2680    /// “password mode”.
2681    ///
2682    /// By default, GTK picks the best invisible char available in
2683    /// the current font. If you set the invisible char to 0, then
2684    /// the user will get no feedback at all; there will be no text
2685    /// on the screen as they type.
2686    /// ## `ch`
2687    /// a Unicode character
2688    #[doc(alias = "gtk_entry_set_invisible_char")]
2689    #[doc(alias = "invisible-char")]
2690    fn set_invisible_char(&self, ch: Option<char>) {
2691        unsafe {
2692            ffi::gtk_entry_set_invisible_char(self.as_ref().to_glib_none().0, ch.into_glib());
2693        }
2694    }
2695
2696    /// Sets the maximum allowed length of the contents of the widget.
2697    ///
2698    /// If the current contents are longer than the given length, then
2699    /// they will be truncated to fit. The length is in characters.
2700    ///
2701    /// This is equivalent to getting @self's [`EntryBuffer`][crate::EntryBuffer] and
2702    /// calling [`EntryBufferExtManual::set_max_length()`][crate::prelude::EntryBufferExtManual::set_max_length()] on it.
2703    /// ## `max`
2704    /// the maximum length of the entry, or 0 for no maximum.
2705    ///   (other than the maximum length of entries.) The value passed in will
2706    ///   be clamped to the range 0-65536.
2707    #[doc(alias = "gtk_entry_set_max_length")]
2708    #[doc(alias = "max-length")]
2709    fn set_max_length(&self, max: i32) {
2710        unsafe {
2711            ffi::gtk_entry_set_max_length(self.as_ref().to_glib_none().0, max);
2712        }
2713    }
2714
2715    /// Sets whether the text is overwritten when typing in the [`Entry`][crate::Entry].
2716    /// ## `overwrite`
2717    /// new value
2718    #[doc(alias = "gtk_entry_set_overwrite_mode")]
2719    #[doc(alias = "overwrite-mode")]
2720    fn set_overwrite_mode(&self, overwrite: bool) {
2721        unsafe {
2722            ffi::gtk_entry_set_overwrite_mode(
2723                self.as_ref().to_glib_none().0,
2724                overwrite.into_glib(),
2725            );
2726        }
2727    }
2728
2729    /// Sets text to be displayed in @self when it is empty.
2730    ///
2731    /// This can be used to give a visual hint of the expected
2732    /// contents of the [`Entry`][crate::Entry].
2733    /// ## `text`
2734    /// a string to be displayed when @self is empty and unfocused
2735    #[doc(alias = "gtk_entry_set_placeholder_text")]
2736    #[doc(alias = "placeholder-text")]
2737    fn set_placeholder_text(&self, text: Option<&str>) {
2738        unsafe {
2739            ffi::gtk_entry_set_placeholder_text(
2740                self.as_ref().to_glib_none().0,
2741                text.to_glib_none().0,
2742            );
2743        }
2744    }
2745
2746    /// Causes the entry’s progress indicator to “fill in” the given
2747    /// fraction of the bar.
2748    ///
2749    /// The fraction should be between 0.0 and 1.0, inclusive.
2750    /// ## `fraction`
2751    /// fraction of the task that’s been completed
2752    #[doc(alias = "gtk_entry_set_progress_fraction")]
2753    #[doc(alias = "progress-fraction")]
2754    fn set_progress_fraction(&self, fraction: f64) {
2755        unsafe {
2756            ffi::gtk_entry_set_progress_fraction(self.as_ref().to_glib_none().0, fraction);
2757        }
2758    }
2759
2760    /// Sets the fraction of total entry width to move the progress
2761    /// bouncing block for each pulse.
2762    ///
2763    /// Use [`progress_pulse()`][Self::progress_pulse()] to pulse
2764    /// the progress.
2765    /// ## `fraction`
2766    /// fraction between 0.0 and 1.0
2767    #[doc(alias = "gtk_entry_set_progress_pulse_step")]
2768    #[doc(alias = "progress-pulse-step")]
2769    fn set_progress_pulse_step(&self, fraction: f64) {
2770        unsafe {
2771            ffi::gtk_entry_set_progress_pulse_step(self.as_ref().to_glib_none().0, fraction);
2772        }
2773    }
2774
2775    /// Sets a [`pango::TabArray`][crate::pango::TabArray].
2776    ///
2777    /// The tabstops in the array are applied to the entry text.
2778    /// ## `tabs`
2779    /// a [`pango::TabArray`][crate::pango::TabArray]
2780    #[doc(alias = "gtk_entry_set_tabs")]
2781    #[doc(alias = "tabs")]
2782    fn set_tabs(&self, tabs: Option<&pango::TabArray>) {
2783        unsafe {
2784            ffi::gtk_entry_set_tabs(
2785                self.as_ref().to_glib_none().0,
2786                mut_override(tabs.to_glib_none().0),
2787            );
2788        }
2789    }
2790
2791    /// Sets whether the contents of the entry are visible or not.
2792    ///
2793    /// When visibility is set to [`false`], characters are displayed
2794    /// as the invisible char, and will also appear that way when
2795    /// the text in the entry widget is copied elsewhere.
2796    ///
2797    /// By default, GTK picks the best invisible character available
2798    /// in the current font, but it can be changed with
2799    /// [`set_invisible_char()`][Self::set_invisible_char()].
2800    ///
2801    /// Note that you probably want to set [`input-purpose`][struct@crate::Entry#input-purpose]
2802    /// to [`InputPurpose::Password`][crate::InputPurpose::Password] or [`InputPurpose::Pin`][crate::InputPurpose::Pin] to
2803    /// inform input methods about the purpose of this entry,
2804    /// in addition to setting visibility to [`false`].
2805    /// ## `visible`
2806    /// [`true`] if the contents of the entry are displayed as plaintext
2807    #[doc(alias = "gtk_entry_set_visibility")]
2808    #[doc(alias = "visibility")]
2809    fn set_visibility(&self, visible: bool) {
2810        unsafe {
2811            ffi::gtk_entry_set_visibility(self.as_ref().to_glib_none().0, visible.into_glib());
2812        }
2813    }
2814
2815    /// Unsets the invisible char, so that the default invisible char
2816    /// is used again. See [`set_invisible_char()`][Self::set_invisible_char()].
2817    #[doc(alias = "gtk_entry_unset_invisible_char")]
2818    fn unset_invisible_char(&self) {
2819        unsafe {
2820            ffi::gtk_entry_unset_invisible_char(self.as_ref().to_glib_none().0);
2821        }
2822    }
2823
2824    /// Whether to suggest Emoji replacements for :-delimited names
2825    /// like `:heart:`.
2826    #[doc(alias = "enable-emoji-completion")]
2827    fn enables_emoji_completion(&self) -> bool {
2828        ObjectExt::property(self.as_ref(), "enable-emoji-completion")
2829    }
2830
2831    /// Whether to suggest Emoji replacements for :-delimited names
2832    /// like `:heart:`.
2833    #[doc(alias = "enable-emoji-completion")]
2834    fn set_enable_emoji_completion(&self, enable_emoji_completion: bool) {
2835        ObjectExt::set_property(
2836            self.as_ref(),
2837            "enable-emoji-completion",
2838            enable_emoji_completion,
2839        )
2840    }
2841
2842    /// Which IM (input method) module should be used for this entry.
2843    ///
2844    /// See [`IMContext`][crate::IMContext].
2845    ///
2846    /// Setting this to a non-[`None`] value overrides the system-wide IM
2847    /// module setting. See the GtkSettings [`gtk-im-module`][struct@crate::Settings#gtk-im-module]
2848    /// property.
2849    #[doc(alias = "im-module")]
2850    fn im_module(&self) -> Option<glib::GString> {
2851        ObjectExt::property(self.as_ref(), "im-module")
2852    }
2853
2854    /// Which IM (input method) module should be used for this entry.
2855    ///
2856    /// See [`IMContext`][crate::IMContext].
2857    ///
2858    /// Setting this to a non-[`None`] value overrides the system-wide IM
2859    /// module setting. See the GtkSettings [`gtk-im-module`][struct@crate::Settings#gtk-im-module]
2860    /// property.
2861    #[doc(alias = "im-module")]
2862    fn set_im_module(&self, im_module: Option<&str>) {
2863        ObjectExt::set_property(self.as_ref(), "im-module", im_module)
2864    }
2865
2866    /// Whether the invisible char has been set for the [`Entry`][crate::Entry].
2867    #[doc(alias = "invisible-char-set")]
2868    fn is_invisible_char_set(&self) -> bool {
2869        ObjectExt::property(self.as_ref(), "invisible-char-set")
2870    }
2871
2872    /// Whether the primary icon is activatable.
2873    ///
2874    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
2875    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
2876    /// activatable icons.
2877    ///
2878    /// Sensitive, but non-activatable icons can be used for purely
2879    /// informational purposes.
2880    #[doc(alias = "primary-icon-activatable")]
2881    fn is_primary_icon_activatable(&self) -> bool {
2882        ObjectExt::property(self.as_ref(), "primary-icon-activatable")
2883    }
2884
2885    /// Whether the primary icon is activatable.
2886    ///
2887    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
2888    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
2889    /// activatable icons.
2890    ///
2891    /// Sensitive, but non-activatable icons can be used for purely
2892    /// informational purposes.
2893    #[doc(alias = "primary-icon-activatable")]
2894    fn set_primary_icon_activatable(&self, primary_icon_activatable: bool) {
2895        ObjectExt::set_property(
2896            self.as_ref(),
2897            "primary-icon-activatable",
2898            primary_icon_activatable,
2899        )
2900    }
2901
2902    /// The `GIcon` to use for the primary icon for the entry.
2903    #[doc(alias = "primary-icon-gicon")]
2904    fn primary_icon_gicon(&self) -> Option<gio::Icon> {
2905        ObjectExt::property(self.as_ref(), "primary-icon-gicon")
2906    }
2907
2908    /// The `GIcon` to use for the primary icon for the entry.
2909    #[doc(alias = "primary-icon-gicon")]
2910    fn set_primary_icon_gicon<P: IsA<gio::Icon>>(&self, primary_icon_gicon: Option<&P>) {
2911        ObjectExt::set_property(self.as_ref(), "primary-icon-gicon", primary_icon_gicon)
2912    }
2913
2914    /// The icon name to use for the primary icon for the entry.
2915    #[doc(alias = "primary-icon-name")]
2916    fn primary_icon_name(&self) -> Option<glib::GString> {
2917        ObjectExt::property(self.as_ref(), "primary-icon-name")
2918    }
2919
2920    /// The icon name to use for the primary icon for the entry.
2921    #[doc(alias = "primary-icon-name")]
2922    fn set_primary_icon_name(&self, primary_icon_name: Option<&str>) {
2923        ObjectExt::set_property(self.as_ref(), "primary-icon-name", primary_icon_name)
2924    }
2925
2926    /// A [`gdk::Paintable`][crate::gdk::Paintable] to use as the primary icon for the entry.
2927    #[doc(alias = "primary-icon-paintable")]
2928    fn primary_icon_paintable(&self) -> Option<gdk::Paintable> {
2929        ObjectExt::property(self.as_ref(), "primary-icon-paintable")
2930    }
2931
2932    /// A [`gdk::Paintable`][crate::gdk::Paintable] to use as the primary icon for the entry.
2933    #[doc(alias = "primary-icon-paintable")]
2934    fn set_primary_icon_paintable<P: IsA<gdk::Paintable>>(
2935        &self,
2936        primary_icon_paintable: Option<&P>,
2937    ) {
2938        ObjectExt::set_property(
2939            self.as_ref(),
2940            "primary-icon-paintable",
2941            primary_icon_paintable,
2942        )
2943    }
2944
2945    /// Whether the primary icon is sensitive.
2946    ///
2947    /// An insensitive icon appears grayed out. GTK does not emit the
2948    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
2949    /// signals and does not allow DND from insensitive icons.
2950    ///
2951    /// An icon should be set insensitive if the action that would trigger
2952    /// when clicked is currently not available.
2953    #[doc(alias = "primary-icon-sensitive")]
2954    fn is_primary_icon_sensitive(&self) -> bool {
2955        ObjectExt::property(self.as_ref(), "primary-icon-sensitive")
2956    }
2957
2958    /// Whether the primary icon is sensitive.
2959    ///
2960    /// An insensitive icon appears grayed out. GTK does not emit the
2961    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
2962    /// signals and does not allow DND from insensitive icons.
2963    ///
2964    /// An icon should be set insensitive if the action that would trigger
2965    /// when clicked is currently not available.
2966    #[doc(alias = "primary-icon-sensitive")]
2967    fn set_primary_icon_sensitive(&self, primary_icon_sensitive: bool) {
2968        ObjectExt::set_property(
2969            self.as_ref(),
2970            "primary-icon-sensitive",
2971            primary_icon_sensitive,
2972        )
2973    }
2974
2975    /// The representation which is used for the primary icon of the entry.
2976    #[doc(alias = "primary-icon-storage-type")]
2977    fn primary_icon_storage_type(&self) -> ImageType {
2978        ObjectExt::property(self.as_ref(), "primary-icon-storage-type")
2979    }
2980
2981    /// The contents of the tooltip on the primary icon, with markup.
2982    ///
2983    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
2984    #[doc(alias = "primary-icon-tooltip-markup")]
2985    fn primary_icon_tooltip_markup(&self) -> Option<glib::GString> {
2986        ObjectExt::property(self.as_ref(), "primary-icon-tooltip-markup")
2987    }
2988
2989    /// The contents of the tooltip on the primary icon, with markup.
2990    ///
2991    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
2992    #[doc(alias = "primary-icon-tooltip-markup")]
2993    fn set_primary_icon_tooltip_markup(&self, primary_icon_tooltip_markup: Option<&str>) {
2994        ObjectExt::set_property(
2995            self.as_ref(),
2996            "primary-icon-tooltip-markup",
2997            primary_icon_tooltip_markup,
2998        )
2999    }
3000
3001    /// The contents of the tooltip on the primary icon.
3002    ///
3003    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
3004    #[doc(alias = "primary-icon-tooltip-text")]
3005    fn primary_icon_tooltip_text(&self) -> Option<glib::GString> {
3006        ObjectExt::property(self.as_ref(), "primary-icon-tooltip-text")
3007    }
3008
3009    /// The contents of the tooltip on the primary icon.
3010    ///
3011    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
3012    #[doc(alias = "primary-icon-tooltip-text")]
3013    fn set_primary_icon_tooltip_text(&self, primary_icon_tooltip_text: Option<&str>) {
3014        ObjectExt::set_property(
3015            self.as_ref(),
3016            "primary-icon-tooltip-text",
3017            primary_icon_tooltip_text,
3018        )
3019    }
3020
3021    /// Number of pixels of the entry scrolled off the screen to the left.
3022    #[doc(alias = "scroll-offset")]
3023    fn scroll_offset(&self) -> i32 {
3024        ObjectExt::property(self.as_ref(), "scroll-offset")
3025    }
3026
3027    /// Whether the secondary icon is activatable.
3028    ///
3029    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
3030    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
3031    /// activatable icons.
3032    ///
3033    /// Sensitive, but non-activatable icons can be used for purely
3034    /// informational purposes.
3035    #[doc(alias = "secondary-icon-activatable")]
3036    fn is_secondary_icon_activatable(&self) -> bool {
3037        ObjectExt::property(self.as_ref(), "secondary-icon-activatable")
3038    }
3039
3040    /// Whether the secondary icon is activatable.
3041    ///
3042    /// GTK emits the [`icon-press`][struct@crate::Entry#icon-press] and
3043    /// [`icon-release`][struct@crate::Entry#icon-release] signals only on sensitive,
3044    /// activatable icons.
3045    ///
3046    /// Sensitive, but non-activatable icons can be used for purely
3047    /// informational purposes.
3048    #[doc(alias = "secondary-icon-activatable")]
3049    fn set_secondary_icon_activatable(&self, secondary_icon_activatable: bool) {
3050        ObjectExt::set_property(
3051            self.as_ref(),
3052            "secondary-icon-activatable",
3053            secondary_icon_activatable,
3054        )
3055    }
3056
3057    /// The `GIcon` to use for the secondary icon for the entry.
3058    #[doc(alias = "secondary-icon-gicon")]
3059    fn secondary_icon_gicon(&self) -> Option<gio::Icon> {
3060        ObjectExt::property(self.as_ref(), "secondary-icon-gicon")
3061    }
3062
3063    /// The `GIcon` to use for the secondary icon for the entry.
3064    #[doc(alias = "secondary-icon-gicon")]
3065    fn set_secondary_icon_gicon<P: IsA<gio::Icon>>(&self, secondary_icon_gicon: Option<&P>) {
3066        ObjectExt::set_property(self.as_ref(), "secondary-icon-gicon", secondary_icon_gicon)
3067    }
3068
3069    /// The icon name to use for the secondary icon for the entry.
3070    #[doc(alias = "secondary-icon-name")]
3071    fn secondary_icon_name(&self) -> Option<glib::GString> {
3072        ObjectExt::property(self.as_ref(), "secondary-icon-name")
3073    }
3074
3075    /// The icon name to use for the secondary icon for the entry.
3076    #[doc(alias = "secondary-icon-name")]
3077    fn set_secondary_icon_name(&self, secondary_icon_name: Option<&str>) {
3078        ObjectExt::set_property(self.as_ref(), "secondary-icon-name", secondary_icon_name)
3079    }
3080
3081    /// A [`gdk::Paintable`][crate::gdk::Paintable] to use as the secondary icon for the entry.
3082    #[doc(alias = "secondary-icon-paintable")]
3083    fn secondary_icon_paintable(&self) -> Option<gdk::Paintable> {
3084        ObjectExt::property(self.as_ref(), "secondary-icon-paintable")
3085    }
3086
3087    /// A [`gdk::Paintable`][crate::gdk::Paintable] to use as the secondary icon for the entry.
3088    #[doc(alias = "secondary-icon-paintable")]
3089    fn set_secondary_icon_paintable<P: IsA<gdk::Paintable>>(
3090        &self,
3091        secondary_icon_paintable: Option<&P>,
3092    ) {
3093        ObjectExt::set_property(
3094            self.as_ref(),
3095            "secondary-icon-paintable",
3096            secondary_icon_paintable,
3097        )
3098    }
3099
3100    /// Whether the secondary icon is sensitive.
3101    ///
3102    /// An insensitive icon appears grayed out. GTK does not emit the
3103    /// [`icon-press`][struct@crate::Entry#icon-press][ and [`icon-release`][struct@crate::Entry#icon-release]
3104    /// signals and does not allow DND from insensitive icons.
3105    ///
3106    /// An icon should be set insensitive if the action that would trigger
3107    /// when clicked is currently not available.
3108    #[doc(alias = "secondary-icon-sensitive")]
3109    fn is_secondary_icon_sensitive(&self) -> bool {
3110        ObjectExt::property(self.as_ref(), "secondary-icon-sensitive")
3111    }
3112
3113    /// Whether the secondary icon is sensitive.
3114    ///
3115    /// An insensitive icon appears grayed out. GTK does not emit the
3116    /// [`icon-press`][struct@crate::Entry#icon-press][ and [`icon-release`][struct@crate::Entry#icon-release]
3117    /// signals and does not allow DND from insensitive icons.
3118    ///
3119    /// An icon should be set insensitive if the action that would trigger
3120    /// when clicked is currently not available.
3121    #[doc(alias = "secondary-icon-sensitive")]
3122    fn set_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool) {
3123        ObjectExt::set_property(
3124            self.as_ref(),
3125            "secondary-icon-sensitive",
3126            secondary_icon_sensitive,
3127        )
3128    }
3129
3130    /// The representation which is used for the secondary icon of the entry.
3131    #[doc(alias = "secondary-icon-storage-type")]
3132    fn secondary_icon_storage_type(&self) -> ImageType {
3133        ObjectExt::property(self.as_ref(), "secondary-icon-storage-type")
3134    }
3135
3136    /// The contents of the tooltip on the secondary icon, with markup.
3137    ///
3138    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
3139    #[doc(alias = "secondary-icon-tooltip-markup")]
3140    fn secondary_icon_tooltip_markup(&self) -> Option<glib::GString> {
3141        ObjectExt::property(self.as_ref(), "secondary-icon-tooltip-markup")
3142    }
3143
3144    /// The contents of the tooltip on the secondary icon, with markup.
3145    ///
3146    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
3147    #[doc(alias = "secondary-icon-tooltip-markup")]
3148    fn set_secondary_icon_tooltip_markup(&self, secondary_icon_tooltip_markup: Option<&str>) {
3149        ObjectExt::set_property(
3150            self.as_ref(),
3151            "secondary-icon-tooltip-markup",
3152            secondary_icon_tooltip_markup,
3153        )
3154    }
3155
3156    /// The contents of the tooltip on the secondary icon.
3157    ///
3158    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
3159    #[doc(alias = "secondary-icon-tooltip-text")]
3160    fn secondary_icon_tooltip_text(&self) -> Option<glib::GString> {
3161        ObjectExt::property(self.as_ref(), "secondary-icon-tooltip-text")
3162    }
3163
3164    /// The contents of the tooltip on the secondary icon.
3165    ///
3166    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
3167    #[doc(alias = "secondary-icon-tooltip-text")]
3168    fn set_secondary_icon_tooltip_text(&self, secondary_icon_tooltip_text: Option<&str>) {
3169        ObjectExt::set_property(
3170            self.as_ref(),
3171            "secondary-icon-tooltip-text",
3172            secondary_icon_tooltip_text,
3173        )
3174    }
3175
3176    /// Whether the entry will show an Emoji icon in the secondary icon position
3177    /// to open the Emoji chooser.
3178    #[doc(alias = "show-emoji-icon")]
3179    fn shows_emoji_icon(&self) -> bool {
3180        ObjectExt::property(self.as_ref(), "show-emoji-icon")
3181    }
3182
3183    /// Whether the entry will show an Emoji icon in the secondary icon position
3184    /// to open the Emoji chooser.
3185    #[doc(alias = "show-emoji-icon")]
3186    fn set_show_emoji_icon(&self, show_emoji_icon: bool) {
3187        ObjectExt::set_property(self.as_ref(), "show-emoji-icon", show_emoji_icon)
3188    }
3189
3190    /// When [`true`], pasted multi-line text is truncated to the first line.
3191    #[doc(alias = "truncate-multiline")]
3192    fn must_truncate_multiline(&self) -> bool {
3193        ObjectExt::property(self.as_ref(), "truncate-multiline")
3194    }
3195
3196    /// When [`true`], pasted multi-line text is truncated to the first line.
3197    #[doc(alias = "truncate-multiline")]
3198    fn set_truncate_multiline(&self, truncate_multiline: bool) {
3199        ObjectExt::set_property(self.as_ref(), "truncate-multiline", truncate_multiline)
3200    }
3201
3202    /// Emitted when the entry is activated.
3203    ///
3204    /// The keybindings for this signal are all forms of the Enter key.
3205    #[doc(alias = "activate")]
3206    fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3207        unsafe extern "C" fn activate_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3208            this: *mut ffi::GtkEntry,
3209            f: glib::ffi::gpointer,
3210        ) {
3211            let f: &F = &*(f as *const F);
3212            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3213        }
3214        unsafe {
3215            let f: Box_<F> = Box_::new(f);
3216            connect_raw(
3217                self.as_ptr() as *mut _,
3218                b"activate\0".as_ptr() as *const _,
3219                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3220                    activate_trampoline::<Self, F> as *const (),
3221                )),
3222                Box_::into_raw(f),
3223            )
3224        }
3225    }
3226
3227    fn emit_activate(&self) {
3228        self.emit_by_name::<()>("activate", &[]);
3229    }
3230
3231    /// Emitted when an activatable icon is clicked.
3232    /// ## `icon_pos`
3233    /// The position of the clicked icon
3234    #[doc(alias = "icon-press")]
3235    fn connect_icon_press<F: Fn(&Self, EntryIconPosition) + 'static>(
3236        &self,
3237        f: F,
3238    ) -> SignalHandlerId {
3239        unsafe extern "C" fn icon_press_trampoline<
3240            P: IsA<Entry>,
3241            F: Fn(&P, EntryIconPosition) + 'static,
3242        >(
3243            this: *mut ffi::GtkEntry,
3244            icon_pos: ffi::GtkEntryIconPosition,
3245            f: glib::ffi::gpointer,
3246        ) {
3247            let f: &F = &*(f as *const F);
3248            f(
3249                Entry::from_glib_borrow(this).unsafe_cast_ref(),
3250                from_glib(icon_pos),
3251            )
3252        }
3253        unsafe {
3254            let f: Box_<F> = Box_::new(f);
3255            connect_raw(
3256                self.as_ptr() as *mut _,
3257                b"icon-press\0".as_ptr() as *const _,
3258                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3259                    icon_press_trampoline::<Self, F> as *const (),
3260                )),
3261                Box_::into_raw(f),
3262            )
3263        }
3264    }
3265
3266    /// Emitted on the button release from a mouse click
3267    /// over an activatable icon.
3268    /// ## `icon_pos`
3269    /// The position of the clicked icon
3270    #[doc(alias = "icon-release")]
3271    fn connect_icon_release<F: Fn(&Self, EntryIconPosition) + 'static>(
3272        &self,
3273        f: F,
3274    ) -> SignalHandlerId {
3275        unsafe extern "C" fn icon_release_trampoline<
3276            P: IsA<Entry>,
3277            F: Fn(&P, EntryIconPosition) + 'static,
3278        >(
3279            this: *mut ffi::GtkEntry,
3280            icon_pos: ffi::GtkEntryIconPosition,
3281            f: glib::ffi::gpointer,
3282        ) {
3283            let f: &F = &*(f as *const F);
3284            f(
3285                Entry::from_glib_borrow(this).unsafe_cast_ref(),
3286                from_glib(icon_pos),
3287            )
3288        }
3289        unsafe {
3290            let f: Box_<F> = Box_::new(f);
3291            connect_raw(
3292                self.as_ptr() as *mut _,
3293                b"icon-release\0".as_ptr() as *const _,
3294                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3295                    icon_release_trampoline::<Self, F> as *const (),
3296                )),
3297                Box_::into_raw(f),
3298            )
3299        }
3300    }
3301
3302    #[doc(alias = "activates-default")]
3303    fn connect_activates_default_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3304        unsafe extern "C" fn notify_activates_default_trampoline<
3305            P: IsA<Entry>,
3306            F: Fn(&P) + 'static,
3307        >(
3308            this: *mut ffi::GtkEntry,
3309            _param_spec: glib::ffi::gpointer,
3310            f: glib::ffi::gpointer,
3311        ) {
3312            let f: &F = &*(f as *const F);
3313            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3314        }
3315        unsafe {
3316            let f: Box_<F> = Box_::new(f);
3317            connect_raw(
3318                self.as_ptr() as *mut _,
3319                b"notify::activates-default\0".as_ptr() as *const _,
3320                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3321                    notify_activates_default_trampoline::<Self, F> as *const (),
3322                )),
3323                Box_::into_raw(f),
3324            )
3325        }
3326    }
3327
3328    #[doc(alias = "attributes")]
3329    fn connect_attributes_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3330        unsafe extern "C" fn notify_attributes_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3331            this: *mut ffi::GtkEntry,
3332            _param_spec: glib::ffi::gpointer,
3333            f: glib::ffi::gpointer,
3334        ) {
3335            let f: &F = &*(f as *const F);
3336            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3337        }
3338        unsafe {
3339            let f: Box_<F> = Box_::new(f);
3340            connect_raw(
3341                self.as_ptr() as *mut _,
3342                b"notify::attributes\0".as_ptr() as *const _,
3343                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3344                    notify_attributes_trampoline::<Self, F> as *const (),
3345                )),
3346                Box_::into_raw(f),
3347            )
3348        }
3349    }
3350
3351    #[doc(alias = "buffer")]
3352    fn connect_buffer_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3353        unsafe extern "C" fn notify_buffer_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3354            this: *mut ffi::GtkEntry,
3355            _param_spec: glib::ffi::gpointer,
3356            f: glib::ffi::gpointer,
3357        ) {
3358            let f: &F = &*(f as *const F);
3359            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3360        }
3361        unsafe {
3362            let f: Box_<F> = Box_::new(f);
3363            connect_raw(
3364                self.as_ptr() as *mut _,
3365                b"notify::buffer\0".as_ptr() as *const _,
3366                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3367                    notify_buffer_trampoline::<Self, F> as *const (),
3368                )),
3369                Box_::into_raw(f),
3370            )
3371        }
3372    }
3373
3374    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
3375    #[doc(alias = "completion")]
3376    fn connect_completion_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3377        unsafe extern "C" fn notify_completion_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3378            this: *mut ffi::GtkEntry,
3379            _param_spec: glib::ffi::gpointer,
3380            f: glib::ffi::gpointer,
3381        ) {
3382            let f: &F = &*(f as *const F);
3383            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3384        }
3385        unsafe {
3386            let f: Box_<F> = Box_::new(f);
3387            connect_raw(
3388                self.as_ptr() as *mut _,
3389                b"notify::completion\0".as_ptr() as *const _,
3390                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3391                    notify_completion_trampoline::<Self, F> as *const (),
3392                )),
3393                Box_::into_raw(f),
3394            )
3395        }
3396    }
3397
3398    #[doc(alias = "enable-emoji-completion")]
3399    fn connect_enable_emoji_completion_notify<F: Fn(&Self) + 'static>(
3400        &self,
3401        f: F,
3402    ) -> SignalHandlerId {
3403        unsafe extern "C" fn notify_enable_emoji_completion_trampoline<
3404            P: IsA<Entry>,
3405            F: Fn(&P) + 'static,
3406        >(
3407            this: *mut ffi::GtkEntry,
3408            _param_spec: glib::ffi::gpointer,
3409            f: glib::ffi::gpointer,
3410        ) {
3411            let f: &F = &*(f as *const F);
3412            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3413        }
3414        unsafe {
3415            let f: Box_<F> = Box_::new(f);
3416            connect_raw(
3417                self.as_ptr() as *mut _,
3418                b"notify::enable-emoji-completion\0".as_ptr() as *const _,
3419                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3420                    notify_enable_emoji_completion_trampoline::<Self, F> as *const (),
3421                )),
3422                Box_::into_raw(f),
3423            )
3424        }
3425    }
3426
3427    #[doc(alias = "extra-menu")]
3428    fn connect_extra_menu_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3429        unsafe extern "C" fn notify_extra_menu_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3430            this: *mut ffi::GtkEntry,
3431            _param_spec: glib::ffi::gpointer,
3432            f: glib::ffi::gpointer,
3433        ) {
3434            let f: &F = &*(f as *const F);
3435            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3436        }
3437        unsafe {
3438            let f: Box_<F> = Box_::new(f);
3439            connect_raw(
3440                self.as_ptr() as *mut _,
3441                b"notify::extra-menu\0".as_ptr() as *const _,
3442                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3443                    notify_extra_menu_trampoline::<Self, F> as *const (),
3444                )),
3445                Box_::into_raw(f),
3446            )
3447        }
3448    }
3449
3450    #[doc(alias = "has-frame")]
3451    fn connect_has_frame_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3452        unsafe extern "C" fn notify_has_frame_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3453            this: *mut ffi::GtkEntry,
3454            _param_spec: glib::ffi::gpointer,
3455            f: glib::ffi::gpointer,
3456        ) {
3457            let f: &F = &*(f as *const F);
3458            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3459        }
3460        unsafe {
3461            let f: Box_<F> = Box_::new(f);
3462            connect_raw(
3463                self.as_ptr() as *mut _,
3464                b"notify::has-frame\0".as_ptr() as *const _,
3465                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3466                    notify_has_frame_trampoline::<Self, F> as *const (),
3467                )),
3468                Box_::into_raw(f),
3469            )
3470        }
3471    }
3472
3473    #[doc(alias = "im-module")]
3474    fn connect_im_module_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3475        unsafe extern "C" fn notify_im_module_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3476            this: *mut ffi::GtkEntry,
3477            _param_spec: glib::ffi::gpointer,
3478            f: glib::ffi::gpointer,
3479        ) {
3480            let f: &F = &*(f as *const F);
3481            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3482        }
3483        unsafe {
3484            let f: Box_<F> = Box_::new(f);
3485            connect_raw(
3486                self.as_ptr() as *mut _,
3487                b"notify::im-module\0".as_ptr() as *const _,
3488                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3489                    notify_im_module_trampoline::<Self, F> as *const (),
3490                )),
3491                Box_::into_raw(f),
3492            )
3493        }
3494    }
3495
3496    #[doc(alias = "input-hints")]
3497    fn connect_input_hints_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3498        unsafe extern "C" fn notify_input_hints_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3499            this: *mut ffi::GtkEntry,
3500            _param_spec: glib::ffi::gpointer,
3501            f: glib::ffi::gpointer,
3502        ) {
3503            let f: &F = &*(f as *const F);
3504            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3505        }
3506        unsafe {
3507            let f: Box_<F> = Box_::new(f);
3508            connect_raw(
3509                self.as_ptr() as *mut _,
3510                b"notify::input-hints\0".as_ptr() as *const _,
3511                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3512                    notify_input_hints_trampoline::<Self, F> as *const (),
3513                )),
3514                Box_::into_raw(f),
3515            )
3516        }
3517    }
3518
3519    #[doc(alias = "input-purpose")]
3520    fn connect_input_purpose_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3521        unsafe extern "C" fn notify_input_purpose_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3522            this: *mut ffi::GtkEntry,
3523            _param_spec: glib::ffi::gpointer,
3524            f: glib::ffi::gpointer,
3525        ) {
3526            let f: &F = &*(f as *const F);
3527            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3528        }
3529        unsafe {
3530            let f: Box_<F> = Box_::new(f);
3531            connect_raw(
3532                self.as_ptr() as *mut _,
3533                b"notify::input-purpose\0".as_ptr() as *const _,
3534                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3535                    notify_input_purpose_trampoline::<Self, F> as *const (),
3536                )),
3537                Box_::into_raw(f),
3538            )
3539        }
3540    }
3541
3542    #[doc(alias = "invisible-char")]
3543    fn connect_invisible_char_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3544        unsafe extern "C" fn notify_invisible_char_trampoline<
3545            P: IsA<Entry>,
3546            F: Fn(&P) + 'static,
3547        >(
3548            this: *mut ffi::GtkEntry,
3549            _param_spec: glib::ffi::gpointer,
3550            f: glib::ffi::gpointer,
3551        ) {
3552            let f: &F = &*(f as *const F);
3553            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3554        }
3555        unsafe {
3556            let f: Box_<F> = Box_::new(f);
3557            connect_raw(
3558                self.as_ptr() as *mut _,
3559                b"notify::invisible-char\0".as_ptr() as *const _,
3560                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3561                    notify_invisible_char_trampoline::<Self, F> as *const (),
3562                )),
3563                Box_::into_raw(f),
3564            )
3565        }
3566    }
3567
3568    #[doc(alias = "invisible-char-set")]
3569    fn connect_invisible_char_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3570        unsafe extern "C" fn notify_invisible_char_set_trampoline<
3571            P: IsA<Entry>,
3572            F: Fn(&P) + 'static,
3573        >(
3574            this: *mut ffi::GtkEntry,
3575            _param_spec: glib::ffi::gpointer,
3576            f: glib::ffi::gpointer,
3577        ) {
3578            let f: &F = &*(f as *const F);
3579            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3580        }
3581        unsafe {
3582            let f: Box_<F> = Box_::new(f);
3583            connect_raw(
3584                self.as_ptr() as *mut _,
3585                b"notify::invisible-char-set\0".as_ptr() as *const _,
3586                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3587                    notify_invisible_char_set_trampoline::<Self, F> as *const (),
3588                )),
3589                Box_::into_raw(f),
3590            )
3591        }
3592    }
3593
3594    #[doc(alias = "max-length")]
3595    fn connect_max_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3596        unsafe extern "C" fn notify_max_length_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3597            this: *mut ffi::GtkEntry,
3598            _param_spec: glib::ffi::gpointer,
3599            f: glib::ffi::gpointer,
3600        ) {
3601            let f: &F = &*(f as *const F);
3602            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3603        }
3604        unsafe {
3605            let f: Box_<F> = Box_::new(f);
3606            connect_raw(
3607                self.as_ptr() as *mut _,
3608                b"notify::max-length\0".as_ptr() as *const _,
3609                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3610                    notify_max_length_trampoline::<Self, F> as *const (),
3611                )),
3612                Box_::into_raw(f),
3613            )
3614        }
3615    }
3616
3617    #[doc(alias = "overwrite-mode")]
3618    fn connect_overwrite_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3619        unsafe extern "C" fn notify_overwrite_mode_trampoline<
3620            P: IsA<Entry>,
3621            F: Fn(&P) + 'static,
3622        >(
3623            this: *mut ffi::GtkEntry,
3624            _param_spec: glib::ffi::gpointer,
3625            f: glib::ffi::gpointer,
3626        ) {
3627            let f: &F = &*(f as *const F);
3628            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3629        }
3630        unsafe {
3631            let f: Box_<F> = Box_::new(f);
3632            connect_raw(
3633                self.as_ptr() as *mut _,
3634                b"notify::overwrite-mode\0".as_ptr() as *const _,
3635                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3636                    notify_overwrite_mode_trampoline::<Self, F> as *const (),
3637                )),
3638                Box_::into_raw(f),
3639            )
3640        }
3641    }
3642
3643    #[doc(alias = "placeholder-text")]
3644    fn connect_placeholder_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3645        unsafe extern "C" fn notify_placeholder_text_trampoline<
3646            P: IsA<Entry>,
3647            F: Fn(&P) + 'static,
3648        >(
3649            this: *mut ffi::GtkEntry,
3650            _param_spec: glib::ffi::gpointer,
3651            f: glib::ffi::gpointer,
3652        ) {
3653            let f: &F = &*(f as *const F);
3654            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3655        }
3656        unsafe {
3657            let f: Box_<F> = Box_::new(f);
3658            connect_raw(
3659                self.as_ptr() as *mut _,
3660                b"notify::placeholder-text\0".as_ptr() as *const _,
3661                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3662                    notify_placeholder_text_trampoline::<Self, F> as *const (),
3663                )),
3664                Box_::into_raw(f),
3665            )
3666        }
3667    }
3668
3669    #[doc(alias = "primary-icon-activatable")]
3670    fn connect_primary_icon_activatable_notify<F: Fn(&Self) + 'static>(
3671        &self,
3672        f: F,
3673    ) -> SignalHandlerId {
3674        unsafe extern "C" fn notify_primary_icon_activatable_trampoline<
3675            P: IsA<Entry>,
3676            F: Fn(&P) + 'static,
3677        >(
3678            this: *mut ffi::GtkEntry,
3679            _param_spec: glib::ffi::gpointer,
3680            f: glib::ffi::gpointer,
3681        ) {
3682            let f: &F = &*(f as *const F);
3683            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3684        }
3685        unsafe {
3686            let f: Box_<F> = Box_::new(f);
3687            connect_raw(
3688                self.as_ptr() as *mut _,
3689                b"notify::primary-icon-activatable\0".as_ptr() as *const _,
3690                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3691                    notify_primary_icon_activatable_trampoline::<Self, F> as *const (),
3692                )),
3693                Box_::into_raw(f),
3694            )
3695        }
3696    }
3697
3698    #[doc(alias = "primary-icon-gicon")]
3699    fn connect_primary_icon_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3700        unsafe extern "C" fn notify_primary_icon_gicon_trampoline<
3701            P: IsA<Entry>,
3702            F: Fn(&P) + 'static,
3703        >(
3704            this: *mut ffi::GtkEntry,
3705            _param_spec: glib::ffi::gpointer,
3706            f: glib::ffi::gpointer,
3707        ) {
3708            let f: &F = &*(f as *const F);
3709            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3710        }
3711        unsafe {
3712            let f: Box_<F> = Box_::new(f);
3713            connect_raw(
3714                self.as_ptr() as *mut _,
3715                b"notify::primary-icon-gicon\0".as_ptr() as *const _,
3716                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3717                    notify_primary_icon_gicon_trampoline::<Self, F> as *const (),
3718                )),
3719                Box_::into_raw(f),
3720            )
3721        }
3722    }
3723
3724    #[doc(alias = "primary-icon-name")]
3725    fn connect_primary_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3726        unsafe extern "C" fn notify_primary_icon_name_trampoline<
3727            P: IsA<Entry>,
3728            F: Fn(&P) + 'static,
3729        >(
3730            this: *mut ffi::GtkEntry,
3731            _param_spec: glib::ffi::gpointer,
3732            f: glib::ffi::gpointer,
3733        ) {
3734            let f: &F = &*(f as *const F);
3735            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3736        }
3737        unsafe {
3738            let f: Box_<F> = Box_::new(f);
3739            connect_raw(
3740                self.as_ptr() as *mut _,
3741                b"notify::primary-icon-name\0".as_ptr() as *const _,
3742                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3743                    notify_primary_icon_name_trampoline::<Self, F> as *const (),
3744                )),
3745                Box_::into_raw(f),
3746            )
3747        }
3748    }
3749
3750    #[doc(alias = "primary-icon-paintable")]
3751    fn connect_primary_icon_paintable_notify<F: Fn(&Self) + 'static>(
3752        &self,
3753        f: F,
3754    ) -> SignalHandlerId {
3755        unsafe extern "C" fn notify_primary_icon_paintable_trampoline<
3756            P: IsA<Entry>,
3757            F: Fn(&P) + 'static,
3758        >(
3759            this: *mut ffi::GtkEntry,
3760            _param_spec: glib::ffi::gpointer,
3761            f: glib::ffi::gpointer,
3762        ) {
3763            let f: &F = &*(f as *const F);
3764            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3765        }
3766        unsafe {
3767            let f: Box_<F> = Box_::new(f);
3768            connect_raw(
3769                self.as_ptr() as *mut _,
3770                b"notify::primary-icon-paintable\0".as_ptr() as *const _,
3771                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3772                    notify_primary_icon_paintable_trampoline::<Self, F> as *const (),
3773                )),
3774                Box_::into_raw(f),
3775            )
3776        }
3777    }
3778
3779    #[doc(alias = "primary-icon-sensitive")]
3780    fn connect_primary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
3781        &self,
3782        f: F,
3783    ) -> SignalHandlerId {
3784        unsafe extern "C" fn notify_primary_icon_sensitive_trampoline<
3785            P: IsA<Entry>,
3786            F: Fn(&P) + 'static,
3787        >(
3788            this: *mut ffi::GtkEntry,
3789            _param_spec: glib::ffi::gpointer,
3790            f: glib::ffi::gpointer,
3791        ) {
3792            let f: &F = &*(f as *const F);
3793            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3794        }
3795        unsafe {
3796            let f: Box_<F> = Box_::new(f);
3797            connect_raw(
3798                self.as_ptr() as *mut _,
3799                b"notify::primary-icon-sensitive\0".as_ptr() as *const _,
3800                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3801                    notify_primary_icon_sensitive_trampoline::<Self, F> as *const (),
3802                )),
3803                Box_::into_raw(f),
3804            )
3805        }
3806    }
3807
3808    #[doc(alias = "primary-icon-storage-type")]
3809    fn connect_primary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
3810        &self,
3811        f: F,
3812    ) -> SignalHandlerId {
3813        unsafe extern "C" fn notify_primary_icon_storage_type_trampoline<
3814            P: IsA<Entry>,
3815            F: Fn(&P) + 'static,
3816        >(
3817            this: *mut ffi::GtkEntry,
3818            _param_spec: glib::ffi::gpointer,
3819            f: glib::ffi::gpointer,
3820        ) {
3821            let f: &F = &*(f as *const F);
3822            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3823        }
3824        unsafe {
3825            let f: Box_<F> = Box_::new(f);
3826            connect_raw(
3827                self.as_ptr() as *mut _,
3828                b"notify::primary-icon-storage-type\0".as_ptr() as *const _,
3829                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3830                    notify_primary_icon_storage_type_trampoline::<Self, F> as *const (),
3831                )),
3832                Box_::into_raw(f),
3833            )
3834        }
3835    }
3836
3837    #[doc(alias = "primary-icon-tooltip-markup")]
3838    fn connect_primary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
3839        &self,
3840        f: F,
3841    ) -> SignalHandlerId {
3842        unsafe extern "C" fn notify_primary_icon_tooltip_markup_trampoline<
3843            P: IsA<Entry>,
3844            F: Fn(&P) + 'static,
3845        >(
3846            this: *mut ffi::GtkEntry,
3847            _param_spec: glib::ffi::gpointer,
3848            f: glib::ffi::gpointer,
3849        ) {
3850            let f: &F = &*(f as *const F);
3851            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3852        }
3853        unsafe {
3854            let f: Box_<F> = Box_::new(f);
3855            connect_raw(
3856                self.as_ptr() as *mut _,
3857                b"notify::primary-icon-tooltip-markup\0".as_ptr() as *const _,
3858                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3859                    notify_primary_icon_tooltip_markup_trampoline::<Self, F> as *const (),
3860                )),
3861                Box_::into_raw(f),
3862            )
3863        }
3864    }
3865
3866    #[doc(alias = "primary-icon-tooltip-text")]
3867    fn connect_primary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
3868        &self,
3869        f: F,
3870    ) -> SignalHandlerId {
3871        unsafe extern "C" fn notify_primary_icon_tooltip_text_trampoline<
3872            P: IsA<Entry>,
3873            F: Fn(&P) + 'static,
3874        >(
3875            this: *mut ffi::GtkEntry,
3876            _param_spec: glib::ffi::gpointer,
3877            f: glib::ffi::gpointer,
3878        ) {
3879            let f: &F = &*(f as *const F);
3880            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3881        }
3882        unsafe {
3883            let f: Box_<F> = Box_::new(f);
3884            connect_raw(
3885                self.as_ptr() as *mut _,
3886                b"notify::primary-icon-tooltip-text\0".as_ptr() as *const _,
3887                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3888                    notify_primary_icon_tooltip_text_trampoline::<Self, F> as *const (),
3889                )),
3890                Box_::into_raw(f),
3891            )
3892        }
3893    }
3894
3895    #[doc(alias = "progress-fraction")]
3896    fn connect_progress_fraction_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3897        unsafe extern "C" fn notify_progress_fraction_trampoline<
3898            P: IsA<Entry>,
3899            F: Fn(&P) + 'static,
3900        >(
3901            this: *mut ffi::GtkEntry,
3902            _param_spec: glib::ffi::gpointer,
3903            f: glib::ffi::gpointer,
3904        ) {
3905            let f: &F = &*(f as *const F);
3906            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3907        }
3908        unsafe {
3909            let f: Box_<F> = Box_::new(f);
3910            connect_raw(
3911                self.as_ptr() as *mut _,
3912                b"notify::progress-fraction\0".as_ptr() as *const _,
3913                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3914                    notify_progress_fraction_trampoline::<Self, F> as *const (),
3915                )),
3916                Box_::into_raw(f),
3917            )
3918        }
3919    }
3920
3921    #[doc(alias = "progress-pulse-step")]
3922    fn connect_progress_pulse_step_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3923        unsafe extern "C" fn notify_progress_pulse_step_trampoline<
3924            P: IsA<Entry>,
3925            F: Fn(&P) + 'static,
3926        >(
3927            this: *mut ffi::GtkEntry,
3928            _param_spec: glib::ffi::gpointer,
3929            f: glib::ffi::gpointer,
3930        ) {
3931            let f: &F = &*(f as *const F);
3932            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3933        }
3934        unsafe {
3935            let f: Box_<F> = Box_::new(f);
3936            connect_raw(
3937                self.as_ptr() as *mut _,
3938                b"notify::progress-pulse-step\0".as_ptr() as *const _,
3939                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3940                    notify_progress_pulse_step_trampoline::<Self, F> as *const (),
3941                )),
3942                Box_::into_raw(f),
3943            )
3944        }
3945    }
3946
3947    #[doc(alias = "scroll-offset")]
3948    fn connect_scroll_offset_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3949        unsafe extern "C" fn notify_scroll_offset_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3950            this: *mut ffi::GtkEntry,
3951            _param_spec: glib::ffi::gpointer,
3952            f: glib::ffi::gpointer,
3953        ) {
3954            let f: &F = &*(f as *const F);
3955            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3956        }
3957        unsafe {
3958            let f: Box_<F> = Box_::new(f);
3959            connect_raw(
3960                self.as_ptr() as *mut _,
3961                b"notify::scroll-offset\0".as_ptr() as *const _,
3962                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3963                    notify_scroll_offset_trampoline::<Self, F> as *const (),
3964                )),
3965                Box_::into_raw(f),
3966            )
3967        }
3968    }
3969
3970    #[doc(alias = "secondary-icon-activatable")]
3971    fn connect_secondary_icon_activatable_notify<F: Fn(&Self) + 'static>(
3972        &self,
3973        f: F,
3974    ) -> SignalHandlerId {
3975        unsafe extern "C" fn notify_secondary_icon_activatable_trampoline<
3976            P: IsA<Entry>,
3977            F: Fn(&P) + 'static,
3978        >(
3979            this: *mut ffi::GtkEntry,
3980            _param_spec: glib::ffi::gpointer,
3981            f: glib::ffi::gpointer,
3982        ) {
3983            let f: &F = &*(f as *const F);
3984            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3985        }
3986        unsafe {
3987            let f: Box_<F> = Box_::new(f);
3988            connect_raw(
3989                self.as_ptr() as *mut _,
3990                b"notify::secondary-icon-activatable\0".as_ptr() as *const _,
3991                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
3992                    notify_secondary_icon_activatable_trampoline::<Self, F> as *const (),
3993                )),
3994                Box_::into_raw(f),
3995            )
3996        }
3997    }
3998
3999    #[doc(alias = "secondary-icon-gicon")]
4000    fn connect_secondary_icon_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4001        unsafe extern "C" fn notify_secondary_icon_gicon_trampoline<
4002            P: IsA<Entry>,
4003            F: Fn(&P) + 'static,
4004        >(
4005            this: *mut ffi::GtkEntry,
4006            _param_spec: glib::ffi::gpointer,
4007            f: glib::ffi::gpointer,
4008        ) {
4009            let f: &F = &*(f as *const F);
4010            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4011        }
4012        unsafe {
4013            let f: Box_<F> = Box_::new(f);
4014            connect_raw(
4015                self.as_ptr() as *mut _,
4016                b"notify::secondary-icon-gicon\0".as_ptr() as *const _,
4017                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4018                    notify_secondary_icon_gicon_trampoline::<Self, F> as *const (),
4019                )),
4020                Box_::into_raw(f),
4021            )
4022        }
4023    }
4024
4025    #[doc(alias = "secondary-icon-name")]
4026    fn connect_secondary_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4027        unsafe extern "C" fn notify_secondary_icon_name_trampoline<
4028            P: IsA<Entry>,
4029            F: Fn(&P) + 'static,
4030        >(
4031            this: *mut ffi::GtkEntry,
4032            _param_spec: glib::ffi::gpointer,
4033            f: glib::ffi::gpointer,
4034        ) {
4035            let f: &F = &*(f as *const F);
4036            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4037        }
4038        unsafe {
4039            let f: Box_<F> = Box_::new(f);
4040            connect_raw(
4041                self.as_ptr() as *mut _,
4042                b"notify::secondary-icon-name\0".as_ptr() as *const _,
4043                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4044                    notify_secondary_icon_name_trampoline::<Self, F> as *const (),
4045                )),
4046                Box_::into_raw(f),
4047            )
4048        }
4049    }
4050
4051    #[doc(alias = "secondary-icon-paintable")]
4052    fn connect_secondary_icon_paintable_notify<F: Fn(&Self) + 'static>(
4053        &self,
4054        f: F,
4055    ) -> SignalHandlerId {
4056        unsafe extern "C" fn notify_secondary_icon_paintable_trampoline<
4057            P: IsA<Entry>,
4058            F: Fn(&P) + 'static,
4059        >(
4060            this: *mut ffi::GtkEntry,
4061            _param_spec: glib::ffi::gpointer,
4062            f: glib::ffi::gpointer,
4063        ) {
4064            let f: &F = &*(f as *const F);
4065            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4066        }
4067        unsafe {
4068            let f: Box_<F> = Box_::new(f);
4069            connect_raw(
4070                self.as_ptr() as *mut _,
4071                b"notify::secondary-icon-paintable\0".as_ptr() as *const _,
4072                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4073                    notify_secondary_icon_paintable_trampoline::<Self, F> as *const (),
4074                )),
4075                Box_::into_raw(f),
4076            )
4077        }
4078    }
4079
4080    #[doc(alias = "secondary-icon-sensitive")]
4081    fn connect_secondary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
4082        &self,
4083        f: F,
4084    ) -> SignalHandlerId {
4085        unsafe extern "C" fn notify_secondary_icon_sensitive_trampoline<
4086            P: IsA<Entry>,
4087            F: Fn(&P) + 'static,
4088        >(
4089            this: *mut ffi::GtkEntry,
4090            _param_spec: glib::ffi::gpointer,
4091            f: glib::ffi::gpointer,
4092        ) {
4093            let f: &F = &*(f as *const F);
4094            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4095        }
4096        unsafe {
4097            let f: Box_<F> = Box_::new(f);
4098            connect_raw(
4099                self.as_ptr() as *mut _,
4100                b"notify::secondary-icon-sensitive\0".as_ptr() as *const _,
4101                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4102                    notify_secondary_icon_sensitive_trampoline::<Self, F> as *const (),
4103                )),
4104                Box_::into_raw(f),
4105            )
4106        }
4107    }
4108
4109    #[doc(alias = "secondary-icon-storage-type")]
4110    fn connect_secondary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
4111        &self,
4112        f: F,
4113    ) -> SignalHandlerId {
4114        unsafe extern "C" fn notify_secondary_icon_storage_type_trampoline<
4115            P: IsA<Entry>,
4116            F: Fn(&P) + 'static,
4117        >(
4118            this: *mut ffi::GtkEntry,
4119            _param_spec: glib::ffi::gpointer,
4120            f: glib::ffi::gpointer,
4121        ) {
4122            let f: &F = &*(f as *const F);
4123            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4124        }
4125        unsafe {
4126            let f: Box_<F> = Box_::new(f);
4127            connect_raw(
4128                self.as_ptr() as *mut _,
4129                b"notify::secondary-icon-storage-type\0".as_ptr() as *const _,
4130                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4131                    notify_secondary_icon_storage_type_trampoline::<Self, F> as *const (),
4132                )),
4133                Box_::into_raw(f),
4134            )
4135        }
4136    }
4137
4138    #[doc(alias = "secondary-icon-tooltip-markup")]
4139    fn connect_secondary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
4140        &self,
4141        f: F,
4142    ) -> SignalHandlerId {
4143        unsafe extern "C" fn notify_secondary_icon_tooltip_markup_trampoline<
4144            P: IsA<Entry>,
4145            F: Fn(&P) + 'static,
4146        >(
4147            this: *mut ffi::GtkEntry,
4148            _param_spec: glib::ffi::gpointer,
4149            f: glib::ffi::gpointer,
4150        ) {
4151            let f: &F = &*(f as *const F);
4152            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4153        }
4154        unsafe {
4155            let f: Box_<F> = Box_::new(f);
4156            connect_raw(
4157                self.as_ptr() as *mut _,
4158                b"notify::secondary-icon-tooltip-markup\0".as_ptr() as *const _,
4159                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4160                    notify_secondary_icon_tooltip_markup_trampoline::<Self, F> as *const (),
4161                )),
4162                Box_::into_raw(f),
4163            )
4164        }
4165    }
4166
4167    #[doc(alias = "secondary-icon-tooltip-text")]
4168    fn connect_secondary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
4169        &self,
4170        f: F,
4171    ) -> SignalHandlerId {
4172        unsafe extern "C" fn notify_secondary_icon_tooltip_text_trampoline<
4173            P: IsA<Entry>,
4174            F: Fn(&P) + 'static,
4175        >(
4176            this: *mut ffi::GtkEntry,
4177            _param_spec: glib::ffi::gpointer,
4178            f: glib::ffi::gpointer,
4179        ) {
4180            let f: &F = &*(f as *const F);
4181            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4182        }
4183        unsafe {
4184            let f: Box_<F> = Box_::new(f);
4185            connect_raw(
4186                self.as_ptr() as *mut _,
4187                b"notify::secondary-icon-tooltip-text\0".as_ptr() as *const _,
4188                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4189                    notify_secondary_icon_tooltip_text_trampoline::<Self, F> as *const (),
4190                )),
4191                Box_::into_raw(f),
4192            )
4193        }
4194    }
4195
4196    #[doc(alias = "show-emoji-icon")]
4197    fn connect_show_emoji_icon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4198        unsafe extern "C" fn notify_show_emoji_icon_trampoline<
4199            P: IsA<Entry>,
4200            F: Fn(&P) + 'static,
4201        >(
4202            this: *mut ffi::GtkEntry,
4203            _param_spec: glib::ffi::gpointer,
4204            f: glib::ffi::gpointer,
4205        ) {
4206            let f: &F = &*(f as *const F);
4207            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4208        }
4209        unsafe {
4210            let f: Box_<F> = Box_::new(f);
4211            connect_raw(
4212                self.as_ptr() as *mut _,
4213                b"notify::show-emoji-icon\0".as_ptr() as *const _,
4214                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4215                    notify_show_emoji_icon_trampoline::<Self, F> as *const (),
4216                )),
4217                Box_::into_raw(f),
4218            )
4219        }
4220    }
4221
4222    #[doc(alias = "tabs")]
4223    fn connect_tabs_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4224        unsafe extern "C" fn notify_tabs_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4225            this: *mut ffi::GtkEntry,
4226            _param_spec: glib::ffi::gpointer,
4227            f: glib::ffi::gpointer,
4228        ) {
4229            let f: &F = &*(f as *const F);
4230            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4231        }
4232        unsafe {
4233            let f: Box_<F> = Box_::new(f);
4234            connect_raw(
4235                self.as_ptr() as *mut _,
4236                b"notify::tabs\0".as_ptr() as *const _,
4237                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4238                    notify_tabs_trampoline::<Self, F> as *const (),
4239                )),
4240                Box_::into_raw(f),
4241            )
4242        }
4243    }
4244
4245    #[doc(alias = "text-length")]
4246    fn connect_text_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4247        unsafe extern "C" fn notify_text_length_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4248            this: *mut ffi::GtkEntry,
4249            _param_spec: glib::ffi::gpointer,
4250            f: glib::ffi::gpointer,
4251        ) {
4252            let f: &F = &*(f as *const F);
4253            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4254        }
4255        unsafe {
4256            let f: Box_<F> = Box_::new(f);
4257            connect_raw(
4258                self.as_ptr() as *mut _,
4259                b"notify::text-length\0".as_ptr() as *const _,
4260                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4261                    notify_text_length_trampoline::<Self, F> as *const (),
4262                )),
4263                Box_::into_raw(f),
4264            )
4265        }
4266    }
4267
4268    #[doc(alias = "truncate-multiline")]
4269    fn connect_truncate_multiline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4270        unsafe extern "C" fn notify_truncate_multiline_trampoline<
4271            P: IsA<Entry>,
4272            F: Fn(&P) + 'static,
4273        >(
4274            this: *mut ffi::GtkEntry,
4275            _param_spec: glib::ffi::gpointer,
4276            f: glib::ffi::gpointer,
4277        ) {
4278            let f: &F = &*(f as *const F);
4279            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4280        }
4281        unsafe {
4282            let f: Box_<F> = Box_::new(f);
4283            connect_raw(
4284                self.as_ptr() as *mut _,
4285                b"notify::truncate-multiline\0".as_ptr() as *const _,
4286                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4287                    notify_truncate_multiline_trampoline::<Self, F> as *const (),
4288                )),
4289                Box_::into_raw(f),
4290            )
4291        }
4292    }
4293
4294    #[doc(alias = "visibility")]
4295    fn connect_visibility_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4296        unsafe extern "C" fn notify_visibility_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4297            this: *mut ffi::GtkEntry,
4298            _param_spec: glib::ffi::gpointer,
4299            f: glib::ffi::gpointer,
4300        ) {
4301            let f: &F = &*(f as *const F);
4302            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4303        }
4304        unsafe {
4305            let f: Box_<F> = Box_::new(f);
4306            connect_raw(
4307                self.as_ptr() as *mut _,
4308                b"notify::visibility\0".as_ptr() as *const _,
4309                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
4310                    notify_visibility_trampoline::<Self, F> as *const (),
4311                )),
4312                Box_::into_raw(f),
4313            )
4314        }
4315    }
4316}
4317
4318impl<O: IsA<Entry>> EntryExt for O {}