use objc2::__framework_prelude::*;
use crate::*;
#[cfg(feature = "NSString")]
pub type NSValueTransformerName = NSString;
extern "C" {
#[cfg(feature = "NSString")]
pub static NSNegateBooleanTransformerName: &'static NSValueTransformerName;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSIsNilTransformerName: &'static NSValueTransformerName;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSIsNotNilTransformerName: &'static NSValueTransformerName;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSUnarchiveFromDataTransformerName: &'static NSValueTransformerName;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSKeyedUnarchiveFromDataTransformerName: &'static NSValueTransformerName;
}
extern "C" {
#[cfg(feature = "NSString")]
pub static NSSecureUnarchiveFromDataTransformerName: &'static NSValueTransformerName;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSValueTransformer;
unsafe impl ClassType for NSValueTransformer {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSValueTransformer {}
extern_methods!(
unsafe impl NSValueTransformer {
#[cfg(feature = "NSString")]
#[method(setValueTransformer:forName:)]
pub unsafe fn setValueTransformer_forName(
transformer: Option<&NSValueTransformer>,
name: &NSValueTransformerName,
);
#[cfg(feature = "NSString")]
#[method_id(@__retain_semantics Other valueTransformerForName:)]
pub unsafe fn valueTransformerForName(
name: &NSValueTransformerName,
) -> Option<Retained<NSValueTransformer>>;
#[cfg(all(feature = "NSArray", feature = "NSString"))]
#[method_id(@__retain_semantics Other valueTransformerNames)]
pub unsafe fn valueTransformerNames() -> Retained<NSArray<NSValueTransformerName>>;
#[method(transformedValueClass)]
pub unsafe fn transformedValueClass() -> &'static AnyClass;
#[method(allowsReverseTransformation)]
pub unsafe fn allowsReverseTransformation() -> bool;
#[method_id(@__retain_semantics Other transformedValue:)]
pub unsafe fn transformedValue(
&self,
value: Option<&AnyObject>,
) -> Option<Retained<AnyObject>>;
#[method_id(@__retain_semantics Other reverseTransformedValue:)]
pub unsafe fn reverseTransformedValue(
&self,
value: Option<&AnyObject>,
) -> Option<Retained<AnyObject>>;
}
);
extern_methods!(
unsafe impl NSValueTransformer {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSSecureUnarchiveFromDataTransformer;
unsafe impl ClassType for NSSecureUnarchiveFromDataTransformer {
#[inherits(NSObject)]
type Super = NSValueTransformer;
type Mutability = InteriorMutable;
}
);
unsafe impl NSObjectProtocol for NSSecureUnarchiveFromDataTransformer {}
extern_methods!(
unsafe impl NSSecureUnarchiveFromDataTransformer {
#[cfg(feature = "NSArray")]
#[method_id(@__retain_semantics Other allowedTopLevelClasses)]
pub unsafe fn allowedTopLevelClasses() -> Retained<NSArray<TodoClass>>;
}
);
extern_methods!(
unsafe impl NSSecureUnarchiveFromDataTransformer {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);