/src/wrappers/gtk/examples/hello/my_window.e
Specman e | 22 lines | 18 code | 3 blank | 1 comment | 1 complexity | 83a51c950ef22a39b718d266bfc784cb MD5 | raw file
1class MY_WINDOW 2inherit GTK_WINDOW redefine make, on_destroy end 3creation make 4feature {} 5 make is 6 do 7 Precursor 8 --enable_on_destroy 9 create destroy_callback.make 10 destroy_callback.connect (Current, agent on_destroy) 11 end 12 13feature -- callback 14 destroy_callback: DESTROY_CALLBACK 15 on_destroy is 16 do 17 print ("Look! on_destroy at C level is (void (*)) (void*,void*), while at Eiffel level there's only the (hidden) pointer to Current!%NMy window is being destroyed, therefore we quit the application%N") 18 gtk.quit 19 end 20 21end 22