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