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