1#![allow(deprecated)]
5
6use crate::{MessageType, PromptType, ffi};
7use glib::{
8 object::ObjectType as _,
9 prelude::*,
10 signal::{SignalHandlerId, connect_raw},
11 translate::*,
12};
13use std::boxed::Box as Box_;
14
15glib::wrapper! {
16 #[doc(alias = "LightDMGreeter")]
142 pub struct Greeter(Object<ffi::LightDMGreeter, ffi::LightDMGreeterClass>);
143
144 match fn {
145 type_ => || ffi::lightdm_greeter_get_type(),
146 }
147}
148
149impl Greeter {
150 pub const NONE: Option<&'static Greeter> = None;
151
152 #[doc(alias = "lightdm_greeter_new")]
158 pub fn new() -> Greeter {
159 assert_initialized_main_thread!();
160 unsafe { from_glib_full(ffi::lightdm_greeter_new()) }
161 }
162}
163
164impl Default for Greeter {
165 fn default() -> Self {
166 Self::new()
167 }
168}
169
170pub trait GreeterExt: IsA<Greeter> + 'static {
176 #[doc(alias = "lightdm_greeter_cancel_autologin")]
178 fn cancel_autologin(&self) {
179 unsafe {
180 ffi::lightdm_greeter_cancel_autologin(self.as_ref().to_glib_none().0);
181 }
182 }
183
184 #[doc(alias = "lightdm_greeter_get_authentication_user")]
190 #[doc(alias = "get_authentication_user")]
191 #[doc(alias = "authentication-user")]
192 fn authentication_user(&self) -> Option<glib::GString> {
193 unsafe {
194 from_glib_none(ffi::lightdm_greeter_get_authentication_user(
195 self.as_ref().to_glib_none().0,
196 ))
197 }
198 }
199
200 #[doc(alias = "lightdm_greeter_get_autologin_guest_hint")]
206 #[doc(alias = "get_autologin_guest_hint")]
207 #[doc(alias = "autologin-guest-hint")]
208 fn is_autologin_guest_hint(&self) -> bool {
209 unsafe {
210 from_glib(ffi::lightdm_greeter_get_autologin_guest_hint(
211 self.as_ref().to_glib_none().0,
212 ))
213 }
214 }
215
216 #[doc(alias = "lightdm_greeter_get_autologin_session_hint")]
222 #[doc(alias = "get_autologin_session_hint")]
223 #[doc(alias = "autologin-session-hint")]
224 fn autologin_session_hint(&self) -> Option<glib::GString> {
225 unsafe {
226 from_glib_none(ffi::lightdm_greeter_get_autologin_session_hint(
227 self.as_ref().to_glib_none().0,
228 ))
229 }
230 }
231
232 #[doc(alias = "lightdm_greeter_get_autologin_timeout_hint")]
238 #[doc(alias = "get_autologin_timeout_hint")]
239 #[doc(alias = "autologin-timeout-hint")]
240 fn autologin_timeout_hint(&self) -> i32 {
241 unsafe { ffi::lightdm_greeter_get_autologin_timeout_hint(self.as_ref().to_glib_none().0) }
242 }
243
244 #[doc(alias = "lightdm_greeter_get_autologin_user_hint")]
250 #[doc(alias = "get_autologin_user_hint")]
251 #[doc(alias = "autologin-user-hint")]
252 fn autologin_user_hint(&self) -> Option<glib::GString> {
253 unsafe {
254 from_glib_none(ffi::lightdm_greeter_get_autologin_user_hint(
255 self.as_ref().to_glib_none().0,
256 ))
257 }
258 }
259
260 #[doc(alias = "lightdm_greeter_get_default_session_hint")]
266 #[doc(alias = "get_default_session_hint")]
267 #[doc(alias = "default-session-hint")]
268 fn default_session_hint(&self) -> Option<glib::GString> {
269 unsafe {
270 from_glib_none(ffi::lightdm_greeter_get_default_session_hint(
271 self.as_ref().to_glib_none().0,
272 ))
273 }
274 }
275
276 #[doc(alias = "lightdm_greeter_get_has_guest_account_hint")]
282 #[doc(alias = "get_has_guest_account_hint")]
283 #[doc(alias = "has-guest-account-hint")]
284 fn has_guest_account_hint(&self) -> bool {
285 unsafe {
286 from_glib(ffi::lightdm_greeter_get_has_guest_account_hint(
287 self.as_ref().to_glib_none().0,
288 ))
289 }
290 }
291
292 #[doc(alias = "lightdm_greeter_get_hide_users_hint")]
304 #[doc(alias = "get_hide_users_hint")]
305 #[doc(alias = "hide-users-hint")]
306 fn hides_users_hint(&self) -> bool {
307 unsafe {
308 from_glib(ffi::lightdm_greeter_get_hide_users_hint(
309 self.as_ref().to_glib_none().0,
310 ))
311 }
312 }
313
314 #[doc(alias = "lightdm_greeter_get_hint")]
322 #[doc(alias = "get_hint")]
323 fn hint(&self, name: &str) -> Option<glib::GString> {
324 unsafe {
325 from_glib_none(ffi::lightdm_greeter_get_hint(
326 self.as_ref().to_glib_none().0,
327 name.to_glib_none().0,
328 ))
329 }
330 }
331
332 #[doc(alias = "lightdm_greeter_get_in_authentication")]
338 #[doc(alias = "get_in_authentication")]
339 #[doc(alias = "in-authentication")]
340 fn is_in_authentication(&self) -> bool {
341 unsafe {
342 from_glib(ffi::lightdm_greeter_get_in_authentication(
343 self.as_ref().to_glib_none().0,
344 ))
345 }
346 }
347
348 #[doc(alias = "lightdm_greeter_get_is_authenticated")]
354 #[doc(alias = "get_is_authenticated")]
355 #[doc(alias = "is-authenticated")]
356 fn is_authenticated(&self) -> bool {
357 unsafe {
358 from_glib(ffi::lightdm_greeter_get_is_authenticated(
359 self.as_ref().to_glib_none().0,
360 ))
361 }
362 }
363
364 #[doc(alias = "lightdm_greeter_get_lock_hint")]
370 #[doc(alias = "get_lock_hint")]
371 #[doc(alias = "lock-hint")]
372 fn is_lock_hint(&self) -> bool {
373 unsafe {
374 from_glib(ffi::lightdm_greeter_get_lock_hint(
375 self.as_ref().to_glib_none().0,
376 ))
377 }
378 }
379
380 #[doc(alias = "lightdm_greeter_get_select_guest_hint")]
386 #[doc(alias = "get_select_guest_hint")]
387 #[doc(alias = "select-guest-hint")]
388 fn selects_guest_hint(&self) -> bool {
389 unsafe {
390 from_glib(ffi::lightdm_greeter_get_select_guest_hint(
391 self.as_ref().to_glib_none().0,
392 ))
393 }
394 }
395
396 #[doc(alias = "lightdm_greeter_get_select_user_hint")]
402 #[doc(alias = "get_select_user_hint")]
403 #[doc(alias = "select-user-hint")]
404 fn select_user_hint(&self) -> Option<glib::GString> {
405 unsafe {
406 from_glib_none(ffi::lightdm_greeter_get_select_user_hint(
407 self.as_ref().to_glib_none().0,
408 ))
409 }
410 }
411
412 #[doc(alias = "lightdm_greeter_get_show_manual_login_hint")]
421 #[doc(alias = "get_show_manual_login_hint")]
422 #[doc(alias = "show-manual-login-hint")]
423 fn shows_manual_login_hint(&self) -> bool {
424 unsafe {
425 from_glib(ffi::lightdm_greeter_get_show_manual_login_hint(
426 self.as_ref().to_glib_none().0,
427 ))
428 }
429 }
430
431 #[doc(alias = "lightdm_greeter_get_show_remote_login_hint")]
438 #[doc(alias = "get_show_remote_login_hint")]
439 #[doc(alias = "show-remote-login-hint")]
440 fn shows_remote_login_hint(&self) -> bool {
441 unsafe {
442 from_glib(ffi::lightdm_greeter_get_show_remote_login_hint(
443 self.as_ref().to_glib_none().0,
444 ))
445 }
446 }
447
448 #[doc(alias = "lightdm_greeter_set_resettable")]
453 fn set_resettable(&self, resettable: bool) {
454 unsafe {
455 ffi::lightdm_greeter_set_resettable(
456 self.as_ref().to_glib_none().0,
457 resettable.into_glib(),
458 );
459 }
460 }
461
462 #[doc(alias = "authentication-complete")]
468 fn connect_authentication_complete<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
469 unsafe extern "C" fn authentication_complete_trampoline<
470 P: IsA<Greeter>,
471 F: Fn(&P) + 'static,
472 >(
473 this: *mut ffi::LightDMGreeter,
474 f: glib::ffi::gpointer,
475 ) {
476 unsafe {
477 let f: &F = &*(f as *const F);
478 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
479 }
480 }
481 unsafe {
482 let f: Box_<F> = Box_::new(f);
483 connect_raw(
484 self.as_ptr() as *mut _,
485 c"authentication-complete".as_ptr(),
486 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
487 authentication_complete_trampoline::<Self, F> as *const (),
488 )),
489 Box_::into_raw(f),
490 )
491 }
492 }
493
494 #[doc(alias = "autologin-timer-expired")]
497 fn connect_autologin_timer_expired<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
498 unsafe extern "C" fn autologin_timer_expired_trampoline<
499 P: IsA<Greeter>,
500 F: Fn(&P) + 'static,
501 >(
502 this: *mut ffi::LightDMGreeter,
503 f: glib::ffi::gpointer,
504 ) {
505 unsafe {
506 let f: &F = &*(f as *const F);
507 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
508 }
509 }
510 unsafe {
511 let f: Box_<F> = Box_::new(f);
512 connect_raw(
513 self.as_ptr() as *mut _,
514 c"autologin-timer-expired".as_ptr(),
515 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
516 autologin_timer_expired_trampoline::<Self, F> as *const (),
517 )),
518 Box_::into_raw(f),
519 )
520 }
521 }
522
523 #[doc(alias = "idle")]
529 fn connect_idle<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
530 unsafe extern "C" fn idle_trampoline<P: IsA<Greeter>, F: Fn(&P) + 'static>(
531 this: *mut ffi::LightDMGreeter,
532 f: glib::ffi::gpointer,
533 ) {
534 unsafe {
535 let f: &F = &*(f as *const F);
536 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
537 }
538 }
539 unsafe {
540 let f: Box_<F> = Box_::new(f);
541 connect_raw(
542 self.as_ptr() as *mut _,
543 c"idle".as_ptr(),
544 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
545 idle_trampoline::<Self, F> as *const (),
546 )),
547 Box_::into_raw(f),
548 )
549 }
550 }
551
552 #[doc(alias = "reset")]
558 fn connect_reset<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
559 unsafe extern "C" fn reset_trampoline<P: IsA<Greeter>, F: Fn(&P) + 'static>(
560 this: *mut ffi::LightDMGreeter,
561 f: glib::ffi::gpointer,
562 ) {
563 unsafe {
564 let f: &F = &*(f as *const F);
565 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
566 }
567 }
568 unsafe {
569 let f: Box_<F> = Box_::new(f);
570 connect_raw(
571 self.as_ptr() as *mut _,
572 c"reset".as_ptr(),
573 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
574 reset_trampoline::<Self, F> as *const (),
575 )),
576 Box_::into_raw(f),
577 )
578 }
579 }
580
581 #[doc(alias = "show-message")]
588 fn connect_show_message<F: Fn(&Self, &str, MessageType) + 'static>(
589 &self,
590 f: F,
591 ) -> SignalHandlerId {
592 unsafe extern "C" fn show_message_trampoline<
593 P: IsA<Greeter>,
594 F: Fn(&P, &str, MessageType) + 'static,
595 >(
596 this: *mut ffi::LightDMGreeter,
597 text: *mut std::ffi::c_char,
598 type_: ffi::LightDMMessageType,
599 f: glib::ffi::gpointer,
600 ) {
601 unsafe {
602 let f: &F = &*(f as *const F);
603 f(
604 Greeter::from_glib_borrow(this).unsafe_cast_ref(),
605 &glib::GString::from_glib_borrow(text),
606 from_glib(type_),
607 )
608 }
609 }
610 unsafe {
611 let f: Box_<F> = Box_::new(f);
612 connect_raw(
613 self.as_ptr() as *mut _,
614 c"show-message".as_ptr(),
615 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
616 show_message_trampoline::<Self, F> as *const (),
617 )),
618 Box_::into_raw(f),
619 )
620 }
621 }
622
623 #[doc(alias = "show-prompt")]
634 fn connect_show_prompt<F: Fn(&Self, &str, PromptType) + 'static>(
635 &self,
636 f: F,
637 ) -> SignalHandlerId {
638 unsafe extern "C" fn show_prompt_trampoline<
639 P: IsA<Greeter>,
640 F: Fn(&P, &str, PromptType) + 'static,
641 >(
642 this: *mut ffi::LightDMGreeter,
643 text: *mut std::ffi::c_char,
644 type_: ffi::LightDMPromptType,
645 f: glib::ffi::gpointer,
646 ) {
647 unsafe {
648 let f: &F = &*(f as *const F);
649 f(
650 Greeter::from_glib_borrow(this).unsafe_cast_ref(),
651 &glib::GString::from_glib_borrow(text),
652 from_glib(type_),
653 )
654 }
655 }
656 unsafe {
657 let f: Box_<F> = Box_::new(f);
658 connect_raw(
659 self.as_ptr() as *mut _,
660 c"show-prompt".as_ptr(),
661 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
662 show_prompt_trampoline::<Self, F> as *const (),
663 )),
664 Box_::into_raw(f),
665 )
666 }
667 }
668
669 #[doc(alias = "authentication-user")]
670 fn connect_authentication_user_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
671 unsafe extern "C" fn notify_authentication_user_trampoline<
672 P: IsA<Greeter>,
673 F: Fn(&P) + 'static,
674 >(
675 this: *mut ffi::LightDMGreeter,
676 _param_spec: glib::ffi::gpointer,
677 f: glib::ffi::gpointer,
678 ) {
679 unsafe {
680 let f: &F = &*(f as *const F);
681 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
682 }
683 }
684 unsafe {
685 let f: Box_<F> = Box_::new(f);
686 connect_raw(
687 self.as_ptr() as *mut _,
688 c"notify::authentication-user".as_ptr(),
689 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
690 notify_authentication_user_trampoline::<Self, F> as *const (),
691 )),
692 Box_::into_raw(f),
693 )
694 }
695 }
696
697 #[doc(alias = "autologin-guest-hint")]
698 fn connect_autologin_guest_hint_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
699 unsafe extern "C" fn notify_autologin_guest_hint_trampoline<
700 P: IsA<Greeter>,
701 F: Fn(&P) + 'static,
702 >(
703 this: *mut ffi::LightDMGreeter,
704 _param_spec: glib::ffi::gpointer,
705 f: glib::ffi::gpointer,
706 ) {
707 unsafe {
708 let f: &F = &*(f as *const F);
709 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
710 }
711 }
712 unsafe {
713 let f: Box_<F> = Box_::new(f);
714 connect_raw(
715 self.as_ptr() as *mut _,
716 c"notify::autologin-guest-hint".as_ptr(),
717 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
718 notify_autologin_guest_hint_trampoline::<Self, F> as *const (),
719 )),
720 Box_::into_raw(f),
721 )
722 }
723 }
724
725 #[doc(alias = "autologin-session-hint")]
726 fn connect_autologin_session_hint_notify<F: Fn(&Self) + 'static>(
727 &self,
728 f: F,
729 ) -> SignalHandlerId {
730 unsafe extern "C" fn notify_autologin_session_hint_trampoline<
731 P: IsA<Greeter>,
732 F: Fn(&P) + 'static,
733 >(
734 this: *mut ffi::LightDMGreeter,
735 _param_spec: glib::ffi::gpointer,
736 f: glib::ffi::gpointer,
737 ) {
738 unsafe {
739 let f: &F = &*(f as *const F);
740 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
741 }
742 }
743 unsafe {
744 let f: Box_<F> = Box_::new(f);
745 connect_raw(
746 self.as_ptr() as *mut _,
747 c"notify::autologin-session-hint".as_ptr(),
748 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
749 notify_autologin_session_hint_trampoline::<Self, F> as *const (),
750 )),
751 Box_::into_raw(f),
752 )
753 }
754 }
755
756 #[doc(alias = "autologin-timeout-hint")]
757 fn connect_autologin_timeout_hint_notify<F: Fn(&Self) + 'static>(
758 &self,
759 f: F,
760 ) -> SignalHandlerId {
761 unsafe extern "C" fn notify_autologin_timeout_hint_trampoline<
762 P: IsA<Greeter>,
763 F: Fn(&P) + 'static,
764 >(
765 this: *mut ffi::LightDMGreeter,
766 _param_spec: glib::ffi::gpointer,
767 f: glib::ffi::gpointer,
768 ) {
769 unsafe {
770 let f: &F = &*(f as *const F);
771 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
772 }
773 }
774 unsafe {
775 let f: Box_<F> = Box_::new(f);
776 connect_raw(
777 self.as_ptr() as *mut _,
778 c"notify::autologin-timeout-hint".as_ptr(),
779 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
780 notify_autologin_timeout_hint_trampoline::<Self, F> as *const (),
781 )),
782 Box_::into_raw(f),
783 )
784 }
785 }
786
787 #[doc(alias = "autologin-user-hint")]
788 fn connect_autologin_user_hint_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
789 unsafe extern "C" fn notify_autologin_user_hint_trampoline<
790 P: IsA<Greeter>,
791 F: Fn(&P) + 'static,
792 >(
793 this: *mut ffi::LightDMGreeter,
794 _param_spec: glib::ffi::gpointer,
795 f: glib::ffi::gpointer,
796 ) {
797 unsafe {
798 let f: &F = &*(f as *const F);
799 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
800 }
801 }
802 unsafe {
803 let f: Box_<F> = Box_::new(f);
804 connect_raw(
805 self.as_ptr() as *mut _,
806 c"notify::autologin-user-hint".as_ptr(),
807 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
808 notify_autologin_user_hint_trampoline::<Self, F> as *const (),
809 )),
810 Box_::into_raw(f),
811 )
812 }
813 }
814
815 #[doc(alias = "default-session-hint")]
816 fn connect_default_session_hint_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
817 unsafe extern "C" fn notify_default_session_hint_trampoline<
818 P: IsA<Greeter>,
819 F: Fn(&P) + 'static,
820 >(
821 this: *mut ffi::LightDMGreeter,
822 _param_spec: glib::ffi::gpointer,
823 f: glib::ffi::gpointer,
824 ) {
825 unsafe {
826 let f: &F = &*(f as *const F);
827 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
828 }
829 }
830 unsafe {
831 let f: Box_<F> = Box_::new(f);
832 connect_raw(
833 self.as_ptr() as *mut _,
834 c"notify::default-session-hint".as_ptr(),
835 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
836 notify_default_session_hint_trampoline::<Self, F> as *const (),
837 )),
838 Box_::into_raw(f),
839 )
840 }
841 }
842
843 #[doc(alias = "has-guest-account-hint")]
844 fn connect_has_guest_account_hint_notify<F: Fn(&Self) + 'static>(
845 &self,
846 f: F,
847 ) -> SignalHandlerId {
848 unsafe extern "C" fn notify_has_guest_account_hint_trampoline<
849 P: IsA<Greeter>,
850 F: Fn(&P) + 'static,
851 >(
852 this: *mut ffi::LightDMGreeter,
853 _param_spec: glib::ffi::gpointer,
854 f: glib::ffi::gpointer,
855 ) {
856 unsafe {
857 let f: &F = &*(f as *const F);
858 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
859 }
860 }
861 unsafe {
862 let f: Box_<F> = Box_::new(f);
863 connect_raw(
864 self.as_ptr() as *mut _,
865 c"notify::has-guest-account-hint".as_ptr(),
866 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
867 notify_has_guest_account_hint_trampoline::<Self, F> as *const (),
868 )),
869 Box_::into_raw(f),
870 )
871 }
872 }
873
874 #[doc(alias = "hide-users-hint")]
875 fn connect_hide_users_hint_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
876 unsafe extern "C" fn notify_hide_users_hint_trampoline<
877 P: IsA<Greeter>,
878 F: Fn(&P) + 'static,
879 >(
880 this: *mut ffi::LightDMGreeter,
881 _param_spec: glib::ffi::gpointer,
882 f: glib::ffi::gpointer,
883 ) {
884 unsafe {
885 let f: &F = &*(f as *const F);
886 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
887 }
888 }
889 unsafe {
890 let f: Box_<F> = Box_::new(f);
891 connect_raw(
892 self.as_ptr() as *mut _,
893 c"notify::hide-users-hint".as_ptr(),
894 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
895 notify_hide_users_hint_trampoline::<Self, F> as *const (),
896 )),
897 Box_::into_raw(f),
898 )
899 }
900 }
901
902 #[doc(alias = "in-authentication")]
903 fn connect_in_authentication_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
904 unsafe extern "C" fn notify_in_authentication_trampoline<
905 P: IsA<Greeter>,
906 F: Fn(&P) + 'static,
907 >(
908 this: *mut ffi::LightDMGreeter,
909 _param_spec: glib::ffi::gpointer,
910 f: glib::ffi::gpointer,
911 ) {
912 unsafe {
913 let f: &F = &*(f as *const F);
914 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
915 }
916 }
917 unsafe {
918 let f: Box_<F> = Box_::new(f);
919 connect_raw(
920 self.as_ptr() as *mut _,
921 c"notify::in-authentication".as_ptr(),
922 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
923 notify_in_authentication_trampoline::<Self, F> as *const (),
924 )),
925 Box_::into_raw(f),
926 )
927 }
928 }
929
930 #[doc(alias = "is-authenticated")]
931 fn connect_is_authenticated_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
932 unsafe extern "C" fn notify_is_authenticated_trampoline<
933 P: IsA<Greeter>,
934 F: Fn(&P) + 'static,
935 >(
936 this: *mut ffi::LightDMGreeter,
937 _param_spec: glib::ffi::gpointer,
938 f: glib::ffi::gpointer,
939 ) {
940 unsafe {
941 let f: &F = &*(f as *const F);
942 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
943 }
944 }
945 unsafe {
946 let f: Box_<F> = Box_::new(f);
947 connect_raw(
948 self.as_ptr() as *mut _,
949 c"notify::is-authenticated".as_ptr(),
950 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
951 notify_is_authenticated_trampoline::<Self, F> as *const (),
952 )),
953 Box_::into_raw(f),
954 )
955 }
956 }
957
958 #[doc(alias = "lock-hint")]
959 fn connect_lock_hint_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
960 unsafe extern "C" fn notify_lock_hint_trampoline<P: IsA<Greeter>, F: Fn(&P) + 'static>(
961 this: *mut ffi::LightDMGreeter,
962 _param_spec: glib::ffi::gpointer,
963 f: glib::ffi::gpointer,
964 ) {
965 unsafe {
966 let f: &F = &*(f as *const F);
967 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
968 }
969 }
970 unsafe {
971 let f: Box_<F> = Box_::new(f);
972 connect_raw(
973 self.as_ptr() as *mut _,
974 c"notify::lock-hint".as_ptr(),
975 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
976 notify_lock_hint_trampoline::<Self, F> as *const (),
977 )),
978 Box_::into_raw(f),
979 )
980 }
981 }
982
983 #[doc(alias = "select-guest-hint")]
984 fn connect_select_guest_hint_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
985 unsafe extern "C" fn notify_select_guest_hint_trampoline<
986 P: IsA<Greeter>,
987 F: Fn(&P) + 'static,
988 >(
989 this: *mut ffi::LightDMGreeter,
990 _param_spec: glib::ffi::gpointer,
991 f: glib::ffi::gpointer,
992 ) {
993 unsafe {
994 let f: &F = &*(f as *const F);
995 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
996 }
997 }
998 unsafe {
999 let f: Box_<F> = Box_::new(f);
1000 connect_raw(
1001 self.as_ptr() as *mut _,
1002 c"notify::select-guest-hint".as_ptr(),
1003 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1004 notify_select_guest_hint_trampoline::<Self, F> as *const (),
1005 )),
1006 Box_::into_raw(f),
1007 )
1008 }
1009 }
1010
1011 #[doc(alias = "select-user-hint")]
1012 fn connect_select_user_hint_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1013 unsafe extern "C" fn notify_select_user_hint_trampoline<
1014 P: IsA<Greeter>,
1015 F: Fn(&P) + 'static,
1016 >(
1017 this: *mut ffi::LightDMGreeter,
1018 _param_spec: glib::ffi::gpointer,
1019 f: glib::ffi::gpointer,
1020 ) {
1021 unsafe {
1022 let f: &F = &*(f as *const F);
1023 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
1024 }
1025 }
1026 unsafe {
1027 let f: Box_<F> = Box_::new(f);
1028 connect_raw(
1029 self.as_ptr() as *mut _,
1030 c"notify::select-user-hint".as_ptr(),
1031 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1032 notify_select_user_hint_trampoline::<Self, F> as *const (),
1033 )),
1034 Box_::into_raw(f),
1035 )
1036 }
1037 }
1038
1039 #[doc(alias = "show-manual-login-hint")]
1040 fn connect_show_manual_login_hint_notify<F: Fn(&Self) + 'static>(
1041 &self,
1042 f: F,
1043 ) -> SignalHandlerId {
1044 unsafe extern "C" fn notify_show_manual_login_hint_trampoline<
1045 P: IsA<Greeter>,
1046 F: Fn(&P) + 'static,
1047 >(
1048 this: *mut ffi::LightDMGreeter,
1049 _param_spec: glib::ffi::gpointer,
1050 f: glib::ffi::gpointer,
1051 ) {
1052 unsafe {
1053 let f: &F = &*(f as *const F);
1054 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
1055 }
1056 }
1057 unsafe {
1058 let f: Box_<F> = Box_::new(f);
1059 connect_raw(
1060 self.as_ptr() as *mut _,
1061 c"notify::show-manual-login-hint".as_ptr(),
1062 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1063 notify_show_manual_login_hint_trampoline::<Self, F> as *const (),
1064 )),
1065 Box_::into_raw(f),
1066 )
1067 }
1068 }
1069
1070 #[doc(alias = "show-remote-login-hint")]
1071 fn connect_show_remote_login_hint_notify<F: Fn(&Self) + 'static>(
1072 &self,
1073 f: F,
1074 ) -> SignalHandlerId {
1075 unsafe extern "C" fn notify_show_remote_login_hint_trampoline<
1076 P: IsA<Greeter>,
1077 F: Fn(&P) + 'static,
1078 >(
1079 this: *mut ffi::LightDMGreeter,
1080 _param_spec: glib::ffi::gpointer,
1081 f: glib::ffi::gpointer,
1082 ) {
1083 unsafe {
1084 let f: &F = &*(f as *const F);
1085 f(Greeter::from_glib_borrow(this).unsafe_cast_ref())
1086 }
1087 }
1088 unsafe {
1089 let f: Box_<F> = Box_::new(f);
1090 connect_raw(
1091 self.as_ptr() as *mut _,
1092 c"notify::show-remote-login-hint".as_ptr(),
1093 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1094 notify_show_remote_login_hint_trampoline::<Self, F> as *const (),
1095 )),
1096 Box_::into_raw(f),
1097 )
1098 }
1099 }
1100}
1101
1102impl<O: IsA<Greeter>> GreeterExt for O {}