libadwaita/auto/
entry_row.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from
3// from gir-files (https://github.com/gtk-rs/gir-files.git)
4// DO NOT EDIT
5
6use crate::{ffi, PreferencesRow};
7use glib::{
8    object::ObjectType as _,
9    prelude::*,
10    signal::{connect_raw, SignalHandlerId},
11    translate::*,
12};
13use std::boxed::Box as Box_;
14
15glib::wrapper! {
16    #[doc(alias = "AdwEntryRow")]
17    pub struct EntryRow(Object<ffi::AdwEntryRow, ffi::AdwEntryRowClass>) @extends PreferencesRow, gtk::ListBoxRow, gtk::Widget, @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Actionable, gtk::Editable;
18
19    match fn {
20        type_ => || ffi::adw_entry_row_get_type(),
21    }
22}
23
24impl EntryRow {
25    pub const NONE: Option<&'static EntryRow> = None;
26
27    #[doc(alias = "adw_entry_row_new")]
28    pub fn new() -> EntryRow {
29        assert_initialized_main_thread!();
30        unsafe { gtk::Widget::from_glib_none(ffi::adw_entry_row_new()).unsafe_cast() }
31    }
32
33    // rustdoc-stripper-ignore-next
34    /// Creates a new builder-pattern struct instance to construct [`EntryRow`] objects.
35    ///
36    /// This method returns an instance of [`EntryRowBuilder`](crate::builders::EntryRowBuilder) which can be used to create [`EntryRow`] objects.
37    pub fn builder() -> EntryRowBuilder {
38        EntryRowBuilder::new()
39    }
40}
41
42#[cfg(feature = "v1_2")]
43#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
44impl Default for EntryRow {
45    fn default() -> Self {
46        Self::new()
47    }
48}
49
50// rustdoc-stripper-ignore-next
51/// A [builder-pattern] type to construct [`EntryRow`] objects.
52///
53/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
54#[must_use = "The builder must be built to be used"]
55pub struct EntryRowBuilder {
56    builder: glib::object::ObjectBuilder<'static, EntryRow>,
57}
58
59impl EntryRowBuilder {
60    fn new() -> Self {
61        Self {
62            builder: glib::object::Object::builder(),
63        }
64    }
65
66    #[cfg(feature = "v1_2")]
67    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
68    pub fn activates_default(self, activates_default: bool) -> Self {
69        Self {
70            builder: self
71                .builder
72                .property("activates-default", activates_default),
73        }
74    }
75
76    #[cfg(feature = "v1_2")]
77    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
78    pub fn attributes(self, attributes: &pango::AttrList) -> Self {
79        Self {
80            builder: self.builder.property("attributes", attributes.clone()),
81        }
82    }
83
84    #[cfg(feature = "v1_2")]
85    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
86    pub fn enable_emoji_completion(self, enable_emoji_completion: bool) -> Self {
87        Self {
88            builder: self
89                .builder
90                .property("enable-emoji-completion", enable_emoji_completion),
91        }
92    }
93
94    #[cfg(feature = "v1_2")]
95    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
96    pub fn input_hints(self, input_hints: gtk::InputHints) -> Self {
97        Self {
98            builder: self.builder.property("input-hints", input_hints),
99        }
100    }
101
102    #[cfg(feature = "v1_2")]
103    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
104    pub fn input_purpose(self, input_purpose: gtk::InputPurpose) -> Self {
105        Self {
106            builder: self.builder.property("input-purpose", input_purpose),
107        }
108    }
109
110    #[cfg(feature = "v1_6")]
111    #[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
112    pub fn max_length(self, max_length: i32) -> Self {
113        Self {
114            builder: self.builder.property("max-length", max_length),
115        }
116    }
117
118    #[cfg(feature = "v1_2")]
119    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
120    pub fn show_apply_button(self, show_apply_button: bool) -> Self {
121        Self {
122            builder: self
123                .builder
124                .property("show-apply-button", show_apply_button),
125        }
126    }
127
128    pub fn title(self, title: impl Into<glib::GString>) -> Self {
129        Self {
130            builder: self.builder.property("title", title.into()),
131        }
132    }
133
134    #[cfg(feature = "v1_1")]
135    #[cfg_attr(docsrs, doc(cfg(feature = "v1_1")))]
136    pub fn title_selectable(self, title_selectable: bool) -> Self {
137        Self {
138            builder: self.builder.property("title-selectable", title_selectable),
139        }
140    }
141
142    #[cfg(feature = "v1_2")]
143    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
144    pub fn use_markup(self, use_markup: bool) -> Self {
145        Self {
146            builder: self.builder.property("use-markup", use_markup),
147        }
148    }
149
150    pub fn use_underline(self, use_underline: bool) -> Self {
151        Self {
152            builder: self.builder.property("use-underline", use_underline),
153        }
154    }
155
156    pub fn activatable(self, activatable: bool) -> Self {
157        Self {
158            builder: self.builder.property("activatable", activatable),
159        }
160    }
161
162    pub fn child(self, child: &impl IsA<gtk::Widget>) -> Self {
163        Self {
164            builder: self.builder.property("child", child.clone().upcast()),
165        }
166    }
167
168    pub fn selectable(self, selectable: bool) -> Self {
169        Self {
170            builder: self.builder.property("selectable", selectable),
171        }
172    }
173
174    pub fn can_focus(self, can_focus: bool) -> Self {
175        Self {
176            builder: self.builder.property("can-focus", can_focus),
177        }
178    }
179
180    pub fn can_target(self, can_target: bool) -> Self {
181        Self {
182            builder: self.builder.property("can-target", can_target),
183        }
184    }
185
186    pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
187        Self {
188            builder: self.builder.property("css-classes", css_classes.into()),
189        }
190    }
191
192    pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
193        Self {
194            builder: self.builder.property("css-name", css_name.into()),
195        }
196    }
197
198    pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
199        Self {
200            builder: self.builder.property("cursor", cursor.clone()),
201        }
202    }
203
204    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
205        Self {
206            builder: self.builder.property("focus-on-click", focus_on_click),
207        }
208    }
209
210    pub fn focusable(self, focusable: bool) -> Self {
211        Self {
212            builder: self.builder.property("focusable", focusable),
213        }
214    }
215
216    pub fn halign(self, halign: gtk::Align) -> Self {
217        Self {
218            builder: self.builder.property("halign", halign),
219        }
220    }
221
222    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
223        Self {
224            builder: self.builder.property("has-tooltip", has_tooltip),
225        }
226    }
227
228    pub fn height_request(self, height_request: i32) -> Self {
229        Self {
230            builder: self.builder.property("height-request", height_request),
231        }
232    }
233
234    pub fn hexpand(self, hexpand: bool) -> Self {
235        Self {
236            builder: self.builder.property("hexpand", hexpand),
237        }
238    }
239
240    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
241        Self {
242            builder: self.builder.property("hexpand-set", hexpand_set),
243        }
244    }
245
246    pub fn layout_manager(self, layout_manager: &impl IsA<gtk::LayoutManager>) -> Self {
247        Self {
248            builder: self
249                .builder
250                .property("layout-manager", layout_manager.clone().upcast()),
251        }
252    }
253
254    #[cfg(feature = "gtk_v4_18")]
255    #[cfg_attr(docsrs, doc(cfg(feature = "gtk_v4_18")))]
256    pub fn limit_events(self, limit_events: bool) -> Self {
257        Self {
258            builder: self.builder.property("limit-events", limit_events),
259        }
260    }
261
262    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
263        Self {
264            builder: self.builder.property("margin-bottom", margin_bottom),
265        }
266    }
267
268    pub fn margin_end(self, margin_end: i32) -> Self {
269        Self {
270            builder: self.builder.property("margin-end", margin_end),
271        }
272    }
273
274    pub fn margin_start(self, margin_start: i32) -> Self {
275        Self {
276            builder: self.builder.property("margin-start", margin_start),
277        }
278    }
279
280    pub fn margin_top(self, margin_top: i32) -> Self {
281        Self {
282            builder: self.builder.property("margin-top", margin_top),
283        }
284    }
285
286    pub fn name(self, name: impl Into<glib::GString>) -> Self {
287        Self {
288            builder: self.builder.property("name", name.into()),
289        }
290    }
291
292    pub fn opacity(self, opacity: f64) -> Self {
293        Self {
294            builder: self.builder.property("opacity", opacity),
295        }
296    }
297
298    pub fn overflow(self, overflow: gtk::Overflow) -> Self {
299        Self {
300            builder: self.builder.property("overflow", overflow),
301        }
302    }
303
304    pub fn receives_default(self, receives_default: bool) -> Self {
305        Self {
306            builder: self.builder.property("receives-default", receives_default),
307        }
308    }
309
310    pub fn sensitive(self, sensitive: bool) -> Self {
311        Self {
312            builder: self.builder.property("sensitive", sensitive),
313        }
314    }
315
316    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
317        Self {
318            builder: self
319                .builder
320                .property("tooltip-markup", tooltip_markup.into()),
321        }
322    }
323
324    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
325        Self {
326            builder: self.builder.property("tooltip-text", tooltip_text.into()),
327        }
328    }
329
330    pub fn valign(self, valign: gtk::Align) -> Self {
331        Self {
332            builder: self.builder.property("valign", valign),
333        }
334    }
335
336    pub fn vexpand(self, vexpand: bool) -> Self {
337        Self {
338            builder: self.builder.property("vexpand", vexpand),
339        }
340    }
341
342    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
343        Self {
344            builder: self.builder.property("vexpand-set", vexpand_set),
345        }
346    }
347
348    pub fn visible(self, visible: bool) -> Self {
349        Self {
350            builder: self.builder.property("visible", visible),
351        }
352    }
353
354    pub fn width_request(self, width_request: i32) -> Self {
355        Self {
356            builder: self.builder.property("width-request", width_request),
357        }
358    }
359
360    pub fn accessible_role(self, accessible_role: gtk::AccessibleRole) -> Self {
361        Self {
362            builder: self.builder.property("accessible-role", accessible_role),
363        }
364    }
365
366    pub fn action_name(self, action_name: impl Into<glib::GString>) -> Self {
367        Self {
368            builder: self.builder.property("action-name", action_name.into()),
369        }
370    }
371
372    pub fn action_target(self, action_target: &glib::Variant) -> Self {
373        Self {
374            builder: self
375                .builder
376                .property("action-target", action_target.clone()),
377        }
378    }
379
380    pub fn editable(self, editable: bool) -> Self {
381        Self {
382            builder: self.builder.property("editable", editable),
383        }
384    }
385
386    pub fn enable_undo(self, enable_undo: bool) -> Self {
387        Self {
388            builder: self.builder.property("enable-undo", enable_undo),
389        }
390    }
391
392    pub fn max_width_chars(self, max_width_chars: i32) -> Self {
393        Self {
394            builder: self.builder.property("max-width-chars", max_width_chars),
395        }
396    }
397
398    pub fn text(self, text: impl Into<glib::GString>) -> Self {
399        Self {
400            builder: self.builder.property("text", text.into()),
401        }
402    }
403
404    pub fn width_chars(self, width_chars: i32) -> Self {
405        Self {
406            builder: self.builder.property("width-chars", width_chars),
407        }
408    }
409
410    pub fn xalign(self, xalign: f32) -> Self {
411        Self {
412            builder: self.builder.property("xalign", xalign),
413        }
414    }
415
416    // rustdoc-stripper-ignore-next
417    /// Build the [`EntryRow`].
418    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
419    pub fn build(self) -> EntryRow {
420        assert_initialized_main_thread!();
421        self.builder.build()
422    }
423}
424
425pub trait EntryRowExt: IsA<EntryRow> + 'static {
426    #[doc(alias = "adw_entry_row_add_prefix")]
427    fn add_prefix(&self, widget: &impl IsA<gtk::Widget>) {
428        unsafe {
429            ffi::adw_entry_row_add_prefix(
430                self.as_ref().to_glib_none().0,
431                widget.as_ref().to_glib_none().0,
432            );
433        }
434    }
435
436    #[doc(alias = "adw_entry_row_add_suffix")]
437    fn add_suffix(&self, widget: &impl IsA<gtk::Widget>) {
438        unsafe {
439            ffi::adw_entry_row_add_suffix(
440                self.as_ref().to_glib_none().0,
441                widget.as_ref().to_glib_none().0,
442            );
443        }
444    }
445
446    #[doc(alias = "adw_entry_row_get_activates_default")]
447    #[doc(alias = "get_activates_default")]
448    #[doc(alias = "activates-default")]
449    fn activates_default(&self) -> bool {
450        unsafe {
451            from_glib(ffi::adw_entry_row_get_activates_default(
452                self.as_ref().to_glib_none().0,
453            ))
454        }
455    }
456
457    #[doc(alias = "adw_entry_row_get_attributes")]
458    #[doc(alias = "get_attributes")]
459    fn attributes(&self) -> Option<pango::AttrList> {
460        unsafe {
461            from_glib_full(ffi::adw_entry_row_get_attributes(
462                self.as_ref().to_glib_none().0,
463            ))
464        }
465    }
466
467    #[doc(alias = "adw_entry_row_get_enable_emoji_completion")]
468    #[doc(alias = "get_enable_emoji_completion")]
469    #[doc(alias = "enable-emoji-completion")]
470    fn enables_emoji_completion(&self) -> bool {
471        unsafe {
472            from_glib(ffi::adw_entry_row_get_enable_emoji_completion(
473                self.as_ref().to_glib_none().0,
474            ))
475        }
476    }
477
478    #[doc(alias = "adw_entry_row_get_input_hints")]
479    #[doc(alias = "get_input_hints")]
480    #[doc(alias = "input-hints")]
481    fn input_hints(&self) -> gtk::InputHints {
482        unsafe {
483            from_glib(ffi::adw_entry_row_get_input_hints(
484                self.as_ref().to_glib_none().0,
485            ))
486        }
487    }
488
489    #[doc(alias = "adw_entry_row_get_input_purpose")]
490    #[doc(alias = "get_input_purpose")]
491    #[doc(alias = "input-purpose")]
492    fn input_purpose(&self) -> gtk::InputPurpose {
493        unsafe {
494            from_glib(ffi::adw_entry_row_get_input_purpose(
495                self.as_ref().to_glib_none().0,
496            ))
497        }
498    }
499
500    #[cfg(feature = "v1_6")]
501    #[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
502    #[doc(alias = "adw_entry_row_get_max_length")]
503    #[doc(alias = "get_max_length")]
504    #[doc(alias = "max-length")]
505    fn max_length(&self) -> i32 {
506        unsafe { ffi::adw_entry_row_get_max_length(self.as_ref().to_glib_none().0) }
507    }
508
509    #[doc(alias = "adw_entry_row_get_show_apply_button")]
510    #[doc(alias = "get_show_apply_button")]
511    #[doc(alias = "show-apply-button")]
512    fn shows_apply_button(&self) -> bool {
513        unsafe {
514            from_glib(ffi::adw_entry_row_get_show_apply_button(
515                self.as_ref().to_glib_none().0,
516            ))
517        }
518    }
519
520    #[cfg(feature = "v1_5")]
521    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
522    #[doc(alias = "adw_entry_row_get_text_length")]
523    #[doc(alias = "get_text_length")]
524    #[doc(alias = "text-length")]
525    fn text_length(&self) -> u32 {
526        unsafe { ffi::adw_entry_row_get_text_length(self.as_ref().to_glib_none().0) }
527    }
528
529    #[cfg(feature = "v1_3")]
530    #[cfg_attr(docsrs, doc(cfg(feature = "v1_3")))]
531    #[doc(alias = "adw_entry_row_grab_focus_without_selecting")]
532    fn grab_focus_without_selecting(&self) -> bool {
533        unsafe {
534            from_glib(ffi::adw_entry_row_grab_focus_without_selecting(
535                self.as_ref().to_glib_none().0,
536            ))
537        }
538    }
539
540    #[doc(alias = "adw_entry_row_remove")]
541    fn remove(&self, widget: &impl IsA<gtk::Widget>) {
542        unsafe {
543            ffi::adw_entry_row_remove(
544                self.as_ref().to_glib_none().0,
545                widget.as_ref().to_glib_none().0,
546            );
547        }
548    }
549
550    #[doc(alias = "adw_entry_row_set_activates_default")]
551    #[doc(alias = "activates-default")]
552    fn set_activates_default(&self, activates: bool) {
553        unsafe {
554            ffi::adw_entry_row_set_activates_default(
555                self.as_ref().to_glib_none().0,
556                activates.into_glib(),
557            );
558        }
559    }
560
561    #[doc(alias = "adw_entry_row_set_attributes")]
562    #[doc(alias = "attributes")]
563    fn set_attributes(&self, attributes: Option<&pango::AttrList>) {
564        unsafe {
565            ffi::adw_entry_row_set_attributes(
566                self.as_ref().to_glib_none().0,
567                attributes.to_glib_none().0,
568            );
569        }
570    }
571
572    #[doc(alias = "adw_entry_row_set_enable_emoji_completion")]
573    #[doc(alias = "enable-emoji-completion")]
574    fn set_enable_emoji_completion(&self, enable_emoji_completion: bool) {
575        unsafe {
576            ffi::adw_entry_row_set_enable_emoji_completion(
577                self.as_ref().to_glib_none().0,
578                enable_emoji_completion.into_glib(),
579            );
580        }
581    }
582
583    #[doc(alias = "adw_entry_row_set_input_hints")]
584    #[doc(alias = "input-hints")]
585    fn set_input_hints(&self, hints: gtk::InputHints) {
586        unsafe {
587            ffi::adw_entry_row_set_input_hints(self.as_ref().to_glib_none().0, hints.into_glib());
588        }
589    }
590
591    #[doc(alias = "adw_entry_row_set_input_purpose")]
592    #[doc(alias = "input-purpose")]
593    fn set_input_purpose(&self, purpose: gtk::InputPurpose) {
594        unsafe {
595            ffi::adw_entry_row_set_input_purpose(
596                self.as_ref().to_glib_none().0,
597                purpose.into_glib(),
598            );
599        }
600    }
601
602    #[cfg(feature = "v1_6")]
603    #[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
604    #[doc(alias = "adw_entry_row_set_max_length")]
605    #[doc(alias = "max-length")]
606    fn set_max_length(&self, max_length: i32) {
607        unsafe {
608            ffi::adw_entry_row_set_max_length(self.as_ref().to_glib_none().0, max_length);
609        }
610    }
611
612    #[doc(alias = "adw_entry_row_set_show_apply_button")]
613    #[doc(alias = "show-apply-button")]
614    fn set_show_apply_button(&self, show_apply_button: bool) {
615        unsafe {
616            ffi::adw_entry_row_set_show_apply_button(
617                self.as_ref().to_glib_none().0,
618                show_apply_button.into_glib(),
619            );
620        }
621    }
622
623    #[cfg(feature = "v1_2")]
624    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
625    #[doc(alias = "apply")]
626    fn connect_apply<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
627        unsafe extern "C" fn apply_trampoline<P: IsA<EntryRow>, F: Fn(&P) + 'static>(
628            this: *mut ffi::AdwEntryRow,
629            f: glib::ffi::gpointer,
630        ) {
631            let f: &F = &*(f as *const F);
632            f(EntryRow::from_glib_borrow(this).unsafe_cast_ref())
633        }
634        unsafe {
635            let f: Box_<F> = Box_::new(f);
636            connect_raw(
637                self.as_ptr() as *mut _,
638                c"apply".as_ptr() as *const _,
639                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
640                    apply_trampoline::<Self, F> as *const (),
641                )),
642                Box_::into_raw(f),
643            )
644        }
645    }
646
647    #[cfg(feature = "v1_2")]
648    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
649    #[doc(alias = "entry-activated")]
650    fn connect_entry_activated<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
651        unsafe extern "C" fn entry_activated_trampoline<P: IsA<EntryRow>, F: Fn(&P) + 'static>(
652            this: *mut ffi::AdwEntryRow,
653            f: glib::ffi::gpointer,
654        ) {
655            let f: &F = &*(f as *const F);
656            f(EntryRow::from_glib_borrow(this).unsafe_cast_ref())
657        }
658        unsafe {
659            let f: Box_<F> = Box_::new(f);
660            connect_raw(
661                self.as_ptr() as *mut _,
662                c"entry-activated".as_ptr() as *const _,
663                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
664                    entry_activated_trampoline::<Self, F> as *const (),
665                )),
666                Box_::into_raw(f),
667            )
668        }
669    }
670
671    #[cfg(feature = "v1_2")]
672    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
673    #[doc(alias = "activates-default")]
674    fn connect_activates_default_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
675        unsafe extern "C" fn notify_activates_default_trampoline<
676            P: IsA<EntryRow>,
677            F: Fn(&P) + 'static,
678        >(
679            this: *mut ffi::AdwEntryRow,
680            _param_spec: glib::ffi::gpointer,
681            f: glib::ffi::gpointer,
682        ) {
683            let f: &F = &*(f as *const F);
684            f(EntryRow::from_glib_borrow(this).unsafe_cast_ref())
685        }
686        unsafe {
687            let f: Box_<F> = Box_::new(f);
688            connect_raw(
689                self.as_ptr() as *mut _,
690                c"notify::activates-default".as_ptr() as *const _,
691                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
692                    notify_activates_default_trampoline::<Self, F> as *const (),
693                )),
694                Box_::into_raw(f),
695            )
696        }
697    }
698
699    #[cfg(feature = "v1_2")]
700    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
701    #[doc(alias = "attributes")]
702    fn connect_attributes_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
703        unsafe extern "C" fn notify_attributes_trampoline<P: IsA<EntryRow>, F: Fn(&P) + 'static>(
704            this: *mut ffi::AdwEntryRow,
705            _param_spec: glib::ffi::gpointer,
706            f: glib::ffi::gpointer,
707        ) {
708            let f: &F = &*(f as *const F);
709            f(EntryRow::from_glib_borrow(this).unsafe_cast_ref())
710        }
711        unsafe {
712            let f: Box_<F> = Box_::new(f);
713            connect_raw(
714                self.as_ptr() as *mut _,
715                c"notify::attributes".as_ptr() as *const _,
716                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
717                    notify_attributes_trampoline::<Self, F> as *const (),
718                )),
719                Box_::into_raw(f),
720            )
721        }
722    }
723
724    #[cfg(feature = "v1_2")]
725    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
726    #[doc(alias = "enable-emoji-completion")]
727    fn connect_enable_emoji_completion_notify<F: Fn(&Self) + 'static>(
728        &self,
729        f: F,
730    ) -> SignalHandlerId {
731        unsafe extern "C" fn notify_enable_emoji_completion_trampoline<
732            P: IsA<EntryRow>,
733            F: Fn(&P) + 'static,
734        >(
735            this: *mut ffi::AdwEntryRow,
736            _param_spec: glib::ffi::gpointer,
737            f: glib::ffi::gpointer,
738        ) {
739            let f: &F = &*(f as *const F);
740            f(EntryRow::from_glib_borrow(this).unsafe_cast_ref())
741        }
742        unsafe {
743            let f: Box_<F> = Box_::new(f);
744            connect_raw(
745                self.as_ptr() as *mut _,
746                c"notify::enable-emoji-completion".as_ptr() as *const _,
747                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
748                    notify_enable_emoji_completion_trampoline::<Self, F> as *const (),
749                )),
750                Box_::into_raw(f),
751            )
752        }
753    }
754
755    #[cfg(feature = "v1_2")]
756    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
757    #[doc(alias = "input-hints")]
758    fn connect_input_hints_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
759        unsafe extern "C" fn notify_input_hints_trampoline<
760            P: IsA<EntryRow>,
761            F: Fn(&P) + 'static,
762        >(
763            this: *mut ffi::AdwEntryRow,
764            _param_spec: glib::ffi::gpointer,
765            f: glib::ffi::gpointer,
766        ) {
767            let f: &F = &*(f as *const F);
768            f(EntryRow::from_glib_borrow(this).unsafe_cast_ref())
769        }
770        unsafe {
771            let f: Box_<F> = Box_::new(f);
772            connect_raw(
773                self.as_ptr() as *mut _,
774                c"notify::input-hints".as_ptr() as *const _,
775                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
776                    notify_input_hints_trampoline::<Self, F> as *const (),
777                )),
778                Box_::into_raw(f),
779            )
780        }
781    }
782
783    #[cfg(feature = "v1_2")]
784    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
785    #[doc(alias = "input-purpose")]
786    fn connect_input_purpose_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
787        unsafe extern "C" fn notify_input_purpose_trampoline<
788            P: IsA<EntryRow>,
789            F: Fn(&P) + 'static,
790        >(
791            this: *mut ffi::AdwEntryRow,
792            _param_spec: glib::ffi::gpointer,
793            f: glib::ffi::gpointer,
794        ) {
795            let f: &F = &*(f as *const F);
796            f(EntryRow::from_glib_borrow(this).unsafe_cast_ref())
797        }
798        unsafe {
799            let f: Box_<F> = Box_::new(f);
800            connect_raw(
801                self.as_ptr() as *mut _,
802                c"notify::input-purpose".as_ptr() as *const _,
803                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
804                    notify_input_purpose_trampoline::<Self, F> as *const (),
805                )),
806                Box_::into_raw(f),
807            )
808        }
809    }
810
811    #[cfg(feature = "v1_6")]
812    #[cfg_attr(docsrs, doc(cfg(feature = "v1_6")))]
813    #[doc(alias = "max-length")]
814    fn connect_max_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
815        unsafe extern "C" fn notify_max_length_trampoline<P: IsA<EntryRow>, F: Fn(&P) + 'static>(
816            this: *mut ffi::AdwEntryRow,
817            _param_spec: glib::ffi::gpointer,
818            f: glib::ffi::gpointer,
819        ) {
820            let f: &F = &*(f as *const F);
821            f(EntryRow::from_glib_borrow(this).unsafe_cast_ref())
822        }
823        unsafe {
824            let f: Box_<F> = Box_::new(f);
825            connect_raw(
826                self.as_ptr() as *mut _,
827                c"notify::max-length".as_ptr() as *const _,
828                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
829                    notify_max_length_trampoline::<Self, F> as *const (),
830                )),
831                Box_::into_raw(f),
832            )
833        }
834    }
835
836    #[cfg(feature = "v1_2")]
837    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
838    #[doc(alias = "show-apply-button")]
839    fn connect_show_apply_button_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
840        unsafe extern "C" fn notify_show_apply_button_trampoline<
841            P: IsA<EntryRow>,
842            F: Fn(&P) + 'static,
843        >(
844            this: *mut ffi::AdwEntryRow,
845            _param_spec: glib::ffi::gpointer,
846            f: glib::ffi::gpointer,
847        ) {
848            let f: &F = &*(f as *const F);
849            f(EntryRow::from_glib_borrow(this).unsafe_cast_ref())
850        }
851        unsafe {
852            let f: Box_<F> = Box_::new(f);
853            connect_raw(
854                self.as_ptr() as *mut _,
855                c"notify::show-apply-button".as_ptr() as *const _,
856                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
857                    notify_show_apply_button_trampoline::<Self, F> as *const (),
858                )),
859                Box_::into_raw(f),
860            )
861        }
862    }
863
864    #[cfg(feature = "v1_5")]
865    #[cfg_attr(docsrs, doc(cfg(feature = "v1_5")))]
866    #[doc(alias = "text-length")]
867    fn connect_text_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
868        unsafe extern "C" fn notify_text_length_trampoline<
869            P: IsA<EntryRow>,
870            F: Fn(&P) + 'static,
871        >(
872            this: *mut ffi::AdwEntryRow,
873            _param_spec: glib::ffi::gpointer,
874            f: glib::ffi::gpointer,
875        ) {
876            let f: &F = &*(f as *const F);
877            f(EntryRow::from_glib_borrow(this).unsafe_cast_ref())
878        }
879        unsafe {
880            let f: Box_<F> = Box_::new(f);
881            connect_raw(
882                self.as_ptr() as *mut _,
883                c"notify::text-length".as_ptr() as *const _,
884                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
885                    notify_text_length_trampoline::<Self, F> as *const (),
886                )),
887                Box_::into_raw(f),
888            )
889        }
890    }
891}
892
893impl<O: IsA<EntryRow>> EntryRowExt for O {}