* incomplete c port (glib2 version)