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