Wraps the glib callbacks so that they can be used with c++ methods