created and used GObject enum types for all C enums

Instead of all this boilerplate code we could also just use glib-mkenums.