//! 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::*; #[cfg(feature = "objc2-core-foundation")] use objc2_core_foundation::*; #[cfg(feature = "objc2-core-graphics")] use objc2_core_graphics::*; use objc2_foundation::*; use crate::*; extern_class!( /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/caemittercell?language=objc) #[unsafe(super(NSObject))] #[derive(Debug, PartialEq, Eq, Hash)] pub struct CAEmitterCell; ); #[cfg(feature = "CAMediaTiming")] extern_conformance!( unsafe impl CAMediaTiming for CAEmitterCell {} ); extern_conformance!( unsafe impl NSCoding for CAEmitterCell {} ); extern_conformance!( unsafe impl NSObjectProtocol for CAEmitterCell {} ); extern_conformance!( unsafe impl NSSecureCoding for CAEmitterCell {} ); impl CAEmitterCell { extern_methods!( #[unsafe(method(emitterCell))] #[unsafe(method_family = none)] pub fn emitterCell() -> Retained; #[unsafe(method(defaultValueForKey:))] #[unsafe(method_family = none)] pub fn defaultValueForKey(key: &NSString) -> Option>; #[unsafe(method(shouldArchiveValueForKey:))] #[unsafe(method_family = none)] pub fn shouldArchiveValueForKey(&self, key: &NSString) -> bool; #[unsafe(method(name))] #[unsafe(method_family = none)] pub fn name(&self) -> Option>; /// Setter for [`name`][Self::name]. /// /// This is [copied][objc2_foundation::NSCopying::copy] when set. #[unsafe(method(setName:))] #[unsafe(method_family = none)] pub fn setName(&self, name: Option<&NSString>); #[unsafe(method(isEnabled))] #[unsafe(method_family = none)] pub fn isEnabled(&self) -> bool; /// Setter for [`isEnabled`][Self::isEnabled]. #[unsafe(method(setEnabled:))] #[unsafe(method_family = none)] pub fn setEnabled(&self, enabled: bool); #[unsafe(method(birthRate))] #[unsafe(method_family = none)] pub fn birthRate(&self) -> c_float; /// Setter for [`birthRate`][Self::birthRate]. #[unsafe(method(setBirthRate:))] #[unsafe(method_family = none)] pub fn setBirthRate(&self, birth_rate: c_float); #[unsafe(method(lifetime))] #[unsafe(method_family = none)] pub fn lifetime(&self) -> c_float; /// Setter for [`lifetime`][Self::lifetime]. #[unsafe(method(setLifetime:))] #[unsafe(method_family = none)] pub fn setLifetime(&self, lifetime: c_float); #[unsafe(method(lifetimeRange))] #[unsafe(method_family = none)] pub fn lifetimeRange(&self) -> c_float; /// Setter for [`lifetimeRange`][Self::lifetimeRange]. #[unsafe(method(setLifetimeRange:))] #[unsafe(method_family = none)] pub fn setLifetimeRange(&self, lifetime_range: c_float); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(emissionLatitude))] #[unsafe(method_family = none)] pub fn emissionLatitude(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`emissionLatitude`][Self::emissionLatitude]. #[unsafe(method(setEmissionLatitude:))] #[unsafe(method_family = none)] pub fn setEmissionLatitude(&self, emission_latitude: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(emissionLongitude))] #[unsafe(method_family = none)] pub fn emissionLongitude(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`emissionLongitude`][Self::emissionLongitude]. #[unsafe(method(setEmissionLongitude:))] #[unsafe(method_family = none)] pub fn setEmissionLongitude(&self, emission_longitude: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(emissionRange))] #[unsafe(method_family = none)] pub fn emissionRange(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`emissionRange`][Self::emissionRange]. #[unsafe(method(setEmissionRange:))] #[unsafe(method_family = none)] pub fn setEmissionRange(&self, emission_range: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(velocity))] #[unsafe(method_family = none)] pub fn velocity(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`velocity`][Self::velocity]. #[unsafe(method(setVelocity:))] #[unsafe(method_family = none)] pub fn setVelocity(&self, velocity: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(velocityRange))] #[unsafe(method_family = none)] pub fn velocityRange(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`velocityRange`][Self::velocityRange]. #[unsafe(method(setVelocityRange:))] #[unsafe(method_family = none)] pub fn setVelocityRange(&self, velocity_range: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(xAcceleration))] #[unsafe(method_family = none)] pub fn xAcceleration(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`xAcceleration`][Self::xAcceleration]. #[unsafe(method(setXAcceleration:))] #[unsafe(method_family = none)] pub fn setXAcceleration(&self, x_acceleration: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(yAcceleration))] #[unsafe(method_family = none)] pub fn yAcceleration(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`yAcceleration`][Self::yAcceleration]. #[unsafe(method(setYAcceleration:))] #[unsafe(method_family = none)] pub fn setYAcceleration(&self, y_acceleration: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(zAcceleration))] #[unsafe(method_family = none)] pub fn zAcceleration(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`zAcceleration`][Self::zAcceleration]. #[unsafe(method(setZAcceleration:))] #[unsafe(method_family = none)] pub fn setZAcceleration(&self, z_acceleration: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(scale))] #[unsafe(method_family = none)] pub fn scale(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`scale`][Self::scale]. #[unsafe(method(setScale:))] #[unsafe(method_family = none)] pub fn setScale(&self, scale: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(scaleRange))] #[unsafe(method_family = none)] pub fn scaleRange(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`scaleRange`][Self::scaleRange]. #[unsafe(method(setScaleRange:))] #[unsafe(method_family = none)] pub fn setScaleRange(&self, scale_range: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(scaleSpeed))] #[unsafe(method_family = none)] pub fn scaleSpeed(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`scaleSpeed`][Self::scaleSpeed]. #[unsafe(method(setScaleSpeed:))] #[unsafe(method_family = none)] pub fn setScaleSpeed(&self, scale_speed: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(spin))] #[unsafe(method_family = none)] pub fn spin(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`spin`][Self::spin]. #[unsafe(method(setSpin:))] #[unsafe(method_family = none)] pub fn setSpin(&self, spin: CGFloat); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(spinRange))] #[unsafe(method_family = none)] pub fn spinRange(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`spinRange`][Self::spinRange]. #[unsafe(method(setSpinRange:))] #[unsafe(method_family = none)] pub fn setSpinRange(&self, spin_range: CGFloat); #[cfg(feature = "objc2-core-graphics")] #[unsafe(method(color))] #[unsafe(method_family = none)] pub fn color(&self) -> Option>; #[cfg(feature = "objc2-core-graphics")] /// Setter for [`color`][Self::color]. #[unsafe(method(setColor:))] #[unsafe(method_family = none)] pub fn setColor(&self, color: Option<&CGColor>); #[unsafe(method(redRange))] #[unsafe(method_family = none)] pub fn redRange(&self) -> c_float; /// Setter for [`redRange`][Self::redRange]. #[unsafe(method(setRedRange:))] #[unsafe(method_family = none)] pub fn setRedRange(&self, red_range: c_float); #[unsafe(method(greenRange))] #[unsafe(method_family = none)] pub fn greenRange(&self) -> c_float; /// Setter for [`greenRange`][Self::greenRange]. #[unsafe(method(setGreenRange:))] #[unsafe(method_family = none)] pub fn setGreenRange(&self, green_range: c_float); #[unsafe(method(blueRange))] #[unsafe(method_family = none)] pub fn blueRange(&self) -> c_float; /// Setter for [`blueRange`][Self::blueRange]. #[unsafe(method(setBlueRange:))] #[unsafe(method_family = none)] pub fn setBlueRange(&self, blue_range: c_float); #[unsafe(method(alphaRange))] #[unsafe(method_family = none)] pub fn alphaRange(&self) -> c_float; /// Setter for [`alphaRange`][Self::alphaRange]. #[unsafe(method(setAlphaRange:))] #[unsafe(method_family = none)] pub fn setAlphaRange(&self, alpha_range: c_float); #[unsafe(method(redSpeed))] #[unsafe(method_family = none)] pub fn redSpeed(&self) -> c_float; /// Setter for [`redSpeed`][Self::redSpeed]. #[unsafe(method(setRedSpeed:))] #[unsafe(method_family = none)] pub fn setRedSpeed(&self, red_speed: c_float); #[unsafe(method(greenSpeed))] #[unsafe(method_family = none)] pub fn greenSpeed(&self) -> c_float; /// Setter for [`greenSpeed`][Self::greenSpeed]. #[unsafe(method(setGreenSpeed:))] #[unsafe(method_family = none)] pub fn setGreenSpeed(&self, green_speed: c_float); #[unsafe(method(blueSpeed))] #[unsafe(method_family = none)] pub fn blueSpeed(&self) -> c_float; /// Setter for [`blueSpeed`][Self::blueSpeed]. #[unsafe(method(setBlueSpeed:))] #[unsafe(method_family = none)] pub fn setBlueSpeed(&self, blue_speed: c_float); #[unsafe(method(alphaSpeed))] #[unsafe(method_family = none)] pub fn alphaSpeed(&self) -> c_float; /// Setter for [`alphaSpeed`][Self::alphaSpeed]. #[unsafe(method(setAlphaSpeed:))] #[unsafe(method_family = none)] pub fn setAlphaSpeed(&self, alpha_speed: c_float); #[unsafe(method(contents))] #[unsafe(method_family = none)] pub fn contents(&self) -> Option>; /// Setter for [`contents`][Self::contents]. /// /// # Safety /// /// `contents` should be of the correct type. #[unsafe(method(setContents:))] #[unsafe(method_family = none)] pub unsafe fn setContents(&self, contents: Option<&AnyObject>); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(contentsRect))] #[unsafe(method_family = none)] pub fn contentsRect(&self) -> CGRect; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`contentsRect`][Self::contentsRect]. #[unsafe(method(setContentsRect:))] #[unsafe(method_family = none)] pub fn setContentsRect(&self, contents_rect: CGRect); #[cfg(feature = "objc2-core-foundation")] #[unsafe(method(contentsScale))] #[unsafe(method_family = none)] pub fn contentsScale(&self) -> CGFloat; #[cfg(feature = "objc2-core-foundation")] /// Setter for [`contentsScale`][Self::contentsScale]. #[unsafe(method(setContentsScale:))] #[unsafe(method_family = none)] pub fn setContentsScale(&self, contents_scale: CGFloat); #[unsafe(method(minificationFilter))] #[unsafe(method_family = none)] pub fn minificationFilter(&self) -> Retained; /// Setter for [`minificationFilter`][Self::minificationFilter]. /// /// This is [copied][objc2_foundation::NSCopying::copy] when set. #[unsafe(method(setMinificationFilter:))] #[unsafe(method_family = none)] pub fn setMinificationFilter(&self, minification_filter: &NSString); #[unsafe(method(magnificationFilter))] #[unsafe(method_family = none)] pub fn magnificationFilter(&self) -> Retained; /// Setter for [`magnificationFilter`][Self::magnificationFilter]. /// /// This is [copied][objc2_foundation::NSCopying::copy] when set. #[unsafe(method(setMagnificationFilter:))] #[unsafe(method_family = none)] pub fn setMagnificationFilter(&self, magnification_filter: &NSString); #[unsafe(method(minificationFilterBias))] #[unsafe(method_family = none)] pub fn minificationFilterBias(&self) -> c_float; /// Setter for [`minificationFilterBias`][Self::minificationFilterBias]. #[unsafe(method(setMinificationFilterBias:))] #[unsafe(method_family = none)] pub fn setMinificationFilterBias(&self, minification_filter_bias: c_float); #[unsafe(method(emitterCells))] #[unsafe(method_family = none)] pub fn emitterCells(&self) -> Option>>; /// Setter for [`emitterCells`][Self::emitterCells]. /// /// This is [copied][objc2_foundation::NSCopying::copy] when set. #[unsafe(method(setEmitterCells:))] #[unsafe(method_family = none)] pub fn setEmitterCells(&self, emitter_cells: Option<&NSArray>); #[unsafe(method(style))] #[unsafe(method_family = none)] pub fn style(&self) -> Option>; /// Setter for [`style`][Self::style]. /// /// This is [copied][objc2_foundation::NSCopying::copy] when set. /// /// # Safety /// /// `style` generic should be of the correct type. #[unsafe(method(setStyle:))] #[unsafe(method_family = none)] pub unsafe fn setStyle(&self, style: Option<&NSDictionary>); ); } /// Methods declared on superclass `NSObject`. impl CAEmitterCell { 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; ); } impl DefaultRetained for CAEmitterCell { #[inline] fn default_retained() -> Retained { Self::new() } }