File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -62,9 +62,24 @@ unsafe impl<T: GtkApplicationImpl> IsSubclassable<T> for Application {
62
62
let klass = class. as_mut ( ) ;
63
63
klass. window_added = Some ( application_window_added :: < T > ) ;
64
64
klass. window_removed = Some ( application_window_removed :: < T > ) ;
65
+
66
+ // Chain our startup handler in here
67
+ let parent_klass = & mut class. as_mut ( ) . parent_class ;
68
+ parent_klass. startup = Some ( application_startup :: < T > ) ;
65
69
}
66
70
}
67
71
72
+ unsafe extern "C" fn application_startup < T : ObjectSubclass > ( ptr : * mut gio:: ffi:: GApplication )
73
+ where
74
+ T : GtkApplicationImpl ,
75
+ {
76
+ let instance = & * ( ptr as * mut T :: Instance ) ;
77
+ let imp = instance. get_impl ( ) ;
78
+ let wrap: Borrowed < gio:: Application > = from_glib_borrow ( ptr) ;
79
+ crate :: rt:: set_initialized ( ) ;
80
+ imp. startup ( wrap. unsafe_cast_ref ( ) )
81
+ }
82
+
68
83
unsafe extern "C" fn application_window_added < T : GtkApplicationImpl > (
69
84
ptr : * mut ffi:: GtkApplication ,
70
85
wptr : * mut ffi:: GtkWindow ,
You can’t perform that action at this time.
0 commit comments