* @draft ICU 64
*/
typedef struct UFormattedList UFormattedList;
-#endif /* U_HIDE_DRAFT_API */
+#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_DRAFT_API
/**
*/
ULISTFMT_ELEMENT_FIELD
} UListFormatterField;
-#endif // U_HIDE_DRAFT_API
+#endif /* U_HIDE_DRAFT_API */
+
+#ifndef U_HIDE_DRAFT_API
+/**
+ * Type of meaning expressed by the list.
+ *
+ * @draft ICU 67
+ */
+typedef enum UListFormatterType {
+ /**
+ * Conjunction formatting, e.g. "Alice, Bob, Charlie, and Delta".
+ *
+ * @draft ICU 67
+ */
+ ULISTFMT_TYPE_AND,
+
+ /**
+ * Disjunction (or alternative, or simply one of) formatting, e.g.
+ * "Alice, Bob, Charlie, or Delta".
+ *
+ * @draft ICU 67
+ */
+ ULISTFMT_TYPE_OR,
+
+ /**
+ * Formatting of a list of values with units, e.g. "5 pounds, 12 ounces".
+ *
+ * @draft ICU 67
+ */
+ ULISTFMT_TYPE_UNITS
+} UListFormatterType;
+
+/**
+ * Verbosity level of the list patterns.
+ *
+ * @draft ICU 67
+ */
+typedef enum UListFormatterWidth {
+ /**
+ * Use list formatting with full words (no abbreviations) when possible.
+ *
+ * @draft ICU 67
+ */
+ ULISTFMT_WIDTH_WIDE,
+
+ /**
+ * Use list formatting of typical length.
+ * @draft ICU 67
+ */
+ ULISTFMT_WIDTH_SHORT,
+
+ /**
+ * Use list formatting of the shortest possible length.
+ * @draft ICU 67
+ */
+ ULISTFMT_WIDTH_NARROW,
+} UListFormatterWidth;
+#endif /* U_HIDE_DRAFT_API */
/**
* Open a new UListFormatter object using the rules for a given locale.
+ * The object will be initialized with AND type and WIDE width.
+ *
* @param locale
* The locale whose rules should be used; may be NULL for
* default locale.
ulistfmt_open(const char* locale,
UErrorCode* status);
+#ifndef U_HIDE_DRAFT_API
+/**
+ * Open a new UListFormatter object appropriate for the given locale, list type,
+ * and style.
+ *
+ * @param locale
+ * The locale whose rules should be used; may be NULL for
+ * default locale.
+ * @param type
+ * The type of list formatting to use.
+ * @param width
+ * The width of formatting to use.
+ * @param status
+ * A pointer to a standard ICU UErrorCode (input/output parameter).
+ * Its input value must pass the U_SUCCESS() test, or else the
+ * function returns immediately. The caller should check its output
+ * value with U_FAILURE(), or use with function chaining (see User
+ * Guide for details).
+ * @return
+ * A pointer to a UListFormatter object for the specified locale,
+ * or NULL if an error occurred.
+ * @draft ICU 67
+ */
+U_DRAFT UListFormatter* U_EXPORT2
+ulistfmt_openForType(const char* locale, UListFormatterType type,
+ UListFormatterWidth width, UErrorCode* status);
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Close a UListFormatter object. Once closed it may no longer be used.
* @param listfmt
U_NAMESPACE_END
-#endif // U_SHOW_CPLUSPLUS_API
+#endif
/**
* Formats a list of strings using the conventions established for the