jpayne@69: // © 2016 and later: Unicode, Inc. and others. jpayne@69: // License & terms of use: http://www.unicode.org/copyright.html jpayne@69: /* jpayne@69: ***************************************************************************************** jpayne@69: * Copyright (C) 2010-2013, International Business Machines jpayne@69: * Corporation and others. All Rights Reserved. jpayne@69: ***************************************************************************************** jpayne@69: */ jpayne@69: jpayne@69: #ifndef UGENDER_H jpayne@69: #define UGENDER_H jpayne@69: jpayne@69: #include "unicode/utypes.h" jpayne@69: jpayne@69: #if !UCONFIG_NO_FORMATTING jpayne@69: jpayne@69: #include "unicode/localpointer.h" jpayne@69: jpayne@69: /** jpayne@69: * \file jpayne@69: * \brief C API: The purpose of this API is to compute the gender of a list as a jpayne@69: * whole given the gender of each element. jpayne@69: * jpayne@69: */ jpayne@69: jpayne@69: /** jpayne@69: * Genders jpayne@69: * @stable ICU 50 jpayne@69: */ jpayne@69: enum UGender { jpayne@69: /** jpayne@69: * Male gender. jpayne@69: * @stable ICU 50 jpayne@69: */ jpayne@69: UGENDER_MALE, jpayne@69: /** jpayne@69: * Female gender. jpayne@69: * @stable ICU 50 jpayne@69: */ jpayne@69: UGENDER_FEMALE, jpayne@69: /** jpayne@69: * Neutral gender. jpayne@69: * @stable ICU 50 jpayne@69: */ jpayne@69: UGENDER_OTHER jpayne@69: }; jpayne@69: /** jpayne@69: * @stable ICU 50 jpayne@69: */ jpayne@69: typedef enum UGender UGender; jpayne@69: jpayne@69: struct UGenderInfo; jpayne@69: /** jpayne@69: * Opaque UGenderInfo object for use in C programs. jpayne@69: * @stable ICU 50 jpayne@69: */ jpayne@69: typedef struct UGenderInfo UGenderInfo; jpayne@69: jpayne@69: /** jpayne@69: * Opens a new UGenderInfo object given locale. jpayne@69: * @param locale The locale for which the rules are desired. jpayne@69: * @param status UErrorCode pointer jpayne@69: * @return A UGenderInfo for the specified locale, or NULL if an error occurred. jpayne@69: * @stable ICU 50 jpayne@69: */ jpayne@69: U_STABLE const UGenderInfo* U_EXPORT2 jpayne@69: ugender_getInstance(const char *locale, UErrorCode *status); jpayne@69: jpayne@69: jpayne@69: /** jpayne@69: * Given a list, returns the gender of the list as a whole. jpayne@69: * @param genderInfo pointer that ugender_getInstance returns. jpayne@69: * @param genders the gender of each element in the list. jpayne@69: * @param size the size of the list. jpayne@69: * @param status A pointer to a UErrorCode to receive any errors. jpayne@69: * @return The gender of the list. jpayne@69: * @stable ICU 50 jpayne@69: */ jpayne@69: U_STABLE UGender U_EXPORT2 jpayne@69: ugender_getListGender(const UGenderInfo* genderInfo, const UGender *genders, int32_t size, UErrorCode *status); jpayne@69: jpayne@69: #endif /* #if !UCONFIG_NO_FORMATTING */ jpayne@69: jpayne@69: #endif