Use libgirepository for deriving the object hierarchy and get_type functions.