tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ugender.h (2106B)


      1 // © 2016 and later: Unicode, Inc. and others.
      2 // License & terms of use: http://www.unicode.org/copyright.html
      3 /*
      4 *****************************************************************************************
      5 * Copyright (C) 2010-2013, International Business Machines
      6 * Corporation and others. All Rights Reserved.
      7 *****************************************************************************************
      8 */
      9 
     10 #ifndef UGENDER_H
     11 #define UGENDER_H
     12 
     13 #include "unicode/utypes.h"
     14 
     15 #if !UCONFIG_NO_FORMATTING
     16 
     17 #if U_SHOW_CPLUSPLUS_API
     18 #include "unicode/localpointer.h"
     19 #endif   // U_SHOW_CPLUSPLUS_API
     20 
     21 /**
     22 * \file
     23 * \brief C API: The purpose of this API is to compute the gender of a list as a
     24 * whole given the gender of each element.
     25 *
     26 */
     27 
     28 /**
     29 * Genders
     30 * @stable ICU 50
     31 */
     32 enum UGender {
     33    /**
     34     * Male gender.
     35     * @stable ICU 50
     36     */
     37    UGENDER_MALE,
     38    /**
     39     * Female gender.
     40     * @stable ICU 50
     41     */
     42    UGENDER_FEMALE,
     43    /**
     44     * Neutral gender.
     45     * @stable ICU 50
     46     */
     47    UGENDER_OTHER
     48 };
     49 /**
     50 * @stable ICU 50
     51 */
     52 typedef enum UGender UGender;
     53 
     54 struct UGenderInfo;
     55 /**
     56 * Opaque UGenderInfo object for use in C programs.
     57 * @stable ICU 50
     58 */
     59 typedef struct UGenderInfo UGenderInfo;
     60 
     61 /**
     62 * Opens a new UGenderInfo object given locale.
     63 * @param locale The locale for which the rules are desired.
     64 * @param status UErrorCode pointer
     65 * @return A UGenderInfo for the specified locale, or NULL if an error occurred.
     66 * @stable ICU 50
     67 */
     68 U_CAPI const UGenderInfo* U_EXPORT2
     69 ugender_getInstance(const char *locale, UErrorCode *status);
     70 
     71 
     72 /**
     73 * Given a list, returns the gender of the list as a whole.
     74 * @param genderInfo pointer that ugender_getInstance returns.
     75 * @param genders the gender of each element in the list.
     76 * @param size the size of the list.
     77 * @param status A pointer to a UErrorCode to receive any errors.
     78 * @return The gender of the list.
     79 * @stable ICU 50
     80 */
     81 U_CAPI UGender U_EXPORT2
     82 ugender_getListGender(const UGenderInfo* genderInfo, const UGender *genders, int32_t size, UErrorCode *status);
     83 
     84 #endif /* #if !UCONFIG_NO_FORMATTING */
     85 
     86 #endif