Skip to main content

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