use std::os::raw::{c_double, c_void};
use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFOptionFlags, CFRange, CFTypeID, CFTypeRef};
use crate::locale::CFLocaleRef;
use crate::number::{CFNumberRef, CFNumberType};
use crate::string::CFStringRef;
#[repr(C)]
pub struct __CFNumberFormatter(c_void);
pub type CFNumberFormatterRef = *mut __CFNumberFormatter;
pub type CFNumberFormatterKey = CFStringRef;
pub type CFNumberFormatterStyle = CFIndex;
pub type CFNumberFormatterOptionFlags = CFOptionFlags;
pub type CFNumberFormatterRoundingMode = CFIndex;
pub type CFNumberFormatterPadPosition = CFIndex;
pub const kCFNumberFormatterNoStyle: CFNumberFormatterStyle = 0;
pub const kCFNumberFormatterDecimalStyle: CFNumberFormatterStyle = 1;
pub const kCFNumberFormatterCurrencyStyle: CFNumberFormatterStyle = 2;
pub const kCFNumberFormatterPercentStyle: CFNumberFormatterStyle = 3;
pub const kCFNumberFormatterScientificStyle: CFNumberFormatterStyle = 4;
pub const kCFNumberFormatterSpellOutStyle: CFNumberFormatterStyle = 5;
pub const kCFNumberFormatterParseIntegersOnly: CFNumberFormatterOptionFlags = 1;
pub const kCFNumberFormatterRoundCeiling: CFNumberFormatterRoundingMode = 0;
pub const kCFNumberFormatterRoundFloor: CFNumberFormatterRoundingMode = 1;
pub const kCFNumberFormatterRoundDown: CFNumberFormatterRoundingMode = 2;
pub const kCFNumberFormatterRoundUp: CFNumberFormatterRoundingMode = 3;
pub const kCFNumberFormatterRoundHalfEven: CFNumberFormatterRoundingMode = 4;
pub const kCFNumberFormatterRoundHalfDown: CFNumberFormatterRoundingMode = 5;
pub const kCFNumberFormatterRoundHalfUp: CFNumberFormatterRoundingMode = 6;
pub const kCFNumberFormatterPadBeforePrefix: CFNumberFormatterPadPosition = 0;
pub const kCFNumberFormatterPadAfterPrefix: CFNumberFormatterPadPosition = 1;
pub const kCFNumberFormatterPadBeforeSuffix: CFNumberFormatterPadPosition = 2;
pub const kCFNumberFormatterPadAfterSuffix: CFNumberFormatterPadPosition = 3;
extern "C" {
pub static kCFNumberFormatterCurrencyCode: CFNumberFormatterKey; pub static kCFNumberFormatterDecimalSeparator: CFNumberFormatterKey; pub static kCFNumberFormatterCurrencyDecimalSeparator: CFNumberFormatterKey; pub static kCFNumberFormatterAlwaysShowDecimalSeparator: CFNumberFormatterKey; pub static kCFNumberFormatterGroupingSeparator: CFNumberFormatterKey; pub static kCFNumberFormatterUseGroupingSeparator: CFNumberFormatterKey; pub static kCFNumberFormatterPercentSymbol: CFNumberFormatterKey; pub static kCFNumberFormatterZeroSymbol: CFNumberFormatterKey; pub static kCFNumberFormatterNaNSymbol: CFNumberFormatterKey; pub static kCFNumberFormatterInfinitySymbol: CFNumberFormatterKey; pub static kCFNumberFormatterMinusSign: CFNumberFormatterKey; pub static kCFNumberFormatterPlusSign: CFNumberFormatterKey; pub static kCFNumberFormatterCurrencySymbol: CFNumberFormatterKey; pub static kCFNumberFormatterExponentSymbol: CFNumberFormatterKey; pub static kCFNumberFormatterMinIntegerDigits: CFNumberFormatterKey; pub static kCFNumberFormatterMaxIntegerDigits: CFNumberFormatterKey; pub static kCFNumberFormatterMinFractionDigits: CFNumberFormatterKey; pub static kCFNumberFormatterMaxFractionDigits: CFNumberFormatterKey; pub static kCFNumberFormatterGroupingSize: CFNumberFormatterKey; pub static kCFNumberFormatterSecondaryGroupingSize: CFNumberFormatterKey; pub static kCFNumberFormatterRoundingMode: CFNumberFormatterKey; pub static kCFNumberFormatterRoundingIncrement: CFNumberFormatterKey; pub static kCFNumberFormatterFormatWidth: CFNumberFormatterKey; pub static kCFNumberFormatterPaddingPosition: CFNumberFormatterKey; pub static kCFNumberFormatterPaddingCharacter: CFNumberFormatterKey; pub static kCFNumberFormatterDefaultFormat: CFNumberFormatterKey; pub static kCFNumberFormatterMultiplier: CFNumberFormatterKey; pub static kCFNumberFormatterPositivePrefix: CFNumberFormatterKey; pub static kCFNumberFormatterPositiveSuffix: CFNumberFormatterKey; pub static kCFNumberFormatterNegativePrefix: CFNumberFormatterKey; pub static kCFNumberFormatterNegativeSuffix: CFNumberFormatterKey; pub static kCFNumberFormatterPerMillSymbol: CFNumberFormatterKey; pub static kCFNumberFormatterInternationalCurrencySymbol: CFNumberFormatterKey; pub static kCFNumberFormatterCurrencyGroupingSeparator: CFNumberFormatterKey; pub static kCFNumberFormatterIsLenient: CFNumberFormatterKey; pub static kCFNumberFormatterUseSignificantDigits: CFNumberFormatterKey; pub static kCFNumberFormatterMinSignificantDigits: CFNumberFormatterKey; pub static kCFNumberFormatterMaxSignificantDigits: CFNumberFormatterKey; pub fn CFNumberFormatterCreate(
allocator: CFAllocatorRef,
locale: CFLocaleRef,
style: CFNumberFormatterStyle,
) -> CFNumberFormatterRef;
pub fn CFNumberFormatterSetFormat(formatter: CFNumberFormatterRef, formatString: CFStringRef);
pub fn CFNumberFormatterSetProperty(
formatter: CFNumberFormatterRef,
key: CFNumberFormatterKey,
value: CFTypeRef,
);
pub fn CFNumberFormatterCreateNumberFromString(
allocator: CFAllocatorRef,
formatter: CFNumberFormatterRef,
string: CFStringRef,
rangep: *mut CFRange,
options: CFOptionFlags,
) -> CFNumberRef;
pub fn CFNumberFormatterCreateStringWithNumber(
allocator: CFAllocatorRef,
formatter: CFNumberFormatterRef,
number: CFNumberRef,
) -> CFStringRef;
pub fn CFNumberFormatterCreateStringWithValue(
allocator: CFAllocatorRef,
formatter: CFNumberFormatterRef,
numberType: CFNumberType,
valuePtr: *const c_void,
) -> CFStringRef;
pub fn CFNumberFormatterGetDecimalInfoForCurrencyCode(
currencyCode: CFStringRef,
defaultFractionDigits: *mut i32,
roundingIncrement: *mut c_double,
) -> Boolean;
pub fn CFNumberFormatterGetValueFromString(
formatter: CFNumberFormatterRef,
string: CFStringRef,
rangep: *mut CFRange,
numberType: CFNumberType,
valuePtr: *mut c_void,
) -> Boolean;
pub fn CFNumberFormatterCopyProperty(
formatter: CFNumberFormatterRef,
key: CFNumberFormatterKey,
) -> CFTypeRef;
pub fn CFNumberFormatterGetFormat(formatter: CFNumberFormatterRef) -> CFStringRef;
pub fn CFNumberFormatterGetLocale(formatter: CFNumberFormatterRef) -> CFLocaleRef;
pub fn CFNumberFormatterGetStyle(formatter: CFNumberFormatterRef) -> CFNumberFormatterStyle;
pub fn CFNumberFormatterGetTypeID() -> CFTypeID;
}