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