add G_BEGIN/END_DECLS to the mainloop header