Struct objc2_core_image::CIContext
source · #[repr(C)]pub struct CIContext { /* private fields */ }Available on crate feature
CIContext only.Implementations§
source§impl CIContext
impl CIContext
pub unsafe fn contextWithOptions( options: Option<&NSDictionary<CIContextOption, AnyObject>> ) -> Retained<CIContext>
pub unsafe fn context() -> Retained<CIContext>
pub unsafe fn initWithOptions( this: Allocated<Self>, options: Option<&NSDictionary<CIContextOption, AnyObject>> ) -> Retained<Self>
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>
pub unsafe fn contextWithMTLDevice( device: &ProtocolObject<dyn MTLDevice> ) -> Retained<CIContext>
Available on crate feature
objc2-metal only.pub unsafe fn contextWithMTLDevice_options( device: &ProtocolObject<dyn MTLDevice>, options: Option<&NSDictionary<CIContextOption, AnyObject>> ) -> Retained<CIContext>
Available on crate feature
objc2-metal only.pub unsafe fn contextWithMTLCommandQueue( command_queue: &ProtocolObject<dyn MTLCommandQueue> ) -> Retained<CIContext>
Available on crate feature
objc2-metal only.pub unsafe fn contextWithMTLCommandQueue_options( command_queue: &ProtocolObject<dyn MTLCommandQueue>, options: Option<&NSDictionary<CIContextOption, AnyObject>> ) -> Retained<CIContext>
Available on crate feature
objc2-metal only.pub unsafe fn workingFormat(&self) -> CIFormat
Available on crate feature
CIImage only.pub unsafe fn drawImage_atPoint_fromRect( &self, image: &CIImage, at_point: CGPoint, from_rect: CGRect )
👎Deprecated
Available on crate feature
CIImage only.pub unsafe fn drawImage_inRect_fromRect( &self, image: &CIImage, in_rect: CGRect, from_rect: CGRect )
Available on crate feature
CIImage only.pub unsafe fn reclaimResources(&self)
pub unsafe fn clearCaches(&self)
pub unsafe fn inputImageMaximumSize(&self) -> CGSize
pub unsafe fn outputImageMaximumSize(&self) -> CGSize
impl CIContext
This impl block contains no items.
createCGImage
source§impl CIContext
impl CIContext
OfflineGPUSupport
pub unsafe fn offlineGPUCount() -> c_uint
pub unsafe fn contextForOfflineGPUAtIndex( index: c_uint ) -> Option<Retained<CIContext>>
👎Deprecated: Core Image OpenGL API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)
source§impl CIContext
impl CIContext
ImageRepresentation
pub unsafe fn OpenEXRRepresentationOfImage_options_error( &self, image: &CIImage, options: &NSDictionary<CIImageRepresentationOption, AnyObject> ) -> Result<Retained<NSData>, Retained<NSError>>
Available on crate feature
CIImage only.pub unsafe fn writeOpenEXRRepresentationOfImage_toURL_options_error( &self, image: &CIImage, url: &NSURL, options: &NSDictionary<CIImageRepresentationOption, AnyObject> ) -> Result<(), Retained<NSError>>
Available on crate feature
CIImage only.source§impl CIContext
impl CIContext
CIDepthBlurEffect
pub unsafe fn depthBlurEffectFilterForImageURL_options( &self, url: &NSURL, options: Option<&NSDictionary> ) -> Option<Retained<CIFilter>>
Available on crate feature
CIFilter only.pub unsafe fn depthBlurEffectFilterForImageData_options( &self, data: &NSData, options: Option<&NSDictionary> ) -> Option<Retained<CIFilter>>
Available on crate feature
CIFilter only.source§impl CIContext
impl CIContext
CIRenderDestination
pub unsafe fn startTaskToRender_fromRect_toDestination_atPoint_error( &self, image: &CIImage, from_rect: CGRect, destination: &CIRenderDestination, at_point: CGPoint ) -> Result<Retained<CIRenderTask>, Retained<NSError>>
Available on crate features
CIRenderDestination and CIImage only.pub unsafe fn startTaskToRender_toDestination_error( &self, image: &CIImage, destination: &CIRenderDestination ) -> Result<Retained<CIRenderTask>, Retained<NSError>>
Available on crate features
CIRenderDestination and CIImage only.pub unsafe fn prepareRender_fromRect_toDestination_atPoint_error( &self, image: &CIImage, from_rect: CGRect, destination: &CIRenderDestination, at_point: CGPoint ) -> Result<(), Retained<NSError>>
Available on crate features
CIRenderDestination and CIImage only.pub unsafe fn startTaskToClear_error( &self, destination: &CIRenderDestination ) -> Result<Retained<CIRenderTask>, Retained<NSError>>
Available on crate feature
CIRenderDestination only.Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
pub fn class(&self) -> &'static AnyClass
Dynamically find the class of this object.
§Example
Check that an instance of NSObject has the precise class NSObject.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load instead.Use Ivar::load instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T.
See Ivar::load_ptr for details surrounding this.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut instead.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut instead.Use Ivar::load_mut instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T.
See Ivar::load_ptr for details surrounding this.
Trait Implementations§
source§impl BorrowMut<AnyObject> for CIContext
impl BorrowMut<AnyObject> for CIContext
source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSObject> for CIContext
impl BorrowMut<NSObject> for CIContext
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
source§impl ClassType for CIContext
impl ClassType for CIContext
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "CIContext"
const NAME: &'static str = "CIContext"
The name of the Objective-C class that this type represents. Read more
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
source§impl NSObjectProtocol for CIContext
impl NSObjectProtocol for CIContext
source§fn isEqual(&self, other: &AnyObject) -> bool
fn isEqual(&self, other: &AnyObject) -> bool
Check whether the object is equal to an arbitrary other object. Read more
source§fn hash(&self) -> usize
fn hash(&self) -> usize
An integer that can be used as a table address in a hash table
structure. Read more
source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of the class, or one of its
subclasses. Read more
source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
Check if the object is an instance of the class type, or one of its
subclasses. Read more
source§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of a specific class, without
checking subclasses. Read more
source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Check whether the object implements or inherits a method with the
given selector. Read more
source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Check whether the object conforms to a given protocol. Read more
source§fn debugDescription(&self) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
A textual representation of the object to use when debugging. Read more
source§impl PartialEq for CIContext
impl PartialEq for CIContext
source§impl RefEncode for CIContext
impl RefEncode for CIContext
source§const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for CIContext
impl Message for CIContext
impl StructuralPartialEq for CIContext
Auto Trait Implementations§
impl !Freeze for CIContext
impl !RefUnwindSafe for CIContext
impl !Send for CIContext
impl !Sync for CIContext
impl !Unpin for CIContext
impl !UnwindSafe for CIContext
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CounterpartOrSelf for T
impl<T> CounterpartOrSelf for T
§type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
The immutable counterpart of the type, or
Self if the type has no
immutable counterpart. Read more§type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
The mutable counterpart of the type, or
Self if the type has no
mutable counterpart. Read more