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