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