1use crate::{RecentFilter, RecentInfo, RecentSortType, 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 = "GtkRecentChooser")]
114 pub struct RecentChooser(Interface<ffi::GtkRecentChooser, ffi::GtkRecentChooserIface>);
115
116 match fn {
117 type_ => || ffi::gtk_recent_chooser_get_type(),
118 }
119}
120
121impl RecentChooser {
122 pub const NONE: Option<&'static RecentChooser> = None;
123}
124
125pub trait RecentChooserExt: IsA<RecentChooser> + 'static {
131 #[doc(alias = "gtk_recent_chooser_add_filter")]
138 fn add_filter(&self, filter: &RecentFilter) {
139 unsafe {
140 ffi::gtk_recent_chooser_add_filter(
141 self.as_ref().to_glib_none().0,
142 filter.to_glib_none().0,
143 );
144 }
145 }
146
147 #[doc(alias = "gtk_recent_chooser_get_current_item")]
154 #[doc(alias = "get_current_item")]
155 fn current_item(&self) -> Option<RecentInfo> {
156 unsafe {
157 from_glib_full(ffi::gtk_recent_chooser_get_current_item(
158 self.as_ref().to_glib_none().0,
159 ))
160 }
161 }
162
163 #[doc(alias = "gtk_recent_chooser_get_current_uri")]
169 #[doc(alias = "get_current_uri")]
170 fn current_uri(&self) -> Option<glib::GString> {
171 unsafe {
172 from_glib_full(ffi::gtk_recent_chooser_get_current_uri(
173 self.as_ref().to_glib_none().0,
174 ))
175 }
176 }
177
178 #[doc(alias = "gtk_recent_chooser_get_filter")]
185 #[doc(alias = "get_filter")]
186 fn filter(&self) -> Option<RecentFilter> {
187 unsafe {
188 from_glib_none(ffi::gtk_recent_chooser_get_filter(
189 self.as_ref().to_glib_none().0,
190 ))
191 }
192 }
193
194 #[doc(alias = "gtk_recent_chooser_get_items")]
206 #[doc(alias = "get_items")]
207 fn items(&self) -> Vec<RecentInfo> {
208 unsafe {
209 FromGlibPtrContainer::from_glib_full(ffi::gtk_recent_chooser_get_items(
210 self.as_ref().to_glib_none().0,
211 ))
212 }
213 }
214
215 #[doc(alias = "gtk_recent_chooser_get_limit")]
223 #[doc(alias = "get_limit")]
224 fn limit(&self) -> i32 {
225 unsafe { ffi::gtk_recent_chooser_get_limit(self.as_ref().to_glib_none().0) }
226 }
227
228 #[doc(alias = "gtk_recent_chooser_get_local_only")]
235 #[doc(alias = "get_local_only")]
236 #[doc(alias = "local-only")]
237 fn is_local_only(&self) -> bool {
238 unsafe {
239 from_glib(ffi::gtk_recent_chooser_get_local_only(
240 self.as_ref().to_glib_none().0,
241 ))
242 }
243 }
244
245 #[doc(alias = "gtk_recent_chooser_get_select_multiple")]
251 #[doc(alias = "get_select_multiple")]
252 #[doc(alias = "select-multiple")]
253 fn selects_multiple(&self) -> bool {
254 unsafe {
255 from_glib(ffi::gtk_recent_chooser_get_select_multiple(
256 self.as_ref().to_glib_none().0,
257 ))
258 }
259 }
260
261 #[doc(alias = "gtk_recent_chooser_get_show_icons")]
267 #[doc(alias = "get_show_icons")]
268 #[doc(alias = "show-icons")]
269 fn shows_icons(&self) -> bool {
270 unsafe {
271 from_glib(ffi::gtk_recent_chooser_get_show_icons(
272 self.as_ref().to_glib_none().0,
273 ))
274 }
275 }
276
277 #[doc(alias = "gtk_recent_chooser_get_show_not_found")]
285 #[doc(alias = "get_show_not_found")]
286 #[doc(alias = "show-not-found")]
287 fn shows_not_found(&self) -> bool {
288 unsafe {
289 from_glib(ffi::gtk_recent_chooser_get_show_not_found(
290 self.as_ref().to_glib_none().0,
291 ))
292 }
293 }
294
295 #[doc(alias = "gtk_recent_chooser_get_show_private")]
303 #[doc(alias = "get_show_private")]
304 #[doc(alias = "show-private")]
305 fn shows_private(&self) -> bool {
306 unsafe {
307 from_glib(ffi::gtk_recent_chooser_get_show_private(
308 self.as_ref().to_glib_none().0,
309 ))
310 }
311 }
312
313 #[doc(alias = "gtk_recent_chooser_get_show_tips")]
321 #[doc(alias = "get_show_tips")]
322 #[doc(alias = "show-tips")]
323 fn shows_tips(&self) -> bool {
324 unsafe {
325 from_glib(ffi::gtk_recent_chooser_get_show_tips(
326 self.as_ref().to_glib_none().0,
327 ))
328 }
329 }
330
331 #[doc(alias = "gtk_recent_chooser_get_sort_type")]
337 #[doc(alias = "get_sort_type")]
338 #[doc(alias = "sort-type")]
339 fn sort_type(&self) -> RecentSortType {
340 unsafe {
341 from_glib(ffi::gtk_recent_chooser_get_sort_type(
342 self.as_ref().to_glib_none().0,
343 ))
344 }
345 }
346
347 #[doc(alias = "gtk_recent_chooser_get_uris")]
360 #[doc(alias = "get_uris")]
361 fn uris(&self) -> Vec<glib::GString> {
362 unsafe {
363 let mut length = std::mem::MaybeUninit::uninit();
364 let ret = FromGlibContainer::from_glib_full_num(
365 ffi::gtk_recent_chooser_get_uris(
366 self.as_ref().to_glib_none().0,
367 length.as_mut_ptr(),
368 ),
369 length.assume_init() as _,
370 );
371 ret
372 }
373 }
374
375 #[doc(alias = "gtk_recent_chooser_list_filters")]
383 fn list_filters(&self) -> Vec<RecentFilter> {
384 unsafe {
385 FromGlibPtrContainer::from_glib_container(ffi::gtk_recent_chooser_list_filters(
386 self.as_ref().to_glib_none().0,
387 ))
388 }
389 }
390
391 #[doc(alias = "gtk_recent_chooser_remove_filter")]
395 fn remove_filter(&self, filter: &RecentFilter) {
396 unsafe {
397 ffi::gtk_recent_chooser_remove_filter(
398 self.as_ref().to_glib_none().0,
399 filter.to_glib_none().0,
400 );
401 }
402 }
403
404 #[doc(alias = "gtk_recent_chooser_select_all")]
407 fn select_all(&self) {
408 unsafe {
409 ffi::gtk_recent_chooser_select_all(self.as_ref().to_glib_none().0);
410 }
411 }
412
413 #[doc(alias = "gtk_recent_chooser_select_uri")]
421 fn select_uri(&self, uri: &str) -> Result<(), glib::Error> {
422 unsafe {
423 let mut error = std::ptr::null_mut();
424 let is_ok = ffi::gtk_recent_chooser_select_uri(
425 self.as_ref().to_glib_none().0,
426 uri.to_glib_none().0,
427 &mut error,
428 );
429 debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
430 if error.is_null() {
431 Ok(())
432 } else {
433 Err(from_glib_full(error))
434 }
435 }
436 }
437
438 #[doc(alias = "gtk_recent_chooser_set_current_uri")]
446 fn set_current_uri(&self, uri: &str) -> Result<(), glib::Error> {
447 unsafe {
448 let mut error = std::ptr::null_mut();
449 let is_ok = ffi::gtk_recent_chooser_set_current_uri(
450 self.as_ref().to_glib_none().0,
451 uri.to_glib_none().0,
452 &mut error,
453 );
454 debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
455 if error.is_null() {
456 Ok(())
457 } else {
458 Err(from_glib_full(error))
459 }
460 }
461 }
462
463 #[doc(alias = "gtk_recent_chooser_set_filter")]
468 #[doc(alias = "filter")]
469 fn set_filter(&self, filter: Option<&RecentFilter>) {
470 unsafe {
471 ffi::gtk_recent_chooser_set_filter(
472 self.as_ref().to_glib_none().0,
473 filter.to_glib_none().0,
474 );
475 }
476 }
477
478 #[doc(alias = "gtk_recent_chooser_set_limit")]
483 #[doc(alias = "limit")]
484 fn set_limit(&self, limit: i32) {
485 unsafe {
486 ffi::gtk_recent_chooser_set_limit(self.as_ref().to_glib_none().0, limit);
487 }
488 }
489
490 #[doc(alias = "gtk_recent_chooser_set_local_only")]
497 #[doc(alias = "local-only")]
498 fn set_local_only(&self, local_only: bool) {
499 unsafe {
500 ffi::gtk_recent_chooser_set_local_only(
501 self.as_ref().to_glib_none().0,
502 local_only.into_glib(),
503 );
504 }
505 }
506
507 #[doc(alias = "gtk_recent_chooser_set_select_multiple")]
511 #[doc(alias = "select-multiple")]
512 fn set_select_multiple(&self, select_multiple: bool) {
513 unsafe {
514 ffi::gtk_recent_chooser_set_select_multiple(
515 self.as_ref().to_glib_none().0,
516 select_multiple.into_glib(),
517 );
518 }
519 }
520
521 #[doc(alias = "gtk_recent_chooser_set_show_icons")]
526 #[doc(alias = "show-icons")]
527 fn set_show_icons(&self, show_icons: bool) {
528 unsafe {
529 ffi::gtk_recent_chooser_set_show_icons(
530 self.as_ref().to_glib_none().0,
531 show_icons.into_glib(),
532 );
533 }
534 }
535
536 #[doc(alias = "gtk_recent_chooser_set_show_not_found")]
541 #[doc(alias = "show-not-found")]
542 fn set_show_not_found(&self, show_not_found: bool) {
543 unsafe {
544 ffi::gtk_recent_chooser_set_show_not_found(
545 self.as_ref().to_glib_none().0,
546 show_not_found.into_glib(),
547 );
548 }
549 }
550
551 #[doc(alias = "gtk_recent_chooser_set_show_private")]
555 #[doc(alias = "show-private")]
556 fn set_show_private(&self, show_private: bool) {
557 unsafe {
558 ffi::gtk_recent_chooser_set_show_private(
559 self.as_ref().to_glib_none().0,
560 show_private.into_glib(),
561 );
562 }
563 }
564
565 #[doc(alias = "gtk_recent_chooser_set_show_tips")]
570 #[doc(alias = "show-tips")]
571 fn set_show_tips(&self, show_tips: bool) {
572 unsafe {
573 ffi::gtk_recent_chooser_set_show_tips(
574 self.as_ref().to_glib_none().0,
575 show_tips.into_glib(),
576 );
577 }
578 }
579
580 #[doc(alias = "gtk_recent_chooser_set_sort_func")]
595 fn set_sort_func<P: Fn(&RecentInfo, &RecentInfo) -> i32 + 'static>(&self, sort_func: P) {
596 let sort_func_data: Box_<P> = Box_::new(sort_func);
597 unsafe extern "C" fn sort_func_func<P: Fn(&RecentInfo, &RecentInfo) -> i32 + 'static>(
598 a: *mut ffi::GtkRecentInfo,
599 b: *mut ffi::GtkRecentInfo,
600 user_data: glib::ffi::gpointer,
601 ) -> std::ffi::c_int {
602 unsafe {
603 let a = from_glib_borrow(a);
604 let b = from_glib_borrow(b);
605 let callback = &*(user_data as *mut P);
606 (*callback)(&a, &b)
607 }
608 }
609 let sort_func = Some(sort_func_func::<P> as _);
610 unsafe extern "C" fn data_destroy_func<P: Fn(&RecentInfo, &RecentInfo) -> i32 + 'static>(
611 data: glib::ffi::gpointer,
612 ) {
613 unsafe {
614 let _callback = Box_::from_raw(data as *mut P);
615 }
616 }
617 let destroy_call3 = Some(data_destroy_func::<P> as _);
618 let super_callback0: Box_<P> = sort_func_data;
619 unsafe {
620 ffi::gtk_recent_chooser_set_sort_func(
621 self.as_ref().to_glib_none().0,
622 sort_func,
623 Box_::into_raw(super_callback0) as *mut _,
624 destroy_call3,
625 );
626 }
627 }
628
629 #[doc(alias = "gtk_recent_chooser_set_sort_type")]
634 #[doc(alias = "sort-type")]
635 fn set_sort_type(&self, sort_type: RecentSortType) {
636 unsafe {
637 ffi::gtk_recent_chooser_set_sort_type(
638 self.as_ref().to_glib_none().0,
639 sort_type.into_glib(),
640 );
641 }
642 }
643
644 #[doc(alias = "gtk_recent_chooser_unselect_all")]
646 fn unselect_all(&self) {
647 unsafe {
648 ffi::gtk_recent_chooser_unselect_all(self.as_ref().to_glib_none().0);
649 }
650 }
651
652 #[doc(alias = "gtk_recent_chooser_unselect_uri")]
656 fn unselect_uri(&self, uri: &str) {
657 unsafe {
658 ffi::gtk_recent_chooser_unselect_uri(
659 self.as_ref().to_glib_none().0,
660 uri.to_glib_none().0,
661 );
662 }
663 }
664
665 #[doc(alias = "item-activated")]
670 fn connect_item_activated<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
671 unsafe extern "C" fn item_activated_trampoline<
672 P: IsA<RecentChooser>,
673 F: Fn(&P) + 'static,
674 >(
675 this: *mut ffi::GtkRecentChooser,
676 f: glib::ffi::gpointer,
677 ) {
678 unsafe {
679 let f: &F = &*(f as *const F);
680 f(RecentChooser::from_glib_borrow(this).unsafe_cast_ref())
681 }
682 }
683 unsafe {
684 let f: Box_<F> = Box_::new(f);
685 connect_raw(
686 self.as_ptr() as *mut _,
687 c"item-activated".as_ptr(),
688 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
689 item_activated_trampoline::<Self, F> as *const (),
690 )),
691 Box_::into_raw(f),
692 )
693 }
694 }
695
696 #[doc(alias = "selection-changed")]
701 fn connect_selection_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
702 unsafe extern "C" fn selection_changed_trampoline<
703 P: IsA<RecentChooser>,
704 F: Fn(&P) + 'static,
705 >(
706 this: *mut ffi::GtkRecentChooser,
707 f: glib::ffi::gpointer,
708 ) {
709 unsafe {
710 let f: &F = &*(f as *const F);
711 f(RecentChooser::from_glib_borrow(this).unsafe_cast_ref())
712 }
713 }
714 unsafe {
715 let f: Box_<F> = Box_::new(f);
716 connect_raw(
717 self.as_ptr() as *mut _,
718 c"selection-changed".as_ptr(),
719 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
720 selection_changed_trampoline::<Self, F> as *const (),
721 )),
722 Box_::into_raw(f),
723 )
724 }
725 }
726
727 #[doc(alias = "filter")]
728 fn connect_filter_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
729 unsafe extern "C" fn notify_filter_trampoline<
730 P: IsA<RecentChooser>,
731 F: Fn(&P) + 'static,
732 >(
733 this: *mut ffi::GtkRecentChooser,
734 _param_spec: glib::ffi::gpointer,
735 f: glib::ffi::gpointer,
736 ) {
737 unsafe {
738 let f: &F = &*(f as *const F);
739 f(RecentChooser::from_glib_borrow(this).unsafe_cast_ref())
740 }
741 }
742 unsafe {
743 let f: Box_<F> = Box_::new(f);
744 connect_raw(
745 self.as_ptr() as *mut _,
746 c"notify::filter".as_ptr(),
747 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
748 notify_filter_trampoline::<Self, F> as *const (),
749 )),
750 Box_::into_raw(f),
751 )
752 }
753 }
754
755 #[doc(alias = "limit")]
756 fn connect_limit_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
757 unsafe extern "C" fn notify_limit_trampoline<P: IsA<RecentChooser>, F: Fn(&P) + 'static>(
758 this: *mut ffi::GtkRecentChooser,
759 _param_spec: glib::ffi::gpointer,
760 f: glib::ffi::gpointer,
761 ) {
762 unsafe {
763 let f: &F = &*(f as *const F);
764 f(RecentChooser::from_glib_borrow(this).unsafe_cast_ref())
765 }
766 }
767 unsafe {
768 let f: Box_<F> = Box_::new(f);
769 connect_raw(
770 self.as_ptr() as *mut _,
771 c"notify::limit".as_ptr(),
772 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
773 notify_limit_trampoline::<Self, F> as *const (),
774 )),
775 Box_::into_raw(f),
776 )
777 }
778 }
779
780 #[doc(alias = "local-only")]
781 fn connect_local_only_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
782 unsafe extern "C" fn notify_local_only_trampoline<
783 P: IsA<RecentChooser>,
784 F: Fn(&P) + 'static,
785 >(
786 this: *mut ffi::GtkRecentChooser,
787 _param_spec: glib::ffi::gpointer,
788 f: glib::ffi::gpointer,
789 ) {
790 unsafe {
791 let f: &F = &*(f as *const F);
792 f(RecentChooser::from_glib_borrow(this).unsafe_cast_ref())
793 }
794 }
795 unsafe {
796 let f: Box_<F> = Box_::new(f);
797 connect_raw(
798 self.as_ptr() as *mut _,
799 c"notify::local-only".as_ptr(),
800 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
801 notify_local_only_trampoline::<Self, F> as *const (),
802 )),
803 Box_::into_raw(f),
804 )
805 }
806 }
807
808 #[doc(alias = "select-multiple")]
809 fn connect_select_multiple_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
810 unsafe extern "C" fn notify_select_multiple_trampoline<
811 P: IsA<RecentChooser>,
812 F: Fn(&P) + 'static,
813 >(
814 this: *mut ffi::GtkRecentChooser,
815 _param_spec: glib::ffi::gpointer,
816 f: glib::ffi::gpointer,
817 ) {
818 unsafe {
819 let f: &F = &*(f as *const F);
820 f(RecentChooser::from_glib_borrow(this).unsafe_cast_ref())
821 }
822 }
823 unsafe {
824 let f: Box_<F> = Box_::new(f);
825 connect_raw(
826 self.as_ptr() as *mut _,
827 c"notify::select-multiple".as_ptr(),
828 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
829 notify_select_multiple_trampoline::<Self, F> as *const (),
830 )),
831 Box_::into_raw(f),
832 )
833 }
834 }
835
836 #[doc(alias = "show-icons")]
837 fn connect_show_icons_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
838 unsafe extern "C" fn notify_show_icons_trampoline<
839 P: IsA<RecentChooser>,
840 F: Fn(&P) + 'static,
841 >(
842 this: *mut ffi::GtkRecentChooser,
843 _param_spec: glib::ffi::gpointer,
844 f: glib::ffi::gpointer,
845 ) {
846 unsafe {
847 let f: &F = &*(f as *const F);
848 f(RecentChooser::from_glib_borrow(this).unsafe_cast_ref())
849 }
850 }
851 unsafe {
852 let f: Box_<F> = Box_::new(f);
853 connect_raw(
854 self.as_ptr() as *mut _,
855 c"notify::show-icons".as_ptr(),
856 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
857 notify_show_icons_trampoline::<Self, F> as *const (),
858 )),
859 Box_::into_raw(f),
860 )
861 }
862 }
863
864 #[doc(alias = "show-not-found")]
865 fn connect_show_not_found_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
866 unsafe extern "C" fn notify_show_not_found_trampoline<
867 P: IsA<RecentChooser>,
868 F: Fn(&P) + 'static,
869 >(
870 this: *mut ffi::GtkRecentChooser,
871 _param_spec: glib::ffi::gpointer,
872 f: glib::ffi::gpointer,
873 ) {
874 unsafe {
875 let f: &F = &*(f as *const F);
876 f(RecentChooser::from_glib_borrow(this).unsafe_cast_ref())
877 }
878 }
879 unsafe {
880 let f: Box_<F> = Box_::new(f);
881 connect_raw(
882 self.as_ptr() as *mut _,
883 c"notify::show-not-found".as_ptr(),
884 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
885 notify_show_not_found_trampoline::<Self, F> as *const (),
886 )),
887 Box_::into_raw(f),
888 )
889 }
890 }
891
892 #[doc(alias = "show-private")]
893 fn connect_show_private_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
894 unsafe extern "C" fn notify_show_private_trampoline<
895 P: IsA<RecentChooser>,
896 F: Fn(&P) + 'static,
897 >(
898 this: *mut ffi::GtkRecentChooser,
899 _param_spec: glib::ffi::gpointer,
900 f: glib::ffi::gpointer,
901 ) {
902 unsafe {
903 let f: &F = &*(f as *const F);
904 f(RecentChooser::from_glib_borrow(this).unsafe_cast_ref())
905 }
906 }
907 unsafe {
908 let f: Box_<F> = Box_::new(f);
909 connect_raw(
910 self.as_ptr() as *mut _,
911 c"notify::show-private".as_ptr(),
912 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
913 notify_show_private_trampoline::<Self, F> as *const (),
914 )),
915 Box_::into_raw(f),
916 )
917 }
918 }
919
920 #[doc(alias = "show-tips")]
921 fn connect_show_tips_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
922 unsafe extern "C" fn notify_show_tips_trampoline<
923 P: IsA<RecentChooser>,
924 F: Fn(&P) + 'static,
925 >(
926 this: *mut ffi::GtkRecentChooser,
927 _param_spec: glib::ffi::gpointer,
928 f: glib::ffi::gpointer,
929 ) {
930 unsafe {
931 let f: &F = &*(f as *const F);
932 f(RecentChooser::from_glib_borrow(this).unsafe_cast_ref())
933 }
934 }
935 unsafe {
936 let f: Box_<F> = Box_::new(f);
937 connect_raw(
938 self.as_ptr() as *mut _,
939 c"notify::show-tips".as_ptr(),
940 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
941 notify_show_tips_trampoline::<Self, F> as *const (),
942 )),
943 Box_::into_raw(f),
944 )
945 }
946 }
947
948 #[doc(alias = "sort-type")]
949 fn connect_sort_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
950 unsafe extern "C" fn notify_sort_type_trampoline<
951 P: IsA<RecentChooser>,
952 F: Fn(&P) + 'static,
953 >(
954 this: *mut ffi::GtkRecentChooser,
955 _param_spec: glib::ffi::gpointer,
956 f: glib::ffi::gpointer,
957 ) {
958 unsafe {
959 let f: &F = &*(f as *const F);
960 f(RecentChooser::from_glib_borrow(this).unsafe_cast_ref())
961 }
962 }
963 unsafe {
964 let f: Box_<F> = Box_::new(f);
965 connect_raw(
966 self.as_ptr() as *mut _,
967 c"notify::sort-type".as_ptr(),
968 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
969 notify_sort_type_trampoline::<Self, F> as *const (),
970 )),
971 Box_::into_raw(f),
972 )
973 }
974 }
975}
976
977impl<O: IsA<RecentChooser>> RecentChooserExt for O {}