//! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT use core::ffi::*; use core::ptr::NonNull; use objc2::__framework_prelude::*; use crate::*; extern_class!( /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nslistformatter?language=objc) #[unsafe(super(NSFormatter, NSObject))] #[derive(Debug, PartialEq, Eq, Hash)] #[cfg(feature = "NSFormatter")] pub struct NSListFormatter; ); #[cfg(all(feature = "NSFormatter", feature = "NSObject"))] extern_conformance!( unsafe impl NSCoding for NSListFormatter {} ); #[cfg(all(feature = "NSFormatter", feature = "NSObject"))] extern_conformance!( unsafe impl NSCopying for NSListFormatter {} ); #[cfg(all(feature = "NSFormatter", feature = "NSObject"))] unsafe impl CopyingHelper for NSListFormatter { type Result = Self; } #[cfg(feature = "NSFormatter")] extern_conformance!( unsafe impl NSObjectProtocol for NSListFormatter {} ); #[cfg(feature = "NSFormatter")] impl NSListFormatter { extern_methods!( #[cfg(feature = "NSLocale")] #[unsafe(method(locale))] #[unsafe(method_family = none)] pub fn locale(&self) -> Retained; #[cfg(feature = "NSLocale")] /// Setter for [`locale`][Self::locale]. /// /// This is [copied][crate::NSCopying::copy] when set. #[unsafe(method(setLocale:))] #[unsafe(method_family = none)] pub fn setLocale(&self, locale: Option<&NSLocale>); #[unsafe(method(itemFormatter))] #[unsafe(method_family = none)] pub fn itemFormatter(&self) -> Option>; /// Setter for [`itemFormatter`][Self::itemFormatter]. /// /// This is [copied][crate::NSCopying::copy] when set. #[unsafe(method(setItemFormatter:))] #[unsafe(method_family = none)] pub fn setItemFormatter(&self, item_formatter: Option<&NSFormatter>); #[cfg(all(feature = "NSArray", feature = "NSString"))] #[unsafe(method(localizedStringByJoiningStrings:))] #[unsafe(method_family = none)] pub fn localizedStringByJoiningStrings(strings: &NSArray) -> Retained; #[cfg(all(feature = "NSArray", feature = "NSString"))] /// # Safety /// /// `items` generic should be of the correct type. #[unsafe(method(stringFromItems:))] #[unsafe(method_family = none)] pub unsafe fn stringFromItems(&self, items: &NSArray) -> Option>; #[cfg(feature = "NSString")] /// # Safety /// /// `obj` should be of the correct type. #[unsafe(method(stringForObjectValue:))] #[unsafe(method_family = none)] pub unsafe fn stringForObjectValue( &self, obj: Option<&AnyObject>, ) -> Option>; ); } /// Methods declared on superclass `NSObject`. #[cfg(feature = "NSFormatter")] impl NSListFormatter { extern_methods!( #[unsafe(method(init))] #[unsafe(method_family = init)] pub fn init(this: Allocated) -> Retained; #[unsafe(method(new))] #[unsafe(method_family = new)] pub fn new() -> Retained; ); } #[cfg(feature = "NSFormatter")] impl DefaultRetained for NSListFormatter { #[inline] fn default_retained() -> Retained { Self::new() } }