1#![allow(deprecated)]
5
6use crate::{CellRenderer, CellRendererMode, TreePath, ffi};
7use glib::{
8 object::ObjectType as _,
9 prelude::*,
10 signal::{SignalHandlerId, connect_raw},
11 translate::*,
12};
13use std::boxed::Box as Box_;
14
15glib::wrapper! {
16 #[doc(alias = "GtkCellRendererText")]
374 pub struct CellRendererText(Object<ffi::GtkCellRendererText, ffi::GtkCellRendererTextClass>) @extends CellRenderer;
375
376 match fn {
377 type_ => || ffi::gtk_cell_renderer_text_get_type(),
378 }
379}
380
381impl CellRendererText {
382 pub const NONE: Option<&'static CellRendererText> = None;
383
384 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
395 #[allow(deprecated)]
396 #[doc(alias = "gtk_cell_renderer_text_new")]
397 pub fn new() -> CellRendererText {
398 assert_initialized_main_thread!();
399 unsafe { CellRenderer::from_glib_none(ffi::gtk_cell_renderer_text_new()).unsafe_cast() }
400 }
401
402 pub fn builder() -> CellRendererTextBuilder {
407 CellRendererTextBuilder::new()
408 }
409}
410
411impl Default for CellRendererText {
412 fn default() -> Self {
413 Self::new()
414 }
415}
416
417#[must_use = "The builder must be built to be used"]
422pub struct CellRendererTextBuilder {
423 builder: glib::object::ObjectBuilder<'static, CellRendererText>,
424}
425
426impl CellRendererTextBuilder {
427 fn new() -> Self {
428 Self {
429 builder: glib::object::Object::builder(),
430 }
431 }
432
433 pub fn align_set(self, align_set: bool) -> Self {
434 Self {
435 builder: self.builder.property("align-set", align_set),
436 }
437 }
438
439 pub fn alignment(self, alignment: pango::Alignment) -> Self {
445 Self {
446 builder: self.builder.property("alignment", alignment),
447 }
448 }
449
450 pub fn attributes(self, attributes: &pango::AttrList) -> Self {
451 Self {
452 builder: self.builder.property("attributes", attributes.clone()),
453 }
454 }
455
456 pub fn background(self, background: impl Into<glib::GString>) -> Self {
457 Self {
458 builder: self.builder.property("background", background.into()),
459 }
460 }
461
462 pub fn background_rgba(self, background_rgba: &gdk::RGBA) -> Self {
464 Self {
465 builder: self.builder.property("background-rgba", background_rgba),
466 }
467 }
468
469 pub fn background_set(self, background_set: bool) -> Self {
470 Self {
471 builder: self.builder.property("background-set", background_set),
472 }
473 }
474
475 pub fn editable(self, editable: bool) -> Self {
476 Self {
477 builder: self.builder.property("editable", editable),
478 }
479 }
480
481 pub fn editable_set(self, editable_set: bool) -> Self {
482 Self {
483 builder: self.builder.property("editable-set", editable_set),
484 }
485 }
486
487 pub fn ellipsize(self, ellipsize: pango::EllipsizeMode) -> Self {
492 Self {
493 builder: self.builder.property("ellipsize", ellipsize),
494 }
495 }
496
497 pub fn ellipsize_set(self, ellipsize_set: bool) -> Self {
498 Self {
499 builder: self.builder.property("ellipsize-set", ellipsize_set),
500 }
501 }
502
503 pub fn family(self, family: impl Into<glib::GString>) -> Self {
504 Self {
505 builder: self.builder.property("family", family.into()),
506 }
507 }
508
509 pub fn family_set(self, family_set: bool) -> Self {
510 Self {
511 builder: self.builder.property("family-set", family_set),
512 }
513 }
514
515 pub fn font(self, font: impl Into<glib::GString>) -> Self {
516 Self {
517 builder: self.builder.property("font", font.into()),
518 }
519 }
520
521 pub fn font_desc(self, font_desc: &pango::FontDescription) -> Self {
522 Self {
523 builder: self.builder.property("font-desc", font_desc),
524 }
525 }
526
527 pub fn foreground(self, foreground: impl Into<glib::GString>) -> Self {
528 Self {
529 builder: self.builder.property("foreground", foreground.into()),
530 }
531 }
532
533 pub fn foreground_rgba(self, foreground_rgba: &gdk::RGBA) -> Self {
535 Self {
536 builder: self.builder.property("foreground-rgba", foreground_rgba),
537 }
538 }
539
540 pub fn foreground_set(self, foreground_set: bool) -> Self {
541 Self {
542 builder: self.builder.property("foreground-set", foreground_set),
543 }
544 }
545
546 pub fn language(self, language: impl Into<glib::GString>) -> Self {
547 Self {
548 builder: self.builder.property("language", language.into()),
549 }
550 }
551
552 pub fn language_set(self, language_set: bool) -> Self {
553 Self {
554 builder: self.builder.property("language-set", language_set),
555 }
556 }
557
558 pub fn markup(self, markup: impl Into<glib::GString>) -> Self {
559 Self {
560 builder: self.builder.property("markup", markup.into()),
561 }
562 }
563
564 pub fn max_width_chars(self, max_width_chars: i32) -> Self {
573 Self {
574 builder: self.builder.property("max-width-chars", max_width_chars),
575 }
576 }
577
578 pub fn placeholder_text(self, placeholder_text: impl Into<glib::GString>) -> Self {
581 Self {
582 builder: self
583 .builder
584 .property("placeholder-text", placeholder_text.into()),
585 }
586 }
587
588 pub fn rise(self, rise: i32) -> Self {
589 Self {
590 builder: self.builder.property("rise", rise),
591 }
592 }
593
594 pub fn rise_set(self, rise_set: bool) -> Self {
595 Self {
596 builder: self.builder.property("rise-set", rise_set),
597 }
598 }
599
600 pub fn scale(self, scale: f64) -> Self {
601 Self {
602 builder: self.builder.property("scale", scale),
603 }
604 }
605
606 pub fn scale_set(self, scale_set: bool) -> Self {
607 Self {
608 builder: self.builder.property("scale-set", scale_set),
609 }
610 }
611
612 pub fn single_paragraph_mode(self, single_paragraph_mode: bool) -> Self {
613 Self {
614 builder: self
615 .builder
616 .property("single-paragraph-mode", single_paragraph_mode),
617 }
618 }
619
620 pub fn size(self, size: i32) -> Self {
621 Self {
622 builder: self.builder.property("size", size),
623 }
624 }
625
626 pub fn size_points(self, size_points: f64) -> Self {
627 Self {
628 builder: self.builder.property("size-points", size_points),
629 }
630 }
631
632 pub fn size_set(self, size_set: bool) -> Self {
633 Self {
634 builder: self.builder.property("size-set", size_set),
635 }
636 }
637
638 pub fn stretch(self, stretch: pango::Stretch) -> Self {
639 Self {
640 builder: self.builder.property("stretch", stretch),
641 }
642 }
643
644 pub fn stretch_set(self, stretch_set: bool) -> Self {
645 Self {
646 builder: self.builder.property("stretch-set", stretch_set),
647 }
648 }
649
650 pub fn strikethrough(self, strikethrough: bool) -> Self {
651 Self {
652 builder: self.builder.property("strikethrough", strikethrough),
653 }
654 }
655
656 pub fn strikethrough_set(self, strikethrough_set: bool) -> Self {
657 Self {
658 builder: self
659 .builder
660 .property("strikethrough-set", strikethrough_set),
661 }
662 }
663
664 pub fn style(self, style: pango::Style) -> Self {
665 Self {
666 builder: self.builder.property("style", style),
667 }
668 }
669
670 pub fn style_set(self, style_set: bool) -> Self {
671 Self {
672 builder: self.builder.property("style-set", style_set),
673 }
674 }
675
676 pub fn text(self, text: impl Into<glib::GString>) -> Self {
677 Self {
678 builder: self.builder.property("text", text.into()),
679 }
680 }
681
682 pub fn underline(self, underline: pango::Underline) -> Self {
683 Self {
684 builder: self.builder.property("underline", underline),
685 }
686 }
687
688 pub fn underline_set(self, underline_set: bool) -> Self {
689 Self {
690 builder: self.builder.property("underline-set", underline_set),
691 }
692 }
693
694 pub fn variant(self, variant: pango::Variant) -> Self {
695 Self {
696 builder: self.builder.property("variant", variant),
697 }
698 }
699
700 pub fn variant_set(self, variant_set: bool) -> Self {
701 Self {
702 builder: self.builder.property("variant-set", variant_set),
703 }
704 }
705
706 pub fn weight(self, weight: i32) -> Self {
707 Self {
708 builder: self.builder.property("weight", weight),
709 }
710 }
711
712 pub fn weight_set(self, weight_set: bool) -> Self {
713 Self {
714 builder: self.builder.property("weight-set", weight_set),
715 }
716 }
717
718 pub fn width_chars(self, width_chars: i32) -> Self {
722 Self {
723 builder: self.builder.property("width-chars", width_chars),
724 }
725 }
726
727 pub fn wrap_mode(self, wrap_mode: pango::WrapMode) -> Self {
731 Self {
732 builder: self.builder.property("wrap-mode", wrap_mode),
733 }
734 }
735
736 pub fn wrap_width(self, wrap_width: i32) -> Self {
740 Self {
741 builder: self.builder.property("wrap-width", wrap_width),
742 }
743 }
744
745 pub fn cell_background(self, cell_background: impl Into<glib::GString>) -> Self {
746 Self {
747 builder: self
748 .builder
749 .property("cell-background", cell_background.into()),
750 }
751 }
752
753 pub fn cell_background_rgba(self, cell_background_rgba: &gdk::RGBA) -> Self {
755 Self {
756 builder: self
757 .builder
758 .property("cell-background-rgba", cell_background_rgba),
759 }
760 }
761
762 pub fn cell_background_set(self, cell_background_set: bool) -> Self {
763 Self {
764 builder: self
765 .builder
766 .property("cell-background-set", cell_background_set),
767 }
768 }
769
770 pub fn height(self, height: i32) -> Self {
771 Self {
772 builder: self.builder.property("height", height),
773 }
774 }
775
776 pub fn is_expanded(self, is_expanded: bool) -> Self {
777 Self {
778 builder: self.builder.property("is-expanded", is_expanded),
779 }
780 }
781
782 pub fn is_expander(self, is_expander: bool) -> Self {
783 Self {
784 builder: self.builder.property("is-expander", is_expander),
785 }
786 }
787
788 pub fn mode(self, mode: CellRendererMode) -> Self {
789 Self {
790 builder: self.builder.property("mode", mode),
791 }
792 }
793
794 pub fn sensitive(self, sensitive: bool) -> Self {
795 Self {
796 builder: self.builder.property("sensitive", sensitive),
797 }
798 }
799
800 pub fn visible(self, visible: bool) -> Self {
801 Self {
802 builder: self.builder.property("visible", visible),
803 }
804 }
805
806 pub fn width(self, width: i32) -> Self {
807 Self {
808 builder: self.builder.property("width", width),
809 }
810 }
811
812 pub fn xalign(self, xalign: f32) -> Self {
813 Self {
814 builder: self.builder.property("xalign", xalign),
815 }
816 }
817
818 pub fn xpad(self, xpad: u32) -> Self {
819 Self {
820 builder: self.builder.property("xpad", xpad),
821 }
822 }
823
824 pub fn yalign(self, yalign: f32) -> Self {
825 Self {
826 builder: self.builder.property("yalign", yalign),
827 }
828 }
829
830 pub fn ypad(self, ypad: u32) -> Self {
831 Self {
832 builder: self.builder.property("ypad", ypad),
833 }
834 }
835
836 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
839 pub fn build(self) -> CellRendererText {
840 assert_initialized_main_thread!();
841 self.builder.build()
842 }
843}
844
845pub trait CellRendererTextExt: IsA<CellRendererText> + 'static {
851 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
863 #[allow(deprecated)]
864 #[doc(alias = "gtk_cell_renderer_text_set_fixed_height_from_font")]
865 fn set_fixed_height_from_font(&self, number_of_rows: i32) {
866 unsafe {
867 ffi::gtk_cell_renderer_text_set_fixed_height_from_font(
868 self.as_ref().to_glib_none().0,
869 number_of_rows,
870 );
871 }
872 }
873
874 #[doc(alias = "align-set")]
875 fn is_align_set(&self) -> bool {
876 ObjectExt::property(self.as_ref(), "align-set")
877 }
878
879 fn alignment(&self) -> pango::Alignment {
885 ObjectExt::property(self.as_ref(), "alignment")
886 }
887
888 fn set_alignment(&self, alignment: pango::Alignment) {
894 ObjectExt::set_property(self.as_ref(), "alignment", alignment)
895 }
896
897 fn attributes(&self) -> Option<pango::AttrList> {
898 ObjectExt::property(self.as_ref(), "attributes")
899 }
900
901 fn set_attributes(&self, attributes: Option<&pango::AttrList>) {
902 ObjectExt::set_property(self.as_ref(), "attributes", attributes)
903 }
904
905 fn set_background(&self, background: Option<&str>) {
906 ObjectExt::set_property(self.as_ref(), "background", background)
907 }
908
909 #[doc(alias = "background-rgba")]
911 fn background_rgba(&self) -> Option<gdk::RGBA> {
912 ObjectExt::property(self.as_ref(), "background-rgba")
913 }
914
915 #[doc(alias = "background-rgba")]
917 fn set_background_rgba(&self, background_rgba: Option<&gdk::RGBA>) {
918 ObjectExt::set_property(self.as_ref(), "background-rgba", background_rgba)
919 }
920
921 #[doc(alias = "background-set")]
922 fn is_background_set(&self) -> bool {
923 ObjectExt::property(self.as_ref(), "background-set")
924 }
925
926 fn is_editable(&self) -> bool {
927 ObjectExt::property(self.as_ref(), "editable")
928 }
929
930 fn set_editable(&self, editable: bool) {
931 ObjectExt::set_property(self.as_ref(), "editable", editable)
932 }
933
934 #[doc(alias = "editable-set")]
935 fn is_editable_set(&self) -> bool {
936 ObjectExt::property(self.as_ref(), "editable-set")
937 }
938
939 fn ellipsize(&self) -> pango::EllipsizeMode {
944 ObjectExt::property(self.as_ref(), "ellipsize")
945 }
946
947 fn set_ellipsize(&self, ellipsize: pango::EllipsizeMode) {
952 ObjectExt::set_property(self.as_ref(), "ellipsize", ellipsize)
953 }
954
955 #[doc(alias = "ellipsize-set")]
956 fn is_ellipsize_set(&self) -> bool {
957 ObjectExt::property(self.as_ref(), "ellipsize-set")
958 }
959
960 fn family(&self) -> Option<glib::GString> {
961 ObjectExt::property(self.as_ref(), "family")
962 }
963
964 fn set_family(&self, family: Option<&str>) {
965 ObjectExt::set_property(self.as_ref(), "family", family)
966 }
967
968 #[doc(alias = "family-set")]
969 fn is_family_set(&self) -> bool {
970 ObjectExt::property(self.as_ref(), "family-set")
971 }
972
973 fn font(&self) -> Option<glib::GString> {
974 ObjectExt::property(self.as_ref(), "font")
975 }
976
977 fn set_font(&self, font: Option<&str>) {
978 ObjectExt::set_property(self.as_ref(), "font", font)
979 }
980
981 #[doc(alias = "font-desc")]
982 fn font_desc(&self) -> Option<pango::FontDescription> {
983 ObjectExt::property(self.as_ref(), "font-desc")
984 }
985
986 #[doc(alias = "font-desc")]
987 fn set_font_desc(&self, font_desc: Option<&pango::FontDescription>) {
988 ObjectExt::set_property(self.as_ref(), "font-desc", font_desc)
989 }
990
991 fn set_foreground(&self, foreground: Option<&str>) {
992 ObjectExt::set_property(self.as_ref(), "foreground", foreground)
993 }
994
995 #[doc(alias = "foreground-rgba")]
997 fn foreground_rgba(&self) -> Option<gdk::RGBA> {
998 ObjectExt::property(self.as_ref(), "foreground-rgba")
999 }
1000
1001 #[doc(alias = "foreground-rgba")]
1003 fn set_foreground_rgba(&self, foreground_rgba: Option<&gdk::RGBA>) {
1004 ObjectExt::set_property(self.as_ref(), "foreground-rgba", foreground_rgba)
1005 }
1006
1007 #[doc(alias = "foreground-set")]
1008 fn is_foreground_set(&self) -> bool {
1009 ObjectExt::property(self.as_ref(), "foreground-set")
1010 }
1011
1012 fn language(&self) -> Option<glib::GString> {
1013 ObjectExt::property(self.as_ref(), "language")
1014 }
1015
1016 fn set_language(&self, language: Option<&str>) {
1017 ObjectExt::set_property(self.as_ref(), "language", language)
1018 }
1019
1020 #[doc(alias = "language-set")]
1021 fn is_language_set(&self) -> bool {
1022 ObjectExt::property(self.as_ref(), "language-set")
1023 }
1024
1025 fn set_markup(&self, markup: Option<&str>) {
1026 ObjectExt::set_property(self.as_ref(), "markup", markup)
1027 }
1028
1029 #[doc(alias = "max-width-chars")]
1038 fn max_width_chars(&self) -> i32 {
1039 ObjectExt::property(self.as_ref(), "max-width-chars")
1040 }
1041
1042 #[doc(alias = "max-width-chars")]
1051 fn set_max_width_chars(&self, max_width_chars: i32) {
1052 ObjectExt::set_property(self.as_ref(), "max-width-chars", max_width_chars)
1053 }
1054
1055 #[doc(alias = "placeholder-text")]
1058 fn placeholder_text(&self) -> Option<glib::GString> {
1059 ObjectExt::property(self.as_ref(), "placeholder-text")
1060 }
1061
1062 #[doc(alias = "placeholder-text")]
1065 fn set_placeholder_text(&self, placeholder_text: Option<&str>) {
1066 ObjectExt::set_property(self.as_ref(), "placeholder-text", placeholder_text)
1067 }
1068
1069 fn rise(&self) -> i32 {
1070 ObjectExt::property(self.as_ref(), "rise")
1071 }
1072
1073 fn set_rise(&self, rise: i32) {
1074 ObjectExt::set_property(self.as_ref(), "rise", rise)
1075 }
1076
1077 #[doc(alias = "rise-set")]
1078 fn is_rise_set(&self) -> bool {
1079 ObjectExt::property(self.as_ref(), "rise-set")
1080 }
1081
1082 fn scale(&self) -> f64 {
1083 ObjectExt::property(self.as_ref(), "scale")
1084 }
1085
1086 fn set_scale(&self, scale: f64) {
1087 ObjectExt::set_property(self.as_ref(), "scale", scale)
1088 }
1089
1090 #[doc(alias = "scale-set")]
1091 fn is_scale_set(&self) -> bool {
1092 ObjectExt::property(self.as_ref(), "scale-set")
1093 }
1094
1095 #[doc(alias = "single-paragraph-mode")]
1096 fn is_single_paragraph_mode(&self) -> bool {
1097 ObjectExt::property(self.as_ref(), "single-paragraph-mode")
1098 }
1099
1100 #[doc(alias = "single-paragraph-mode")]
1101 fn set_single_paragraph_mode(&self, single_paragraph_mode: bool) {
1102 ObjectExt::set_property(
1103 self.as_ref(),
1104 "single-paragraph-mode",
1105 single_paragraph_mode,
1106 )
1107 }
1108
1109 fn size(&self) -> i32 {
1110 ObjectExt::property(self.as_ref(), "size")
1111 }
1112
1113 fn set_size(&self, size: i32) {
1114 ObjectExt::set_property(self.as_ref(), "size", size)
1115 }
1116
1117 #[doc(alias = "size-points")]
1118 fn size_points(&self) -> f64 {
1119 ObjectExt::property(self.as_ref(), "size-points")
1120 }
1121
1122 #[doc(alias = "size-points")]
1123 fn set_size_points(&self, size_points: f64) {
1124 ObjectExt::set_property(self.as_ref(), "size-points", size_points)
1125 }
1126
1127 #[doc(alias = "size-set")]
1128 fn is_size_set(&self) -> bool {
1129 ObjectExt::property(self.as_ref(), "size-set")
1130 }
1131
1132 fn stretch(&self) -> pango::Stretch {
1133 ObjectExt::property(self.as_ref(), "stretch")
1134 }
1135
1136 fn set_stretch(&self, stretch: pango::Stretch) {
1137 ObjectExt::set_property(self.as_ref(), "stretch", stretch)
1138 }
1139
1140 #[doc(alias = "stretch-set")]
1141 fn is_stretch_set(&self) -> bool {
1142 ObjectExt::property(self.as_ref(), "stretch-set")
1143 }
1144
1145 fn is_strikethrough(&self) -> bool {
1146 ObjectExt::property(self.as_ref(), "strikethrough")
1147 }
1148
1149 fn set_strikethrough(&self, strikethrough: bool) {
1150 ObjectExt::set_property(self.as_ref(), "strikethrough", strikethrough)
1151 }
1152
1153 #[doc(alias = "strikethrough-set")]
1154 fn is_strikethrough_set(&self) -> bool {
1155 ObjectExt::property(self.as_ref(), "strikethrough-set")
1156 }
1157
1158 fn style(&self) -> pango::Style {
1159 ObjectExt::property(self.as_ref(), "style")
1160 }
1161
1162 fn set_style(&self, style: pango::Style) {
1163 ObjectExt::set_property(self.as_ref(), "style", style)
1164 }
1165
1166 #[doc(alias = "style-set")]
1167 fn is_style_set(&self) -> bool {
1168 ObjectExt::property(self.as_ref(), "style-set")
1169 }
1170
1171 fn text(&self) -> Option<glib::GString> {
1172 ObjectExt::property(self.as_ref(), "text")
1173 }
1174
1175 fn set_text(&self, text: Option<&str>) {
1176 ObjectExt::set_property(self.as_ref(), "text", text)
1177 }
1178
1179 fn underline(&self) -> pango::Underline {
1180 ObjectExt::property(self.as_ref(), "underline")
1181 }
1182
1183 fn set_underline(&self, underline: pango::Underline) {
1184 ObjectExt::set_property(self.as_ref(), "underline", underline)
1185 }
1186
1187 #[doc(alias = "underline-set")]
1188 fn is_underline_set(&self) -> bool {
1189 ObjectExt::property(self.as_ref(), "underline-set")
1190 }
1191
1192 fn variant(&self) -> pango::Variant {
1193 ObjectExt::property(self.as_ref(), "variant")
1194 }
1195
1196 fn set_variant(&self, variant: pango::Variant) {
1197 ObjectExt::set_property(self.as_ref(), "variant", variant)
1198 }
1199
1200 #[doc(alias = "variant-set")]
1201 fn is_variant_set(&self) -> bool {
1202 ObjectExt::property(self.as_ref(), "variant-set")
1203 }
1204
1205 fn weight(&self) -> i32 {
1206 ObjectExt::property(self.as_ref(), "weight")
1207 }
1208
1209 fn set_weight(&self, weight: i32) {
1210 ObjectExt::set_property(self.as_ref(), "weight", weight)
1211 }
1212
1213 #[doc(alias = "weight-set")]
1214 fn is_weight_set(&self) -> bool {
1215 ObjectExt::property(self.as_ref(), "weight-set")
1216 }
1217
1218 #[doc(alias = "width-chars")]
1222 fn width_chars(&self) -> i32 {
1223 ObjectExt::property(self.as_ref(), "width-chars")
1224 }
1225
1226 #[doc(alias = "width-chars")]
1230 fn set_width_chars(&self, width_chars: i32) {
1231 ObjectExt::set_property(self.as_ref(), "width-chars", width_chars)
1232 }
1233
1234 #[doc(alias = "wrap-mode")]
1238 fn wrap_mode(&self) -> pango::WrapMode {
1239 ObjectExt::property(self.as_ref(), "wrap-mode")
1240 }
1241
1242 #[doc(alias = "wrap-mode")]
1246 fn set_wrap_mode(&self, wrap_mode: pango::WrapMode) {
1247 ObjectExt::set_property(self.as_ref(), "wrap-mode", wrap_mode)
1248 }
1249
1250 #[doc(alias = "wrap-width")]
1254 fn wrap_width(&self) -> i32 {
1255 ObjectExt::property(self.as_ref(), "wrap-width")
1256 }
1257
1258 #[doc(alias = "wrap-width")]
1262 fn set_wrap_width(&self, wrap_width: i32) {
1263 ObjectExt::set_property(self.as_ref(), "wrap-width", wrap_width)
1264 }
1265
1266 #[doc(alias = "edited")]
1275 fn connect_edited<F: Fn(&Self, TreePath, &str) + 'static>(&self, f: F) -> SignalHandlerId {
1276 unsafe extern "C" fn edited_trampoline<
1277 P: IsA<CellRendererText>,
1278 F: Fn(&P, TreePath, &str) + 'static,
1279 >(
1280 this: *mut ffi::GtkCellRendererText,
1281 path: *mut std::ffi::c_char,
1282 new_text: *mut std::ffi::c_char,
1283 f: glib::ffi::gpointer,
1284 ) {
1285 unsafe {
1286 let f: &F = &*(f as *const F);
1287 let path = from_glib_full(crate::ffi::gtk_tree_path_new_from_string(path));
1288 f(
1289 CellRendererText::from_glib_borrow(this).unsafe_cast_ref(),
1290 path,
1291 &glib::GString::from_glib_borrow(new_text),
1292 )
1293 }
1294 }
1295 unsafe {
1296 let f: Box_<F> = Box_::new(f);
1297 connect_raw(
1298 self.as_ptr() as *mut _,
1299 c"edited".as_ptr(),
1300 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1301 edited_trampoline::<Self, F> as *const (),
1302 )),
1303 Box_::into_raw(f),
1304 )
1305 }
1306 }
1307
1308 #[doc(alias = "align-set")]
1309 fn connect_align_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1310 unsafe extern "C" fn notify_align_set_trampoline<
1311 P: IsA<CellRendererText>,
1312 F: Fn(&P) + 'static,
1313 >(
1314 this: *mut ffi::GtkCellRendererText,
1315 _param_spec: glib::ffi::gpointer,
1316 f: glib::ffi::gpointer,
1317 ) {
1318 unsafe {
1319 let f: &F = &*(f as *const F);
1320 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1321 }
1322 }
1323 unsafe {
1324 let f: Box_<F> = Box_::new(f);
1325 connect_raw(
1326 self.as_ptr() as *mut _,
1327 c"notify::align-set".as_ptr(),
1328 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1329 notify_align_set_trampoline::<Self, F> as *const (),
1330 )),
1331 Box_::into_raw(f),
1332 )
1333 }
1334 }
1335
1336 #[doc(alias = "alignment")]
1337 fn connect_alignment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1338 unsafe extern "C" fn notify_alignment_trampoline<
1339 P: IsA<CellRendererText>,
1340 F: Fn(&P) + 'static,
1341 >(
1342 this: *mut ffi::GtkCellRendererText,
1343 _param_spec: glib::ffi::gpointer,
1344 f: glib::ffi::gpointer,
1345 ) {
1346 unsafe {
1347 let f: &F = &*(f as *const F);
1348 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1349 }
1350 }
1351 unsafe {
1352 let f: Box_<F> = Box_::new(f);
1353 connect_raw(
1354 self.as_ptr() as *mut _,
1355 c"notify::alignment".as_ptr(),
1356 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1357 notify_alignment_trampoline::<Self, F> as *const (),
1358 )),
1359 Box_::into_raw(f),
1360 )
1361 }
1362 }
1363
1364 #[doc(alias = "attributes")]
1365 fn connect_attributes_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1366 unsafe extern "C" fn notify_attributes_trampoline<
1367 P: IsA<CellRendererText>,
1368 F: Fn(&P) + 'static,
1369 >(
1370 this: *mut ffi::GtkCellRendererText,
1371 _param_spec: glib::ffi::gpointer,
1372 f: glib::ffi::gpointer,
1373 ) {
1374 unsafe {
1375 let f: &F = &*(f as *const F);
1376 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1377 }
1378 }
1379 unsafe {
1380 let f: Box_<F> = Box_::new(f);
1381 connect_raw(
1382 self.as_ptr() as *mut _,
1383 c"notify::attributes".as_ptr(),
1384 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1385 notify_attributes_trampoline::<Self, F> as *const (),
1386 )),
1387 Box_::into_raw(f),
1388 )
1389 }
1390 }
1391
1392 #[doc(alias = "background")]
1393 fn connect_background_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1394 unsafe extern "C" fn notify_background_trampoline<
1395 P: IsA<CellRendererText>,
1396 F: Fn(&P) + 'static,
1397 >(
1398 this: *mut ffi::GtkCellRendererText,
1399 _param_spec: glib::ffi::gpointer,
1400 f: glib::ffi::gpointer,
1401 ) {
1402 unsafe {
1403 let f: &F = &*(f as *const F);
1404 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1405 }
1406 }
1407 unsafe {
1408 let f: Box_<F> = Box_::new(f);
1409 connect_raw(
1410 self.as_ptr() as *mut _,
1411 c"notify::background".as_ptr(),
1412 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1413 notify_background_trampoline::<Self, F> as *const (),
1414 )),
1415 Box_::into_raw(f),
1416 )
1417 }
1418 }
1419
1420 #[doc(alias = "background-rgba")]
1421 fn connect_background_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1422 unsafe extern "C" fn notify_background_rgba_trampoline<
1423 P: IsA<CellRendererText>,
1424 F: Fn(&P) + 'static,
1425 >(
1426 this: *mut ffi::GtkCellRendererText,
1427 _param_spec: glib::ffi::gpointer,
1428 f: glib::ffi::gpointer,
1429 ) {
1430 unsafe {
1431 let f: &F = &*(f as *const F);
1432 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1433 }
1434 }
1435 unsafe {
1436 let f: Box_<F> = Box_::new(f);
1437 connect_raw(
1438 self.as_ptr() as *mut _,
1439 c"notify::background-rgba".as_ptr(),
1440 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1441 notify_background_rgba_trampoline::<Self, F> as *const (),
1442 )),
1443 Box_::into_raw(f),
1444 )
1445 }
1446 }
1447
1448 #[doc(alias = "background-set")]
1449 fn connect_background_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1450 unsafe extern "C" fn notify_background_set_trampoline<
1451 P: IsA<CellRendererText>,
1452 F: Fn(&P) + 'static,
1453 >(
1454 this: *mut ffi::GtkCellRendererText,
1455 _param_spec: glib::ffi::gpointer,
1456 f: glib::ffi::gpointer,
1457 ) {
1458 unsafe {
1459 let f: &F = &*(f as *const F);
1460 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1461 }
1462 }
1463 unsafe {
1464 let f: Box_<F> = Box_::new(f);
1465 connect_raw(
1466 self.as_ptr() as *mut _,
1467 c"notify::background-set".as_ptr(),
1468 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1469 notify_background_set_trampoline::<Self, F> as *const (),
1470 )),
1471 Box_::into_raw(f),
1472 )
1473 }
1474 }
1475
1476 #[doc(alias = "editable")]
1477 fn connect_editable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1478 unsafe extern "C" fn notify_editable_trampoline<
1479 P: IsA<CellRendererText>,
1480 F: Fn(&P) + 'static,
1481 >(
1482 this: *mut ffi::GtkCellRendererText,
1483 _param_spec: glib::ffi::gpointer,
1484 f: glib::ffi::gpointer,
1485 ) {
1486 unsafe {
1487 let f: &F = &*(f as *const F);
1488 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1489 }
1490 }
1491 unsafe {
1492 let f: Box_<F> = Box_::new(f);
1493 connect_raw(
1494 self.as_ptr() as *mut _,
1495 c"notify::editable".as_ptr(),
1496 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1497 notify_editable_trampoline::<Self, F> as *const (),
1498 )),
1499 Box_::into_raw(f),
1500 )
1501 }
1502 }
1503
1504 #[doc(alias = "editable-set")]
1505 fn connect_editable_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1506 unsafe extern "C" fn notify_editable_set_trampoline<
1507 P: IsA<CellRendererText>,
1508 F: Fn(&P) + 'static,
1509 >(
1510 this: *mut ffi::GtkCellRendererText,
1511 _param_spec: glib::ffi::gpointer,
1512 f: glib::ffi::gpointer,
1513 ) {
1514 unsafe {
1515 let f: &F = &*(f as *const F);
1516 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1517 }
1518 }
1519 unsafe {
1520 let f: Box_<F> = Box_::new(f);
1521 connect_raw(
1522 self.as_ptr() as *mut _,
1523 c"notify::editable-set".as_ptr(),
1524 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1525 notify_editable_set_trampoline::<Self, F> as *const (),
1526 )),
1527 Box_::into_raw(f),
1528 )
1529 }
1530 }
1531
1532 #[doc(alias = "ellipsize")]
1533 fn connect_ellipsize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1534 unsafe extern "C" fn notify_ellipsize_trampoline<
1535 P: IsA<CellRendererText>,
1536 F: Fn(&P) + 'static,
1537 >(
1538 this: *mut ffi::GtkCellRendererText,
1539 _param_spec: glib::ffi::gpointer,
1540 f: glib::ffi::gpointer,
1541 ) {
1542 unsafe {
1543 let f: &F = &*(f as *const F);
1544 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1545 }
1546 }
1547 unsafe {
1548 let f: Box_<F> = Box_::new(f);
1549 connect_raw(
1550 self.as_ptr() as *mut _,
1551 c"notify::ellipsize".as_ptr(),
1552 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1553 notify_ellipsize_trampoline::<Self, F> as *const (),
1554 )),
1555 Box_::into_raw(f),
1556 )
1557 }
1558 }
1559
1560 #[doc(alias = "ellipsize-set")]
1561 fn connect_ellipsize_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1562 unsafe extern "C" fn notify_ellipsize_set_trampoline<
1563 P: IsA<CellRendererText>,
1564 F: Fn(&P) + 'static,
1565 >(
1566 this: *mut ffi::GtkCellRendererText,
1567 _param_spec: glib::ffi::gpointer,
1568 f: glib::ffi::gpointer,
1569 ) {
1570 unsafe {
1571 let f: &F = &*(f as *const F);
1572 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1573 }
1574 }
1575 unsafe {
1576 let f: Box_<F> = Box_::new(f);
1577 connect_raw(
1578 self.as_ptr() as *mut _,
1579 c"notify::ellipsize-set".as_ptr(),
1580 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1581 notify_ellipsize_set_trampoline::<Self, F> as *const (),
1582 )),
1583 Box_::into_raw(f),
1584 )
1585 }
1586 }
1587
1588 #[doc(alias = "family")]
1589 fn connect_family_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1590 unsafe extern "C" fn notify_family_trampoline<
1591 P: IsA<CellRendererText>,
1592 F: Fn(&P) + 'static,
1593 >(
1594 this: *mut ffi::GtkCellRendererText,
1595 _param_spec: glib::ffi::gpointer,
1596 f: glib::ffi::gpointer,
1597 ) {
1598 unsafe {
1599 let f: &F = &*(f as *const F);
1600 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1601 }
1602 }
1603 unsafe {
1604 let f: Box_<F> = Box_::new(f);
1605 connect_raw(
1606 self.as_ptr() as *mut _,
1607 c"notify::family".as_ptr(),
1608 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1609 notify_family_trampoline::<Self, F> as *const (),
1610 )),
1611 Box_::into_raw(f),
1612 )
1613 }
1614 }
1615
1616 #[doc(alias = "family-set")]
1617 fn connect_family_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1618 unsafe extern "C" fn notify_family_set_trampoline<
1619 P: IsA<CellRendererText>,
1620 F: Fn(&P) + 'static,
1621 >(
1622 this: *mut ffi::GtkCellRendererText,
1623 _param_spec: glib::ffi::gpointer,
1624 f: glib::ffi::gpointer,
1625 ) {
1626 unsafe {
1627 let f: &F = &*(f as *const F);
1628 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1629 }
1630 }
1631 unsafe {
1632 let f: Box_<F> = Box_::new(f);
1633 connect_raw(
1634 self.as_ptr() as *mut _,
1635 c"notify::family-set".as_ptr(),
1636 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1637 notify_family_set_trampoline::<Self, F> as *const (),
1638 )),
1639 Box_::into_raw(f),
1640 )
1641 }
1642 }
1643
1644 #[doc(alias = "font")]
1645 fn connect_font_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1646 unsafe extern "C" fn notify_font_trampoline<
1647 P: IsA<CellRendererText>,
1648 F: Fn(&P) + 'static,
1649 >(
1650 this: *mut ffi::GtkCellRendererText,
1651 _param_spec: glib::ffi::gpointer,
1652 f: glib::ffi::gpointer,
1653 ) {
1654 unsafe {
1655 let f: &F = &*(f as *const F);
1656 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1657 }
1658 }
1659 unsafe {
1660 let f: Box_<F> = Box_::new(f);
1661 connect_raw(
1662 self.as_ptr() as *mut _,
1663 c"notify::font".as_ptr(),
1664 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1665 notify_font_trampoline::<Self, F> as *const (),
1666 )),
1667 Box_::into_raw(f),
1668 )
1669 }
1670 }
1671
1672 #[doc(alias = "font-desc")]
1673 fn connect_font_desc_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1674 unsafe extern "C" fn notify_font_desc_trampoline<
1675 P: IsA<CellRendererText>,
1676 F: Fn(&P) + 'static,
1677 >(
1678 this: *mut ffi::GtkCellRendererText,
1679 _param_spec: glib::ffi::gpointer,
1680 f: glib::ffi::gpointer,
1681 ) {
1682 unsafe {
1683 let f: &F = &*(f as *const F);
1684 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1685 }
1686 }
1687 unsafe {
1688 let f: Box_<F> = Box_::new(f);
1689 connect_raw(
1690 self.as_ptr() as *mut _,
1691 c"notify::font-desc".as_ptr(),
1692 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1693 notify_font_desc_trampoline::<Self, F> as *const (),
1694 )),
1695 Box_::into_raw(f),
1696 )
1697 }
1698 }
1699
1700 #[doc(alias = "foreground")]
1701 fn connect_foreground_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1702 unsafe extern "C" fn notify_foreground_trampoline<
1703 P: IsA<CellRendererText>,
1704 F: Fn(&P) + 'static,
1705 >(
1706 this: *mut ffi::GtkCellRendererText,
1707 _param_spec: glib::ffi::gpointer,
1708 f: glib::ffi::gpointer,
1709 ) {
1710 unsafe {
1711 let f: &F = &*(f as *const F);
1712 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1713 }
1714 }
1715 unsafe {
1716 let f: Box_<F> = Box_::new(f);
1717 connect_raw(
1718 self.as_ptr() as *mut _,
1719 c"notify::foreground".as_ptr(),
1720 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1721 notify_foreground_trampoline::<Self, F> as *const (),
1722 )),
1723 Box_::into_raw(f),
1724 )
1725 }
1726 }
1727
1728 #[doc(alias = "foreground-rgba")]
1729 fn connect_foreground_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1730 unsafe extern "C" fn notify_foreground_rgba_trampoline<
1731 P: IsA<CellRendererText>,
1732 F: Fn(&P) + 'static,
1733 >(
1734 this: *mut ffi::GtkCellRendererText,
1735 _param_spec: glib::ffi::gpointer,
1736 f: glib::ffi::gpointer,
1737 ) {
1738 unsafe {
1739 let f: &F = &*(f as *const F);
1740 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1741 }
1742 }
1743 unsafe {
1744 let f: Box_<F> = Box_::new(f);
1745 connect_raw(
1746 self.as_ptr() as *mut _,
1747 c"notify::foreground-rgba".as_ptr(),
1748 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1749 notify_foreground_rgba_trampoline::<Self, F> as *const (),
1750 )),
1751 Box_::into_raw(f),
1752 )
1753 }
1754 }
1755
1756 #[doc(alias = "foreground-set")]
1757 fn connect_foreground_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1758 unsafe extern "C" fn notify_foreground_set_trampoline<
1759 P: IsA<CellRendererText>,
1760 F: Fn(&P) + 'static,
1761 >(
1762 this: *mut ffi::GtkCellRendererText,
1763 _param_spec: glib::ffi::gpointer,
1764 f: glib::ffi::gpointer,
1765 ) {
1766 unsafe {
1767 let f: &F = &*(f as *const F);
1768 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1769 }
1770 }
1771 unsafe {
1772 let f: Box_<F> = Box_::new(f);
1773 connect_raw(
1774 self.as_ptr() as *mut _,
1775 c"notify::foreground-set".as_ptr(),
1776 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1777 notify_foreground_set_trampoline::<Self, F> as *const (),
1778 )),
1779 Box_::into_raw(f),
1780 )
1781 }
1782 }
1783
1784 #[doc(alias = "language")]
1785 fn connect_language_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1786 unsafe extern "C" fn notify_language_trampoline<
1787 P: IsA<CellRendererText>,
1788 F: Fn(&P) + 'static,
1789 >(
1790 this: *mut ffi::GtkCellRendererText,
1791 _param_spec: glib::ffi::gpointer,
1792 f: glib::ffi::gpointer,
1793 ) {
1794 unsafe {
1795 let f: &F = &*(f as *const F);
1796 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1797 }
1798 }
1799 unsafe {
1800 let f: Box_<F> = Box_::new(f);
1801 connect_raw(
1802 self.as_ptr() as *mut _,
1803 c"notify::language".as_ptr(),
1804 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1805 notify_language_trampoline::<Self, F> as *const (),
1806 )),
1807 Box_::into_raw(f),
1808 )
1809 }
1810 }
1811
1812 #[doc(alias = "language-set")]
1813 fn connect_language_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1814 unsafe extern "C" fn notify_language_set_trampoline<
1815 P: IsA<CellRendererText>,
1816 F: Fn(&P) + 'static,
1817 >(
1818 this: *mut ffi::GtkCellRendererText,
1819 _param_spec: glib::ffi::gpointer,
1820 f: glib::ffi::gpointer,
1821 ) {
1822 unsafe {
1823 let f: &F = &*(f as *const F);
1824 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1825 }
1826 }
1827 unsafe {
1828 let f: Box_<F> = Box_::new(f);
1829 connect_raw(
1830 self.as_ptr() as *mut _,
1831 c"notify::language-set".as_ptr(),
1832 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1833 notify_language_set_trampoline::<Self, F> as *const (),
1834 )),
1835 Box_::into_raw(f),
1836 )
1837 }
1838 }
1839
1840 #[doc(alias = "markup")]
1841 fn connect_markup_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1842 unsafe extern "C" fn notify_markup_trampoline<
1843 P: IsA<CellRendererText>,
1844 F: Fn(&P) + 'static,
1845 >(
1846 this: *mut ffi::GtkCellRendererText,
1847 _param_spec: glib::ffi::gpointer,
1848 f: glib::ffi::gpointer,
1849 ) {
1850 unsafe {
1851 let f: &F = &*(f as *const F);
1852 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1853 }
1854 }
1855 unsafe {
1856 let f: Box_<F> = Box_::new(f);
1857 connect_raw(
1858 self.as_ptr() as *mut _,
1859 c"notify::markup".as_ptr(),
1860 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1861 notify_markup_trampoline::<Self, F> as *const (),
1862 )),
1863 Box_::into_raw(f),
1864 )
1865 }
1866 }
1867
1868 #[doc(alias = "max-width-chars")]
1869 fn connect_max_width_chars_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1870 unsafe extern "C" fn notify_max_width_chars_trampoline<
1871 P: IsA<CellRendererText>,
1872 F: Fn(&P) + 'static,
1873 >(
1874 this: *mut ffi::GtkCellRendererText,
1875 _param_spec: glib::ffi::gpointer,
1876 f: glib::ffi::gpointer,
1877 ) {
1878 unsafe {
1879 let f: &F = &*(f as *const F);
1880 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1881 }
1882 }
1883 unsafe {
1884 let f: Box_<F> = Box_::new(f);
1885 connect_raw(
1886 self.as_ptr() as *mut _,
1887 c"notify::max-width-chars".as_ptr(),
1888 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1889 notify_max_width_chars_trampoline::<Self, F> as *const (),
1890 )),
1891 Box_::into_raw(f),
1892 )
1893 }
1894 }
1895
1896 #[doc(alias = "placeholder-text")]
1897 fn connect_placeholder_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1898 unsafe extern "C" fn notify_placeholder_text_trampoline<
1899 P: IsA<CellRendererText>,
1900 F: Fn(&P) + 'static,
1901 >(
1902 this: *mut ffi::GtkCellRendererText,
1903 _param_spec: glib::ffi::gpointer,
1904 f: glib::ffi::gpointer,
1905 ) {
1906 unsafe {
1907 let f: &F = &*(f as *const F);
1908 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1909 }
1910 }
1911 unsafe {
1912 let f: Box_<F> = Box_::new(f);
1913 connect_raw(
1914 self.as_ptr() as *mut _,
1915 c"notify::placeholder-text".as_ptr(),
1916 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1917 notify_placeholder_text_trampoline::<Self, F> as *const (),
1918 )),
1919 Box_::into_raw(f),
1920 )
1921 }
1922 }
1923
1924 #[doc(alias = "rise")]
1925 fn connect_rise_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1926 unsafe extern "C" fn notify_rise_trampoline<
1927 P: IsA<CellRendererText>,
1928 F: Fn(&P) + 'static,
1929 >(
1930 this: *mut ffi::GtkCellRendererText,
1931 _param_spec: glib::ffi::gpointer,
1932 f: glib::ffi::gpointer,
1933 ) {
1934 unsafe {
1935 let f: &F = &*(f as *const F);
1936 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1937 }
1938 }
1939 unsafe {
1940 let f: Box_<F> = Box_::new(f);
1941 connect_raw(
1942 self.as_ptr() as *mut _,
1943 c"notify::rise".as_ptr(),
1944 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1945 notify_rise_trampoline::<Self, F> as *const (),
1946 )),
1947 Box_::into_raw(f),
1948 )
1949 }
1950 }
1951
1952 #[doc(alias = "rise-set")]
1953 fn connect_rise_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1954 unsafe extern "C" fn notify_rise_set_trampoline<
1955 P: IsA<CellRendererText>,
1956 F: Fn(&P) + 'static,
1957 >(
1958 this: *mut ffi::GtkCellRendererText,
1959 _param_spec: glib::ffi::gpointer,
1960 f: glib::ffi::gpointer,
1961 ) {
1962 unsafe {
1963 let f: &F = &*(f as *const F);
1964 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1965 }
1966 }
1967 unsafe {
1968 let f: Box_<F> = Box_::new(f);
1969 connect_raw(
1970 self.as_ptr() as *mut _,
1971 c"notify::rise-set".as_ptr(),
1972 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1973 notify_rise_set_trampoline::<Self, F> as *const (),
1974 )),
1975 Box_::into_raw(f),
1976 )
1977 }
1978 }
1979
1980 #[doc(alias = "scale")]
1981 fn connect_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1982 unsafe extern "C" fn notify_scale_trampoline<
1983 P: IsA<CellRendererText>,
1984 F: Fn(&P) + 'static,
1985 >(
1986 this: *mut ffi::GtkCellRendererText,
1987 _param_spec: glib::ffi::gpointer,
1988 f: glib::ffi::gpointer,
1989 ) {
1990 unsafe {
1991 let f: &F = &*(f as *const F);
1992 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
1993 }
1994 }
1995 unsafe {
1996 let f: Box_<F> = Box_::new(f);
1997 connect_raw(
1998 self.as_ptr() as *mut _,
1999 c"notify::scale".as_ptr(),
2000 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2001 notify_scale_trampoline::<Self, F> as *const (),
2002 )),
2003 Box_::into_raw(f),
2004 )
2005 }
2006 }
2007
2008 #[doc(alias = "scale-set")]
2009 fn connect_scale_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2010 unsafe extern "C" fn notify_scale_set_trampoline<
2011 P: IsA<CellRendererText>,
2012 F: Fn(&P) + 'static,
2013 >(
2014 this: *mut ffi::GtkCellRendererText,
2015 _param_spec: glib::ffi::gpointer,
2016 f: glib::ffi::gpointer,
2017 ) {
2018 unsafe {
2019 let f: &F = &*(f as *const F);
2020 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2021 }
2022 }
2023 unsafe {
2024 let f: Box_<F> = Box_::new(f);
2025 connect_raw(
2026 self.as_ptr() as *mut _,
2027 c"notify::scale-set".as_ptr(),
2028 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2029 notify_scale_set_trampoline::<Self, F> as *const (),
2030 )),
2031 Box_::into_raw(f),
2032 )
2033 }
2034 }
2035
2036 #[doc(alias = "single-paragraph-mode")]
2037 fn connect_single_paragraph_mode_notify<F: Fn(&Self) + 'static>(
2038 &self,
2039 f: F,
2040 ) -> SignalHandlerId {
2041 unsafe extern "C" fn notify_single_paragraph_mode_trampoline<
2042 P: IsA<CellRendererText>,
2043 F: Fn(&P) + 'static,
2044 >(
2045 this: *mut ffi::GtkCellRendererText,
2046 _param_spec: glib::ffi::gpointer,
2047 f: glib::ffi::gpointer,
2048 ) {
2049 unsafe {
2050 let f: &F = &*(f as *const F);
2051 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2052 }
2053 }
2054 unsafe {
2055 let f: Box_<F> = Box_::new(f);
2056 connect_raw(
2057 self.as_ptr() as *mut _,
2058 c"notify::single-paragraph-mode".as_ptr(),
2059 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2060 notify_single_paragraph_mode_trampoline::<Self, F> as *const (),
2061 )),
2062 Box_::into_raw(f),
2063 )
2064 }
2065 }
2066
2067 #[doc(alias = "size")]
2068 fn connect_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2069 unsafe extern "C" fn notify_size_trampoline<
2070 P: IsA<CellRendererText>,
2071 F: Fn(&P) + 'static,
2072 >(
2073 this: *mut ffi::GtkCellRendererText,
2074 _param_spec: glib::ffi::gpointer,
2075 f: glib::ffi::gpointer,
2076 ) {
2077 unsafe {
2078 let f: &F = &*(f as *const F);
2079 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2080 }
2081 }
2082 unsafe {
2083 let f: Box_<F> = Box_::new(f);
2084 connect_raw(
2085 self.as_ptr() as *mut _,
2086 c"notify::size".as_ptr(),
2087 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2088 notify_size_trampoline::<Self, F> as *const (),
2089 )),
2090 Box_::into_raw(f),
2091 )
2092 }
2093 }
2094
2095 #[doc(alias = "size-points")]
2096 fn connect_size_points_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2097 unsafe extern "C" fn notify_size_points_trampoline<
2098 P: IsA<CellRendererText>,
2099 F: Fn(&P) + 'static,
2100 >(
2101 this: *mut ffi::GtkCellRendererText,
2102 _param_spec: glib::ffi::gpointer,
2103 f: glib::ffi::gpointer,
2104 ) {
2105 unsafe {
2106 let f: &F = &*(f as *const F);
2107 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2108 }
2109 }
2110 unsafe {
2111 let f: Box_<F> = Box_::new(f);
2112 connect_raw(
2113 self.as_ptr() as *mut _,
2114 c"notify::size-points".as_ptr(),
2115 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2116 notify_size_points_trampoline::<Self, F> as *const (),
2117 )),
2118 Box_::into_raw(f),
2119 )
2120 }
2121 }
2122
2123 #[doc(alias = "size-set")]
2124 fn connect_size_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2125 unsafe extern "C" fn notify_size_set_trampoline<
2126 P: IsA<CellRendererText>,
2127 F: Fn(&P) + 'static,
2128 >(
2129 this: *mut ffi::GtkCellRendererText,
2130 _param_spec: glib::ffi::gpointer,
2131 f: glib::ffi::gpointer,
2132 ) {
2133 unsafe {
2134 let f: &F = &*(f as *const F);
2135 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2136 }
2137 }
2138 unsafe {
2139 let f: Box_<F> = Box_::new(f);
2140 connect_raw(
2141 self.as_ptr() as *mut _,
2142 c"notify::size-set".as_ptr(),
2143 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2144 notify_size_set_trampoline::<Self, F> as *const (),
2145 )),
2146 Box_::into_raw(f),
2147 )
2148 }
2149 }
2150
2151 #[doc(alias = "stretch")]
2152 fn connect_stretch_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2153 unsafe extern "C" fn notify_stretch_trampoline<
2154 P: IsA<CellRendererText>,
2155 F: Fn(&P) + 'static,
2156 >(
2157 this: *mut ffi::GtkCellRendererText,
2158 _param_spec: glib::ffi::gpointer,
2159 f: glib::ffi::gpointer,
2160 ) {
2161 unsafe {
2162 let f: &F = &*(f as *const F);
2163 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2164 }
2165 }
2166 unsafe {
2167 let f: Box_<F> = Box_::new(f);
2168 connect_raw(
2169 self.as_ptr() as *mut _,
2170 c"notify::stretch".as_ptr(),
2171 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2172 notify_stretch_trampoline::<Self, F> as *const (),
2173 )),
2174 Box_::into_raw(f),
2175 )
2176 }
2177 }
2178
2179 #[doc(alias = "stretch-set")]
2180 fn connect_stretch_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2181 unsafe extern "C" fn notify_stretch_set_trampoline<
2182 P: IsA<CellRendererText>,
2183 F: Fn(&P) + 'static,
2184 >(
2185 this: *mut ffi::GtkCellRendererText,
2186 _param_spec: glib::ffi::gpointer,
2187 f: glib::ffi::gpointer,
2188 ) {
2189 unsafe {
2190 let f: &F = &*(f as *const F);
2191 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2192 }
2193 }
2194 unsafe {
2195 let f: Box_<F> = Box_::new(f);
2196 connect_raw(
2197 self.as_ptr() as *mut _,
2198 c"notify::stretch-set".as_ptr(),
2199 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2200 notify_stretch_set_trampoline::<Self, F> as *const (),
2201 )),
2202 Box_::into_raw(f),
2203 )
2204 }
2205 }
2206
2207 #[doc(alias = "strikethrough")]
2208 fn connect_strikethrough_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2209 unsafe extern "C" fn notify_strikethrough_trampoline<
2210 P: IsA<CellRendererText>,
2211 F: Fn(&P) + 'static,
2212 >(
2213 this: *mut ffi::GtkCellRendererText,
2214 _param_spec: glib::ffi::gpointer,
2215 f: glib::ffi::gpointer,
2216 ) {
2217 unsafe {
2218 let f: &F = &*(f as *const F);
2219 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2220 }
2221 }
2222 unsafe {
2223 let f: Box_<F> = Box_::new(f);
2224 connect_raw(
2225 self.as_ptr() as *mut _,
2226 c"notify::strikethrough".as_ptr(),
2227 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2228 notify_strikethrough_trampoline::<Self, F> as *const (),
2229 )),
2230 Box_::into_raw(f),
2231 )
2232 }
2233 }
2234
2235 #[doc(alias = "strikethrough-set")]
2236 fn connect_strikethrough_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2237 unsafe extern "C" fn notify_strikethrough_set_trampoline<
2238 P: IsA<CellRendererText>,
2239 F: Fn(&P) + 'static,
2240 >(
2241 this: *mut ffi::GtkCellRendererText,
2242 _param_spec: glib::ffi::gpointer,
2243 f: glib::ffi::gpointer,
2244 ) {
2245 unsafe {
2246 let f: &F = &*(f as *const F);
2247 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2248 }
2249 }
2250 unsafe {
2251 let f: Box_<F> = Box_::new(f);
2252 connect_raw(
2253 self.as_ptr() as *mut _,
2254 c"notify::strikethrough-set".as_ptr(),
2255 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2256 notify_strikethrough_set_trampoline::<Self, F> as *const (),
2257 )),
2258 Box_::into_raw(f),
2259 )
2260 }
2261 }
2262
2263 #[doc(alias = "style")]
2264 fn connect_style_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2265 unsafe extern "C" fn notify_style_trampoline<
2266 P: IsA<CellRendererText>,
2267 F: Fn(&P) + 'static,
2268 >(
2269 this: *mut ffi::GtkCellRendererText,
2270 _param_spec: glib::ffi::gpointer,
2271 f: glib::ffi::gpointer,
2272 ) {
2273 unsafe {
2274 let f: &F = &*(f as *const F);
2275 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2276 }
2277 }
2278 unsafe {
2279 let f: Box_<F> = Box_::new(f);
2280 connect_raw(
2281 self.as_ptr() as *mut _,
2282 c"notify::style".as_ptr(),
2283 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2284 notify_style_trampoline::<Self, F> as *const (),
2285 )),
2286 Box_::into_raw(f),
2287 )
2288 }
2289 }
2290
2291 #[doc(alias = "style-set")]
2292 fn connect_style_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2293 unsafe extern "C" fn notify_style_set_trampoline<
2294 P: IsA<CellRendererText>,
2295 F: Fn(&P) + 'static,
2296 >(
2297 this: *mut ffi::GtkCellRendererText,
2298 _param_spec: glib::ffi::gpointer,
2299 f: glib::ffi::gpointer,
2300 ) {
2301 unsafe {
2302 let f: &F = &*(f as *const F);
2303 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2304 }
2305 }
2306 unsafe {
2307 let f: Box_<F> = Box_::new(f);
2308 connect_raw(
2309 self.as_ptr() as *mut _,
2310 c"notify::style-set".as_ptr(),
2311 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2312 notify_style_set_trampoline::<Self, F> as *const (),
2313 )),
2314 Box_::into_raw(f),
2315 )
2316 }
2317 }
2318
2319 #[doc(alias = "text")]
2320 fn connect_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2321 unsafe extern "C" fn notify_text_trampoline<
2322 P: IsA<CellRendererText>,
2323 F: Fn(&P) + 'static,
2324 >(
2325 this: *mut ffi::GtkCellRendererText,
2326 _param_spec: glib::ffi::gpointer,
2327 f: glib::ffi::gpointer,
2328 ) {
2329 unsafe {
2330 let f: &F = &*(f as *const F);
2331 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2332 }
2333 }
2334 unsafe {
2335 let f: Box_<F> = Box_::new(f);
2336 connect_raw(
2337 self.as_ptr() as *mut _,
2338 c"notify::text".as_ptr(),
2339 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2340 notify_text_trampoline::<Self, F> as *const (),
2341 )),
2342 Box_::into_raw(f),
2343 )
2344 }
2345 }
2346
2347 #[doc(alias = "underline")]
2348 fn connect_underline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2349 unsafe extern "C" fn notify_underline_trampoline<
2350 P: IsA<CellRendererText>,
2351 F: Fn(&P) + 'static,
2352 >(
2353 this: *mut ffi::GtkCellRendererText,
2354 _param_spec: glib::ffi::gpointer,
2355 f: glib::ffi::gpointer,
2356 ) {
2357 unsafe {
2358 let f: &F = &*(f as *const F);
2359 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2360 }
2361 }
2362 unsafe {
2363 let f: Box_<F> = Box_::new(f);
2364 connect_raw(
2365 self.as_ptr() as *mut _,
2366 c"notify::underline".as_ptr(),
2367 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2368 notify_underline_trampoline::<Self, F> as *const (),
2369 )),
2370 Box_::into_raw(f),
2371 )
2372 }
2373 }
2374
2375 #[doc(alias = "underline-set")]
2376 fn connect_underline_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2377 unsafe extern "C" fn notify_underline_set_trampoline<
2378 P: IsA<CellRendererText>,
2379 F: Fn(&P) + 'static,
2380 >(
2381 this: *mut ffi::GtkCellRendererText,
2382 _param_spec: glib::ffi::gpointer,
2383 f: glib::ffi::gpointer,
2384 ) {
2385 unsafe {
2386 let f: &F = &*(f as *const F);
2387 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2388 }
2389 }
2390 unsafe {
2391 let f: Box_<F> = Box_::new(f);
2392 connect_raw(
2393 self.as_ptr() as *mut _,
2394 c"notify::underline-set".as_ptr(),
2395 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2396 notify_underline_set_trampoline::<Self, F> as *const (),
2397 )),
2398 Box_::into_raw(f),
2399 )
2400 }
2401 }
2402
2403 #[doc(alias = "variant")]
2404 fn connect_variant_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2405 unsafe extern "C" fn notify_variant_trampoline<
2406 P: IsA<CellRendererText>,
2407 F: Fn(&P) + 'static,
2408 >(
2409 this: *mut ffi::GtkCellRendererText,
2410 _param_spec: glib::ffi::gpointer,
2411 f: glib::ffi::gpointer,
2412 ) {
2413 unsafe {
2414 let f: &F = &*(f as *const F);
2415 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2416 }
2417 }
2418 unsafe {
2419 let f: Box_<F> = Box_::new(f);
2420 connect_raw(
2421 self.as_ptr() as *mut _,
2422 c"notify::variant".as_ptr(),
2423 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2424 notify_variant_trampoline::<Self, F> as *const (),
2425 )),
2426 Box_::into_raw(f),
2427 )
2428 }
2429 }
2430
2431 #[doc(alias = "variant-set")]
2432 fn connect_variant_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2433 unsafe extern "C" fn notify_variant_set_trampoline<
2434 P: IsA<CellRendererText>,
2435 F: Fn(&P) + 'static,
2436 >(
2437 this: *mut ffi::GtkCellRendererText,
2438 _param_spec: glib::ffi::gpointer,
2439 f: glib::ffi::gpointer,
2440 ) {
2441 unsafe {
2442 let f: &F = &*(f as *const F);
2443 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2444 }
2445 }
2446 unsafe {
2447 let f: Box_<F> = Box_::new(f);
2448 connect_raw(
2449 self.as_ptr() as *mut _,
2450 c"notify::variant-set".as_ptr(),
2451 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2452 notify_variant_set_trampoline::<Self, F> as *const (),
2453 )),
2454 Box_::into_raw(f),
2455 )
2456 }
2457 }
2458
2459 #[doc(alias = "weight")]
2460 fn connect_weight_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2461 unsafe extern "C" fn notify_weight_trampoline<
2462 P: IsA<CellRendererText>,
2463 F: Fn(&P) + 'static,
2464 >(
2465 this: *mut ffi::GtkCellRendererText,
2466 _param_spec: glib::ffi::gpointer,
2467 f: glib::ffi::gpointer,
2468 ) {
2469 unsafe {
2470 let f: &F = &*(f as *const F);
2471 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2472 }
2473 }
2474 unsafe {
2475 let f: Box_<F> = Box_::new(f);
2476 connect_raw(
2477 self.as_ptr() as *mut _,
2478 c"notify::weight".as_ptr(),
2479 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2480 notify_weight_trampoline::<Self, F> as *const (),
2481 )),
2482 Box_::into_raw(f),
2483 )
2484 }
2485 }
2486
2487 #[doc(alias = "weight-set")]
2488 fn connect_weight_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2489 unsafe extern "C" fn notify_weight_set_trampoline<
2490 P: IsA<CellRendererText>,
2491 F: Fn(&P) + 'static,
2492 >(
2493 this: *mut ffi::GtkCellRendererText,
2494 _param_spec: glib::ffi::gpointer,
2495 f: glib::ffi::gpointer,
2496 ) {
2497 unsafe {
2498 let f: &F = &*(f as *const F);
2499 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2500 }
2501 }
2502 unsafe {
2503 let f: Box_<F> = Box_::new(f);
2504 connect_raw(
2505 self.as_ptr() as *mut _,
2506 c"notify::weight-set".as_ptr(),
2507 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2508 notify_weight_set_trampoline::<Self, F> as *const (),
2509 )),
2510 Box_::into_raw(f),
2511 )
2512 }
2513 }
2514
2515 #[doc(alias = "width-chars")]
2516 fn connect_width_chars_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2517 unsafe extern "C" fn notify_width_chars_trampoline<
2518 P: IsA<CellRendererText>,
2519 F: Fn(&P) + 'static,
2520 >(
2521 this: *mut ffi::GtkCellRendererText,
2522 _param_spec: glib::ffi::gpointer,
2523 f: glib::ffi::gpointer,
2524 ) {
2525 unsafe {
2526 let f: &F = &*(f as *const F);
2527 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2528 }
2529 }
2530 unsafe {
2531 let f: Box_<F> = Box_::new(f);
2532 connect_raw(
2533 self.as_ptr() as *mut _,
2534 c"notify::width-chars".as_ptr(),
2535 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2536 notify_width_chars_trampoline::<Self, F> as *const (),
2537 )),
2538 Box_::into_raw(f),
2539 )
2540 }
2541 }
2542
2543 #[doc(alias = "wrap-mode")]
2544 fn connect_wrap_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2545 unsafe extern "C" fn notify_wrap_mode_trampoline<
2546 P: IsA<CellRendererText>,
2547 F: Fn(&P) + 'static,
2548 >(
2549 this: *mut ffi::GtkCellRendererText,
2550 _param_spec: glib::ffi::gpointer,
2551 f: glib::ffi::gpointer,
2552 ) {
2553 unsafe {
2554 let f: &F = &*(f as *const F);
2555 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2556 }
2557 }
2558 unsafe {
2559 let f: Box_<F> = Box_::new(f);
2560 connect_raw(
2561 self.as_ptr() as *mut _,
2562 c"notify::wrap-mode".as_ptr(),
2563 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2564 notify_wrap_mode_trampoline::<Self, F> as *const (),
2565 )),
2566 Box_::into_raw(f),
2567 )
2568 }
2569 }
2570
2571 #[doc(alias = "wrap-width")]
2572 fn connect_wrap_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
2573 unsafe extern "C" fn notify_wrap_width_trampoline<
2574 P: IsA<CellRendererText>,
2575 F: Fn(&P) + 'static,
2576 >(
2577 this: *mut ffi::GtkCellRendererText,
2578 _param_spec: glib::ffi::gpointer,
2579 f: glib::ffi::gpointer,
2580 ) {
2581 unsafe {
2582 let f: &F = &*(f as *const F);
2583 f(CellRendererText::from_glib_borrow(this).unsafe_cast_ref())
2584 }
2585 }
2586 unsafe {
2587 let f: Box_<F> = Box_::new(f);
2588 connect_raw(
2589 self.as_ptr() as *mut _,
2590 c"notify::wrap-width".as_ptr(),
2591 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
2592 notify_wrap_width_trampoline::<Self, F> as *const (),
2593 )),
2594 Box_::into_raw(f),
2595 )
2596 }
2597 }
2598}
2599
2600impl<O: IsA<CellRendererText>> CellRendererTextExt for O {}