Parses a bitmask value into a set of cursor modes.
Converts a set of cursor modes into a bitmask value.