Skip to main content

lightdm/auto/
greeter.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from lightdm-gir-files
3// DO NOT EDIT
4#![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    /// #LightDMGreeter is an opaque data structure and can only be accessed
17    /// using the provided functions.
18    ///
19    /// ## Properties
20    ///
21    ///
22    /// #### `authentication-user`
23    ///  Readable
24    ///
25    ///
26    /// #### `autologin-guest-hint`
27    ///  Readable
28    ///
29    ///
30    /// #### `autologin-session-hint`
31    ///  Readable
32    ///
33    ///
34    /// #### `autologin-timeout-hint`
35    ///  Readable
36    ///
37    ///
38    /// #### `autologin-user-hint`
39    ///  Readable
40    ///
41    ///
42    /// #### `default-session-hint`
43    ///  Readable
44    ///
45    ///
46    /// #### `has-guest-account-hint`
47    ///  Readable
48    ///
49    ///
50    /// #### `hide-users-hint`
51    ///  Readable
52    ///
53    ///
54    /// #### `in-authentication`
55    ///  Readable
56    ///
57    ///
58    /// #### `is-authenticated`
59    ///  Readable
60    ///
61    ///
62    /// #### `lock-hint`
63    ///  Readable
64    ///
65    ///
66    /// #### `select-guest-hint`
67    ///  Readable
68    ///
69    ///
70    /// #### `select-user-hint`
71    ///  Readable
72    ///
73    ///
74    /// #### `show-manual-login-hint`
75    ///  Readable
76    ///
77    ///
78    /// #### `show-remote-login-hint`
79    ///  Readable
80    ///
81    /// ## Signals
82    ///
83    ///
84    /// #### `authentication-complete`
85    ///  The ::authentication-complete signal gets emitted when the greeter
86    /// has completed authentication.
87    ///
88    /// Call lightdm_greeter_get_is_authenticated() to check if the authentication
89    /// was successful.
90    ///
91    ///
92    ///
93    ///
94    /// #### `autologin-timer-expired`
95    ///  The ::timed-login signal gets emitted when the automatic login timer has expired.
96    /// The application should then call lightdm_greeter_authenticate_autologin().
97    ///
98    ///
99    ///
100    ///
101    /// #### `idle`
102    ///  The ::idle signal gets emitted when the user has logged in and the
103    /// greeter is no longer needed.
104    ///
105    /// This signal only matters if the greeter has marked itself as
106    /// resettable using lightdm_greeter_set_resettable().
107    ///
108    ///
109    ///
110    ///
111    /// #### `reset`
112    ///  The ::reset signal gets emitted when the user is returning to a greeter
113    /// that was previously marked idle.
114    ///
115    /// This signal only matters if the greeter has marked itself as
116    /// resettable using lightdm_greeter_set_resettable().
117    ///
118    ///
119    ///
120    ///
121    /// #### `show-message`
122    ///  The ::show-message signal gets emitted when the greeter
123    /// should show a message to the user.
124    ///
125    ///
126    ///
127    ///
128    /// #### `show-prompt`
129    ///  The ::show-prompt signal gets emitted when the greeter should show a
130    /// prompt to the user.  The given text should be displayed and an input
131    /// field for the user to provide a response.
132    ///
133    /// Call lightdm_greeter_respond() with the resultant input or
134    /// lightdm_greeter_cancel_authentication() to abort the authentication.
135    ///
136    ///
137    ///
138    /// # Implements
139    ///
140    /// [`GreeterExt`][trait@crate::prelude::GreeterExt], [`GreeterExtManual`][trait@crate::prelude::GreeterExtManual]
141    #[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    /// Create a new greeter.
153    ///
154    /// # Returns
155    ///
156    /// the new #LightDMGreeter
157    #[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
170/// Trait containing all [`struct@Greeter`] methods.
171///
172/// # Implementors
173///
174/// [`Greeter`][struct@crate::Greeter]
175pub trait GreeterExt: IsA<Greeter> + 'static {
176    /// Cancel the automatic login.
177    #[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    /// Get the user that is being authenticated.
185    ///
186    /// # Returns
187    ///
188    /// The username of the authentication user being authenticated or #NULL if no authentication in progress.
189    #[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    /// Check if the guest account should be automatically logged into when the timer expires.
201    ///
202    /// # Returns
203    ///
204    /// #TRUE if the guest account should be automatically logged into.
205    #[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    /// Get the session used to automatically log into when the timer expires.
217    ///
218    /// # Returns
219    ///
220    /// The session name or [`None`] if configured to use the default.
221    #[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    /// Get the number of seconds to wait before automatically logging in.
233    ///
234    /// # Returns
235    ///
236    /// The number of seconds to wait before automatically logging in or 0 for no timeout.
237    #[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    /// Get the user account to automatically log into when the timer expires.
245    ///
246    /// # Returns
247    ///
248    /// The user account to automatically log into or [`None`] if none configured.
249    #[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    /// Get the default session to use.
261    ///
262    /// # Returns
263    ///
264    /// The session name
265    #[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    /// Check if guest sessions are supported.
277    ///
278    /// # Returns
279    ///
280    /// #TRUE if guest sessions are supported.
281    #[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    /// Check if user accounts should be shown.  If this is TRUE then the list of
293    /// accounts should be taken from #LightDMUserList and displayed in the greeter
294    /// for the user to choose from.  Note that this list can be empty and it is
295    /// recommended you show a method for the user to enter a username manually.
296    ///
297    /// If this option is shown the greeter should only allow these users to be
298    /// chosen for login unless the manual login hint is set.
299    ///
300    /// # Returns
301    ///
302    /// #TRUE if the available users should not be shown.
303    #[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    /// Get a hint.
315    /// ## `name`
316    /// The hint name to query.
317    ///
318    /// # Returns
319    ///
320    /// The value for this hint or #NULL if not set.
321    #[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    /// Checks if the greeter is in the process of authenticating.
333    ///
334    /// # Returns
335    ///
336    /// #TRUE if the greeter is authenticating a user.
337    #[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    /// Checks if the greeter has successfully authenticated.
349    ///
350    /// # Returns
351    ///
352    /// #TRUE if the greeter is authenticated for login.
353    #[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    /// Check if the greeter is acting as a lock screen.
365    ///
366    /// # Returns
367    ///
368    /// #TRUE if the greeter was triggered by locking the seat.
369    #[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    /// Check if the guest account should be selected by default.
381    ///
382    /// # Returns
383    ///
384    /// #TRUE if the guest account should be selected by default.
385    #[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    /// Get the user to select by default.
397    ///
398    /// # Returns
399    ///
400    /// A username or [`None`] if no particular user should be selected.
401    #[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    /// Check if a manual login option should be shown.  If set the GUI
413    /// should provide a way for a username to be entered manually.
414    /// Without this hint a greeter which is showing a user list can
415    /// limit logins to only those users.
416    ///
417    /// # Returns
418    ///
419    /// #TRUE if a manual login option should be shown.
420    #[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    /// Check if a remote login option should be shown.  If set the GUI
432    /// should provide a way for a user to log into a remote desktop server.
433    ///
434    /// # Returns
435    ///
436    /// #TRUE if a remote login option should be shown.
437    #[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    /// Set whether the greeter will be reset instead of killed after the user logs in.
449    /// This must be called before lightdm_greeter_connect is called.
450    /// ## `resettable`
451    /// Whether the greeter wants to be reset instead of killed after the user logs in
452    #[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    /// The ::authentication-complete signal gets emitted when the greeter
463    /// has completed authentication.
464    ///
465    /// Call lightdm_greeter_get_is_authenticated() to check if the authentication
466    /// was successful.
467    #[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    /// The ::timed-login signal gets emitted when the automatic login timer has expired.
495    /// The application should then call lightdm_greeter_authenticate_autologin().
496    #[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    /// The ::idle signal gets emitted when the user has logged in and the
524    /// greeter is no longer needed.
525    ///
526    /// This signal only matters if the greeter has marked itself as
527    /// resettable using lightdm_greeter_set_resettable().
528    #[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    /// The ::reset signal gets emitted when the user is returning to a greeter
553    /// that was previously marked idle.
554    ///
555    /// This signal only matters if the greeter has marked itself as
556    /// resettable using lightdm_greeter_set_resettable().
557    #[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    /// The ::show-message signal gets emitted when the greeter
582    /// should show a message to the user.
583    /// ## `text`
584    /// Message text
585    /// ## `type_`
586    /// Message type
587    #[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    /// The ::show-prompt signal gets emitted when the greeter should show a
624    /// prompt to the user.  The given text should be displayed and an input
625    /// field for the user to provide a response.
626    ///
627    /// Call lightdm_greeter_respond() with the resultant input or
628    /// lightdm_greeter_cancel_authentication() to abort the authentication.
629    /// ## `text`
630    /// Prompt text
631    /// ## `type_`
632    /// Prompt type
633    #[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 {}