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