You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contrib/platform/src/com/sun/jna/platform/mac/CoreFoundation.java
+66Lines changed: 66 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1142,4 +1142,70 @@ CFMutableDictionaryRef CFDictionaryCreateMutable(CFAllocatorRef alloc, CFIndex c
1142
1142
* @return The type identifier for the {@code CFString} opaque type.
1143
1143
*/
1144
1144
CFTypeIDCFStringGetTypeID();
1145
+
1146
+
/**
1147
+
* The CFLocale opaque type provides support for obtaining available locales, obtaining localized locale names, and converting among locale data formats.
1148
+
*/
1149
+
classCFLocaleextendsCFTypeRef {
1150
+
}
1151
+
1152
+
/**
1153
+
* Returns a copy of the logical locale for the current user.
1154
+
* @return The logical locale for the current user that is formed from the settings for the current user’s
1155
+
* chosen system locale overlaid with any custom settings the user has specified in System Preferences.
1156
+
* May return a retained cached object, not a new object.
1157
+
* <p>
1158
+
* This reference must be released with {@link #CFRelease} to avoid leaking references.
1159
+
*/
1160
+
CFLocaleCFLocaleCopyCurrent();
1161
+
1162
+
/**
1163
+
* CFDateFormatter objects format the textual representations of CFDate and CFAbsoluteTime objects, and convert textual representations of dates and times into CFDate and CFAbsoluteTime objects.
1164
+
*/
1165
+
classCFDateFormatterextendsCFTypeRef {
1166
+
}
1167
+
1168
+
/**
1169
+
* Enum of values used for {@link CFDateFormatterStyle} in {@link #CFDateFormatterCreate}.
1170
+
* Use {@link CFDateFormatterStyle#index} for the expected integer value corresponding to the C-style enum.
1171
+
*/
1172
+
enumCFDateFormatterStyle {
1173
+
kCFDateFormatterNoStyle,
1174
+
kCFDateFormatterShortStyle,
1175
+
kCFDateFormatterMediumStyle,
1176
+
kCFDateFormatterLongStyle,
1177
+
kCFDateFormatterFullStyle;
1178
+
1179
+
/**
1180
+
* Style for the type of {@link CFDateFormatterStyle} stored.
1181
+
*
1182
+
* @return a {@link CFIndex} representing the enum ordinal.
1183
+
*/
1184
+
publicCFIndexindex() {
1185
+
returnnewCFIndex(this.ordinal());
1186
+
}
1187
+
}
1188
+
1189
+
/**
1190
+
* Creates a new CFDateFormatter object, localized to the given locale, which will format dates to the given date and time styles.
1191
+
* @param allocator The allocator to use to allocate memory for the new object.
1192
+
* Pass {@code null} or {@code kCFAllocatorDefault} to use the current default allocator.
1193
+
* @param locale The locale to use for localization.
1194
+
* If {@code null} uses the default system locale.
1195
+
* Use {@link #CFLocaleCopyCurrent()} to specify the locale of the current user.
1196
+
* @param dateStyle The date style to use when formatting dates.
1197
+
* @param timeStyle The time style to use when formatting times.
1198
+
* @return A new date formatter, localized to the given locale, which will format dates to the given date and time styles.
1199
+
* Returns {@code null} if there was a problem creating the object.
1200
+
* <p>
1201
+
* This reference must be released with {@link #CFRelease} to avoid leaking references.
0 commit comments