Change as many C enums to NS_ENUM or NS_OPTIONS.
These are more type-safe and Swift-compatible.