Skip to main content

gtk/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
5use crate::{
6    Adjustment, Align, Buildable, CellEditable, Container, DeleteType, Editable, EntryBuffer,
7    EntryCompletion, EntryIconPosition, ImageType, InputHints, InputPurpose, MovementStep,
8    TargetList, Widget,
9};
10use glib::{
11    prelude::*,
12    signal::{connect_raw, SignalHandlerId},
13    translate::*,
14};
15use std::{boxed::Box as Box_, fmt, mem, mem::transmute};
16
17glib::wrapper! {
18    /// The [`Entry`][crate::Entry] widget is a single line text entry
19    /// widget. A fairly large set of key bindings are supported
20    /// by default. If the entered text is longer than the allocation
21    /// of the widget, the widget will scroll so that the cursor
22    /// position is visible.
23    ///
24    /// When using an entry for passwords and other sensitive information,
25    /// it can be put into “password mode” using [`EntryExt::set_visibility()`][crate::prelude::EntryExt::set_visibility()].
26    /// In this mode, entered text is displayed using a “invisible” character.
27    /// By default, GTK+ picks the best invisible character that is available
28    /// in the current font, but it can be changed with
29    /// [`EntryExt::set_invisible_char()`][crate::prelude::EntryExt::set_invisible_char()]. Since 2.16, GTK+ displays a warning
30    /// when Caps Lock or input methods might interfere with entering text in
31    /// a password entry. The warning can be turned off with the
32    /// [`caps-lock-warning`][struct@crate::Entry#caps-lock-warning] property.
33    ///
34    /// Since 2.16, GtkEntry has the ability to display progress or activity
35    /// information behind the text. To make an entry display such information,
36    /// use [`EntryExt::set_progress_fraction()`][crate::prelude::EntryExt::set_progress_fraction()] or [`EntryExt::set_progress_pulse_step()`][crate::prelude::EntryExt::set_progress_pulse_step()].
37    ///
38    /// Additionally, GtkEntry can show icons at either side of the entry. These
39    /// icons can be activatable by clicking, can be set up as drag source and
40    /// can have tooltips. To add an icon, use [`EntryExt::set_icon_from_gicon()`][crate::prelude::EntryExt::set_icon_from_gicon()] or
41    /// one of the various other functions that set an icon from a stock id, an
42    /// icon name or a pixbuf. To trigger an action when the user clicks an icon,
43    /// connect to the [`icon-press`][struct@crate::Entry#icon-press] signal. To allow DND operations
44    /// from an icon, use [`EntryExt::set_icon_drag_source()`][crate::prelude::EntryExt::set_icon_drag_source()]. To set a tooltip on
45    /// an icon, use [`EntryExt::set_icon_tooltip_text()`][crate::prelude::EntryExt::set_icon_tooltip_text()] or the corresponding function
46    /// for markup.
47    ///
48    /// Note that functionality or information that is only available by clicking
49    /// on an icon in an entry may not be accessible at all to users which are not
50    /// able to use a mouse or other pointing device. It is therefore recommended
51    /// that any such functionality should also be available by other means, e.g.
52    /// via the context menu of the entry.
53    ///
54    /// # CSS nodes
55    ///
56    ///
57    ///
58    /// **⚠️ The following code is in plain ⚠️**
59    ///
60    /// ```plain
61    /// entry[.read-only][.flat][.warning][.error]
62    /// ├── image.left
63    /// ├── image.right
64    /// ├── undershoot.left
65    /// ├── undershoot.right
66    /// ├── [selection]
67    /// ├── [progress[.pulse]]
68    /// ╰── [window.popup]
69    /// ```
70    ///
71    /// GtkEntry has a main node with the name entry. Depending on the properties
72    /// of the entry, the style classes .read-only and .flat may appear. The style
73    /// classes .warning and .error may also be used with entries.
74    ///
75    /// When the entry shows icons, it adds subnodes with the name image and the
76    /// style class .left or .right, depending on where the icon appears.
77    ///
78    /// When the entry has a selection, it adds a subnode with the name selection.
79    ///
80    /// When the entry shows progress, it adds a subnode with the name progress.
81    /// The node has the style class .pulse when the shown progress is pulsing.
82    ///
83    /// The CSS node for a context menu is added as a subnode below entry as well.
84    ///
85    /// The undershoot nodes are used to draw the underflow indication when content
86    /// is scrolled out of view. These nodes get the .left and .right style classes
87    /// added depending on where the indication is drawn.
88    ///
89    /// When touch is used and touch selection handles are shown, they are using
90    /// CSS nodes with name cursor-handle. They get the .top or .bottom style class
91    /// depending on where they are shown in relation to the selection. If there is
92    /// just a single handle for the text cursor, it gets the style class
93    /// .insertion-cursor.
94    ///
95    /// ## Properties
96    ///
97    ///
98    /// #### `activates-default`
99    ///  Readable | Writeable
100    ///
101    ///
102    /// #### `attributes`
103    ///  A list of Pango attributes to apply to the text of the entry.
104    ///
105    /// This is mainly useful to change the size or weight of the text.
106    ///
107    /// The `PangoAttribute`'s `start_index` and `end_index` must refer to the
108    /// [`EntryBuffer`][crate::EntryBuffer] text, i.e. without the preedit string.
109    ///
110    /// Readable | Writeable
111    ///
112    ///
113    /// #### `buffer`
114    ///  Readable | Writeable | Construct
115    ///
116    ///
117    /// #### `caps-lock-warning`
118    ///  Whether password entries will show a warning when Caps Lock is on.
119    ///
120    /// Note that the warning is shown using a secondary icon, and thus
121    /// does not work if you are using the secondary icon position for some
122    /// other purpose.
123    ///
124    /// Readable | Writeable
125    ///
126    ///
127    /// #### `completion`
128    ///  The auxiliary completion object to use with the entry.
129    ///
130    /// Readable | Writeable
131    ///
132    ///
133    /// #### `cursor-position`
134    ///  Readable
135    ///
136    ///
137    /// #### `editable`
138    ///  Readable | Writeable
139    ///
140    ///
141    /// #### `enable-emoji-completion`
142    ///  Readable | Writeable
143    ///
144    ///
145    /// #### `has-frame`
146    ///  Readable | Writeable
147    ///
148    ///
149    /// #### `im-module`
150    ///  Which IM (input method) module should be used for this entry.
151    /// See [`IMContext`][crate::IMContext].
152    ///
153    /// Setting this to a non-[`None`] value overrides the
154    /// system-wide IM module setting. See the GtkSettings
155    /// [`gtk-im-module`][struct@crate::Settings#gtk-im-module] property.
156    ///
157    /// Readable | Writeable
158    ///
159    ///
160    /// #### `inner-border`
161    ///  Sets the text area's border between the text and the frame.
162    ///
163    /// Readable | Writeable
164    ///
165    ///
166    /// #### `input-hints`
167    ///  Additional hints (beyond [`input-purpose`][struct@crate::Entry#input-purpose]) that
168    /// allow input methods to fine-tune their behaviour.
169    ///
170    /// Readable | Writeable
171    ///
172    ///
173    /// #### `input-purpose`
174    ///  The purpose of this text field.
175    ///
176    /// This property can be used by on-screen keyboards and other input
177    /// methods to adjust their behaviour.
178    ///
179    /// Note that setting the purpose to [`InputPurpose::Password`][crate::InputPurpose::Password] or
180    /// [`InputPurpose::Pin`][crate::InputPurpose::Pin] is independent from setting
181    /// [`visibility`][struct@crate::Entry#visibility].
182    ///
183    /// Readable | Writeable
184    ///
185    ///
186    /// #### `invisible-char`
187    ///  The invisible character is used when masking entry contents (in
188    /// \"password mode\")"). When it is not explicitly set with the
189    /// [`invisible-char`][struct@crate::Entry#invisible-char] property, GTK+ determines the character
190    /// to use from a list of possible candidates, depending on availability
191    /// in the current font.
192    ///
193    /// This style property allows the theme to prepend a character
194    /// to the list of candidates.
195    ///
196    /// Readable | Writeable
197    ///
198    ///
199    /// #### `invisible-char-set`
200    ///  Whether the invisible char has been set for the [`Entry`][crate::Entry].
201    ///
202    /// Readable | Writeable
203    ///
204    ///
205    /// #### `max-length`
206    ///  Readable | Writeable
207    ///
208    ///
209    /// #### `max-width-chars`
210    ///  The desired maximum width of the entry, in characters.
211    /// If this property is set to -1, the width will be calculated
212    /// automatically.
213    ///
214    /// Readable | Writeable
215    ///
216    ///
217    /// #### `overwrite-mode`
218    ///  If text is overwritten when typing in the [`Entry`][crate::Entry].
219    ///
220    /// Readable | Writeable
221    ///
222    ///
223    /// #### `placeholder-text`
224    ///  The text that will be displayed in the [`Entry`][crate::Entry] when it is empty
225    /// and unfocused.
226    ///
227    /// Readable | Writeable
228    ///
229    ///
230    /// #### `populate-all`
231    ///  If :populate-all is [`true`], the [`populate-popup`][struct@crate::Entry#populate-popup]
232    /// signal is also emitted for touch popups.
233    ///
234    /// Readable | Writeable
235    ///
236    ///
237    /// #### `primary-icon-activatable`
238    ///  Whether the primary icon is activatable.
239    ///
240    /// GTK+ emits the [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
241    /// signals only on sensitive, activatable icons.
242    ///
243    /// Sensitive, but non-activatable icons can be used for purely
244    /// informational purposes.
245    ///
246    /// Readable | Writeable
247    ///
248    ///
249    /// #### `primary-icon-gicon`
250    ///  The [`gio::Icon`][crate::gio::Icon] to use for the primary icon for the entry.
251    ///
252    /// Readable | Writeable
253    ///
254    ///
255    /// #### `primary-icon-name`
256    ///  The icon name to use for the primary icon for the entry.
257    ///
258    /// Readable | Writeable
259    ///
260    ///
261    /// #### `primary-icon-pixbuf`
262    ///  A pixbuf to use as the primary icon for the entry.
263    ///
264    /// Readable | Writeable
265    ///
266    ///
267    /// #### `primary-icon-sensitive`
268    ///  Whether the primary icon is sensitive.
269    ///
270    /// An insensitive icon appears grayed out. GTK+ does not emit the
271    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release] signals and
272    /// does not allow DND from insensitive icons.
273    ///
274    /// An icon should be set insensitive if the action that would trigger
275    /// when clicked is currently not available.
276    ///
277    /// Readable | Writeable
278    ///
279    ///
280    /// #### `primary-icon-stock`
281    ///  The stock id to use for the primary icon for the entry.
282    ///
283    /// Readable | Writeable
284    ///
285    ///
286    /// #### `primary-icon-storage-type`
287    ///  The representation which is used for the primary icon of the entry.
288    ///
289    /// Readable
290    ///
291    ///
292    /// #### `primary-icon-tooltip-markup`
293    ///  The contents of the tooltip on the primary icon, which is marked up
294    /// with the [Pango text markup language][PangoMarkupFormat].
295    ///
296    /// Also see [`EntryExt::set_icon_tooltip_markup()`][crate::prelude::EntryExt::set_icon_tooltip_markup()].
297    ///
298    /// Readable | Writeable
299    ///
300    ///
301    /// #### `primary-icon-tooltip-text`
302    ///  The contents of the tooltip on the primary icon.
303    ///
304    /// Also see [`EntryExt::set_icon_tooltip_text()`][crate::prelude::EntryExt::set_icon_tooltip_text()].
305    ///
306    /// Readable | Writeable
307    ///
308    ///
309    /// #### `progress-fraction`
310    ///  The current fraction of the task that's been completed.
311    ///
312    /// Readable | Writeable
313    ///
314    ///
315    /// #### `progress-pulse-step`
316    ///  The fraction of total entry width to move the progress
317    /// bouncing block for each call to [`EntryExt::progress_pulse()`][crate::prelude::EntryExt::progress_pulse()].
318    ///
319    /// Readable | Writeable
320    ///
321    ///
322    /// #### `scroll-offset`
323    ///  Readable
324    ///
325    ///
326    /// #### `secondary-icon-activatable`
327    ///  Whether the secondary icon is activatable.
328    ///
329    /// GTK+ emits the [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
330    /// signals only on sensitive, activatable icons.
331    ///
332    /// Sensitive, but non-activatable icons can be used for purely
333    /// informational purposes.
334    ///
335    /// Readable | Writeable
336    ///
337    ///
338    /// #### `secondary-icon-gicon`
339    ///  The [`gio::Icon`][crate::gio::Icon] to use for the secondary icon for the entry.
340    ///
341    /// Readable | Writeable
342    ///
343    ///
344    /// #### `secondary-icon-name`
345    ///  The icon name to use for the secondary icon for the entry.
346    ///
347    /// Readable | Writeable
348    ///
349    ///
350    /// #### `secondary-icon-pixbuf`
351    ///  An pixbuf to use as the secondary icon for the entry.
352    ///
353    /// Readable | Writeable
354    ///
355    ///
356    /// #### `secondary-icon-sensitive`
357    ///  Whether the secondary icon is sensitive.
358    ///
359    /// An insensitive icon appears grayed out. GTK+ does not emit the
360    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release] signals and
361    /// does not allow DND from insensitive icons.
362    ///
363    /// An icon should be set insensitive if the action that would trigger
364    /// when clicked is currently not available.
365    ///
366    /// Readable | Writeable
367    ///
368    ///
369    /// #### `secondary-icon-stock`
370    ///  The stock id to use for the secondary icon for the entry.
371    ///
372    /// Readable | Writeable
373    ///
374    ///
375    /// #### `secondary-icon-storage-type`
376    ///  The representation which is used for the secondary icon of the entry.
377    ///
378    /// Readable
379    ///
380    ///
381    /// #### `secondary-icon-tooltip-markup`
382    ///  The contents of the tooltip on the secondary icon, which is marked up
383    /// with the [Pango text markup language][PangoMarkupFormat].
384    ///
385    /// Also see [`EntryExt::set_icon_tooltip_markup()`][crate::prelude::EntryExt::set_icon_tooltip_markup()].
386    ///
387    /// Readable | Writeable
388    ///
389    ///
390    /// #### `secondary-icon-tooltip-text`
391    ///  The contents of the tooltip on the secondary icon.
392    ///
393    /// Also see [`EntryExt::set_icon_tooltip_text()`][crate::prelude::EntryExt::set_icon_tooltip_text()].
394    ///
395    /// Readable | Writeable
396    ///
397    ///
398    /// #### `selection-bound`
399    ///  Readable
400    ///
401    ///
402    /// #### `shadow-type`
403    ///  Which kind of shadow to draw around the entry when
404    /// [`has-frame`][struct@crate::Entry#has-frame] is set to [`true`].
405    ///
406    /// Readable | Writeable
407    ///
408    ///
409    /// #### `show-emoji-icon`
410    ///  Readable | Writeable
411    ///
412    ///
413    /// #### `tabs`
414    ///  Readable | Writeable
415    ///
416    ///
417    /// #### `text`
418    ///  Readable | Writeable
419    ///
420    ///
421    /// #### `text-length`
422    ///  The length of the text in the [`Entry`][crate::Entry].
423    ///
424    /// Readable
425    ///
426    ///
427    /// #### `truncate-multiline`
428    ///  When [`true`], pasted multi-line text is truncated to the first line.
429    ///
430    /// Readable | Writeable
431    ///
432    ///
433    /// #### `visibility`
434    ///  Readable | Writeable
435    ///
436    ///
437    /// #### `width-chars`
438    ///  Readable | Writeable
439    ///
440    ///
441    /// #### `xalign`
442    ///  The horizontal alignment, from 0 (left) to 1 (right).
443    /// Reversed for RTL layouts.
444    ///
445    /// Readable | Writeable
446    /// <details><summary><h4>Widget</h4></summary>
447    ///
448    ///
449    /// #### `app-paintable`
450    ///  Readable | Writeable
451    ///
452    ///
453    /// #### `can-default`
454    ///  Readable | Writeable
455    ///
456    ///
457    /// #### `can-focus`
458    ///  Readable | Writeable
459    ///
460    ///
461    /// #### `composite-child`
462    ///  Readable
463    ///
464    ///
465    /// #### `double-buffered`
466    ///  Whether the widget is double buffered.
467    ///
468    /// Readable | Writeable
469    ///
470    ///
471    /// #### `events`
472    ///  Readable | Writeable
473    ///
474    ///
475    /// #### `expand`
476    ///  Whether to expand in both directions. Setting this sets both [`hexpand`][struct@crate::Widget#hexpand] and [`vexpand`][struct@crate::Widget#vexpand]
477    ///
478    /// Readable | Writeable
479    ///
480    ///
481    /// #### `focus-on-click`
482    ///  Whether the widget should grab focus when it is clicked with the mouse.
483    ///
484    /// This property is only relevant for widgets that can take focus.
485    ///
486    /// Before 3.20, several widgets (GtkButton, GtkFileChooserButton,
487    /// GtkComboBox) implemented this property individually.
488    ///
489    /// Readable | Writeable
490    ///
491    ///
492    /// #### `halign`
493    ///  How to distribute horizontal space if widget gets extra space, see [`Align`][crate::Align]
494    ///
495    /// Readable | Writeable
496    ///
497    ///
498    /// #### `has-default`
499    ///  Readable | Writeable
500    ///
501    ///
502    /// #### `has-focus`
503    ///  Readable | Writeable
504    ///
505    ///
506    /// #### `has-tooltip`
507    ///  Enables or disables the emission of [`query-tooltip`][struct@crate::Widget#query-tooltip] on `widget`.
508    /// A value of [`true`] indicates that `widget` can have a tooltip, in this case
509    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to determine
510    /// whether it will provide a tooltip or not.
511    ///
512    /// Note that setting this property to [`true`] for the first time will change
513    /// the event masks of the GdkWindows of this widget to include leave-notify
514    /// and motion-notify events. This cannot and will not be undone when the
515    /// property is set to [`false`] again.
516    ///
517    /// Readable | Writeable
518    ///
519    ///
520    /// #### `height-request`
521    ///  Readable | Writeable
522    ///
523    ///
524    /// #### `hexpand`
525    ///  Whether to expand horizontally. See [`WidgetExt::set_hexpand()`][crate::prelude::WidgetExt::set_hexpand()].
526    ///
527    /// Readable | Writeable
528    ///
529    ///
530    /// #### `hexpand-set`
531    ///  Whether to use the [`hexpand`][struct@crate::Widget#hexpand] property. See [`WidgetExt::is_hexpand_set()`][crate::prelude::WidgetExt::is_hexpand_set()].
532    ///
533    /// Readable | Writeable
534    ///
535    ///
536    /// #### `is-focus`
537    ///  Readable | Writeable
538    ///
539    ///
540    /// #### `margin`
541    ///  Sets all four sides' margin at once. If read, returns max
542    /// margin on any side.
543    ///
544    /// Readable | Writeable
545    ///
546    ///
547    /// #### `margin-bottom`
548    ///  Margin on bottom side of widget.
549    ///
550    /// This property adds margin outside of the widget's normal size
551    /// request, the margin will be added in addition to the size from
552    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
553    ///
554    /// Readable | Writeable
555    ///
556    ///
557    /// #### `margin-end`
558    ///  Margin on end of widget, horizontally. This property supports
559    /// left-to-right and right-to-left text directions.
560    ///
561    /// This property adds margin outside of the widget's normal size
562    /// request, the margin will be added in addition to the size from
563    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
564    ///
565    /// Readable | Writeable
566    ///
567    ///
568    /// #### `margin-left`
569    ///  Margin on left side of widget.
570    ///
571    /// This property adds margin outside of the widget's normal size
572    /// request, the margin will be added in addition to the size from
573    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
574    ///
575    /// Readable | Writeable
576    ///
577    ///
578    /// #### `margin-right`
579    ///  Margin on right side of widget.
580    ///
581    /// This property adds margin outside of the widget's normal size
582    /// request, the margin will be added in addition to the size from
583    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
584    ///
585    /// Readable | Writeable
586    ///
587    ///
588    /// #### `margin-start`
589    ///  Margin on start of widget, horizontally. This property supports
590    /// left-to-right and right-to-left text directions.
591    ///
592    /// This property adds margin outside of the widget's normal size
593    /// request, the margin will be added in addition to the size from
594    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
595    ///
596    /// Readable | Writeable
597    ///
598    ///
599    /// #### `margin-top`
600    ///  Margin on top side of widget.
601    ///
602    /// This property adds margin outside of the widget's normal size
603    /// request, the margin will be added in addition to the size from
604    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
605    ///
606    /// Readable | Writeable
607    ///
608    ///
609    /// #### `name`
610    ///  Readable | Writeable
611    ///
612    ///
613    /// #### `no-show-all`
614    ///  Readable | Writeable
615    ///
616    ///
617    /// #### `opacity`
618    ///  The requested opacity of the widget. See [`WidgetExt::set_opacity()`][crate::prelude::WidgetExt::set_opacity()] for
619    /// more details about window opacity.
620    ///
621    /// Before 3.8 this was only available in GtkWindow
622    ///
623    /// Readable | Writeable
624    ///
625    ///
626    /// #### `parent`
627    ///  Readable | Writeable
628    ///
629    ///
630    /// #### `receives-default`
631    ///  Readable | Writeable
632    ///
633    ///
634    /// #### `scale-factor`
635    ///  The scale factor of the widget. See [`WidgetExt::scale_factor()`][crate::prelude::WidgetExt::scale_factor()] for
636    /// more details about widget scaling.
637    ///
638    /// Readable
639    ///
640    ///
641    /// #### `sensitive`
642    ///  Readable | Writeable
643    ///
644    ///
645    /// #### `style`
646    ///  The style of the widget, which contains information about how it will look (colors, etc).
647    ///
648    /// Readable | Writeable
649    ///
650    ///
651    /// #### `tooltip-markup`
652    ///  Sets the text of tooltip to be the given string, which is marked up
653    /// with the [Pango text markup language][PangoMarkupFormat].
654    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
655    ///
656    /// This is a convenience property which will take care of getting the
657    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
658    /// will automatically be set to [`true`] and there will be taken care of
659    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
660    ///
661    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
662    /// are set, the last one wins.
663    ///
664    /// Readable | Writeable
665    ///
666    ///
667    /// #### `tooltip-text`
668    ///  Sets the text of tooltip to be the given string.
669    ///
670    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
671    ///
672    /// This is a convenience property which will take care of getting the
673    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
674    /// will automatically be set to [`true`] and there will be taken care of
675    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
676    ///
677    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
678    /// are set, the last one wins.
679    ///
680    /// Readable | Writeable
681    ///
682    ///
683    /// #### `valign`
684    ///  How to distribute vertical space if widget gets extra space, see [`Align`][crate::Align]
685    ///
686    /// Readable | Writeable
687    ///
688    ///
689    /// #### `vexpand`
690    ///  Whether to expand vertically. See [`WidgetExt::set_vexpand()`][crate::prelude::WidgetExt::set_vexpand()].
691    ///
692    /// Readable | Writeable
693    ///
694    ///
695    /// #### `vexpand-set`
696    ///  Whether to use the [`vexpand`][struct@crate::Widget#vexpand] property. See [`WidgetExt::is_vexpand_set()`][crate::prelude::WidgetExt::is_vexpand_set()].
697    ///
698    /// Readable | Writeable
699    ///
700    ///
701    /// #### `visible`
702    ///  Readable | Writeable
703    ///
704    ///
705    /// #### `width-request`
706    ///  Readable | Writeable
707    ///
708    ///
709    /// #### `window`
710    ///  The widget's window if it is realized, [`None`] otherwise.
711    ///
712    /// Readable
713    /// </details>
714    /// <details><summary><h4>CellEditable</h4></summary>
715    ///
716    ///
717    /// #### `editing-canceled`
718    ///  Indicates whether editing on the cell has been canceled.
719    ///
720    /// Readable | Writeable
721    /// </details>
722    ///
723    /// ## Signals
724    ///
725    ///
726    /// #### `activate`
727    ///  The ::activate signal is emitted when the user hits
728    /// the Enter key.
729    ///
730    /// While this signal is used as a
731    /// [keybinding signal][GtkBindingSignal],
732    /// it is also commonly used by applications to intercept
733    /// activation of entries.
734    ///
735    /// The default bindings for this signal are all forms of the Enter key.
736    ///
737    /// Action
738    ///
739    ///
740    /// #### `backspace`
741    ///  The ::backspace signal is a
742    /// [keybinding signal][GtkBindingSignal]
743    /// which gets emitted when the user asks for it.
744    ///
745    /// The default bindings for this signal are
746    /// Backspace and Shift-Backspace.
747    ///
748    /// Action
749    ///
750    ///
751    /// #### `copy-clipboard`
752    ///  The ::copy-clipboard signal is a
753    /// [keybinding signal][GtkBindingSignal]
754    /// which gets emitted to copy the selection to the clipboard.
755    ///
756    /// The default bindings for this signal are
757    /// Ctrl-c and Ctrl-Insert.
758    ///
759    /// Action
760    ///
761    ///
762    /// #### `cut-clipboard`
763    ///  The ::cut-clipboard signal is a
764    /// [keybinding signal][GtkBindingSignal]
765    /// which gets emitted to cut the selection to the clipboard.
766    ///
767    /// The default bindings for this signal are
768    /// Ctrl-x and Shift-Delete.
769    ///
770    /// Action
771    ///
772    ///
773    /// #### `delete-from-cursor`
774    ///  The ::delete-from-cursor signal is a
775    /// [keybinding signal][GtkBindingSignal]
776    /// which gets emitted when the user initiates a text deletion.
777    ///
778    /// If the `type_` is [`DeleteType::Chars`][crate::DeleteType::Chars], GTK+ deletes the selection
779    /// if there is one, otherwise it deletes the requested number
780    /// of characters.
781    ///
782    /// The default bindings for this signal are
783    /// Delete for deleting a character and Ctrl-Delete for
784    /// deleting a word.
785    ///
786    /// Action
787    ///
788    ///
789    /// #### `icon-press`
790    ///  The ::icon-press signal is emitted when an activatable icon
791    /// is clicked.
792    ///
793    ///
794    ///
795    ///
796    /// #### `icon-release`
797    ///  The ::icon-release signal is emitted on the button release from a
798    /// mouse click over an activatable icon.
799    ///
800    ///
801    ///
802    ///
803    /// #### `insert-at-cursor`
804    ///  The ::insert-at-cursor signal is a
805    /// [keybinding signal][GtkBindingSignal]
806    /// which gets emitted when the user initiates the insertion of a
807    /// fixed string at the cursor.
808    ///
809    /// This signal has no default bindings.
810    ///
811    /// Action
812    ///
813    ///
814    /// #### `insert-emoji`
815    ///  The ::insert-emoji signal is a
816    /// [keybinding signal][GtkBindingSignal]
817    /// which gets emitted to present the Emoji chooser for the `entry`.
818    ///
819    /// The default bindings for this signal are Ctrl-. and Ctrl-;
820    ///
821    /// Action
822    ///
823    ///
824    /// #### `move-cursor`
825    ///  The ::move-cursor signal is a
826    /// [keybinding signal][GtkBindingSignal]
827    /// which gets emitted when the user initiates a cursor movement.
828    /// If the cursor is not visible in `entry`, this signal causes
829    /// the viewport to be moved instead.
830    ///
831    /// Applications should not connect to it, but may emit it with
832    /// `g_signal_emit_by_name()` if they need to control the cursor
833    /// programmatically.
834    ///
835    /// The default bindings for this signal come in two variants,
836    /// the variant with the Shift modifier extends the selection,
837    /// the variant without the Shift modifer does not.
838    /// There are too many key combinations to list them all here.
839    /// - Arrow keys move by individual characters/lines
840    /// - Ctrl-arrow key combinations move by words/paragraphs
841    /// - Home/End keys move to the ends of the buffer
842    ///
843    /// Action
844    ///
845    ///
846    /// #### `paste-clipboard`
847    ///  The ::paste-clipboard signal is a
848    /// [keybinding signal][GtkBindingSignal]
849    /// which gets emitted to paste the contents of the clipboard
850    /// into the text view.
851    ///
852    /// The default bindings for this signal are
853    /// Ctrl-v and Shift-Insert.
854    ///
855    /// Action
856    ///
857    ///
858    /// #### `populate-popup`
859    ///  The ::populate-popup signal gets emitted before showing the
860    /// context menu of the entry.
861    ///
862    /// If you need to add items to the context menu, connect
863    /// to this signal and append your items to the `widget`, which
864    /// will be a [`Menu`][crate::Menu] in this case.
865    ///
866    /// If [`populate-all`][struct@crate::Entry#populate-all] is [`true`], this signal will
867    /// also be emitted to populate touch popups. In this case,
868    /// `widget` will be a different container, e.g. a [`Toolbar`][crate::Toolbar].
869    /// The signal handler should not make assumptions about the
870    /// type of `widget`.
871    ///
872    ///
873    ///
874    ///
875    /// #### `preedit-changed`
876    ///  If an input method is used, the typed text will not immediately
877    /// be committed to the buffer. So if you are interested in the text,
878    /// connect to this signal.
879    ///
880    /// Action
881    ///
882    ///
883    /// #### `toggle-overwrite`
884    ///  The ::toggle-overwrite signal is a
885    /// [keybinding signal][GtkBindingSignal]
886    /// which gets emitted to toggle the overwrite mode of the entry.
887    ///
888    /// The default bindings for this signal is Insert.
889    ///
890    /// Action
891    /// <details><summary><h4>Widget</h4></summary>
892    ///
893    ///
894    /// #### `accel-closures-changed`
895    ///
896    ///
897    ///
898    /// #### `button-press-event`
899    ///  The ::button-press-event signal will be emitted when a button
900    /// (typically from a mouse) is pressed.
901    ///
902    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the
903    /// widget needs to enable the [`gdk::EventMask::BUTTON_PRESS_MASK`][crate::gdk::EventMask::BUTTON_PRESS_MASK] mask.
904    ///
905    /// This signal will be sent to the grab widget if there is one.
906    ///
907    ///
908    ///
909    ///
910    /// #### `button-release-event`
911    ///  The ::button-release-event signal will be emitted when a button
912    /// (typically from a mouse) is released.
913    ///
914    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the
915    /// widget needs to enable the [`gdk::EventMask::BUTTON_RELEASE_MASK`][crate::gdk::EventMask::BUTTON_RELEASE_MASK] mask.
916    ///
917    /// This signal will be sent to the grab widget if there is one.
918    ///
919    ///
920    ///
921    ///
922    /// #### `can-activate-accel`
923    ///  Determines whether an accelerator that activates the signal
924    /// identified by `signal_id` can currently be activated.
925    /// This signal is present to allow applications and derived
926    /// widgets to override the default [`Widget`][crate::Widget] handling
927    /// for determining whether an accelerator can be activated.
928    ///
929    ///
930    ///
931    ///
932    /// #### `child-notify`
933    ///  The ::child-notify signal is emitted for each
934    /// [child property][child-properties] that has
935    /// changed on an object. The signal's detail holds the property name.
936    ///
937    /// Detailed
938    ///
939    ///
940    /// #### `composited-changed`
941    ///  The ::composited-changed signal is emitted when the composited
942    /// status of `widgets` screen changes.
943    /// See [`Screen::is_composited()`][crate::gdk::Screen::is_composited()].
944    ///
945    /// Action
946    ///
947    ///
948    /// #### `configure-event`
949    ///  The ::configure-event signal will be emitted when the size, position or
950    /// stacking of the `widget`'s window has changed.
951    ///
952    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
953    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
954    /// automatically for all new windows.
955    ///
956    ///
957    ///
958    ///
959    /// #### `damage-event`
960    ///  Emitted when a redirected window belonging to `widget` gets drawn into.
961    /// The region/area members of the event shows what area of the redirected
962    /// drawable was drawn into.
963    ///
964    ///
965    ///
966    ///
967    /// #### `delete-event`
968    ///  The ::delete-event signal is emitted if a user requests that
969    /// a toplevel window is closed. The default handler for this signal
970    /// destroys the window. Connecting [`WidgetExtManual::hide_on_delete()`][crate::prelude::WidgetExtManual::hide_on_delete()] to
971    /// this signal will cause the window to be hidden instead, so that
972    /// it can later be shown again without reconstructing it.
973    ///
974    ///
975    ///
976    ///
977    /// #### `destroy`
978    ///  Signals that all holders of a reference to the widget should release
979    /// the reference that they hold. May result in finalization of the widget
980    /// if all references are released.
981    ///
982    /// This signal is not suitable for saving widget state.
983    ///
984    ///
985    ///
986    ///
987    /// #### `destroy-event`
988    ///  The ::destroy-event signal is emitted when a [`gdk::Window`][crate::gdk::Window] is destroyed.
989    /// You rarely get this signal, because most widgets disconnect themselves
990    /// from their window before they destroy it, so no widget owns the
991    /// window at destroy time.
992    ///
993    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
994    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
995    /// automatically for all new windows.
996    ///
997    ///
998    ///
999    ///
1000    /// #### `direction-changed`
1001    ///  The ::direction-changed signal is emitted when the text direction
1002    /// of a widget changes.
1003    ///
1004    ///
1005    ///
1006    ///
1007    /// #### `drag-begin`
1008    ///  The ::drag-begin signal is emitted on the drag source when a drag is
1009    /// started. A typical reason to connect to this signal is to set up a
1010    /// custom drag icon with e.g. [`WidgetExt::drag_source_set_icon_pixbuf()`][crate::prelude::WidgetExt::drag_source_set_icon_pixbuf()].
1011    ///
1012    /// Note that some widgets set up a drag icon in the default handler of
1013    /// this signal, so you may have to use `g_signal_connect_after()` to
1014    /// override what the default handler did.
1015    ///
1016    ///
1017    ///
1018    ///
1019    /// #### `drag-data-delete`
1020    ///  The ::drag-data-delete signal is emitted on the drag source when a drag
1021    /// with the action [`gdk::DragAction::MOVE`][crate::gdk::DragAction::MOVE] is successfully completed. The signal
1022    /// handler is responsible for deleting the data that has been dropped. What
1023    /// "delete" means depends on the context of the drag operation.
1024    ///
1025    ///
1026    ///
1027    ///
1028    /// #### `drag-data-get`
1029    ///  The ::drag-data-get signal is emitted on the drag source when the drop
1030    /// site requests the data which is dragged. It is the responsibility of
1031    /// the signal handler to fill `data` with the data in the format which
1032    /// is indicated by `info`. See [`SelectionData::set()`][crate::SelectionData::set()] and
1033    /// [`SelectionData::set_text()`][crate::SelectionData::set_text()].
1034    ///
1035    ///
1036    ///
1037    ///
1038    /// #### `drag-data-received`
1039    ///  The ::drag-data-received signal is emitted on the drop site when the
1040    /// dragged data has been received. If the data was received in order to
1041    /// determine whether the drop will be accepted, the handler is expected
1042    /// to call `gdk_drag_status()` and not finish the drag.
1043    /// If the data was received in response to a [`drag-drop`][struct@crate::Widget#drag-drop] signal
1044    /// (and this is the last target to be received), the handler for this
1045    /// signal is expected to process the received data and then call
1046    /// `gtk_drag_finish()`, setting the `success` parameter depending on
1047    /// whether the data was processed successfully.
1048    ///
1049    /// Applications must create some means to determine why the signal was emitted
1050    /// and therefore whether to call `gdk_drag_status()` or `gtk_drag_finish()`.
1051    ///
1052    /// The handler may inspect the selected action with
1053    /// [`DragContext::selected_action()`][crate::gdk::DragContext::selected_action()] before calling
1054    /// `gtk_drag_finish()`, e.g. to implement [`gdk::DragAction::ASK`][crate::gdk::DragAction::ASK] as
1055    /// shown in the following example:
1056    ///
1057    ///
1058    /// **⚠️ The following code is in C ⚠️**
1059    ///
1060    /// ```C
1061    /// void
1062    /// drag_data_received (GtkWidget          *widget,
1063    ///                     GdkDragContext     *context,
1064    ///                     gint                x,
1065    ///                     gint                y,
1066    ///                     GtkSelectionData   *data,
1067    ///                     guint               info,
1068    ///                     guint               time)
1069    /// {
1070    ///   if ((data->length >= 0) && (data->format == 8))
1071    ///     {
1072    ///       GdkDragAction action;
1073    ///
1074    ///       // handle data here
1075    ///
1076    ///       action = gdk_drag_context_get_selected_action (context);
1077    ///       if (action == GDK_ACTION_ASK)
1078    ///         {
1079    ///           GtkWidget *dialog;
1080    ///           gint response;
1081    ///
1082    ///           dialog = gtk_message_dialog_new (NULL,
1083    ///                                            GTK_DIALOG_MODAL |
1084    ///                                            GTK_DIALOG_DESTROY_WITH_PARENT,
1085    ///                                            GTK_MESSAGE_INFO,
1086    ///                                            GTK_BUTTONS_YES_NO,
1087    ///                                            "Move the data ?\n");
1088    ///           response = gtk_dialog_run (GTK_DIALOG (dialog));
1089    ///           gtk_widget_destroy (dialog);
1090    ///
1091    ///           if (response == GTK_RESPONSE_YES)
1092    ///             action = GDK_ACTION_MOVE;
1093    ///           else
1094    ///             action = GDK_ACTION_COPY;
1095    ///          }
1096    ///
1097    ///       gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time);
1098    ///     }
1099    ///   else
1100    ///     gtk_drag_finish (context, FALSE, FALSE, time);
1101    ///  }
1102    /// ```
1103    ///
1104    ///
1105    ///
1106    ///
1107    /// #### `drag-drop`
1108    ///  The ::drag-drop signal is emitted on the drop site when the user drops
1109    /// the data onto the widget. The signal handler must determine whether
1110    /// the cursor position is in a drop zone or not. If it is not in a drop
1111    /// zone, it returns [`false`] and no further processing is necessary.
1112    /// Otherwise, the handler returns [`true`]. In this case, the handler must
1113    /// ensure that `gtk_drag_finish()` is called to let the source know that
1114    /// the drop is done. The call to `gtk_drag_finish()` can be done either
1115    /// directly or in a [`drag-data-received`][struct@crate::Widget#drag-data-received] handler which gets
1116    /// triggered by calling [`WidgetExt::drag_get_data()`][crate::prelude::WidgetExt::drag_get_data()] to receive the data for one
1117    /// or more of the supported targets.
1118    ///
1119    ///
1120    ///
1121    ///
1122    /// #### `drag-end`
1123    ///  The ::drag-end signal is emitted on the drag source when a drag is
1124    /// finished. A typical reason to connect to this signal is to undo
1125    /// things done in [`drag-begin`][struct@crate::Widget#drag-begin].
1126    ///
1127    ///
1128    ///
1129    ///
1130    /// #### `drag-failed`
1131    ///  The ::drag-failed signal is emitted on the drag source when a drag has
1132    /// failed. The signal handler may hook custom code to handle a failed DnD
1133    /// operation based on the type of error, it returns [`true`] is the failure has
1134    /// been already handled (not showing the default "drag operation failed"
1135    /// animation), otherwise it returns [`false`].
1136    ///
1137    ///
1138    ///
1139    ///
1140    /// #### `drag-leave`
1141    ///  The ::drag-leave signal is emitted on the drop site when the cursor
1142    /// leaves the widget. A typical reason to connect to this signal is to
1143    /// undo things done in [`drag-motion`][struct@crate::Widget#drag-motion], e.g. undo highlighting
1144    /// with [`WidgetExt::drag_unhighlight()`][crate::prelude::WidgetExt::drag_unhighlight()].
1145    ///
1146    ///
1147    /// Likewise, the [`drag-leave`][struct@crate::Widget#drag-leave] signal is also emitted before the
1148    /// ::drag-drop signal, for instance to allow cleaning up of a preview item
1149    /// created in the [`drag-motion`][struct@crate::Widget#drag-motion] signal handler.
1150    ///
1151    ///
1152    ///
1153    ///
1154    /// #### `drag-motion`
1155    ///  The ::drag-motion signal is emitted on the drop site when the user
1156    /// moves the cursor over the widget during a drag. The signal handler
1157    /// must determine whether the cursor position is in a drop zone or not.
1158    /// If it is not in a drop zone, it returns [`false`] and no further processing
1159    /// is necessary. Otherwise, the handler returns [`true`]. In this case, the
1160    /// handler is responsible for providing the necessary information for
1161    /// displaying feedback to the user, by calling `gdk_drag_status()`.
1162    ///
1163    /// If the decision whether the drop will be accepted or rejected can't be
1164    /// made based solely on the cursor position and the type of the data, the
1165    /// handler may inspect the dragged data by calling [`WidgetExt::drag_get_data()`][crate::prelude::WidgetExt::drag_get_data()] and
1166    /// defer the `gdk_drag_status()` call to the [`drag-data-received`][struct@crate::Widget#drag-data-received]
1167    /// handler. Note that you must pass [`DestDefaults::DROP`][crate::DestDefaults::DROP],
1168    /// [`DestDefaults::MOTION`][crate::DestDefaults::MOTION] or [`DestDefaults::ALL`][crate::DestDefaults::ALL] to [`WidgetExtManual::drag_dest_set()`][crate::prelude::WidgetExtManual::drag_dest_set()]
1169    /// when using the drag-motion signal that way.
1170    ///
1171    /// Also note that there is no drag-enter signal. The drag receiver has to
1172    /// keep track of whether he has received any drag-motion signals since the
1173    /// last [`drag-leave`][struct@crate::Widget#drag-leave] and if not, treat the drag-motion signal as
1174    /// an "enter" signal. Upon an "enter", the handler will typically highlight
1175    /// the drop site with [`WidgetExt::drag_highlight()`][crate::prelude::WidgetExt::drag_highlight()].
1176    ///
1177    ///
1178    /// **⚠️ The following code is in C ⚠️**
1179    ///
1180    /// ```C
1181    /// static void
1182    /// drag_motion (GtkWidget      *widget,
1183    ///              GdkDragContext *context,
1184    ///              gint            x,
1185    ///              gint            y,
1186    ///              guint           time)
1187    /// {
1188    ///   GdkAtom target;
1189    ///
1190    ///   PrivateData *private_data = GET_PRIVATE_DATA (widget);
1191    ///
1192    ///   if (!private_data->drag_highlight)
1193    ///    {
1194    ///      private_data->drag_highlight = 1;
1195    ///      gtk_drag_highlight (widget);
1196    ///    }
1197    ///
1198    ///   target = gtk_drag_dest_find_target (widget, context, NULL);
1199    ///   if (target == GDK_NONE)
1200    ///     gdk_drag_status (context, 0, time);
1201    ///   else
1202    ///    {
1203    ///      private_data->pending_status
1204    ///         = gdk_drag_context_get_suggested_action (context);
1205    ///      gtk_drag_get_data (widget, context, target, time);
1206    ///    }
1207    ///
1208    ///   return TRUE;
1209    /// }
1210    ///
1211    /// static void
1212    /// drag_data_received (GtkWidget        *widget,
1213    ///                     GdkDragContext   *context,
1214    ///                     gint              x,
1215    ///                     gint              y,
1216    ///                     GtkSelectionData *selection_data,
1217    ///                     guint             info,
1218    ///                     guint             time)
1219    /// {
1220    ///   PrivateData *private_data = GET_PRIVATE_DATA (widget);
1221    ///
1222    ///   if (private_data->suggested_action)
1223    ///    {
1224    ///      private_data->suggested_action = 0;
1225    ///
1226    ///      // We are getting this data due to a request in drag_motion,
1227    ///      // rather than due to a request in drag_drop, so we are just
1228    ///      // supposed to call gdk_drag_status(), not actually paste in
1229    ///      // the data.
1230    ///
1231    ///      str = gtk_selection_data_get_text (selection_data);
1232    ///      if (!data_is_acceptable (str))
1233    ///        gdk_drag_status (context, 0, time);
1234    ///      else
1235    ///        gdk_drag_status (context,
1236    ///                         private_data->suggested_action,
1237    ///                         time);
1238    ///    }
1239    ///   else
1240    ///    {
1241    ///      // accept the drop
1242    ///    }
1243    /// }
1244    /// ```
1245    ///
1246    ///
1247    ///
1248    ///
1249    /// #### `draw`
1250    ///  This signal is emitted when a widget is supposed to render itself.
1251    /// The `widget`'s top left corner must be painted at the origin of
1252    /// the passed in context and be sized to the values returned by
1253    /// [`WidgetExt::allocated_width()`][crate::prelude::WidgetExt::allocated_width()] and
1254    /// [`WidgetExt::allocated_height()`][crate::prelude::WidgetExt::allocated_height()].
1255    ///
1256    /// Signal handlers connected to this signal can modify the cairo
1257    /// context passed as `cr` in any way they like and don't need to
1258    /// restore it. The signal emission takes care of calling `cairo_save()`
1259    /// before and `cairo_restore()` after invoking the handler.
1260    ///
1261    /// The signal handler will get a `cr` with a clip region already set to the
1262    /// widget's dirty region, i.e. to the area that needs repainting. Complicated
1263    /// widgets that want to avoid redrawing themselves completely can get the full
1264    /// extents of the clip region with `gdk_cairo_get_clip_rectangle()`, or they can
1265    /// get a finer-grained representation of the dirty region with
1266    /// `cairo_copy_clip_rectangle_list()`.
1267    ///
1268    ///
1269    ///
1270    ///
1271    /// #### `enter-notify-event`
1272    ///  The ::enter-notify-event will be emitted when the pointer enters
1273    /// the `widget`'s window.
1274    ///
1275    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1276    /// to enable the [`gdk::EventMask::ENTER_NOTIFY_MASK`][crate::gdk::EventMask::ENTER_NOTIFY_MASK] mask.
1277    ///
1278    /// This signal will be sent to the grab widget if there is one.
1279    ///
1280    ///
1281    ///
1282    ///
1283    /// #### `event`
1284    ///  The GTK+ main loop will emit three signals for each GDK event delivered
1285    /// to a widget: one generic ::event signal, another, more specific,
1286    /// signal that matches the type of event delivered (e.g.
1287    /// [`key-press-event`][struct@crate::Widget#key-press-event]) and finally a generic
1288    /// [`event-after`][struct@crate::Widget#event-after] signal.
1289    ///
1290    ///
1291    ///
1292    ///
1293    /// #### `event-after`
1294    ///  After the emission of the [`event`][struct@crate::Widget#event] signal and (optionally)
1295    /// the second more specific signal, ::event-after will be emitted
1296    /// regardless of the previous two signals handlers return values.
1297    ///
1298    ///
1299    ///
1300    ///
1301    /// #### `focus`
1302    ///
1303    ///
1304    ///
1305    /// #### `focus-in-event`
1306    ///  The ::focus-in-event signal will be emitted when the keyboard focus
1307    /// enters the `widget`'s window.
1308    ///
1309    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1310    /// to enable the [`gdk::EventMask::FOCUS_CHANGE_MASK`][crate::gdk::EventMask::FOCUS_CHANGE_MASK] mask.
1311    ///
1312    ///
1313    ///
1314    ///
1315    /// #### `focus-out-event`
1316    ///  The ::focus-out-event signal will be emitted when the keyboard focus
1317    /// leaves the `widget`'s window.
1318    ///
1319    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1320    /// to enable the [`gdk::EventMask::FOCUS_CHANGE_MASK`][crate::gdk::EventMask::FOCUS_CHANGE_MASK] mask.
1321    ///
1322    ///
1323    ///
1324    ///
1325    /// #### `grab-broken-event`
1326    ///  Emitted when a pointer or keyboard grab on a window belonging
1327    /// to `widget` gets broken.
1328    ///
1329    /// On X11, this happens when the grab window becomes unviewable
1330    /// (i.e. it or one of its ancestors is unmapped), or if the same
1331    /// application grabs the pointer or keyboard again.
1332    ///
1333    ///
1334    ///
1335    ///
1336    /// #### `grab-focus`
1337    ///  Action
1338    ///
1339    ///
1340    /// #### `grab-notify`
1341    ///  The ::grab-notify signal is emitted when a widget becomes
1342    /// shadowed by a GTK+ grab (not a pointer or keyboard grab) on
1343    /// another widget, or when it becomes unshadowed due to a grab
1344    /// being removed.
1345    ///
1346    /// A widget is shadowed by a [`WidgetExt::grab_add()`][crate::prelude::WidgetExt::grab_add()] when the topmost
1347    /// grab widget in the grab stack of its window group is not
1348    /// its ancestor.
1349    ///
1350    ///
1351    ///
1352    ///
1353    /// #### `hide`
1354    ///  The ::hide signal is emitted when `widget` is hidden, for example with
1355    /// [`WidgetExt::hide()`][crate::prelude::WidgetExt::hide()].
1356    ///
1357    ///
1358    ///
1359    ///
1360    /// #### `hierarchy-changed`
1361    ///  The ::hierarchy-changed signal is emitted when the
1362    /// anchored state of a widget changes. A widget is
1363    /// “anchored” when its toplevel
1364    /// ancestor is a [`Window`][crate::Window]. This signal is emitted when
1365    /// a widget changes from un-anchored to anchored or vice-versa.
1366    ///
1367    ///
1368    ///
1369    ///
1370    /// #### `key-press-event`
1371    ///  The ::key-press-event signal is emitted when a key is pressed. The signal
1372    /// emission will reoccur at the key-repeat rate when the key is kept pressed.
1373    ///
1374    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1375    /// to enable the [`gdk::EventMask::KEY_PRESS_MASK`][crate::gdk::EventMask::KEY_PRESS_MASK] mask.
1376    ///
1377    /// This signal will be sent to the grab widget if there is one.
1378    ///
1379    ///
1380    ///
1381    ///
1382    /// #### `key-release-event`
1383    ///  The ::key-release-event signal is emitted when a key is released.
1384    ///
1385    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1386    /// to enable the [`gdk::EventMask::KEY_RELEASE_MASK`][crate::gdk::EventMask::KEY_RELEASE_MASK] mask.
1387    ///
1388    /// This signal will be sent to the grab widget if there is one.
1389    ///
1390    ///
1391    ///
1392    ///
1393    /// #### `keynav-failed`
1394    ///  Gets emitted if keyboard navigation fails.
1395    /// See [`WidgetExt::keynav_failed()`][crate::prelude::WidgetExt::keynav_failed()] for details.
1396    ///
1397    ///
1398    ///
1399    ///
1400    /// #### `leave-notify-event`
1401    ///  The ::leave-notify-event will be emitted when the pointer leaves
1402    /// the `widget`'s window.
1403    ///
1404    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1405    /// to enable the [`gdk::EventMask::LEAVE_NOTIFY_MASK`][crate::gdk::EventMask::LEAVE_NOTIFY_MASK] mask.
1406    ///
1407    /// This signal will be sent to the grab widget if there is one.
1408    ///
1409    ///
1410    ///
1411    ///
1412    /// #### `map`
1413    ///  The ::map signal is emitted when `widget` is going to be mapped, that is
1414    /// when the widget is visible (which is controlled with
1415    /// [`WidgetExt::set_visible()`][crate::prelude::WidgetExt::set_visible()]) and all its parents up to the toplevel widget
1416    /// are also visible. Once the map has occurred, [`map-event`][struct@crate::Widget#map-event] will
1417    /// be emitted.
1418    ///
1419    /// The ::map signal can be used to determine whether a widget will be drawn,
1420    /// for instance it can resume an animation that was stopped during the
1421    /// emission of [`unmap`][struct@crate::Widget#unmap].
1422    ///
1423    ///
1424    ///
1425    ///
1426    /// #### `map-event`
1427    ///  The ::map-event signal will be emitted when the `widget`'s window is
1428    /// mapped. A window is mapped when it becomes visible on the screen.
1429    ///
1430    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1431    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
1432    /// automatically for all new windows.
1433    ///
1434    ///
1435    ///
1436    ///
1437    /// #### `mnemonic-activate`
1438    ///  The default handler for this signal activates `widget` if `group_cycling`
1439    /// is [`false`], or just makes `widget` grab focus if `group_cycling` is [`true`].
1440    ///
1441    ///
1442    ///
1443    ///
1444    /// #### `motion-notify-event`
1445    ///  The ::motion-notify-event signal is emitted when the pointer moves
1446    /// over the widget's [`gdk::Window`][crate::gdk::Window].
1447    ///
1448    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget
1449    /// needs to enable the [`gdk::EventMask::POINTER_MOTION_MASK`][crate::gdk::EventMask::POINTER_MOTION_MASK] mask.
1450    ///
1451    /// This signal will be sent to the grab widget if there is one.
1452    ///
1453    ///
1454    ///
1455    ///
1456    /// #### `move-focus`
1457    ///  Action
1458    ///
1459    ///
1460    /// #### `parent-set`
1461    ///  The ::parent-set signal is emitted when a new parent
1462    /// has been set on a widget.
1463    ///
1464    ///
1465    ///
1466    ///
1467    /// #### `popup-menu`
1468    ///  This signal gets emitted whenever a widget should pop up a context
1469    /// menu. This usually happens through the standard key binding mechanism;
1470    /// by pressing a certain key while a widget is focused, the user can cause
1471    /// the widget to pop up a menu. For example, the [`Entry`][crate::Entry] widget creates
1472    /// a menu with clipboard commands. See the
1473    /// [Popup Menu Migration Checklist][checklist-popup-menu]
1474    /// for an example of how to use this signal.
1475    ///
1476    /// Action
1477    ///
1478    ///
1479    /// #### `property-notify-event`
1480    ///  The ::property-notify-event signal will be emitted when a property on
1481    /// the `widget`'s window has been changed or deleted.
1482    ///
1483    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1484    /// to enable the [`gdk::EventMask::PROPERTY_CHANGE_MASK`][crate::gdk::EventMask::PROPERTY_CHANGE_MASK] mask.
1485    ///
1486    ///
1487    ///
1488    ///
1489    /// #### `proximity-in-event`
1490    ///  To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1491    /// to enable the [`gdk::EventMask::PROXIMITY_IN_MASK`][crate::gdk::EventMask::PROXIMITY_IN_MASK] mask.
1492    ///
1493    /// This signal will be sent to the grab widget if there is one.
1494    ///
1495    ///
1496    ///
1497    ///
1498    /// #### `proximity-out-event`
1499    ///  To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1500    /// to enable the [`gdk::EventMask::PROXIMITY_OUT_MASK`][crate::gdk::EventMask::PROXIMITY_OUT_MASK] mask.
1501    ///
1502    /// This signal will be sent to the grab widget if there is one.
1503    ///
1504    ///
1505    ///
1506    ///
1507    /// #### `query-tooltip`
1508    ///  Emitted when [`has-tooltip`][struct@crate::Widget#has-tooltip] is [`true`] and the hover timeout
1509    /// has expired with the cursor hovering "above" `widget`; or emitted when `widget` got
1510    /// focus in keyboard mode.
1511    ///
1512    /// Using the given coordinates, the signal handler should determine
1513    /// whether a tooltip should be shown for `widget`. If this is the case
1514    /// [`true`] should be returned, [`false`] otherwise. Note that if
1515    /// `keyboard_mode` is [`true`], the values of `x` and `y` are undefined and
1516    /// should not be used.
1517    ///
1518    /// The signal handler is free to manipulate `tooltip` with the therefore
1519    /// destined function calls.
1520    ///
1521    ///
1522    ///
1523    ///
1524    /// #### `realize`
1525    ///  The ::realize signal is emitted when `widget` is associated with a
1526    /// [`gdk::Window`][crate::gdk::Window], which means that [`WidgetExt::realize()`][crate::prelude::WidgetExt::realize()] has been called or the
1527    /// widget has been mapped (that is, it is going to be drawn).
1528    ///
1529    ///
1530    ///
1531    ///
1532    /// #### `screen-changed`
1533    ///  The ::screen-changed signal gets emitted when the
1534    /// screen of a widget has changed.
1535    ///
1536    ///
1537    ///
1538    ///
1539    /// #### `scroll-event`
1540    ///  The ::scroll-event signal is emitted when a button in the 4 to 7
1541    /// range is pressed. Wheel mice are usually configured to generate
1542    /// button press events for buttons 4 and 5 when the wheel is turned.
1543    ///
1544    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1545    /// to enable the [`gdk::EventMask::SCROLL_MASK`][crate::gdk::EventMask::SCROLL_MASK] mask.
1546    ///
1547    /// This signal will be sent to the grab widget if there is one.
1548    ///
1549    ///
1550    ///
1551    ///
1552    /// #### `selection-clear-event`
1553    ///  The ::selection-clear-event signal will be emitted when the
1554    /// the `widget`'s window has lost ownership of a selection.
1555    ///
1556    ///
1557    ///
1558    ///
1559    /// #### `selection-get`
1560    ///
1561    ///
1562    ///
1563    /// #### `selection-notify-event`
1564    ///
1565    ///
1566    ///
1567    /// #### `selection-received`
1568    ///
1569    ///
1570    ///
1571    /// #### `selection-request-event`
1572    ///  The ::selection-request-event signal will be emitted when
1573    /// another client requests ownership of the selection owned by
1574    /// the `widget`'s window.
1575    ///
1576    ///
1577    ///
1578    ///
1579    /// #### `show`
1580    ///  The ::show signal is emitted when `widget` is shown, for example with
1581    /// [`WidgetExt::show()`][crate::prelude::WidgetExt::show()].
1582    ///
1583    ///
1584    ///
1585    ///
1586    /// #### `show-help`
1587    ///  Action
1588    ///
1589    ///
1590    /// #### `size-allocate`
1591    ///
1592    ///
1593    ///
1594    /// #### `state-changed`
1595    ///  The ::state-changed signal is emitted when the widget state changes.
1596    /// See `gtk_widget_get_state()`.
1597    ///
1598    ///
1599    ///
1600    ///
1601    /// #### `state-flags-changed`
1602    ///  The ::state-flags-changed signal is emitted when the widget state
1603    /// changes, see [`WidgetExt::state_flags()`][crate::prelude::WidgetExt::state_flags()].
1604    ///
1605    ///
1606    ///
1607    ///
1608    /// #### `style-set`
1609    ///  The ::style-set signal is emitted when a new style has been set
1610    /// on a widget. Note that style-modifying functions like
1611    /// `gtk_widget_modify_base()` also cause this signal to be emitted.
1612    ///
1613    /// Note that this signal is emitted for changes to the deprecated
1614    /// `GtkStyle`. To track changes to the [`StyleContext`][crate::StyleContext] associated
1615    /// with a widget, use the [`style-updated`][struct@crate::Widget#style-updated] signal.
1616    ///
1617    ///
1618    ///
1619    ///
1620    /// #### `style-updated`
1621    ///  The ::style-updated signal is a convenience signal that is emitted when the
1622    /// [`changed`][struct@crate::StyleContext#changed] signal is emitted on the `widget`'s associated
1623    /// [`StyleContext`][crate::StyleContext] as returned by [`WidgetExt::style_context()`][crate::prelude::WidgetExt::style_context()].
1624    ///
1625    /// Note that style-modifying functions like `gtk_widget_override_color()` also
1626    /// cause this signal to be emitted.
1627    ///
1628    ///
1629    ///
1630    ///
1631    /// #### `touch-event`
1632    ///
1633    ///
1634    ///
1635    /// #### `unmap`
1636    ///  The ::unmap signal is emitted when `widget` is going to be unmapped, which
1637    /// means that either it or any of its parents up to the toplevel widget have
1638    /// been set as hidden.
1639    ///
1640    /// As ::unmap indicates that a widget will not be shown any longer, it can be
1641    /// used to, for example, stop an animation on the widget.
1642    ///
1643    ///
1644    ///
1645    ///
1646    /// #### `unmap-event`
1647    ///  The ::unmap-event signal will be emitted when the `widget`'s window is
1648    /// unmapped. A window is unmapped when it becomes invisible on the screen.
1649    ///
1650    /// To receive this signal, the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1651    /// to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable this mask
1652    /// automatically for all new windows.
1653    ///
1654    ///
1655    ///
1656    ///
1657    /// #### `unrealize`
1658    ///  The ::unrealize signal is emitted when the [`gdk::Window`][crate::gdk::Window] associated with
1659    /// `widget` is destroyed, which means that [`WidgetExt::unrealize()`][crate::prelude::WidgetExt::unrealize()] has been
1660    /// called or the widget has been unmapped (that is, it is going to be
1661    /// hidden).
1662    ///
1663    ///
1664    ///
1665    ///
1666    /// #### `visibility-notify-event`
1667    ///  The ::visibility-notify-event will be emitted when the `widget`'s
1668    /// window is obscured or unobscured.
1669    ///
1670    /// To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget needs
1671    /// to enable the [`gdk::EventMask::VISIBILITY_NOTIFY_MASK`][crate::gdk::EventMask::VISIBILITY_NOTIFY_MASK] mask.
1672    ///
1673    ///
1674    ///
1675    ///
1676    /// #### `window-state-event`
1677    ///  The ::window-state-event will be emitted when the state of the
1678    /// toplevel window associated to the `widget` changes.
1679    ///
1680    /// To receive this signal the [`gdk::Window`][crate::gdk::Window] associated to the widget
1681    /// needs to enable the [`gdk::EventMask::STRUCTURE_MASK`][crate::gdk::EventMask::STRUCTURE_MASK] mask. GDK will enable
1682    /// this mask automatically for all new windows.
1683    ///
1684    ///
1685    /// </details>
1686    /// <details><summary><h4>CellEditable</h4></summary>
1687    ///
1688    ///
1689    /// #### `editing-done`
1690    ///  This signal is a sign for the cell renderer to update its
1691    /// value from the `cell_editable`.
1692    ///
1693    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
1694    /// emitting this signal when they are done editing, e.g.
1695    /// [`Entry`][crate::Entry] emits this signal when the user presses Enter. Typical things to
1696    /// do in a handler for ::editing-done are to capture the edited value,
1697    /// disconnect the `cell_editable` from signals on the [`CellRenderer`][crate::CellRenderer], etc.
1698    ///
1699    /// [`CellEditableExt::editing_done()`][crate::prelude::CellEditableExt::editing_done()] is a convenience method
1700    /// for emitting [`editing-done`][struct@crate::CellEditable#editing-done].
1701    ///
1702    ///
1703    ///
1704    ///
1705    /// #### `remove-widget`
1706    ///  This signal is meant to indicate that the cell is finished
1707    /// editing, and the `cell_editable` widget is being removed and may
1708    /// subsequently be destroyed.
1709    ///
1710    /// Implementations of [`CellEditable`][crate::CellEditable] are responsible for
1711    /// emitting this signal when they are done editing. It must
1712    /// be emitted after the [`editing-done`][struct@crate::CellEditable#editing-done] signal,
1713    /// to give the cell renderer a chance to update the cell's value
1714    /// before the widget is removed.
1715    ///
1716    /// [`CellEditableExt::remove_widget()`][crate::prelude::CellEditableExt::remove_widget()] is a convenience method
1717    /// for emitting [`remove-widget`][struct@crate::CellEditable#remove-widget].
1718    ///
1719    ///
1720    /// </details>
1721    /// <details><summary><h4>Editable</h4></summary>
1722    ///
1723    ///
1724    /// #### `changed`
1725    ///  The ::changed signal is emitted at the end of a single
1726    /// user-visible operation on the contents of the [`Editable`][crate::Editable].
1727    ///
1728    /// E.g., a paste operation that replaces the contents of the
1729    /// selection will cause only one signal emission (even though it
1730    /// is implemented by first deleting the selection, then inserting
1731    /// the new content, and may cause multiple ::notify::text signals
1732    /// to be emitted).
1733    ///
1734    ///
1735    ///
1736    ///
1737    /// #### `delete-text`
1738    ///  This signal is emitted when text is deleted from
1739    /// the widget by the user. The default handler for
1740    /// this signal will normally be responsible for deleting
1741    /// the text, so by connecting to this signal and then
1742    /// stopping the signal with `g_signal_stop_emission()`, it
1743    /// is possible to modify the range of deleted text, or
1744    /// prevent it from being deleted entirely. The `start_pos`
1745    /// and `end_pos` parameters are interpreted as for
1746    /// [`EditableExt::delete_text()`][crate::prelude::EditableExt::delete_text()].
1747    ///
1748    ///
1749    ///
1750    ///
1751    /// #### `insert-text`
1752    ///  This signal is emitted when text is inserted into
1753    /// the widget by the user. The default handler for
1754    /// this signal will normally be responsible for inserting
1755    /// the text, so by connecting to this signal and then
1756    /// stopping the signal with `g_signal_stop_emission()`, it
1757    /// is possible to modify the inserted text, or prevent
1758    /// it from being inserted entirely.
1759    ///
1760    ///
1761    /// </details>
1762    ///
1763    /// # Implements
1764    ///
1765    /// [`EntryExt`][trait@crate::prelude::EntryExt], [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`CellEditableExt`][trait@crate::prelude::CellEditableExt], [`EditableExt`][trait@crate::prelude::EditableExt], [`EntryExtManual`][trait@crate::prelude::EntryExtManual], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`BuildableExtManual`][trait@crate::prelude::BuildableExtManual], [`EditableSignals`][trait@crate::prelude::EditableSignals]
1766    #[doc(alias = "GtkEntry")]
1767    pub struct Entry(Object<ffi::GtkEntry, ffi::GtkEntryClass>) @extends Widget, @implements Buildable, CellEditable, Editable;
1768
1769    match fn {
1770        type_ => || ffi::gtk_entry_get_type(),
1771    }
1772}
1773
1774impl Entry {
1775    pub const NONE: Option<&'static Entry> = None;
1776
1777    /// Creates a new entry.
1778    ///
1779    /// # Returns
1780    ///
1781    /// a new [`Entry`][crate::Entry].
1782    #[doc(alias = "gtk_entry_new")]
1783    pub fn new() -> Entry {
1784        assert_initialized_main_thread!();
1785        unsafe { Widget::from_glib_none(ffi::gtk_entry_new()).unsafe_cast() }
1786    }
1787
1788    /// Creates a new entry with the specified text buffer.
1789    /// ## `buffer`
1790    /// The buffer to use for the new [`Entry`][crate::Entry].
1791    ///
1792    /// # Returns
1793    ///
1794    /// a new [`Entry`][crate::Entry]
1795    #[doc(alias = "gtk_entry_new_with_buffer")]
1796    #[doc(alias = "new_with_buffer")]
1797    pub fn with_buffer(buffer: &impl IsA<EntryBuffer>) -> Entry {
1798        skip_assert_initialized!();
1799        unsafe {
1800            Widget::from_glib_none(ffi::gtk_entry_new_with_buffer(
1801                buffer.as_ref().to_glib_none().0,
1802            ))
1803            .unsafe_cast()
1804        }
1805    }
1806
1807    // rustdoc-stripper-ignore-next
1808    /// Creates a new builder-pattern struct instance to construct [`Entry`] objects.
1809    ///
1810    /// This method returns an instance of [`EntryBuilder`](crate::builders::EntryBuilder) which can be used to create [`Entry`] objects.
1811    pub fn builder() -> EntryBuilder {
1812        EntryBuilder::new()
1813    }
1814}
1815
1816impl Default for Entry {
1817    fn default() -> Self {
1818        Self::new()
1819    }
1820}
1821
1822// rustdoc-stripper-ignore-next
1823/// A [builder-pattern] type to construct [`Entry`] objects.
1824///
1825/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
1826#[must_use = "The builder must be built to be used"]
1827pub struct EntryBuilder {
1828    builder: glib::object::ObjectBuilder<'static, Entry>,
1829}
1830
1831impl EntryBuilder {
1832    fn new() -> Self {
1833        Self {
1834            builder: glib::object::Object::builder(),
1835        }
1836    }
1837
1838    pub fn activates_default(self, activates_default: bool) -> Self {
1839        Self {
1840            builder: self
1841                .builder
1842                .property("activates-default", activates_default),
1843        }
1844    }
1845
1846    /// A list of Pango attributes to apply to the text of the entry.
1847    ///
1848    /// This is mainly useful to change the size or weight of the text.
1849    ///
1850    /// The `PangoAttribute`'s `start_index` and `end_index` must refer to the
1851    /// [`EntryBuffer`][crate::EntryBuffer] text, i.e. without the preedit string.
1852    pub fn attributes(self, attributes: &pango::AttrList) -> Self {
1853        Self {
1854            builder: self.builder.property("attributes", attributes.clone()),
1855        }
1856    }
1857
1858    pub fn buffer(self, buffer: &impl IsA<EntryBuffer>) -> Self {
1859        Self {
1860            builder: self.builder.property("buffer", buffer.clone().upcast()),
1861        }
1862    }
1863
1864    /// Whether password entries will show a warning when Caps Lock is on.
1865    ///
1866    /// Note that the warning is shown using a secondary icon, and thus
1867    /// does not work if you are using the secondary icon position for some
1868    /// other purpose.
1869    pub fn caps_lock_warning(self, caps_lock_warning: bool) -> Self {
1870        Self {
1871            builder: self
1872                .builder
1873                .property("caps-lock-warning", caps_lock_warning),
1874        }
1875    }
1876
1877    /// The auxiliary completion object to use with the entry.
1878    pub fn completion(self, completion: &impl IsA<EntryCompletion>) -> Self {
1879        Self {
1880            builder: self
1881                .builder
1882                .property("completion", completion.clone().upcast()),
1883        }
1884    }
1885
1886    pub fn editable(self, editable: bool) -> Self {
1887        Self {
1888            builder: self.builder.property("editable", editable),
1889        }
1890    }
1891
1892    pub fn enable_emoji_completion(self, enable_emoji_completion: bool) -> Self {
1893        Self {
1894            builder: self
1895                .builder
1896                .property("enable-emoji-completion", enable_emoji_completion),
1897        }
1898    }
1899
1900    pub fn has_frame(self, has_frame: bool) -> Self {
1901        Self {
1902            builder: self.builder.property("has-frame", has_frame),
1903        }
1904    }
1905
1906    /// Which IM (input method) module should be used for this entry.
1907    /// See [`IMContext`][crate::IMContext].
1908    ///
1909    /// Setting this to a non-[`None`] value overrides the
1910    /// system-wide IM module setting. See the GtkSettings
1911    /// [`gtk-im-module`][struct@crate::Settings#gtk-im-module] property.
1912    pub fn im_module(self, im_module: impl Into<glib::GString>) -> Self {
1913        Self {
1914            builder: self.builder.property("im-module", im_module.into()),
1915        }
1916    }
1917
1918    /// Additional hints (beyond [`input-purpose`][struct@crate::Entry#input-purpose]) that
1919    /// allow input methods to fine-tune their behaviour.
1920    pub fn input_hints(self, input_hints: InputHints) -> Self {
1921        Self {
1922            builder: self.builder.property("input-hints", input_hints),
1923        }
1924    }
1925
1926    /// The purpose of this text field.
1927    ///
1928    /// This property can be used by on-screen keyboards and other input
1929    /// methods to adjust their behaviour.
1930    ///
1931    /// Note that setting the purpose to [`InputPurpose::Password`][crate::InputPurpose::Password] or
1932    /// [`InputPurpose::Pin`][crate::InputPurpose::Pin] is independent from setting
1933    /// [`visibility`][struct@crate::Entry#visibility].
1934    pub fn input_purpose(self, input_purpose: InputPurpose) -> Self {
1935        Self {
1936            builder: self.builder.property("input-purpose", input_purpose),
1937        }
1938    }
1939
1940    /// The invisible character is used when masking entry contents (in
1941    /// \"password mode\")"). When it is not explicitly set with the
1942    /// [`invisible-char`][struct@crate::Entry#invisible-char] property, GTK+ determines the character
1943    /// to use from a list of possible candidates, depending on availability
1944    /// in the current font.
1945    ///
1946    /// This style property allows the theme to prepend a character
1947    /// to the list of candidates.
1948    pub fn invisible_char(self, invisible_char: u32) -> Self {
1949        Self {
1950            builder: self.builder.property("invisible-char", invisible_char),
1951        }
1952    }
1953
1954    /// Whether the invisible char has been set for the [`Entry`][crate::Entry].
1955    pub fn invisible_char_set(self, invisible_char_set: bool) -> Self {
1956        Self {
1957            builder: self
1958                .builder
1959                .property("invisible-char-set", invisible_char_set),
1960        }
1961    }
1962
1963    pub fn max_length(self, max_length: i32) -> Self {
1964        Self {
1965            builder: self.builder.property("max-length", max_length),
1966        }
1967    }
1968
1969    /// The desired maximum width of the entry, in characters.
1970    /// If this property is set to -1, the width will be calculated
1971    /// automatically.
1972    pub fn max_width_chars(self, max_width_chars: i32) -> Self {
1973        Self {
1974            builder: self.builder.property("max-width-chars", max_width_chars),
1975        }
1976    }
1977
1978    /// If text is overwritten when typing in the [`Entry`][crate::Entry].
1979    pub fn overwrite_mode(self, overwrite_mode: bool) -> Self {
1980        Self {
1981            builder: self.builder.property("overwrite-mode", overwrite_mode),
1982        }
1983    }
1984
1985    /// The text that will be displayed in the [`Entry`][crate::Entry] when it is empty
1986    /// and unfocused.
1987    pub fn placeholder_text(self, placeholder_text: impl Into<glib::GString>) -> Self {
1988        Self {
1989            builder: self
1990                .builder
1991                .property("placeholder-text", placeholder_text.into()),
1992        }
1993    }
1994
1995    /// If :populate-all is [`true`], the [`populate-popup`][struct@crate::Entry#populate-popup]
1996    /// signal is also emitted for touch popups.
1997    pub fn populate_all(self, populate_all: bool) -> Self {
1998        Self {
1999            builder: self.builder.property("populate-all", populate_all),
2000        }
2001    }
2002
2003    /// Whether the primary icon is activatable.
2004    ///
2005    /// GTK+ emits the [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
2006    /// signals only on sensitive, activatable icons.
2007    ///
2008    /// Sensitive, but non-activatable icons can be used for purely
2009    /// informational purposes.
2010    pub fn primary_icon_activatable(self, primary_icon_activatable: bool) -> Self {
2011        Self {
2012            builder: self
2013                .builder
2014                .property("primary-icon-activatable", primary_icon_activatable),
2015        }
2016    }
2017
2018    /// The [`gio::Icon`][crate::gio::Icon] to use for the primary icon for the entry.
2019    pub fn primary_icon_gicon(self, primary_icon_gicon: &impl IsA<gio::Icon>) -> Self {
2020        Self {
2021            builder: self
2022                .builder
2023                .property("primary-icon-gicon", primary_icon_gicon.clone().upcast()),
2024        }
2025    }
2026
2027    /// The icon name to use for the primary icon for the entry.
2028    pub fn primary_icon_name(self, primary_icon_name: impl Into<glib::GString>) -> Self {
2029        Self {
2030            builder: self
2031                .builder
2032                .property("primary-icon-name", primary_icon_name.into()),
2033        }
2034    }
2035
2036    /// A pixbuf to use as the primary icon for the entry.
2037    pub fn primary_icon_pixbuf(self, primary_icon_pixbuf: &gdk_pixbuf::Pixbuf) -> Self {
2038        Self {
2039            builder: self
2040                .builder
2041                .property("primary-icon-pixbuf", primary_icon_pixbuf.clone()),
2042        }
2043    }
2044
2045    /// Whether the primary icon is sensitive.
2046    ///
2047    /// An insensitive icon appears grayed out. GTK+ does not emit the
2048    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release] signals and
2049    /// does not allow DND from insensitive icons.
2050    ///
2051    /// An icon should be set insensitive if the action that would trigger
2052    /// when clicked is currently not available.
2053    pub fn primary_icon_sensitive(self, primary_icon_sensitive: bool) -> Self {
2054        Self {
2055            builder: self
2056                .builder
2057                .property("primary-icon-sensitive", primary_icon_sensitive),
2058        }
2059    }
2060
2061    /// The contents of the tooltip on the primary icon, which is marked up
2062    /// with the [Pango text markup language][PangoMarkupFormat].
2063    ///
2064    /// Also see [`EntryExt::set_icon_tooltip_markup()`][crate::prelude::EntryExt::set_icon_tooltip_markup()].
2065    pub fn primary_icon_tooltip_markup(
2066        self,
2067        primary_icon_tooltip_markup: impl Into<glib::GString>,
2068    ) -> Self {
2069        Self {
2070            builder: self.builder.property(
2071                "primary-icon-tooltip-markup",
2072                primary_icon_tooltip_markup.into(),
2073            ),
2074        }
2075    }
2076
2077    /// The contents of the tooltip on the primary icon.
2078    ///
2079    /// Also see [`EntryExt::set_icon_tooltip_text()`][crate::prelude::EntryExt::set_icon_tooltip_text()].
2080    pub fn primary_icon_tooltip_text(
2081        self,
2082        primary_icon_tooltip_text: impl Into<glib::GString>,
2083    ) -> Self {
2084        Self {
2085            builder: self.builder.property(
2086                "primary-icon-tooltip-text",
2087                primary_icon_tooltip_text.into(),
2088            ),
2089        }
2090    }
2091
2092    /// The current fraction of the task that's been completed.
2093    pub fn progress_fraction(self, progress_fraction: f64) -> Self {
2094        Self {
2095            builder: self
2096                .builder
2097                .property("progress-fraction", progress_fraction),
2098        }
2099    }
2100
2101    /// The fraction of total entry width to move the progress
2102    /// bouncing block for each call to [`EntryExt::progress_pulse()`][crate::prelude::EntryExt::progress_pulse()].
2103    pub fn progress_pulse_step(self, progress_pulse_step: f64) -> Self {
2104        Self {
2105            builder: self
2106                .builder
2107                .property("progress-pulse-step", progress_pulse_step),
2108        }
2109    }
2110
2111    /// Whether the secondary icon is activatable.
2112    ///
2113    /// GTK+ emits the [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
2114    /// signals only on sensitive, activatable icons.
2115    ///
2116    /// Sensitive, but non-activatable icons can be used for purely
2117    /// informational purposes.
2118    pub fn secondary_icon_activatable(self, secondary_icon_activatable: bool) -> Self {
2119        Self {
2120            builder: self
2121                .builder
2122                .property("secondary-icon-activatable", secondary_icon_activatable),
2123        }
2124    }
2125
2126    /// The [`gio::Icon`][crate::gio::Icon] to use for the secondary icon for the entry.
2127    pub fn secondary_icon_gicon(self, secondary_icon_gicon: &impl IsA<gio::Icon>) -> Self {
2128        Self {
2129            builder: self.builder.property(
2130                "secondary-icon-gicon",
2131                secondary_icon_gicon.clone().upcast(),
2132            ),
2133        }
2134    }
2135
2136    /// The icon name to use for the secondary icon for the entry.
2137    pub fn secondary_icon_name(self, secondary_icon_name: impl Into<glib::GString>) -> Self {
2138        Self {
2139            builder: self
2140                .builder
2141                .property("secondary-icon-name", secondary_icon_name.into()),
2142        }
2143    }
2144
2145    /// An pixbuf to use as the secondary icon for the entry.
2146    pub fn secondary_icon_pixbuf(self, secondary_icon_pixbuf: &gdk_pixbuf::Pixbuf) -> Self {
2147        Self {
2148            builder: self
2149                .builder
2150                .property("secondary-icon-pixbuf", secondary_icon_pixbuf.clone()),
2151        }
2152    }
2153
2154    /// Whether the secondary icon is sensitive.
2155    ///
2156    /// An insensitive icon appears grayed out. GTK+ does not emit the
2157    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release] signals and
2158    /// does not allow DND from insensitive icons.
2159    ///
2160    /// An icon should be set insensitive if the action that would trigger
2161    /// when clicked is currently not available.
2162    pub fn secondary_icon_sensitive(self, secondary_icon_sensitive: bool) -> Self {
2163        Self {
2164            builder: self
2165                .builder
2166                .property("secondary-icon-sensitive", secondary_icon_sensitive),
2167        }
2168    }
2169
2170    /// The contents of the tooltip on the secondary icon, which is marked up
2171    /// with the [Pango text markup language][PangoMarkupFormat].
2172    ///
2173    /// Also see [`EntryExt::set_icon_tooltip_markup()`][crate::prelude::EntryExt::set_icon_tooltip_markup()].
2174    pub fn secondary_icon_tooltip_markup(
2175        self,
2176        secondary_icon_tooltip_markup: impl Into<glib::GString>,
2177    ) -> Self {
2178        Self {
2179            builder: self.builder.property(
2180                "secondary-icon-tooltip-markup",
2181                secondary_icon_tooltip_markup.into(),
2182            ),
2183        }
2184    }
2185
2186    /// The contents of the tooltip on the secondary icon.
2187    ///
2188    /// Also see [`EntryExt::set_icon_tooltip_text()`][crate::prelude::EntryExt::set_icon_tooltip_text()].
2189    pub fn secondary_icon_tooltip_text(
2190        self,
2191        secondary_icon_tooltip_text: impl Into<glib::GString>,
2192    ) -> Self {
2193        Self {
2194            builder: self.builder.property(
2195                "secondary-icon-tooltip-text",
2196                secondary_icon_tooltip_text.into(),
2197            ),
2198        }
2199    }
2200
2201    pub fn show_emoji_icon(self, show_emoji_icon: bool) -> Self {
2202        Self {
2203            builder: self.builder.property("show-emoji-icon", show_emoji_icon),
2204        }
2205    }
2206
2207    pub fn tabs(self, tabs: &pango::TabArray) -> Self {
2208        Self {
2209            builder: self.builder.property("tabs", tabs),
2210        }
2211    }
2212
2213    pub fn text(self, text: impl Into<glib::GString>) -> Self {
2214        Self {
2215            builder: self.builder.property("text", text.into()),
2216        }
2217    }
2218
2219    /// When [`true`], pasted multi-line text is truncated to the first line.
2220    pub fn truncate_multiline(self, truncate_multiline: bool) -> Self {
2221        Self {
2222            builder: self
2223                .builder
2224                .property("truncate-multiline", truncate_multiline),
2225        }
2226    }
2227
2228    pub fn visibility(self, visibility: bool) -> Self {
2229        Self {
2230            builder: self.builder.property("visibility", visibility),
2231        }
2232    }
2233
2234    pub fn width_chars(self, width_chars: i32) -> Self {
2235        Self {
2236            builder: self.builder.property("width-chars", width_chars),
2237        }
2238    }
2239
2240    /// The horizontal alignment, from 0 (left) to 1 (right).
2241    /// Reversed for RTL layouts.
2242    pub fn xalign(self, xalign: f32) -> Self {
2243        Self {
2244            builder: self.builder.property("xalign", xalign),
2245        }
2246    }
2247
2248    pub fn app_paintable(self, app_paintable: bool) -> Self {
2249        Self {
2250            builder: self.builder.property("app-paintable", app_paintable),
2251        }
2252    }
2253
2254    pub fn can_default(self, can_default: bool) -> Self {
2255        Self {
2256            builder: self.builder.property("can-default", can_default),
2257        }
2258    }
2259
2260    pub fn can_focus(self, can_focus: bool) -> Self {
2261        Self {
2262            builder: self.builder.property("can-focus", can_focus),
2263        }
2264    }
2265
2266    pub fn events(self, events: gdk::EventMask) -> Self {
2267        Self {
2268            builder: self.builder.property("events", events),
2269        }
2270    }
2271
2272    /// Whether to expand in both directions. Setting this sets both [`hexpand`][struct@crate::Widget#hexpand] and [`vexpand`][struct@crate::Widget#vexpand]
2273    pub fn expand(self, expand: bool) -> Self {
2274        Self {
2275            builder: self.builder.property("expand", expand),
2276        }
2277    }
2278
2279    /// Whether the widget should grab focus when it is clicked with the mouse.
2280    ///
2281    /// This property is only relevant for widgets that can take focus.
2282    ///
2283    /// Before 3.20, several widgets (GtkButton, GtkFileChooserButton,
2284    /// GtkComboBox) implemented this property individually.
2285    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
2286        Self {
2287            builder: self.builder.property("focus-on-click", focus_on_click),
2288        }
2289    }
2290
2291    /// How to distribute horizontal space if widget gets extra space, see [`Align`][crate::Align]
2292    pub fn halign(self, halign: Align) -> Self {
2293        Self {
2294            builder: self.builder.property("halign", halign),
2295        }
2296    }
2297
2298    pub fn has_default(self, has_default: bool) -> Self {
2299        Self {
2300            builder: self.builder.property("has-default", has_default),
2301        }
2302    }
2303
2304    pub fn has_focus(self, has_focus: bool) -> Self {
2305        Self {
2306            builder: self.builder.property("has-focus", has_focus),
2307        }
2308    }
2309
2310    /// Enables or disables the emission of [`query-tooltip`][struct@crate::Widget#query-tooltip] on `widget`.
2311    /// A value of [`true`] indicates that `widget` can have a tooltip, in this case
2312    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to determine
2313    /// whether it will provide a tooltip or not.
2314    ///
2315    /// Note that setting this property to [`true`] for the first time will change
2316    /// the event masks of the GdkWindows of this widget to include leave-notify
2317    /// and motion-notify events. This cannot and will not be undone when the
2318    /// property is set to [`false`] again.
2319    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
2320        Self {
2321            builder: self.builder.property("has-tooltip", has_tooltip),
2322        }
2323    }
2324
2325    pub fn height_request(self, height_request: i32) -> Self {
2326        Self {
2327            builder: self.builder.property("height-request", height_request),
2328        }
2329    }
2330
2331    /// Whether to expand horizontally. See [`WidgetExt::set_hexpand()`][crate::prelude::WidgetExt::set_hexpand()].
2332    pub fn hexpand(self, hexpand: bool) -> Self {
2333        Self {
2334            builder: self.builder.property("hexpand", hexpand),
2335        }
2336    }
2337
2338    /// Whether to use the [`hexpand`][struct@crate::Widget#hexpand] property. See [`WidgetExt::is_hexpand_set()`][crate::prelude::WidgetExt::is_hexpand_set()].
2339    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
2340        Self {
2341            builder: self.builder.property("hexpand-set", hexpand_set),
2342        }
2343    }
2344
2345    pub fn is_focus(self, is_focus: bool) -> Self {
2346        Self {
2347            builder: self.builder.property("is-focus", is_focus),
2348        }
2349    }
2350
2351    /// Sets all four sides' margin at once. If read, returns max
2352    /// margin on any side.
2353    pub fn margin(self, margin: i32) -> Self {
2354        Self {
2355            builder: self.builder.property("margin", margin),
2356        }
2357    }
2358
2359    /// Margin on bottom side of widget.
2360    ///
2361    /// This property adds margin outside of the widget's normal size
2362    /// request, the margin will be added in addition to the size from
2363    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
2364    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
2365        Self {
2366            builder: self.builder.property("margin-bottom", margin_bottom),
2367        }
2368    }
2369
2370    /// Margin on end of widget, horizontally. This property supports
2371    /// left-to-right and right-to-left text directions.
2372    ///
2373    /// This property adds margin outside of the widget's normal size
2374    /// request, the margin will be added in addition to the size from
2375    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
2376    pub fn margin_end(self, margin_end: i32) -> Self {
2377        Self {
2378            builder: self.builder.property("margin-end", margin_end),
2379        }
2380    }
2381
2382    /// Margin on start of widget, horizontally. This property supports
2383    /// left-to-right and right-to-left text directions.
2384    ///
2385    /// This property adds margin outside of the widget's normal size
2386    /// request, the margin will be added in addition to the size from
2387    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
2388    pub fn margin_start(self, margin_start: i32) -> Self {
2389        Self {
2390            builder: self.builder.property("margin-start", margin_start),
2391        }
2392    }
2393
2394    /// Margin on top side of widget.
2395    ///
2396    /// This property adds margin outside of the widget's normal size
2397    /// request, the margin will be added in addition to the size from
2398    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
2399    pub fn margin_top(self, margin_top: i32) -> Self {
2400        Self {
2401            builder: self.builder.property("margin-top", margin_top),
2402        }
2403    }
2404
2405    pub fn name(self, name: impl Into<glib::GString>) -> Self {
2406        Self {
2407            builder: self.builder.property("name", name.into()),
2408        }
2409    }
2410
2411    pub fn no_show_all(self, no_show_all: bool) -> Self {
2412        Self {
2413            builder: self.builder.property("no-show-all", no_show_all),
2414        }
2415    }
2416
2417    /// The requested opacity of the widget. See [`WidgetExt::set_opacity()`][crate::prelude::WidgetExt::set_opacity()] for
2418    /// more details about window opacity.
2419    ///
2420    /// Before 3.8 this was only available in GtkWindow
2421    pub fn opacity(self, opacity: f64) -> Self {
2422        Self {
2423            builder: self.builder.property("opacity", opacity),
2424        }
2425    }
2426
2427    pub fn parent(self, parent: &impl IsA<Container>) -> Self {
2428        Self {
2429            builder: self.builder.property("parent", parent.clone().upcast()),
2430        }
2431    }
2432
2433    pub fn receives_default(self, receives_default: bool) -> Self {
2434        Self {
2435            builder: self.builder.property("receives-default", receives_default),
2436        }
2437    }
2438
2439    pub fn sensitive(self, sensitive: bool) -> Self {
2440        Self {
2441            builder: self.builder.property("sensitive", sensitive),
2442        }
2443    }
2444
2445    /// Sets the text of tooltip to be the given string, which is marked up
2446    /// with the [Pango text markup language][PangoMarkupFormat].
2447    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
2448    ///
2449    /// This is a convenience property which will take care of getting the
2450    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
2451    /// will automatically be set to [`true`] and there will be taken care of
2452    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
2453    ///
2454    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
2455    /// are set, the last one wins.
2456    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
2457        Self {
2458            builder: self
2459                .builder
2460                .property("tooltip-markup", tooltip_markup.into()),
2461        }
2462    }
2463
2464    /// Sets the text of tooltip to be the given string.
2465    ///
2466    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
2467    ///
2468    /// This is a convenience property which will take care of getting the
2469    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
2470    /// will automatically be set to [`true`] and there will be taken care of
2471    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
2472    ///
2473    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
2474    /// are set, the last one wins.
2475    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
2476        Self {
2477            builder: self.builder.property("tooltip-text", tooltip_text.into()),
2478        }
2479    }
2480
2481    /// How to distribute vertical space if widget gets extra space, see [`Align`][crate::Align]
2482    pub fn valign(self, valign: Align) -> Self {
2483        Self {
2484            builder: self.builder.property("valign", valign),
2485        }
2486    }
2487
2488    /// Whether to expand vertically. See [`WidgetExt::set_vexpand()`][crate::prelude::WidgetExt::set_vexpand()].
2489    pub fn vexpand(self, vexpand: bool) -> Self {
2490        Self {
2491            builder: self.builder.property("vexpand", vexpand),
2492        }
2493    }
2494
2495    /// Whether to use the [`vexpand`][struct@crate::Widget#vexpand] property. See [`WidgetExt::is_vexpand_set()`][crate::prelude::WidgetExt::is_vexpand_set()].
2496    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
2497        Self {
2498            builder: self.builder.property("vexpand-set", vexpand_set),
2499        }
2500    }
2501
2502    pub fn visible(self, visible: bool) -> Self {
2503        Self {
2504            builder: self.builder.property("visible", visible),
2505        }
2506    }
2507
2508    pub fn width_request(self, width_request: i32) -> Self {
2509        Self {
2510            builder: self.builder.property("width-request", width_request),
2511        }
2512    }
2513
2514    /// Indicates whether editing on the cell has been canceled.
2515    pub fn editing_canceled(self, editing_canceled: bool) -> Self {
2516        Self {
2517            builder: self.builder.property("editing-canceled", editing_canceled),
2518        }
2519    }
2520
2521    // rustdoc-stripper-ignore-next
2522    /// Build the [`Entry`].
2523    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
2524    pub fn build(self) -> Entry {
2525        self.builder.build()
2526    }
2527}
2528
2529mod sealed {
2530    pub trait Sealed {}
2531    impl<T: super::IsA<super::Entry>> Sealed for T {}
2532}
2533
2534/// Trait containing all [`struct@Entry`] methods.
2535///
2536/// # Implementors
2537///
2538/// [`Entry`][struct@crate::Entry], [`SearchEntry`][struct@crate::SearchEntry], [`SpinButton`][struct@crate::SpinButton]
2539pub trait EntryExt: IsA<Entry> + sealed::Sealed + 'static {
2540    /// Retrieves the value set by [`set_activates_default()`][Self::set_activates_default()].
2541    ///
2542    /// # Returns
2543    ///
2544    /// [`true`] if the entry will activate the default widget
2545    #[doc(alias = "gtk_entry_get_activates_default")]
2546    #[doc(alias = "get_activates_default")]
2547    fn activates_default(&self) -> bool {
2548        unsafe {
2549            from_glib(ffi::gtk_entry_get_activates_default(
2550                self.as_ref().to_glib_none().0,
2551            ))
2552        }
2553    }
2554
2555    /// Gets the value set by [`set_alignment()`][Self::set_alignment()].
2556    ///
2557    /// # Returns
2558    ///
2559    /// the alignment
2560    #[doc(alias = "gtk_entry_get_alignment")]
2561    #[doc(alias = "get_alignment")]
2562    fn alignment(&self) -> f32 {
2563        unsafe { ffi::gtk_entry_get_alignment(self.as_ref().to_glib_none().0) }
2564    }
2565
2566    /// Gets the attribute list that was set on the entry using
2567    /// [`set_attributes()`][Self::set_attributes()], if any.
2568    ///
2569    /// # Returns
2570    ///
2571    /// the attribute list, or [`None`]
2572    ///  if none was set.
2573    #[doc(alias = "gtk_entry_get_attributes")]
2574    #[doc(alias = "get_attributes")]
2575    fn attributes(&self) -> Option<pango::AttrList> {
2576        unsafe {
2577            from_glib_none(ffi::gtk_entry_get_attributes(
2578                self.as_ref().to_glib_none().0,
2579            ))
2580        }
2581    }
2582
2583    /// Get the [`EntryBuffer`][crate::EntryBuffer] object which holds the text for
2584    /// this widget.
2585    ///
2586    /// # Returns
2587    ///
2588    /// A [`EntryBuffer`][crate::EntryBuffer] object.
2589    #[doc(alias = "gtk_entry_get_buffer")]
2590    #[doc(alias = "get_buffer")]
2591    fn buffer(&self) -> EntryBuffer {
2592        unsafe { from_glib_none(ffi::gtk_entry_get_buffer(self.as_ref().to_glib_none().0)) }
2593    }
2594
2595    /// Returns the auxiliary completion object currently in use by `self`.
2596    ///
2597    /// # Returns
2598    ///
2599    /// The auxiliary completion object currently
2600    ///  in use by `self`.
2601    #[doc(alias = "gtk_entry_get_completion")]
2602    #[doc(alias = "get_completion")]
2603    fn completion(&self) -> Option<EntryCompletion> {
2604        unsafe {
2605            from_glib_none(ffi::gtk_entry_get_completion(
2606                self.as_ref().to_glib_none().0,
2607            ))
2608        }
2609    }
2610
2611    /// Returns the index of the icon which is the source of the current
2612    /// DND operation, or -1.
2613    ///
2614    /// This function is meant to be used in a [`drag-data-get`][struct@crate::Widget#drag-data-get]
2615    /// callback.
2616    ///
2617    /// # Returns
2618    ///
2619    /// index of the icon which is the source of the current
2620    ///  DND operation, or -1.
2621    #[doc(alias = "gtk_entry_get_current_icon_drag_source")]
2622    #[doc(alias = "get_current_icon_drag_source")]
2623    fn current_icon_drag_source(&self) -> i32 {
2624        unsafe { ffi::gtk_entry_get_current_icon_drag_source(self.as_ref().to_glib_none().0) }
2625    }
2626
2627    /// Retrieves the horizontal cursor adjustment for the entry.
2628    /// See [`set_cursor_hadjustment()`][Self::set_cursor_hadjustment()].
2629    ///
2630    /// # Returns
2631    ///
2632    /// the horizontal cursor adjustment, or [`None`]
2633    ///  if none has been set.
2634    #[doc(alias = "gtk_entry_get_cursor_hadjustment")]
2635    #[doc(alias = "get_cursor_hadjustment")]
2636    fn cursor_hadjustment(&self) -> Option<Adjustment> {
2637        unsafe {
2638            from_glib_none(ffi::gtk_entry_get_cursor_hadjustment(
2639                self.as_ref().to_glib_none().0,
2640            ))
2641        }
2642    }
2643
2644    /// Gets the value set by [`set_has_frame()`][Self::set_has_frame()].
2645    ///
2646    /// # Returns
2647    ///
2648    /// whether the entry has a beveled frame
2649    #[doc(alias = "gtk_entry_get_has_frame")]
2650    #[doc(alias = "get_has_frame")]
2651    fn has_frame(&self) -> bool {
2652        unsafe { from_glib(ffi::gtk_entry_get_has_frame(self.as_ref().to_glib_none().0)) }
2653    }
2654
2655    /// Returns whether the icon is activatable.
2656    /// ## `icon_pos`
2657    /// Icon position
2658    ///
2659    /// # Returns
2660    ///
2661    /// [`true`] if the icon is activatable.
2662    #[doc(alias = "gtk_entry_get_icon_activatable")]
2663    #[doc(alias = "get_icon_activatable")]
2664    fn icon_is_activatable(&self, icon_pos: EntryIconPosition) -> bool {
2665        unsafe {
2666            from_glib(ffi::gtk_entry_get_icon_activatable(
2667                self.as_ref().to_glib_none().0,
2668                icon_pos.into_glib(),
2669            ))
2670        }
2671    }
2672
2673    /// Gets the area where entry’s icon at `icon_pos` is drawn.
2674    /// This function is useful when drawing something to the
2675    /// entry in a draw callback.
2676    ///
2677    /// If the entry is not realized or has no icon at the given position,
2678    /// `icon_area` is filled with zeros. Otherwise, `icon_area` will be filled
2679    /// with the icon’s allocation, relative to `self`’s allocation.
2680    ///
2681    /// See also [`text_area()`][Self::text_area()]
2682    /// ## `icon_pos`
2683    /// Icon position
2684    ///
2685    /// # Returns
2686    ///
2687    ///
2688    /// ## `icon_area`
2689    /// Return location for the icon’s area
2690    #[doc(alias = "gtk_entry_get_icon_area")]
2691    #[doc(alias = "get_icon_area")]
2692    fn icon_area(&self, icon_pos: EntryIconPosition) -> gdk::Rectangle {
2693        unsafe {
2694            let mut icon_area = gdk::Rectangle::uninitialized();
2695            ffi::gtk_entry_get_icon_area(
2696                self.as_ref().to_glib_none().0,
2697                icon_pos.into_glib(),
2698                icon_area.to_glib_none_mut().0,
2699            );
2700            icon_area
2701        }
2702    }
2703
2704    /// Finds the icon at the given position and return its index. The
2705    /// position’s coordinates are relative to the `self`’s top left corner.
2706    /// If `x`, `y` doesn’t lie inside an icon, -1 is returned.
2707    /// This function is intended for use in a [`query-tooltip`][struct@crate::Widget#query-tooltip]
2708    /// signal handler.
2709    /// ## `x`
2710    /// the x coordinate of the position to find
2711    /// ## `y`
2712    /// the y coordinate of the position to find
2713    ///
2714    /// # Returns
2715    ///
2716    /// the index of the icon at the given position, or -1
2717    #[doc(alias = "gtk_entry_get_icon_at_pos")]
2718    #[doc(alias = "get_icon_at_pos")]
2719    fn icon_at_pos(&self, x: i32, y: i32) -> i32 {
2720        unsafe { ffi::gtk_entry_get_icon_at_pos(self.as_ref().to_glib_none().0, x, y) }
2721    }
2722
2723    /// Retrieves the [`gio::Icon`][crate::gio::Icon] used for the icon, or [`None`] if there is
2724    /// no icon or if the icon was set by some other method (e.g., by
2725    /// stock, pixbuf, or icon name).
2726    /// ## `icon_pos`
2727    /// Icon position
2728    ///
2729    /// # Returns
2730    ///
2731    /// A [`gio::Icon`][crate::gio::Icon], or [`None`] if no icon is set
2732    ///  or if the icon is not a [`gio::Icon`][crate::gio::Icon]
2733    #[doc(alias = "gtk_entry_get_icon_gicon")]
2734    #[doc(alias = "get_icon_gicon")]
2735    fn icon_gicon(&self, icon_pos: EntryIconPosition) -> Option<gio::Icon> {
2736        unsafe {
2737            from_glib_none(ffi::gtk_entry_get_icon_gicon(
2738                self.as_ref().to_glib_none().0,
2739                icon_pos.into_glib(),
2740            ))
2741        }
2742    }
2743
2744    /// Retrieves the icon name used for the icon, or [`None`] if there is
2745    /// no icon or if the icon was set by some other method (e.g., by
2746    /// pixbuf, stock or gicon).
2747    /// ## `icon_pos`
2748    /// Icon position
2749    ///
2750    /// # Returns
2751    ///
2752    /// An icon name, or [`None`] if no icon is set or if the icon
2753    ///  wasn’t set from an icon name
2754    #[doc(alias = "gtk_entry_get_icon_name")]
2755    #[doc(alias = "get_icon_name")]
2756    fn icon_name(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
2757        unsafe {
2758            from_glib_none(ffi::gtk_entry_get_icon_name(
2759                self.as_ref().to_glib_none().0,
2760                icon_pos.into_glib(),
2761            ))
2762        }
2763    }
2764
2765    /// Retrieves the image used for the icon.
2766    ///
2767    /// Unlike the other methods of setting and getting icon data, this
2768    /// method will work regardless of whether the icon was set using a
2769    /// [`gdk_pixbuf::Pixbuf`][crate::gdk_pixbuf::Pixbuf], a [`gio::Icon`][crate::gio::Icon], a stock item, or an icon name.
2770    /// ## `icon_pos`
2771    /// Icon position
2772    ///
2773    /// # Returns
2774    ///
2775    /// A [`gdk_pixbuf::Pixbuf`][crate::gdk_pixbuf::Pixbuf], or [`None`] if no icon is
2776    ///  set for this position.
2777    #[doc(alias = "gtk_entry_get_icon_pixbuf")]
2778    #[doc(alias = "get_icon_pixbuf")]
2779    fn icon_pixbuf(&self, icon_pos: EntryIconPosition) -> Option<gdk_pixbuf::Pixbuf> {
2780        unsafe {
2781            from_glib_none(ffi::gtk_entry_get_icon_pixbuf(
2782                self.as_ref().to_glib_none().0,
2783                icon_pos.into_glib(),
2784            ))
2785        }
2786    }
2787
2788    /// Returns whether the icon appears sensitive or insensitive.
2789    /// ## `icon_pos`
2790    /// Icon position
2791    ///
2792    /// # Returns
2793    ///
2794    /// [`true`] if the icon is sensitive.
2795    #[doc(alias = "gtk_entry_get_icon_sensitive")]
2796    #[doc(alias = "get_icon_sensitive")]
2797    fn icon_is_sensitive(&self, icon_pos: EntryIconPosition) -> bool {
2798        unsafe {
2799            from_glib(ffi::gtk_entry_get_icon_sensitive(
2800                self.as_ref().to_glib_none().0,
2801                icon_pos.into_glib(),
2802            ))
2803        }
2804    }
2805
2806    /// Gets the type of representation being used by the icon
2807    /// to store image data. If the icon has no image data,
2808    /// the return value will be [`ImageType::Empty`][crate::ImageType::Empty].
2809    /// ## `icon_pos`
2810    /// Icon position
2811    ///
2812    /// # Returns
2813    ///
2814    /// image representation being used
2815    #[doc(alias = "gtk_entry_get_icon_storage_type")]
2816    #[doc(alias = "get_icon_storage_type")]
2817    fn icon_storage_type(&self, icon_pos: EntryIconPosition) -> ImageType {
2818        unsafe {
2819            from_glib(ffi::gtk_entry_get_icon_storage_type(
2820                self.as_ref().to_glib_none().0,
2821                icon_pos.into_glib(),
2822            ))
2823        }
2824    }
2825
2826    /// Gets the contents of the tooltip on the icon at the specified
2827    /// position in `self`.
2828    /// ## `icon_pos`
2829    /// the icon position
2830    ///
2831    /// # Returns
2832    ///
2833    /// the tooltip text, or [`None`]. Free the returned
2834    ///  string with `g_free()` when done.
2835    #[doc(alias = "gtk_entry_get_icon_tooltip_markup")]
2836    #[doc(alias = "get_icon_tooltip_markup")]
2837    fn icon_tooltip_markup(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
2838        unsafe {
2839            from_glib_full(ffi::gtk_entry_get_icon_tooltip_markup(
2840                self.as_ref().to_glib_none().0,
2841                icon_pos.into_glib(),
2842            ))
2843        }
2844    }
2845
2846    /// Gets the contents of the tooltip on the icon at the specified
2847    /// position in `self`.
2848    /// ## `icon_pos`
2849    /// the icon position
2850    ///
2851    /// # Returns
2852    ///
2853    /// the tooltip text, or [`None`]. Free the returned
2854    ///  string with `g_free()` when done.
2855    #[doc(alias = "gtk_entry_get_icon_tooltip_text")]
2856    #[doc(alias = "get_icon_tooltip_text")]
2857    fn icon_tooltip_text(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
2858        unsafe {
2859            from_glib_full(ffi::gtk_entry_get_icon_tooltip_text(
2860                self.as_ref().to_glib_none().0,
2861                icon_pos.into_glib(),
2862            ))
2863        }
2864    }
2865
2866    /// Gets the value of the [`input-hints`][struct@crate::Entry#input-hints] property.
2867    #[doc(alias = "gtk_entry_get_input_hints")]
2868    #[doc(alias = "get_input_hints")]
2869    fn input_hints(&self) -> InputHints {
2870        unsafe {
2871            from_glib(ffi::gtk_entry_get_input_hints(
2872                self.as_ref().to_glib_none().0,
2873            ))
2874        }
2875    }
2876
2877    /// Gets the value of the [`input-purpose`][struct@crate::Entry#input-purpose] property.
2878    #[doc(alias = "gtk_entry_get_input_purpose")]
2879    #[doc(alias = "get_input_purpose")]
2880    fn input_purpose(&self) -> InputPurpose {
2881        unsafe {
2882            from_glib(ffi::gtk_entry_get_input_purpose(
2883                self.as_ref().to_glib_none().0,
2884            ))
2885        }
2886    }
2887
2888    /// Gets the [`pango::Layout`][crate::pango::Layout] used to display the entry.
2889    /// The layout is useful to e.g. convert text positions to
2890    /// pixel positions, in combination with [`layout_offsets()`][Self::layout_offsets()].
2891    /// The returned layout is owned by the entry and must not be
2892    /// modified or freed by the caller.
2893    ///
2894    /// Keep in mind that the layout text may contain a preedit string, so
2895    /// [`layout_index_to_text_index()`][Self::layout_index_to_text_index()] and
2896    /// [`text_index_to_layout_index()`][Self::text_index_to_layout_index()] are needed to convert byte
2897    /// indices in the layout to byte indices in the entry contents.
2898    ///
2899    /// # Returns
2900    ///
2901    /// the [`pango::Layout`][crate::pango::Layout] for this entry
2902    #[doc(alias = "gtk_entry_get_layout")]
2903    #[doc(alias = "get_layout")]
2904    fn layout(&self) -> Option<pango::Layout> {
2905        unsafe { from_glib_none(ffi::gtk_entry_get_layout(self.as_ref().to_glib_none().0)) }
2906    }
2907
2908    /// Obtains the position of the [`pango::Layout`][crate::pango::Layout] used to render text
2909    /// in the entry, in widget coordinates. Useful if you want to line
2910    /// up the text in an entry with some other text, e.g. when using the
2911    /// entry to implement editable cells in a sheet widget.
2912    ///
2913    /// Also useful to convert mouse events into coordinates inside the
2914    /// [`pango::Layout`][crate::pango::Layout], e.g. to take some action if some part of the entry text
2915    /// is clicked.
2916    ///
2917    /// Note that as the user scrolls around in the entry the offsets will
2918    /// change; you’ll need to connect to the “notify::scroll-offset”
2919    /// signal to track this. Remember when using the [`pango::Layout`][crate::pango::Layout]
2920    /// functions you need to convert to and from pixels using
2921    /// PANGO_PIXELS() or `PANGO_SCALE`.
2922    ///
2923    /// Keep in mind that the layout text may contain a preedit string, so
2924    /// [`layout_index_to_text_index()`][Self::layout_index_to_text_index()] and
2925    /// [`text_index_to_layout_index()`][Self::text_index_to_layout_index()] are needed to convert byte
2926    /// indices in the layout to byte indices in the entry contents.
2927    ///
2928    /// # Returns
2929    ///
2930    ///
2931    /// ## `x`
2932    /// location to store X offset of layout, or [`None`]
2933    ///
2934    /// ## `y`
2935    /// location to store Y offset of layout, or [`None`]
2936    #[doc(alias = "gtk_entry_get_layout_offsets")]
2937    #[doc(alias = "get_layout_offsets")]
2938    fn layout_offsets(&self) -> (i32, i32) {
2939        unsafe {
2940            let mut x = mem::MaybeUninit::uninit();
2941            let mut y = mem::MaybeUninit::uninit();
2942            ffi::gtk_entry_get_layout_offsets(
2943                self.as_ref().to_glib_none().0,
2944                x.as_mut_ptr(),
2945                y.as_mut_ptr(),
2946            );
2947            (x.assume_init(), y.assume_init())
2948        }
2949    }
2950
2951    /// Retrieves the maximum allowed length of the text in
2952    /// `self`. See [`set_max_length()`][Self::set_max_length()].
2953    ///
2954    /// This is equivalent to getting `self`'s [`EntryBuffer`][crate::EntryBuffer] and
2955    /// calling [`EntryBufferExtManual::max_length()`][crate::prelude::EntryBufferExtManual::max_length()] on it.
2956    ///
2957    /// # Returns
2958    ///
2959    /// the maximum allowed number of characters
2960    ///  in [`Entry`][crate::Entry], or 0 if there is no maximum.
2961    #[doc(alias = "gtk_entry_get_max_length")]
2962    #[doc(alias = "get_max_length")]
2963    fn max_length(&self) -> i32 {
2964        unsafe { ffi::gtk_entry_get_max_length(self.as_ref().to_glib_none().0) }
2965    }
2966
2967    /// Retrieves the desired maximum width of `self`, in characters.
2968    /// See [`set_max_width_chars()`][Self::set_max_width_chars()].
2969    ///
2970    /// # Returns
2971    ///
2972    /// the maximum width of the entry, in characters
2973    #[doc(alias = "gtk_entry_get_max_width_chars")]
2974    #[doc(alias = "get_max_width_chars")]
2975    fn max_width_chars(&self) -> i32 {
2976        unsafe { ffi::gtk_entry_get_max_width_chars(self.as_ref().to_glib_none().0) }
2977    }
2978
2979    /// Gets the value set by [`set_overwrite_mode()`][Self::set_overwrite_mode()].
2980    ///
2981    /// # Returns
2982    ///
2983    /// whether the text is overwritten when typing.
2984    #[doc(alias = "gtk_entry_get_overwrite_mode")]
2985    #[doc(alias = "get_overwrite_mode")]
2986    fn is_overwrite_mode(&self) -> bool {
2987        unsafe {
2988            from_glib(ffi::gtk_entry_get_overwrite_mode(
2989                self.as_ref().to_glib_none().0,
2990            ))
2991        }
2992    }
2993
2994    /// Retrieves the text that will be displayed when `self` is empty and unfocused
2995    ///
2996    /// # Returns
2997    ///
2998    /// a pointer to the placeholder text as a string. This string points to internally allocated
2999    /// storage in the widget and must not be freed, modified or stored.
3000    #[doc(alias = "gtk_entry_get_placeholder_text")]
3001    #[doc(alias = "get_placeholder_text")]
3002    fn placeholder_text(&self) -> Option<glib::GString> {
3003        unsafe {
3004            from_glib_none(ffi::gtk_entry_get_placeholder_text(
3005                self.as_ref().to_glib_none().0,
3006            ))
3007        }
3008    }
3009
3010    /// Returns the current fraction of the task that’s been completed.
3011    /// See [`set_progress_fraction()`][Self::set_progress_fraction()].
3012    ///
3013    /// # Returns
3014    ///
3015    /// a fraction from 0.0 to 1.0
3016    #[doc(alias = "gtk_entry_get_progress_fraction")]
3017    #[doc(alias = "get_progress_fraction")]
3018    fn progress_fraction(&self) -> f64 {
3019        unsafe { ffi::gtk_entry_get_progress_fraction(self.as_ref().to_glib_none().0) }
3020    }
3021
3022    /// Retrieves the pulse step set with [`set_progress_pulse_step()`][Self::set_progress_pulse_step()].
3023    ///
3024    /// # Returns
3025    ///
3026    /// a fraction from 0.0 to 1.0
3027    #[doc(alias = "gtk_entry_get_progress_pulse_step")]
3028    #[doc(alias = "get_progress_pulse_step")]
3029    fn progress_pulse_step(&self) -> f64 {
3030        unsafe { ffi::gtk_entry_get_progress_pulse_step(self.as_ref().to_glib_none().0) }
3031    }
3032
3033    /// Gets the tabstops that were set on the entry using [`set_tabs()`][Self::set_tabs()], if
3034    /// any.
3035    ///
3036    /// # Returns
3037    ///
3038    /// the tabstops, or [`None`] if none was set.
3039    #[doc(alias = "gtk_entry_get_tabs")]
3040    #[doc(alias = "get_tabs")]
3041    fn tabs(&self) -> Option<pango::TabArray> {
3042        unsafe { from_glib_none(ffi::gtk_entry_get_tabs(self.as_ref().to_glib_none().0)) }
3043    }
3044
3045    /// Retrieves the contents of the entry widget.
3046    /// See also [`EditableExt::chars()`][crate::prelude::EditableExt::chars()].
3047    ///
3048    /// This is equivalent to getting `self`'s [`EntryBuffer`][crate::EntryBuffer] and calling
3049    /// [`EntryBufferExtManual::text()`][crate::prelude::EntryBufferExtManual::text()] on it.
3050    ///
3051    /// # Returns
3052    ///
3053    /// a pointer to the contents of the widget as a
3054    ///  string. This string points to internally allocated
3055    ///  storage in the widget and must not be freed, modified or
3056    ///  stored.
3057    #[doc(alias = "gtk_entry_get_text")]
3058    #[doc(alias = "get_text")]
3059    fn text(&self) -> glib::GString {
3060        unsafe { from_glib_none(ffi::gtk_entry_get_text(self.as_ref().to_glib_none().0)) }
3061    }
3062
3063    /// Gets the area where the entry’s text is drawn. This function is
3064    /// useful when drawing something to the entry in a draw callback.
3065    ///
3066    /// If the entry is not realized, `text_area` is filled with zeros.
3067    ///
3068    /// See also [`icon_area()`][Self::icon_area()].
3069    ///
3070    /// # Returns
3071    ///
3072    ///
3073    /// ## `text_area`
3074    /// Return location for the text area.
3075    #[doc(alias = "gtk_entry_get_text_area")]
3076    #[doc(alias = "get_text_area")]
3077    fn text_area(&self) -> gdk::Rectangle {
3078        unsafe {
3079            let mut text_area = gdk::Rectangle::uninitialized();
3080            ffi::gtk_entry_get_text_area(
3081                self.as_ref().to_glib_none().0,
3082                text_area.to_glib_none_mut().0,
3083            );
3084            text_area
3085        }
3086    }
3087
3088    /// Retrieves the current length of the text in
3089    /// `self`.
3090    ///
3091    /// This is equivalent to getting `self`'s [`EntryBuffer`][crate::EntryBuffer] and
3092    /// calling [`EntryBufferExtManual::length()`][crate::prelude::EntryBufferExtManual::length()] on it.
3093    ///
3094    /// # Returns
3095    ///
3096    /// the current number of characters
3097    ///  in [`Entry`][crate::Entry], or 0 if there are none.
3098    #[doc(alias = "gtk_entry_get_text_length")]
3099    #[doc(alias = "get_text_length")]
3100    fn text_length(&self) -> u16 {
3101        unsafe { ffi::gtk_entry_get_text_length(self.as_ref().to_glib_none().0) }
3102    }
3103
3104    /// Retrieves whether the text in `self` is visible. See
3105    /// [`set_visibility()`][Self::set_visibility()].
3106    ///
3107    /// # Returns
3108    ///
3109    /// [`true`] if the text is currently visible
3110    #[doc(alias = "gtk_entry_get_visibility")]
3111    #[doc(alias = "get_visibility")]
3112    fn is_visible(&self) -> bool {
3113        unsafe {
3114            from_glib(ffi::gtk_entry_get_visibility(
3115                self.as_ref().to_glib_none().0,
3116            ))
3117        }
3118    }
3119
3120    /// Gets the value set by [`set_width_chars()`][Self::set_width_chars()].
3121    ///
3122    /// # Returns
3123    ///
3124    /// number of chars to request space for, or negative if unset
3125    #[doc(alias = "gtk_entry_get_width_chars")]
3126    #[doc(alias = "get_width_chars")]
3127    fn width_chars(&self) -> i32 {
3128        unsafe { ffi::gtk_entry_get_width_chars(self.as_ref().to_glib_none().0) }
3129    }
3130
3131    /// Causes `self` to have keyboard focus.
3132    ///
3133    /// It behaves like [`WidgetExt::grab_focus()`][crate::prelude::WidgetExt::grab_focus()],
3134    /// except that it doesn't select the contents of the entry.
3135    /// You only want to call this on some special entries
3136    /// which the user usually doesn't want to replace all text in,
3137    /// such as search-as-you-type entries.
3138    #[doc(alias = "gtk_entry_grab_focus_without_selecting")]
3139    fn grab_focus_without_selecting(&self) {
3140        unsafe {
3141            ffi::gtk_entry_grab_focus_without_selecting(self.as_ref().to_glib_none().0);
3142        }
3143    }
3144
3145    /// Allow the [`Entry`][crate::Entry] input method to internally handle key press
3146    /// and release events. If this function returns [`true`], then no further
3147    /// processing should be done for this key event. See
3148    /// [`IMContextExt::filter_keypress()`][crate::prelude::IMContextExt::filter_keypress()].
3149    ///
3150    /// Note that you are expected to call this function from your handler
3151    /// when overriding key event handling. This is needed in the case when
3152    /// you need to insert your own key handling between the input method
3153    /// and the default key event handling of the [`Entry`][crate::Entry].
3154    /// See [`TextViewExt::reset_im_context()`][crate::prelude::TextViewExt::reset_im_context()] for an example of use.
3155    /// ## `event`
3156    /// the key event
3157    ///
3158    /// # Returns
3159    ///
3160    /// [`true`] if the input method handled the key event.
3161    #[doc(alias = "gtk_entry_im_context_filter_keypress")]
3162    fn im_context_filter_keypress(&self, event: &gdk::EventKey) -> bool {
3163        unsafe {
3164            from_glib(ffi::gtk_entry_im_context_filter_keypress(
3165                self.as_ref().to_glib_none().0,
3166                mut_override(event.to_glib_none().0),
3167            ))
3168        }
3169    }
3170
3171    /// Converts from a position in the entry’s [`pango::Layout`][crate::pango::Layout] (returned by
3172    /// [`layout()`][Self::layout()]) to a position in the entry contents
3173    /// (returned by [`text()`][Self::text()]).
3174    /// ## `layout_index`
3175    /// byte index into the entry layout text
3176    ///
3177    /// # Returns
3178    ///
3179    /// byte index into the entry contents
3180    #[doc(alias = "gtk_entry_layout_index_to_text_index")]
3181    fn layout_index_to_text_index(&self, layout_index: i32) -> i32 {
3182        unsafe {
3183            ffi::gtk_entry_layout_index_to_text_index(self.as_ref().to_glib_none().0, layout_index)
3184        }
3185    }
3186
3187    /// Indicates that some progress is made, but you don’t know how much.
3188    /// Causes the entry’s progress indicator to enter “activity mode,”
3189    /// where a block bounces back and forth. Each call to
3190    /// [`progress_pulse()`][Self::progress_pulse()] causes the block to move by a little bit
3191    /// (the amount of movement per pulse is determined by
3192    /// [`set_progress_pulse_step()`][Self::set_progress_pulse_step()]).
3193    #[doc(alias = "gtk_entry_progress_pulse")]
3194    fn progress_pulse(&self) {
3195        unsafe {
3196            ffi::gtk_entry_progress_pulse(self.as_ref().to_glib_none().0);
3197        }
3198    }
3199
3200    /// Reset the input method context of the entry if needed.
3201    ///
3202    /// This can be necessary in the case where modifying the buffer
3203    /// would confuse on-going input method behavior.
3204    #[doc(alias = "gtk_entry_reset_im_context")]
3205    fn reset_im_context(&self) {
3206        unsafe {
3207            ffi::gtk_entry_reset_im_context(self.as_ref().to_glib_none().0);
3208        }
3209    }
3210
3211    /// If `setting` is [`true`], pressing Enter in the `self` will activate the default
3212    /// widget for the window containing the entry. This usually means that
3213    /// the dialog box containing the entry will be closed, since the default
3214    /// widget is usually one of the dialog buttons.
3215    ///
3216    /// (For experts: if `setting` is [`true`], the entry calls
3217    /// [`GtkWindowExt::activate_default()`][crate::prelude::GtkWindowExt::activate_default()] on the window containing the entry, in
3218    /// the default handler for the [`activate`][struct@crate::Entry#activate] signal.)
3219    /// ## `setting`
3220    /// [`true`] to activate window’s default widget on Enter keypress
3221    #[doc(alias = "gtk_entry_set_activates_default")]
3222    fn set_activates_default(&self, setting: bool) {
3223        unsafe {
3224            ffi::gtk_entry_set_activates_default(
3225                self.as_ref().to_glib_none().0,
3226                setting.into_glib(),
3227            );
3228        }
3229    }
3230
3231    /// Sets the alignment for the contents of the entry. This controls
3232    /// the horizontal positioning of the contents when the displayed
3233    /// text is shorter than the width of the entry.
3234    /// ## `xalign`
3235    /// The horizontal alignment, from 0 (left) to 1 (right).
3236    ///  Reversed for RTL layouts
3237    #[doc(alias = "gtk_entry_set_alignment")]
3238    fn set_alignment(&self, xalign: f32) {
3239        unsafe {
3240            ffi::gtk_entry_set_alignment(self.as_ref().to_glib_none().0, xalign);
3241        }
3242    }
3243
3244    /// Sets a [`pango::AttrList`][crate::pango::AttrList]; the attributes in the list are applied to the
3245    /// entry text.
3246    /// ## `attrs`
3247    /// a [`pango::AttrList`][crate::pango::AttrList]
3248    #[doc(alias = "gtk_entry_set_attributes")]
3249    fn set_attributes(&self, attrs: &pango::AttrList) {
3250        unsafe {
3251            ffi::gtk_entry_set_attributes(self.as_ref().to_glib_none().0, attrs.to_glib_none().0);
3252        }
3253    }
3254
3255    /// Set the [`EntryBuffer`][crate::EntryBuffer] object which holds the text for
3256    /// this widget.
3257    /// ## `buffer`
3258    /// a [`EntryBuffer`][crate::EntryBuffer]
3259    #[doc(alias = "gtk_entry_set_buffer")]
3260    fn set_buffer(&self, buffer: &impl IsA<EntryBuffer>) {
3261        unsafe {
3262            ffi::gtk_entry_set_buffer(
3263                self.as_ref().to_glib_none().0,
3264                buffer.as_ref().to_glib_none().0,
3265            );
3266        }
3267    }
3268
3269    /// Sets `completion` to be the auxiliary completion object to use with `self`.
3270    /// All further configuration of the completion mechanism is done on
3271    /// `completion` using the [`EntryCompletion`][crate::EntryCompletion] API. Completion is disabled if
3272    /// `completion` is set to [`None`].
3273    /// ## `completion`
3274    /// The [`EntryCompletion`][crate::EntryCompletion] or [`None`]
3275    #[doc(alias = "gtk_entry_set_completion")]
3276    fn set_completion(&self, completion: Option<&impl IsA<EntryCompletion>>) {
3277        unsafe {
3278            ffi::gtk_entry_set_completion(
3279                self.as_ref().to_glib_none().0,
3280                completion.map(|p| p.as_ref()).to_glib_none().0,
3281            );
3282        }
3283    }
3284
3285    /// Hooks up an adjustment to the cursor position in an entry, so that when
3286    /// the cursor is moved, the adjustment is scrolled to show that position.
3287    /// See [`ScrolledWindowExt::hadjustment()`][crate::prelude::ScrolledWindowExt::hadjustment()] for a typical way of obtaining
3288    /// the adjustment.
3289    ///
3290    /// The adjustment has to be in pixel units and in the same coordinate system
3291    /// as the entry.
3292    /// ## `adjustment`
3293    /// an adjustment which should be adjusted when the cursor
3294    ///  is moved, or [`None`]
3295    #[doc(alias = "gtk_entry_set_cursor_hadjustment")]
3296    fn set_cursor_hadjustment(&self, adjustment: Option<&impl IsA<Adjustment>>) {
3297        unsafe {
3298            ffi::gtk_entry_set_cursor_hadjustment(
3299                self.as_ref().to_glib_none().0,
3300                adjustment.map(|p| p.as_ref()).to_glib_none().0,
3301            );
3302        }
3303    }
3304
3305    /// Sets whether the entry has a beveled frame around it.
3306    /// ## `setting`
3307    /// new value
3308    #[doc(alias = "gtk_entry_set_has_frame")]
3309    fn set_has_frame(&self, setting: bool) {
3310        unsafe {
3311            ffi::gtk_entry_set_has_frame(self.as_ref().to_glib_none().0, setting.into_glib());
3312        }
3313    }
3314
3315    /// Sets whether the icon is activatable.
3316    /// ## `icon_pos`
3317    /// Icon position
3318    /// ## `activatable`
3319    /// [`true`] if the icon should be activatable
3320    #[doc(alias = "gtk_entry_set_icon_activatable")]
3321    fn set_icon_activatable(&self, icon_pos: EntryIconPosition, activatable: bool) {
3322        unsafe {
3323            ffi::gtk_entry_set_icon_activatable(
3324                self.as_ref().to_glib_none().0,
3325                icon_pos.into_glib(),
3326                activatable.into_glib(),
3327            );
3328        }
3329    }
3330
3331    /// Sets up the icon at the given position so that GTK+ will start a drag
3332    /// operation when the user clicks and drags the icon.
3333    ///
3334    /// To handle the drag operation, you need to connect to the usual
3335    /// [`drag-data-get`][struct@crate::Widget#drag-data-get] (or possibly [`drag-data-delete`][struct@crate::Widget#drag-data-delete])
3336    /// signal, and use [`current_icon_drag_source()`][Self::current_icon_drag_source()] in
3337    /// your signal handler to find out if the drag was started from
3338    /// an icon.
3339    ///
3340    /// By default, GTK+ uses the icon as the drag icon. You can use the
3341    /// [`drag-begin`][struct@crate::Widget#drag-begin] signal to set a different icon. Note that you
3342    /// have to use `g_signal_connect_after()` to ensure that your signal handler
3343    /// gets executed after the default handler.
3344    /// ## `icon_pos`
3345    /// icon position
3346    /// ## `target_list`
3347    /// the targets (data formats) in which the data can be provided
3348    /// ## `actions`
3349    /// a bitmask of the allowed drag actions
3350    #[doc(alias = "gtk_entry_set_icon_drag_source")]
3351    fn set_icon_drag_source(
3352        &self,
3353        icon_pos: EntryIconPosition,
3354        target_list: &TargetList,
3355        actions: gdk::DragAction,
3356    ) {
3357        unsafe {
3358            ffi::gtk_entry_set_icon_drag_source(
3359                self.as_ref().to_glib_none().0,
3360                icon_pos.into_glib(),
3361                target_list.to_glib_none().0,
3362                actions.into_glib(),
3363            );
3364        }
3365    }
3366
3367    /// Sets the icon shown in the entry at the specified position
3368    /// from the current icon theme.
3369    /// If the icon isn’t known, a “broken image” icon will be displayed
3370    /// instead.
3371    ///
3372    /// If `icon` is [`None`], no icon will be shown in the specified position.
3373    /// ## `icon_pos`
3374    /// The position at which to set the icon
3375    /// ## `icon`
3376    /// The icon to set, or [`None`]
3377    #[doc(alias = "gtk_entry_set_icon_from_gicon")]
3378    fn set_icon_from_gicon(&self, icon_pos: EntryIconPosition, icon: Option<&impl IsA<gio::Icon>>) {
3379        unsafe {
3380            ffi::gtk_entry_set_icon_from_gicon(
3381                self.as_ref().to_glib_none().0,
3382                icon_pos.into_glib(),
3383                icon.map(|p| p.as_ref()).to_glib_none().0,
3384            );
3385        }
3386    }
3387
3388    /// Sets the icon shown in the entry at the specified position
3389    /// from the current icon theme.
3390    ///
3391    /// If the icon name isn’t known, a “broken image” icon will be displayed
3392    /// instead.
3393    ///
3394    /// If `icon_name` is [`None`], no icon will be shown in the specified position.
3395    /// ## `icon_pos`
3396    /// The position at which to set the icon
3397    /// ## `icon_name`
3398    /// An icon name, or [`None`]
3399    #[doc(alias = "gtk_entry_set_icon_from_icon_name")]
3400    fn set_icon_from_icon_name(&self, icon_pos: EntryIconPosition, icon_name: Option<&str>) {
3401        unsafe {
3402            ffi::gtk_entry_set_icon_from_icon_name(
3403                self.as_ref().to_glib_none().0,
3404                icon_pos.into_glib(),
3405                icon_name.to_glib_none().0,
3406            );
3407        }
3408    }
3409
3410    /// Sets the icon shown in the specified position using a pixbuf.
3411    ///
3412    /// If `pixbuf` is [`None`], no icon will be shown in the specified position.
3413    /// ## `icon_pos`
3414    /// Icon position
3415    /// ## `pixbuf`
3416    /// A [`gdk_pixbuf::Pixbuf`][crate::gdk_pixbuf::Pixbuf], or [`None`]
3417    #[doc(alias = "gtk_entry_set_icon_from_pixbuf")]
3418    fn set_icon_from_pixbuf(
3419        &self,
3420        icon_pos: EntryIconPosition,
3421        pixbuf: Option<&gdk_pixbuf::Pixbuf>,
3422    ) {
3423        unsafe {
3424            ffi::gtk_entry_set_icon_from_pixbuf(
3425                self.as_ref().to_glib_none().0,
3426                icon_pos.into_glib(),
3427                pixbuf.to_glib_none().0,
3428            );
3429        }
3430    }
3431
3432    /// Sets the sensitivity for the specified icon.
3433    /// ## `icon_pos`
3434    /// Icon position
3435    /// ## `sensitive`
3436    /// Specifies whether the icon should appear
3437    ///  sensitive or insensitive
3438    #[doc(alias = "gtk_entry_set_icon_sensitive")]
3439    fn set_icon_sensitive(&self, icon_pos: EntryIconPosition, sensitive: bool) {
3440        unsafe {
3441            ffi::gtk_entry_set_icon_sensitive(
3442                self.as_ref().to_glib_none().0,
3443                icon_pos.into_glib(),
3444                sensitive.into_glib(),
3445            );
3446        }
3447    }
3448
3449    /// Sets `tooltip` as the contents of the tooltip for the icon at
3450    /// the specified position. `tooltip` is assumed to be marked up with
3451    /// the [Pango text markup language][PangoMarkupFormat].
3452    ///
3453    /// Use [`None`] for `tooltip` to remove an existing tooltip.
3454    ///
3455    /// See also [`WidgetExt::set_tooltip_markup()`][crate::prelude::WidgetExt::set_tooltip_markup()] and
3456    /// [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
3457    /// ## `icon_pos`
3458    /// the icon position
3459    /// ## `tooltip`
3460    /// the contents of the tooltip for the icon, or [`None`]
3461    #[doc(alias = "gtk_entry_set_icon_tooltip_markup")]
3462    fn set_icon_tooltip_markup(&self, icon_pos: EntryIconPosition, tooltip: Option<&str>) {
3463        unsafe {
3464            ffi::gtk_entry_set_icon_tooltip_markup(
3465                self.as_ref().to_glib_none().0,
3466                icon_pos.into_glib(),
3467                tooltip.to_glib_none().0,
3468            );
3469        }
3470    }
3471
3472    /// Sets `tooltip` as the contents of the tooltip for the icon
3473    /// at the specified position.
3474    ///
3475    /// Use [`None`] for `tooltip` to remove an existing tooltip.
3476    ///
3477    /// See also [`WidgetExt::set_tooltip_text()`][crate::prelude::WidgetExt::set_tooltip_text()] and
3478    /// [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
3479    ///
3480    /// If you unset the widget tooltip via [`WidgetExt::set_tooltip_text()`][crate::prelude::WidgetExt::set_tooltip_text()] or
3481    /// [`WidgetExt::set_tooltip_markup()`][crate::prelude::WidgetExt::set_tooltip_markup()], this sets GtkWidget:has-tooltip to [`false`],
3482    /// which suppresses icon tooltips too. You can resolve this by then calling
3483    /// [`WidgetExt::set_has_tooltip()`][crate::prelude::WidgetExt::set_has_tooltip()] to set GtkWidget:has-tooltip back to [`true`], or
3484    /// setting at least one non-empty tooltip on any icon achieves the same result.
3485    /// ## `icon_pos`
3486    /// the icon position
3487    /// ## `tooltip`
3488    /// the contents of the tooltip for the icon, or [`None`]
3489    #[doc(alias = "gtk_entry_set_icon_tooltip_text")]
3490    fn set_icon_tooltip_text(&self, icon_pos: EntryIconPosition, tooltip: Option<&str>) {
3491        unsafe {
3492            ffi::gtk_entry_set_icon_tooltip_text(
3493                self.as_ref().to_glib_none().0,
3494                icon_pos.into_glib(),
3495                tooltip.to_glib_none().0,
3496            );
3497        }
3498    }
3499
3500    /// Sets the [`input-hints`][struct@crate::Entry#input-hints] property, which
3501    /// allows input methods to fine-tune their behaviour.
3502    /// ## `hints`
3503    /// the hints
3504    #[doc(alias = "gtk_entry_set_input_hints")]
3505    fn set_input_hints(&self, hints: InputHints) {
3506        unsafe {
3507            ffi::gtk_entry_set_input_hints(self.as_ref().to_glib_none().0, hints.into_glib());
3508        }
3509    }
3510
3511    /// Sets the [`input-purpose`][struct@crate::Entry#input-purpose] property which
3512    /// can be used by on-screen keyboards and other input
3513    /// methods to adjust their behaviour.
3514    /// ## `purpose`
3515    /// the purpose
3516    #[doc(alias = "gtk_entry_set_input_purpose")]
3517    fn set_input_purpose(&self, purpose: InputPurpose) {
3518        unsafe {
3519            ffi::gtk_entry_set_input_purpose(self.as_ref().to_glib_none().0, purpose.into_glib());
3520        }
3521    }
3522
3523    /// Sets the character to use in place of the actual text when
3524    /// [`set_visibility()`][Self::set_visibility()] has been called to set text visibility
3525    /// to [`false`]. i.e. this is the character used in “password mode” to
3526    /// show the user how many characters have been typed. By default, GTK+
3527    /// picks the best invisible char available in the current font. If you
3528    /// set the invisible char to 0, then the user will get no feedback
3529    /// at all; there will be no text on the screen as they type.
3530    /// ## `ch`
3531    /// a Unicode character
3532    #[doc(alias = "gtk_entry_set_invisible_char")]
3533    fn set_invisible_char(&self, ch: Option<char>) {
3534        unsafe {
3535            ffi::gtk_entry_set_invisible_char(self.as_ref().to_glib_none().0, ch.into_glib());
3536        }
3537    }
3538
3539    /// Sets the maximum allowed length of the contents of the widget. If
3540    /// the current contents are longer than the given length, then they
3541    /// will be truncated to fit.
3542    ///
3543    /// This is equivalent to getting `self`'s [`EntryBuffer`][crate::EntryBuffer] and
3544    /// calling [`EntryBufferExtManual::set_max_length()`][crate::prelude::EntryBufferExtManual::set_max_length()] on it.
3545    /// ]|
3546    /// ## `max`
3547    /// the maximum length of the entry, or 0 for no maximum.
3548    ///  (other than the maximum length of entries.) The value passed in will
3549    ///  be clamped to the range 0-65536.
3550    #[doc(alias = "gtk_entry_set_max_length")]
3551    fn set_max_length(&self, max: i32) {
3552        unsafe {
3553            ffi::gtk_entry_set_max_length(self.as_ref().to_glib_none().0, max);
3554        }
3555    }
3556
3557    /// Sets the desired maximum width in characters of `self`.
3558    /// ## `n_chars`
3559    /// the new desired maximum width, in characters
3560    #[doc(alias = "gtk_entry_set_max_width_chars")]
3561    fn set_max_width_chars(&self, n_chars: i32) {
3562        unsafe {
3563            ffi::gtk_entry_set_max_width_chars(self.as_ref().to_glib_none().0, n_chars);
3564        }
3565    }
3566
3567    /// Sets whether the text is overwritten when typing in the [`Entry`][crate::Entry].
3568    /// ## `overwrite`
3569    /// new value
3570    #[doc(alias = "gtk_entry_set_overwrite_mode")]
3571    fn set_overwrite_mode(&self, overwrite: bool) {
3572        unsafe {
3573            ffi::gtk_entry_set_overwrite_mode(
3574                self.as_ref().to_glib_none().0,
3575                overwrite.into_glib(),
3576            );
3577        }
3578    }
3579
3580    /// Sets text to be displayed in `self` when it is empty and unfocused.
3581    /// This can be used to give a visual hint of the expected contents of
3582    /// the [`Entry`][crate::Entry].
3583    ///
3584    /// Note that since the placeholder text gets removed when the entry
3585    /// received focus, using this feature is a bit problematic if the entry
3586    /// is given the initial focus in a window. Sometimes this can be
3587    /// worked around by delaying the initial focus setting until the
3588    /// first key event arrives.
3589    /// ## `text`
3590    /// a string to be displayed when `self` is empty and unfocused, or [`None`]
3591    #[doc(alias = "gtk_entry_set_placeholder_text")]
3592    fn set_placeholder_text(&self, text: Option<&str>) {
3593        unsafe {
3594            ffi::gtk_entry_set_placeholder_text(
3595                self.as_ref().to_glib_none().0,
3596                text.to_glib_none().0,
3597            );
3598        }
3599    }
3600
3601    /// Causes the entry’s progress indicator to “fill in” the given
3602    /// fraction of the bar. The fraction should be between 0.0 and 1.0,
3603    /// inclusive.
3604    /// ## `fraction`
3605    /// fraction of the task that’s been completed
3606    #[doc(alias = "gtk_entry_set_progress_fraction")]
3607    fn set_progress_fraction(&self, fraction: f64) {
3608        unsafe {
3609            ffi::gtk_entry_set_progress_fraction(self.as_ref().to_glib_none().0, fraction);
3610        }
3611    }
3612
3613    /// Sets the fraction of total entry width to move the progress
3614    /// bouncing block for each call to [`progress_pulse()`][Self::progress_pulse()].
3615    /// ## `fraction`
3616    /// fraction between 0.0 and 1.0
3617    #[doc(alias = "gtk_entry_set_progress_pulse_step")]
3618    fn set_progress_pulse_step(&self, fraction: f64) {
3619        unsafe {
3620            ffi::gtk_entry_set_progress_pulse_step(self.as_ref().to_glib_none().0, fraction);
3621        }
3622    }
3623
3624    /// Sets a [`pango::TabArray`][crate::pango::TabArray]; the tabstops in the array are applied to the entry
3625    /// text.
3626    /// ## `tabs`
3627    /// a [`pango::TabArray`][crate::pango::TabArray]
3628    #[doc(alias = "gtk_entry_set_tabs")]
3629    fn set_tabs(&self, tabs: &pango::TabArray) {
3630        unsafe {
3631            ffi::gtk_entry_set_tabs(
3632                self.as_ref().to_glib_none().0,
3633                mut_override(tabs.to_glib_none().0),
3634            );
3635        }
3636    }
3637
3638    /// Sets the text in the widget to the given
3639    /// value, replacing the current contents.
3640    ///
3641    /// See [`EntryBufferExtManual::set_text()`][crate::prelude::EntryBufferExtManual::set_text()].
3642    /// ## `text`
3643    /// the new text
3644    #[doc(alias = "gtk_entry_set_text")]
3645    fn set_text(&self, text: &str) {
3646        unsafe {
3647            ffi::gtk_entry_set_text(self.as_ref().to_glib_none().0, text.to_glib_none().0);
3648        }
3649    }
3650
3651    /// Sets whether the contents of the entry are visible or not.
3652    /// When visibility is set to [`false`], characters are displayed
3653    /// as the invisible char, and will also appear that way when
3654    /// the text in the entry widget is copied elsewhere.
3655    ///
3656    /// By default, GTK+ picks the best invisible character available
3657    /// in the current font, but it can be changed with
3658    /// [`set_invisible_char()`][Self::set_invisible_char()].
3659    ///
3660    /// Note that you probably want to set [`input-purpose`][struct@crate::Entry#input-purpose]
3661    /// to [`InputPurpose::Password`][crate::InputPurpose::Password] or [`InputPurpose::Pin`][crate::InputPurpose::Pin] to
3662    /// inform input methods about the purpose of this entry,
3663    /// in addition to setting visibility to [`false`].
3664    /// ## `visible`
3665    /// [`true`] if the contents of the entry are displayed
3666    ///  as plaintext
3667    #[doc(alias = "gtk_entry_set_visibility")]
3668    fn set_visibility(&self, visible: bool) {
3669        unsafe {
3670            ffi::gtk_entry_set_visibility(self.as_ref().to_glib_none().0, visible.into_glib());
3671        }
3672    }
3673
3674    /// Changes the size request of the entry to be about the right size
3675    /// for `n_chars` characters. Note that it changes the size
3676    /// request, the size can still be affected by
3677    /// how you pack the widget into containers. If `n_chars` is -1, the
3678    /// size reverts to the default entry size.
3679    /// ## `n_chars`
3680    /// width in chars
3681    #[doc(alias = "gtk_entry_set_width_chars")]
3682    fn set_width_chars(&self, n_chars: i32) {
3683        unsafe {
3684            ffi::gtk_entry_set_width_chars(self.as_ref().to_glib_none().0, n_chars);
3685        }
3686    }
3687
3688    /// Converts from a position in the entry contents (returned
3689    /// by [`text()`][Self::text()]) to a position in the
3690    /// entry’s [`pango::Layout`][crate::pango::Layout] (returned by [`layout()`][Self::layout()],
3691    /// with text retrieved via [`Layout::text()`][crate::pango::Layout::text()]).
3692    /// ## `text_index`
3693    /// byte index into the entry contents
3694    ///
3695    /// # Returns
3696    ///
3697    /// byte index into the entry layout text
3698    #[doc(alias = "gtk_entry_text_index_to_layout_index")]
3699    fn text_index_to_layout_index(&self, text_index: i32) -> i32 {
3700        unsafe {
3701            ffi::gtk_entry_text_index_to_layout_index(self.as_ref().to_glib_none().0, text_index)
3702        }
3703    }
3704
3705    /// Unsets the invisible char previously set with
3706    /// [`set_invisible_char()`][Self::set_invisible_char()]. So that the
3707    /// default invisible char is used again.
3708    #[doc(alias = "gtk_entry_unset_invisible_char")]
3709    fn unset_invisible_char(&self) {
3710        unsafe {
3711            ffi::gtk_entry_unset_invisible_char(self.as_ref().to_glib_none().0);
3712        }
3713    }
3714
3715    /// Whether password entries will show a warning when Caps Lock is on.
3716    ///
3717    /// Note that the warning is shown using a secondary icon, and thus
3718    /// does not work if you are using the secondary icon position for some
3719    /// other purpose.
3720    #[doc(alias = "caps-lock-warning")]
3721    fn is_caps_lock_warning(&self) -> bool {
3722        ObjectExt::property(self.as_ref(), "caps-lock-warning")
3723    }
3724
3725    /// Whether password entries will show a warning when Caps Lock is on.
3726    ///
3727    /// Note that the warning is shown using a secondary icon, and thus
3728    /// does not work if you are using the secondary icon position for some
3729    /// other purpose.
3730    #[doc(alias = "caps-lock-warning")]
3731    fn set_caps_lock_warning(&self, caps_lock_warning: bool) {
3732        ObjectExt::set_property(self.as_ref(), "caps-lock-warning", caps_lock_warning)
3733    }
3734
3735    #[doc(alias = "cursor-position")]
3736    fn cursor_position(&self) -> i32 {
3737        ObjectExt::property(self.as_ref(), "cursor-position")
3738    }
3739
3740    #[doc(alias = "enable-emoji-completion")]
3741    fn enables_emoji_completion(&self) -> bool {
3742        ObjectExt::property(self.as_ref(), "enable-emoji-completion")
3743    }
3744
3745    #[doc(alias = "enable-emoji-completion")]
3746    fn set_enable_emoji_completion(&self, enable_emoji_completion: bool) {
3747        ObjectExt::set_property(
3748            self.as_ref(),
3749            "enable-emoji-completion",
3750            enable_emoji_completion,
3751        )
3752    }
3753
3754    /// Which IM (input method) module should be used for this entry.
3755    /// See [`IMContext`][crate::IMContext].
3756    ///
3757    /// Setting this to a non-[`None`] value overrides the
3758    /// system-wide IM module setting. See the GtkSettings
3759    /// [`gtk-im-module`][struct@crate::Settings#gtk-im-module] property.
3760    #[doc(alias = "im-module")]
3761    fn im_module(&self) -> Option<glib::GString> {
3762        ObjectExt::property(self.as_ref(), "im-module")
3763    }
3764
3765    /// Which IM (input method) module should be used for this entry.
3766    /// See [`IMContext`][crate::IMContext].
3767    ///
3768    /// Setting this to a non-[`None`] value overrides the
3769    /// system-wide IM module setting. See the GtkSettings
3770    /// [`gtk-im-module`][struct@crate::Settings#gtk-im-module] property.
3771    #[doc(alias = "im-module")]
3772    fn set_im_module(&self, im_module: Option<&str>) {
3773        ObjectExt::set_property(self.as_ref(), "im-module", im_module)
3774    }
3775
3776    /// Whether the invisible char has been set for the [`Entry`][crate::Entry].
3777    #[doc(alias = "invisible-char-set")]
3778    fn is_invisible_char_set(&self) -> bool {
3779        ObjectExt::property(self.as_ref(), "invisible-char-set")
3780    }
3781
3782    /// Whether the invisible char has been set for the [`Entry`][crate::Entry].
3783    #[doc(alias = "invisible-char-set")]
3784    fn set_invisible_char_set(&self, invisible_char_set: bool) {
3785        ObjectExt::set_property(self.as_ref(), "invisible-char-set", invisible_char_set)
3786    }
3787
3788    /// If :populate-all is [`true`], the [`populate-popup`][struct@crate::Entry#populate-popup]
3789    /// signal is also emitted for touch popups.
3790    #[doc(alias = "populate-all")]
3791    fn populates_all(&self) -> bool {
3792        ObjectExt::property(self.as_ref(), "populate-all")
3793    }
3794
3795    /// If :populate-all is [`true`], the [`populate-popup`][struct@crate::Entry#populate-popup]
3796    /// signal is also emitted for touch popups.
3797    #[doc(alias = "populate-all")]
3798    fn set_populate_all(&self, populate_all: bool) {
3799        ObjectExt::set_property(self.as_ref(), "populate-all", populate_all)
3800    }
3801
3802    /// Whether the primary icon is activatable.
3803    ///
3804    /// GTK+ emits the [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
3805    /// signals only on sensitive, activatable icons.
3806    ///
3807    /// Sensitive, but non-activatable icons can be used for purely
3808    /// informational purposes.
3809    #[doc(alias = "primary-icon-activatable")]
3810    fn is_primary_icon_activatable(&self) -> bool {
3811        ObjectExt::property(self.as_ref(), "primary-icon-activatable")
3812    }
3813
3814    /// Whether the primary icon is activatable.
3815    ///
3816    /// GTK+ emits the [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
3817    /// signals only on sensitive, activatable icons.
3818    ///
3819    /// Sensitive, but non-activatable icons can be used for purely
3820    /// informational purposes.
3821    #[doc(alias = "primary-icon-activatable")]
3822    fn set_primary_icon_activatable(&self, primary_icon_activatable: bool) {
3823        ObjectExt::set_property(
3824            self.as_ref(),
3825            "primary-icon-activatable",
3826            primary_icon_activatable,
3827        )
3828    }
3829
3830    /// The [`gio::Icon`][crate::gio::Icon] to use for the primary icon for the entry.
3831    #[doc(alias = "primary-icon-gicon")]
3832    fn primary_icon_gicon(&self) -> Option<gio::Icon> {
3833        ObjectExt::property(self.as_ref(), "primary-icon-gicon")
3834    }
3835
3836    /// The [`gio::Icon`][crate::gio::Icon] to use for the primary icon for the entry.
3837    #[doc(alias = "primary-icon-gicon")]
3838    fn set_primary_icon_gicon<P: IsA<gio::Icon>>(&self, primary_icon_gicon: Option<&P>) {
3839        ObjectExt::set_property(self.as_ref(), "primary-icon-gicon", primary_icon_gicon)
3840    }
3841
3842    /// The icon name to use for the primary icon for the entry.
3843    #[doc(alias = "primary-icon-name")]
3844    fn primary_icon_name(&self) -> Option<glib::GString> {
3845        ObjectExt::property(self.as_ref(), "primary-icon-name")
3846    }
3847
3848    /// The icon name to use for the primary icon for the entry.
3849    #[doc(alias = "primary-icon-name")]
3850    fn set_primary_icon_name(&self, primary_icon_name: Option<&str>) {
3851        ObjectExt::set_property(self.as_ref(), "primary-icon-name", primary_icon_name)
3852    }
3853
3854    /// A pixbuf to use as the primary icon for the entry.
3855    #[doc(alias = "primary-icon-pixbuf")]
3856    fn primary_icon_pixbuf(&self) -> Option<gdk_pixbuf::Pixbuf> {
3857        ObjectExt::property(self.as_ref(), "primary-icon-pixbuf")
3858    }
3859
3860    /// A pixbuf to use as the primary icon for the entry.
3861    #[doc(alias = "primary-icon-pixbuf")]
3862    fn set_primary_icon_pixbuf(&self, primary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>) {
3863        ObjectExt::set_property(self.as_ref(), "primary-icon-pixbuf", primary_icon_pixbuf)
3864    }
3865
3866    /// Whether the primary icon is sensitive.
3867    ///
3868    /// An insensitive icon appears grayed out. GTK+ does not emit the
3869    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release] signals and
3870    /// does not allow DND from insensitive icons.
3871    ///
3872    /// An icon should be set insensitive if the action that would trigger
3873    /// when clicked is currently not available.
3874    #[doc(alias = "primary-icon-sensitive")]
3875    fn is_primary_icon_sensitive(&self) -> bool {
3876        ObjectExt::property(self.as_ref(), "primary-icon-sensitive")
3877    }
3878
3879    /// Whether the primary icon is sensitive.
3880    ///
3881    /// An insensitive icon appears grayed out. GTK+ does not emit the
3882    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release] signals and
3883    /// does not allow DND from insensitive icons.
3884    ///
3885    /// An icon should be set insensitive if the action that would trigger
3886    /// when clicked is currently not available.
3887    #[doc(alias = "primary-icon-sensitive")]
3888    fn set_primary_icon_sensitive(&self, primary_icon_sensitive: bool) {
3889        ObjectExt::set_property(
3890            self.as_ref(),
3891            "primary-icon-sensitive",
3892            primary_icon_sensitive,
3893        )
3894    }
3895
3896    /// The representation which is used for the primary icon of the entry.
3897    #[doc(alias = "primary-icon-storage-type")]
3898    fn primary_icon_storage_type(&self) -> ImageType {
3899        ObjectExt::property(self.as_ref(), "primary-icon-storage-type")
3900    }
3901
3902    /// The contents of the tooltip on the primary icon, which is marked up
3903    /// with the [Pango text markup language][PangoMarkupFormat].
3904    ///
3905    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
3906    #[doc(alias = "primary-icon-tooltip-markup")]
3907    fn primary_icon_tooltip_markup(&self) -> Option<glib::GString> {
3908        ObjectExt::property(self.as_ref(), "primary-icon-tooltip-markup")
3909    }
3910
3911    /// The contents of the tooltip on the primary icon, which is marked up
3912    /// with the [Pango text markup language][PangoMarkupFormat].
3913    ///
3914    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
3915    #[doc(alias = "primary-icon-tooltip-markup")]
3916    fn set_primary_icon_tooltip_markup(&self, primary_icon_tooltip_markup: Option<&str>) {
3917        ObjectExt::set_property(
3918            self.as_ref(),
3919            "primary-icon-tooltip-markup",
3920            primary_icon_tooltip_markup,
3921        )
3922    }
3923
3924    /// The contents of the tooltip on the primary icon.
3925    ///
3926    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
3927    #[doc(alias = "primary-icon-tooltip-text")]
3928    fn primary_icon_tooltip_text(&self) -> Option<glib::GString> {
3929        ObjectExt::property(self.as_ref(), "primary-icon-tooltip-text")
3930    }
3931
3932    /// The contents of the tooltip on the primary icon.
3933    ///
3934    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
3935    #[doc(alias = "primary-icon-tooltip-text")]
3936    fn set_primary_icon_tooltip_text(&self, primary_icon_tooltip_text: Option<&str>) {
3937        ObjectExt::set_property(
3938            self.as_ref(),
3939            "primary-icon-tooltip-text",
3940            primary_icon_tooltip_text,
3941        )
3942    }
3943
3944    #[doc(alias = "scroll-offset")]
3945    fn scroll_offset(&self) -> i32 {
3946        ObjectExt::property(self.as_ref(), "scroll-offset")
3947    }
3948
3949    /// Whether the secondary icon is activatable.
3950    ///
3951    /// GTK+ emits the [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
3952    /// signals only on sensitive, activatable icons.
3953    ///
3954    /// Sensitive, but non-activatable icons can be used for purely
3955    /// informational purposes.
3956    #[doc(alias = "secondary-icon-activatable")]
3957    fn is_secondary_icon_activatable(&self) -> bool {
3958        ObjectExt::property(self.as_ref(), "secondary-icon-activatable")
3959    }
3960
3961    /// Whether the secondary icon is activatable.
3962    ///
3963    /// GTK+ emits the [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release]
3964    /// signals only on sensitive, activatable icons.
3965    ///
3966    /// Sensitive, but non-activatable icons can be used for purely
3967    /// informational purposes.
3968    #[doc(alias = "secondary-icon-activatable")]
3969    fn set_secondary_icon_activatable(&self, secondary_icon_activatable: bool) {
3970        ObjectExt::set_property(
3971            self.as_ref(),
3972            "secondary-icon-activatable",
3973            secondary_icon_activatable,
3974        )
3975    }
3976
3977    /// The [`gio::Icon`][crate::gio::Icon] to use for the secondary icon for the entry.
3978    #[doc(alias = "secondary-icon-gicon")]
3979    fn secondary_icon_gicon(&self) -> Option<gio::Icon> {
3980        ObjectExt::property(self.as_ref(), "secondary-icon-gicon")
3981    }
3982
3983    /// The [`gio::Icon`][crate::gio::Icon] to use for the secondary icon for the entry.
3984    #[doc(alias = "secondary-icon-gicon")]
3985    fn set_secondary_icon_gicon<P: IsA<gio::Icon>>(&self, secondary_icon_gicon: Option<&P>) {
3986        ObjectExt::set_property(self.as_ref(), "secondary-icon-gicon", secondary_icon_gicon)
3987    }
3988
3989    /// The icon name to use for the secondary icon for the entry.
3990    #[doc(alias = "secondary-icon-name")]
3991    fn secondary_icon_name(&self) -> Option<glib::GString> {
3992        ObjectExt::property(self.as_ref(), "secondary-icon-name")
3993    }
3994
3995    /// The icon name to use for the secondary icon for the entry.
3996    #[doc(alias = "secondary-icon-name")]
3997    fn set_secondary_icon_name(&self, secondary_icon_name: Option<&str>) {
3998        ObjectExt::set_property(self.as_ref(), "secondary-icon-name", secondary_icon_name)
3999    }
4000
4001    /// An pixbuf to use as the secondary icon for the entry.
4002    #[doc(alias = "secondary-icon-pixbuf")]
4003    fn secondary_icon_pixbuf(&self) -> Option<gdk_pixbuf::Pixbuf> {
4004        ObjectExt::property(self.as_ref(), "secondary-icon-pixbuf")
4005    }
4006
4007    /// An pixbuf to use as the secondary icon for the entry.
4008    #[doc(alias = "secondary-icon-pixbuf")]
4009    fn set_secondary_icon_pixbuf(&self, secondary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>) {
4010        ObjectExt::set_property(
4011            self.as_ref(),
4012            "secondary-icon-pixbuf",
4013            secondary_icon_pixbuf,
4014        )
4015    }
4016
4017    /// Whether the secondary icon is sensitive.
4018    ///
4019    /// An insensitive icon appears grayed out. GTK+ does not emit the
4020    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release] signals and
4021    /// does not allow DND from insensitive icons.
4022    ///
4023    /// An icon should be set insensitive if the action that would trigger
4024    /// when clicked is currently not available.
4025    #[doc(alias = "secondary-icon-sensitive")]
4026    fn is_secondary_icon_sensitive(&self) -> bool {
4027        ObjectExt::property(self.as_ref(), "secondary-icon-sensitive")
4028    }
4029
4030    /// Whether the secondary icon is sensitive.
4031    ///
4032    /// An insensitive icon appears grayed out. GTK+ does not emit the
4033    /// [`icon-press`][struct@crate::Entry#icon-press] and [`icon-release`][struct@crate::Entry#icon-release] signals and
4034    /// does not allow DND from insensitive icons.
4035    ///
4036    /// An icon should be set insensitive if the action that would trigger
4037    /// when clicked is currently not available.
4038    #[doc(alias = "secondary-icon-sensitive")]
4039    fn set_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool) {
4040        ObjectExt::set_property(
4041            self.as_ref(),
4042            "secondary-icon-sensitive",
4043            secondary_icon_sensitive,
4044        )
4045    }
4046
4047    /// The representation which is used for the secondary icon of the entry.
4048    #[doc(alias = "secondary-icon-storage-type")]
4049    fn secondary_icon_storage_type(&self) -> ImageType {
4050        ObjectExt::property(self.as_ref(), "secondary-icon-storage-type")
4051    }
4052
4053    /// The contents of the tooltip on the secondary icon, which is marked up
4054    /// with the [Pango text markup language][PangoMarkupFormat].
4055    ///
4056    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
4057    #[doc(alias = "secondary-icon-tooltip-markup")]
4058    fn secondary_icon_tooltip_markup(&self) -> Option<glib::GString> {
4059        ObjectExt::property(self.as_ref(), "secondary-icon-tooltip-markup")
4060    }
4061
4062    /// The contents of the tooltip on the secondary icon, which is marked up
4063    /// with the [Pango text markup language][PangoMarkupFormat].
4064    ///
4065    /// Also see [`set_icon_tooltip_markup()`][Self::set_icon_tooltip_markup()].
4066    #[doc(alias = "secondary-icon-tooltip-markup")]
4067    fn set_secondary_icon_tooltip_markup(&self, secondary_icon_tooltip_markup: Option<&str>) {
4068        ObjectExt::set_property(
4069            self.as_ref(),
4070            "secondary-icon-tooltip-markup",
4071            secondary_icon_tooltip_markup,
4072        )
4073    }
4074
4075    /// The contents of the tooltip on the secondary icon.
4076    ///
4077    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
4078    #[doc(alias = "secondary-icon-tooltip-text")]
4079    fn secondary_icon_tooltip_text(&self) -> Option<glib::GString> {
4080        ObjectExt::property(self.as_ref(), "secondary-icon-tooltip-text")
4081    }
4082
4083    /// The contents of the tooltip on the secondary icon.
4084    ///
4085    /// Also see [`set_icon_tooltip_text()`][Self::set_icon_tooltip_text()].
4086    #[doc(alias = "secondary-icon-tooltip-text")]
4087    fn set_secondary_icon_tooltip_text(&self, secondary_icon_tooltip_text: Option<&str>) {
4088        ObjectExt::set_property(
4089            self.as_ref(),
4090            "secondary-icon-tooltip-text",
4091            secondary_icon_tooltip_text,
4092        )
4093    }
4094
4095    #[doc(alias = "selection-bound")]
4096    fn selection_bound(&self) -> i32 {
4097        ObjectExt::property(self.as_ref(), "selection-bound")
4098    }
4099
4100    #[doc(alias = "show-emoji-icon")]
4101    fn shows_emoji_icon(&self) -> bool {
4102        ObjectExt::property(self.as_ref(), "show-emoji-icon")
4103    }
4104
4105    #[doc(alias = "show-emoji-icon")]
4106    fn set_show_emoji_icon(&self, show_emoji_icon: bool) {
4107        ObjectExt::set_property(self.as_ref(), "show-emoji-icon", show_emoji_icon)
4108    }
4109
4110    /// When [`true`], pasted multi-line text is truncated to the first line.
4111    #[doc(alias = "truncate-multiline")]
4112    fn must_truncate_multiline(&self) -> bool {
4113        ObjectExt::property(self.as_ref(), "truncate-multiline")
4114    }
4115
4116    /// When [`true`], pasted multi-line text is truncated to the first line.
4117    #[doc(alias = "truncate-multiline")]
4118    fn set_truncate_multiline(&self, truncate_multiline: bool) {
4119        ObjectExt::set_property(self.as_ref(), "truncate-multiline", truncate_multiline)
4120    }
4121
4122    /// The horizontal alignment, from 0 (left) to 1 (right).
4123    /// Reversed for RTL layouts.
4124    fn xalign(&self) -> f32 {
4125        ObjectExt::property(self.as_ref(), "xalign")
4126    }
4127
4128    /// The horizontal alignment, from 0 (left) to 1 (right).
4129    /// Reversed for RTL layouts.
4130    fn set_xalign(&self, xalign: f32) {
4131        ObjectExt::set_property(self.as_ref(), "xalign", xalign)
4132    }
4133
4134    /// The ::activate signal is emitted when the user hits
4135    /// the Enter key.
4136    ///
4137    /// While this signal is used as a
4138    /// [keybinding signal][GtkBindingSignal],
4139    /// it is also commonly used by applications to intercept
4140    /// activation of entries.
4141    ///
4142    /// The default bindings for this signal are all forms of the Enter key.
4143    #[doc(alias = "activate")]
4144    fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4145        unsafe extern "C" fn activate_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4146            this: *mut ffi::GtkEntry,
4147            f: glib::ffi::gpointer,
4148        ) {
4149            let f: &F = &*(f as *const F);
4150            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4151        }
4152        unsafe {
4153            let f: Box_<F> = Box_::new(f);
4154            connect_raw(
4155                self.as_ptr() as *mut _,
4156                b"activate\0".as_ptr() as *const _,
4157                Some(transmute::<_, unsafe extern "C" fn()>(
4158                    activate_trampoline::<Self, F> as *const (),
4159                )),
4160                Box_::into_raw(f),
4161            )
4162        }
4163    }
4164
4165    fn emit_activate(&self) {
4166        self.emit_by_name::<()>("activate", &[]);
4167    }
4168
4169    /// The ::backspace signal is a
4170    /// [keybinding signal][GtkBindingSignal]
4171    /// which gets emitted when the user asks for it.
4172    ///
4173    /// The default bindings for this signal are
4174    /// Backspace and Shift-Backspace.
4175    #[doc(alias = "backspace")]
4176    fn connect_backspace<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4177        unsafe extern "C" fn backspace_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4178            this: *mut ffi::GtkEntry,
4179            f: glib::ffi::gpointer,
4180        ) {
4181            let f: &F = &*(f as *const F);
4182            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4183        }
4184        unsafe {
4185            let f: Box_<F> = Box_::new(f);
4186            connect_raw(
4187                self.as_ptr() as *mut _,
4188                b"backspace\0".as_ptr() as *const _,
4189                Some(transmute::<_, unsafe extern "C" fn()>(
4190                    backspace_trampoline::<Self, F> as *const (),
4191                )),
4192                Box_::into_raw(f),
4193            )
4194        }
4195    }
4196
4197    fn emit_backspace(&self) {
4198        self.emit_by_name::<()>("backspace", &[]);
4199    }
4200
4201    /// The ::copy-clipboard signal is a
4202    /// [keybinding signal][GtkBindingSignal]
4203    /// which gets emitted to copy the selection to the clipboard.
4204    ///
4205    /// The default bindings for this signal are
4206    /// Ctrl-c and Ctrl-Insert.
4207    #[doc(alias = "copy-clipboard")]
4208    fn connect_copy_clipboard<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4209        unsafe extern "C" fn copy_clipboard_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4210            this: *mut ffi::GtkEntry,
4211            f: glib::ffi::gpointer,
4212        ) {
4213            let f: &F = &*(f as *const F);
4214            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4215        }
4216        unsafe {
4217            let f: Box_<F> = Box_::new(f);
4218            connect_raw(
4219                self.as_ptr() as *mut _,
4220                b"copy-clipboard\0".as_ptr() as *const _,
4221                Some(transmute::<_, unsafe extern "C" fn()>(
4222                    copy_clipboard_trampoline::<Self, F> as *const (),
4223                )),
4224                Box_::into_raw(f),
4225            )
4226        }
4227    }
4228
4229    fn emit_copy_clipboard(&self) {
4230        self.emit_by_name::<()>("copy-clipboard", &[]);
4231    }
4232
4233    /// The ::cut-clipboard signal is a
4234    /// [keybinding signal][GtkBindingSignal]
4235    /// which gets emitted to cut the selection to the clipboard.
4236    ///
4237    /// The default bindings for this signal are
4238    /// Ctrl-x and Shift-Delete.
4239    #[doc(alias = "cut-clipboard")]
4240    fn connect_cut_clipboard<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4241        unsafe extern "C" fn cut_clipboard_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4242            this: *mut ffi::GtkEntry,
4243            f: glib::ffi::gpointer,
4244        ) {
4245            let f: &F = &*(f as *const F);
4246            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4247        }
4248        unsafe {
4249            let f: Box_<F> = Box_::new(f);
4250            connect_raw(
4251                self.as_ptr() as *mut _,
4252                b"cut-clipboard\0".as_ptr() as *const _,
4253                Some(transmute::<_, unsafe extern "C" fn()>(
4254                    cut_clipboard_trampoline::<Self, F> as *const (),
4255                )),
4256                Box_::into_raw(f),
4257            )
4258        }
4259    }
4260
4261    fn emit_cut_clipboard(&self) {
4262        self.emit_by_name::<()>("cut-clipboard", &[]);
4263    }
4264
4265    /// The ::delete-from-cursor signal is a
4266    /// [keybinding signal][GtkBindingSignal]
4267    /// which gets emitted when the user initiates a text deletion.
4268    ///
4269    /// If the `type_` is [`DeleteType::Chars`][crate::DeleteType::Chars], GTK+ deletes the selection
4270    /// if there is one, otherwise it deletes the requested number
4271    /// of characters.
4272    ///
4273    /// The default bindings for this signal are
4274    /// Delete for deleting a character and Ctrl-Delete for
4275    /// deleting a word.
4276    /// ## `type_`
4277    /// the granularity of the deletion, as a [`DeleteType`][crate::DeleteType]
4278    /// ## `count`
4279    /// the number of `type_` units to delete
4280    #[doc(alias = "delete-from-cursor")]
4281    fn connect_delete_from_cursor<F: Fn(&Self, DeleteType, i32) + 'static>(
4282        &self,
4283        f: F,
4284    ) -> SignalHandlerId {
4285        unsafe extern "C" fn delete_from_cursor_trampoline<
4286            P: IsA<Entry>,
4287            F: Fn(&P, DeleteType, i32) + 'static,
4288        >(
4289            this: *mut ffi::GtkEntry,
4290            type_: ffi::GtkDeleteType,
4291            count: libc::c_int,
4292            f: glib::ffi::gpointer,
4293        ) {
4294            let f: &F = &*(f as *const F);
4295            f(
4296                Entry::from_glib_borrow(this).unsafe_cast_ref(),
4297                from_glib(type_),
4298                count,
4299            )
4300        }
4301        unsafe {
4302            let f: Box_<F> = Box_::new(f);
4303            connect_raw(
4304                self.as_ptr() as *mut _,
4305                b"delete-from-cursor\0".as_ptr() as *const _,
4306                Some(transmute::<_, unsafe extern "C" fn()>(
4307                    delete_from_cursor_trampoline::<Self, F> as *const (),
4308                )),
4309                Box_::into_raw(f),
4310            )
4311        }
4312    }
4313
4314    fn emit_delete_from_cursor(&self, type_: DeleteType, count: i32) {
4315        self.emit_by_name::<()>("delete-from-cursor", &[&type_, &count]);
4316    }
4317
4318    /// The ::icon-press signal is emitted when an activatable icon
4319    /// is clicked.
4320    /// ## `icon_pos`
4321    /// The position of the clicked icon
4322    /// ## `event`
4323    /// the button press event
4324    #[doc(alias = "icon-press")]
4325    fn connect_icon_press<F: Fn(&Self, EntryIconPosition, &gdk::Event) + 'static>(
4326        &self,
4327        f: F,
4328    ) -> SignalHandlerId {
4329        unsafe extern "C" fn icon_press_trampoline<
4330            P: IsA<Entry>,
4331            F: Fn(&P, EntryIconPosition, &gdk::Event) + 'static,
4332        >(
4333            this: *mut ffi::GtkEntry,
4334            icon_pos: ffi::GtkEntryIconPosition,
4335            event: *mut gdk::ffi::GdkEvent,
4336            f: glib::ffi::gpointer,
4337        ) {
4338            let f: &F = &*(f as *const F);
4339            f(
4340                Entry::from_glib_borrow(this).unsafe_cast_ref(),
4341                from_glib(icon_pos),
4342                &from_glib_none(event),
4343            )
4344        }
4345        unsafe {
4346            let f: Box_<F> = Box_::new(f);
4347            connect_raw(
4348                self.as_ptr() as *mut _,
4349                b"icon-press\0".as_ptr() as *const _,
4350                Some(transmute::<_, unsafe extern "C" fn()>(
4351                    icon_press_trampoline::<Self, F> as *const (),
4352                )),
4353                Box_::into_raw(f),
4354            )
4355        }
4356    }
4357
4358    /// The ::icon-release signal is emitted on the button release from a
4359    /// mouse click over an activatable icon.
4360    /// ## `icon_pos`
4361    /// The position of the clicked icon
4362    /// ## `event`
4363    /// the button release event
4364    #[doc(alias = "icon-release")]
4365    fn connect_icon_release<F: Fn(&Self, EntryIconPosition, &gdk::Event) + 'static>(
4366        &self,
4367        f: F,
4368    ) -> SignalHandlerId {
4369        unsafe extern "C" fn icon_release_trampoline<
4370            P: IsA<Entry>,
4371            F: Fn(&P, EntryIconPosition, &gdk::Event) + 'static,
4372        >(
4373            this: *mut ffi::GtkEntry,
4374            icon_pos: ffi::GtkEntryIconPosition,
4375            event: *mut gdk::ffi::GdkEvent,
4376            f: glib::ffi::gpointer,
4377        ) {
4378            let f: &F = &*(f as *const F);
4379            f(
4380                Entry::from_glib_borrow(this).unsafe_cast_ref(),
4381                from_glib(icon_pos),
4382                &from_glib_none(event),
4383            )
4384        }
4385        unsafe {
4386            let f: Box_<F> = Box_::new(f);
4387            connect_raw(
4388                self.as_ptr() as *mut _,
4389                b"icon-release\0".as_ptr() as *const _,
4390                Some(transmute::<_, unsafe extern "C" fn()>(
4391                    icon_release_trampoline::<Self, F> as *const (),
4392                )),
4393                Box_::into_raw(f),
4394            )
4395        }
4396    }
4397
4398    /// The ::insert-at-cursor signal is a
4399    /// [keybinding signal][GtkBindingSignal]
4400    /// which gets emitted when the user initiates the insertion of a
4401    /// fixed string at the cursor.
4402    ///
4403    /// This signal has no default bindings.
4404    /// ## `string`
4405    /// the string to insert
4406    #[doc(alias = "insert-at-cursor")]
4407    fn connect_insert_at_cursor<F: Fn(&Self, &str) + 'static>(&self, f: F) -> SignalHandlerId {
4408        unsafe extern "C" fn insert_at_cursor_trampoline<
4409            P: IsA<Entry>,
4410            F: Fn(&P, &str) + 'static,
4411        >(
4412            this: *mut ffi::GtkEntry,
4413            string: *mut libc::c_char,
4414            f: glib::ffi::gpointer,
4415        ) {
4416            let f: &F = &*(f as *const F);
4417            f(
4418                Entry::from_glib_borrow(this).unsafe_cast_ref(),
4419                &glib::GString::from_glib_borrow(string),
4420            )
4421        }
4422        unsafe {
4423            let f: Box_<F> = Box_::new(f);
4424            connect_raw(
4425                self.as_ptr() as *mut _,
4426                b"insert-at-cursor\0".as_ptr() as *const _,
4427                Some(transmute::<_, unsafe extern "C" fn()>(
4428                    insert_at_cursor_trampoline::<Self, F> as *const (),
4429                )),
4430                Box_::into_raw(f),
4431            )
4432        }
4433    }
4434
4435    fn emit_insert_at_cursor(&self, string: &str) {
4436        self.emit_by_name::<()>("insert-at-cursor", &[&string]);
4437    }
4438
4439    /// The ::insert-emoji signal is a
4440    /// [keybinding signal][GtkBindingSignal]
4441    /// which gets emitted to present the Emoji chooser for the `entry`.
4442    ///
4443    /// The default bindings for this signal are Ctrl-. and Ctrl-;
4444    #[doc(alias = "insert-emoji")]
4445    fn connect_insert_emoji<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4446        unsafe extern "C" fn insert_emoji_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4447            this: *mut ffi::GtkEntry,
4448            f: glib::ffi::gpointer,
4449        ) {
4450            let f: &F = &*(f as *const F);
4451            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4452        }
4453        unsafe {
4454            let f: Box_<F> = Box_::new(f);
4455            connect_raw(
4456                self.as_ptr() as *mut _,
4457                b"insert-emoji\0".as_ptr() as *const _,
4458                Some(transmute::<_, unsafe extern "C" fn()>(
4459                    insert_emoji_trampoline::<Self, F> as *const (),
4460                )),
4461                Box_::into_raw(f),
4462            )
4463        }
4464    }
4465
4466    fn emit_insert_emoji(&self) {
4467        self.emit_by_name::<()>("insert-emoji", &[]);
4468    }
4469
4470    /// The ::move-cursor signal is a
4471    /// [keybinding signal][GtkBindingSignal]
4472    /// which gets emitted when the user initiates a cursor movement.
4473    /// If the cursor is not visible in `entry`, this signal causes
4474    /// the viewport to be moved instead.
4475    ///
4476    /// Applications should not connect to it, but may emit it with
4477    /// `g_signal_emit_by_name()` if they need to control the cursor
4478    /// programmatically.
4479    ///
4480    /// The default bindings for this signal come in two variants,
4481    /// the variant with the Shift modifier extends the selection,
4482    /// the variant without the Shift modifer does not.
4483    /// There are too many key combinations to list them all here.
4484    /// - Arrow keys move by individual characters/lines
4485    /// - Ctrl-arrow key combinations move by words/paragraphs
4486    /// - Home/End keys move to the ends of the buffer
4487    /// ## `step`
4488    /// the granularity of the move, as a [`MovementStep`][crate::MovementStep]
4489    /// ## `count`
4490    /// the number of `step` units to move
4491    /// ## `extend_selection`
4492    /// [`true`] if the move should extend the selection
4493    #[doc(alias = "move-cursor")]
4494    fn connect_move_cursor<F: Fn(&Self, MovementStep, i32, bool) + 'static>(
4495        &self,
4496        f: F,
4497    ) -> SignalHandlerId {
4498        unsafe extern "C" fn move_cursor_trampoline<
4499            P: IsA<Entry>,
4500            F: Fn(&P, MovementStep, i32, bool) + 'static,
4501        >(
4502            this: *mut ffi::GtkEntry,
4503            step: ffi::GtkMovementStep,
4504            count: libc::c_int,
4505            extend_selection: glib::ffi::gboolean,
4506            f: glib::ffi::gpointer,
4507        ) {
4508            let f: &F = &*(f as *const F);
4509            f(
4510                Entry::from_glib_borrow(this).unsafe_cast_ref(),
4511                from_glib(step),
4512                count,
4513                from_glib(extend_selection),
4514            )
4515        }
4516        unsafe {
4517            let f: Box_<F> = Box_::new(f);
4518            connect_raw(
4519                self.as_ptr() as *mut _,
4520                b"move-cursor\0".as_ptr() as *const _,
4521                Some(transmute::<_, unsafe extern "C" fn()>(
4522                    move_cursor_trampoline::<Self, F> as *const (),
4523                )),
4524                Box_::into_raw(f),
4525            )
4526        }
4527    }
4528
4529    fn emit_move_cursor(&self, step: MovementStep, count: i32, extend_selection: bool) {
4530        self.emit_by_name::<()>("move-cursor", &[&step, &count, &extend_selection]);
4531    }
4532
4533    /// The ::paste-clipboard signal is a
4534    /// [keybinding signal][GtkBindingSignal]
4535    /// which gets emitted to paste the contents of the clipboard
4536    /// into the text view.
4537    ///
4538    /// The default bindings for this signal are
4539    /// Ctrl-v and Shift-Insert.
4540    #[doc(alias = "paste-clipboard")]
4541    fn connect_paste_clipboard<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4542        unsafe extern "C" fn paste_clipboard_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4543            this: *mut ffi::GtkEntry,
4544            f: glib::ffi::gpointer,
4545        ) {
4546            let f: &F = &*(f as *const F);
4547            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4548        }
4549        unsafe {
4550            let f: Box_<F> = Box_::new(f);
4551            connect_raw(
4552                self.as_ptr() as *mut _,
4553                b"paste-clipboard\0".as_ptr() as *const _,
4554                Some(transmute::<_, unsafe extern "C" fn()>(
4555                    paste_clipboard_trampoline::<Self, F> as *const (),
4556                )),
4557                Box_::into_raw(f),
4558            )
4559        }
4560    }
4561
4562    fn emit_paste_clipboard(&self) {
4563        self.emit_by_name::<()>("paste-clipboard", &[]);
4564    }
4565
4566    /// The ::populate-popup signal gets emitted before showing the
4567    /// context menu of the entry.
4568    ///
4569    /// If you need to add items to the context menu, connect
4570    /// to this signal and append your items to the `widget`, which
4571    /// will be a [`Menu`][crate::Menu] in this case.
4572    ///
4573    /// If [`populate-all`][struct@crate::Entry#populate-all] is [`true`], this signal will
4574    /// also be emitted to populate touch popups. In this case,
4575    /// `widget` will be a different container, e.g. a [`Toolbar`][crate::Toolbar].
4576    /// The signal handler should not make assumptions about the
4577    /// type of `widget`.
4578    /// ## `widget`
4579    /// the container that is being populated
4580    #[doc(alias = "populate-popup")]
4581    fn connect_populate_popup<F: Fn(&Self, &Widget) + 'static>(&self, f: F) -> SignalHandlerId {
4582        unsafe extern "C" fn populate_popup_trampoline<
4583            P: IsA<Entry>,
4584            F: Fn(&P, &Widget) + 'static,
4585        >(
4586            this: *mut ffi::GtkEntry,
4587            widget: *mut ffi::GtkWidget,
4588            f: glib::ffi::gpointer,
4589        ) {
4590            let f: &F = &*(f as *const F);
4591            f(
4592                Entry::from_glib_borrow(this).unsafe_cast_ref(),
4593                &from_glib_borrow(widget),
4594            )
4595        }
4596        unsafe {
4597            let f: Box_<F> = Box_::new(f);
4598            connect_raw(
4599                self.as_ptr() as *mut _,
4600                b"populate-popup\0".as_ptr() as *const _,
4601                Some(transmute::<_, unsafe extern "C" fn()>(
4602                    populate_popup_trampoline::<Self, F> as *const (),
4603                )),
4604                Box_::into_raw(f),
4605            )
4606        }
4607    }
4608
4609    /// If an input method is used, the typed text will not immediately
4610    /// be committed to the buffer. So if you are interested in the text,
4611    /// connect to this signal.
4612    /// ## `preedit`
4613    /// the current preedit string
4614    #[doc(alias = "preedit-changed")]
4615    fn connect_preedit_changed<F: Fn(&Self, &str) + 'static>(&self, f: F) -> SignalHandlerId {
4616        unsafe extern "C" fn preedit_changed_trampoline<
4617            P: IsA<Entry>,
4618            F: Fn(&P, &str) + 'static,
4619        >(
4620            this: *mut ffi::GtkEntry,
4621            preedit: *mut libc::c_char,
4622            f: glib::ffi::gpointer,
4623        ) {
4624            let f: &F = &*(f as *const F);
4625            f(
4626                Entry::from_glib_borrow(this).unsafe_cast_ref(),
4627                &glib::GString::from_glib_borrow(preedit),
4628            )
4629        }
4630        unsafe {
4631            let f: Box_<F> = Box_::new(f);
4632            connect_raw(
4633                self.as_ptr() as *mut _,
4634                b"preedit-changed\0".as_ptr() as *const _,
4635                Some(transmute::<_, unsafe extern "C" fn()>(
4636                    preedit_changed_trampoline::<Self, F> as *const (),
4637                )),
4638                Box_::into_raw(f),
4639            )
4640        }
4641    }
4642
4643    fn emit_preedit_changed(&self, preedit: &str) {
4644        self.emit_by_name::<()>("preedit-changed", &[&preedit]);
4645    }
4646
4647    /// The ::toggle-overwrite signal is a
4648    /// [keybinding signal][GtkBindingSignal]
4649    /// which gets emitted to toggle the overwrite mode of the entry.
4650    ///
4651    /// The default bindings for this signal is Insert.
4652    #[doc(alias = "toggle-overwrite")]
4653    fn connect_toggle_overwrite<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4654        unsafe extern "C" fn toggle_overwrite_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4655            this: *mut ffi::GtkEntry,
4656            f: glib::ffi::gpointer,
4657        ) {
4658            let f: &F = &*(f as *const F);
4659            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4660        }
4661        unsafe {
4662            let f: Box_<F> = Box_::new(f);
4663            connect_raw(
4664                self.as_ptr() as *mut _,
4665                b"toggle-overwrite\0".as_ptr() as *const _,
4666                Some(transmute::<_, unsafe extern "C" fn()>(
4667                    toggle_overwrite_trampoline::<Self, F> as *const (),
4668                )),
4669                Box_::into_raw(f),
4670            )
4671        }
4672    }
4673
4674    fn emit_toggle_overwrite(&self) {
4675        self.emit_by_name::<()>("toggle-overwrite", &[]);
4676    }
4677
4678    #[doc(alias = "activates-default")]
4679    fn connect_activates_default_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4680        unsafe extern "C" fn notify_activates_default_trampoline<
4681            P: IsA<Entry>,
4682            F: Fn(&P) + 'static,
4683        >(
4684            this: *mut ffi::GtkEntry,
4685            _param_spec: glib::ffi::gpointer,
4686            f: glib::ffi::gpointer,
4687        ) {
4688            let f: &F = &*(f as *const F);
4689            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4690        }
4691        unsafe {
4692            let f: Box_<F> = Box_::new(f);
4693            connect_raw(
4694                self.as_ptr() as *mut _,
4695                b"notify::activates-default\0".as_ptr() as *const _,
4696                Some(transmute::<_, unsafe extern "C" fn()>(
4697                    notify_activates_default_trampoline::<Self, F> as *const (),
4698                )),
4699                Box_::into_raw(f),
4700            )
4701        }
4702    }
4703
4704    #[doc(alias = "attributes")]
4705    fn connect_attributes_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4706        unsafe extern "C" fn notify_attributes_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4707            this: *mut ffi::GtkEntry,
4708            _param_spec: glib::ffi::gpointer,
4709            f: glib::ffi::gpointer,
4710        ) {
4711            let f: &F = &*(f as *const F);
4712            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4713        }
4714        unsafe {
4715            let f: Box_<F> = Box_::new(f);
4716            connect_raw(
4717                self.as_ptr() as *mut _,
4718                b"notify::attributes\0".as_ptr() as *const _,
4719                Some(transmute::<_, unsafe extern "C" fn()>(
4720                    notify_attributes_trampoline::<Self, F> as *const (),
4721                )),
4722                Box_::into_raw(f),
4723            )
4724        }
4725    }
4726
4727    #[doc(alias = "buffer")]
4728    fn connect_buffer_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4729        unsafe extern "C" fn notify_buffer_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4730            this: *mut ffi::GtkEntry,
4731            _param_spec: glib::ffi::gpointer,
4732            f: glib::ffi::gpointer,
4733        ) {
4734            let f: &F = &*(f as *const F);
4735            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4736        }
4737        unsafe {
4738            let f: Box_<F> = Box_::new(f);
4739            connect_raw(
4740                self.as_ptr() as *mut _,
4741                b"notify::buffer\0".as_ptr() as *const _,
4742                Some(transmute::<_, unsafe extern "C" fn()>(
4743                    notify_buffer_trampoline::<Self, F> as *const (),
4744                )),
4745                Box_::into_raw(f),
4746            )
4747        }
4748    }
4749
4750    #[doc(alias = "caps-lock-warning")]
4751    fn connect_caps_lock_warning_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4752        unsafe extern "C" fn notify_caps_lock_warning_trampoline<
4753            P: IsA<Entry>,
4754            F: Fn(&P) + 'static,
4755        >(
4756            this: *mut ffi::GtkEntry,
4757            _param_spec: glib::ffi::gpointer,
4758            f: glib::ffi::gpointer,
4759        ) {
4760            let f: &F = &*(f as *const F);
4761            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4762        }
4763        unsafe {
4764            let f: Box_<F> = Box_::new(f);
4765            connect_raw(
4766                self.as_ptr() as *mut _,
4767                b"notify::caps-lock-warning\0".as_ptr() as *const _,
4768                Some(transmute::<_, unsafe extern "C" fn()>(
4769                    notify_caps_lock_warning_trampoline::<Self, F> as *const (),
4770                )),
4771                Box_::into_raw(f),
4772            )
4773        }
4774    }
4775
4776    #[doc(alias = "completion")]
4777    fn connect_completion_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4778        unsafe extern "C" fn notify_completion_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4779            this: *mut ffi::GtkEntry,
4780            _param_spec: glib::ffi::gpointer,
4781            f: glib::ffi::gpointer,
4782        ) {
4783            let f: &F = &*(f as *const F);
4784            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4785        }
4786        unsafe {
4787            let f: Box_<F> = Box_::new(f);
4788            connect_raw(
4789                self.as_ptr() as *mut _,
4790                b"notify::completion\0".as_ptr() as *const _,
4791                Some(transmute::<_, unsafe extern "C" fn()>(
4792                    notify_completion_trampoline::<Self, F> as *const (),
4793                )),
4794                Box_::into_raw(f),
4795            )
4796        }
4797    }
4798
4799    #[doc(alias = "cursor-position")]
4800    fn connect_cursor_position_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4801        unsafe extern "C" fn notify_cursor_position_trampoline<
4802            P: IsA<Entry>,
4803            F: Fn(&P) + 'static,
4804        >(
4805            this: *mut ffi::GtkEntry,
4806            _param_spec: glib::ffi::gpointer,
4807            f: glib::ffi::gpointer,
4808        ) {
4809            let f: &F = &*(f as *const F);
4810            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4811        }
4812        unsafe {
4813            let f: Box_<F> = Box_::new(f);
4814            connect_raw(
4815                self.as_ptr() as *mut _,
4816                b"notify::cursor-position\0".as_ptr() as *const _,
4817                Some(transmute::<_, unsafe extern "C" fn()>(
4818                    notify_cursor_position_trampoline::<Self, F> as *const (),
4819                )),
4820                Box_::into_raw(f),
4821            )
4822        }
4823    }
4824
4825    #[doc(alias = "editable")]
4826    fn connect_editable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4827        unsafe extern "C" fn notify_editable_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4828            this: *mut ffi::GtkEntry,
4829            _param_spec: glib::ffi::gpointer,
4830            f: glib::ffi::gpointer,
4831        ) {
4832            let f: &F = &*(f as *const F);
4833            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4834        }
4835        unsafe {
4836            let f: Box_<F> = Box_::new(f);
4837            connect_raw(
4838                self.as_ptr() as *mut _,
4839                b"notify::editable\0".as_ptr() as *const _,
4840                Some(transmute::<_, unsafe extern "C" fn()>(
4841                    notify_editable_trampoline::<Self, F> as *const (),
4842                )),
4843                Box_::into_raw(f),
4844            )
4845        }
4846    }
4847
4848    #[doc(alias = "enable-emoji-completion")]
4849    fn connect_enable_emoji_completion_notify<F: Fn(&Self) + 'static>(
4850        &self,
4851        f: F,
4852    ) -> SignalHandlerId {
4853        unsafe extern "C" fn notify_enable_emoji_completion_trampoline<
4854            P: IsA<Entry>,
4855            F: Fn(&P) + 'static,
4856        >(
4857            this: *mut ffi::GtkEntry,
4858            _param_spec: glib::ffi::gpointer,
4859            f: glib::ffi::gpointer,
4860        ) {
4861            let f: &F = &*(f as *const F);
4862            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4863        }
4864        unsafe {
4865            let f: Box_<F> = Box_::new(f);
4866            connect_raw(
4867                self.as_ptr() as *mut _,
4868                b"notify::enable-emoji-completion\0".as_ptr() as *const _,
4869                Some(transmute::<_, unsafe extern "C" fn()>(
4870                    notify_enable_emoji_completion_trampoline::<Self, F> as *const (),
4871                )),
4872                Box_::into_raw(f),
4873            )
4874        }
4875    }
4876
4877    #[doc(alias = "has-frame")]
4878    fn connect_has_frame_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4879        unsafe extern "C" fn notify_has_frame_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4880            this: *mut ffi::GtkEntry,
4881            _param_spec: glib::ffi::gpointer,
4882            f: glib::ffi::gpointer,
4883        ) {
4884            let f: &F = &*(f as *const F);
4885            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4886        }
4887        unsafe {
4888            let f: Box_<F> = Box_::new(f);
4889            connect_raw(
4890                self.as_ptr() as *mut _,
4891                b"notify::has-frame\0".as_ptr() as *const _,
4892                Some(transmute::<_, unsafe extern "C" fn()>(
4893                    notify_has_frame_trampoline::<Self, F> as *const (),
4894                )),
4895                Box_::into_raw(f),
4896            )
4897        }
4898    }
4899
4900    #[doc(alias = "im-module")]
4901    fn connect_im_module_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4902        unsafe extern "C" fn notify_im_module_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4903            this: *mut ffi::GtkEntry,
4904            _param_spec: glib::ffi::gpointer,
4905            f: glib::ffi::gpointer,
4906        ) {
4907            let f: &F = &*(f as *const F);
4908            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4909        }
4910        unsafe {
4911            let f: Box_<F> = Box_::new(f);
4912            connect_raw(
4913                self.as_ptr() as *mut _,
4914                b"notify::im-module\0".as_ptr() as *const _,
4915                Some(transmute::<_, unsafe extern "C" fn()>(
4916                    notify_im_module_trampoline::<Self, F> as *const (),
4917                )),
4918                Box_::into_raw(f),
4919            )
4920        }
4921    }
4922
4923    #[doc(alias = "input-hints")]
4924    fn connect_input_hints_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4925        unsafe extern "C" fn notify_input_hints_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4926            this: *mut ffi::GtkEntry,
4927            _param_spec: glib::ffi::gpointer,
4928            f: glib::ffi::gpointer,
4929        ) {
4930            let f: &F = &*(f as *const F);
4931            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4932        }
4933        unsafe {
4934            let f: Box_<F> = Box_::new(f);
4935            connect_raw(
4936                self.as_ptr() as *mut _,
4937                b"notify::input-hints\0".as_ptr() as *const _,
4938                Some(transmute::<_, unsafe extern "C" fn()>(
4939                    notify_input_hints_trampoline::<Self, F> as *const (),
4940                )),
4941                Box_::into_raw(f),
4942            )
4943        }
4944    }
4945
4946    #[doc(alias = "input-purpose")]
4947    fn connect_input_purpose_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4948        unsafe extern "C" fn notify_input_purpose_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
4949            this: *mut ffi::GtkEntry,
4950            _param_spec: glib::ffi::gpointer,
4951            f: glib::ffi::gpointer,
4952        ) {
4953            let f: &F = &*(f as *const F);
4954            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4955        }
4956        unsafe {
4957            let f: Box_<F> = Box_::new(f);
4958            connect_raw(
4959                self.as_ptr() as *mut _,
4960                b"notify::input-purpose\0".as_ptr() as *const _,
4961                Some(transmute::<_, unsafe extern "C" fn()>(
4962                    notify_input_purpose_trampoline::<Self, F> as *const (),
4963                )),
4964                Box_::into_raw(f),
4965            )
4966        }
4967    }
4968
4969    #[doc(alias = "invisible-char")]
4970    fn connect_invisible_char_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4971        unsafe extern "C" fn notify_invisible_char_trampoline<
4972            P: IsA<Entry>,
4973            F: Fn(&P) + 'static,
4974        >(
4975            this: *mut ffi::GtkEntry,
4976            _param_spec: glib::ffi::gpointer,
4977            f: glib::ffi::gpointer,
4978        ) {
4979            let f: &F = &*(f as *const F);
4980            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
4981        }
4982        unsafe {
4983            let f: Box_<F> = Box_::new(f);
4984            connect_raw(
4985                self.as_ptr() as *mut _,
4986                b"notify::invisible-char\0".as_ptr() as *const _,
4987                Some(transmute::<_, unsafe extern "C" fn()>(
4988                    notify_invisible_char_trampoline::<Self, F> as *const (),
4989                )),
4990                Box_::into_raw(f),
4991            )
4992        }
4993    }
4994
4995    #[doc(alias = "invisible-char-set")]
4996    fn connect_invisible_char_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
4997        unsafe extern "C" fn notify_invisible_char_set_trampoline<
4998            P: IsA<Entry>,
4999            F: Fn(&P) + 'static,
5000        >(
5001            this: *mut ffi::GtkEntry,
5002            _param_spec: glib::ffi::gpointer,
5003            f: glib::ffi::gpointer,
5004        ) {
5005            let f: &F = &*(f as *const F);
5006            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5007        }
5008        unsafe {
5009            let f: Box_<F> = Box_::new(f);
5010            connect_raw(
5011                self.as_ptr() as *mut _,
5012                b"notify::invisible-char-set\0".as_ptr() as *const _,
5013                Some(transmute::<_, unsafe extern "C" fn()>(
5014                    notify_invisible_char_set_trampoline::<Self, F> as *const (),
5015                )),
5016                Box_::into_raw(f),
5017            )
5018        }
5019    }
5020
5021    #[doc(alias = "max-length")]
5022    fn connect_max_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5023        unsafe extern "C" fn notify_max_length_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
5024            this: *mut ffi::GtkEntry,
5025            _param_spec: glib::ffi::gpointer,
5026            f: glib::ffi::gpointer,
5027        ) {
5028            let f: &F = &*(f as *const F);
5029            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5030        }
5031        unsafe {
5032            let f: Box_<F> = Box_::new(f);
5033            connect_raw(
5034                self.as_ptr() as *mut _,
5035                b"notify::max-length\0".as_ptr() as *const _,
5036                Some(transmute::<_, unsafe extern "C" fn()>(
5037                    notify_max_length_trampoline::<Self, F> as *const (),
5038                )),
5039                Box_::into_raw(f),
5040            )
5041        }
5042    }
5043
5044    #[doc(alias = "max-width-chars")]
5045    fn connect_max_width_chars_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5046        unsafe extern "C" fn notify_max_width_chars_trampoline<
5047            P: IsA<Entry>,
5048            F: Fn(&P) + 'static,
5049        >(
5050            this: *mut ffi::GtkEntry,
5051            _param_spec: glib::ffi::gpointer,
5052            f: glib::ffi::gpointer,
5053        ) {
5054            let f: &F = &*(f as *const F);
5055            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5056        }
5057        unsafe {
5058            let f: Box_<F> = Box_::new(f);
5059            connect_raw(
5060                self.as_ptr() as *mut _,
5061                b"notify::max-width-chars\0".as_ptr() as *const _,
5062                Some(transmute::<_, unsafe extern "C" fn()>(
5063                    notify_max_width_chars_trampoline::<Self, F> as *const (),
5064                )),
5065                Box_::into_raw(f),
5066            )
5067        }
5068    }
5069
5070    #[doc(alias = "overwrite-mode")]
5071    fn connect_overwrite_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5072        unsafe extern "C" fn notify_overwrite_mode_trampoline<
5073            P: IsA<Entry>,
5074            F: Fn(&P) + 'static,
5075        >(
5076            this: *mut ffi::GtkEntry,
5077            _param_spec: glib::ffi::gpointer,
5078            f: glib::ffi::gpointer,
5079        ) {
5080            let f: &F = &*(f as *const F);
5081            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5082        }
5083        unsafe {
5084            let f: Box_<F> = Box_::new(f);
5085            connect_raw(
5086                self.as_ptr() as *mut _,
5087                b"notify::overwrite-mode\0".as_ptr() as *const _,
5088                Some(transmute::<_, unsafe extern "C" fn()>(
5089                    notify_overwrite_mode_trampoline::<Self, F> as *const (),
5090                )),
5091                Box_::into_raw(f),
5092            )
5093        }
5094    }
5095
5096    #[doc(alias = "placeholder-text")]
5097    fn connect_placeholder_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5098        unsafe extern "C" fn notify_placeholder_text_trampoline<
5099            P: IsA<Entry>,
5100            F: Fn(&P) + 'static,
5101        >(
5102            this: *mut ffi::GtkEntry,
5103            _param_spec: glib::ffi::gpointer,
5104            f: glib::ffi::gpointer,
5105        ) {
5106            let f: &F = &*(f as *const F);
5107            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5108        }
5109        unsafe {
5110            let f: Box_<F> = Box_::new(f);
5111            connect_raw(
5112                self.as_ptr() as *mut _,
5113                b"notify::placeholder-text\0".as_ptr() as *const _,
5114                Some(transmute::<_, unsafe extern "C" fn()>(
5115                    notify_placeholder_text_trampoline::<Self, F> as *const (),
5116                )),
5117                Box_::into_raw(f),
5118            )
5119        }
5120    }
5121
5122    #[doc(alias = "populate-all")]
5123    fn connect_populate_all_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5124        unsafe extern "C" fn notify_populate_all_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
5125            this: *mut ffi::GtkEntry,
5126            _param_spec: glib::ffi::gpointer,
5127            f: glib::ffi::gpointer,
5128        ) {
5129            let f: &F = &*(f as *const F);
5130            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5131        }
5132        unsafe {
5133            let f: Box_<F> = Box_::new(f);
5134            connect_raw(
5135                self.as_ptr() as *mut _,
5136                b"notify::populate-all\0".as_ptr() as *const _,
5137                Some(transmute::<_, unsafe extern "C" fn()>(
5138                    notify_populate_all_trampoline::<Self, F> as *const (),
5139                )),
5140                Box_::into_raw(f),
5141            )
5142        }
5143    }
5144
5145    #[doc(alias = "primary-icon-activatable")]
5146    fn connect_primary_icon_activatable_notify<F: Fn(&Self) + 'static>(
5147        &self,
5148        f: F,
5149    ) -> SignalHandlerId {
5150        unsafe extern "C" fn notify_primary_icon_activatable_trampoline<
5151            P: IsA<Entry>,
5152            F: Fn(&P) + 'static,
5153        >(
5154            this: *mut ffi::GtkEntry,
5155            _param_spec: glib::ffi::gpointer,
5156            f: glib::ffi::gpointer,
5157        ) {
5158            let f: &F = &*(f as *const F);
5159            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5160        }
5161        unsafe {
5162            let f: Box_<F> = Box_::new(f);
5163            connect_raw(
5164                self.as_ptr() as *mut _,
5165                b"notify::primary-icon-activatable\0".as_ptr() as *const _,
5166                Some(transmute::<_, unsafe extern "C" fn()>(
5167                    notify_primary_icon_activatable_trampoline::<Self, F> as *const (),
5168                )),
5169                Box_::into_raw(f),
5170            )
5171        }
5172    }
5173
5174    #[doc(alias = "primary-icon-gicon")]
5175    fn connect_primary_icon_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5176        unsafe extern "C" fn notify_primary_icon_gicon_trampoline<
5177            P: IsA<Entry>,
5178            F: Fn(&P) + 'static,
5179        >(
5180            this: *mut ffi::GtkEntry,
5181            _param_spec: glib::ffi::gpointer,
5182            f: glib::ffi::gpointer,
5183        ) {
5184            let f: &F = &*(f as *const F);
5185            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5186        }
5187        unsafe {
5188            let f: Box_<F> = Box_::new(f);
5189            connect_raw(
5190                self.as_ptr() as *mut _,
5191                b"notify::primary-icon-gicon\0".as_ptr() as *const _,
5192                Some(transmute::<_, unsafe extern "C" fn()>(
5193                    notify_primary_icon_gicon_trampoline::<Self, F> as *const (),
5194                )),
5195                Box_::into_raw(f),
5196            )
5197        }
5198    }
5199
5200    #[doc(alias = "primary-icon-name")]
5201    fn connect_primary_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5202        unsafe extern "C" fn notify_primary_icon_name_trampoline<
5203            P: IsA<Entry>,
5204            F: Fn(&P) + 'static,
5205        >(
5206            this: *mut ffi::GtkEntry,
5207            _param_spec: glib::ffi::gpointer,
5208            f: glib::ffi::gpointer,
5209        ) {
5210            let f: &F = &*(f as *const F);
5211            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5212        }
5213        unsafe {
5214            let f: Box_<F> = Box_::new(f);
5215            connect_raw(
5216                self.as_ptr() as *mut _,
5217                b"notify::primary-icon-name\0".as_ptr() as *const _,
5218                Some(transmute::<_, unsafe extern "C" fn()>(
5219                    notify_primary_icon_name_trampoline::<Self, F> as *const (),
5220                )),
5221                Box_::into_raw(f),
5222            )
5223        }
5224    }
5225
5226    #[doc(alias = "primary-icon-pixbuf")]
5227    fn connect_primary_icon_pixbuf_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5228        unsafe extern "C" fn notify_primary_icon_pixbuf_trampoline<
5229            P: IsA<Entry>,
5230            F: Fn(&P) + 'static,
5231        >(
5232            this: *mut ffi::GtkEntry,
5233            _param_spec: glib::ffi::gpointer,
5234            f: glib::ffi::gpointer,
5235        ) {
5236            let f: &F = &*(f as *const F);
5237            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5238        }
5239        unsafe {
5240            let f: Box_<F> = Box_::new(f);
5241            connect_raw(
5242                self.as_ptr() as *mut _,
5243                b"notify::primary-icon-pixbuf\0".as_ptr() as *const _,
5244                Some(transmute::<_, unsafe extern "C" fn()>(
5245                    notify_primary_icon_pixbuf_trampoline::<Self, F> as *const (),
5246                )),
5247                Box_::into_raw(f),
5248            )
5249        }
5250    }
5251
5252    #[doc(alias = "primary-icon-sensitive")]
5253    fn connect_primary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
5254        &self,
5255        f: F,
5256    ) -> SignalHandlerId {
5257        unsafe extern "C" fn notify_primary_icon_sensitive_trampoline<
5258            P: IsA<Entry>,
5259            F: Fn(&P) + 'static,
5260        >(
5261            this: *mut ffi::GtkEntry,
5262            _param_spec: glib::ffi::gpointer,
5263            f: glib::ffi::gpointer,
5264        ) {
5265            let f: &F = &*(f as *const F);
5266            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5267        }
5268        unsafe {
5269            let f: Box_<F> = Box_::new(f);
5270            connect_raw(
5271                self.as_ptr() as *mut _,
5272                b"notify::primary-icon-sensitive\0".as_ptr() as *const _,
5273                Some(transmute::<_, unsafe extern "C" fn()>(
5274                    notify_primary_icon_sensitive_trampoline::<Self, F> as *const (),
5275                )),
5276                Box_::into_raw(f),
5277            )
5278        }
5279    }
5280
5281    #[doc(alias = "primary-icon-storage-type")]
5282    fn connect_primary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
5283        &self,
5284        f: F,
5285    ) -> SignalHandlerId {
5286        unsafe extern "C" fn notify_primary_icon_storage_type_trampoline<
5287            P: IsA<Entry>,
5288            F: Fn(&P) + 'static,
5289        >(
5290            this: *mut ffi::GtkEntry,
5291            _param_spec: glib::ffi::gpointer,
5292            f: glib::ffi::gpointer,
5293        ) {
5294            let f: &F = &*(f as *const F);
5295            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5296        }
5297        unsafe {
5298            let f: Box_<F> = Box_::new(f);
5299            connect_raw(
5300                self.as_ptr() as *mut _,
5301                b"notify::primary-icon-storage-type\0".as_ptr() as *const _,
5302                Some(transmute::<_, unsafe extern "C" fn()>(
5303                    notify_primary_icon_storage_type_trampoline::<Self, F> as *const (),
5304                )),
5305                Box_::into_raw(f),
5306            )
5307        }
5308    }
5309
5310    #[doc(alias = "primary-icon-tooltip-markup")]
5311    fn connect_primary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
5312        &self,
5313        f: F,
5314    ) -> SignalHandlerId {
5315        unsafe extern "C" fn notify_primary_icon_tooltip_markup_trampoline<
5316            P: IsA<Entry>,
5317            F: Fn(&P) + 'static,
5318        >(
5319            this: *mut ffi::GtkEntry,
5320            _param_spec: glib::ffi::gpointer,
5321            f: glib::ffi::gpointer,
5322        ) {
5323            let f: &F = &*(f as *const F);
5324            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5325        }
5326        unsafe {
5327            let f: Box_<F> = Box_::new(f);
5328            connect_raw(
5329                self.as_ptr() as *mut _,
5330                b"notify::primary-icon-tooltip-markup\0".as_ptr() as *const _,
5331                Some(transmute::<_, unsafe extern "C" fn()>(
5332                    notify_primary_icon_tooltip_markup_trampoline::<Self, F> as *const (),
5333                )),
5334                Box_::into_raw(f),
5335            )
5336        }
5337    }
5338
5339    #[doc(alias = "primary-icon-tooltip-text")]
5340    fn connect_primary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
5341        &self,
5342        f: F,
5343    ) -> SignalHandlerId {
5344        unsafe extern "C" fn notify_primary_icon_tooltip_text_trampoline<
5345            P: IsA<Entry>,
5346            F: Fn(&P) + 'static,
5347        >(
5348            this: *mut ffi::GtkEntry,
5349            _param_spec: glib::ffi::gpointer,
5350            f: glib::ffi::gpointer,
5351        ) {
5352            let f: &F = &*(f as *const F);
5353            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5354        }
5355        unsafe {
5356            let f: Box_<F> = Box_::new(f);
5357            connect_raw(
5358                self.as_ptr() as *mut _,
5359                b"notify::primary-icon-tooltip-text\0".as_ptr() as *const _,
5360                Some(transmute::<_, unsafe extern "C" fn()>(
5361                    notify_primary_icon_tooltip_text_trampoline::<Self, F> as *const (),
5362                )),
5363                Box_::into_raw(f),
5364            )
5365        }
5366    }
5367
5368    #[doc(alias = "progress-fraction")]
5369    fn connect_progress_fraction_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5370        unsafe extern "C" fn notify_progress_fraction_trampoline<
5371            P: IsA<Entry>,
5372            F: Fn(&P) + 'static,
5373        >(
5374            this: *mut ffi::GtkEntry,
5375            _param_spec: glib::ffi::gpointer,
5376            f: glib::ffi::gpointer,
5377        ) {
5378            let f: &F = &*(f as *const F);
5379            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5380        }
5381        unsafe {
5382            let f: Box_<F> = Box_::new(f);
5383            connect_raw(
5384                self.as_ptr() as *mut _,
5385                b"notify::progress-fraction\0".as_ptr() as *const _,
5386                Some(transmute::<_, unsafe extern "C" fn()>(
5387                    notify_progress_fraction_trampoline::<Self, F> as *const (),
5388                )),
5389                Box_::into_raw(f),
5390            )
5391        }
5392    }
5393
5394    #[doc(alias = "progress-pulse-step")]
5395    fn connect_progress_pulse_step_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5396        unsafe extern "C" fn notify_progress_pulse_step_trampoline<
5397            P: IsA<Entry>,
5398            F: Fn(&P) + 'static,
5399        >(
5400            this: *mut ffi::GtkEntry,
5401            _param_spec: glib::ffi::gpointer,
5402            f: glib::ffi::gpointer,
5403        ) {
5404            let f: &F = &*(f as *const F);
5405            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5406        }
5407        unsafe {
5408            let f: Box_<F> = Box_::new(f);
5409            connect_raw(
5410                self.as_ptr() as *mut _,
5411                b"notify::progress-pulse-step\0".as_ptr() as *const _,
5412                Some(transmute::<_, unsafe extern "C" fn()>(
5413                    notify_progress_pulse_step_trampoline::<Self, F> as *const (),
5414                )),
5415                Box_::into_raw(f),
5416            )
5417        }
5418    }
5419
5420    #[doc(alias = "scroll-offset")]
5421    fn connect_scroll_offset_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5422        unsafe extern "C" fn notify_scroll_offset_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
5423            this: *mut ffi::GtkEntry,
5424            _param_spec: glib::ffi::gpointer,
5425            f: glib::ffi::gpointer,
5426        ) {
5427            let f: &F = &*(f as *const F);
5428            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5429        }
5430        unsafe {
5431            let f: Box_<F> = Box_::new(f);
5432            connect_raw(
5433                self.as_ptr() as *mut _,
5434                b"notify::scroll-offset\0".as_ptr() as *const _,
5435                Some(transmute::<_, unsafe extern "C" fn()>(
5436                    notify_scroll_offset_trampoline::<Self, F> as *const (),
5437                )),
5438                Box_::into_raw(f),
5439            )
5440        }
5441    }
5442
5443    #[doc(alias = "secondary-icon-activatable")]
5444    fn connect_secondary_icon_activatable_notify<F: Fn(&Self) + 'static>(
5445        &self,
5446        f: F,
5447    ) -> SignalHandlerId {
5448        unsafe extern "C" fn notify_secondary_icon_activatable_trampoline<
5449            P: IsA<Entry>,
5450            F: Fn(&P) + 'static,
5451        >(
5452            this: *mut ffi::GtkEntry,
5453            _param_spec: glib::ffi::gpointer,
5454            f: glib::ffi::gpointer,
5455        ) {
5456            let f: &F = &*(f as *const F);
5457            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5458        }
5459        unsafe {
5460            let f: Box_<F> = Box_::new(f);
5461            connect_raw(
5462                self.as_ptr() as *mut _,
5463                b"notify::secondary-icon-activatable\0".as_ptr() as *const _,
5464                Some(transmute::<_, unsafe extern "C" fn()>(
5465                    notify_secondary_icon_activatable_trampoline::<Self, F> as *const (),
5466                )),
5467                Box_::into_raw(f),
5468            )
5469        }
5470    }
5471
5472    #[doc(alias = "secondary-icon-gicon")]
5473    fn connect_secondary_icon_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5474        unsafe extern "C" fn notify_secondary_icon_gicon_trampoline<
5475            P: IsA<Entry>,
5476            F: Fn(&P) + 'static,
5477        >(
5478            this: *mut ffi::GtkEntry,
5479            _param_spec: glib::ffi::gpointer,
5480            f: glib::ffi::gpointer,
5481        ) {
5482            let f: &F = &*(f as *const F);
5483            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5484        }
5485        unsafe {
5486            let f: Box_<F> = Box_::new(f);
5487            connect_raw(
5488                self.as_ptr() as *mut _,
5489                b"notify::secondary-icon-gicon\0".as_ptr() as *const _,
5490                Some(transmute::<_, unsafe extern "C" fn()>(
5491                    notify_secondary_icon_gicon_trampoline::<Self, F> as *const (),
5492                )),
5493                Box_::into_raw(f),
5494            )
5495        }
5496    }
5497
5498    #[doc(alias = "secondary-icon-name")]
5499    fn connect_secondary_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5500        unsafe extern "C" fn notify_secondary_icon_name_trampoline<
5501            P: IsA<Entry>,
5502            F: Fn(&P) + 'static,
5503        >(
5504            this: *mut ffi::GtkEntry,
5505            _param_spec: glib::ffi::gpointer,
5506            f: glib::ffi::gpointer,
5507        ) {
5508            let f: &F = &*(f as *const F);
5509            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5510        }
5511        unsafe {
5512            let f: Box_<F> = Box_::new(f);
5513            connect_raw(
5514                self.as_ptr() as *mut _,
5515                b"notify::secondary-icon-name\0".as_ptr() as *const _,
5516                Some(transmute::<_, unsafe extern "C" fn()>(
5517                    notify_secondary_icon_name_trampoline::<Self, F> as *const (),
5518                )),
5519                Box_::into_raw(f),
5520            )
5521        }
5522    }
5523
5524    #[doc(alias = "secondary-icon-pixbuf")]
5525    fn connect_secondary_icon_pixbuf_notify<F: Fn(&Self) + 'static>(
5526        &self,
5527        f: F,
5528    ) -> SignalHandlerId {
5529        unsafe extern "C" fn notify_secondary_icon_pixbuf_trampoline<
5530            P: IsA<Entry>,
5531            F: Fn(&P) + 'static,
5532        >(
5533            this: *mut ffi::GtkEntry,
5534            _param_spec: glib::ffi::gpointer,
5535            f: glib::ffi::gpointer,
5536        ) {
5537            let f: &F = &*(f as *const F);
5538            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5539        }
5540        unsafe {
5541            let f: Box_<F> = Box_::new(f);
5542            connect_raw(
5543                self.as_ptr() as *mut _,
5544                b"notify::secondary-icon-pixbuf\0".as_ptr() as *const _,
5545                Some(transmute::<_, unsafe extern "C" fn()>(
5546                    notify_secondary_icon_pixbuf_trampoline::<Self, F> as *const (),
5547                )),
5548                Box_::into_raw(f),
5549            )
5550        }
5551    }
5552
5553    #[doc(alias = "secondary-icon-sensitive")]
5554    fn connect_secondary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
5555        &self,
5556        f: F,
5557    ) -> SignalHandlerId {
5558        unsafe extern "C" fn notify_secondary_icon_sensitive_trampoline<
5559            P: IsA<Entry>,
5560            F: Fn(&P) + 'static,
5561        >(
5562            this: *mut ffi::GtkEntry,
5563            _param_spec: glib::ffi::gpointer,
5564            f: glib::ffi::gpointer,
5565        ) {
5566            let f: &F = &*(f as *const F);
5567            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5568        }
5569        unsafe {
5570            let f: Box_<F> = Box_::new(f);
5571            connect_raw(
5572                self.as_ptr() as *mut _,
5573                b"notify::secondary-icon-sensitive\0".as_ptr() as *const _,
5574                Some(transmute::<_, unsafe extern "C" fn()>(
5575                    notify_secondary_icon_sensitive_trampoline::<Self, F> as *const (),
5576                )),
5577                Box_::into_raw(f),
5578            )
5579        }
5580    }
5581
5582    #[doc(alias = "secondary-icon-storage-type")]
5583    fn connect_secondary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
5584        &self,
5585        f: F,
5586    ) -> SignalHandlerId {
5587        unsafe extern "C" fn notify_secondary_icon_storage_type_trampoline<
5588            P: IsA<Entry>,
5589            F: Fn(&P) + 'static,
5590        >(
5591            this: *mut ffi::GtkEntry,
5592            _param_spec: glib::ffi::gpointer,
5593            f: glib::ffi::gpointer,
5594        ) {
5595            let f: &F = &*(f as *const F);
5596            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5597        }
5598        unsafe {
5599            let f: Box_<F> = Box_::new(f);
5600            connect_raw(
5601                self.as_ptr() as *mut _,
5602                b"notify::secondary-icon-storage-type\0".as_ptr() as *const _,
5603                Some(transmute::<_, unsafe extern "C" fn()>(
5604                    notify_secondary_icon_storage_type_trampoline::<Self, F> as *const (),
5605                )),
5606                Box_::into_raw(f),
5607            )
5608        }
5609    }
5610
5611    #[doc(alias = "secondary-icon-tooltip-markup")]
5612    fn connect_secondary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
5613        &self,
5614        f: F,
5615    ) -> SignalHandlerId {
5616        unsafe extern "C" fn notify_secondary_icon_tooltip_markup_trampoline<
5617            P: IsA<Entry>,
5618            F: Fn(&P) + 'static,
5619        >(
5620            this: *mut ffi::GtkEntry,
5621            _param_spec: glib::ffi::gpointer,
5622            f: glib::ffi::gpointer,
5623        ) {
5624            let f: &F = &*(f as *const F);
5625            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5626        }
5627        unsafe {
5628            let f: Box_<F> = Box_::new(f);
5629            connect_raw(
5630                self.as_ptr() as *mut _,
5631                b"notify::secondary-icon-tooltip-markup\0".as_ptr() as *const _,
5632                Some(transmute::<_, unsafe extern "C" fn()>(
5633                    notify_secondary_icon_tooltip_markup_trampoline::<Self, F> as *const (),
5634                )),
5635                Box_::into_raw(f),
5636            )
5637        }
5638    }
5639
5640    #[doc(alias = "secondary-icon-tooltip-text")]
5641    fn connect_secondary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
5642        &self,
5643        f: F,
5644    ) -> SignalHandlerId {
5645        unsafe extern "C" fn notify_secondary_icon_tooltip_text_trampoline<
5646            P: IsA<Entry>,
5647            F: Fn(&P) + 'static,
5648        >(
5649            this: *mut ffi::GtkEntry,
5650            _param_spec: glib::ffi::gpointer,
5651            f: glib::ffi::gpointer,
5652        ) {
5653            let f: &F = &*(f as *const F);
5654            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5655        }
5656        unsafe {
5657            let f: Box_<F> = Box_::new(f);
5658            connect_raw(
5659                self.as_ptr() as *mut _,
5660                b"notify::secondary-icon-tooltip-text\0".as_ptr() as *const _,
5661                Some(transmute::<_, unsafe extern "C" fn()>(
5662                    notify_secondary_icon_tooltip_text_trampoline::<Self, F> as *const (),
5663                )),
5664                Box_::into_raw(f),
5665            )
5666        }
5667    }
5668
5669    #[doc(alias = "selection-bound")]
5670    fn connect_selection_bound_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5671        unsafe extern "C" fn notify_selection_bound_trampoline<
5672            P: IsA<Entry>,
5673            F: Fn(&P) + 'static,
5674        >(
5675            this: *mut ffi::GtkEntry,
5676            _param_spec: glib::ffi::gpointer,
5677            f: glib::ffi::gpointer,
5678        ) {
5679            let f: &F = &*(f as *const F);
5680            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5681        }
5682        unsafe {
5683            let f: Box_<F> = Box_::new(f);
5684            connect_raw(
5685                self.as_ptr() as *mut _,
5686                b"notify::selection-bound\0".as_ptr() as *const _,
5687                Some(transmute::<_, unsafe extern "C" fn()>(
5688                    notify_selection_bound_trampoline::<Self, F> as *const (),
5689                )),
5690                Box_::into_raw(f),
5691            )
5692        }
5693    }
5694
5695    #[doc(alias = "show-emoji-icon")]
5696    fn connect_show_emoji_icon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5697        unsafe extern "C" fn notify_show_emoji_icon_trampoline<
5698            P: IsA<Entry>,
5699            F: Fn(&P) + 'static,
5700        >(
5701            this: *mut ffi::GtkEntry,
5702            _param_spec: glib::ffi::gpointer,
5703            f: glib::ffi::gpointer,
5704        ) {
5705            let f: &F = &*(f as *const F);
5706            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5707        }
5708        unsafe {
5709            let f: Box_<F> = Box_::new(f);
5710            connect_raw(
5711                self.as_ptr() as *mut _,
5712                b"notify::show-emoji-icon\0".as_ptr() as *const _,
5713                Some(transmute::<_, unsafe extern "C" fn()>(
5714                    notify_show_emoji_icon_trampoline::<Self, F> as *const (),
5715                )),
5716                Box_::into_raw(f),
5717            )
5718        }
5719    }
5720
5721    #[doc(alias = "tabs")]
5722    fn connect_tabs_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5723        unsafe extern "C" fn notify_tabs_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
5724            this: *mut ffi::GtkEntry,
5725            _param_spec: glib::ffi::gpointer,
5726            f: glib::ffi::gpointer,
5727        ) {
5728            let f: &F = &*(f as *const F);
5729            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5730        }
5731        unsafe {
5732            let f: Box_<F> = Box_::new(f);
5733            connect_raw(
5734                self.as_ptr() as *mut _,
5735                b"notify::tabs\0".as_ptr() as *const _,
5736                Some(transmute::<_, unsafe extern "C" fn()>(
5737                    notify_tabs_trampoline::<Self, F> as *const (),
5738                )),
5739                Box_::into_raw(f),
5740            )
5741        }
5742    }
5743
5744    #[doc(alias = "text")]
5745    fn connect_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5746        unsafe extern "C" fn notify_text_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
5747            this: *mut ffi::GtkEntry,
5748            _param_spec: glib::ffi::gpointer,
5749            f: glib::ffi::gpointer,
5750        ) {
5751            let f: &F = &*(f as *const F);
5752            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5753        }
5754        unsafe {
5755            let f: Box_<F> = Box_::new(f);
5756            connect_raw(
5757                self.as_ptr() as *mut _,
5758                b"notify::text\0".as_ptr() as *const _,
5759                Some(transmute::<_, unsafe extern "C" fn()>(
5760                    notify_text_trampoline::<Self, F> as *const (),
5761                )),
5762                Box_::into_raw(f),
5763            )
5764        }
5765    }
5766
5767    #[doc(alias = "text-length")]
5768    fn connect_text_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5769        unsafe extern "C" fn notify_text_length_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
5770            this: *mut ffi::GtkEntry,
5771            _param_spec: glib::ffi::gpointer,
5772            f: glib::ffi::gpointer,
5773        ) {
5774            let f: &F = &*(f as *const F);
5775            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5776        }
5777        unsafe {
5778            let f: Box_<F> = Box_::new(f);
5779            connect_raw(
5780                self.as_ptr() as *mut _,
5781                b"notify::text-length\0".as_ptr() as *const _,
5782                Some(transmute::<_, unsafe extern "C" fn()>(
5783                    notify_text_length_trampoline::<Self, F> as *const (),
5784                )),
5785                Box_::into_raw(f),
5786            )
5787        }
5788    }
5789
5790    #[doc(alias = "truncate-multiline")]
5791    fn connect_truncate_multiline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5792        unsafe extern "C" fn notify_truncate_multiline_trampoline<
5793            P: IsA<Entry>,
5794            F: Fn(&P) + 'static,
5795        >(
5796            this: *mut ffi::GtkEntry,
5797            _param_spec: glib::ffi::gpointer,
5798            f: glib::ffi::gpointer,
5799        ) {
5800            let f: &F = &*(f as *const F);
5801            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5802        }
5803        unsafe {
5804            let f: Box_<F> = Box_::new(f);
5805            connect_raw(
5806                self.as_ptr() as *mut _,
5807                b"notify::truncate-multiline\0".as_ptr() as *const _,
5808                Some(transmute::<_, unsafe extern "C" fn()>(
5809                    notify_truncate_multiline_trampoline::<Self, F> as *const (),
5810                )),
5811                Box_::into_raw(f),
5812            )
5813        }
5814    }
5815
5816    #[doc(alias = "visibility")]
5817    fn connect_visibility_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5818        unsafe extern "C" fn notify_visibility_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
5819            this: *mut ffi::GtkEntry,
5820            _param_spec: glib::ffi::gpointer,
5821            f: glib::ffi::gpointer,
5822        ) {
5823            let f: &F = &*(f as *const F);
5824            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5825        }
5826        unsafe {
5827            let f: Box_<F> = Box_::new(f);
5828            connect_raw(
5829                self.as_ptr() as *mut _,
5830                b"notify::visibility\0".as_ptr() as *const _,
5831                Some(transmute::<_, unsafe extern "C" fn()>(
5832                    notify_visibility_trampoline::<Self, F> as *const (),
5833                )),
5834                Box_::into_raw(f),
5835            )
5836        }
5837    }
5838
5839    #[doc(alias = "width-chars")]
5840    fn connect_width_chars_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5841        unsafe extern "C" fn notify_width_chars_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
5842            this: *mut ffi::GtkEntry,
5843            _param_spec: glib::ffi::gpointer,
5844            f: glib::ffi::gpointer,
5845        ) {
5846            let f: &F = &*(f as *const F);
5847            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5848        }
5849        unsafe {
5850            let f: Box_<F> = Box_::new(f);
5851            connect_raw(
5852                self.as_ptr() as *mut _,
5853                b"notify::width-chars\0".as_ptr() as *const _,
5854                Some(transmute::<_, unsafe extern "C" fn()>(
5855                    notify_width_chars_trampoline::<Self, F> as *const (),
5856                )),
5857                Box_::into_raw(f),
5858            )
5859        }
5860    }
5861
5862    #[doc(alias = "xalign")]
5863    fn connect_xalign_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
5864        unsafe extern "C" fn notify_xalign_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
5865            this: *mut ffi::GtkEntry,
5866            _param_spec: glib::ffi::gpointer,
5867            f: glib::ffi::gpointer,
5868        ) {
5869            let f: &F = &*(f as *const F);
5870            f(Entry::from_glib_borrow(this).unsafe_cast_ref())
5871        }
5872        unsafe {
5873            let f: Box_<F> = Box_::new(f);
5874            connect_raw(
5875                self.as_ptr() as *mut _,
5876                b"notify::xalign\0".as_ptr() as *const _,
5877                Some(transmute::<_, unsafe extern "C" fn()>(
5878                    notify_xalign_trampoline::<Self, F> as *const (),
5879                )),
5880                Box_::into_raw(f),
5881            )
5882        }
5883    }
5884}
5885
5886impl<O: IsA<Entry>> EntryExt for O {}
5887
5888impl fmt::Display for Entry {
5889    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5890        f.write_str("Entry")
5891    }
5892}