1use 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 #[doc(alias = "GtkEntry")]
19 pub struct Entry(Object<ffi::GtkEntry, ffi::GtkEntryClass>) @extends Widget, @implements Buildable, CellEditable, Editable;
20
21 match fn {
22 type_ => || ffi::gtk_entry_get_type(),
23 }
24}
25
26impl Entry {
27 pub const NONE: Option<&'static Entry> = None;
28
29 #[doc(alias = "gtk_entry_new")]
30 pub fn new() -> Entry {
31 assert_initialized_main_thread!();
32 unsafe { Widget::from_glib_none(ffi::gtk_entry_new()).unsafe_cast() }
33 }
34
35 #[doc(alias = "gtk_entry_new_with_buffer")]
36 #[doc(alias = "new_with_buffer")]
37 pub fn with_buffer(buffer: &impl IsA<EntryBuffer>) -> Entry {
38 skip_assert_initialized!();
39 unsafe {
40 Widget::from_glib_none(ffi::gtk_entry_new_with_buffer(
41 buffer.as_ref().to_glib_none().0,
42 ))
43 .unsafe_cast()
44 }
45 }
46
47 pub fn builder() -> EntryBuilder {
52 EntryBuilder::new()
53 }
54}
55
56impl Default for Entry {
57 fn default() -> Self {
58 Self::new()
59 }
60}
61
62#[must_use = "The builder must be built to be used"]
67pub struct EntryBuilder {
68 builder: glib::object::ObjectBuilder<'static, Entry>,
69}
70
71impl EntryBuilder {
72 fn new() -> Self {
73 Self {
74 builder: glib::object::Object::builder(),
75 }
76 }
77
78 pub fn activates_default(self, activates_default: bool) -> Self {
79 Self {
80 builder: self
81 .builder
82 .property("activates-default", activates_default),
83 }
84 }
85
86 pub fn attributes(self, attributes: &pango::AttrList) -> Self {
87 Self {
88 builder: self.builder.property("attributes", attributes.clone()),
89 }
90 }
91
92 pub fn buffer(self, buffer: &impl IsA<EntryBuffer>) -> Self {
93 Self {
94 builder: self.builder.property("buffer", buffer.clone().upcast()),
95 }
96 }
97
98 pub fn caps_lock_warning(self, caps_lock_warning: bool) -> Self {
99 Self {
100 builder: self
101 .builder
102 .property("caps-lock-warning", caps_lock_warning),
103 }
104 }
105
106 pub fn completion(self, completion: &impl IsA<EntryCompletion>) -> Self {
107 Self {
108 builder: self
109 .builder
110 .property("completion", completion.clone().upcast()),
111 }
112 }
113
114 pub fn editable(self, editable: bool) -> Self {
115 Self {
116 builder: self.builder.property("editable", editable),
117 }
118 }
119
120 pub fn enable_emoji_completion(self, enable_emoji_completion: bool) -> Self {
121 Self {
122 builder: self
123 .builder
124 .property("enable-emoji-completion", enable_emoji_completion),
125 }
126 }
127
128 pub fn has_frame(self, has_frame: bool) -> Self {
129 Self {
130 builder: self.builder.property("has-frame", has_frame),
131 }
132 }
133
134 pub fn im_module(self, im_module: impl Into<glib::GString>) -> Self {
135 Self {
136 builder: self.builder.property("im-module", im_module.into()),
137 }
138 }
139
140 pub fn input_hints(self, input_hints: InputHints) -> Self {
141 Self {
142 builder: self.builder.property("input-hints", input_hints),
143 }
144 }
145
146 pub fn input_purpose(self, input_purpose: InputPurpose) -> Self {
147 Self {
148 builder: self.builder.property("input-purpose", input_purpose),
149 }
150 }
151
152 pub fn invisible_char(self, invisible_char: u32) -> Self {
153 Self {
154 builder: self.builder.property("invisible-char", invisible_char),
155 }
156 }
157
158 pub fn invisible_char_set(self, invisible_char_set: bool) -> Self {
159 Self {
160 builder: self
161 .builder
162 .property("invisible-char-set", invisible_char_set),
163 }
164 }
165
166 pub fn max_length(self, max_length: i32) -> Self {
167 Self {
168 builder: self.builder.property("max-length", max_length),
169 }
170 }
171
172 pub fn max_width_chars(self, max_width_chars: i32) -> Self {
173 Self {
174 builder: self.builder.property("max-width-chars", max_width_chars),
175 }
176 }
177
178 pub fn overwrite_mode(self, overwrite_mode: bool) -> Self {
179 Self {
180 builder: self.builder.property("overwrite-mode", overwrite_mode),
181 }
182 }
183
184 pub fn placeholder_text(self, placeholder_text: impl Into<glib::GString>) -> Self {
185 Self {
186 builder: self
187 .builder
188 .property("placeholder-text", placeholder_text.into()),
189 }
190 }
191
192 pub fn populate_all(self, populate_all: bool) -> Self {
193 Self {
194 builder: self.builder.property("populate-all", populate_all),
195 }
196 }
197
198 pub fn primary_icon_activatable(self, primary_icon_activatable: bool) -> Self {
199 Self {
200 builder: self
201 .builder
202 .property("primary-icon-activatable", primary_icon_activatable),
203 }
204 }
205
206 pub fn primary_icon_gicon(self, primary_icon_gicon: &impl IsA<gio::Icon>) -> Self {
207 Self {
208 builder: self
209 .builder
210 .property("primary-icon-gicon", primary_icon_gicon.clone().upcast()),
211 }
212 }
213
214 pub fn primary_icon_name(self, primary_icon_name: impl Into<glib::GString>) -> Self {
215 Self {
216 builder: self
217 .builder
218 .property("primary-icon-name", primary_icon_name.into()),
219 }
220 }
221
222 pub fn primary_icon_pixbuf(self, primary_icon_pixbuf: &gdk_pixbuf::Pixbuf) -> Self {
223 Self {
224 builder: self
225 .builder
226 .property("primary-icon-pixbuf", primary_icon_pixbuf.clone()),
227 }
228 }
229
230 pub fn primary_icon_sensitive(self, primary_icon_sensitive: bool) -> Self {
231 Self {
232 builder: self
233 .builder
234 .property("primary-icon-sensitive", primary_icon_sensitive),
235 }
236 }
237
238 pub fn primary_icon_tooltip_markup(
239 self,
240 primary_icon_tooltip_markup: impl Into<glib::GString>,
241 ) -> Self {
242 Self {
243 builder: self.builder.property(
244 "primary-icon-tooltip-markup",
245 primary_icon_tooltip_markup.into(),
246 ),
247 }
248 }
249
250 pub fn primary_icon_tooltip_text(
251 self,
252 primary_icon_tooltip_text: impl Into<glib::GString>,
253 ) -> Self {
254 Self {
255 builder: self.builder.property(
256 "primary-icon-tooltip-text",
257 primary_icon_tooltip_text.into(),
258 ),
259 }
260 }
261
262 pub fn progress_fraction(self, progress_fraction: f64) -> Self {
263 Self {
264 builder: self
265 .builder
266 .property("progress-fraction", progress_fraction),
267 }
268 }
269
270 pub fn progress_pulse_step(self, progress_pulse_step: f64) -> Self {
271 Self {
272 builder: self
273 .builder
274 .property("progress-pulse-step", progress_pulse_step),
275 }
276 }
277
278 pub fn secondary_icon_activatable(self, secondary_icon_activatable: bool) -> Self {
279 Self {
280 builder: self
281 .builder
282 .property("secondary-icon-activatable", secondary_icon_activatable),
283 }
284 }
285
286 pub fn secondary_icon_gicon(self, secondary_icon_gicon: &impl IsA<gio::Icon>) -> Self {
287 Self {
288 builder: self.builder.property(
289 "secondary-icon-gicon",
290 secondary_icon_gicon.clone().upcast(),
291 ),
292 }
293 }
294
295 pub fn secondary_icon_name(self, secondary_icon_name: impl Into<glib::GString>) -> Self {
296 Self {
297 builder: self
298 .builder
299 .property("secondary-icon-name", secondary_icon_name.into()),
300 }
301 }
302
303 pub fn secondary_icon_pixbuf(self, secondary_icon_pixbuf: &gdk_pixbuf::Pixbuf) -> Self {
304 Self {
305 builder: self
306 .builder
307 .property("secondary-icon-pixbuf", secondary_icon_pixbuf.clone()),
308 }
309 }
310
311 pub fn secondary_icon_sensitive(self, secondary_icon_sensitive: bool) -> Self {
312 Self {
313 builder: self
314 .builder
315 .property("secondary-icon-sensitive", secondary_icon_sensitive),
316 }
317 }
318
319 pub fn secondary_icon_tooltip_markup(
320 self,
321 secondary_icon_tooltip_markup: impl Into<glib::GString>,
322 ) -> Self {
323 Self {
324 builder: self.builder.property(
325 "secondary-icon-tooltip-markup",
326 secondary_icon_tooltip_markup.into(),
327 ),
328 }
329 }
330
331 pub fn secondary_icon_tooltip_text(
332 self,
333 secondary_icon_tooltip_text: impl Into<glib::GString>,
334 ) -> Self {
335 Self {
336 builder: self.builder.property(
337 "secondary-icon-tooltip-text",
338 secondary_icon_tooltip_text.into(),
339 ),
340 }
341 }
342
343 pub fn show_emoji_icon(self, show_emoji_icon: bool) -> Self {
344 Self {
345 builder: self.builder.property("show-emoji-icon", show_emoji_icon),
346 }
347 }
348
349 pub fn tabs(self, tabs: &pango::TabArray) -> Self {
350 Self {
351 builder: self.builder.property("tabs", tabs),
352 }
353 }
354
355 pub fn text(self, text: impl Into<glib::GString>) -> Self {
356 Self {
357 builder: self.builder.property("text", text.into()),
358 }
359 }
360
361 pub fn truncate_multiline(self, truncate_multiline: bool) -> Self {
362 Self {
363 builder: self
364 .builder
365 .property("truncate-multiline", truncate_multiline),
366 }
367 }
368
369 pub fn visibility(self, visibility: bool) -> Self {
370 Self {
371 builder: self.builder.property("visibility", visibility),
372 }
373 }
374
375 pub fn width_chars(self, width_chars: i32) -> Self {
376 Self {
377 builder: self.builder.property("width-chars", width_chars),
378 }
379 }
380
381 pub fn xalign(self, xalign: f32) -> Self {
382 Self {
383 builder: self.builder.property("xalign", xalign),
384 }
385 }
386
387 pub fn app_paintable(self, app_paintable: bool) -> Self {
388 Self {
389 builder: self.builder.property("app-paintable", app_paintable),
390 }
391 }
392
393 pub fn can_default(self, can_default: bool) -> Self {
394 Self {
395 builder: self.builder.property("can-default", can_default),
396 }
397 }
398
399 pub fn can_focus(self, can_focus: bool) -> Self {
400 Self {
401 builder: self.builder.property("can-focus", can_focus),
402 }
403 }
404
405 pub fn events(self, events: gdk::EventMask) -> Self {
406 Self {
407 builder: self.builder.property("events", events),
408 }
409 }
410
411 pub fn expand(self, expand: bool) -> Self {
412 Self {
413 builder: self.builder.property("expand", expand),
414 }
415 }
416
417 pub fn focus_on_click(self, focus_on_click: bool) -> Self {
418 Self {
419 builder: self.builder.property("focus-on-click", focus_on_click),
420 }
421 }
422
423 pub fn halign(self, halign: Align) -> Self {
424 Self {
425 builder: self.builder.property("halign", halign),
426 }
427 }
428
429 pub fn has_default(self, has_default: bool) -> Self {
430 Self {
431 builder: self.builder.property("has-default", has_default),
432 }
433 }
434
435 pub fn has_focus(self, has_focus: bool) -> Self {
436 Self {
437 builder: self.builder.property("has-focus", has_focus),
438 }
439 }
440
441 pub fn has_tooltip(self, has_tooltip: bool) -> Self {
442 Self {
443 builder: self.builder.property("has-tooltip", has_tooltip),
444 }
445 }
446
447 pub fn height_request(self, height_request: i32) -> Self {
448 Self {
449 builder: self.builder.property("height-request", height_request),
450 }
451 }
452
453 pub fn hexpand(self, hexpand: bool) -> Self {
454 Self {
455 builder: self.builder.property("hexpand", hexpand),
456 }
457 }
458
459 pub fn hexpand_set(self, hexpand_set: bool) -> Self {
460 Self {
461 builder: self.builder.property("hexpand-set", hexpand_set),
462 }
463 }
464
465 pub fn is_focus(self, is_focus: bool) -> Self {
466 Self {
467 builder: self.builder.property("is-focus", is_focus),
468 }
469 }
470
471 pub fn margin(self, margin: i32) -> Self {
472 Self {
473 builder: self.builder.property("margin", margin),
474 }
475 }
476
477 pub fn margin_bottom(self, margin_bottom: i32) -> Self {
478 Self {
479 builder: self.builder.property("margin-bottom", margin_bottom),
480 }
481 }
482
483 pub fn margin_end(self, margin_end: i32) -> Self {
484 Self {
485 builder: self.builder.property("margin-end", margin_end),
486 }
487 }
488
489 pub fn margin_start(self, margin_start: i32) -> Self {
490 Self {
491 builder: self.builder.property("margin-start", margin_start),
492 }
493 }
494
495 pub fn margin_top(self, margin_top: i32) -> Self {
496 Self {
497 builder: self.builder.property("margin-top", margin_top),
498 }
499 }
500
501 pub fn name(self, name: impl Into<glib::GString>) -> Self {
502 Self {
503 builder: self.builder.property("name", name.into()),
504 }
505 }
506
507 pub fn no_show_all(self, no_show_all: bool) -> Self {
508 Self {
509 builder: self.builder.property("no-show-all", no_show_all),
510 }
511 }
512
513 pub fn opacity(self, opacity: f64) -> Self {
514 Self {
515 builder: self.builder.property("opacity", opacity),
516 }
517 }
518
519 pub fn parent(self, parent: &impl IsA<Container>) -> Self {
520 Self {
521 builder: self.builder.property("parent", parent.clone().upcast()),
522 }
523 }
524
525 pub fn receives_default(self, receives_default: bool) -> Self {
526 Self {
527 builder: self.builder.property("receives-default", receives_default),
528 }
529 }
530
531 pub fn sensitive(self, sensitive: bool) -> Self {
532 Self {
533 builder: self.builder.property("sensitive", sensitive),
534 }
535 }
536
537 pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
538 Self {
539 builder: self
540 .builder
541 .property("tooltip-markup", tooltip_markup.into()),
542 }
543 }
544
545 pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
546 Self {
547 builder: self.builder.property("tooltip-text", tooltip_text.into()),
548 }
549 }
550
551 pub fn valign(self, valign: Align) -> Self {
552 Self {
553 builder: self.builder.property("valign", valign),
554 }
555 }
556
557 pub fn vexpand(self, vexpand: bool) -> Self {
558 Self {
559 builder: self.builder.property("vexpand", vexpand),
560 }
561 }
562
563 pub fn vexpand_set(self, vexpand_set: bool) -> Self {
564 Self {
565 builder: self.builder.property("vexpand-set", vexpand_set),
566 }
567 }
568
569 pub fn visible(self, visible: bool) -> Self {
570 Self {
571 builder: self.builder.property("visible", visible),
572 }
573 }
574
575 pub fn width_request(self, width_request: i32) -> Self {
576 Self {
577 builder: self.builder.property("width-request", width_request),
578 }
579 }
580
581 pub fn editing_canceled(self, editing_canceled: bool) -> Self {
582 Self {
583 builder: self.builder.property("editing-canceled", editing_canceled),
584 }
585 }
586
587 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
590 pub fn build(self) -> Entry {
591 self.builder.build()
592 }
593}
594
595mod sealed {
596 pub trait Sealed {}
597 impl<T: super::IsA<super::Entry>> Sealed for T {}
598}
599
600pub trait EntryExt: IsA<Entry> + sealed::Sealed + 'static {
601 #[doc(alias = "gtk_entry_get_activates_default")]
602 #[doc(alias = "get_activates_default")]
603 fn activates_default(&self) -> bool {
604 unsafe {
605 from_glib(ffi::gtk_entry_get_activates_default(
606 self.as_ref().to_glib_none().0,
607 ))
608 }
609 }
610
611 #[doc(alias = "gtk_entry_get_alignment")]
612 #[doc(alias = "get_alignment")]
613 fn alignment(&self) -> f32 {
614 unsafe { ffi::gtk_entry_get_alignment(self.as_ref().to_glib_none().0) }
615 }
616
617 #[doc(alias = "gtk_entry_get_attributes")]
618 #[doc(alias = "get_attributes")]
619 fn attributes(&self) -> Option<pango::AttrList> {
620 unsafe {
621 from_glib_none(ffi::gtk_entry_get_attributes(
622 self.as_ref().to_glib_none().0,
623 ))
624 }
625 }
626
627 #[doc(alias = "gtk_entry_get_buffer")]
628 #[doc(alias = "get_buffer")]
629 fn buffer(&self) -> EntryBuffer {
630 unsafe { from_glib_none(ffi::gtk_entry_get_buffer(self.as_ref().to_glib_none().0)) }
631 }
632
633 #[doc(alias = "gtk_entry_get_completion")]
634 #[doc(alias = "get_completion")]
635 fn completion(&self) -> Option<EntryCompletion> {
636 unsafe {
637 from_glib_none(ffi::gtk_entry_get_completion(
638 self.as_ref().to_glib_none().0,
639 ))
640 }
641 }
642
643 #[doc(alias = "gtk_entry_get_current_icon_drag_source")]
644 #[doc(alias = "get_current_icon_drag_source")]
645 fn current_icon_drag_source(&self) -> i32 {
646 unsafe { ffi::gtk_entry_get_current_icon_drag_source(self.as_ref().to_glib_none().0) }
647 }
648
649 #[doc(alias = "gtk_entry_get_cursor_hadjustment")]
650 #[doc(alias = "get_cursor_hadjustment")]
651 fn cursor_hadjustment(&self) -> Option<Adjustment> {
652 unsafe {
653 from_glib_none(ffi::gtk_entry_get_cursor_hadjustment(
654 self.as_ref().to_glib_none().0,
655 ))
656 }
657 }
658
659 #[doc(alias = "gtk_entry_get_has_frame")]
660 #[doc(alias = "get_has_frame")]
661 fn has_frame(&self) -> bool {
662 unsafe { from_glib(ffi::gtk_entry_get_has_frame(self.as_ref().to_glib_none().0)) }
663 }
664
665 #[doc(alias = "gtk_entry_get_icon_activatable")]
666 #[doc(alias = "get_icon_activatable")]
667 fn icon_is_activatable(&self, icon_pos: EntryIconPosition) -> bool {
668 unsafe {
669 from_glib(ffi::gtk_entry_get_icon_activatable(
670 self.as_ref().to_glib_none().0,
671 icon_pos.into_glib(),
672 ))
673 }
674 }
675
676 #[doc(alias = "gtk_entry_get_icon_area")]
677 #[doc(alias = "get_icon_area")]
678 fn icon_area(&self, icon_pos: EntryIconPosition) -> gdk::Rectangle {
679 unsafe {
680 let mut icon_area = gdk::Rectangle::uninitialized();
681 ffi::gtk_entry_get_icon_area(
682 self.as_ref().to_glib_none().0,
683 icon_pos.into_glib(),
684 icon_area.to_glib_none_mut().0,
685 );
686 icon_area
687 }
688 }
689
690 #[doc(alias = "gtk_entry_get_icon_at_pos")]
691 #[doc(alias = "get_icon_at_pos")]
692 fn icon_at_pos(&self, x: i32, y: i32) -> i32 {
693 unsafe { ffi::gtk_entry_get_icon_at_pos(self.as_ref().to_glib_none().0, x, y) }
694 }
695
696 #[doc(alias = "gtk_entry_get_icon_gicon")]
697 #[doc(alias = "get_icon_gicon")]
698 fn icon_gicon(&self, icon_pos: EntryIconPosition) -> Option<gio::Icon> {
699 unsafe {
700 from_glib_none(ffi::gtk_entry_get_icon_gicon(
701 self.as_ref().to_glib_none().0,
702 icon_pos.into_glib(),
703 ))
704 }
705 }
706
707 #[doc(alias = "gtk_entry_get_icon_name")]
708 #[doc(alias = "get_icon_name")]
709 fn icon_name(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
710 unsafe {
711 from_glib_none(ffi::gtk_entry_get_icon_name(
712 self.as_ref().to_glib_none().0,
713 icon_pos.into_glib(),
714 ))
715 }
716 }
717
718 #[doc(alias = "gtk_entry_get_icon_pixbuf")]
719 #[doc(alias = "get_icon_pixbuf")]
720 fn icon_pixbuf(&self, icon_pos: EntryIconPosition) -> Option<gdk_pixbuf::Pixbuf> {
721 unsafe {
722 from_glib_none(ffi::gtk_entry_get_icon_pixbuf(
723 self.as_ref().to_glib_none().0,
724 icon_pos.into_glib(),
725 ))
726 }
727 }
728
729 #[doc(alias = "gtk_entry_get_icon_sensitive")]
730 #[doc(alias = "get_icon_sensitive")]
731 fn icon_is_sensitive(&self, icon_pos: EntryIconPosition) -> bool {
732 unsafe {
733 from_glib(ffi::gtk_entry_get_icon_sensitive(
734 self.as_ref().to_glib_none().0,
735 icon_pos.into_glib(),
736 ))
737 }
738 }
739
740 #[doc(alias = "gtk_entry_get_icon_storage_type")]
741 #[doc(alias = "get_icon_storage_type")]
742 fn icon_storage_type(&self, icon_pos: EntryIconPosition) -> ImageType {
743 unsafe {
744 from_glib(ffi::gtk_entry_get_icon_storage_type(
745 self.as_ref().to_glib_none().0,
746 icon_pos.into_glib(),
747 ))
748 }
749 }
750
751 #[doc(alias = "gtk_entry_get_icon_tooltip_markup")]
752 #[doc(alias = "get_icon_tooltip_markup")]
753 fn icon_tooltip_markup(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
754 unsafe {
755 from_glib_full(ffi::gtk_entry_get_icon_tooltip_markup(
756 self.as_ref().to_glib_none().0,
757 icon_pos.into_glib(),
758 ))
759 }
760 }
761
762 #[doc(alias = "gtk_entry_get_icon_tooltip_text")]
763 #[doc(alias = "get_icon_tooltip_text")]
764 fn icon_tooltip_text(&self, icon_pos: EntryIconPosition) -> Option<glib::GString> {
765 unsafe {
766 from_glib_full(ffi::gtk_entry_get_icon_tooltip_text(
767 self.as_ref().to_glib_none().0,
768 icon_pos.into_glib(),
769 ))
770 }
771 }
772
773 #[doc(alias = "gtk_entry_get_input_hints")]
774 #[doc(alias = "get_input_hints")]
775 fn input_hints(&self) -> InputHints {
776 unsafe {
777 from_glib(ffi::gtk_entry_get_input_hints(
778 self.as_ref().to_glib_none().0,
779 ))
780 }
781 }
782
783 #[doc(alias = "gtk_entry_get_input_purpose")]
784 #[doc(alias = "get_input_purpose")]
785 fn input_purpose(&self) -> InputPurpose {
786 unsafe {
787 from_glib(ffi::gtk_entry_get_input_purpose(
788 self.as_ref().to_glib_none().0,
789 ))
790 }
791 }
792
793 #[doc(alias = "gtk_entry_get_layout")]
794 #[doc(alias = "get_layout")]
795 fn layout(&self) -> Option<pango::Layout> {
796 unsafe { from_glib_none(ffi::gtk_entry_get_layout(self.as_ref().to_glib_none().0)) }
797 }
798
799 #[doc(alias = "gtk_entry_get_layout_offsets")]
800 #[doc(alias = "get_layout_offsets")]
801 fn layout_offsets(&self) -> (i32, i32) {
802 unsafe {
803 let mut x = mem::MaybeUninit::uninit();
804 let mut y = mem::MaybeUninit::uninit();
805 ffi::gtk_entry_get_layout_offsets(
806 self.as_ref().to_glib_none().0,
807 x.as_mut_ptr(),
808 y.as_mut_ptr(),
809 );
810 (x.assume_init(), y.assume_init())
811 }
812 }
813
814 #[doc(alias = "gtk_entry_get_max_length")]
815 #[doc(alias = "get_max_length")]
816 fn max_length(&self) -> i32 {
817 unsafe { ffi::gtk_entry_get_max_length(self.as_ref().to_glib_none().0) }
818 }
819
820 #[doc(alias = "gtk_entry_get_max_width_chars")]
821 #[doc(alias = "get_max_width_chars")]
822 fn max_width_chars(&self) -> i32 {
823 unsafe { ffi::gtk_entry_get_max_width_chars(self.as_ref().to_glib_none().0) }
824 }
825
826 #[doc(alias = "gtk_entry_get_overwrite_mode")]
827 #[doc(alias = "get_overwrite_mode")]
828 fn is_overwrite_mode(&self) -> bool {
829 unsafe {
830 from_glib(ffi::gtk_entry_get_overwrite_mode(
831 self.as_ref().to_glib_none().0,
832 ))
833 }
834 }
835
836 #[doc(alias = "gtk_entry_get_placeholder_text")]
837 #[doc(alias = "get_placeholder_text")]
838 fn placeholder_text(&self) -> Option<glib::GString> {
839 unsafe {
840 from_glib_none(ffi::gtk_entry_get_placeholder_text(
841 self.as_ref().to_glib_none().0,
842 ))
843 }
844 }
845
846 #[doc(alias = "gtk_entry_get_progress_fraction")]
847 #[doc(alias = "get_progress_fraction")]
848 fn progress_fraction(&self) -> f64 {
849 unsafe { ffi::gtk_entry_get_progress_fraction(self.as_ref().to_glib_none().0) }
850 }
851
852 #[doc(alias = "gtk_entry_get_progress_pulse_step")]
853 #[doc(alias = "get_progress_pulse_step")]
854 fn progress_pulse_step(&self) -> f64 {
855 unsafe { ffi::gtk_entry_get_progress_pulse_step(self.as_ref().to_glib_none().0) }
856 }
857
858 #[doc(alias = "gtk_entry_get_tabs")]
859 #[doc(alias = "get_tabs")]
860 fn tabs(&self) -> Option<pango::TabArray> {
861 unsafe { from_glib_none(ffi::gtk_entry_get_tabs(self.as_ref().to_glib_none().0)) }
862 }
863
864 #[doc(alias = "gtk_entry_get_text")]
865 #[doc(alias = "get_text")]
866 fn text(&self) -> glib::GString {
867 unsafe { from_glib_none(ffi::gtk_entry_get_text(self.as_ref().to_glib_none().0)) }
868 }
869
870 #[doc(alias = "gtk_entry_get_text_area")]
871 #[doc(alias = "get_text_area")]
872 fn text_area(&self) -> gdk::Rectangle {
873 unsafe {
874 let mut text_area = gdk::Rectangle::uninitialized();
875 ffi::gtk_entry_get_text_area(
876 self.as_ref().to_glib_none().0,
877 text_area.to_glib_none_mut().0,
878 );
879 text_area
880 }
881 }
882
883 #[doc(alias = "gtk_entry_get_text_length")]
884 #[doc(alias = "get_text_length")]
885 fn text_length(&self) -> u16 {
886 unsafe { ffi::gtk_entry_get_text_length(self.as_ref().to_glib_none().0) }
887 }
888
889 #[doc(alias = "gtk_entry_get_visibility")]
890 #[doc(alias = "get_visibility")]
891 fn is_visible(&self) -> bool {
892 unsafe {
893 from_glib(ffi::gtk_entry_get_visibility(
894 self.as_ref().to_glib_none().0,
895 ))
896 }
897 }
898
899 #[doc(alias = "gtk_entry_get_width_chars")]
900 #[doc(alias = "get_width_chars")]
901 fn width_chars(&self) -> i32 {
902 unsafe { ffi::gtk_entry_get_width_chars(self.as_ref().to_glib_none().0) }
903 }
904
905 #[doc(alias = "gtk_entry_grab_focus_without_selecting")]
906 fn grab_focus_without_selecting(&self) {
907 unsafe {
908 ffi::gtk_entry_grab_focus_without_selecting(self.as_ref().to_glib_none().0);
909 }
910 }
911
912 #[doc(alias = "gtk_entry_im_context_filter_keypress")]
913 fn im_context_filter_keypress(&self, event: &gdk::EventKey) -> bool {
914 unsafe {
915 from_glib(ffi::gtk_entry_im_context_filter_keypress(
916 self.as_ref().to_glib_none().0,
917 mut_override(event.to_glib_none().0),
918 ))
919 }
920 }
921
922 #[doc(alias = "gtk_entry_layout_index_to_text_index")]
923 fn layout_index_to_text_index(&self, layout_index: i32) -> i32 {
924 unsafe {
925 ffi::gtk_entry_layout_index_to_text_index(self.as_ref().to_glib_none().0, layout_index)
926 }
927 }
928
929 #[doc(alias = "gtk_entry_progress_pulse")]
930 fn progress_pulse(&self) {
931 unsafe {
932 ffi::gtk_entry_progress_pulse(self.as_ref().to_glib_none().0);
933 }
934 }
935
936 #[doc(alias = "gtk_entry_reset_im_context")]
937 fn reset_im_context(&self) {
938 unsafe {
939 ffi::gtk_entry_reset_im_context(self.as_ref().to_glib_none().0);
940 }
941 }
942
943 #[doc(alias = "gtk_entry_set_activates_default")]
944 fn set_activates_default(&self, setting: bool) {
945 unsafe {
946 ffi::gtk_entry_set_activates_default(
947 self.as_ref().to_glib_none().0,
948 setting.into_glib(),
949 );
950 }
951 }
952
953 #[doc(alias = "gtk_entry_set_alignment")]
954 fn set_alignment(&self, xalign: f32) {
955 unsafe {
956 ffi::gtk_entry_set_alignment(self.as_ref().to_glib_none().0, xalign);
957 }
958 }
959
960 #[doc(alias = "gtk_entry_set_attributes")]
961 fn set_attributes(&self, attrs: &pango::AttrList) {
962 unsafe {
963 ffi::gtk_entry_set_attributes(self.as_ref().to_glib_none().0, attrs.to_glib_none().0);
964 }
965 }
966
967 #[doc(alias = "gtk_entry_set_buffer")]
968 fn set_buffer(&self, buffer: &impl IsA<EntryBuffer>) {
969 unsafe {
970 ffi::gtk_entry_set_buffer(
971 self.as_ref().to_glib_none().0,
972 buffer.as_ref().to_glib_none().0,
973 );
974 }
975 }
976
977 #[doc(alias = "gtk_entry_set_completion")]
978 fn set_completion(&self, completion: Option<&impl IsA<EntryCompletion>>) {
979 unsafe {
980 ffi::gtk_entry_set_completion(
981 self.as_ref().to_glib_none().0,
982 completion.map(|p| p.as_ref()).to_glib_none().0,
983 );
984 }
985 }
986
987 #[doc(alias = "gtk_entry_set_cursor_hadjustment")]
988 fn set_cursor_hadjustment(&self, adjustment: Option<&impl IsA<Adjustment>>) {
989 unsafe {
990 ffi::gtk_entry_set_cursor_hadjustment(
991 self.as_ref().to_glib_none().0,
992 adjustment.map(|p| p.as_ref()).to_glib_none().0,
993 );
994 }
995 }
996
997 #[doc(alias = "gtk_entry_set_has_frame")]
998 fn set_has_frame(&self, setting: bool) {
999 unsafe {
1000 ffi::gtk_entry_set_has_frame(self.as_ref().to_glib_none().0, setting.into_glib());
1001 }
1002 }
1003
1004 #[doc(alias = "gtk_entry_set_icon_activatable")]
1005 fn set_icon_activatable(&self, icon_pos: EntryIconPosition, activatable: bool) {
1006 unsafe {
1007 ffi::gtk_entry_set_icon_activatable(
1008 self.as_ref().to_glib_none().0,
1009 icon_pos.into_glib(),
1010 activatable.into_glib(),
1011 );
1012 }
1013 }
1014
1015 #[doc(alias = "gtk_entry_set_icon_drag_source")]
1016 fn set_icon_drag_source(
1017 &self,
1018 icon_pos: EntryIconPosition,
1019 target_list: &TargetList,
1020 actions: gdk::DragAction,
1021 ) {
1022 unsafe {
1023 ffi::gtk_entry_set_icon_drag_source(
1024 self.as_ref().to_glib_none().0,
1025 icon_pos.into_glib(),
1026 target_list.to_glib_none().0,
1027 actions.into_glib(),
1028 );
1029 }
1030 }
1031
1032 #[doc(alias = "gtk_entry_set_icon_from_gicon")]
1033 fn set_icon_from_gicon(&self, icon_pos: EntryIconPosition, icon: Option<&impl IsA<gio::Icon>>) {
1034 unsafe {
1035 ffi::gtk_entry_set_icon_from_gicon(
1036 self.as_ref().to_glib_none().0,
1037 icon_pos.into_glib(),
1038 icon.map(|p| p.as_ref()).to_glib_none().0,
1039 );
1040 }
1041 }
1042
1043 #[doc(alias = "gtk_entry_set_icon_from_icon_name")]
1044 fn set_icon_from_icon_name(&self, icon_pos: EntryIconPosition, icon_name: Option<&str>) {
1045 unsafe {
1046 ffi::gtk_entry_set_icon_from_icon_name(
1047 self.as_ref().to_glib_none().0,
1048 icon_pos.into_glib(),
1049 icon_name.to_glib_none().0,
1050 );
1051 }
1052 }
1053
1054 #[doc(alias = "gtk_entry_set_icon_from_pixbuf")]
1055 fn set_icon_from_pixbuf(
1056 &self,
1057 icon_pos: EntryIconPosition,
1058 pixbuf: Option<&gdk_pixbuf::Pixbuf>,
1059 ) {
1060 unsafe {
1061 ffi::gtk_entry_set_icon_from_pixbuf(
1062 self.as_ref().to_glib_none().0,
1063 icon_pos.into_glib(),
1064 pixbuf.to_glib_none().0,
1065 );
1066 }
1067 }
1068
1069 #[doc(alias = "gtk_entry_set_icon_sensitive")]
1070 fn set_icon_sensitive(&self, icon_pos: EntryIconPosition, sensitive: bool) {
1071 unsafe {
1072 ffi::gtk_entry_set_icon_sensitive(
1073 self.as_ref().to_glib_none().0,
1074 icon_pos.into_glib(),
1075 sensitive.into_glib(),
1076 );
1077 }
1078 }
1079
1080 #[doc(alias = "gtk_entry_set_icon_tooltip_markup")]
1081 fn set_icon_tooltip_markup(&self, icon_pos: EntryIconPosition, tooltip: Option<&str>) {
1082 unsafe {
1083 ffi::gtk_entry_set_icon_tooltip_markup(
1084 self.as_ref().to_glib_none().0,
1085 icon_pos.into_glib(),
1086 tooltip.to_glib_none().0,
1087 );
1088 }
1089 }
1090
1091 #[doc(alias = "gtk_entry_set_icon_tooltip_text")]
1092 fn set_icon_tooltip_text(&self, icon_pos: EntryIconPosition, tooltip: Option<&str>) {
1093 unsafe {
1094 ffi::gtk_entry_set_icon_tooltip_text(
1095 self.as_ref().to_glib_none().0,
1096 icon_pos.into_glib(),
1097 tooltip.to_glib_none().0,
1098 );
1099 }
1100 }
1101
1102 #[doc(alias = "gtk_entry_set_input_hints")]
1103 fn set_input_hints(&self, hints: InputHints) {
1104 unsafe {
1105 ffi::gtk_entry_set_input_hints(self.as_ref().to_glib_none().0, hints.into_glib());
1106 }
1107 }
1108
1109 #[doc(alias = "gtk_entry_set_input_purpose")]
1110 fn set_input_purpose(&self, purpose: InputPurpose) {
1111 unsafe {
1112 ffi::gtk_entry_set_input_purpose(self.as_ref().to_glib_none().0, purpose.into_glib());
1113 }
1114 }
1115
1116 #[doc(alias = "gtk_entry_set_invisible_char")]
1117 fn set_invisible_char(&self, ch: Option<char>) {
1118 unsafe {
1119 ffi::gtk_entry_set_invisible_char(self.as_ref().to_glib_none().0, ch.into_glib());
1120 }
1121 }
1122
1123 #[doc(alias = "gtk_entry_set_max_length")]
1124 fn set_max_length(&self, max: i32) {
1125 unsafe {
1126 ffi::gtk_entry_set_max_length(self.as_ref().to_glib_none().0, max);
1127 }
1128 }
1129
1130 #[doc(alias = "gtk_entry_set_max_width_chars")]
1131 fn set_max_width_chars(&self, n_chars: i32) {
1132 unsafe {
1133 ffi::gtk_entry_set_max_width_chars(self.as_ref().to_glib_none().0, n_chars);
1134 }
1135 }
1136
1137 #[doc(alias = "gtk_entry_set_overwrite_mode")]
1138 fn set_overwrite_mode(&self, overwrite: bool) {
1139 unsafe {
1140 ffi::gtk_entry_set_overwrite_mode(
1141 self.as_ref().to_glib_none().0,
1142 overwrite.into_glib(),
1143 );
1144 }
1145 }
1146
1147 #[doc(alias = "gtk_entry_set_placeholder_text")]
1148 fn set_placeholder_text(&self, text: Option<&str>) {
1149 unsafe {
1150 ffi::gtk_entry_set_placeholder_text(
1151 self.as_ref().to_glib_none().0,
1152 text.to_glib_none().0,
1153 );
1154 }
1155 }
1156
1157 #[doc(alias = "gtk_entry_set_progress_fraction")]
1158 fn set_progress_fraction(&self, fraction: f64) {
1159 unsafe {
1160 ffi::gtk_entry_set_progress_fraction(self.as_ref().to_glib_none().0, fraction);
1161 }
1162 }
1163
1164 #[doc(alias = "gtk_entry_set_progress_pulse_step")]
1165 fn set_progress_pulse_step(&self, fraction: f64) {
1166 unsafe {
1167 ffi::gtk_entry_set_progress_pulse_step(self.as_ref().to_glib_none().0, fraction);
1168 }
1169 }
1170
1171 #[doc(alias = "gtk_entry_set_tabs")]
1172 fn set_tabs(&self, tabs: &pango::TabArray) {
1173 unsafe {
1174 ffi::gtk_entry_set_tabs(
1175 self.as_ref().to_glib_none().0,
1176 mut_override(tabs.to_glib_none().0),
1177 );
1178 }
1179 }
1180
1181 #[doc(alias = "gtk_entry_set_text")]
1182 fn set_text(&self, text: &str) {
1183 unsafe {
1184 ffi::gtk_entry_set_text(self.as_ref().to_glib_none().0, text.to_glib_none().0);
1185 }
1186 }
1187
1188 #[doc(alias = "gtk_entry_set_visibility")]
1189 fn set_visibility(&self, visible: bool) {
1190 unsafe {
1191 ffi::gtk_entry_set_visibility(self.as_ref().to_glib_none().0, visible.into_glib());
1192 }
1193 }
1194
1195 #[doc(alias = "gtk_entry_set_width_chars")]
1196 fn set_width_chars(&self, n_chars: i32) {
1197 unsafe {
1198 ffi::gtk_entry_set_width_chars(self.as_ref().to_glib_none().0, n_chars);
1199 }
1200 }
1201
1202 #[doc(alias = "gtk_entry_text_index_to_layout_index")]
1203 fn text_index_to_layout_index(&self, text_index: i32) -> i32 {
1204 unsafe {
1205 ffi::gtk_entry_text_index_to_layout_index(self.as_ref().to_glib_none().0, text_index)
1206 }
1207 }
1208
1209 #[doc(alias = "gtk_entry_unset_invisible_char")]
1210 fn unset_invisible_char(&self) {
1211 unsafe {
1212 ffi::gtk_entry_unset_invisible_char(self.as_ref().to_glib_none().0);
1213 }
1214 }
1215
1216 #[doc(alias = "caps-lock-warning")]
1217 fn is_caps_lock_warning(&self) -> bool {
1218 ObjectExt::property(self.as_ref(), "caps-lock-warning")
1219 }
1220
1221 #[doc(alias = "caps-lock-warning")]
1222 fn set_caps_lock_warning(&self, caps_lock_warning: bool) {
1223 ObjectExt::set_property(self.as_ref(), "caps-lock-warning", caps_lock_warning)
1224 }
1225
1226 #[doc(alias = "cursor-position")]
1227 fn cursor_position(&self) -> i32 {
1228 ObjectExt::property(self.as_ref(), "cursor-position")
1229 }
1230
1231 #[doc(alias = "enable-emoji-completion")]
1232 fn enables_emoji_completion(&self) -> bool {
1233 ObjectExt::property(self.as_ref(), "enable-emoji-completion")
1234 }
1235
1236 #[doc(alias = "enable-emoji-completion")]
1237 fn set_enable_emoji_completion(&self, enable_emoji_completion: bool) {
1238 ObjectExt::set_property(
1239 self.as_ref(),
1240 "enable-emoji-completion",
1241 enable_emoji_completion,
1242 )
1243 }
1244
1245 #[doc(alias = "im-module")]
1246 fn im_module(&self) -> Option<glib::GString> {
1247 ObjectExt::property(self.as_ref(), "im-module")
1248 }
1249
1250 #[doc(alias = "im-module")]
1251 fn set_im_module(&self, im_module: Option<&str>) {
1252 ObjectExt::set_property(self.as_ref(), "im-module", im_module)
1253 }
1254
1255 #[doc(alias = "invisible-char-set")]
1256 fn is_invisible_char_set(&self) -> bool {
1257 ObjectExt::property(self.as_ref(), "invisible-char-set")
1258 }
1259
1260 #[doc(alias = "invisible-char-set")]
1261 fn set_invisible_char_set(&self, invisible_char_set: bool) {
1262 ObjectExt::set_property(self.as_ref(), "invisible-char-set", invisible_char_set)
1263 }
1264
1265 #[doc(alias = "populate-all")]
1266 fn populates_all(&self) -> bool {
1267 ObjectExt::property(self.as_ref(), "populate-all")
1268 }
1269
1270 #[doc(alias = "populate-all")]
1271 fn set_populate_all(&self, populate_all: bool) {
1272 ObjectExt::set_property(self.as_ref(), "populate-all", populate_all)
1273 }
1274
1275 #[doc(alias = "primary-icon-activatable")]
1276 fn is_primary_icon_activatable(&self) -> bool {
1277 ObjectExt::property(self.as_ref(), "primary-icon-activatable")
1278 }
1279
1280 #[doc(alias = "primary-icon-activatable")]
1281 fn set_primary_icon_activatable(&self, primary_icon_activatable: bool) {
1282 ObjectExt::set_property(
1283 self.as_ref(),
1284 "primary-icon-activatable",
1285 primary_icon_activatable,
1286 )
1287 }
1288
1289 #[doc(alias = "primary-icon-gicon")]
1290 fn primary_icon_gicon(&self) -> Option<gio::Icon> {
1291 ObjectExt::property(self.as_ref(), "primary-icon-gicon")
1292 }
1293
1294 #[doc(alias = "primary-icon-gicon")]
1295 fn set_primary_icon_gicon<P: IsA<gio::Icon>>(&self, primary_icon_gicon: Option<&P>) {
1296 ObjectExt::set_property(self.as_ref(), "primary-icon-gicon", primary_icon_gicon)
1297 }
1298
1299 #[doc(alias = "primary-icon-name")]
1300 fn primary_icon_name(&self) -> Option<glib::GString> {
1301 ObjectExt::property(self.as_ref(), "primary-icon-name")
1302 }
1303
1304 #[doc(alias = "primary-icon-name")]
1305 fn set_primary_icon_name(&self, primary_icon_name: Option<&str>) {
1306 ObjectExt::set_property(self.as_ref(), "primary-icon-name", primary_icon_name)
1307 }
1308
1309 #[doc(alias = "primary-icon-pixbuf")]
1310 fn primary_icon_pixbuf(&self) -> Option<gdk_pixbuf::Pixbuf> {
1311 ObjectExt::property(self.as_ref(), "primary-icon-pixbuf")
1312 }
1313
1314 #[doc(alias = "primary-icon-pixbuf")]
1315 fn set_primary_icon_pixbuf(&self, primary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>) {
1316 ObjectExt::set_property(self.as_ref(), "primary-icon-pixbuf", primary_icon_pixbuf)
1317 }
1318
1319 #[doc(alias = "primary-icon-sensitive")]
1320 fn is_primary_icon_sensitive(&self) -> bool {
1321 ObjectExt::property(self.as_ref(), "primary-icon-sensitive")
1322 }
1323
1324 #[doc(alias = "primary-icon-sensitive")]
1325 fn set_primary_icon_sensitive(&self, primary_icon_sensitive: bool) {
1326 ObjectExt::set_property(
1327 self.as_ref(),
1328 "primary-icon-sensitive",
1329 primary_icon_sensitive,
1330 )
1331 }
1332
1333 #[doc(alias = "primary-icon-storage-type")]
1334 fn primary_icon_storage_type(&self) -> ImageType {
1335 ObjectExt::property(self.as_ref(), "primary-icon-storage-type")
1336 }
1337
1338 #[doc(alias = "primary-icon-tooltip-markup")]
1339 fn primary_icon_tooltip_markup(&self) -> Option<glib::GString> {
1340 ObjectExt::property(self.as_ref(), "primary-icon-tooltip-markup")
1341 }
1342
1343 #[doc(alias = "primary-icon-tooltip-markup")]
1344 fn set_primary_icon_tooltip_markup(&self, primary_icon_tooltip_markup: Option<&str>) {
1345 ObjectExt::set_property(
1346 self.as_ref(),
1347 "primary-icon-tooltip-markup",
1348 primary_icon_tooltip_markup,
1349 )
1350 }
1351
1352 #[doc(alias = "primary-icon-tooltip-text")]
1353 fn primary_icon_tooltip_text(&self) -> Option<glib::GString> {
1354 ObjectExt::property(self.as_ref(), "primary-icon-tooltip-text")
1355 }
1356
1357 #[doc(alias = "primary-icon-tooltip-text")]
1358 fn set_primary_icon_tooltip_text(&self, primary_icon_tooltip_text: Option<&str>) {
1359 ObjectExt::set_property(
1360 self.as_ref(),
1361 "primary-icon-tooltip-text",
1362 primary_icon_tooltip_text,
1363 )
1364 }
1365
1366 #[doc(alias = "scroll-offset")]
1367 fn scroll_offset(&self) -> i32 {
1368 ObjectExt::property(self.as_ref(), "scroll-offset")
1369 }
1370
1371 #[doc(alias = "secondary-icon-activatable")]
1372 fn is_secondary_icon_activatable(&self) -> bool {
1373 ObjectExt::property(self.as_ref(), "secondary-icon-activatable")
1374 }
1375
1376 #[doc(alias = "secondary-icon-activatable")]
1377 fn set_secondary_icon_activatable(&self, secondary_icon_activatable: bool) {
1378 ObjectExt::set_property(
1379 self.as_ref(),
1380 "secondary-icon-activatable",
1381 secondary_icon_activatable,
1382 )
1383 }
1384
1385 #[doc(alias = "secondary-icon-gicon")]
1386 fn secondary_icon_gicon(&self) -> Option<gio::Icon> {
1387 ObjectExt::property(self.as_ref(), "secondary-icon-gicon")
1388 }
1389
1390 #[doc(alias = "secondary-icon-gicon")]
1391 fn set_secondary_icon_gicon<P: IsA<gio::Icon>>(&self, secondary_icon_gicon: Option<&P>) {
1392 ObjectExt::set_property(self.as_ref(), "secondary-icon-gicon", secondary_icon_gicon)
1393 }
1394
1395 #[doc(alias = "secondary-icon-name")]
1396 fn secondary_icon_name(&self) -> Option<glib::GString> {
1397 ObjectExt::property(self.as_ref(), "secondary-icon-name")
1398 }
1399
1400 #[doc(alias = "secondary-icon-name")]
1401 fn set_secondary_icon_name(&self, secondary_icon_name: Option<&str>) {
1402 ObjectExt::set_property(self.as_ref(), "secondary-icon-name", secondary_icon_name)
1403 }
1404
1405 #[doc(alias = "secondary-icon-pixbuf")]
1406 fn secondary_icon_pixbuf(&self) -> Option<gdk_pixbuf::Pixbuf> {
1407 ObjectExt::property(self.as_ref(), "secondary-icon-pixbuf")
1408 }
1409
1410 #[doc(alias = "secondary-icon-pixbuf")]
1411 fn set_secondary_icon_pixbuf(&self, secondary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>) {
1412 ObjectExt::set_property(
1413 self.as_ref(),
1414 "secondary-icon-pixbuf",
1415 secondary_icon_pixbuf,
1416 )
1417 }
1418
1419 #[doc(alias = "secondary-icon-sensitive")]
1420 fn is_secondary_icon_sensitive(&self) -> bool {
1421 ObjectExt::property(self.as_ref(), "secondary-icon-sensitive")
1422 }
1423
1424 #[doc(alias = "secondary-icon-sensitive")]
1425 fn set_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool) {
1426 ObjectExt::set_property(
1427 self.as_ref(),
1428 "secondary-icon-sensitive",
1429 secondary_icon_sensitive,
1430 )
1431 }
1432
1433 #[doc(alias = "secondary-icon-storage-type")]
1434 fn secondary_icon_storage_type(&self) -> ImageType {
1435 ObjectExt::property(self.as_ref(), "secondary-icon-storage-type")
1436 }
1437
1438 #[doc(alias = "secondary-icon-tooltip-markup")]
1439 fn secondary_icon_tooltip_markup(&self) -> Option<glib::GString> {
1440 ObjectExt::property(self.as_ref(), "secondary-icon-tooltip-markup")
1441 }
1442
1443 #[doc(alias = "secondary-icon-tooltip-markup")]
1444 fn set_secondary_icon_tooltip_markup(&self, secondary_icon_tooltip_markup: Option<&str>) {
1445 ObjectExt::set_property(
1446 self.as_ref(),
1447 "secondary-icon-tooltip-markup",
1448 secondary_icon_tooltip_markup,
1449 )
1450 }
1451
1452 #[doc(alias = "secondary-icon-tooltip-text")]
1453 fn secondary_icon_tooltip_text(&self) -> Option<glib::GString> {
1454 ObjectExt::property(self.as_ref(), "secondary-icon-tooltip-text")
1455 }
1456
1457 #[doc(alias = "secondary-icon-tooltip-text")]
1458 fn set_secondary_icon_tooltip_text(&self, secondary_icon_tooltip_text: Option<&str>) {
1459 ObjectExt::set_property(
1460 self.as_ref(),
1461 "secondary-icon-tooltip-text",
1462 secondary_icon_tooltip_text,
1463 )
1464 }
1465
1466 #[doc(alias = "selection-bound")]
1467 fn selection_bound(&self) -> i32 {
1468 ObjectExt::property(self.as_ref(), "selection-bound")
1469 }
1470
1471 #[doc(alias = "show-emoji-icon")]
1472 fn shows_emoji_icon(&self) -> bool {
1473 ObjectExt::property(self.as_ref(), "show-emoji-icon")
1474 }
1475
1476 #[doc(alias = "show-emoji-icon")]
1477 fn set_show_emoji_icon(&self, show_emoji_icon: bool) {
1478 ObjectExt::set_property(self.as_ref(), "show-emoji-icon", show_emoji_icon)
1479 }
1480
1481 #[doc(alias = "truncate-multiline")]
1482 fn must_truncate_multiline(&self) -> bool {
1483 ObjectExt::property(self.as_ref(), "truncate-multiline")
1484 }
1485
1486 #[doc(alias = "truncate-multiline")]
1487 fn set_truncate_multiline(&self, truncate_multiline: bool) {
1488 ObjectExt::set_property(self.as_ref(), "truncate-multiline", truncate_multiline)
1489 }
1490
1491 fn xalign(&self) -> f32 {
1492 ObjectExt::property(self.as_ref(), "xalign")
1493 }
1494
1495 fn set_xalign(&self, xalign: f32) {
1496 ObjectExt::set_property(self.as_ref(), "xalign", xalign)
1497 }
1498
1499 #[doc(alias = "activate")]
1500 fn connect_activate<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1501 unsafe extern "C" fn activate_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
1502 this: *mut ffi::GtkEntry,
1503 f: glib::ffi::gpointer,
1504 ) {
1505 let f: &F = &*(f as *const F);
1506 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
1507 }
1508 unsafe {
1509 let f: Box_<F> = Box_::new(f);
1510 connect_raw(
1511 self.as_ptr() as *mut _,
1512 b"activate\0".as_ptr() as *const _,
1513 Some(transmute::<_, unsafe extern "C" fn()>(
1514 activate_trampoline::<Self, F> as *const (),
1515 )),
1516 Box_::into_raw(f),
1517 )
1518 }
1519 }
1520
1521 fn emit_activate(&self) {
1522 self.emit_by_name::<()>("activate", &[]);
1523 }
1524
1525 #[doc(alias = "backspace")]
1526 fn connect_backspace<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1527 unsafe extern "C" fn backspace_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
1528 this: *mut ffi::GtkEntry,
1529 f: glib::ffi::gpointer,
1530 ) {
1531 let f: &F = &*(f as *const F);
1532 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
1533 }
1534 unsafe {
1535 let f: Box_<F> = Box_::new(f);
1536 connect_raw(
1537 self.as_ptr() as *mut _,
1538 b"backspace\0".as_ptr() as *const _,
1539 Some(transmute::<_, unsafe extern "C" fn()>(
1540 backspace_trampoline::<Self, F> as *const (),
1541 )),
1542 Box_::into_raw(f),
1543 )
1544 }
1545 }
1546
1547 fn emit_backspace(&self) {
1548 self.emit_by_name::<()>("backspace", &[]);
1549 }
1550
1551 #[doc(alias = "copy-clipboard")]
1552 fn connect_copy_clipboard<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1553 unsafe extern "C" fn copy_clipboard_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
1554 this: *mut ffi::GtkEntry,
1555 f: glib::ffi::gpointer,
1556 ) {
1557 let f: &F = &*(f as *const F);
1558 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
1559 }
1560 unsafe {
1561 let f: Box_<F> = Box_::new(f);
1562 connect_raw(
1563 self.as_ptr() as *mut _,
1564 b"copy-clipboard\0".as_ptr() as *const _,
1565 Some(transmute::<_, unsafe extern "C" fn()>(
1566 copy_clipboard_trampoline::<Self, F> as *const (),
1567 )),
1568 Box_::into_raw(f),
1569 )
1570 }
1571 }
1572
1573 fn emit_copy_clipboard(&self) {
1574 self.emit_by_name::<()>("copy-clipboard", &[]);
1575 }
1576
1577 #[doc(alias = "cut-clipboard")]
1578 fn connect_cut_clipboard<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1579 unsafe extern "C" fn cut_clipboard_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
1580 this: *mut ffi::GtkEntry,
1581 f: glib::ffi::gpointer,
1582 ) {
1583 let f: &F = &*(f as *const F);
1584 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
1585 }
1586 unsafe {
1587 let f: Box_<F> = Box_::new(f);
1588 connect_raw(
1589 self.as_ptr() as *mut _,
1590 b"cut-clipboard\0".as_ptr() as *const _,
1591 Some(transmute::<_, unsafe extern "C" fn()>(
1592 cut_clipboard_trampoline::<Self, F> as *const (),
1593 )),
1594 Box_::into_raw(f),
1595 )
1596 }
1597 }
1598
1599 fn emit_cut_clipboard(&self) {
1600 self.emit_by_name::<()>("cut-clipboard", &[]);
1601 }
1602
1603 #[doc(alias = "delete-from-cursor")]
1604 fn connect_delete_from_cursor<F: Fn(&Self, DeleteType, i32) + 'static>(
1605 &self,
1606 f: F,
1607 ) -> SignalHandlerId {
1608 unsafe extern "C" fn delete_from_cursor_trampoline<
1609 P: IsA<Entry>,
1610 F: Fn(&P, DeleteType, i32) + 'static,
1611 >(
1612 this: *mut ffi::GtkEntry,
1613 type_: ffi::GtkDeleteType,
1614 count: libc::c_int,
1615 f: glib::ffi::gpointer,
1616 ) {
1617 let f: &F = &*(f as *const F);
1618 f(
1619 Entry::from_glib_borrow(this).unsafe_cast_ref(),
1620 from_glib(type_),
1621 count,
1622 )
1623 }
1624 unsafe {
1625 let f: Box_<F> = Box_::new(f);
1626 connect_raw(
1627 self.as_ptr() as *mut _,
1628 b"delete-from-cursor\0".as_ptr() as *const _,
1629 Some(transmute::<_, unsafe extern "C" fn()>(
1630 delete_from_cursor_trampoline::<Self, F> as *const (),
1631 )),
1632 Box_::into_raw(f),
1633 )
1634 }
1635 }
1636
1637 fn emit_delete_from_cursor(&self, type_: DeleteType, count: i32) {
1638 self.emit_by_name::<()>("delete-from-cursor", &[&type_, &count]);
1639 }
1640
1641 #[doc(alias = "icon-press")]
1642 fn connect_icon_press<F: Fn(&Self, EntryIconPosition, &gdk::Event) + 'static>(
1643 &self,
1644 f: F,
1645 ) -> SignalHandlerId {
1646 unsafe extern "C" fn icon_press_trampoline<
1647 P: IsA<Entry>,
1648 F: Fn(&P, EntryIconPosition, &gdk::Event) + 'static,
1649 >(
1650 this: *mut ffi::GtkEntry,
1651 icon_pos: ffi::GtkEntryIconPosition,
1652 event: *mut gdk::ffi::GdkEvent,
1653 f: glib::ffi::gpointer,
1654 ) {
1655 let f: &F = &*(f as *const F);
1656 f(
1657 Entry::from_glib_borrow(this).unsafe_cast_ref(),
1658 from_glib(icon_pos),
1659 &from_glib_none(event),
1660 )
1661 }
1662 unsafe {
1663 let f: Box_<F> = Box_::new(f);
1664 connect_raw(
1665 self.as_ptr() as *mut _,
1666 b"icon-press\0".as_ptr() as *const _,
1667 Some(transmute::<_, unsafe extern "C" fn()>(
1668 icon_press_trampoline::<Self, F> as *const (),
1669 )),
1670 Box_::into_raw(f),
1671 )
1672 }
1673 }
1674
1675 #[doc(alias = "icon-release")]
1676 fn connect_icon_release<F: Fn(&Self, EntryIconPosition, &gdk::Event) + 'static>(
1677 &self,
1678 f: F,
1679 ) -> SignalHandlerId {
1680 unsafe extern "C" fn icon_release_trampoline<
1681 P: IsA<Entry>,
1682 F: Fn(&P, EntryIconPosition, &gdk::Event) + 'static,
1683 >(
1684 this: *mut ffi::GtkEntry,
1685 icon_pos: ffi::GtkEntryIconPosition,
1686 event: *mut gdk::ffi::GdkEvent,
1687 f: glib::ffi::gpointer,
1688 ) {
1689 let f: &F = &*(f as *const F);
1690 f(
1691 Entry::from_glib_borrow(this).unsafe_cast_ref(),
1692 from_glib(icon_pos),
1693 &from_glib_none(event),
1694 )
1695 }
1696 unsafe {
1697 let f: Box_<F> = Box_::new(f);
1698 connect_raw(
1699 self.as_ptr() as *mut _,
1700 b"icon-release\0".as_ptr() as *const _,
1701 Some(transmute::<_, unsafe extern "C" fn()>(
1702 icon_release_trampoline::<Self, F> as *const (),
1703 )),
1704 Box_::into_raw(f),
1705 )
1706 }
1707 }
1708
1709 #[doc(alias = "insert-at-cursor")]
1710 fn connect_insert_at_cursor<F: Fn(&Self, &str) + 'static>(&self, f: F) -> SignalHandlerId {
1711 unsafe extern "C" fn insert_at_cursor_trampoline<
1712 P: IsA<Entry>,
1713 F: Fn(&P, &str) + 'static,
1714 >(
1715 this: *mut ffi::GtkEntry,
1716 string: *mut libc::c_char,
1717 f: glib::ffi::gpointer,
1718 ) {
1719 let f: &F = &*(f as *const F);
1720 f(
1721 Entry::from_glib_borrow(this).unsafe_cast_ref(),
1722 &glib::GString::from_glib_borrow(string),
1723 )
1724 }
1725 unsafe {
1726 let f: Box_<F> = Box_::new(f);
1727 connect_raw(
1728 self.as_ptr() as *mut _,
1729 b"insert-at-cursor\0".as_ptr() as *const _,
1730 Some(transmute::<_, unsafe extern "C" fn()>(
1731 insert_at_cursor_trampoline::<Self, F> as *const (),
1732 )),
1733 Box_::into_raw(f),
1734 )
1735 }
1736 }
1737
1738 fn emit_insert_at_cursor(&self, string: &str) {
1739 self.emit_by_name::<()>("insert-at-cursor", &[&string]);
1740 }
1741
1742 #[doc(alias = "insert-emoji")]
1743 fn connect_insert_emoji<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1744 unsafe extern "C" fn insert_emoji_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
1745 this: *mut ffi::GtkEntry,
1746 f: glib::ffi::gpointer,
1747 ) {
1748 let f: &F = &*(f as *const F);
1749 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
1750 }
1751 unsafe {
1752 let f: Box_<F> = Box_::new(f);
1753 connect_raw(
1754 self.as_ptr() as *mut _,
1755 b"insert-emoji\0".as_ptr() as *const _,
1756 Some(transmute::<_, unsafe extern "C" fn()>(
1757 insert_emoji_trampoline::<Self, F> as *const (),
1758 )),
1759 Box_::into_raw(f),
1760 )
1761 }
1762 }
1763
1764 fn emit_insert_emoji(&self) {
1765 self.emit_by_name::<()>("insert-emoji", &[]);
1766 }
1767
1768 #[doc(alias = "move-cursor")]
1769 fn connect_move_cursor<F: Fn(&Self, MovementStep, i32, bool) + 'static>(
1770 &self,
1771 f: F,
1772 ) -> SignalHandlerId {
1773 unsafe extern "C" fn move_cursor_trampoline<
1774 P: IsA<Entry>,
1775 F: Fn(&P, MovementStep, i32, bool) + 'static,
1776 >(
1777 this: *mut ffi::GtkEntry,
1778 step: ffi::GtkMovementStep,
1779 count: libc::c_int,
1780 extend_selection: glib::ffi::gboolean,
1781 f: glib::ffi::gpointer,
1782 ) {
1783 let f: &F = &*(f as *const F);
1784 f(
1785 Entry::from_glib_borrow(this).unsafe_cast_ref(),
1786 from_glib(step),
1787 count,
1788 from_glib(extend_selection),
1789 )
1790 }
1791 unsafe {
1792 let f: Box_<F> = Box_::new(f);
1793 connect_raw(
1794 self.as_ptr() as *mut _,
1795 b"move-cursor\0".as_ptr() as *const _,
1796 Some(transmute::<_, unsafe extern "C" fn()>(
1797 move_cursor_trampoline::<Self, F> as *const (),
1798 )),
1799 Box_::into_raw(f),
1800 )
1801 }
1802 }
1803
1804 fn emit_move_cursor(&self, step: MovementStep, count: i32, extend_selection: bool) {
1805 self.emit_by_name::<()>("move-cursor", &[&step, &count, &extend_selection]);
1806 }
1807
1808 #[doc(alias = "paste-clipboard")]
1809 fn connect_paste_clipboard<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1810 unsafe extern "C" fn paste_clipboard_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
1811 this: *mut ffi::GtkEntry,
1812 f: glib::ffi::gpointer,
1813 ) {
1814 let f: &F = &*(f as *const F);
1815 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
1816 }
1817 unsafe {
1818 let f: Box_<F> = Box_::new(f);
1819 connect_raw(
1820 self.as_ptr() as *mut _,
1821 b"paste-clipboard\0".as_ptr() as *const _,
1822 Some(transmute::<_, unsafe extern "C" fn()>(
1823 paste_clipboard_trampoline::<Self, F> as *const (),
1824 )),
1825 Box_::into_raw(f),
1826 )
1827 }
1828 }
1829
1830 fn emit_paste_clipboard(&self) {
1831 self.emit_by_name::<()>("paste-clipboard", &[]);
1832 }
1833
1834 #[doc(alias = "populate-popup")]
1835 fn connect_populate_popup<F: Fn(&Self, &Widget) + 'static>(&self, f: F) -> SignalHandlerId {
1836 unsafe extern "C" fn populate_popup_trampoline<
1837 P: IsA<Entry>,
1838 F: Fn(&P, &Widget) + 'static,
1839 >(
1840 this: *mut ffi::GtkEntry,
1841 widget: *mut ffi::GtkWidget,
1842 f: glib::ffi::gpointer,
1843 ) {
1844 let f: &F = &*(f as *const F);
1845 f(
1846 Entry::from_glib_borrow(this).unsafe_cast_ref(),
1847 &from_glib_borrow(widget),
1848 )
1849 }
1850 unsafe {
1851 let f: Box_<F> = Box_::new(f);
1852 connect_raw(
1853 self.as_ptr() as *mut _,
1854 b"populate-popup\0".as_ptr() as *const _,
1855 Some(transmute::<_, unsafe extern "C" fn()>(
1856 populate_popup_trampoline::<Self, F> as *const (),
1857 )),
1858 Box_::into_raw(f),
1859 )
1860 }
1861 }
1862
1863 #[doc(alias = "preedit-changed")]
1864 fn connect_preedit_changed<F: Fn(&Self, &str) + 'static>(&self, f: F) -> SignalHandlerId {
1865 unsafe extern "C" fn preedit_changed_trampoline<
1866 P: IsA<Entry>,
1867 F: Fn(&P, &str) + 'static,
1868 >(
1869 this: *mut ffi::GtkEntry,
1870 preedit: *mut libc::c_char,
1871 f: glib::ffi::gpointer,
1872 ) {
1873 let f: &F = &*(f as *const F);
1874 f(
1875 Entry::from_glib_borrow(this).unsafe_cast_ref(),
1876 &glib::GString::from_glib_borrow(preedit),
1877 )
1878 }
1879 unsafe {
1880 let f: Box_<F> = Box_::new(f);
1881 connect_raw(
1882 self.as_ptr() as *mut _,
1883 b"preedit-changed\0".as_ptr() as *const _,
1884 Some(transmute::<_, unsafe extern "C" fn()>(
1885 preedit_changed_trampoline::<Self, F> as *const (),
1886 )),
1887 Box_::into_raw(f),
1888 )
1889 }
1890 }
1891
1892 fn emit_preedit_changed(&self, preedit: &str) {
1893 self.emit_by_name::<()>("preedit-changed", &[&preedit]);
1894 }
1895
1896 #[doc(alias = "toggle-overwrite")]
1897 fn connect_toggle_overwrite<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1898 unsafe extern "C" fn toggle_overwrite_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
1899 this: *mut ffi::GtkEntry,
1900 f: glib::ffi::gpointer,
1901 ) {
1902 let f: &F = &*(f as *const F);
1903 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
1904 }
1905 unsafe {
1906 let f: Box_<F> = Box_::new(f);
1907 connect_raw(
1908 self.as_ptr() as *mut _,
1909 b"toggle-overwrite\0".as_ptr() as *const _,
1910 Some(transmute::<_, unsafe extern "C" fn()>(
1911 toggle_overwrite_trampoline::<Self, F> as *const (),
1912 )),
1913 Box_::into_raw(f),
1914 )
1915 }
1916 }
1917
1918 fn emit_toggle_overwrite(&self) {
1919 self.emit_by_name::<()>("toggle-overwrite", &[]);
1920 }
1921
1922 #[doc(alias = "activates-default")]
1923 fn connect_activates_default_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1924 unsafe extern "C" fn notify_activates_default_trampoline<
1925 P: IsA<Entry>,
1926 F: Fn(&P) + 'static,
1927 >(
1928 this: *mut ffi::GtkEntry,
1929 _param_spec: glib::ffi::gpointer,
1930 f: glib::ffi::gpointer,
1931 ) {
1932 let f: &F = &*(f as *const F);
1933 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
1934 }
1935 unsafe {
1936 let f: Box_<F> = Box_::new(f);
1937 connect_raw(
1938 self.as_ptr() as *mut _,
1939 b"notify::activates-default\0".as_ptr() as *const _,
1940 Some(transmute::<_, unsafe extern "C" fn()>(
1941 notify_activates_default_trampoline::<Self, F> as *const (),
1942 )),
1943 Box_::into_raw(f),
1944 )
1945 }
1946 }
1947
1948 #[doc(alias = "attributes")]
1949 fn connect_attributes_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1950 unsafe extern "C" fn notify_attributes_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
1951 this: *mut ffi::GtkEntry,
1952 _param_spec: glib::ffi::gpointer,
1953 f: glib::ffi::gpointer,
1954 ) {
1955 let f: &F = &*(f as *const F);
1956 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
1957 }
1958 unsafe {
1959 let f: Box_<F> = Box_::new(f);
1960 connect_raw(
1961 self.as_ptr() as *mut _,
1962 b"notify::attributes\0".as_ptr() as *const _,
1963 Some(transmute::<_, unsafe extern "C" fn()>(
1964 notify_attributes_trampoline::<Self, F> as *const (),
1965 )),
1966 Box_::into_raw(f),
1967 )
1968 }
1969 }
1970
1971 #[doc(alias = "buffer")]
1972 fn connect_buffer_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1973 unsafe extern "C" fn notify_buffer_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
1974 this: *mut ffi::GtkEntry,
1975 _param_spec: glib::ffi::gpointer,
1976 f: glib::ffi::gpointer,
1977 ) {
1978 let f: &F = &*(f as *const F);
1979 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
1980 }
1981 unsafe {
1982 let f: Box_<F> = Box_::new(f);
1983 connect_raw(
1984 self.as_ptr() as *mut _,
1985 b"notify::buffer\0".as_ptr() as *const _,
1986 Some(transmute::<_, unsafe extern "C" fn()>(
1987 notify_buffer_trampoline::<Self, F> as *const (),
1988 )),
1989 Box_::into_raw(f),
1990 )
1991 }
1992 }
1993
1994 #[doc(alias = "caps-lock-warning")]
1995 fn connect_caps_lock_warning_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1996 unsafe extern "C" fn notify_caps_lock_warning_trampoline<
1997 P: IsA<Entry>,
1998 F: Fn(&P) + 'static,
1999 >(
2000 this: *mut ffi::GtkEntry,
2001 _param_spec: glib::ffi::gpointer,
2002 f: glib::ffi::gpointer,
2003 ) {
2004 let f: &F = &*(f as *const F);
2005 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2006 }
2007 unsafe {
2008 let f: Box_<F> = Box_::new(f);
2009 connect_raw(
2010 self.as_ptr() as *mut _,
2011 b"notify::caps-lock-warning\0".as_ptr() as *const _,
2012 Some(transmute::<_, unsafe extern "C" fn()>(
2013 notify_caps_lock_warning_trampoline::<Self, F> as *const (),
2014 )),
2015 Box_::into_raw(f),
2016 )
2017 }
2018 }
2019
2020 #[doc(alias = "completion")]
2021 fn connect_completion_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2022 unsafe extern "C" fn notify_completion_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
2023 this: *mut ffi::GtkEntry,
2024 _param_spec: glib::ffi::gpointer,
2025 f: glib::ffi::gpointer,
2026 ) {
2027 let f: &F = &*(f as *const F);
2028 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2029 }
2030 unsafe {
2031 let f: Box_<F> = Box_::new(f);
2032 connect_raw(
2033 self.as_ptr() as *mut _,
2034 b"notify::completion\0".as_ptr() as *const _,
2035 Some(transmute::<_, unsafe extern "C" fn()>(
2036 notify_completion_trampoline::<Self, F> as *const (),
2037 )),
2038 Box_::into_raw(f),
2039 )
2040 }
2041 }
2042
2043 #[doc(alias = "cursor-position")]
2044 fn connect_cursor_position_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2045 unsafe extern "C" fn notify_cursor_position_trampoline<
2046 P: IsA<Entry>,
2047 F: Fn(&P) + 'static,
2048 >(
2049 this: *mut ffi::GtkEntry,
2050 _param_spec: glib::ffi::gpointer,
2051 f: glib::ffi::gpointer,
2052 ) {
2053 let f: &F = &*(f as *const F);
2054 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2055 }
2056 unsafe {
2057 let f: Box_<F> = Box_::new(f);
2058 connect_raw(
2059 self.as_ptr() as *mut _,
2060 b"notify::cursor-position\0".as_ptr() as *const _,
2061 Some(transmute::<_, unsafe extern "C" fn()>(
2062 notify_cursor_position_trampoline::<Self, F> as *const (),
2063 )),
2064 Box_::into_raw(f),
2065 )
2066 }
2067 }
2068
2069 #[doc(alias = "editable")]
2070 fn connect_editable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2071 unsafe extern "C" fn notify_editable_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
2072 this: *mut ffi::GtkEntry,
2073 _param_spec: glib::ffi::gpointer,
2074 f: glib::ffi::gpointer,
2075 ) {
2076 let f: &F = &*(f as *const F);
2077 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2078 }
2079 unsafe {
2080 let f: Box_<F> = Box_::new(f);
2081 connect_raw(
2082 self.as_ptr() as *mut _,
2083 b"notify::editable\0".as_ptr() as *const _,
2084 Some(transmute::<_, unsafe extern "C" fn()>(
2085 notify_editable_trampoline::<Self, F> as *const (),
2086 )),
2087 Box_::into_raw(f),
2088 )
2089 }
2090 }
2091
2092 #[doc(alias = "enable-emoji-completion")]
2093 fn connect_enable_emoji_completion_notify<F: Fn(&Self) + 'static>(
2094 &self,
2095 f: F,
2096 ) -> SignalHandlerId {
2097 unsafe extern "C" fn notify_enable_emoji_completion_trampoline<
2098 P: IsA<Entry>,
2099 F: Fn(&P) + 'static,
2100 >(
2101 this: *mut ffi::GtkEntry,
2102 _param_spec: glib::ffi::gpointer,
2103 f: glib::ffi::gpointer,
2104 ) {
2105 let f: &F = &*(f as *const F);
2106 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2107 }
2108 unsafe {
2109 let f: Box_<F> = Box_::new(f);
2110 connect_raw(
2111 self.as_ptr() as *mut _,
2112 b"notify::enable-emoji-completion\0".as_ptr() as *const _,
2113 Some(transmute::<_, unsafe extern "C" fn()>(
2114 notify_enable_emoji_completion_trampoline::<Self, F> as *const (),
2115 )),
2116 Box_::into_raw(f),
2117 )
2118 }
2119 }
2120
2121 #[doc(alias = "has-frame")]
2122 fn connect_has_frame_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2123 unsafe extern "C" fn notify_has_frame_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
2124 this: *mut ffi::GtkEntry,
2125 _param_spec: glib::ffi::gpointer,
2126 f: glib::ffi::gpointer,
2127 ) {
2128 let f: &F = &*(f as *const F);
2129 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2130 }
2131 unsafe {
2132 let f: Box_<F> = Box_::new(f);
2133 connect_raw(
2134 self.as_ptr() as *mut _,
2135 b"notify::has-frame\0".as_ptr() as *const _,
2136 Some(transmute::<_, unsafe extern "C" fn()>(
2137 notify_has_frame_trampoline::<Self, F> as *const (),
2138 )),
2139 Box_::into_raw(f),
2140 )
2141 }
2142 }
2143
2144 #[doc(alias = "im-module")]
2145 fn connect_im_module_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2146 unsafe extern "C" fn notify_im_module_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
2147 this: *mut ffi::GtkEntry,
2148 _param_spec: glib::ffi::gpointer,
2149 f: glib::ffi::gpointer,
2150 ) {
2151 let f: &F = &*(f as *const F);
2152 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2153 }
2154 unsafe {
2155 let f: Box_<F> = Box_::new(f);
2156 connect_raw(
2157 self.as_ptr() as *mut _,
2158 b"notify::im-module\0".as_ptr() as *const _,
2159 Some(transmute::<_, unsafe extern "C" fn()>(
2160 notify_im_module_trampoline::<Self, F> as *const (),
2161 )),
2162 Box_::into_raw(f),
2163 )
2164 }
2165 }
2166
2167 #[doc(alias = "input-hints")]
2168 fn connect_input_hints_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2169 unsafe extern "C" fn notify_input_hints_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
2170 this: *mut ffi::GtkEntry,
2171 _param_spec: glib::ffi::gpointer,
2172 f: glib::ffi::gpointer,
2173 ) {
2174 let f: &F = &*(f as *const F);
2175 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2176 }
2177 unsafe {
2178 let f: Box_<F> = Box_::new(f);
2179 connect_raw(
2180 self.as_ptr() as *mut _,
2181 b"notify::input-hints\0".as_ptr() as *const _,
2182 Some(transmute::<_, unsafe extern "C" fn()>(
2183 notify_input_hints_trampoline::<Self, F> as *const (),
2184 )),
2185 Box_::into_raw(f),
2186 )
2187 }
2188 }
2189
2190 #[doc(alias = "input-purpose")]
2191 fn connect_input_purpose_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2192 unsafe extern "C" fn notify_input_purpose_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
2193 this: *mut ffi::GtkEntry,
2194 _param_spec: glib::ffi::gpointer,
2195 f: glib::ffi::gpointer,
2196 ) {
2197 let f: &F = &*(f as *const F);
2198 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2199 }
2200 unsafe {
2201 let f: Box_<F> = Box_::new(f);
2202 connect_raw(
2203 self.as_ptr() as *mut _,
2204 b"notify::input-purpose\0".as_ptr() as *const _,
2205 Some(transmute::<_, unsafe extern "C" fn()>(
2206 notify_input_purpose_trampoline::<Self, F> as *const (),
2207 )),
2208 Box_::into_raw(f),
2209 )
2210 }
2211 }
2212
2213 #[doc(alias = "invisible-char")]
2214 fn connect_invisible_char_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2215 unsafe extern "C" fn notify_invisible_char_trampoline<
2216 P: IsA<Entry>,
2217 F: Fn(&P) + 'static,
2218 >(
2219 this: *mut ffi::GtkEntry,
2220 _param_spec: glib::ffi::gpointer,
2221 f: glib::ffi::gpointer,
2222 ) {
2223 let f: &F = &*(f as *const F);
2224 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2225 }
2226 unsafe {
2227 let f: Box_<F> = Box_::new(f);
2228 connect_raw(
2229 self.as_ptr() as *mut _,
2230 b"notify::invisible-char\0".as_ptr() as *const _,
2231 Some(transmute::<_, unsafe extern "C" fn()>(
2232 notify_invisible_char_trampoline::<Self, F> as *const (),
2233 )),
2234 Box_::into_raw(f),
2235 )
2236 }
2237 }
2238
2239 #[doc(alias = "invisible-char-set")]
2240 fn connect_invisible_char_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2241 unsafe extern "C" fn notify_invisible_char_set_trampoline<
2242 P: IsA<Entry>,
2243 F: Fn(&P) + 'static,
2244 >(
2245 this: *mut ffi::GtkEntry,
2246 _param_spec: glib::ffi::gpointer,
2247 f: glib::ffi::gpointer,
2248 ) {
2249 let f: &F = &*(f as *const F);
2250 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2251 }
2252 unsafe {
2253 let f: Box_<F> = Box_::new(f);
2254 connect_raw(
2255 self.as_ptr() as *mut _,
2256 b"notify::invisible-char-set\0".as_ptr() as *const _,
2257 Some(transmute::<_, unsafe extern "C" fn()>(
2258 notify_invisible_char_set_trampoline::<Self, F> as *const (),
2259 )),
2260 Box_::into_raw(f),
2261 )
2262 }
2263 }
2264
2265 #[doc(alias = "max-length")]
2266 fn connect_max_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2267 unsafe extern "C" fn notify_max_length_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
2268 this: *mut ffi::GtkEntry,
2269 _param_spec: glib::ffi::gpointer,
2270 f: glib::ffi::gpointer,
2271 ) {
2272 let f: &F = &*(f as *const F);
2273 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2274 }
2275 unsafe {
2276 let f: Box_<F> = Box_::new(f);
2277 connect_raw(
2278 self.as_ptr() as *mut _,
2279 b"notify::max-length\0".as_ptr() as *const _,
2280 Some(transmute::<_, unsafe extern "C" fn()>(
2281 notify_max_length_trampoline::<Self, F> as *const (),
2282 )),
2283 Box_::into_raw(f),
2284 )
2285 }
2286 }
2287
2288 #[doc(alias = "max-width-chars")]
2289 fn connect_max_width_chars_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2290 unsafe extern "C" fn notify_max_width_chars_trampoline<
2291 P: IsA<Entry>,
2292 F: Fn(&P) + 'static,
2293 >(
2294 this: *mut ffi::GtkEntry,
2295 _param_spec: glib::ffi::gpointer,
2296 f: glib::ffi::gpointer,
2297 ) {
2298 let f: &F = &*(f as *const F);
2299 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2300 }
2301 unsafe {
2302 let f: Box_<F> = Box_::new(f);
2303 connect_raw(
2304 self.as_ptr() as *mut _,
2305 b"notify::max-width-chars\0".as_ptr() as *const _,
2306 Some(transmute::<_, unsafe extern "C" fn()>(
2307 notify_max_width_chars_trampoline::<Self, F> as *const (),
2308 )),
2309 Box_::into_raw(f),
2310 )
2311 }
2312 }
2313
2314 #[doc(alias = "overwrite-mode")]
2315 fn connect_overwrite_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2316 unsafe extern "C" fn notify_overwrite_mode_trampoline<
2317 P: IsA<Entry>,
2318 F: Fn(&P) + 'static,
2319 >(
2320 this: *mut ffi::GtkEntry,
2321 _param_spec: glib::ffi::gpointer,
2322 f: glib::ffi::gpointer,
2323 ) {
2324 let f: &F = &*(f as *const F);
2325 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2326 }
2327 unsafe {
2328 let f: Box_<F> = Box_::new(f);
2329 connect_raw(
2330 self.as_ptr() as *mut _,
2331 b"notify::overwrite-mode\0".as_ptr() as *const _,
2332 Some(transmute::<_, unsafe extern "C" fn()>(
2333 notify_overwrite_mode_trampoline::<Self, F> as *const (),
2334 )),
2335 Box_::into_raw(f),
2336 )
2337 }
2338 }
2339
2340 #[doc(alias = "placeholder-text")]
2341 fn connect_placeholder_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2342 unsafe extern "C" fn notify_placeholder_text_trampoline<
2343 P: IsA<Entry>,
2344 F: Fn(&P) + 'static,
2345 >(
2346 this: *mut ffi::GtkEntry,
2347 _param_spec: glib::ffi::gpointer,
2348 f: glib::ffi::gpointer,
2349 ) {
2350 let f: &F = &*(f as *const F);
2351 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2352 }
2353 unsafe {
2354 let f: Box_<F> = Box_::new(f);
2355 connect_raw(
2356 self.as_ptr() as *mut _,
2357 b"notify::placeholder-text\0".as_ptr() as *const _,
2358 Some(transmute::<_, unsafe extern "C" fn()>(
2359 notify_placeholder_text_trampoline::<Self, F> as *const (),
2360 )),
2361 Box_::into_raw(f),
2362 )
2363 }
2364 }
2365
2366 #[doc(alias = "populate-all")]
2367 fn connect_populate_all_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2368 unsafe extern "C" fn notify_populate_all_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
2369 this: *mut ffi::GtkEntry,
2370 _param_spec: glib::ffi::gpointer,
2371 f: glib::ffi::gpointer,
2372 ) {
2373 let f: &F = &*(f as *const F);
2374 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2375 }
2376 unsafe {
2377 let f: Box_<F> = Box_::new(f);
2378 connect_raw(
2379 self.as_ptr() as *mut _,
2380 b"notify::populate-all\0".as_ptr() as *const _,
2381 Some(transmute::<_, unsafe extern "C" fn()>(
2382 notify_populate_all_trampoline::<Self, F> as *const (),
2383 )),
2384 Box_::into_raw(f),
2385 )
2386 }
2387 }
2388
2389 #[doc(alias = "primary-icon-activatable")]
2390 fn connect_primary_icon_activatable_notify<F: Fn(&Self) + 'static>(
2391 &self,
2392 f: F,
2393 ) -> SignalHandlerId {
2394 unsafe extern "C" fn notify_primary_icon_activatable_trampoline<
2395 P: IsA<Entry>,
2396 F: Fn(&P) + 'static,
2397 >(
2398 this: *mut ffi::GtkEntry,
2399 _param_spec: glib::ffi::gpointer,
2400 f: glib::ffi::gpointer,
2401 ) {
2402 let f: &F = &*(f as *const F);
2403 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2404 }
2405 unsafe {
2406 let f: Box_<F> = Box_::new(f);
2407 connect_raw(
2408 self.as_ptr() as *mut _,
2409 b"notify::primary-icon-activatable\0".as_ptr() as *const _,
2410 Some(transmute::<_, unsafe extern "C" fn()>(
2411 notify_primary_icon_activatable_trampoline::<Self, F> as *const (),
2412 )),
2413 Box_::into_raw(f),
2414 )
2415 }
2416 }
2417
2418 #[doc(alias = "primary-icon-gicon")]
2419 fn connect_primary_icon_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2420 unsafe extern "C" fn notify_primary_icon_gicon_trampoline<
2421 P: IsA<Entry>,
2422 F: Fn(&P) + 'static,
2423 >(
2424 this: *mut ffi::GtkEntry,
2425 _param_spec: glib::ffi::gpointer,
2426 f: glib::ffi::gpointer,
2427 ) {
2428 let f: &F = &*(f as *const F);
2429 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2430 }
2431 unsafe {
2432 let f: Box_<F> = Box_::new(f);
2433 connect_raw(
2434 self.as_ptr() as *mut _,
2435 b"notify::primary-icon-gicon\0".as_ptr() as *const _,
2436 Some(transmute::<_, unsafe extern "C" fn()>(
2437 notify_primary_icon_gicon_trampoline::<Self, F> as *const (),
2438 )),
2439 Box_::into_raw(f),
2440 )
2441 }
2442 }
2443
2444 #[doc(alias = "primary-icon-name")]
2445 fn connect_primary_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2446 unsafe extern "C" fn notify_primary_icon_name_trampoline<
2447 P: IsA<Entry>,
2448 F: Fn(&P) + 'static,
2449 >(
2450 this: *mut ffi::GtkEntry,
2451 _param_spec: glib::ffi::gpointer,
2452 f: glib::ffi::gpointer,
2453 ) {
2454 let f: &F = &*(f as *const F);
2455 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2456 }
2457 unsafe {
2458 let f: Box_<F> = Box_::new(f);
2459 connect_raw(
2460 self.as_ptr() as *mut _,
2461 b"notify::primary-icon-name\0".as_ptr() as *const _,
2462 Some(transmute::<_, unsafe extern "C" fn()>(
2463 notify_primary_icon_name_trampoline::<Self, F> as *const (),
2464 )),
2465 Box_::into_raw(f),
2466 )
2467 }
2468 }
2469
2470 #[doc(alias = "primary-icon-pixbuf")]
2471 fn connect_primary_icon_pixbuf_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2472 unsafe extern "C" fn notify_primary_icon_pixbuf_trampoline<
2473 P: IsA<Entry>,
2474 F: Fn(&P) + 'static,
2475 >(
2476 this: *mut ffi::GtkEntry,
2477 _param_spec: glib::ffi::gpointer,
2478 f: glib::ffi::gpointer,
2479 ) {
2480 let f: &F = &*(f as *const F);
2481 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2482 }
2483 unsafe {
2484 let f: Box_<F> = Box_::new(f);
2485 connect_raw(
2486 self.as_ptr() as *mut _,
2487 b"notify::primary-icon-pixbuf\0".as_ptr() as *const _,
2488 Some(transmute::<_, unsafe extern "C" fn()>(
2489 notify_primary_icon_pixbuf_trampoline::<Self, F> as *const (),
2490 )),
2491 Box_::into_raw(f),
2492 )
2493 }
2494 }
2495
2496 #[doc(alias = "primary-icon-sensitive")]
2497 fn connect_primary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
2498 &self,
2499 f: F,
2500 ) -> SignalHandlerId {
2501 unsafe extern "C" fn notify_primary_icon_sensitive_trampoline<
2502 P: IsA<Entry>,
2503 F: Fn(&P) + 'static,
2504 >(
2505 this: *mut ffi::GtkEntry,
2506 _param_spec: glib::ffi::gpointer,
2507 f: glib::ffi::gpointer,
2508 ) {
2509 let f: &F = &*(f as *const F);
2510 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2511 }
2512 unsafe {
2513 let f: Box_<F> = Box_::new(f);
2514 connect_raw(
2515 self.as_ptr() as *mut _,
2516 b"notify::primary-icon-sensitive\0".as_ptr() as *const _,
2517 Some(transmute::<_, unsafe extern "C" fn()>(
2518 notify_primary_icon_sensitive_trampoline::<Self, F> as *const (),
2519 )),
2520 Box_::into_raw(f),
2521 )
2522 }
2523 }
2524
2525 #[doc(alias = "primary-icon-storage-type")]
2526 fn connect_primary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
2527 &self,
2528 f: F,
2529 ) -> SignalHandlerId {
2530 unsafe extern "C" fn notify_primary_icon_storage_type_trampoline<
2531 P: IsA<Entry>,
2532 F: Fn(&P) + 'static,
2533 >(
2534 this: *mut ffi::GtkEntry,
2535 _param_spec: glib::ffi::gpointer,
2536 f: glib::ffi::gpointer,
2537 ) {
2538 let f: &F = &*(f as *const F);
2539 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2540 }
2541 unsafe {
2542 let f: Box_<F> = Box_::new(f);
2543 connect_raw(
2544 self.as_ptr() as *mut _,
2545 b"notify::primary-icon-storage-type\0".as_ptr() as *const _,
2546 Some(transmute::<_, unsafe extern "C" fn()>(
2547 notify_primary_icon_storage_type_trampoline::<Self, F> as *const (),
2548 )),
2549 Box_::into_raw(f),
2550 )
2551 }
2552 }
2553
2554 #[doc(alias = "primary-icon-tooltip-markup")]
2555 fn connect_primary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
2556 &self,
2557 f: F,
2558 ) -> SignalHandlerId {
2559 unsafe extern "C" fn notify_primary_icon_tooltip_markup_trampoline<
2560 P: IsA<Entry>,
2561 F: Fn(&P) + 'static,
2562 >(
2563 this: *mut ffi::GtkEntry,
2564 _param_spec: glib::ffi::gpointer,
2565 f: glib::ffi::gpointer,
2566 ) {
2567 let f: &F = &*(f as *const F);
2568 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2569 }
2570 unsafe {
2571 let f: Box_<F> = Box_::new(f);
2572 connect_raw(
2573 self.as_ptr() as *mut _,
2574 b"notify::primary-icon-tooltip-markup\0".as_ptr() as *const _,
2575 Some(transmute::<_, unsafe extern "C" fn()>(
2576 notify_primary_icon_tooltip_markup_trampoline::<Self, F> as *const (),
2577 )),
2578 Box_::into_raw(f),
2579 )
2580 }
2581 }
2582
2583 #[doc(alias = "primary-icon-tooltip-text")]
2584 fn connect_primary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
2585 &self,
2586 f: F,
2587 ) -> SignalHandlerId {
2588 unsafe extern "C" fn notify_primary_icon_tooltip_text_trampoline<
2589 P: IsA<Entry>,
2590 F: Fn(&P) + 'static,
2591 >(
2592 this: *mut ffi::GtkEntry,
2593 _param_spec: glib::ffi::gpointer,
2594 f: glib::ffi::gpointer,
2595 ) {
2596 let f: &F = &*(f as *const F);
2597 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2598 }
2599 unsafe {
2600 let f: Box_<F> = Box_::new(f);
2601 connect_raw(
2602 self.as_ptr() as *mut _,
2603 b"notify::primary-icon-tooltip-text\0".as_ptr() as *const _,
2604 Some(transmute::<_, unsafe extern "C" fn()>(
2605 notify_primary_icon_tooltip_text_trampoline::<Self, F> as *const (),
2606 )),
2607 Box_::into_raw(f),
2608 )
2609 }
2610 }
2611
2612 #[doc(alias = "progress-fraction")]
2613 fn connect_progress_fraction_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2614 unsafe extern "C" fn notify_progress_fraction_trampoline<
2615 P: IsA<Entry>,
2616 F: Fn(&P) + 'static,
2617 >(
2618 this: *mut ffi::GtkEntry,
2619 _param_spec: glib::ffi::gpointer,
2620 f: glib::ffi::gpointer,
2621 ) {
2622 let f: &F = &*(f as *const F);
2623 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2624 }
2625 unsafe {
2626 let f: Box_<F> = Box_::new(f);
2627 connect_raw(
2628 self.as_ptr() as *mut _,
2629 b"notify::progress-fraction\0".as_ptr() as *const _,
2630 Some(transmute::<_, unsafe extern "C" fn()>(
2631 notify_progress_fraction_trampoline::<Self, F> as *const (),
2632 )),
2633 Box_::into_raw(f),
2634 )
2635 }
2636 }
2637
2638 #[doc(alias = "progress-pulse-step")]
2639 fn connect_progress_pulse_step_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2640 unsafe extern "C" fn notify_progress_pulse_step_trampoline<
2641 P: IsA<Entry>,
2642 F: Fn(&P) + 'static,
2643 >(
2644 this: *mut ffi::GtkEntry,
2645 _param_spec: glib::ffi::gpointer,
2646 f: glib::ffi::gpointer,
2647 ) {
2648 let f: &F = &*(f as *const F);
2649 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2650 }
2651 unsafe {
2652 let f: Box_<F> = Box_::new(f);
2653 connect_raw(
2654 self.as_ptr() as *mut _,
2655 b"notify::progress-pulse-step\0".as_ptr() as *const _,
2656 Some(transmute::<_, unsafe extern "C" fn()>(
2657 notify_progress_pulse_step_trampoline::<Self, F> as *const (),
2658 )),
2659 Box_::into_raw(f),
2660 )
2661 }
2662 }
2663
2664 #[doc(alias = "scroll-offset")]
2665 fn connect_scroll_offset_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2666 unsafe extern "C" fn notify_scroll_offset_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
2667 this: *mut ffi::GtkEntry,
2668 _param_spec: glib::ffi::gpointer,
2669 f: glib::ffi::gpointer,
2670 ) {
2671 let f: &F = &*(f as *const F);
2672 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2673 }
2674 unsafe {
2675 let f: Box_<F> = Box_::new(f);
2676 connect_raw(
2677 self.as_ptr() as *mut _,
2678 b"notify::scroll-offset\0".as_ptr() as *const _,
2679 Some(transmute::<_, unsafe extern "C" fn()>(
2680 notify_scroll_offset_trampoline::<Self, F> as *const (),
2681 )),
2682 Box_::into_raw(f),
2683 )
2684 }
2685 }
2686
2687 #[doc(alias = "secondary-icon-activatable")]
2688 fn connect_secondary_icon_activatable_notify<F: Fn(&Self) + 'static>(
2689 &self,
2690 f: F,
2691 ) -> SignalHandlerId {
2692 unsafe extern "C" fn notify_secondary_icon_activatable_trampoline<
2693 P: IsA<Entry>,
2694 F: Fn(&P) + 'static,
2695 >(
2696 this: *mut ffi::GtkEntry,
2697 _param_spec: glib::ffi::gpointer,
2698 f: glib::ffi::gpointer,
2699 ) {
2700 let f: &F = &*(f as *const F);
2701 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2702 }
2703 unsafe {
2704 let f: Box_<F> = Box_::new(f);
2705 connect_raw(
2706 self.as_ptr() as *mut _,
2707 b"notify::secondary-icon-activatable\0".as_ptr() as *const _,
2708 Some(transmute::<_, unsafe extern "C" fn()>(
2709 notify_secondary_icon_activatable_trampoline::<Self, F> as *const (),
2710 )),
2711 Box_::into_raw(f),
2712 )
2713 }
2714 }
2715
2716 #[doc(alias = "secondary-icon-gicon")]
2717 fn connect_secondary_icon_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2718 unsafe extern "C" fn notify_secondary_icon_gicon_trampoline<
2719 P: IsA<Entry>,
2720 F: Fn(&P) + 'static,
2721 >(
2722 this: *mut ffi::GtkEntry,
2723 _param_spec: glib::ffi::gpointer,
2724 f: glib::ffi::gpointer,
2725 ) {
2726 let f: &F = &*(f as *const F);
2727 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2728 }
2729 unsafe {
2730 let f: Box_<F> = Box_::new(f);
2731 connect_raw(
2732 self.as_ptr() as *mut _,
2733 b"notify::secondary-icon-gicon\0".as_ptr() as *const _,
2734 Some(transmute::<_, unsafe extern "C" fn()>(
2735 notify_secondary_icon_gicon_trampoline::<Self, F> as *const (),
2736 )),
2737 Box_::into_raw(f),
2738 )
2739 }
2740 }
2741
2742 #[doc(alias = "secondary-icon-name")]
2743 fn connect_secondary_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2744 unsafe extern "C" fn notify_secondary_icon_name_trampoline<
2745 P: IsA<Entry>,
2746 F: Fn(&P) + 'static,
2747 >(
2748 this: *mut ffi::GtkEntry,
2749 _param_spec: glib::ffi::gpointer,
2750 f: glib::ffi::gpointer,
2751 ) {
2752 let f: &F = &*(f as *const F);
2753 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2754 }
2755 unsafe {
2756 let f: Box_<F> = Box_::new(f);
2757 connect_raw(
2758 self.as_ptr() as *mut _,
2759 b"notify::secondary-icon-name\0".as_ptr() as *const _,
2760 Some(transmute::<_, unsafe extern "C" fn()>(
2761 notify_secondary_icon_name_trampoline::<Self, F> as *const (),
2762 )),
2763 Box_::into_raw(f),
2764 )
2765 }
2766 }
2767
2768 #[doc(alias = "secondary-icon-pixbuf")]
2769 fn connect_secondary_icon_pixbuf_notify<F: Fn(&Self) + 'static>(
2770 &self,
2771 f: F,
2772 ) -> SignalHandlerId {
2773 unsafe extern "C" fn notify_secondary_icon_pixbuf_trampoline<
2774 P: IsA<Entry>,
2775 F: Fn(&P) + 'static,
2776 >(
2777 this: *mut ffi::GtkEntry,
2778 _param_spec: glib::ffi::gpointer,
2779 f: glib::ffi::gpointer,
2780 ) {
2781 let f: &F = &*(f as *const F);
2782 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2783 }
2784 unsafe {
2785 let f: Box_<F> = Box_::new(f);
2786 connect_raw(
2787 self.as_ptr() as *mut _,
2788 b"notify::secondary-icon-pixbuf\0".as_ptr() as *const _,
2789 Some(transmute::<_, unsafe extern "C" fn()>(
2790 notify_secondary_icon_pixbuf_trampoline::<Self, F> as *const (),
2791 )),
2792 Box_::into_raw(f),
2793 )
2794 }
2795 }
2796
2797 #[doc(alias = "secondary-icon-sensitive")]
2798 fn connect_secondary_icon_sensitive_notify<F: Fn(&Self) + 'static>(
2799 &self,
2800 f: F,
2801 ) -> SignalHandlerId {
2802 unsafe extern "C" fn notify_secondary_icon_sensitive_trampoline<
2803 P: IsA<Entry>,
2804 F: Fn(&P) + 'static,
2805 >(
2806 this: *mut ffi::GtkEntry,
2807 _param_spec: glib::ffi::gpointer,
2808 f: glib::ffi::gpointer,
2809 ) {
2810 let f: &F = &*(f as *const F);
2811 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2812 }
2813 unsafe {
2814 let f: Box_<F> = Box_::new(f);
2815 connect_raw(
2816 self.as_ptr() as *mut _,
2817 b"notify::secondary-icon-sensitive\0".as_ptr() as *const _,
2818 Some(transmute::<_, unsafe extern "C" fn()>(
2819 notify_secondary_icon_sensitive_trampoline::<Self, F> as *const (),
2820 )),
2821 Box_::into_raw(f),
2822 )
2823 }
2824 }
2825
2826 #[doc(alias = "secondary-icon-storage-type")]
2827 fn connect_secondary_icon_storage_type_notify<F: Fn(&Self) + 'static>(
2828 &self,
2829 f: F,
2830 ) -> SignalHandlerId {
2831 unsafe extern "C" fn notify_secondary_icon_storage_type_trampoline<
2832 P: IsA<Entry>,
2833 F: Fn(&P) + 'static,
2834 >(
2835 this: *mut ffi::GtkEntry,
2836 _param_spec: glib::ffi::gpointer,
2837 f: glib::ffi::gpointer,
2838 ) {
2839 let f: &F = &*(f as *const F);
2840 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2841 }
2842 unsafe {
2843 let f: Box_<F> = Box_::new(f);
2844 connect_raw(
2845 self.as_ptr() as *mut _,
2846 b"notify::secondary-icon-storage-type\0".as_ptr() as *const _,
2847 Some(transmute::<_, unsafe extern "C" fn()>(
2848 notify_secondary_icon_storage_type_trampoline::<Self, F> as *const (),
2849 )),
2850 Box_::into_raw(f),
2851 )
2852 }
2853 }
2854
2855 #[doc(alias = "secondary-icon-tooltip-markup")]
2856 fn connect_secondary_icon_tooltip_markup_notify<F: Fn(&Self) + 'static>(
2857 &self,
2858 f: F,
2859 ) -> SignalHandlerId {
2860 unsafe extern "C" fn notify_secondary_icon_tooltip_markup_trampoline<
2861 P: IsA<Entry>,
2862 F: Fn(&P) + 'static,
2863 >(
2864 this: *mut ffi::GtkEntry,
2865 _param_spec: glib::ffi::gpointer,
2866 f: glib::ffi::gpointer,
2867 ) {
2868 let f: &F = &*(f as *const F);
2869 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2870 }
2871 unsafe {
2872 let f: Box_<F> = Box_::new(f);
2873 connect_raw(
2874 self.as_ptr() as *mut _,
2875 b"notify::secondary-icon-tooltip-markup\0".as_ptr() as *const _,
2876 Some(transmute::<_, unsafe extern "C" fn()>(
2877 notify_secondary_icon_tooltip_markup_trampoline::<Self, F> as *const (),
2878 )),
2879 Box_::into_raw(f),
2880 )
2881 }
2882 }
2883
2884 #[doc(alias = "secondary-icon-tooltip-text")]
2885 fn connect_secondary_icon_tooltip_text_notify<F: Fn(&Self) + 'static>(
2886 &self,
2887 f: F,
2888 ) -> SignalHandlerId {
2889 unsafe extern "C" fn notify_secondary_icon_tooltip_text_trampoline<
2890 P: IsA<Entry>,
2891 F: Fn(&P) + 'static,
2892 >(
2893 this: *mut ffi::GtkEntry,
2894 _param_spec: glib::ffi::gpointer,
2895 f: glib::ffi::gpointer,
2896 ) {
2897 let f: &F = &*(f as *const F);
2898 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2899 }
2900 unsafe {
2901 let f: Box_<F> = Box_::new(f);
2902 connect_raw(
2903 self.as_ptr() as *mut _,
2904 b"notify::secondary-icon-tooltip-text\0".as_ptr() as *const _,
2905 Some(transmute::<_, unsafe extern "C" fn()>(
2906 notify_secondary_icon_tooltip_text_trampoline::<Self, F> as *const (),
2907 )),
2908 Box_::into_raw(f),
2909 )
2910 }
2911 }
2912
2913 #[doc(alias = "selection-bound")]
2914 fn connect_selection_bound_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2915 unsafe extern "C" fn notify_selection_bound_trampoline<
2916 P: IsA<Entry>,
2917 F: Fn(&P) + 'static,
2918 >(
2919 this: *mut ffi::GtkEntry,
2920 _param_spec: glib::ffi::gpointer,
2921 f: glib::ffi::gpointer,
2922 ) {
2923 let f: &F = &*(f as *const F);
2924 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2925 }
2926 unsafe {
2927 let f: Box_<F> = Box_::new(f);
2928 connect_raw(
2929 self.as_ptr() as *mut _,
2930 b"notify::selection-bound\0".as_ptr() as *const _,
2931 Some(transmute::<_, unsafe extern "C" fn()>(
2932 notify_selection_bound_trampoline::<Self, F> as *const (),
2933 )),
2934 Box_::into_raw(f),
2935 )
2936 }
2937 }
2938
2939 #[doc(alias = "show-emoji-icon")]
2940 fn connect_show_emoji_icon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2941 unsafe extern "C" fn notify_show_emoji_icon_trampoline<
2942 P: IsA<Entry>,
2943 F: Fn(&P) + 'static,
2944 >(
2945 this: *mut ffi::GtkEntry,
2946 _param_spec: glib::ffi::gpointer,
2947 f: glib::ffi::gpointer,
2948 ) {
2949 let f: &F = &*(f as *const F);
2950 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2951 }
2952 unsafe {
2953 let f: Box_<F> = Box_::new(f);
2954 connect_raw(
2955 self.as_ptr() as *mut _,
2956 b"notify::show-emoji-icon\0".as_ptr() as *const _,
2957 Some(transmute::<_, unsafe extern "C" fn()>(
2958 notify_show_emoji_icon_trampoline::<Self, F> as *const (),
2959 )),
2960 Box_::into_raw(f),
2961 )
2962 }
2963 }
2964
2965 #[doc(alias = "tabs")]
2966 fn connect_tabs_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2967 unsafe extern "C" fn notify_tabs_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
2968 this: *mut ffi::GtkEntry,
2969 _param_spec: glib::ffi::gpointer,
2970 f: glib::ffi::gpointer,
2971 ) {
2972 let f: &F = &*(f as *const F);
2973 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2974 }
2975 unsafe {
2976 let f: Box_<F> = Box_::new(f);
2977 connect_raw(
2978 self.as_ptr() as *mut _,
2979 b"notify::tabs\0".as_ptr() as *const _,
2980 Some(transmute::<_, unsafe extern "C" fn()>(
2981 notify_tabs_trampoline::<Self, F> as *const (),
2982 )),
2983 Box_::into_raw(f),
2984 )
2985 }
2986 }
2987
2988 #[doc(alias = "text")]
2989 fn connect_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2990 unsafe extern "C" fn notify_text_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
2991 this: *mut ffi::GtkEntry,
2992 _param_spec: glib::ffi::gpointer,
2993 f: glib::ffi::gpointer,
2994 ) {
2995 let f: &F = &*(f as *const F);
2996 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
2997 }
2998 unsafe {
2999 let f: Box_<F> = Box_::new(f);
3000 connect_raw(
3001 self.as_ptr() as *mut _,
3002 b"notify::text\0".as_ptr() as *const _,
3003 Some(transmute::<_, unsafe extern "C" fn()>(
3004 notify_text_trampoline::<Self, F> as *const (),
3005 )),
3006 Box_::into_raw(f),
3007 )
3008 }
3009 }
3010
3011 #[doc(alias = "text-length")]
3012 fn connect_text_length_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3013 unsafe extern "C" fn notify_text_length_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3014 this: *mut ffi::GtkEntry,
3015 _param_spec: glib::ffi::gpointer,
3016 f: glib::ffi::gpointer,
3017 ) {
3018 let f: &F = &*(f as *const F);
3019 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3020 }
3021 unsafe {
3022 let f: Box_<F> = Box_::new(f);
3023 connect_raw(
3024 self.as_ptr() as *mut _,
3025 b"notify::text-length\0".as_ptr() as *const _,
3026 Some(transmute::<_, unsafe extern "C" fn()>(
3027 notify_text_length_trampoline::<Self, F> as *const (),
3028 )),
3029 Box_::into_raw(f),
3030 )
3031 }
3032 }
3033
3034 #[doc(alias = "truncate-multiline")]
3035 fn connect_truncate_multiline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3036 unsafe extern "C" fn notify_truncate_multiline_trampoline<
3037 P: IsA<Entry>,
3038 F: Fn(&P) + 'static,
3039 >(
3040 this: *mut ffi::GtkEntry,
3041 _param_spec: glib::ffi::gpointer,
3042 f: glib::ffi::gpointer,
3043 ) {
3044 let f: &F = &*(f as *const F);
3045 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3046 }
3047 unsafe {
3048 let f: Box_<F> = Box_::new(f);
3049 connect_raw(
3050 self.as_ptr() as *mut _,
3051 b"notify::truncate-multiline\0".as_ptr() as *const _,
3052 Some(transmute::<_, unsafe extern "C" fn()>(
3053 notify_truncate_multiline_trampoline::<Self, F> as *const (),
3054 )),
3055 Box_::into_raw(f),
3056 )
3057 }
3058 }
3059
3060 #[doc(alias = "visibility")]
3061 fn connect_visibility_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3062 unsafe extern "C" fn notify_visibility_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3063 this: *mut ffi::GtkEntry,
3064 _param_spec: glib::ffi::gpointer,
3065 f: glib::ffi::gpointer,
3066 ) {
3067 let f: &F = &*(f as *const F);
3068 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3069 }
3070 unsafe {
3071 let f: Box_<F> = Box_::new(f);
3072 connect_raw(
3073 self.as_ptr() as *mut _,
3074 b"notify::visibility\0".as_ptr() as *const _,
3075 Some(transmute::<_, unsafe extern "C" fn()>(
3076 notify_visibility_trampoline::<Self, F> as *const (),
3077 )),
3078 Box_::into_raw(f),
3079 )
3080 }
3081 }
3082
3083 #[doc(alias = "width-chars")]
3084 fn connect_width_chars_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3085 unsafe extern "C" fn notify_width_chars_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3086 this: *mut ffi::GtkEntry,
3087 _param_spec: glib::ffi::gpointer,
3088 f: glib::ffi::gpointer,
3089 ) {
3090 let f: &F = &*(f as *const F);
3091 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3092 }
3093 unsafe {
3094 let f: Box_<F> = Box_::new(f);
3095 connect_raw(
3096 self.as_ptr() as *mut _,
3097 b"notify::width-chars\0".as_ptr() as *const _,
3098 Some(transmute::<_, unsafe extern "C" fn()>(
3099 notify_width_chars_trampoline::<Self, F> as *const (),
3100 )),
3101 Box_::into_raw(f),
3102 )
3103 }
3104 }
3105
3106 #[doc(alias = "xalign")]
3107 fn connect_xalign_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
3108 unsafe extern "C" fn notify_xalign_trampoline<P: IsA<Entry>, F: Fn(&P) + 'static>(
3109 this: *mut ffi::GtkEntry,
3110 _param_spec: glib::ffi::gpointer,
3111 f: glib::ffi::gpointer,
3112 ) {
3113 let f: &F = &*(f as *const F);
3114 f(Entry::from_glib_borrow(this).unsafe_cast_ref())
3115 }
3116 unsafe {
3117 let f: Box_<F> = Box_::new(f);
3118 connect_raw(
3119 self.as_ptr() as *mut _,
3120 b"notify::xalign\0".as_ptr() as *const _,
3121 Some(transmute::<_, unsafe extern "C" fn()>(
3122 notify_xalign_trampoline::<Self, F> as *const (),
3123 )),
3124 Box_::into_raw(f),
3125 )
3126 }
3127 }
3128}
3129
3130impl<O: IsA<Entry>> EntryExt for O {}
3131
3132impl fmt::Display for Entry {
3133 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3134 f.write_str("Entry")
3135 }
3136}