Identifying chemical and physical changes in wide-gap semiconductors using real-time and near ambient-pressure XPS.